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
0e1cdbbb96c645bf4e6f1f4d5d1c84cacdfc07b4
PHP
houhr/taolihupan
/change_page.php
UTF-8
6,175
2.640625
3
[]
no_license
<?php //更改头像 require_once('./includes/config.inc.php'); $page_title = '个人页面 - 桃李湖畔'; include('./includes/header.html'); if(!isset($_SESSION['studentNumber'])) { $url = 'http://' . $_SERVER['HTTP_HOST'].'/taolihupan'; if((substr($url, -1) == '/') OR (substr($url, -1) == '\\')) { $url =substr($url, 0, -1); } $url...
true
92b3d5ff92706ca73cbcd93017b7e2e0b164bbd0
PHP
Exitialis/testProject
/app/Http/Controllers/Profile/ProfileController.php
UTF-8
1,271
2.671875
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Profile; use App\Http\Requests\Profile\UpdateProfileRequest; use App\User; use Illuminate\Http\Request; use App\Http\Controllers\Controller; class ProfileController extends Controller { /** * Страница профиля пользователя. * * @return \Illuminate\Contracts\View...
true
e0ce5a310b9952df5699c4a3d21b93bc2d31d410
PHP
Makhendra/training-simulator.site
/app/Tasks/Databases/Tasks/NumberOfWomen.php
UTF-8
5,279
2.78125
3
[]
no_license
<?php namespace App\Tasks\Databases\Tasks; use App\Models\CustomSession; use App\Tasks\Databases\Services\FamilyDatabaseService; use App\Tasks\Databases\TableDatabaseTrait; use App\Tasks\TaskInterface; use App\Tasks\TaskTrait; use Throwable; // Даны фрагменты двух таблиц из базы данных. Каждая строка таблицы 2 сод...
true
cf88fadebd2367f29f983691f800fa39f667c2a7
PHP
marcelofajardo/sistema-de-ticket-casos
/app/Http/Controllers/Auth/MicrosoftController.php
UTF-8
4,146
2.5625
3
[]
no_license
<?php namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Microsoft\Graph\Graph; use Microsoft\Graph\Model; use Auth; use Hash; use Str; use App\Models\User; class MicrosoftController extends Controller { public function signin() { // Initialize the OAuth...
true
25cffba3affd47a8575c619631b62d71a43ec1f4
PHP
ebaioni/movie-recommendation
/tests/ShowTest.php
UTF-8
1,057
2.65625
3
[]
no_license
<?php use PHPUnit\Framework\TestCase; date_default_timezone_set('Australia/Sydney'); require_once __DIR__ . '/../Show.php'; class ShowTest extends TestCase { public $show; /** * @before */ public function setupShow() { $data = json_decode(file_get_contents(__DIR__ . '/mocks/singleShow...
true
aa05dd36675512eafe56340ea7063445d5036507
PHP
alanly/languageleap
/app/tests/ApiController/ApiUserControllerTest.php
UTF-8
4,347
2.640625
3
[]
no_license
<?php use LangLeap\TestCase; use LangLeap\Accounts\User; use Mockery as m; class ApiUserControllerTest extends TestCase { private $user; public function setUp() { parent::setUp(); Route::enableFilters(); } protected function getUserInstance($admin = false) { $user = App::make('LangLeap\Accounts\User'...
true
e11baf781952c1f98164257fca9a0624352f91f9
PHP
kohler/hotcrp
/src/decisioninfo.php
UTF-8
3,423
2.90625
3
[ "LicenseRef-scancode-warranty-disclaimer", "MIT", "BSD-3-Clause" ]
permissive
<?php // decisioninfo.php -- HotCRP helper class for decisions // Copyright (c) 2006-2023 Eddie Kohler; see LICENSE. class DecisionInfo { /** @var int */ public $id; /** @var string */ public $name; /** @var int */ public $catbits; /** @var -2|-1|0|1 */ public $sign; /** @var bool *...
true
45d781a9131f55bec1c62855a1dc32c3c02386fc
PHP
tanasievlad246/go-ask
/src/classes/Database.class.php
UTF-8
789
2.78125
3
[]
no_license
<?php declare(strict_types=1); require $_SERVER['DOCUMENT_ROOT'] . '/go-ask/src/includes/env.inc.php'; class Database { private $servername; private $username; private $password; private $dbName; public function __construct() { $this->servername = $_ENV['DB_SERVERNAME']; $this...
true
a8aa8b11bcb734dee2f55799eb37def56969833f
PHP
MrSir/balkanmoto
/nova/src/Console/DashboardCommand.php
UTF-8
1,425
2.609375
3
[ "MIT" ]
permissive
<?php namespace Laravel\Nova\Console; use Illuminate\Console\GeneratorCommand; use Illuminate\Support\Str; class DashboardCommand extends GeneratorCommand { /** * The name and signature of the console command. * * @var string */ protected $signature = 'nova:dashboard {name}'; /** ...
true
d55f1af26e28e51e5df6607c58aa26c1adf137af
PHP
abraham271297/PadelWeb
/ABP_24-master/Views/Pista/Pista_DELETE.php
UTF-8
1,681
2.515625
3
[]
no_license
<?php class Pista_DELETE{ var $lista; var $datos; var $enlace; function __construct ($lista, $datos, $enlace){ $this -> lista = $lista; $this -> datos = $datos; $this -> enlace = $enlace; $this->toString(); } function toString(){ include '../Views/Header.php'; include '../Views/MenuN...
true
0ba4fe956e9dd8b9978f6479afc2ab6cfa929a73
PHP
kostmits83/m102
/common/components/IEXTradingApi/Responses/Stats/StatsRecent.php
UTF-8
2,463
2.921875
3
[ "BSD-3-Clause", "MIT" ]
permissive
<?php namespace common\components\IEXTradingApi\Responses\Stats; use common\components\IEXTradingApi\Responses\IEXTradingApiResponse; class StatsRecent extends IEXTradingApiResponse { // The data list to be returned as a result private $data = []; /** * @var string Refers to the trading day */ ...
true
320616ea99d93345ce3bd896fdde4e343f7a8efe
PHP
aircoq/1pqvf_ovfsddfsfdfengfhg
/database/migrations/2017_11_08_025514_create_subject_table.php
UTF-8
1,083
2.6875
3
[ "MIT" ]
permissive
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateSubjectTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { // 话题分类表 Schema::create...
true
e3c5eecf28b525843a76a614632bd28ffab84e07
PHP
auraphp/Aura.Signal
/src/Aura/Signal/ResultFactory.php
UTF-8
1,055
2.953125
3
[ "BSD-2-Clause" ]
permissive
<?php /** * * This file is part of the Aura Project for PHP. * * @package Aura.Signal * * @license http://opensource.org/licenses/bsd-license.php BSD * */ namespace Aura\Signal; /** * * A factory to create Result objects. * * @package Aura.Signal * */ class ResultFactory { /** * * A...
true
7ddfb7d2d52d91b186d563a2c7eb2cc87383189c
PHP
kevthunder/arch
/app/libs/recursive_tracking.php
UTF-8
382
3.125
3
[]
no_license
<?php class RecursiveTracking extends Object { var $stack; function track($data){ $this->stack[]=$data; } function setData($data){ if(!empty($this->stack)){ array_pop($this->stack); $this->stack[]=$data; } } function getData(){ return end($this->stack); } function endTrack(){ if(!empty(...
true
fdeffa54779868a8530e99ae16432dffa29648cb
PHP
lpotherat/hackathon2019-serenity
/src/Controller/Rest/TagController.php
UTF-8
2,573
2.703125
3
[]
no_license
<?php namespace App\Controller\Rest; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\HttpFoundation\Request; use FOS\RestBundle\Controller\Annotations as Rest; use App\Entity\Aire; use Symfony\Component\HttpFoundation\Response; us...
true
9aad24cb2cb183b91adeab9372a7ce43f11e5188
PHP
xiaobei206/OLAINDEX-Magic
/app/Service/Authorize.php
UTF-8
4,272
2.671875
3
[ "MIT" ]
permissive
<?php namespace App\Service; use App\Entities\ClientConfigEntity; use App\Utils\Tool; use Curl\Curl; use Illuminate\Support\Arr; use Illuminate\Support\Collection; use Log; use ErrorException; class Authorize { /** * @var $instance */ private static $instances = []; private $account_type; ...
true
ca2ffbbf262e11374a4316aa142ba7a4ffd903af
PHP
HollyD14/IT414
/current/deleteFormEmp.php
UTF-8
2,603
2.71875
3
[]
no_license
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Delete Record</title> <link href="../css/updateFormStyle.css" rel="stylesheet" type="text/css"/> <link href="../css/pageStyle.css" rel="stylesheet" type="text/css"/> </head> <?php $id=$_GET['id']; require 'open-db.php'; $result...
true
272616609f2513b0214aba0e018612f5f7f483d3
PHP
anastasiakotolupova/myEshop
/inc/functions.php
UTF-8
1,227
3.15625
3
[]
no_license
<?php function debug($var, $mode = 1){ echo '<div class="alert alert-warning">'; $trace = debug_backtrace(); //function debug_back allows us to track the place where the function is called [multiarray] $trace = array_shift($trace); // this function allows us to erase the multi results // have ac...
true
9e521fe7ba55812e17fbe46442ae49dbd1c100ce
PHP
VincentvanTil/Muzen
/app/Http/Controllers/AddAddressController.php
UTF-8
823
2.546875
3
[]
no_license
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Country; use Auth; use App\Address; class AddAddressController extends Controller { public function index(){ return view('addaddress'); } public function store(Request $request) { $validatedData = $this->valida...
true
7d0a5ea2e35d3a78249e3fffeb70c9c21c2cac81
PHP
danny8632/DinMarkedsplads
/api/products/get.php
UTF-8
3,030
2.8125
3
[]
no_license
<?php require __DIR__."/../api.php"; class Get extends Api { private $conn; function __construct() { parent::__construct(); } function _GET() { $req = $this->getRequest(); $this->conn = $this->getDbConn(); $post_id = $this->getRequestValues(['id', 'po...
true
3e8cd397af2dc8364eb45667b17455f982a8d441
PHP
romanarranz/DIU
/P4/Proyecto Cowork/classes/Login.php
UTF-8
31,766
2.90625
3
[ "MIT" ]
permissive
<?php /** * Handles the user login/logout/session * @author Panique * @link http://www.php-login.net * @link https://github.com/panique/php-login-advanced/ * @license http://opensource.org/licenses/MIT MIT License */ class Login { /** * @var object $db_connection The database connection */ priv...
true
aa114ff14b978016045974313c664d007179596f
PHP
heidelpay/shopware-5
/Services/PaymentIdentification/PaymentIdentificationService.php
UTF-8
1,538
2.640625
3
[]
no_license
<?php declare(strict_types=1); namespace HeidelPayment\Services\PaymentIdentification; use HeidelPayment\Components\BookingMode; use HeidelPayment\Installers\Attributes; use HeidelPayment\Installers\PaymentMethods; use HeidelPayment\Services\ConfigReader\ConfigReaderServiceInterface; class PaymentIdentificationServ...
true
e6b7485b4411d1219c9fc11f74f4118f255e807e
PHP
rogerio-pereira/EspecilizaTi_MicroServices_04_Gateway
/app/Http/Controllers/Api/Auth/RegisterController.php
UTF-8
484
2.578125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Api\Auth; use App\Http\Controllers\Controller; use App\Services\RegisterService; use Illuminate\Http\Request; class RegisterController extends Controller { private $registerService; public function __construct(RegisterService $registerService) { $this->regist...
true
4b0e71acdaa5bdb1bd9c9b3e6d76c43bf77db309
PHP
phpmetrics/PhpMetrics
/src/Hal/Component/Tree/Operator/SizeOfTree.php
UTF-8
2,982
3.140625
3
[ "MIT" ]
permissive
<?php /* * (c) Jean-François Lépine <https://twitter.com/Halleck45> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Hal\Component\Tree\Operator; use Hal\Component\Tree\Graph; use Hal\Component\Tree\Node; class SizeOfTre...
true
5f6fdaa62a7eee5880bd7575fcd6078882d6c510
PHP
jmone/jotting
/include/post.php
UTF-8
355
2.53125
3
[]
no_license
<?php class post{ private $db; public function __construct() { global $db; $this->db = $db; } public function create($data){ print_r($data); return 1; } public function delete($id){ } public function get($id){ } public function getList(...
true
49430e8464d14a25e6b825103603a1ce08053287
PHP
zFrostbite/Team-Awesome
/Ruben/Sandbox/continue.php
UTF-8
473
3.5
4
[]
no_license
<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <?php $age = array(16, 18, 29, 30, 40, 15, 32, 5, 10, 22, 67); $i = 0; while($i <= 11){ if(current($age) == 30){ echo "I found " . current($age) . "!<br />"; $i++; ...
true
2025df50a7b8fc83ddebe57173a7c15de3228810
PHP
romanbr88/pr-of-it_php2
/Controllers/Admin/BaseController.php
UTF-8
632
2.734375
3
[]
no_license
<?php namespace Controllers\Admin; abstract class BaseController { protected \View $view; public function __construct() { $this->view = new \View(); } protected function beforeAction() { if (!$this->access()) { die('Доступ закрыт'); } $this->acti...
true
936bdfc3f7df5d0f2f856a7e1d944ce54dd05458
PHP
masahiroshimmori/pra_php
/18-5array.php
UTF-8
244
3.234375
3
[]
no_license
<pre> <?php $awk = array(1,2,3); //keyで後ろに追加 $awk[count($awk)] = 4; var_dump($awk); //または $awk[] = 5; var_dump($awk); //ハッシュ配列 $awk['test'] = 100; var_dump($awk); //keyの削除 unset($awk[0]); var_dump($awk);
true
ce2e66c16947515d76f43e4c108c60984b6f017c
PHP
carno-php/redis
/src/Chips/Subscriber.php
UTF-8
2,658
2.734375
3
[ "MIT" ]
permissive
<?php /** * Subscribes API * User: moyo * Date: 2018/8/28 * Time: 5:08 PM */ namespace Carno\Redis\Chips; use Carno\Channel\Chan; use Carno\Channel\Channel; use Carno\Promise\Promise; use Carno\Promise\Promised; use Carno\Redis\Types\Message; trait Subscriber { /** * @var Chan */ private $cons...
true
34baabbb9c46f3bc52edaf4bc05cec013c6cd58a
PHP
dmester/jdenticon-php
/src/Rendering/SvgPath.php
UTF-8
2,353
3.140625
3
[ "MIT" ]
permissive
<?php /** * This file is part of Jdenticon for PHP. * https://github.com/dmester/jdenticon-php/ * * Copyright (c) 2018 Daniel Mester Pirttijärvi * * For full license information, please see the LICENSE file that was * distributed with this source code. */ namespace Jdenticon\Rendering; /** * Represents a ...
true
19b8db387e4f5b2a96468b2d78d9e2bce08d8747
PHP
ano-it-com/eav-bundle
/src/EAV/ORM/Criteria/Order/OrderExpression/OrderExpression.php
UTF-8
1,461
2.921875
3
[]
no_license
<?php namespace ANOITCOM\EAVBundle\EAV\ORM\Criteria\Order\OrderExpression; use ANOITCOM\EAVBundle\EAV\ORM\Criteria\JoinHandler\JoinTableParams; class OrderExpression { private string $expression; private string $direction; /** @var JoinTableParams[] */ private array $joinTableParams; private ...
true
934e83ca03bc2998183f32bd400d930ea99b66ce
PHP
lexusmars/ChiassoTV
/application/libs/viewloader.php
UTF-8
608
2.828125
3
[]
no_license
<?php class ViewLoader { public const CONTENT_TYPE_TEXT = "text/plain"; public const CONTENT_TYPE_XML = "application/xml"; public static function load($template, $args=null) { if(is_array($args)){ foreach($args as $name=>$value){ $$name = $value; } ...
true
b032d41feac5fd5cbeb1307d10fb023cb56ab13e
PHP
Elbarae1921/social-network
/handlers/profileSearchHandler.php
UTF-8
2,396
2.671875
3
[]
no_license
<?php include("../inc/config.php"); include("../inc/func.php"); if(!isset($_POST['val'])) { header("Location: ../index.php"); } else { $val = $_POST['val']; $writer = $_POST['id']; $query = mysqli_query($con, "SELECT id, title, post, likes, w...
true
944b7a4feac55ed74a02c7716b844dbeac141b16
PHP
nicolasmpienda0918/taller1
/index.php
UTF-8
2,097
3.25
3
[]
no_license
<?php //Ejercicio1 echo ("TALLER 1 GENERALIDADES PHP Elaboraado por Nicolas Meola <br><br>"); echo ("Ejercicio 1 <br>"); $numero1=25; $numero2=18; $suma=$numero1+$numero2; $resta=$numero1-$numero2; $multiplicacion=$numero1*$numero2; $divicion=$numero1/$numero2; echo("<br>La suma de:".$numero1."+".$numero2."=".$su...
true
da3afda06a424d56c42613044c580f86ae053397
PHP
matthewtrask/oop-bike
/src/Brands/Trek.php
UTF-8
338
3.0625
3
[]
no_license
<?php namespace Bike\Brands; use Bike\Bike; use Bike\Interfaces\BikeInterface; class Trek extends Bike implements BikeInterface { public function name(): string { return 'Trek'; } public function speedCount() : int { return 16; } public function color() { ret...
true
64ab9835d6ac9496c304bdebd3567a0fdda69360
PHP
gitter-badger/framework-23
/src/Framework/Router/Matchers/Regex.php
UTF-8
570
2.9375
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Onion\Framework\Router\Matchers; use Onion\Framework\Router\Interfaces\MatcherInterface; /** * Class Regex * * @package Onion\Framework\Router\Matchers */ class Regex implements MatcherInterface { /** * @param string $pattern * @param string $uri * @retu...
true
ca0b1f91e24e9f9a7fc4663b4b8a5105b72021c8
PHP
johnrich85/shrek-api-client
/src/Cobwebinfo/ShrekApiClient/DefaultApiConnector.php
UTF-8
1,523
2.6875
3
[]
no_license
<?php namespace Cobwebinfo\ShrekApiClient; use Cobwebinfo\ShrekApiClient\Auth\ClientCredentialsParameters; use Cobwebinfo\ShrekApiClient\Support\HttpRequester; use GuzzleHttp\ClientInterface; use \League\OAuth2\Client\Provider\GenericProvider; use League\OAuth2\Client\Token\AccessToken; /** * Class DefaultApiConnect...
true
d3454faf299acdf39e94e32defee3aa36262a315
PHP
firestark/todo
/client/app/kernel.php
UTF-8
1,192
2.59375
3
[ "MIT" ]
permissive
<?php namespace firestark; use http\dispatcher; use http\request; class kernel { private $app = null; function __construct ( app $app ) { $this->app = $app; } function handle ( request $request ) : \http\response { if ( ! $this->allows ( $request ) ) return $thi...
true
f99652c1ff792b2ef49bb0668efd7b45056ce152
PHP
uugvtl/daierxi-php
/src/App/Interfaces/Entities/IChangeStatusable.php
UTF-8
2,249
2.625
3
[]
no_license
<?php namespace App\Interfaces\Entities; /** * Created by PhpStorm. * User: leon * Date: 6/1/18 * Time: 03:33 * * Interface IChangeStatusable * @package App\Interfaces\Entities */ interface IChangeStatusable { /** * 设置状态为:已取消 * @return static */ function changeCancelStatus(); /** ...
true
f5a16876dbcd9392b255dcad10c481b47f2435bb
PHP
alexdiasgonsales/organizador
/sistema/model/mysql/ParecerTrabalhoMySqlDAO.class.php
UTF-8
7,444
2.765625
3
[]
no_license
<?php /** * Classe de operação da tabela 'parecer_trabalho'. Banco de Dados Mysql. * Estas classes não contemplam meu projeto final, por estarem obsoletas, estou contruindo * novos templates em Persistent Data Object com definição de prepared statements contra * sql injection, utilize para meio de testes, nu...
true
afcbf208ef3789016849c1b098d45b061a088b93
PHP
Morgonus/docker-api-php-client
/generated/Model/NetworksIdConnectPostBody.php
UTF-8
1,360
2.796875
3
[ "MIT" ]
permissive
<?php namespace Docker\API\Model; class NetworksIdConnectPostBody { /** * The ID or name of the container to connect to the network. * * @var string|null */ protected $container; /** * Configuration for a network endpoint. * * @var EndpointSettings|null */ prote...
true
b371a84c1382fcb8592c5882e52e9312ff36a558
PHP
chihab-a/unsplash-sdk-php
/src/Api/Resources/User.php
UTF-8
431
2.578125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php namespace Chihab\UnsplashSdk\Api\Resources; use Chihab\UnsplashSdk\Api\Unsplash; use GuzzleHttp\Exception\GuzzleException; use stdClass; class User extends Unsplash { /** * Get the current authenticated user object. * * @return StdClass * @throws GuzzleException */ public func...
true
662953439b3a0f2ccc171b5c66c312428fd7b13a
PHP
sean91319/lab_web
/sh/change_json.php
UTF-8
1,268
2.75
3
[]
no_license
<?php $id = $_GET["id"]; $scriptFile = $_GET["file"]; $username = $_COOKIE["username"]; header("Location: text_display.php?id=$id"); echo $id; echo "<br>"; echo $file; echo "<br>"; $total_steps = 0; $step_num=0; $sname_num=0; $step_name = array(); //用來存每步驟的名字 $step = array(); //用來存每步驟的script forea...
true
e1e9acda99388e9852a4161bd9590b5f72b9c8f6
PHP
Messalf/Parcours-PHP
/variable.php
UTF-8
1,495
3.609375
4
[]
no_license
<?php /* nom de variable Toute les variables se déclarent en commençant par un "$" par exemple : $nom = "le nom"; ( TOUJOURS FINIR AVEC LE ";" SINON KAPUT) Variable arithmétique (nombre) $chiffre = 450; $moyenne = ($chiffre1 + $chiffre2)/2; concaténation echo $nom . " " . $prenom; (le...
true
3e8edc5bcafd938576f5659ea79fb0751b7d3502
PHP
DavidCao626/server
/app/EofficeApp/PhotoAlbum/Entities/PhotoAlbumPictureCommentEntity.php
UTF-8
591
2.53125
3
[]
no_license
<?php namespace App\EofficeApp\PhotoAlbum\Entities; use App\EofficeApp\Base\BaseEntity; class PhotoAlbumPictureCommentEntity extends BaseEntity { /** @var string 相册评论表 */ protected $table = 'photo_album_picture_comment'; /** @var string 主键 */ public $primaryKey = 'comment_id'; /** * 评论人和用户一对一 * ...
true
7f0e2b923c2ad58e475ac1cfb09a0272a231887c
PHP
GeminiCross/films
/films/modules/Controller.php
UTF-8
3,812
2.765625
3
[]
no_license
<?php namespace Films\Modules; class Controller { public $query; public $page; public $uri; public $post; public $get; public $files; public function __construct($query = null) { $this->query = $query; if (static::isPost()) $this->post = (object)$_POST; ...
true
fd30281dbff5d89ce955e1e3323b8c8649490ef9
PHP
zambrut32/RestAPiBlog
/app/Transformers/PostTransformer.php
UTF-8
920
2.5625
3
[ "MIT" ]
permissive
<?php namespace App\Transformers; use App\Post; use League\Fractal\TransformerAbstract; class PostTransformer extends TransformerAbstract { protected $availableIncludes = [ 'user', 'ratings','comments', ]; public function transform(Post $post) { return [ 'id' => $post->id...
true
62d7042c17b3aa16be62d1c099689367536e5a40
PHP
ameganvi/immobilier
/models/userModel.php
UTF-8
985
2.953125
3
[]
no_license
<?php /* Ce model gère toutes les connexions à la base de données liées à l'utilisateur de l'agence immobilière */ include_once('connexionBdModel.php'); //Connecte un utilisateur à partir des ses données de connexion fournies function seConnecter($donneesUser){ $peutSeConnecter = false ; $dbh = getConnexion();...
true
79365488bdd30d7bd606872ee191762ac110213b
PHP
digitalgrease/PHP-Library
/Library/Files/LocalFileSystem.php
UTF-8
5,702
2.984375
3
[]
no_license
<?php /* * Copyright (c) 2015 Digital Grease Limited. */ namespace DigitalGrease\Library\Files; require_once 'FileSystemInterface.php'; use DigitalGrease\Library\Files\FileSystemInterface; /** * Provides methods to work with the local file system. * * @author Tom Gray */ class LocalFileSystem implements Fil...
true
7f1b2a5edd336a870831b211ad86d95204755b57
PHP
mpapec/simple-cache
/example_clite6.php
UTF-8
610
2.953125
3
[]
no_license
<?php /* >>> With method : */ require_once('Cache/Lite/Function.php'); $options = array( 'cacheDir' => '/tmp/', 'lifeTime' => 10 ); $cache = new Cache_Lite_Function($options); $obj = new bench(); $obj->test = 666; $cache->call('obj->method_to_bench', 12, 45); class bench { var $test; function met...
true
956d69f6430184a61cf369f2593167275081a2d8
PHP
Vamosz/UNIDEB_2019_1_1_A-Csoda-Csapat
/BackEnd/api/recipe/read_all.php
UTF-8
1,522
2.625
3
[ "Apache-2.0" ]
permissive
<?php header("Access-Control-Allow-Origin: *"); header("Content-Type: application/json; charset=UTF-8"); include_once '../config/database.php'; include_once '../objects/Recipe.php'; $database = new Database(); $db = $database->getConnection(); $recipe = new Recipe(); $recipe->connect($db); $stmt = $rec...
true
f6838f4e67e575288b1387ff16e6f95b58828ae2
PHP
avivharuzi/design-patterns
/structural-patterns/proxy/php/conceptual/index.php
UTF-8
2,834
3.203125
3
[ "MIT" ]
permissive
<?php /** * Proxy Design Pattern * * Intent: Provide a surrogate or placeholder for another object to control * access to the original object or to add other responsibilities. */ /** * The Subject interface declares common operations for both RealSubject and the * Proxy. As long as the client works with RealSu...
true
46491d937908c41d341d13b0be1c4b1c0ce7c793
PHP
remdan/openweathermap
/src/Factory/ForecastFactory.php
UTF-8
1,294
2.78125
3
[ "MIT" ]
permissive
<?php namespace Remdan\Openweathermap\Factory; use Remdan\Openweathermap\Factory\AbstractFactory; use Remdan\Openweathermap\Factory\FactoryInterface; use Remdan\Openweathermap\Model\Coord; use Remdan\Openweathermap\Model\CurrentWeather; use Remdan\Openweathermap\Model\Forecast; final class ForecastFactory extends Ab...
true
7f1937bcd929af3244d0aa001745f2a6c754fdec
PHP
ELIXIR-CZ/MolMeDB
/application/helpers/Identifiers.php
UTF-8
780
3.28125
3
[]
no_license
<?php class Identifiers { CONST PREFIX = 'MM'; CONST min_len = 7; /** * Generates new identifier * * @param int $id * * @return string */ public static function generate_substance_identifier($id = NULL) { if(!$id) { $id = Db::getLastIdSubstance() + 1; } // Get string value $id = st...
true
2d65e8c241ed363a9e3846ae55322d641af02a72
PHP
Marcelo-Augusto/web
/view/cadastro/navbar_elements/Icon.php
UTF-8
208
2.5625
3
[]
no_license
<?php class Icon{ public function getIcon($src){ return '<a class="navbar-brand"> <img src="'.$src.'" class="float-right" width="7%" alt="Cardig"> </a>'; } } ?>
true
2d1c6d2734cc1bfc4da2cd2c28d1983d504e956e
PHP
hodaa/Product-Cart
/app/Strategies/DiscountPlans/BuyOneGetOne.php
UTF-8
448
2.78125
3
[]
no_license
<?php namespace App\Strategies\DiscountPlans; use App\Models\Product; class BuyOneGetOne extends AbstractDiscountPlan { /** * @param Product $item * @param array $selectedProducts * @return float */ public function calculateDiscount(Product $item, array $selectedProducts): float { ...
true
ddc67fecf47ab81006be8c8bf697aba60e8b53d0
PHP
servdhost/craft-remote-assets
/src/RevisionableResourceBehaviour.php
UTF-8
1,043
2.5625
3
[ "MIT" ]
permissive
<?php /** * Craft Remote Assets plugin for Craft CMS 3.x * * Move CP assets to an external filesystem such as S3 * * @link https://twitter.com/servdhosting * @copyright Copyright (c) 2018 Matt Gray */ namespace servd\craftremoteassets; use yii\base\Behavior; use Craft; class RevisionableResourceBehavior ...
true
db5d4db643359038f035c2d632be997ba514ac94
PHP
smytsyk/freque
/src/Utils/GitFileHistoryLoader.php
UTF-8
1,675
2.859375
3
[ "MIT" ]
permissive
<?php /* * This file is part of smytsyk-dev/freque. * * (c) Stas Mytsyk <denielm10@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Freque\Utils; class GitFileHistoryLoader implements FileHistoryLoader { ...
true
814c26f28e605adccd300d3e974b529f76cea978
PHP
Petar1992/opremazatompuse
/classes/Database.php
UTF-8
384
2.625
3
[]
no_license
<?php class Database { private static $conn = null; public static function getInstance(){ if(!isset(self::$conn)){ try{ self::$conn = new PDO("mysql:host=".DB_HOST.";dbname=".DB_NAME.";charset=utf8",DB_USER,DB_PASS); } catch(PDOException $e){ $err = $e->getMessage(); ec...
true
eee4d52ab314ff51bd3ac73a1705d862e69c2598
PHP
tampabaylaravel/send-sms
/app/Notifications/WingsEaten.php
UTF-8
900
2.515625
3
[]
no_license
<?php namespace App\Notifications; use Illuminate\Bus\Queueable; use App\Channels\TwilioChannel; use Illuminate\Notifications\Notification; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; class WingsEaten extends Notification { use Queueable; /** * Create ...
true
fd2dc55cf092cc71b17db1b213487cbe765d680a
PHP
mehulsbhatt/openvz--panel
/max.php
UTF-8
794
2.546875
3
[]
no_license
<?php mysql_connect("localhost","",""); // votre user et votre mot de passe mysql_select_db(""); // Votre base de donnée try { $soap = new SoapClient("https://www.ovh.com/soapi/soapi-re-1.8.wsdl"); // OVH API //login $session = $soap->login("-OVH", "","fr", false); // votre nikeendle, votre mot de p...
true
e15f442a8a90543a44fcd3fcaf1fad8228d6451d
PHP
Lvzbel/photobooth-tracker
/app/User.php
UTF-8
2,313
2.71875
3
[]
no_license
<?php namespace App; use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use Laratrust\Traits\LaratrustUserTrait; class User extends Authenticatable { use LaratrustUserTrait; use Notifiable; /** * The attrib...
true
62f6fc3987679fcf619312bf3d77abb9f8a689a4
PHP
ikhsan0x/Chaingateway_php_api
/GetTokenBalance.php
UTF-8
1,088
2.84375
3
[]
no_license
<?php # ----- REPLACE THE VARIABLES BELOW WITH YOUR DATA ----- $apikey = "YOURAPIKEY"; $binancecoinaddress = "BINANCECOINADDRESS"; // Binancecoin address you want to get the balance of $contractaddress = "CONTRACTADDRESS"; // Smart contract address of the Token # ------------------------------------------------------- ...
true
2dbbd0ea0e252bb0221c17283571d20ff6a9cb7e
PHP
enlacee/clubsuscriptores
/src/application/models/Modulo.php
UTF-8
856
2.578125
3
[]
no_license
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * Description of Gestor * * @author Computer */ class Application_Model_Modulo extends App_Db_Table_Abstract { protected $_name = 'modulo'; public static function getModulos() ...
true
dcd7767b46309f06719bd36334e0b3f13f7fc283
PHP
cman81/rps-game
/server/bin/game-server.php
UTF-8
587
2.515625
3
[ "MIT" ]
permissive
<?php /** * Executable that instantiates the game server * * @see http://socketo.me/docs/hello-world#nextsteps */ use Ratchet\Server\IoServer; use Ratchet\Http\HttpServer; use Ratchet\WebSocket\WsServer; use GameServer\GameRoom; require dirname(__DIR__) . '/vendor/autoload.php'; $server = IoServer::factory( n...
true
1fe4451b0b0233f756a3bae4a979914e88ed8c97
PHP
karayabin/universe-snapshot
/universe/Ling/HtmlTemplate/HtmlTemplate.php
UTF-8
3,600
2.984375
3
[]
no_license
<?php namespace Ling\HtmlTemplate; /* * LingTalfi 2016-02-29 */ use Ling\DirScanner\YorgDirScannerTool; use Ling\HtmlTemplate\Exception\HtmlTemplateException; class HtmlTemplate { // should be /path/to/app/www/templates public static $templateDir = '/tmp'; public static $templateExtension = 'htpl'; ...
true
8a851dbbc309b79f5f00c47ef6aa7232d72d92c0
PHP
amsify42/phpattern
/src/File.php
UTF-8
971
3.25
3
[]
no_license
<?php namespace PHPattern; class File { protected $filePath; function __construct($filePath) { $this->filePath = $filePath; } public function isFile() { return is_file($this->filePath); } public function createdTime() { return filectime($this->filePath); } public function updatedTime() { retur...
true
da24f23bfa28eb49fc9d023fb53f260a094080a6
PHP
glayyiyi/heshuo
/core/input.inc.php
GB18030
3,694
2.703125
3
[]
no_license
<?php //ı function input_text($name="",$default="",$choise=""){ $onclick = ""; if ($choise!="") $onclick = '<input type="button" id="c_'.$name.'" value="ѡ" onclick="choise(\''.$name.'\',\''.$choise.'\');">'; return '<input type="text" name="'.$name.'" id="'.$name.'" size=20 value="'.$default.'">' .$onclick;...
true
ed9c0d1b8927b3f559b8dca868daa73072352650
PHP
vaidotasposkus/HTask
/test/StandardItemGildedRoseTest.php
UTF-8
1,020
2.8125
3
[]
no_license
<?php namespace GildedRoseTest; class StandardItemGildedRoseTest extends GildedRoseTestBase { private $itemName = '+5 Dexterity Vest'; public function testUpdateStandardBeforeSellBy() { $item = $this->getItem($this->itemName, 1, 10); $this->assertEquals(0, $item->sell_in); $this-...
true
246ced3acfae045759464ad12333740c201c7a58
PHP
NickGlenn/m
/File/GenericFile.php
UTF-8
4,546
3.390625
3
[ "MIT" ]
permissive
<?php namespace m\File; /** * A generic object representation of a file. * * @package m\File */ class GenericFile implements FileInterface { /** * @var string The file contents */ protected $_contents = ''; /** * @var array File path information */ protected $_path; /*...
true
b64e9eded556b17c2f6df923363f4ae6cf510672
PHP
johnnyqdp/pbl1-concorrencia
/PC4_Sensores/scriptTermometroAleatorio.php
UTF-8
641
2.828125
3
[]
no_license
<?php while(true){ /** * A cada 5000 milissegundos, gera um valor aleatorio de 0 a 100 e envia ao Broker, informando que quer * postar esse valor no tópico termometro */ $valorTemperaturaRegistrada = rand(20,40); $curl = curl_init('http://172.16.103.6:2000'); ...
true
e5b38055ef4cc1703bb2b143828fdf9ebbf27084
PHP
judsonc/gpweb
/gpweb/lib/PEAR/Date.php
UTF-8
35,782
2.875
3
[]
no_license
<?php // // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // +----------------------------------------------------------------------+ /...
true
990988467b24802db03c90d2390cde71fd08e4a3
PHP
slepp/filebin.ca
/htdocs/filebin.inc.php
UTF-8
8,495
2.6875
3
[]
no_license
<?php /* This file is part of the Filebin package. Copyright (c) 2003-2009, Stephen Olesen All rights reserved. More information is available at http://filebin.ca/ */ # General configuration # Database information define(DB_DSN, "pgsql:dbname=filebin"); define(DB_USER, "filebin"); define(DB_PASS, "filebin"); ...
true
1d8996e8ef309dd24c44aea623e6c0170fd2f206
PHP
leblanchannah/OMTS
/theatre_table_admin.php
UTF-8
931
2.671875
3
[]
no_license
<?php // add table for theatre and theatre complexes for admin $errorMessage = "error"; $dbh = new PDO('mysql:host=localhost;dbname=db_omts', "root", ""); if (isset($_POST["tcomplex5"]) && !empty($_POST["tcomplex5"])) { // check that customer exists try { $dbh = new PDO('mysql:host=localhost;dbname=db_omts'...
true
bae03fa905ea7e6ad8edd4d8ca57f2f09b19fe0c
PHP
rocknatt/safe-drone-delivery.com
/app/Models/ProspectModel.php
UTF-8
4,971
2.609375
3
[ "MIT" ]
permissive
<?php namespace App\Models; use CodeIgniter\Model; class ProspectModel extends Model { protected $table = 'prospect'; protected $primaryKey = 'id'; protected $returnType = 'array'; protected $allowedFields = array( 'user_id', 'user_client_id', 'title', 'description', 'interlocu...
true
d60073958c3175da2ea753d55a607763efcc979c
PHP
maciejkosiarski/symfony-app
/src/Exception/PhoneNumberException.php
UTF-8
251
2.890625
3
[]
no_license
<?php declare(strict_types=1); namespace App\Exception; class PhoneNumberException extends \Exception { public function __construct(int $phone) { parent::__construct(sprintf('User provide invalid phone number: %s', $phone)); } }
true
143bbea958c8aa17ccbea967883bdac40237436b
PHP
BonyGeorge/Move-Miu
/MoveRecruitment/php/controller/add_user_type.php
UTF-8
512
2.53125
3
[]
no_license
<?php require_once '../model/user_type.php'; $u1 = new user_type(); $type_name = $_POST['typename']; $selected = $_POST['optgroup']; if (empty($type_name)) { echo "Please fill all fields!"; } else if (preg_match('/[0-9]/', $type_name)) { echo "Type name should not contain any numeric value!"; } else { ...
true
521735656ebc558a7660ee10da31faeb9c6622cd
PHP
skachok90/example
/application/models/Admin/AuthAdapter.php
UTF-8
2,358
2.671875
3
[]
no_license
<?php class Admin_AuthAdapter extends Zend_Auth_Adapter_DbTable { const COOKIE_ADMIN = 'admin'; const COOKIE_PASSWD = 'hash'; const COOKIE_EXPIRE = 2592000; // 30 days const COOKIE_PATH = '/'; public function __construct() { $db = Zend_Registry::get('db'); parent::__construct($db); $this->setTa...
true
3f2edaf5f3904d7b8f630e4af7c6181008602f60
PHP
DevLucasOliveira/dela-rifa
/model/Raffle.php
UTF-8
10,596
2.546875
3
[]
no_license
<?php use database\Database; class Raffle { public $cart = array(); public $data = array(); private $raffle = array(); public function home() { } public function store() { $raffles = new Database(); $this->raffle = $raffles->makeQuery('SELECT * FROM raffles where raf...
true
a9130a702b47bc0c6c1b9c10449952c38a0bcaad
PHP
javierkos/Harambebo
/controllers/dbController.php
UTF-8
906
3.03125
3
[]
no_license
<?php class DBController{ public $link; private static $user=''; private static $password=''; private static $db=''; private static $host=''; public function connect(){ foreach ($_SERVER as $key => $value) { if (strpos($key, "MYSQLCONNSTR_localdb") !== 0) { continue; } ...
true
138bad8a32b476e3f1c09216c463c4f50d88e466
PHP
rickselby/acsr-server
/app/Console/Commands/UserNamesCommand.php
UTF-8
604
2.609375
3
[]
no_license
<?php namespace App\Console\Commands; use App\Services\UserService; use Illuminate\Console\Command; class UserNamesCommand extends Command { /** * The console command name. * * @var string */ protected $signature = 'users:names'; /** * The console command description. * ...
true
d83843a738798da12f941eef3960f7a15a77eec4
PHP
luoxianjie/php-learn
/collect/SecondKill/mini/App.php
UTF-8
2,724
2.65625
3
[]
no_license
<?php error_reporting(E_ERROR | E_WARNING | E_PARSE); define("__ROOT__",dirname(__DIR__)); session_start(); date_default_timezone_set('Asia/shanghai'); class App { /** * 启动app */ public static function start() { // 设置错误处理方法 set_error_handler([self::class,'displayErro...
true
8fe57c51e2ac152cec386e4f81171e3264399b90
PHP
AlanFx8/MySQLMon
/assets/scripts/autoloader.php
UTF-8
1,098
2.71875
3
[]
no_license
<?php //A modified version of the autoloader made by Joe Sexton <joe.sexton@bigideas.com> at: //https://www.webtipblog.com/using-spl_autoload_register-load-classes-php-project/ spl_autoload_register('autoload'); function autoload($class, $dir = null) { //We only want the class name, not the nam...
true
eda3415bb994d243d0fe422aed2fe49a2907b498
PHP
AmrYami/design-patterns__data-structure-algorisms
/creational/factory_method/factories/RotoFactory.php
UTF-8
278
2.71875
3
[]
no_license
<?php namespace BrandFactory; use BrandClasses\RotoBrand; use BrandInterfaces\BrandFactoryInterface; class RotoFactory implements BrandFactoryInterface { public function createBrand() { $result = new RotoBrand(); return $result->createBrand(); } }
true
8344ba7df3b3459fef4640c01cd93f383da731a7
PHP
soliddev66/laravel-vue-optimiser
/app/Helpers/GeminiClient.php
UTF-8
1,257
2.609375
3
[ "MIT" ]
permissive
<?php namespace App\Helpers; use Token; use Exception; use GuzzleHttp\Client; class GeminiClient { private $user_info; public function __construct($user_info) { $this->user_info = $user_info; } public function call($method, $endpoint, $body = null) { $client = new Client(); ...
true
9f3f3dfc603aab48a51a7951b08a7279ef5f9da3
PHP
connectthefuture/psdmrepo
/DataPortal/tags/V00-04-11/web/lib/dataportal/exptimemon.class.php
UTF-8
36,537
2.65625
3
[]
no_license
<?php namespace DataPortal; require_once 'authdb/authdb.inc.php' ; require_once 'dataportal/dataportal.inc.php' ; require_once 'filemgr/filemgr.inc.php' ; require_once 'logbook/logbook.inc.php' ; require_once 'lusitime/lusitime.inc.php' ; use AuthDB\AuthDB; use FileMgr\DbConnection; use LogBook\LogBook; use LusiT...
true
2a34c1926c839d5d42318e2f6fb7035bf0fa9c3c
PHP
fizikurniawan/modules-role-management
/Modules/Role/Http/Controllers/RoleController.php
UTF-8
2,175
2.53125
3
[ "MIT" ]
permissive
<?php namespace Modules\Role\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Routing\Controller; use Modules\Role\Entities\Role; use Modules\Role\Entities\RolePermission; class RoleController extends Controller { /** * Display a listing of the resource. * @re...
true
580f93e0aecf8c52bbb00525291c9edaab0b5fb6
PHP
ZsarkZ/bazabeta
/database/migrations/2017_09_07_135627_create_tournament_members_table.php
UTF-8
1,075
2.5625
3
[ "MIT" ]
permissive
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateTournamentMembersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('tourn...
true
63af0b76a4f47cc08e6037ebd263a742d0201b17
PHP
Troublesome12/IntelSearchEngin
/models/HistoryModel.php
UTF-8
1,006
3.15625
3
[]
no_license
<?php class HistoryModel{ function insertWord($word){ include 'Credentials.php'; //Open Connection and select database $con = mysqli_connect($host, $user, $passwd, $database) or die(mysqli_connect_error()); $query = "INSERT INTO history VALUES ('$word')"; $result = mys...
true
2854ed5cea2b8673d3807e7533e4176838b8ff65
PHP
zgia/tinycrm-api
/app/Controller/FileController.php
UTF-8
2,347
2.578125
3
[]
no_license
<?php declare(strict_types=1); namespace App\Controller; use App\Exception\BusinessException; use App\Service\FileService; use App\Service\MemberService; use Hyperf\Di\Annotation\Inject; use Psr\Http\Message\ResponseInterface as PsrResponseInterface; /** * Class FileController */ class FileController extends Abst...
true
b012b92e052ba80bf6babcfdbadaa4f82362f7ce
PHP
marten-cz/secure-password-php
/tests/StrengthTest.php
UTF-8
5,202
2.84375
3
[]
no_license
<?php namespace Pagewiser\Security\Password\Tests; use Pagewiser\Security\Password\Strength; /** * Password strength test * * @group security */ class StrengthTest extends \PHPUnit_Framework_TestCase { private $noRules = [ 'upperCase' => FALSE, 'lowerCase' => FALSE, 'number' => FALSE, 'specialSymbol' =...
true
f294b40500030881c79262a5c02ade8b2fedb92f
PHP
abhishekmodi6020/Pacific-Trails
/application/views/modi_pacifictrails/reservations.php
UTF-8
9,982
2.640625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php // $dbhost ="localhost"; // $dbuser= "root"; // $dbpass= ""; // $dbname= "pacific"; // $connection = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname); // if(mysqli_connect_error()){ // die("Database connection failed".mysqli_connect_error()); // } ?> <?php // $fnameerror=""; // $lnameer...
true
861e7c6e85364badd5b56081b75e91bfa3bed14a
PHP
honokah/microposts
/pppractice/answer.php
UTF-8
452
3.0625
3
[]
no_license
<?php $question = $_POST['question']; $answer = $_POST['answer']; if($question == $answer){    $result = "わあい当たり!";    }else{ $result = "ざんねん"; } return $result; ?> <!doctype html> <html lang="ja"> <head> <meta charset="utf-8"> <title>Douki クイズ - 答え合わせ</title> </head> <body> <?php include('./i...
true
c8905f40993c0860b0915f6ca296e831ce86075d
PHP
Soletic/OxygenFrameworkBundle
/Templating/LayoutTwigExtension.php
UTF-8
1,880
2.8125
3
[]
no_license
<?php namespace Oxygen\FrameworkBundle\Templating; use Symfony\Component\DependencyInjection\Container; /** * Extension twig to build template extensible * * @author lolozere * */ class LayoutTwigExtension extends \Twig_Extension { /** * * @var Container */ protected $container; /** * Construct...
true
e8603686e52131c91e2b6c9c3fab9fd719d1cef0
PHP
dasdo/url-shortener
/app/Http/Controllers/UrlsController.php
UTF-8
1,909
2.71875
3
[]
no_license
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Urls; use Response; class UrlsController extends Controller { /** * Get all url * @router GET /api/urls * @return array */ public function index() { return Urls::all(); } /** * Get best 1...
true
e9a1ef4e6d8611ab889b78d435537a64a932f4ea
PHP
wojtekszydlowski/Pomocnik
/PHP_Komendy/28_Przestrzenie_nazw_Namespaces.php
UTF-8
3,644
2.828125
3
[]
no_license
<?php /* Czym są przestrzenie nazw? -Przestrzenie nazw pozwalają na tworzenie bardziej przejrzystego i głównie zhermetyzowanego kodu. -Pomagają przy pracy z dużymi projektami gdzie mogą wystąpić dwie lub więcej klas o tej samej nazwie. Definiowanie przestrzeni nazw: -Aby zdefiniować przestrzeń nazw należy umieścić jak...
true
f9b80dcd7ae769c3f488e652b0dd833a1bd43f05
PHP
sagas1416/hhvm
/hphp/test/slow/redeclared_classes/1487.php
UTF-8
450
2.625
3
[ "Zend-2.0", "MIT", "PHP-3.01" ]
permissive
<?php if (!isset($h)) { if (isset($g)) { interface A { function foo(); } } else { interface A { function foo(); } } } else { if (isset($g)) { interface X { function foo(); } } else { interface X { function foo(); } } } abstract class B implements A { function bar() { } } var_du...
true
acc6175de0296d0f6dbdd3e82fa4e48d750255c7
PHP
yfix/yf
/plugins/common/classes/common/yf_upload_image.class.php
UTF-8
5,294
2.65625
3
[]
no_license
<?php /** * Upload image handler. * * @author YFix Team <yfix.dev@gmail.com> * @version 1.0 */ class yf_upload_image { /** @var array */ public $ALLOWED_MIME_TYPES = [ 'image/jpeg' => 'jpeg', 'image/pjpeg' => 'jpeg', 'image/png' => 'png', 'image/gif' => 'gif', ]; ...
true
018ef97ae155e2ca02de11073bf244d0aeb48049
PHP
kckil/appfuel
/package/Appfuel/Kernel/Route/RouteViewSpec.php
UTF-8
2,906
3.015625
3
[ "Apache-2.0" ]
permissive
<?php /** * Appfuel * Copyright (c) Robert Scott-Buccleuch <rsb.appfuel@gmail.com> * See LICENSE file at project root for details. */ namespace Appfuel\Kernel\Route; use DomainException; /** * Controls view settings like disabling the view or telling the framework * you will handle the view manually, what the d...
true
77e356cb7163301c91739a2b4562e61a7b13dd47
PHP
michaeljoyner/isomark
/app/Commands/Users/ChangePasswordCommand.php
UTF-8
711
2.9375
3
[]
no_license
<?php namespace App\Commands\Users; use App\Commands\Command; class ChangePasswordCommand extends Command { /** * @var */ private $user_id; /** * @var */ private $newPassword; /** * Create a new command instance. * * @param $user_id * @param $newPassword ...
true