blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
116
path
stringlengths
2
241
src_encoding
stringclasses
31 values
length_bytes
int64
14
3.6M
score
float64
2.52
5.13
int_score
int64
3
5
detected_licenses
listlengths
0
41
license_type
stringclasses
2 values
text
stringlengths
14
3.57M
download_success
bool
1 class
48848698a323d9cbe5cd447c2ffc9b9366bd3ab4
PHP
marcusbalbi/study
/php/solid/app/Balbi/Liskov/exemplo.php
UTF-8
1,519
3.359375
3
[ "MIT" ]
permissive
<?php interface LessonRepositoryInterface { /** * @return Array */ public function getAll(); } /** * Description of exemplo * * @author marcus */ class FileLessonRepository implements LessonRepositoryInterface { public function getAll() { return []; } //put your co...
true
021e4d29c9c8cb9d09ff8cc64210c54b6271441e
PHP
rociograff/IPOO
/SegundoParcial/MinisterioDeporte.php
UTF-8
3,282
3.3125
3
[]
no_license
<?php class MinisterioDeporte { //Atributos private $anioTorneo; private $colTorneos; //Constructor public function __construct($anioTorneo, $colTorneos) { $this->anioTorneo = $anioTorneo; $this->colTorneos = $colTorneos; } //Observadores public function getAnioTorn...
true
613e10b90ec2494aef75b516111ae454e7d47afb
PHP
zwq/unpei
/.svn/pristine/61/613e10b90ec2494aef75b516111ae454e7d47afb.svn-base
UTF-8
6,408
2.703125
3
[]
no_license
<?php /** * This is the model class for table "{{make_organ}}". * * The followings are the available columns in table '{{make_organ}}': * @property string $userID * @property string $jiapartsID * @property string $name * @property string $synopsis * @property string $province * @property string $city * @prop...
true
3597754f0cb29fecb37a68019c33f55a2309120d
PHP
PixiiBomb/essentials
/src/Models/Navigation.php
UTF-8
741
2.875
3
[]
no_license
<?php class Navigation { protected array $items = []; public function __construct(protected ?string $view) { $this->setView($view); } public function getView(): ?string { return $this->view; } public function getItems(): array { return $this->items; } public function setView(stri...
true
cbf9d435393c53196feff9528f3fd019a1a357e6
PHP
jmpurtle/portfolio
/app/Http/Controllers/NewsController.php
UTF-8
1,019
2.8125
3
[]
no_license
<?php namespace Http\Controllers { class NewsController { private $context; private $availablePieces = array( 'web-lab-mutation-observer' => array( 'view' => 'news/web-lab-mutation-observer', 'title' => 'Web Laboratory: Observing Mutations' ) ); public function __construct($context ...
true
6bf18e5b0a3e9280b2c9515ddd23afc77072426b
PHP
Oleg9791/LESSONS
/10.08.2021 Паттерн Singleton/public/index.php
UTF-8
260
2.890625
3
[]
no_license
<?php include "../vendor/autoload.php"; use App\Single; //$single = new Single(); $a = Single::getItem(); $a->name = "Lena"; $b = Single::getItem(); $b->name = "Tom"; $c = Single::getItem(); $c->name = "Roma"; echo $a->name; echo $b->name; echo $c->name;
true
4c020df260cb400468973e625548d0a2ac2914b2
PHP
ilyinstanislav/fw
/api/controllers/ProductsController.php
UTF-8
6,044
2.953125
3
[]
no_license
<?php /** * Class for work with products * Class ProductsController */ class ProductsController extends Controller { /** * generate 20 random products */ function actionGenerate() { $generated = 0; for ($i = 0; $i < 20; $i++) { $product = new Product(); ...
true
074faa9b6ef54602b8b88a7e5afd5cdfb54d607a
PHP
Topolis/FunctionLibrary
/src/XML.php
UTF-8
3,147
2.90625
3
[ "MIT" ]
permissive
<?php namespace Topolis\FunctionLibrary; use \SimpleXMLElement; class XML{ public static function searchNodeAttributes($searched, SimpleXMLElement $xml){ $result = array(); //Children foreach($xml->children() as $child){ if($child->getName() != $searched) ...
true
15b9fb95885596cd37f82b7534c226f3e04fc740
PHP
ywisax/gdufer
/modules/XunSec/Class/Kohana/Model/Element/Snippet.php
UTF-8
5,461
2.53125
3
[]
no_license
<?php defined('SYS_PATH') or die('No direct script access.'); /** * XunSec Snippet Element 模型 * * 表结构: * * CREATE TABLE `xunsec_element_snippet` ( * `id` int(10) unsigned NOT NULL AUTO_INCREMENT, * `name` varchar(150) NOT NULL, * `title` varchar(150) DEFAULT NULL, * `code` text NOT NULL, * `markdown...
true
0098e302364a481e127f3f9e23c3f8fc958c116b
PHP
orchestra-io/sample-frapi
/frapi/src/frapi/library/Lupin/Validate/ObjectCall.php
UTF-8
2,124
2.78125
3
[ "BSD-2-Clause" ]
permissive
<?php /** * */ class Lupin_Validate_ObjectCall extends Zend_Validate_Abstract { const METHOD_CALL_RETURN_FAILURE = 'methodReturnedFailure'; /** * @var array */ protected $_messageTemplates = array( self::METHOD_CALL_RETURN_FAILURE => "Trying to validate '%value%' failed", ); ...
true
6cdaeba9770fb49532bad4b8721f9a53774d20b8
PHP
yumzi41/ProjetL1
/PhpFolder/Charge/ChargeProfil.php
UTF-8
2,691
2.6875
3
[]
no_license
<?php // dans l'ensemble, les fonctions de cette classe fonctionnent comme celles documentées précedemment // namespace Charge; class ChargeProfil{ static $tabElements = array("user_id", "surname", "name", "pseudo", "biographie", "url_img_profil"); static function chargeProfilSection(&$contentUserInterfaceMiddle,...
true
d345be90eca1e482587caf9264964e768a9e1dc0
PHP
ilona-si/courseWork
/item/index.php
UTF-8
2,620
2.65625
3
[]
no_license
<?php if(isset($_COOKIE['recent'])){ $ids = $_COOKIE['recent']; $ids = explode(" ",$ids); $id = $_GET['id']; if(!in_array($id, $ids)){ $ids[]=$id; $ids = implode($ids," "); setcookie("recent", $ids,time()-6); $_COOKIE['recent']=$ids; } } ?> <!doctype html> <html> <head> <meta charset='utf-8'/> <tit...
true
f1b93241ad503056307698f77a4bb99e16792b30
PHP
waffle-iron/meetwork
/database/migrations/2018_02_10_235437_create_sites_table.php
UTF-8
1,172
2.546875
3
[]
no_license
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateSitesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('sites', function ...
true
0532455ebf9a46f6a690c91348f57112050755d8
PHP
russellthackston/webautograder
/src/index.php
UTF-8
3,504
2.890625
3
[]
no_license
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); require_once('autoloader.php'); if(!Security::checkAccess(FALSE)) { header('Location: login.php'); exit(); } $db = new DB(); $assignments = $db->getAssignments(); $html = FALSE; if ($_SERVER['REQUEST_METHOD'] == "...
true
524df287ae6390336ff98089dbe6b80a6fb55792
PHP
ndiayemtr/dci
/src/DCI/DciBundle/Controller/IndicateurController.php
UTF-8
7,046
2.640625
3
[ "BSD-3-Clause", "MIT" ]
permissive
<?php namespace DCI\DciBundle\Controller; use DCI\DciBundle\Entity\Indicateur; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; /** * Indicateur controller. * */ class IndicateurController extends Controller { /** * Lists all indicateur entities. ...
true
a8c50e987f51bbbec316108f150f23cfb26cc215
PHP
kplian/sis_mantenimientoV2
/modelo/MODAnalisisPorqueDet.php
UTF-8
3,474
2.59375
3
[]
no_license
<?php /** *@package pXP *@file MODAnalisisPorqueDet.php *@author Gonzalo Sarmiento Sejas *@date 28-11-2012 22:01:17 *@description Clase que envia los parametros requeridos a la Base de datos para la ejecucion de las funciones, y que recibe la respuesta del resultado de la ejecucion de las mismas */ class MODAna...
true
d3ed2ed801cc2bed248dabdbea96639303857b5d
PHP
kholishulil97/rest-api
/smdlh-rest-server/application/controllers/api/Invoice.php
UTF-8
2,722
2.625
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php defined('BASEPATH') or exit('No direct script access allowed'); require APPPATH . 'libraries/REST_Controller.php'; require APPPATH . 'libraries/Format.php'; class Invoice extends REST_Controller { public function index_get() { $nip = $this->get('nip'); $password = $this->get('password')...
true
77531e277f55cb84f88e1c15958401e2f96b86fe
PHP
jaytrivedi185/Feedback-Portal
/JAY/marks.php
UTF-8
2,722
2.625
3
[]
no_license
<?php session_start(); include('database.php'); $student=$_SESSION['enroll']; $sql1 ="SELECT * FROM feedback WHERE Enroll ='$student'"; $result = mysqli_query($db, $sql1); while($row=mysqli_fetch_assoc($result)){ $_SESSION['enroll']=$row['Enroll']; $_SESSION['name']=$row['name']; ...
true
0f62cc4635802b2920a7547f4acc2ebea7b16dd0
PHP
iceman5508/IEngine-Web
/IEngine2/classes/Date.php
UTF-8
3,147
3.578125
4
[]
no_license
<?php class Date { function __construct() { } function __destruct() { } /** * Get current date */ public static function getDate() { return date("Y-m-d"); } /** * Get current date */ public static function getDateM() { return date("m-d-Y"); } ...
true
4e88e9d08ec529a599ce93b1e5134038a3e0af63
PHP
D0Gmatist/DLE-StarterKit
/StarterKit/Classes/InitialClass.php
UTF-8
1,776
2.640625
3
[ "MIT" ]
permissive
<?PHP namespace StarterKit\Classes; class InitialClass extends StarterKitClass { public $step = 1; public $next_btn = FALSE; public $actions = FALSE; /** * @throws Exception */ public function checkBeforeInstall() { $this->logs[] = 'checkBeforeInstall'; if ( isset( $this->...
true
358938f08ba6f77fb4f400e62e37252cbdd2094a
PHP
mdridzuan80/espel
/application/Modules/Uploader/Uploader.php
UTF-8
856
2.734375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference", "Unlicense" ]
permissive
<?php namespace Module\Uploader; use Module\Module; class Uploader extends Module { private $upload_path; private $encrypt_name = TRUE; private $allowed_types = ['pdf', 'jpeg', 'jpg', 'png']; public function __construct() { parent::__construct(); $this->upload_path = $this->CI->co...
true
b96132c02f1f8f52b569b45a613a506a627fc3b0
PHP
sydboys/order-service
/app/src/UI/Cli/Command/CreateProophDatabaseCommand.php
UTF-8
1,692
2.53125
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace App\UI\Cli\Command; use Doctrine\DBAL\Connection; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; final class CreateProophDatabaseCommand extends Command { private co...
true
2918424634e6a0f95f05d7ecf6098bf7f649bdb7
PHP
ameeuw23/oauth2-framework
/src/Component/ClientRule/ContactsParametersRule.php
UTF-8
1,349
2.5625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); /* * The MIT License (MIT) * * Copyright (c) 2014-2018 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ namespace OAuth2Framework\Component\ClientRule; use OAuth2Framework\Component\Core\Cl...
true
9d76ac64b26e843d840da9ec853d22d29e1419b0
PHP
yukisnow0704/aquestalkpi
/all_senser.php
UTF-8
1,245
2.625
3
[]
no_license
<?php $firepin=11; $gaspin=19; $soundpin=8; $touchpin=26; $isFunction=false; $text=''; $var; wiringPiSetupGpio(); pinMode($firepin, 0); pinMode($gaspin, 0); pinMode($soundpin, 0); pinMode($touchpin, 0); while (true) { while ($isFunction == false) { $var = digitalRead($firepin); ...
true
36ed8d36efc3f6f70cabf1fc6cf1acd3c45cb56d
PHP
webdevzeit/Blink
/user/sign_in.php
UTF-8
1,994
2.515625
3
[]
no_license
<?php require '../db/db.php'; ?> <!DOCTYPE html> <html> <head> <title>Sign In</title> <link rel="stylesheet" type="text/css" href="../css/sign.css"> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <?php if($_SESSION['logged_user'] == ''){ echo ' <...
true
b9261fad6310cab01b62d9a2a31bab0db334bff3
PHP
Shiftas/design_patterns
/tests/Strategy/AscendingSortTest.php
UTF-8
441
2.703125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: aurimas * Date: 5/27/16 * Time: 11:37 AM */ namespace Shiftas\Test\Strategy; use Shiftas\Source\Strategy\AscendingSort; class AscendingSortTest extends \PHPUnit_Framework_TestCase { public function testSort() { $list = [8, 1, 5]; $sorter = new As...
true
6721a23cb59b5984e4e43645803192691dac8f39
PHP
dittto/router
/Route/Base/BaseRouteName.php
UTF-8
1,176
3.265625
3
[]
no_license
<?php namespace Route\Base; use Route\RouteLink; /** * Class BaseRouteName * A store for route names to store the url and route link together * * @package Route\Base */ abstract class BaseRouteName { /** * The url for the route name, containing variables in [] tags * @var string */ private...
true
8c8ef105c0d720ec6c4937109d35837bfddd5b05
PHP
GabrielMaxMaia/Sebook
/Sebookbranches/sebook_hostGator/#versoesAntigas/sebookV5/src/view/user/pages/eventoEditar.php
UTF-8
5,596
2.609375
3
[]
no_license
<?php use Model\EventoDAO; //Pega a conexão $sql = new \Util\Sql($conn); //Passa a conexão para o dao $eventoDAO = new EventoDAO($sql); //Pega a sessão se hover, caso contrario string vazia $IdSessaoUser = $_SESSION['userLogado']['idUsuario'] ?? ""; //Pega o idPost da url $postId = isset($_GET['id']) ? $_GET['id'] : ...
true
82222db92c5b21f599c72434a9fda6d571880176
PHP
AbbeyLashly/wuzup-broden
/inc/widgets/widget-category-slider.php
UTF-8
6,848
2.53125
3
[]
no_license
<?php /** * Category Slider Widget * * @package Broden */ class Broden_Category_Slider_Widget extends WP_Widget { public function Broden_Category_Slider_Widget() { $widget_ops = array( 'classname' => 'category-post-widget', 'description' => esc_html__( 'Slider Posts filtered by category.', 'broden' ) )...
true
49d799c5764d76205cc65bc3fe795a2c318ea0cc
PHP
mehdihassine/erpsfarphp
/facture/validerfacture.php
UTF-8
1,620
2.515625
3
[]
no_license
<?php include('../config.php'); $postdata = file_get_contents("php://input"); if (isset($postdata)) { $request = json_decode($postdata); $nfacture = $_GET['nfacture'] ; $type="vente"; $etat="valide"; // update statut recep $sql = "INSERT INTO `facture`(`idfacture`, `nfacture`, `type`, `etat`) ...
true
b41431d2ec80de09f2733aad82a01eb219c58d7f
PHP
Christopher270699/tecnoBook
/models/multa_model.php
UTF-8
1,973
2.71875
3
[]
no_license
<?php Class Multa_Model extends Models { public function __construct() { parent::__construct(); } /* BUSCADOR */ public function buscarEstuRatif($datos) { $resultado = $this->db->select("SELECT * " . "FROM multa " . "WHERE " . $datos ['campoTabla'] . "...
true
51121b8865af98c22cb13bad162800993ff20ec6
PHP
skingori/opensource
/user/prof.php
UTF-8
4,219
2.78125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: king * Date: 01/04/2017 * Time: 11:24 */ // Inialize session session_start(); // Check, if user is already login, then jump to secured page if (isset($_SESSION['logname']) && isset($_SESSION['rank'])) { switch($_SESSION['rank']) { case 1: header('l...
true
595119536a23c70957d1240d4df887c9f6813e0e
PHP
nstungxd/F2CA5
/smarty/libraries/func/vars.inc.php
UTF-8
18,626
3.0625
3
[]
no_license
<?php /** * This is vars general file, PostVar,GetVar,SessionVar etc.. * * @package vars.inc.php * @func general * @author andrew07_dev@hotmail.com */ /** * Get the posted variable with no magic quotes in the values. * @param $name Name of posted field * @returns Value of specified posted f...
true
7a00b10d92d31e09bb9074a09beb535097df9867
PHP
tienanhcntt2/DemoLogin
/backend/api/update.php
UTF-8
749
2.890625
3
[]
no_license
<?php require 'database.php'; // Get the posted data. $postdata = file_get_contents("php://input"); if(isset($postdata) && !empty($postdata)){ // Extract the data. $request = json_decode($postdata); // Validate. if (empty($request)) { return http_response_code(400); } // Sanitize. $id = mysqli_...
true
d796440e68df5304a8ee1fc692d323a807342ec3
PHP
sh7ning/any
/src/Encryption/AES.php
UTF-8
4,194
2.828125
3
[ "MIT" ]
permissive
<?php namespace Tree6bee\Any\Encryption; use Tree6bee\Any\Encryption\Contracts\Encrypt as EncryptBase; use Exception; /** * !!! 建议更新为 openssl 实现,不要用此类了... * php 官方不建议使用 mcrypt * * 复杂版本的AES加密 * 参考 laravel 实现 * * @copyright sh7ning 2016.1 * @author sh7ning * @version 0.0.1 * @example */ class AES exten...
true
2eae8a25375bbb57c9c7fb32eb7951c906267e99
PHP
mizmoz/filter
/tests/Cleaner/NameTest.php
UTF-8
1,483
2.828125
3
[ "MIT" ]
permissive
<?php /** * @package Mizmoz * @copyright Copyright 2015 Mizmoz Limited - Released under the MIT license * @see https://www.mizmoz.com/labs/filter */ namespace Mizmoz\Filter\Tests\Cleaner; use Mizmoz\Filter\Cleaner\Name; use Mizmoz\Filter\Tests\TestCase; class NameTest extends TestCase { /** * Test names...
true
09e7cea72135c0d23086fb97e399181e591bf047
PHP
annieCeline/esn-test
/src/Controller/EsnApiInterface.php
UTF-8
465
2.59375
3
[]
no_license
<?php namespace EsnTest\Controller; /** * Interface EsnApiInterface. */ interface EsnApiInterface { /** * Does a GET request to the API to get some results. * * @param string $endpoint * The endpoint of the API we will perform the request to. * Available $endpoint values: 'countries', 'section...
true
35772cb19dfdbcb743eff92b2ff526aa4984faea
PHP
hoangmanhtu/hoangmanhtu
/Backend/models/Order.php
UTF-8
2,405
2.59375
3
[]
no_license
<?php class Order extends Model { public $updated_at; public $str_search=""; public function __construct() { parent::__construct(); if(isset($_GET["fullname"]) && !empty($_GET["fullname"])) { $this->str_search .=" AND orders.fullname LIKE '%{$_GET["fullname"]...
true
7d48919d3195d816ed6740f9736a222e30b322ea
PHP
SwingCrew5/pi-Sky-Gate
/goldminer/goldMining.php
UTF-8
3,095
2.53125
3
[]
no_license
<?php /** * This class wii mining the buy.yahoo's products ID repeatly * * * @author Stanley hsu <stanley.hsu@clicq.cc> * @version 1.0 * @copyright Copyright (c) 2011, Stanley hsu * @license [url=http://opensource.org/licenses/gpl-license.php]Open Source Initiative OSI - The GPL:Licensing | Open Source Initiat...
true
b16e1b2dc7b3475683a9ee81fc9504355e94db32
PHP
Faborah-of-Sarthe/Minimit
/app/Selection.php
UTF-8
2,509
2.6875
3
[ "MIT" ]
permissive
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Selection extends Model { /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'title', 'active', ]; /** * Get the user for one selection */ public funct...
true
5ebcb1253049017584b4c351c880ee1d018bae1d
PHP
rdhana/Learning
/PHP_Basics/Chapter 2/basics_arithmetic_operations_3.php
UTF-8
363
3.859375
4
[]
no_license
<?php // Understanding the Basics: Performing Arithmetic Operations // advantage: very useful when you need to count the number of occurrences of something // increment $value = 1; $value++; // adds 1 to $value echo $value; // returns 2 echo '<br />'; // decrement $value = 1; $value--; // subtracts 1 from $value...
true
021fff1574289f298478aca79b98d9543fcc0a23
PHP
Ashot1995/dynamic-parse
/parser_configs.php
UTF-8
568
2.671875
3
[]
no_license
<?php /** * @param $url * @param string $referer * @return mixed * @author Ashot Gharakeshishyan */ function curl_get($url, $referer = 'https://www.google.com/') { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_USERA...
true
405e052a01ead976f6f1903e581311bc951720aa
PHP
mxker/EnterpriseSystems
/common/models/LogisticsChannel.php
UTF-8
1,176
2.5625
3
[]
no_license
<?php namespace common\models; use Yii; /** * This is the model class for table "my_logistics_channel". * * @property integer $lc_id * @property string $name * @property integer $country_id * @property integer $channel_overseas_id * @property integer $channel_domestic_id * @property integer $is_moyun * @pro...
true
fa36f6ac517a818db1127aa438e36da2c7660fdf
PHP
morganjander/Camagru
/includes/install.php
UTF-8
2,863
2.9375
3
[]
no_license
<html> <head> <title>Connecting MySQLi Server, Creating MySQLi Tables</title> </head> <body> <?php $dbhost = 'localhost:3306'; $dbuser = 'root'; $dbpass = 'ROOT'; $conn = mysqli_connect($dbhost, $dbuser, $dbpass); if(!$conn){ echo 'Co...
true
f790bf806bad762cbbc376007d6d536764fc84ec
PHP
macofallico/phpvms
/app/Repositories/UserRepository.php
UTF-8
2,662
2.625
3
[]
permissive
<?php namespace App\Repositories; use App\Contracts\Repository; use App\Models\Enums\UserState; use App\Models\User; use App\Models\UserField; use App\Repositories\Criteria\WhereCriteria; use Illuminate\Http\Request; use Illuminate\Support\Collection; class UserRepository extends Repository { protected $fieldSea...
true
846de91e1f880e0a87792bb23302cb20c8c3b97b
PHP
Laradejpl/sugarV10-2
/poseAnnonce.php
UTF-8
17,685
2.796875
3
[]
no_license
<?php require_once __DIR__ . '/config/bootstrap.php'; // la connection /*session_start(); try { $pdo = new PDO('mysql:host=localhost;dbname=testswap;charset=utf8', 'root', 'root'); } catch(Exception $e) { die('Erreur : '.$e->getMessage()); }*/ //les fonctions---------------------------------------------------...
true
866083d7809e4a93f976337c4a8cb18072043dfb
PHP
QuickyVickky/shopify_demo_lv1
/app/Common/helpers.php
UTF-8
3,851
2.671875
3
[ "MIT" ]
permissive
<?php //use DB; //use Storage; function dde($arr){ echo "<pre>"; print_r($arr);die; } function random_text($length_of_string = 8) { $chr = 'GHIJKLA123MNOSTUVW0XYZPQR456789BCDEF'; $randomString = ''; for ($i = 0; $i < $length_of_string; $i++) { $index = rand(0, strlen($chr) - 1); $...
true
322e0441859c9546ea1315f7ba3c84bba7ba2a76
PHP
3m1n3nc3/HooliconServer
/application/controllers/Room.php
UTF-8
3,905
2.53125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Room extends Admin_Controller { public function index() { $rooms = $this->room_model->get_rooms(); $viewdata = array('rooms' => $rooms); $data = array('title' => 'Rooms - ' . HOTEL_NAME, 'page' => 'room'); $this->...
true
d615a645de778fe9ce7061ef674fba39a3c0fb42
PHP
jurispetrovs/php-basics
/excercises/basics/05-functions/06_exc.php
UTF-8
679
4.5625
5
[]
no_license
<?php /* Create an non-associative array with 5 elements where 3 are integers, 1 float and 1 string. Create a for loop that iterates non-associative array using php in-built function that determines count of elements in the array. Create a function that doubles the integer number. Within the loop using php in-bui...
true
dd62f3531e91c11faf4d160aa70259da035f1653
PHP
TropicalRobot/finding-beyond
/public/app/plugins/easyazon-pro-4.0.17/components/localization/lib/geoip/src/GeoIp2/Exception/HttpException.php
UTF-8
271
2.75
3
[ "Apache-2.0", "MIT", "GPL-2.0-or-later" ]
permissive
<?php namespace GeoIp2\Exception; class HttpException extends GeoIp2Exception { public $uri; public function __construct( $message, $httpStatus, $uri, \Exception $previous = null ) { $this->uri = $uri; parent::__construct($message, $httpStatus, $previous); } }
true
1d493ebd01eaee092652a7f891f0307d3d32f44f
PHP
LucianoCharlesdeSouza/programando-para-interface
/App/Classes/Crud/PDO.php
UTF-8
1,285
3.125
3
[ "MIT" ]
permissive
<?php /** * PDO() * * Classe que implementa os metodos da interface Crud para lidar * com os SQL usando a lib PDO * * @author Luciano Charles de Souza * E-mail: souzacomprog@gmail.com * Github: https://github.com/LucianoCharlesdeSouza * YouTube: https://www.youtube.com/channel/UC2bpyhuQp3hWLb8rwb269ew?view_as...
true
a0b64bd1b529049ef7a59b41068a9941abe52594
PHP
neil-mc-m/phpspec-demo
/spec/PremiumSpec.php
UTF-8
1,236
2.609375
3
[]
no_license
<?php namespace spec\App; use App\Premium; use App\Standard; use PhpSpec\ObjectBehavior; use Prophecy\Argument; use App\AdvertInterface; class PremiumSpec extends ObjectBehavior { function it_is_initializable() { $this->shouldHaveType(Premium::class); } function it_should_implement_the_adver...
true
0c5d97c6429f92882e276ee7a1eac8a2e5c25f13
PHP
Diego-on-c/Code_talent_
/tests/Unit/CodeAcademyScrapingTest.php
UTF-8
1,477
2.703125
3
[ "MIT" ]
permissive
<?php namespace Tests\Unit; use App\Course; use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; use App\CodeAcademyScraping; class CodeAcademyScrapingTest extends TestCase { use RefreshDatabase; private $all_courses; private $scrappy; public function setUp(): void { p...
true
ebd6a3eb8a557b70592429b2c1a097351cbb2b12
PHP
rafabrayner/php-docker
/www/polimorfismo/index.php
UTF-8
559
3.375
3
[]
no_license
<?php require_once "autoload.php"; use Classes\Conta; use Classes\ContaCorrente; use Classes\ContaPoupanca; $contaCorrente = new ContaCorrente(200); $contaPoupanca = new ContaPoupanca(500); echo "Sacando R$ 100,00 na Conta Corente<br/>"; $contaCorrente->saca(100); echo "<br/>"; echo "<br/>Sacan...
true
82b8475f7612e75076b3fc15cfc6be1255a31a4b
PHP
ldtpht/zf2app
/application/Dp/Registry/Registry.php
UTF-8
504
2.96875
3
[]
no_license
<?php namespace Dp\Registry; class Registry { protected $container = null; public function __construct() { $this->initContainer(); } public function initContainer() { $this->container = new \ArrayObject(); } public function set($key, $value) { $this->container[$key] = $value; return $this; } ...
true
4c288767fec864d937d41fdca0f397cf17f451c3
PHP
bredybuitrago/zolid
/application/models/site_model.php
UTF-8
990
3.046875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php class site_model extends CI_Model{ protected $id; protected $name; protected $band; protected $sector; protected $technology; public function __construct(){ } public function getId(){return $this->id;} public function setId($id){$this->id = $id;} public function getName(){return $thi...
true
4d3d4da24b997a1af17e080bfaa80e9d7eb96b9d
PHP
Rajib007kamrul/hotel
/inc/class-comment-meta.php
UTF-8
3,216
2.78125
3
[]
no_license
<?php if ( ! class_exists( 'Visgo_Comment_Meta' ) ) { class Visgo_Comment_Meta { public function __construct() { add_action( 'comment_form_logged_in_after', [ $this, 'visgo_comment_rating_rating_field' ] ); add_action( 'comment_form_after_fields', [ $this, 'visgo_comment_rating_rating_field' ] ); add_ac...
true
2cc9dc76d474aad891e535d1ccff65047a4be605
PHP
mo-abbas/cmpoj
/tests/SearchResultTest.php
UTF-8
1,498
2.5625
3
[ "MIT" ]
permissive
<?php use PHPUnit\Framework\TestCase; require_once("../includes/session.php"); class SearchResultTest extends TestCase { private static $connection = null; public static function setUpBeforeClass() { if(!defined("DB_SERVER")) { define("DB_SERVER", 'localhost'); define("DB_USER", 'root'); ...
true
8c8cbb87b6ca3b114ced696adbd510cc8104390c
PHP
exchris/phplearn
/Basic/Gitfirst/falseNullZero.php
UTF-8
390
3.046875
3
[]
no_license
<?php $arr = array('php在路上',12,'',array('我是字符串')); echo in_array(array(0), $arr) ? 1 : 0; $arr = array('12',13,'php在路上'); echo array_search('12',$arr,true)===false ? '没找到' : '找到了'; $arr = array('php在路上',1); echo in_array(true,$arr) ? 1 : 0; echo in_array(0,$arr) ? 1 : 0; define('AUTHOR','haodaquan'); define('AUTHOR'...
true
a0ed91098a71ad8aeaf6a4004a2b6065669f47fb
PHP
Akshay-Hegde/FireSale
/firesale/libraries/fs_cart.php
UTF-8
1,984
2.703125
3
[ "MIT" ]
permissive
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /* * This class adds extra functionality to the stock * CodeIgniter Cart class without adding to the PyroCMS * core files. * * You can access the cart using: * $this->load->library('fs_cart'); * $this->fs_cart->function(); * * Written by:...
true
2418b527a5d85d390b0e9742baac275c33e9643c
PHP
qingsongsun/habagou
/web/bjphp/vendor/file/File.php
UTF-8
707
2.640625
3
[]
no_license
<?php // ======================================================================= // | 百捷PHP框架(BJPHP) // | --------------------------------------------------------------------- // | 许可协议Apache2 ( http://www.apache.org/licenses/LICENSE-2.0 ) // | 技术支持QQ群:276228406 // | 微信公众号 :百捷网络 // | 官方网站 :http://www.baijienet.com ...
true
839721afcc43bb8a3e2c74e5deb402a8ba844987
PHP
BGCX261/zotop-svn-to-git
/trunk/beta1/zotop/modules/database/models/database.php
UTF-8
1,296
2.671875
3
[]
no_license
<?php class database_model_database { protected $_db =''; public function __construct() { if ( ! is_object($this->_db) ) { $this->_db = zotop::db(); } } public function db() { return $this->_db; } public function tables()...
true
92d514b877f73c8cc1204978d7715234c226a800
PHP
FinforeOrg/New-Deal-Data
/classes/class.magic_quote.php
UTF-8
545
2.75
3
[]
no_license
<?php /**** sng:23/oct/2010 It is better to rely on mysql_real_escape_string() than magic quote. We will call mysql_real_escape_string when about to perform db operation to escape the single quote. But the thing is, putting mysql_real_escape_string will take time. So why not use enable magic quote in the server and use...
true
3f5ed8b2076259e5a85b9f6adf82e135d0ca5c79
PHP
angelamsantos/DORMasino
/application/controllers/api/user_api.php
UTF-8
2,120
2.546875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php defined('BASEPATH') OR exit('No direct script access allowed'); use Restserver\Libraries\REST_Controller; require APPPATH . 'libraries/REST_Controller.php'; require APPPATH . 'libraries/Format.php'; class User_api extends REST_Controller { function test_post() { ...
true
d3216ba0483cc691e17af86326614daed47260da
PHP
SophieMoons/oplossingen
/opdracht-array-basis/opdracht-array-basis.php
UTF-8
1,844
2.90625
3
[]
no_license
<?php #Deel 1 $dierenArr1 = array('Koala','Je moeder', 'Koe', 'Kariboo','Kangaroo','Kip','Koningsarend','Koi','Kra Kra','Konijn'); $dierenArr2[0] = 'Koala'; $dierenArr2[1] = 'Je moeder'; $dierenArr2[2] = 'Koe'; $dierenArr2[3] = 'Kariboo'; $dierenArr2[4] = 'Kangaroo'; $dierenArr2[5] = 'Kip'; $dierenArr2[6] = 'Koningsar...
true
bdd956997dfaedd124d5d18bd518985e386664d2
PHP
zhennong/TpWork
/Application/Common/Tools/TableBak.php
UTF-8
4,197
2.859375
3
[ "Apache-2.0" ]
permissive
<?php /** * Created by PhpStorm. * User: wodrow * Date: 3/25/16 * Time: 11:35 AM */ namespace Common\Tools; class TableBak{ var $_mysql_link_id; var $_dbDir; //private $_DbManager; function TableBak($mysql_link_id,$dbDir) { $this->_mysql_link_id = $mysql_link_id; $this->_dbDi...
true
cdb94a369f8080b30e9efc80141b6332649108c3
PHP
fred1code/syncroEcommerce
/classes/WebserviceSpecificManagementAgreInfoImg.php
UTF-8
2,402
2.515625
3
[]
no_license
<?php class WebserviceSpecificManagementAgreInfoImg implements WebserviceSpecificManagementInterface { /** @var WebserviceOutputBuilder */ protected $objOutput; protected $output; private $id; /** @var WebserviceRequest */ protected $wsObject; public function setUrlSegment($segments) ...
true
b4d5a4e9ca91a0751b2fe9137df4e8c9b31da7b0
PHP
phuocbv/quanliquanao
/app/Helpers/function.php
UTF-8
1,447
3
3
[ "MIT" ]
permissive
<?php /** * convert array object to string * * @param array $array * @param string $field * @param string $implode * @return string */ function convertArrayObjectToString($array = [], $field = 'name', $implode = ',') { $convert = []; foreach ($array as $item) { array_push($convert, $item->{$fiel...
true
6dc81233b1ba7ae3ce5c0c775a2d84580babe35b
PHP
SipleGames/CorruptedCastle
/web/php/register.php
UTF-8
568
2.53125
3
[]
no_license
<?php include("conexion.php"); $nombre = $_POST["username"]; $pass = $_POST["password"]; $sqlgrabar = "INSERT INTO jugadores(nombre_usuario,contrasena) VALUES ('$nombre','$pass')"; if (mysqli_query($conn, $sqlgrabar)) { echo "<script> alert('Usuario registrado con exito: $nombre'); window.location='../inde...
true
255befa1ab0d13af66eb479a0644579fa07f5bf8
PHP
richard4339/destinybundle
/src/Objects/GroupMemberResponse.php
UTF-8
2,156
2.828125
3
[]
no_license
<?php namespace Destiny\ClientBundle\Objects; /** * Class GroupMemberResponse * @package Destiny\ClientBundle\Objects\Responses * * @link https://bungie-net.github.io/multi/schema_SearchResultOfGroupMember.html#schema_SearchResultOfGroupMember */ class GroupMemberResponse { /** * @var GroupMember[]|nu...
true
ef3e4f2147052db88bbea7e3824548083e8040de
PHP
blidodi/HPTeam
/chiput/LatihanOOP/CRUD_OOP/updatebuku.php
UTF-8
2,222
2.5625
3
[]
no_license
<?php require "function.php"; ?> <!DOCTYPE > <html> <head> <title>Form Update Data Buku</title> <link rel="stylesheet" href="styleLogin.css"> </head> <body> <?php if(isset($_GET['id'])){ include "koneksi.php"; if(isset($_POST['ubah']) && $_POST['ubah'] == 'Update'){ $sql_buku = "UPDATE `buku` ...
true
b356ecffa5a0d3864e8c1c415b2f528e15270298
PHP
phacility/phabricator
/src/applications/calendar/parser/ics/PhutilICSWriter.php
UTF-8
9,636
2.90625
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php final class PhutilICSWriter extends Phobject { public function writeICSDocument(PhutilCalendarRootNode $node) { $out = array(); foreach ($node->getChildren() as $child) { $out[] = $this->writeNode($child); } return implode('', $out); } private function writeNode(PhutilCalendarNode...
true
90fe113ffef84c4a4d67478f6699a5001ec6bc1f
PHP
gsmanhas/jmc
/application/frontend/core/MY_Controller.php
UTF-8
3,992
2.53125
3
[]
no_license
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * */ class MY_Controller extends CI_Controller { // Dynamic Menu public $dynamicMenus = ''; function __construct() { parent::__construct(); // if ($this->session->userdata('ip_address') == "0.0.0.0") { // $this->output->enabl...
true
e340b8432d35e4d657ac7b489dd624124e20a36b
PHP
Faulo/slothsoft-farah
/src/PThreads/AbstractWorkThread.php
UTF-8
1,320
2.890625
3
[ "MIT" ]
permissive
<?php declare(strict_types = 1); namespace Slothsoft\Farah\PThreads; use Threaded; use Throwable; abstract class AbstractWorkThread extends Threaded { abstract protected function work(): void; private $options; public function __construct(array $options) { $this->options = $options; } ...
true
18c81394397aca622f64f1c8d56a767388115784
PHP
leff-mdn-learning/refactorQueue
/src/cli/iQueue.php
UTF-8
220
2.71875
3
[]
no_license
<?php namespace AYakovlev\cli; interface iQueue { public static function getConnection(); public function sendMessageToQueue(string $data, string $template): void; public function getMessageFromQueue(); }
true
df85d9d6a6878cda09ff17ad29b6fa72547bf230
PHP
vaulthq/vault
/api/app/Console/Commands/MigrateOld.php
UTF-8
2,205
2.65625
3
[ "Apache-2.0" ]
permissive
<?php namespace App\Console\Commands; use App\Vault\Encryption\AccessDecider; use App\Vault\Encryption\EntryCrypt; use App\Vault\Models\Entry; use App\Vault\Models\User; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Facades\Crypt; class MigrateOld extends Command { /...
true
af40623b4bb87cacbff5184dcbae02d2b1352839
PHP
elias-g-m/mobly-sellercenter-sdk
/tests/Product/ProductImageCollectionTest.php
UTF-8
3,734
2.640625
3
[]
no_license
<?php namespace SellerCenter\Test\SDK\Product; use SellerCenter\SDK\Product\ImageUri; use SellerCenter\SDK\Product\ProductImageCollection; use SellerCenter\SDK\Product\ProductImage; use SellerCenter\Test\SDK\SdkTestCase; /** * ImageCollection Test * * @package SellerCenter\SDK\Product * @author Daniel Costa */ c...
true
e4ceaf5e7377e2f287b8d2e267d16b78d18eea97
PHP
comely-io/app-kernel
/src/Exception/AppControllerException.php
UTF-8
934
2.515625
3
[ "MIT" ]
permissive
<?php /** * This file is a part of "comely-io/app-kernel" package. * https://github.com/comely-io/app-kernel * * Copyright (c) Furqan A. Siddiqui <hello@furqansiddiqui.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code or visit follo...
true
22669a63215256ade05cf000a235a9921a1d1e48
PHP
hexis-hr/myunhcr
/module/Administration/src/Administration/Entity/User.php
UTF-8
2,384
2.546875
3
[]
no_license
<?php namespace Administration\Entity; use Zend\Form\Annotation; use Doctrine\ORM\Mapping as ORM; /** * @Annotation\Hydrator("Zend\Stdlib\Hydrator\ObjectProperty") * @Annotation\Name("User") * * @ORM\Table(name="user") * @ORM\Entity */ class User { /** * @ORM\Column(name="id", type="bigint", nulla...
true
b82e28242b8d44f7e827e4a3ce0894be9fa38cdf
PHP
itlboy/chanhphatphaptheme
/core/audio_widget.php
UTF-8
1,008
2.515625
3
[]
no_license
<?php /* Plugin Name: Audio Widget Description: gallery audio Author: Dũng Lùn Version: 1.0 Author URI: http://google.com */ add_action( 'widgets_init', 'create_audio_widget' ); function create_audio_widget() { register_widget('Audio_Widget'); } class Audio_Widget extends WP_Widget { /** * Thiế...
true
c2038b01b8ef3b09cfc3dd66907c74d22e62ac49
PHP
OmkarMane01/CODEBOOK
/csharpch8.php
UTF-8
8,022
2.640625
3
[]
no_license
<?php session_start(); include_once 'connection.php'; if( !isset($_SESSION['user']) ) { header("Location: index.php"); exit; } // select loggedin users detail $res=mysqli_query($_conn,"SELECT * FROM users WHERE userId=".$_SESSION['user']); $userRow=mysqli_fetch_array($res); if (isset($_POST['go'])) { if($_PO...
true
fc66aaca61c34271162075f539e1aaf78d7ae661
PHP
linkuha/php-helpers
/src/ErrorHelper.php
UTF-8
1,808
2.5625
3
[ "MIT" ]
permissive
<?php /** * Created by PhpStorm. * User: linkuha (Pudich Aleksandr) * Date: 03.02.2019 * Time: 4:55 */ namespace SimpleLibs; class ErrorHelper { const DEFAULT_LOG = "/tmp/manual_handled_errors.log"; public static $logPath = self::DEFAULT_LOG; public static function changeLogPath($path = self::DEFAU...
true
705b8cd2fb46f231a346fa6eb1b7ac6c673a8344
PHP
NgVanDuy/tour_du_lich
/app/Http/Requests/ConfirmBookTour.php
UTF-8
730
2.515625
3
[ "MIT" ]
permissive
<?php namespace App\Http\Requests; use App\Http\Requests\Request; class ConfirmBookTour extends Request { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * ...
true
a70b90314f8aece560a72678cdf5d0399abf635f
PHP
devqx/med
/classes/DAOs/DiagnosisDAO.php
UTF-8
2,627
2.953125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: robot * Date: 6/3/14 * Time: 11:33 AM */ class DiagnosisDAO { private $conn = null; function __construct() { if (!isset($_SESSION)) { @session_start(); } try { require_once $_SERVER ['DOCUMENT_ROOT'] . '/Connections/MyDBConnector.php'; require_once $_SE...
true
7e1fd831ca6b08c8839e4705e71bd0f58f3d3be3
PHP
mykamykamykamyka/meny-wise
/src/AppBundle/Entity/homelinks.php
UTF-8
3,561
2.9375
3
[]
no_license
<?php namespace AppBundle\Entity; /** * homelinks */ class homelinks { /** * @var int */ private $id; /** * @var string */ private $type; /** * @var string */ private $title; /** * @var string */ private $icon; /** * @var string ...
true
e3f4e669ec07c8d3d4258dc1670f1777c391776b
PHP
cemim/php7
/05_tratamento_erros/02_tratando_erros/exemplo02.php
UTF-8
277
2.96875
3
[]
no_license
<?php error_reporting(E_ALL & ~E_NOTICE); // Sobreescreve o arquivo php.ini para exibir as mensagens de erro e não exibir os notice $nome = $_GET["nome"]; // Daria um Notice porque não existe o parametro GET, caso não existisse a função error_reporting echo $nome; ?>
true
28df51d59cabb6903ca619e876cb6c6cc36d7ef6
PHP
acdh-oeaw/php-epic-handle
/src/acdhOeaw/epicHandle/HandleService.php
UTF-8
4,125
2.671875
3
[ "MIT" ]
permissive
<?php /* * The MIT License * * Copyright 2017 Austrian Centre for Digital Humanities. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitati...
true
f14c9a0bc2dcf9e1f0b23e15a4f11ceb68239e56
PHP
itedev/FormBundle
/Validation/Mapping/PropertyMetadataInterface.php
UTF-8
1,218
2.765625
3
[]
no_license
<?php namespace ITE\FormBundle\Validation\Mapping; /** * Stores all metadata needed for validating the value of a class property. * * Most importantly, the metadata stores the constraints against which the * property's value should be validated. * * Additionally, the metadata stores whether objects stored in th...
true
ffd486b6b9961023adfa8f0ab67c47c969f56a78
PHP
amarkhai/airbnb-api-php-sdk
/src/Entities/Parameters/CancelActiveReservationParameters.php
UTF-8
3,765
2.921875
3
[]
no_license
<?php namespace Amarkhai\AirbnbSdk\Entities\Parameters; /** * Parameters for the method "Cancel an active reservation" of the Reservation API */ class CancelActiveReservationParameters { public const STATUS_TYPE_CANCELLED_BY_HOST = 'cancelled_by_host'; /** * Cancel the reservation, as a host. * @...
true
64cab5b7ceaae21cb0082d1657d65fd5548ea9f1
PHP
dingwenxiu/xxyz
/app/Lib/Game/Method/Ssc/EX/QZU2HZ.php
UTF-8
3,154
3.015625
3
[]
no_license
<?php namespace App\Lib\Game\Method\Ssc\EX; use App\Lib\Game\Method\Ssc\Base; // 组选和值 class QZU2HZ extends Base { // 1&2&3&4&5&6 public $allCount = 45; public static $filterArr = array( 1 => 1, 2 => 1, 3 => 2, 4 => 2, 5 => 3, 6 => 3, 7 => 4, ...
true
bb36d8287eb981a3256eecfaf72fbc5f134b97db
PHP
islanga/framework
/model/Student.php
UTF-8
869
2.515625
3
[]
no_license
<?php require_once CORE_INCLUDE_PATH . DS. "classes" . DS ."Database_Table.php"; class Student extends Database_Table { public $sno; public $sname; public $init; public $fname; public $title; public $msname; public $dob; public $sex; public $lang; public $idno; public $telh; public $telw; pub...
true
cc90677a2376129551656344bb5c3b3e90a39862
PHP
B4N3/SkyBlue-CMS
/skyblue/includes/Command.php
UTF-8
3,702
2.65625
3
[]
no_license
<?php defined('SKYBLUE') or die('Bad file request'); /** * @version v 1.2 2009-04-19 10:37:00 $ * @package SkyBlueCanvas * @copyright Copyright (C) 2005 - 2010 Scott Edwin Lewis. All rights reserved. * @license GNU/GPL, see COPYING.txt * SkyBlueCanvas is free software. This version may have bee...
true
53943a5c6b177e64b18de844b75f4fcb2ca962b2
PHP
3WDJ-Team1/HIKONNECT_WEB
/app/vendor/squizlabs/php_codesniffer/src/Sniffs/AbstractArraySniff.php
UTF-8
9,115
2.875
3
[ "MIT" ]
permissive
<?php /** * Processes single and mutli-line arrays. * * @author Greg Sherwood <gsherwood@squiz.net> * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence */ namespace PHP_CodeSniffer\Sniffs; use PHP_CodeSniffer\...
true
9aa3985f946f53b3c1fc02b8db22a22fffa4b081
PHP
fnandogp/scap-api
/app/Transformers/MandateTransformer.php
UTF-8
496
2.546875
3
[]
no_license
<?php namespace App\Transformers; use App\Mandate; use League\Fractal\TransformerAbstract; class MandateTransformer extends TransformerAbstract { /** * A Fractal transformer. * * @param Mandate $mandate * * @return array */ public function transform(Mandate $mandate) { ...
true
f7e1c409baaf4a44788db3b1806e2cc5230ab496
PHP
Stefano-Para/laravel-model-controller
/app/Http/Controllers/MovieController.php
UTF-8
642
2.578125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Movie; class MovieController extends Controller { // per leggere public function index() { // ciò che fa riprendere tutto da MOVIES $moviesArray = Movie::all(); // dd("$moviesArray"); return v...
true
05116043fd91f42eea46fa18e0ded1f7d2458387
PHP
gatesbin/blog
/vendor/techonline/utils/src/UrlUtil.php
UTF-8
1,697
2.953125
3
[ "MIT" ]
permissive
<?php namespace TechOnline\Utils; class UrlUtil { public static function buildStaticQuery($map = ['key' => 'k']) { return new UrlStaticQuery($map); } } class UrlStaticQuery { public $map = []; public $glue = '-'; private $query = []; public function __construct($map = []) {...
true
28246be7e9b706c11b5e87dace7631ccfaba0840
PHP
IJMacD/solar-monitor
/TaskScheduler.php
UTF-8
3,654
2.90625
3
[]
no_license
<?php class TaskScheduler { private $cron_file; private $jobs; function __construct ($conf = []) { $this->cron_file = realpath(isset($conf['cron_file']) ? $conf['cron_file'] : "cron_file"); $this->loadJobs(); } function __destruct () { $this->runDueJobs(); ...
true
3060540aa39b8b1ac70ce091693963c7225278ad
PHP
yowane1795/theteacher
/app/Models/User.php
UTF-8
368
2.6875
3
[]
no_license
<?php namespace App\Models; class User extends Model{ protected $table = 'user'; public function getUser($username) { return $this->query("SELECT * FROM user WHERE username = ?", [$username], true); } public function getUserMail($mail) { return $this->query("SELECT * FRO...
true
18e2974c58369d353264f75d3120e8f53e37c9d1
PHP
tmaly1980/HopefulPress
/app/Plugin/Core/Model/Behavior/StickyBehavior.php
UTF-8
802
2.796875
3
[]
no_license
<? # Implements 'pinning' some records so they show first in a list. class StickyBehavior extends ModelBehavior { function stick($model, $id = null) { if(!empty($id)) { $model->id = $id; } $model->saveField("sticky", true); } function unstick($model, $id = null) { if(!empty($id)) { $model->id = $id; } $m...
true
845ad1bd55daaf221acaa492ca657f89935d44e5
PHP
lheokk/health
/core/func/sendmail.php
UTF-8
4,109
2.625
3
[]
no_license
<?php require_once BASEPATH . "lib/PHPMailer_v5.1/class.phpmailer.php"; define('SENDMAIL_PRIORITY_LOW', 1); define('SENDMAIL_PRIORITY_NORMAL', 3); define('SENDMAIL_PRIORITY_HIGH', 5); function _SendMail($to, $subject, $message, $additionalHeaders, $files, $priority, $config) { ...
true