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
3facd5d798f14d6536b49bba0b75740330981537
PHP
melihovv/collection-grouped-by-model
/src/CollectionGroupedByModel.php
UTF-8
3,949
2.890625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Melihovv\CollectionGroupedByModel; use ArrayAccess; use ArrayIterator; use BadMethodCallException; use Countable; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Support\Collection; use IteratorAggregate; /** * @mixin Collection */ class CollectionGroupedByModel...
true
bc3b116fd3747307c35fdb98dd365523f943dc0b
PHP
ignat980/LearningPHP
/private/functions.php
UTF-8
913
2.90625
3
[]
no_license
<?php function url_for($script_path) { if ($script_path[0] != '/') { $script_path = "/{$script_path}"; } return WWW_ROOT.$script_path; } function error_404() { header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found'); exit(); } function error_500() { header($_SERVER['SERVER_PROTOCO...
true
853386f30a38709f1c9e28e2fb2aec0f90d14ada
PHP
James-Yoel/Pemrograman-Web-2020
/Week09/application/models/Insert_model.php
UTF-8
443
2.546875
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php class Insert_model extends CI_Model{ public function insert($values){ $this->db->insert('product', $values); } function get_category(){ $queryCategory = $this->db->query("SELECT * FROM category"); return $queryCategory->result_array(); } function get_supplier(){ ...
true
7e1a651cb7826f469f7aca6a6ec4957059c54a00
PHP
bummzack/silvershop-core
/src/ORM/FieldType/ShopCurrency.php
UTF-8
1,906
3.078125
3
[ "BSD-2-Clause" ]
permissive
<?php namespace SilverShop\ORM\FieldType; use SilverStripe\ORM\FieldType\DBCurrency; /** * Improvements to Currency for presenting in templates. * * @package shop */ class ShopCurrency extends DBCurrency { /** * The shop currency decimal delimiter * * @config * @var string */ ...
true
cd3fb8031a5bb1801f920591150263340805bf28
PHP
gilloud/webdrac
/api/lib/webdraclib_upgrade.php
UTF-8
4,531
2.75
3
[]
no_license
<?php namespace WebdracLib_upgrade; class WebdracLib_upgrade extends Database { public function __construct($server,$user,$pass,$database) { parent::__construct($server,$user,$pass,$database); } function table($json_o) { $v_sql = ''; $v_foreign = ''; foreach($json_o->...
true
af623453e965b8bb3bf95b90ba4ca478634e0c73
PHP
lynv110/staff-laravel
/app/Libraries/EmailHandle.php
UTF-8
762
2.625
3
[ "MIT" ]
permissive
<?php namespace App\Libraries; use Illuminate\Support\Facades\Mail; class EmailHandle { public function send($init = [], $info = [], $view) { $data = [ 'to' => isset($init['to']) ? $init['to'] : '', 'from' => isset($init['from']) ? $init['from'] : '', 'name_to' => isse...
true
0ca0dd98fb909692365255b1b90e753b8411fbbe
PHP
smirik/resonances-web
/src/Entity/SyntheticProperElement.php
UTF-8
3,688
2.53125
3
[]
no_license
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; /** * SyntheticProperElements * * @ORM\Table(name="synthetic_proper_elements", indexes={@ORM\Index(name="semi_axis", columns={"semi_axis"}), @ORM\Index(name="LCE", columns={"LCE"})}) * @ORM\Entity */ class SyntheticProperElement { /** * @var ...
true
aa0b797831827d57c495b8f678333840f377c1e0
PHP
FDC-Nydus/FDCNydus
/inc/plugins/FDCWebhook.php
UTF-8
4,783
2.90625
3
[]
no_license
<?php require_once(dirname(DIR)."/inc/inc.php"); class FDCWebhook{ // payload container private $payload = NULL; public static $slack = ""; public $jsonData = ""; public $jsonFile = ""; public $attempts = 1; // construct function __construct($payload = NULL){ $this->payload = $payload; $th...
true
f3533d6653b05e5c7eb5e9f23d2eaefed6363b13
PHP
mabruchet/TheliaCollection
/Loop/TheliaCollection.php
UTF-8
3,344
2.59375
3
[]
no_license
<?php namespace TheliaCollection\Loop; use Propel\Runtime\ActiveQuery\Criteria; use Thelia\Core\Template\Element\BaseI18nLoop; use Thelia\Core\Template\Element\LoopResult; use Thelia\Core\Template\Element\LoopResultRow; use Thelia\Core\Template\Element\PropelSearchLoopInterface; use Thelia\Core\Template\Loop\Argument...
true
ee73573a4c3cbfae876bacb32083bc7b831ed10e
PHP
TobyDS/SportsDB
/randomSelection.php
UTF-8
3,231
2.796875
3
[]
no_license
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); // Creates connection to database include_once('connection.php'); $username = array(); $sex = array(); $year = array(); $Term1 = array(); $Term2 = array(); $Term3 = array(); $stmt = $conn->prepare("SELECT st.Username, s...
true
269775bceb0a20e0c869144490f9c19dca9a6da6
PHP
CE-KMITL-OOAD-2014/online_shopping_system
/app/controllers/chatController.php
UTF-8
1,571
2.71875
3
[]
no_license
<?php class ChatController extends \BaseController { /** * Display a listing of the resource. * GET /chat * * @return Response */ public function index() { //check Is admin online return View::make('chatPage',array( 'user' => core\User::newFromEloquent(Auth::user()), 'user_all' => ...
true
03287ccf3c25601c804f4e8f03a391aecc5274bc
PHP
lammmnnn/CS401_Project_GenshinImpactDB_Heroku
/php/material_info.php
UTF-8
1,683
2.734375
3
[]
no_license
<?php session_start(); ?> <!DOCTYPE php> <?php require_once 'Dao.php'; $dao = new Dao(); $materials = $dao->getMaterials(""); foreach ($materials as $material) { if ($_SESSION['currentMaterial'] == htmlspecialchars($material['name'])) { echo "<div class='panel' style='margin-bottom: 20px;'> ...
true
ce7da9238b109ee6b96c9128b374fa204380756f
PHP
tongzebin/php
/wenjianfuzhi/bb/php18/1/1-5.php
UTF-8
944
3.203125
3
[]
no_license
<?php //制作一个统计文件夹大小的函数 //目录是没有大小的,目录的大小就是所有的文件大小累加到一起,就是文件夹的大小 //定义一个路径(球大小的路径) $p="./aa"; function dirSize($dir){ if(!is_dir($dir)){ return "输入一个正确的目录路径"; } $num=0; $dd=opendir($dir); while(false!==$f=readdir($dd)){ if($f=='.'||$f=='..'){ continue; } /* 为什么要处理路径 就是因为查看文件类型或者是大小的时...
true
1c9720a5a7c40db9063e2741665d7b7e4b4d61be
PHP
oulhafiane/1337-42-PHP-Rush00
/index.php
UTF-8
4,097
2.65625
3
[]
no_license
<?php include("config.php"); include("functions.php"); $link = mysqli_connect($host, $user, $pass, $db); $login = "guest"; if (!$link) die('Connexion impossible: '.mysqli_connect_error()); if (isset($_SESSION['token']) && $_SESSION['token'] != null && $_SESSION['token'] != false && $_SESSION['token'] != '') $login = ...
true
1c2c1f0df780024b21b89b0afca50a54b0d2a72c
PHP
kspitfire/hexlet-practice
/php/[PHP] Массивы/practice/16. Сортировка массивов/Arrays.php
UTF-8
858
3.484375
3
[]
no_license
<?php namespace App\Arrays; /* Реализуйте функцию `bubbleSort`, которая сортирует массив используя пузырьковую сортировку. Постарайтесь не подглядывать в текст теории и попробуйте воспроизвести алгоритм по памяти. */ // BEGIN (write your solution here) function bubbleSort(array $items): array { $size = count($i...
true
8e37b090bab377755610865d8644ac74ef9989ad
PHP
FinchPowers/ATiM
/app/Plugin/Tools/Model/Template.php
UTF-8
5,492
2.578125
3
[]
no_license
<?php class Template extends AppModel { var $useTable = 'templates'; var $tree = null; static $sharing = array( 'user' => 0, 'bank' => 1, 'all' => 2 ); function init(){ $template_node_model = AppModel::getInstance("Tools", "TemplateNode", true); $tree = $template_node_model->find('all', array('cond...
true
81978703fc6fd0b1a454072be986c018375aa4b9
PHP
rachid1510/inventory
/controller/vehicleController.php
UTF-8
4,658
2.5625
3
[]
no_license
<?php session_start(); require ("model/Model.php"); include ("config/config.php"); class vehicleController { // public function actionIndex($page=null) { /* * check session */ if (!isset($_SESSION["login"])) { header("Location:login.php?error=e"); } ...
true
59948aa28368572544e0b5f54e564334d2f7c4d7
PHP
fracz/refactor-extractor
/results/splitbrain--dokuwiki/bc54ab520f404e26a95af051e9082aa8fad07d98/before/indexer.php
UTF-8
5,362
2.734375
3
[]
no_license
<?php /** * Common DokuWiki functions * * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) * @author Andreas Gohr <andi@splitbrain.org> */ if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/'); require_once(DOKU_CONF.'dokuwiki.php'); require_once(DOKU_INC.'inc/io.php...
true
e6e7457e86c612193398b8b20f8f11b68630f1e9
PHP
alex-laravel/myautopart
/app/Http/Controllers/Api/TecDoc/Manufacturer/ApiManufacturerController.php
UTF-8
1,036
2.515625
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Api\TecDoc\Manufacturer; use App\Http\Controllers\Api\ApiBaseController; use App\Http\Responses\Api\V1\Response; use Illuminate\Database\Eloquent\Collection; use Illuminate\Http\JsonResponse; class ApiManufacturerController extends ApiBaseController { /** * @return Jso...
true
e4d6b02a2e03963e477b27545d4bdfbe56604173
PHP
robertogallea/laravel-codicefiscale
/src/Checks/CheckForEmptyCode.php
UTF-8
559
2.8125
3
[ "MIT" ]
permissive
<?php namespace robertogallea\LaravelCodiceFiscale\Checks; use robertogallea\LaravelCodiceFiscale\Exceptions\CodiceFiscaleValidationException; class CheckForEmptyCode implements Check { /** * @throws CodiceFiscaleValidationException */ public function check($code): bool { if (($code ===...
true
377d44c2ef06f54aed31ccdf9a3f30d7eae130af
PHP
JokerFanliang/vovpay
/app/Repositories/UserRateRepository.php
UTF-8
1,594
2.734375
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Admin * Date: 2018/11/1 * Time: 17:08 */ namespace App\Repositories; use App\Models\User_rates; class UserRateRepository { protected $user_rates; /** * UsersRepository constructor. * @param User_rates $user_rates */ public function __construct...
true
79fe2e4b50d5cd7ee533529f3a423b491e29146b
PHP
Zafuzi/Mysidia-Deluxe
/public_html/classes/class_alchemy.php
UTF-8
3,672
2.625
3
[]
no_license
<?php use Resource\Native\String; use Resource\Collection\ArrayList; class Alchemy extends Model{ // The item class. protected $alid; protected $item; protected $item2; protected $item3; protected $item4; protected $item5; protected $newItem; protected $chance; protected $recip...
true
58b0820ff66a193fce32205eebe44ed1510d6c83
PHP
hiqdev/hipanel-core
/src/logic/Impersonator.php
UTF-8
4,742
2.671875
3
[ "BSD-3-Clause" ]
permissive
<?php /** * HiPanel core package * * @link https://hipanel.com/ * @package hipanel-core * @license BSD-3-Clause * @copyright Copyright (c) 2014-2019, HiQDev (http://hiqdev.com/) */ namespace hipanel\logic; use hipanel\models\User; use yii\authclient\BaseOAuth; use yii\authclient\Collection; use yii\au...
true
65c89bb03373a70547df6d9f6a7d2f30615e365c
PHP
fuchen2020/filter_service
/app/library/Foundation/Redis.php
UTF-8
419
2.6875
3
[]
no_license
<?php /** * @var redis 实列 * 功能 */ namespace app\Foundation; class Redis { private static $config; public static function configure($config) { static::$config = $config; return true; } public static function getRedisInstance() { $redis = new Redis(); $re...
true
f2a05de429b24af6c8c63bd4482e8842be9d6ca7
PHP
pogudin-sergey/b24-bizproc
/src/b24hook.php
UTF-8
4,378
2.6875
3
[ "MIT" ]
permissive
<?php namespace Pogudin\b24Bizproc; use Monolog\Handler\StreamHandler; use Monolog\Logger; /** * Класс для создания обработчиков событий (исходящих веб-хуков) Б24 * Не сохраняет авторизацию (упрощенный вызов входящих веб-хуков). */ abstract class B24Hook { protected $log; protected $arRequest; protect...
true
0b98cd9838960f53a77e3cd515aee63e7dce52a9
PHP
olssonelina/Programmeringsprinsessorna
/Webb-Server/PHP files/validera.php
UTF-8
1,683
3.125
3
[]
no_license
<?php /** * Validation of login * * Validates login by comparing send parameters to existing accounts in database * * @param author kevin.solovjov@gmail.com */ ?> <?php require "encrypt.php"; require "connectDB.php"; $response = 0; $password = $_POST['password']; //Encrypts the password before comparing t...
true
9102fca737e7c42d10b279f0ea9f2a6eebb6c99d
PHP
subdesign/codeigniter-daptags
/views/tags_articles_by_tags.php
UTF-8
300
2.53125
3
[ "MIT" ]
permissive
<html> <head> <title>Daptags article example</title> </head> <body> <?php foreach($articles as $article) { echo $article->title.'<br/><br/>'; echo $article->content.'<br/><br/>'; echo anchor('article/'.$article->id, 'Read more..'); echo '<hr/>'; } ?> </body> </html>
true
5e3fa91c3ba54c8f03263a7d5a0606939c0c4f97
PHP
Andrespacheco12/daw2.2-Andres.Pacheco
/AgendaDAO/CategoriaFicha2.php
UTF-8
1,442
3.046875
3
[]
no_license
<?php require_once "dao.php"; // Se recoge el parámetro "id" de la request. $id = (int)$_REQUEST["id"]; // Si id es -1 quieren CREAR una nueva entrada ($nueva_entrada tomará true). // Sin embargo, si id NO es -1 quieren VER la ficha de una categoría existente // (y $nueva_entrada tomará false). $nue...
true
b0c1d7ba46651a6597827f0b030a125287c61801
PHP
jansanchez/zf2
/vendor/zendframework/zendframework/library/Zend/View/Helper/TplLoader.php
UTF-8
994
2.625
3
[ "BSD-3-Clause" ]
permissive
<?php /** * Jan Sanchez (http://github.com/jansanchez) * * @author @jansanchez * @copyright Copyright (c) 2013 Jan Sanchez * @license New BSD License */ namespace Zend\View\Helper; /** * Helper for load current HTML template */ class TplLoader extends AbstractHtmlElement { /** * Generates a 'Lis...
true
79c5970ba2d6b0c8024d1317674dd77077bb280b
PHP
yooper/nicknames
/tests/NicknamesTest.php
UTF-8
515
2.59375
3
[ "Apache-2.0" ]
permissive
<?php use PHPUnit\Framework\TestCase; use Yooper\Nicknames; /** * * @author dcardin */ class NicknamesTest extends TestCase { public function testNames() { $nicknames = new Nicknames(); $r = $nicknames->query('joe'); $this->assertCount(2, $r); $this->assertEquals(['joseph','...
true
794d864d651c3084848e750640ae0a5878528c29
PHP
neimus/miniwiki
/helpers/CacheHelper.php
UTF-8
1,801
2.625
3
[ "BSD-3-Clause" ]
permissive
<?php /** * Created by PhpStorm. * User: Saburov Denis * Date: 12.02.18 */ namespace app\helpers; use yii\widgets\FragmentCache; class CacheHelper { /** * Тип кеша, для генерации id кеша */ const TYPE_ROUTE = 'route'; /** * @param string $type * @param null|string $context *...
true
231591607ec2d2a799c7f4f45c1592ca051cdd4b
PHP
jonbp/rush
/index.php
UTF-8
1,269
2.78125
3
[ "MIT" ]
permissive
<?php // Composer require './vendor/autoload.php'; // env file $dotenv = Dotenv\Dotenv::create(__DIR__); $dotenv->load(); // Functions + Header Output require './inc/functions.php'; require './inc/header.php'; // env defaults set envDefaultSet('DATE_FORMAT', 'd/m/Y H:i'); envDefaultSet('RESULTS_COUNT','30'); envDef...
true
fc513277b8431cbf915e289d593c34b402117ada
PHP
zawzawzaw/instathreds
/app/models/Category.php
UTF-8
323
2.703125
3
[]
no_license
<?php class Category extends Eloquent { /** * The database table used by the model. * * @var string */ protected $table = 'categories'; protected $fillable = array("name"); public static $rules = array('name'=>'required|min:3'); public function products() { return $this->hasMany('Product'); } } ...
true
0ea8e9214e6cb54c717904c9eb205aed26413f45
PHP
kdbz/tutorial
/lesson1.php
UTF-8
2,038
3.84375
4
[]
no_license
<?php //variables - placeholder/store //different kinds $cash_str = "200"; $cash2 = 200; /*sdsd sds sdsd */ //echo gettype($cash_str); #echo gettype($cash2); #echo '<br/>'; $sum = $cash_str + $cash2; $name2 = 'dd'; #print $¬name2; //simple types (data) - int,string,boolean,double/float, //echo ,print //compound types...
true
618b0f0cb482ffd08852243a8f6fb81047d1e77e
PHP
Hemant-Jain-Author/Data-Structures-and-Algorithms-using-PHP
/Searching/Searching.php
UTF-8
20,767
3.4375
3
[]
no_license
<?php require_once ("Set.php"); Function linearSearchUnsorted($arr, $value) { $i = 0; $size = count ( $arr ); for($i = 0; ($i < $size); $i ++) { if ($value == $arr [$i]) { return TRUE; } } return FALSE; } Function main() { $first = Array ( 2, 4, 6, 8, 10, 12, 14, ...
true
5228af3df369f4eac4312090e0b100f9d78abdf6
PHP
rpecb/Aleph
/lib/utils/cli.php
UTF-8
2,360
2.890625
3
[]
no_license
<?php /** * Copyright (c) 2012 Aleph Tav * * 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 limitation * the rights to use, copy, modify, merge, pub...
true
39add9746785915359eef9096fa3733d5224901f
PHP
saurid/UpMvc2
/vendor/saurid/UpMvc/ErrorHandler.php
UTF-8
1,378
2.859375
3
[]
no_license
<?php /** * /UpMvc/ErrorHandler.php * * @package UpMvc2 */ namespace UpMvc; /** * Felhantering. * * Felhantering av PHP-funktioner som normalt inte har exceptions. Konverterar * vanliga felmeddelanden till exceptions där det är möjligt. * * Startas i index.php med: * <code>$errornhandler = new ErrorHandler...
true
3986cc033e147be96f2d598e820bfca01ad63580
PHP
tfermm/plymouth-webapp
/lib/PSU/TeacherCert.php
UTF-8
2,380
3.046875
3
[ "MIT" ]
permissive
<?php namespace PSU; class TeacherCert { /** * generates error messages for incomplete required fields in the given model. This method should be * called after "$model->complete()" has been executed. * * @param $model \b Model that holds form elements * @return array */ protected static function collect...
true
4aa641e680851fdef3b3d7f1db1c489a81016cca
PHP
fardus/traits-symfony
/src/Accessors/NameAccessorsTrait.php
UTF-8
455
2.703125
3
[ "MIT" ]
permissive
<?php namespace Fardus\Traits\Symfony\Accessors; /** * trait NameAccessorsTrait * @package Fardus\Traits\Symfony\Accessors */ trait NameAccessorsTrait { /** * @param string $name * @return static */ public function setName(?string $name): self { $this->name = $name; retur...
true
7f209daa5cb3f15ac73ca7226e3bae66583c1108
PHP
mdrafee03/datatables
/app/Http/Controllers/CustomerController.php
UTF-8
3,013
2.515625
3
[]
no_license
<?php namespace App\Http\Controllers; use App\Customer; use Illuminate\Http\Request; use Illuminate\Support\Facades\Session; use Yajra\Datatables\Datatables; class CustomerController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ pub...
true
1d8ff98e09d83d06962bcb361281dd75e9977013
PHP
juancarlosmarco/tiendaphp
/paginas/registro.php
UTF-8
4,016
2.640625
3
[]
no_license
<?php //FUNCIONALIDAD 3 //Si pulso el boton entrar, compruebo el correo y la clave if(isset($_POST['Registrarse'])){ $todoOK=true; $msgError=''; //recojo correo y clave $nombre=$_POST['nombre']; if(strlen($nombre)<3){ $todoOK=false; $msgError.='El nombre tiene que tener al menos 2 caracteres <br>'; } $...
true
d627cb93d690aa9042f825db444606a2a9e78686
PHP
matthewdimatteo/ctrex
/php/value-lists.php
UTF-8
8,523
2.53125
3
[]
no_license
<?php /* php/value-lists.php By Matthew DiMatteo, Children's Technology Review This file defines arrays of value lists for checkbox sets to be outputted by the file 'php/form-checkbox-output.php' The order for array items is (label, value) The file 'php/form-checkbox-output.php' sets an id value for each checkbox item...
true
46c0d26e5f2b35904d0522bcef8c3d643d013a63
PHP
strelov1/pizza-backend
/database/migrations/2020_02_25_200340_orders.php
UTF-8
1,116
2.609375
3
[]
no_license
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; use App\Models\Order; use App\Models\User; class Orders extends Migration { /** * Run the migrations. * * @return void */ public function up() { ...
true
3590c91ca2581051c303063ce154543f52e53fca
PHP
labago/SummerTextbooks
/login.php
UTF-8
2,401
2.78125
3
[]
no_license
<?php if(isset($_GET['id'])) $where = $_GET['id']; else $where = ""; $host = "books.summertextbooks.com"; $user = "jlane09"; $pass = "counter"; $db = "summer_books"; // open connection $connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!"); mysql_select_db($db) or die ("Unable t...
true
642ee72d7bb2426534e8e3ce0b7e13bdc9542634
PHP
mjmunger/util
/src/Slugify.php
UTF-8
192
2.8125
3
[ "MIT" ]
permissive
<?php namespace hphio\util; class Slugify { public static function getSlug(string $string) { return strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $string), '-')); } }
true
e67f3fbf5fc860d132581fc3ac8eb30e6a6a1543
PHP
hauptsacheNet/share_a_secret
/Classes/Domain/Repository/SecretRepository.php
UTF-8
965
2.6875
3
[]
no_license
<?php namespace Hn\ShareASecret\Domain\Repository; use Hn\ShareASecret\Domain\Model\Secret; use Hn\ShareASecret\Exceptions\SecretNotFoundException; use TYPO3\CMS\Extbase\Persistence\Repository; /** * Class SecretRepository * @package Hn\ShareASecret\Domain\Repository */ class SecretRepository extends Repository {...
true
2e29757af0e7d926c499db6677346ea52954b715
PHP
NicoCabrera/apiTemplateParcial
/apirest/classes/userApi.php
UTF-8
5,180
2.75
3
[]
no_license
<?php require_once 'user.php'; require_once 'IGenericDAO.php'; use Slim\Http\UploadedFile; class userApi extends User implements IGenericDAO { public function getById($request, $response, $args) { $userid = $args['userid']; $user = User::getUserById($userid); if (!$user) { ...
true
dd38a7bea61c8f1eb7df9c6ac60e689c4d033a44
PHP
a18sonvargar/activitat41_api
/src/Controller/MainController.php
UTF-8
3,637
2.609375
3
[ "MIT" ]
permissive
<?php namespace App\Controller; use App\Repository\PeliculaRepository; use Symfony\Component\HttpFoundation\Request; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exce...
true
3c5c9f260fc5bfbf92d5303b2f0d29454dd63838
PHP
santiaguf/lavamaster
/registro.php
UTF-8
2,855
2.96875
3
[]
no_license
<?php include("conexion.php"); //Sistema de registro --HiperAcme.net-- if(isset($_POST['registro']))//Vallidamos que el formulario fue enviado { /*Validamos que todos los campos esten llenos correctamente*/ if(($_POST['nick'] != '') && ($_POST['mail'] != '') && ($_POST['pass'] != '') && ($_POST['conf_pass...
true
ff0a8e7d74e894d2b55163b57c58b18b0455112e
PHP
AgoraIO-Community/RTE-Innovation-Challenge-2020
/SDKChallengeProject/IvansClass/api/app/Model/Classes.php
UTF-8
716
2.671875
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace App\Model; use Hyperf\DbConnection\Model\Model; class Classes extends Model { /** * The table associated with the model. * * @var string */ protected $table = 'classes'; /** * The connection name for the model. * * @var string ...
true
0a9f2a1e3608ba1e5b77e98dabf45d0833511dc4
PHP
adamwulf/jotbook
/library/IO/test.class.File.php
UTF-8
429
2.890625
3
[]
no_license
<? Class TestFile extends UnitTestCase{ public function test_file() { $file = new File("/my/location/for/the/file.html"); $this->assertEqual("/my/location/for/the/file.html", $file->getLocation(), "the default location is \"/my/location/for/the/file.html\""); $file->setLocation("/location/two.css"); $this->ass...
true
6abc782bb2b77bb9c56ea2b724cdb87bfc24ead7
PHP
Tagarela76/voc
/vwm/modules/classes/MixOptimized.class.php
UTF-8
59,404
2.671875
3
[]
no_license
<?php /** * Class for mix table in database */ use VWM\Framework\Model as Model; use VWM\Apps\Process\StepInstance; class MixOptimized extends Model { public $valid = self::MIX_IS_VALID; public $hoverMessage; public $mix_id; public $equipment_id; public $department_id; public $description; ...
true
5844c312f1b128b106d38ccef675084b839cf3d5
PHP
Magictallguy/mtg-engine
/markets.php
UTF-8
27,510
2.515625
3
[]
no_license
<?php define('HEADER_TEXT', 'Marketplace'); require_once __DIR__ . '/includes/globals.php'; require_once __DIR__ . '/includes/class/class_mtg_paginate.php'; $pages = new Paginator(); $_GET['ID'] = isset($_GET['ID']) && ctype_digit($_GET['ID']) ? $_GET['ID'] : null; $_GET['action'] = isset($_GET['action']) && ctype_alph...
true
fa35bfc50a05de052769c8c5bc3d5db43ec96f92
PHP
alexanderleyba/CodeIT
/application/Classes/Validator.php
UTF-8
2,174
3.203125
3
[]
no_license
<?php /** Validation class */ class Validator { // property indicates passed validation or failed private $status = false; // here stored array of errors.. private $errors = array(); // and DB instance private $db_instance = null; public function __construct() { $this->db_instance = DB::getInstance(); }...
true
44905db7e9489d3a7af4eaa87fc625fb627d1e6c
PHP
kadet1090/SocketLib
/Examples/client.php
UTF-8
409
2.546875
3
[]
no_license
<?php include '../vendor/autoload.php'; include 'functions.php'; $client = new \Kadet\SocketLib\SocketClient('localhost', 6969); $client->onReceive->add(function ($client, $data) { echo $data . PHP_EOL; }); $client->connect(false); while (true) { $read = trim(fgets(STDIN)); if ($read == 'exit') break; ...
true
272870c3240fe26c1c9ad876e29f84ff2e568cdb
PHP
leorikgit/SimpleMusicApp
/app/src/Artist/ArtistI.php
UTF-8
339
2.96875
3
[]
no_license
<?php namespace Artist; interface ArtistI{ public function setId($id); public function getId(); public function setName($name); public function getName(); public function setCreatedAt($created_at); public function getCreatedAt(); public function setUpdatedAt($updated_at); public function...
true
7ccfc75cd499168d786ae76cc87895386ee80eb1
PHP
rerzy/arbory
/src/Pages/ArboryFilePage.php
UTF-8
503
2.578125
3
[ "MIT" ]
permissive
<?php namespace Arbory\Base\Pages; use Arbory\Base\Admin\Form\Fields\ArboryFile; use Arbory\Base\Admin\Form\FieldSet; use Illuminate\Database\Eloquent\Model; class ArboryFilePage extends Model implements PageInterface { /** * @var array */ protected $fillable = [ 'arbory_file' ]; /** * @p...
true
6d930005ad8694a591450410d77493e8e4a269c7
PHP
bizchina/php-consistent-hashing
/ConsistentHashing.php
UTF-8
3,512
3.21875
3
[]
no_license
<?php /** * Created by PhpStorm. * User: hongxu * Date: 2017/7/28 * Time: 17:44 */ // turn on the strict mode in PHP7+ declare(strict_types=1); /** * Class ConsistentHashing */ class ConsistentHashing { /** * you can set the number of virtual node, * more virtual nodes you set, the balance of the...
true
a7277718130c6cf561ef75ce9a7ab8eb00bc2ce9
PHP
kalusova/VAII
/production/check.php
UTF-8
1,701
2.59375
3
[]
no_license
<?php ob_start(); ini_set('display_errors', 1); include 'db_connect.php'; $meno_login=$_POST["meno_login"]; $heslo_login=$_POST["heslo_login"]; $sql = "SELECT count(*) as pocet FROM users where login='".$meno_login."' and pass='".$heslo_login."'"; if ($result = $mysqli -> query($sql)) { while ($row = mysqli_fetch_...
true
3b32b492679b3757569144b1e55440e7079e55f1
PHP
KyleV35/CS147Project
/models/rss_feed.php
UTF-8
2,306
2.828125
3
[]
no_license
<?php include_once "../models/article.php"; class RSS_Feed { private $rssID; private $siteID; private $filter; private $url; private $article_list; public function __construct($rssID,$siteID,$filter,$url) { $this->rssID = $rssID; $this->siteID = $siteID; $this...
true
c395d190f08eebff1c14464bfc87006bff792827
PHP
applekang/chat-swoole
/Libs/Classes/Message.php
UTF-8
2,134
2.890625
3
[]
no_license
<?php namespace Libs\Classes; class Message{ // protected static $connection = "mongodb://192.168.0.116:12345"; protected static $connection = "mongodb://192.168.13.191:27017"; protected static $db = 'swoole'; private static function mongoServer() { static $mongo; if (!$...
true
6c7c83556865cf69921a0c1320294735bd98c4b7
PHP
renoinn/budget
/service/common/auth.php
UTF-8
1,764
2.734375
3
[]
no_license
<?php require_once dirname(__FILE__).'/config.php'; require_once dirname(dirname(__FILE__)).'/vendor/autoload.php'; use Abraham\TwitterOAuth\TwitterOAuth; class Auth { public $info = null; public function checkLogin() { $this->info = $this->getLoginInfo(); if(!$this->info) { return false; } return true;...
true
17fffffc11268d2ba42dcfee9ba690e662aed464
PHP
wasabi-cms/cms
/src/View/Theme/Theme.php
UTF-8
4,380
2.703125
3
[ "MIT" ]
permissive
<?php namespace Wasabi\Cms\View\Theme; use Cake\Core\Exception\Exception; use Wasabi\Cms\View\Layout\Layout; abstract class Theme { /** * Id of the theme. * * @var string */ protected $_id; /** * Name (translated) of the theme. * * @var string */ protected $_n...
true
6f3a15bb828beaf25e433802674e46b509d9191f
PHP
stephenharris/guise
/src/Settings/Views/DescriptionDecorator.php
UTF-8
936
2.828125
3
[]
no_license
<?php namespace StephenHarris\Guise\Settings\Views; class DescriptionDecorator implements Setting { function __construct( Setting $settingView, $description ) { $this->decoratedSetting = $settingView; $this->description = $description; } function label() { return $this->decorated...
true
c958c6008bd6e40dbaaad3a46df3bd7f146a4e2d
PHP
SunnyChopper/loa
/app/Custom/ToolHelper.php
UTF-8
1,706
2.8125
3
[ "MIT" ]
permissive
<?php namespace App\Custom; use App\Tool; use Auth; class ToolHelper { /* Private variables */ private $tool_id; /* Initializers */ public function __construct($tool_id = 0) { $this->tool_id = $tool_id; } /* Public functions */ public function create_tool($data) { $name = $data["tool_name"]; $descrip...
true
c1d9047de88c3d64ee56ad89651e029b72314ef4
PHP
Laboralphy/h5-raycaster-lab
/dynamics/laby/generators/dungeon/LabyRoomForge.php
UTF-8
1,074
2.640625
3
[ "MIT" ]
permissive
<?php class LabyRoomForge extends LabyRoomHelper { const PROB_CORNER = 77; public function generate($oRoom) { $cx = floor ( $oRoom->getWidth () / 2 ); $cy = floor ( $oRoom->getHeight () / 2 ); $cxy = array ( max ( 1, $cx ), max ( 1, $cy ) ); $aWalls = array ( 0, 1, 2, 3 ); unse...
true
04f9a27bd7e7f05d2fdf4431c671fdbd6f0f13c2
PHP
decodelabs/df-r7-base
/provider/R7/Disciple/GateKeeper.php
UTF-8
2,125
2.734375
3
[]
no_license
<?php /** * This file is part of the Decode Framework * @license http://opensource.org/licenses/MIT */ namespace DecodeLabs\R7\Disciple; use DateTime; use DecodeLabs\Disciple\GateKeeper as GateKeeperInterface; use DecodeLabs\Disciple\GateKeeper\Attempt; use DecodeLabs\Disciple\GateKeeperTrait; use DecodeLabs\R7\...
true
e0dd869fae04720ad7fc68bc5d0dbb0c8d2f4f8f
PHP
simbigo/colorito
/src/Channel.php
UTF-8
759
2.671875
3
[]
no_license
<?php declare(strict_types = 1); namespace Simbigo\Colorito; use Imagick; /** * Class Channel */ class Channel { const ALL = Imagick::CHANNEL_ALL; const ALPHA = Imagick::CHANNEL_ALPHA; const BLACK = Imagick::CHANNEL_BLACK; const BLUE = Imagick::CHANNEL_BLUE; const CYAN = Imagick::CHANNEL_CYAN;...
true
532176e1d9c5091cd44149d5da66bfa7b8481e06
PHP
timostamm/injector
/src/Exception/ArgumentListException.php
UTF-8
1,041
2.734375
3
[ "MIT" ]
permissive
<?php /** * Created by PhpStorm. * User: ts * Date: 20.04.18 * Time: 09:01 */ namespace TS\DependencyInjection\Exception; use RuntimeException; use TS\DependencyInjection\Reflection\ParametersInfo; use TS\DependencyInjection\Reflection\Reflector; class ArgumentListException extends RuntimeException implements ...
true
3b10fe4c9b35cd73f3165cc4748ccbc33e3c6fe5
PHP
ihorpravdyvyi/patterns
/pattern-facade/Bookmark.php
UTF-8
535
3.375
3
[]
no_license
<?php declare(strict_types=1); /** * Class Bookmark */ class Bookmark { /** * @var int */ private $page; /** * Bookmark constructor. * @param $page */ public function __construct(int $page) { $this->page = $page; } /** * @return int */ publ...
true
1b64464bd8be537f1afea01e9592be55396f9d23
PHP
Dracologist/pets2
/tmp/3p154hrq8fwgs.3sfgytig7t4wc.php
UTF-8
1,049
2.5625
3
[]
no_license
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>New Pet</title> </head> <body> <?php if ($success): ?> <h2>Thank you for your order of a <?= ($type) ?>!</h2> <?php endif; ?> <form action="" method="post"> <label>Pet Name <?php if (isset($errors['name'...
true
b7684c977723d671c12a46e5e25d8207f0e05548
PHP
cnshao/knowledge-library
/web/models/CollectModel.class.php
UTF-8
3,765
3
3
[]
no_license
<?php /** * Created by PhpStorm. * User: ya * Date: 2016/8/1 * Time: 15:43 * 收藏模块的模型 */ class CollectModel extends BaseModel{ // 收藏文章,点击收藏,添加到用户知识库中,使用默认分类 // 在数据库中的逻辑就是,在user_and_article用户文章关联表中将该文章和用户以及分类建立起联系 function collectArticle($sys_user_id,$article_id,$sys_category_id){ $sql = "INS...
true
66bad8fae29569dd1f1f7d66343375fbcda59def
PHP
stenvala/tekstari
/tekstari.php
UTF-8
3,318
3.109375
3
[]
no_license
<?php namespace tekstari; class tekstari { const LINK = 'http://www.yle.fi/tekstitv/ttv/'; const MARK_BEGIN = '<center><pre>'; const MARK_END = '</pre></center>'; const GET_PLAIN = 0; const GET_ASIS = 1; const GET_ALL = 2; private static $FAV = null; private static $FAV_FILE = '/fav.js...
true
0aeecce150d66802bba5d1c8d8f5f4d1a28e133c
PHP
vnejedly/database
/src/Connection/ConnectionInterface.php
UTF-8
863
2.875
3
[ "MIT" ]
permissive
<?php namespace Hooloovoo\Database\Connection; use Hooloovoo\Database\PreparedStatement\PreparedStatementInterface; use Hooloovoo\Database\Query\QueryInterface; use Hooloovoo\Database\QueryResult\QueryResultInterface; /** * Interface ConnectionInterface */ interface ConnectionInterface { /** * @param Query...
true
b678e4a7edf82fc9880eb81e2a3ac74b9e1ce894
PHP
belgattitude/soluble-jasper
/tests/server/expressive/src/App/Handler/LoginHandler.php
UTF-8
1,729
2.828125
3
[ "MIT", "JasPer-2.0" ]
permissive
<?php declare(strict_types=1); namespace App\Handler; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; use Zend\Diactoros\Response\HtmlResponse; use Zend\Diactoros\Response\RedirectResponse; use Zend\Expressive\Template\TemplateRenderer...
true
29e15d655fced8a40b83738a462dbac365ae89f2
PHP
moofik/empower
/backend/bootstrap/app/Image.php
UTF-8
1,168
2.609375
3
[ "MIT" ]
permissive
<?php namespace App; use Eloquent; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\MorphTo; use Illuminate\Support\Carbon; /** * App\Image * * @property int $id * @property string $url * @property string $imageable_type * @property in...
true
c1026da3b44a95294000582f02e3d52417a448f2
PHP
Arne-Jan/cyberfusion-cluster-api-client
/src/Models/MailAlias.php
UTF-8
3,134
2.515625
3
[ "MIT" ]
permissive
<?php namespace Vdhicts\Cyberfusion\ClusterApi\Models; use Illuminate\Support\Arr; use Vdhicts\Cyberfusion\ClusterApi\Contracts\Model; class MailAlias extends ClusterModel implements Model { private string $localPart; private array $forwardEmailAddresses = []; private ?int $mailDomainId = null; priva...
true
11a898040b71505093c5190268c882aeb13cd9ce
PHP
pkanev/php-basics
/04.PHP-Arrays-Strings-Objects/06.URL-Replacer/URLReplacer.php
UTF-8
1,253
3.546875
4
[]
no_license
<?php header('Content-type: text/HTML; charset=utf-8'); ?> <!-- Write a PHP program URLReplacer.php that takes a text from a textarea and replaces all URLs with the HTML syntax <a href= "…" ></a> with a special forum-style syntax [URL=…][/URL]. --> <!doctype html> <html> <head> <meta charset="UTF-8"> <title>URL ...
true
f49068e55a51a3eb84df37efe3208b44342e3cce
PHP
HermesGabriel18/uclared
/app/sistema/controladores/mensaje.php
UTF-8
3,748
2.71875
3
[]
no_license
<?php session_start(); require'../modelos/mensaje.php'; // TODOS LOS MÉTODOS ENVIARÁN DATOS TIPO JSON A LOS CONTROLADORES // DE JAVASCRIPT class controllerMensaje{ private $mensaje; public function __construct(){ $this->mensaje=new Mensaje(); }// fin del contructor // MANDA A LEER LOS MENSAJES DE...
true
7b4e82732d81526acf63527987e617b1d9173294
PHP
Gerfey/mapper
/src/Annotation/Rule.php
UTF-8
584
2.796875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace Gerfey\Mapper\Annotation; /** * @Annotation * @Target("PROPERTY") */ class Rule { /** * @var string */ public $name = null; /** * @var array */ public $params = null; public function __construct($values) { $this->name = $values['name']; ...
true
eca3c61498a7721fce7924d6653fc403ee259a68
PHP
vchaillo/computorV1
/computor
UTF-8
563
2.609375
3
[]
no_license
#!/usr/bin/php <?php include('parsing.php'); include('reduce.php'); include('delta.php'); include('solve.php'); include('error.php'); if ($argc == 2) { $eq = parsing($argv[1]); if ($eq['degree'] == 1 || $eq['degree'] == 2) $eq = print_reduce($eq); if ($eq['degree'] == 2) $eq = get_delta($eq); if...
true
504d3f16182ead77b50dcc9733ac55afe5c1b8a7
PHP
digit-soft/re-action-redis
/src/RedisCommandsInterface.php
UTF-8
551
2.8125
3
[ "MIT" ]
permissive
<?php namespace Reaction\Redis; use React\Promise\ExtendedPromiseInterface; /** * Interface RedisCommandsInterface * @package Reaction\Redis */ interface RedisCommandsInterface { /** * Magic method * @param string $name * @param array $arguments * @return mixed */ public function...
true
c88653402b7a4b1bcd0028ec0f5d9379c6c0582a
PHP
paragsaraf/FruitBazar
/library/Custom/lang/Employee.php
UTF-8
1,149
2.734375
3
[]
no_license
<?php class Custom_Lang_Employee { public static function getEmp() { $objEmpDetailsMapper=new Model_EmployeedetailsMapper(); $result = $objEmpDetailsMapper->fetchEmpName(); $employee[null] = '---select---'; foreach ($result as $key => $value) { $employee[$valu...
true
1079cbcad04f58e8ebeacc3525e6647353c5afaf
PHP
fennore/symsaladbin
/src/Handler/FileHandler.php
UTF-8
1,894
2.796875
3
[ "MIT" ]
permissive
<?php namespace App\Handler; use App\Repository\FileRepository; use App\Entity\File; use Symfony\Component\HttpFoundation\File\File as BaseFile; use App\Reader\DirectoryReader; /** * Handles files in the files directory. */ class FileHandler { /** * @var DirectoryReader */ private $directoryReade...
true
4aad8520bba3324a545fc2dbc334627345edf25e
PHP
Codeception/Codeception
/tests/unit/Codeception/Lib/Console/DiffFactoryTest.php
UTF-8
1,080
2.625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Codeception\Lib\Console; use SebastianBergmann\Comparator\ComparisonFailure; /** * DiffFactoryTest **/ class DiffFactoryTest extends \Codeception\Test\Unit { /** * @var DiffFactory */ protected DiffFactory $diffFactory; protected function _setUp() ...
true
9d8efcafd3940b5ad228f07fade8053095fbe1e4
PHP
isaiahinocentes/library-system-sq
/app/Reservation.php
UTF-8
977
2.5625
3
[]
no_license
<?php namespace App; use Carbon\Carbon; use Illuminate\Database\Eloquent\SoftDeletes; class Reservation extends BaseModel { use SoftDeletes; protected $fillable = [ 'borrower_name', 'borrower_id', 'book_id', //Foreign 'reservation_date', 'reservation_expiration' ...
true
217c8665f47c97e4a30d2140682cea29aa9ce444
PHP
Orelab/PHP-Dijkstra-GPS
/misc/gps-v1.php
UTF-8
2,201
3.03125
3
[]
no_license
<?php namespace Fisharebest\Algorithm; include "algorithm/src/Dijkstra.php"; /* Init 2D alphabetical array */ $graph = array_flip(range('A', 'Y')); foreach( $graph as &$g ){ $g = []; } /* Fullfilling the graph */ $graph["A"]["B"] = 1; $graph["A"]["C"] = 1.5; $graph["B"]["E"] = 3; $graph["B"]...
true
597eefe8710cda6ad7cdbc6ba18c4458a5f9d1e7
PHP
harminderbomrah/my-mvc
/lib/dbconnections_class.php
UTF-8
1,493
2.796875
3
[]
no_license
<?php final class dbConnect{ private $dbname; private $dbuser; private $dbpassword; private $dbhost; private $dbConnection; function __construct(){ $this->dbname = DATABASE_NAME; $this->dbuser = DATABASE_USERNAME; $this->dbpassword = DATABASE_PASSWORD; $this->dbhost = DATABASE_HOST; $this->dbConnectio...
true
12f4f0e00e6cbaf6a50bf7e186f1882982dfc287
PHP
methompson/fancyService
/web/classes/client.php
UTF-8
2,530
3.078125
3
[]
no_license
<?php /** * This class implementation is provided by FancyService. */ namespace FancyService; /** * A client to communicate with FancyService server. */ class Client { /** * Constructor. * * @param array $config Contains credentials and service URI. */ public function __construct(array...
true
9c7c99cf86de596db21cc0ac1482d0e01adad45e
PHP
incidunt/wei-crm
/service/microblog/plugins/ActivitySpam/Spam_score.php
UTF-8
6,800
2.53125
3
[]
no_license
<?php /** * MicroService - the distributed open-source microblogging tool * Copyright (C) 2011, MicroService, Inc. * * Score of a notice by activity spam service * * PHP version 5 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affer...
true
48d025e49c53e3fb4f438a10a3a44819d3dfdd63
PHP
Duvan9430/ProyectoFinal
/entidad/Eventos/departamentoE.php
UTF-8
2,607
2.96875
3
[]
no_license
<?php class DepartamentoE { private $idDepartamento; private $idPais; private $depNombre; private $fechaCreacion; private $fechaModificacion; private $usuarioCreacion; private $usuarioModificacion; /** * @return mixed */ public function getIdDepartamento() { return $this->idDepa...
true
7a6b5690d93ecfde891b83967341ff243734a12d
PHP
shingletont/laravel
/app/Http/Controllers/UsersController.php
UTF-8
2,092
2.625
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use Hash; use Validator; use Redirect; use View; use Input; use \App\User; use App\Http\Requests; use App\Http\Controllers\Controller; use Illuminate\Http\Request; class UsersController extends Controller { public function __construct(User $user) { $this->user = $user; } ...
true
3dacbfc44ed4ded51cc8ececa3982e0138998111
PHP
zhangatle/vue-admin-api
/app/Http/Requests/AuthRequest.php
UTF-8
1,220
2.8125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Requests; /** * @property string account * @property string last_token */ class AuthRequest extends Request { /** * Get the validation rules that apply to the request. * * @return array */ public function rules(): array { switch ($this->method()) { ...
true
79625dff0cd8a1ce31e795224097acade77827da
PHP
dantleech/phpbench2
/tests/Unit/Library/TypeSpec/AbstractTypeTestCase.php
UTF-8
696
2.546875
3
[ "MIT" ]
permissive
<?php namespace PhpBench\Tests\Unit\Library\TypeSpec; use Generator; use PHPUnit\Framework\TestCase; use PhpBench\Library\TypeSpec\Type; abstract class AbstractTypeTestCase extends TestCase { /** * @dataProvider provideAccepts */ public function testAccepts(Type $type, $data, bool $accepts) { ...
true
c419a40b6b29db6bddd86e810a950c628dc9aed4
PHP
abedgh/EsQueryBuilder
/src/Asg/ElasticSearch/QueryDSL/MatchPhrase.php
UTF-8
1,694
2.875
3
[]
no_license
<?php /** * Created by PhpStorm. * User: abed * Date: 1/25/17 * Time: 8:14 PM */ namespace Asg\ElasticSearch\QueryDSL; use Asg\ElasticSearch\QueryDSL\Contracts\QueryDSLInterface; class MatchPhrase extends QueryDSLAbstract implements QueryDSLInterface{ protected $name = 'match_phrase'; protected $field ...
true
dfc6ed5c6a7fdc56d9c0c5ed62836b19bb06c48e
PHP
IP-CAM/Pavo-Theme-for-Opencart-v.3
/upload/admin/controller/extension/module/pavothemer/pavothemer.php
UTF-8
2,386
2.515625
3
[]
no_license
<?php /** * * @package ThemeLexux Framework for OpenCart 3.x * @version 1.0.0 * */ if ( ! defined( 'DIR_SYSTEM' ) ) exit(); // define some key defined( 'PAVOTHEMER_DIR' ) || define( 'PAVOTHEMER_DIR', dirname( __FILE__ ) ); defined( 'PAVOTHEMER_API' ) || define( 'PAVOTHEMER_API', 'http://localhost/opencart/api/i...
true
0cc4d112553ef767ea9870e82f809d344f24ff40
PHP
vncloudsco/shopvc
/wp-content/plugins/woocommerce-gateway-paypal-express-checkout/includes/class-wc-gateway-ppec-privacy.php
UTF-8
8,975
2.515625
3
[ "GPL-3.0-only", "Apache-2.0" ]
permissive
<?php if ( ! class_exists( 'WC_Abstract_Privacy' ) ) { return; } class WC_Gateway_PPEC_Privacy extends WC_Abstract_Privacy { /** * Constructor * */ public function __construct() { parent::__construct( __( 'PayPal Checkout', 'woocommerce-gateway-paypal-express-checkout' ) ); $this->add_exporter( 'woocomme...
true
61b985a3e14e37fa47a79812946f18747c907cd5
PHP
XxRAZpienxX/Practice
/core/src/jkorn/practice/data/IDataProvider.php
UTF-8
1,040
2.90625
3
[]
no_license
<?php declare(strict_types=1); namespace jkorn\practice\data; use jkorn\practice\games\misc\managers\IGameManager; use jkorn\practice\games\misc\leaderboards\LeaderboardGroup; use pocketmine\Player; interface IDataProvider { /** * @param Player $player * * Loads the player's data. */ p...
true
6f7315f599cf6e61053b08b6ff64f32dda889912
PHP
ValeriyaGodlevskayaa/test-image-upload
/src/classes/ImageUrlUploader.php
UTF-8
5,841
2.890625
3
[ "MIT" ]
permissive
<?php namespace lera\test_image_upload\classes; use lera\test_image_upload\interfaces\ConnectionInterface; use lera\test_image_upload\interfaces\PathStructureInterface; class ImageUrlUploader { protected $urls = []; protected $connection; protected $paths; protected $config = [ 'url_rules' =...
true
84c342a773503410b69dcb0d0778d967b1414e51
PHP
drupalprojects/hn
/modules/hn_views/src/Plugin/views/style/ViewSerializer.php
UTF-8
3,038
2.53125
3
[]
no_license
<?php namespace Drupal\hn_views\Plugin\views\style; use Drupal\Core\Render\Markup; use Drupal\rest\Plugin\views\style\Serializer; /** * The style plugin for serialized output formats. * * @ingroup views_style_plugins * * @ViewsStyle( * id = "hn_views", * title = @Translation("View Serializer"), * help ...
true