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
0a275454d15e5c3a884b35f6019ee24663ee4c77
PHP
brelian/kepler
/src/Algorithm/Sort/MergeSort.php
UTF-8
1,329
3.25
3
[]
no_license
<?php /** * Created by PhpStorm. * User: syncher * Date: 4/9/19 * Time: 8:18 PM */ namespace App\Algorithm\Sort; class MergeSort { public function sort(array $data) { $len = count($data); if ($len < 2) { return $data; } $this->ordering($data, 0, $len - 1); ...
true
1c23b48b4dcf373b60c60943359edb09a9af2c83
PHP
akondas/php-heap
/src/Heap.php
UTF-8
393
3.078125
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Akondas; interface Heap { /** * @return mixed */ public function peek(); /** * @param mixed $node */ public function push($node): void; /** * @return mixed */ public function pop(); public function size(): int; ...
true
57ccfd386af9e89361e1291e3d20c04952be8846
PHP
vga2378/svlf
/lista.php
UTF-8
1,912
2.53125
3
[]
no_license
<?php session_start(); $conn=mysqli_connect("localhost", $_SESSION["tipo"], $_SESSION["contraseña"], "SalvandoVidas"); $paterno=utf8_decode($_POST["paterno"]); $sql="call busPacBapp('$paterno')"; $result=mysqli_query($conn,$sql); ?> <!DOCTYPE html> <html lang="en"> <head> <title>Ver Paciente</title> <...
true
3cb2832c87caba4c99b92ce58daf994e709c6a79
PHP
joshtronic/php-sortbyfield
/src/Sort.php
UTF-8
428
3.09375
3
[ "MIT" ]
permissive
<?php namespace joshtronic; class Sort { public static function by($field, &$array, $direction = 1) { usort($array, create_function('$a, $b', ' $a = $a["' . $field . '"]; $b = $b["' . $field . '"]; if ($a == $b) { return 0; } ...
true
6322e0e6dd872ec1c7936a2eb4d91efd9c2ddb85
PHP
danielpoe/magento-easydeployworkflow-deployment
/vendor/aoepeople/easy-deploy/Classes/InstallStrategy/StepBasedInstaller.php
UTF-8
1,316
3
3
[]
no_license
<?php /** * Installer Strategie for the PHP Installer. * Used for Webprojects, where the environmentname is appended to the systemPath per convention */ class EasyDeploy_InstallStrategy_StepBasedInstaller implements EasyDeploy_InstallStrategy_Interface { /** * @var array */ protected $installSteps; /** * ...
true
6f3b6e04460f7dccd7614dad292e211fce1ecd99
PHP
gregmag/navplan2
/src/php/Navplan/MeteoGrib2/Grib2Parser/HoursMinutesParser.php
UTF-8
298
2.78125
3
[]
no_license
<?php declare(strict_types=1); namespace Navplan\MeteoGrib2\Grib2Parser; use DateInterval; class HoursMinutesParser { public static function parse( int $hours, int $minutes ): DateInterval { return new DateInterval("PT" . $hours . "H" . $minutes . "M"); } }
true
1669754014a6a023279c3e9e03ad6fadc70ab75a
PHP
ArianeChouette/PISCINE5
/old/connexion.php
UTF-8
1,135
2.5625
3
[]
no_license
<?php // $bdd = new PDO("mysqlhost:localhost; dbname=inscription", "root", ""); // $pseudo =$_POST['mail']; // $verif=$bdd->query("SELECT Pseudo FROM client WHERE Pseudo='$pseudo'"); // $req=$verif; // nom de la base de donnees $database="inscription"; //connexion base de donnees $db_handle = mysqli_conn...
true
5cc548ad6bfacbb2fa99b3774b0caa8b245d6d9e
PHP
cloyne-archives/workshiftdb0
/public_html/admin/reset_user_password.php
UTF-8
1,148
2.546875
3
[]
no_license
<?php //reset password for user so they can set it themselves $require_user = array('workshift','president'); require_once('default.inc.php'); if (!array_key_exists('member_name_reset',$_REQUEST)) { $houselist = get_houselist(); ?> <html><head><title>Reset password</title></head> <body> If a user has forg...
true
a9ffe3349b617f7614ae96dce4e3eb7812414a0a
PHP
ivantxo/socialmovies-api
/src/Posts/Controller/GetAllPosts.php
UTF-8
1,194
2.625
3
[]
no_license
<?php namespace App\Posts\Controller; use Psr\Http\Message\ServerRequestInterface; use App\Core\JsonResponse; use App\Posts\Post; use App\Posts\Storage; use App\Posts\Controller\Output\Post as Output; use App\Posts\Controller\Output\Request; final class GetAllPosts { /** * @var Storage $storage */...
true
76c814e334bc07c64c489f19308e0c2e18fc7dea
PHP
hsiri/kohana-aws
/config/aws.php
UTF-8
1,601
2.515625
3
[]
no_license
<?php defined('SYSPATH') OR die('No direct script access.'); /** * You can share the same configuration file with what the instance is currently using * via environment variables. * * return parse_ini_file($_SERVER['AWS_CONFIG']); * * Remember to set the proper permission to the config file. */ $DEFAULT = array(...
true
a7c9e3a830c3d1c1ae934f9c0eeba3bd720f6f9d
PHP
anish8129/Online_College_Library
/forgot.php
UTF-8
4,214
2.53125
3
[]
no_license
<?php if(isset($_POST['email'])) { $email=$_POST['email']; $con=mysqli_connect('localhost','root'); mysqli_select_db($con,'prjct'); $q=mysqli_query($con,"select *from registred where Email='$email'"); if(mysqli_num_rows($q)===0) echo "<h3>Invalid Email id</h3>"; else { $data=mysqli_fetch_array($q); $usern...
true
0580aad0bae43eec69e0def91105f7649023368f
PHP
SurangaPG/heavyd-seeder
/etc/drupal8/bootstrap-files/tests/behat/features/bootstrap/Traits/AbstractBaseTrait.php
UTF-8
490
2.5625
3
[]
no_license
<?php namespace DrupalProject\Behat\Traits; /** * Class AbstractBaseTrait * * Contains helpers to check or all the items contains the exact amount of * pieces of text. */ trait AbstractBaseTrait { /** * Spoof this method to allow for cleaner code autocomplete. * * @param string|null $name * The ...
true
8b3c61edda52316f960203946f1f43c60a162d2d
PHP
jeromedeporres/PHPP7
/PHPP7E1/user.php
UTF-8
1,107
3.234375
3
[]
no_license
<?php $regexName = '^[\p{L}]{1}[\' \-\p{L}]+$^'; if(!empty($_GET['lastname'])) { if(preg_match($regexName, $_GET['lastname'])) { $lastname = 'Votre nom de famille est ' . $_GET['lastname']; }else { $lastnameError = 'Veuillez renseigner un nom de famille valide'; }...
true
c195fc7cf6f414f6087972ed780fecf334be7031
PHP
Zutatensuppe/Symplify
/packages/MonorepoBuilder/src/Package/PackageComposerJsonMerger.php
UTF-8
1,250
2.6875
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Symplify\MonorepoBuilder\Package; use Nette\Utils\Json; use Symfony\Component\Finder\SplFileInfo; use Symplify\PackageBuilder\Yaml\ParametersMerger; final class PackageComposerJsonMerger { /** * @var ParametersMerger */ private $parametersMerger; public...
true
03d278f3faf9a896b9ec25d06405faab66abe2e1
PHP
hellonearthis/ascii2web
/function.php
UTF-8
279
3.453125
3
[]
no_license
<?php function byte2bin($input) // convert BYTE into an 8 binary repesentation (character) { $bb= decbin(ord($input)); // make the byte into binary $bb= str_repeat('0',(8-strlen($bb))).$bb; // make it 8 bits long as decbinstrips high bits return $bb; } ?>
true
98379748aaa3d996b4990d929ce4156a61de07ae
PHP
Bullex/Vocabulary-Test-Yii2-Angular-
/frontend/models/Dictionary.php
UTF-8
2,894
2.703125
3
[ "BSD-3-Clause" ]
permissive
<?php namespace frontend\models; use Yii; use yii\db\ActiveRecord; class Dictionary extends ActiveRecord { /** * @return array */ public static function next($testId) { $result = []; $sql = 'SELECT d.id, d.en_id, en_w.word AS en, d.ru_id, ru_w.word AS ru FROM dictionary AS d ...
true
3eb3d87842fb98c6521bd716972ae0b22a63bdcd
PHP
moneyphp/money
/src/Exception/InvalidArgumentException.php
UTF-8
555
2.75
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php declare(strict_types=1); namespace Money\Exception; use InvalidArgumentException as CoreInvalidArgumentException; use Money\Exception; final class InvalidArgumentException extends CoreInvalidArgumentException implements Exception { /** @psalm-pure */ public static function divisionByZero(): self {...
true
dc14412183cf8799eff0fb5386ff3b6b0a035550
PHP
anhcuongtv/giadinhphoto
/classes/core/class.contestaward.php
UTF-8
4,223
2.875
3
[]
no_license
<?php Class Core_ContestAward extends Core_Object { public $id = 0; public $name = ''; public $order = 0; public $section = ''; public $isactive = 0; public $datecreated = 0; public function __construct($id = 0) { parent::__construct($id); if($id > 0) { $this->getData($id); }...
true
904daa47ff72b91a00a78f98ce1937b2a13f8c0b
PHP
latheesan-k/servicer
/src/Commands/DaemonCommand.php
UTF-8
1,497
2.890625
3
[ "MIT" ]
permissive
<?php namespace MVF\Servicer\Commands; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class DaemonCommand extends Command { const QUEUE = 'queue'; priv...
true
8edb5e80e0d5b9f29e305246279f286b7ab2e4d5
PHP
sushidev-team/laravel-print-api
/src/Classes/PdfPrinterResult.php
UTF-8
893
2.828125
3
[ "MIT" ]
permissive
<?php namespace AMBERSIVE\PdfPrinter\Classes; use GuzzleHttp\Psr7\Response; class PdfPrinterResult { public int $statusCode = 0; public ?String $requestUrl; public ?String $downloadUrl; public bool $uploaded = false; public ?String $filename; public function __construct(Response $re...
true
33f1289fcc35d50c1eacda3ad85bd6bfb1620ccf
PHP
Aldi2525/Php-dasar-github
/latihan5.php
UTF-8
627
3.28125
3
[]
no_license
<?php echo "1. Contoh Program Array numeric"; echo "<br>"; $jurusan = array('Teknik Informatika', 'Sistem Informasi', 'Teknik Komputer', 'Manajemen Informatika'); $jum_array = count($jurusan); for ($i = 0; $i < $jum_array; ++$i) { echo "Jurusan " . $jurusan[$i]."- ada di index $i"; echo '<br>'; } echo "<br>"; ...
true
3e81d7855fa49beeb2528acaf7d11d260994faf7
PHP
EwanGrave/confineat
/model/DeliveryHandler.php
UTF-8
3,065
2.96875
3
[]
no_license
<?php declare(strict_types=1); require_once("autoload.php"); /** * Classe DeliveryHandler permettant la gestion des données pour le livreur. * * @startuml * * skinparam defaultFontSize 16 * skinparam BackgroundColor transparent * * class DeliveryHandler { * + processRequest(array $args, string $acti...
true
39238c6f4ad076041ea121a5cc5bfd3c023a0c8c
PHP
MarcoROG/Courses
/app/Result.php
UTF-8
1,095
2.59375
3
[]
no_license
<?php namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\SoftDeletes; final class Result extends Model { use SoftDeletes; const TABLE = 'results'; protected $table = self::TABLE; protected $fillabl...
true
61b42ab423a4be37a93fc198c78aa583e49195a6
PHP
thiagocordeiro/symfony-skeleton
/app/tests/Unit/User/UserDeletionServiceTest.php
UTF-8
1,235
2.53125
3
[]
no_license
<?php declare(strict_types=1); namespace App\Tests\Unit\User; use App\Domain\User\Exception\UserNotFoundException; use App\Domain\User\User; use App\Domain\User\UserDeleter; use App\Domain\User\UserDeletionService; use App\Domain\User\Values\Email; use App\Tests\Fixtures\Double\Infra\User\FakeUserRepository; use PHPU...
true
786d489ac0c1fb6f7e8aa9fbca709f978b475d6f
PHP
renatinhah/desafioMilhas
/questao1.php
UTF-8
1,878
2.8125
3
[]
no_license
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Questão 1</title> <link rel="stylesheet" href="./style.css"> </head> <body> <?php function baskhara ($a, $b, $c) { if($a != 0){ $delta = pow($b,2) - 4 * $a * $c; ...
true
072395785d80dcfbbc0a06b3ebf35cc0eddc1f9a
PHP
techdivision/TechDivision_ApplicationServer
/src/TechDivision/ApplicationServer/Api/Node/EnvironmentVariableNode.php
UTF-8
1,863
2.578125
3
[]
no_license
<?php /** * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * * PHP version 5 * * @category Appserver * @package TechDivision_ApplicationServer * @subpackage ...
true
d7b166caa97830a746dfc4abee09e0c488ac7cd1
PHP
igorsgm/laravel-git-hooks
/tests/Unit/Git/CommitMessageTest.php
UTF-8
835
2.59375
3
[ "MIT" ]
permissive
<?php use Igorsgm\GitHooks\Git\ChangedFiles; use Igorsgm\GitHooks\Git\CommitMessage; test('Gets commit message', function () { $messageText = 'Test message'; $commitMessage = new CommitMessage($messageText, new ChangedFiles('')); expect($commitMessage->getMessage())->toBe($messageText); }); test('Sets c...
true
2a5fdd8f19330fadce83df4e207a6502ab06d706
PHP
dumpier/php-presto-framework
/src/presto/core/views/renders/HtmlRender.php
UTF-8
2,681
2.734375
3
[]
no_license
<?php namespace Presto\Core\Views\Renders; use Presto\Core\Traits\Singletonable; use Presto\Core\Utilities\Breadcrumb; use Presto\Core\Views\View; use Presto\Core\Views\TemplateEngine; use Presto\Core\Utilities\Files\ConfigLoader; use Presto\Core\Utilities\Pather; class HtmlRender { use Singletonable; public...
true
b6a98378be58aee23a4d39d7c5e4f660229f36c7
PHP
AlexanderC/jabberd2_web
/src/AbstractLogger.php
UTF-8
536
2.84375
3
[]
no_license
<?php /** * @author AlexanderC <self@alexanderc.me> * @date 1/27/14 * @time 10:41 AM */ namespace Jabberd2; use Psr\Log\AbstractLogger as BaseLogger; abstract class AbstractLogger extends BaseLogger { /** * @param $message * @param array $context * @return string */ protected functio...
true
632d467b7aaf3853f7570f855d4af6c95fa53443
PHP
Khozman/Project_Camagru
/camagru/config/setup.php
UTF-8
1,110
2.875
3
[]
no_license
<?php // include ("../connection.php"); require("database.php"); try { $conn = new PDO("mysql:host=$server;", $username, $password); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "CREATE DATABASE IF NOT EXISTS camagru"; // use exec() ...
true
bd19e6cc3f85eb28ca41b69d86d2748cde6e172a
PHP
phelandhu/sandbox
/source/php/settings/settings.class.php
UTF-8
1,130
3.203125
3
[]
no_license
<?php // settings.class.php /*********************************************** * Created: Apr 16, 2013 12:07:22 PM * Last Modified: Apr 16, 2013 12:07:22 PM * * Experimentation to see about changing the list of constants to database entries. * * Mike Browne - mbrowne@cantorgaming.com *********************...
true
9c4dbc13df7a9e887db4a54e856c80a8707e7093
PHP
quangND1998/CMS-backend
/app/Http/Controllers/Blog/LoaiTinController.php
UTF-8
3,351
2.609375
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Blog; use App\Http\Controllers\Controller; use App\Http\Resources\LoaiTinResource; use Illuminate\Http\Request; use App\Models\LoaiTin; use App\Models\TheLoai; use Illuminate\Http\Response; use App\Http\Controllers\Traits\FunctionTrait; class LoaiTinController extends Controller ...
true
2a56cf5a9bbbe33d9995b6da2db095ba41eca869
PHP
marcelokamei/php
/funcoes_usuario/exemplo01.php
UTF-8
665
3.25
3
[]
no_license
<?php require_once("funcoes.php"); mensagem("Olá Mundo doido!"); echo "<br>"; echo "Joséres recebeu 4 salários mínimos, totalizando o valor de R$ ".(salariominimo()*4); echo "<br>"; echo var_dump(soma(45,85,75,42)); echo "<br>"; echo soma(15,12,140); echo "<br>"; echo soma(15,15); echo "<br>"; echo "<br>"; echo "<h...
true
3d8e7a9dcd6d2879e72b88fb9e17832348553185
PHP
cfinke/anyMail
/anymail/login.php
UTF-8
6,876
2.609375
3
[]
no_license
<?php session_start(); include("config.php"); include("functions.php"); if (isset($_REQUEST["manual_registration"])){ if ($_REQUEST["protocol"] == "/pop3") $port = 110; else $port = 143; $mailbox = @imap_open('{'.$_REQUEST["host_name"].':'.$port.$_REQUEST["protocol"].'}INBOX', $_REQUEST["username"], ...
true
1a69e7d52bcfc5b2ab8ff266a88340036cf4bfa7
PHP
gersoneufra/tp_MvC_php
/app/models/tour.php
UTF-8
583
2.625
3
[]
no_license
<?php /** * */ class Tour extends BaseModel { protected $table = 'VIAJE'; public function find_by_tour($id){ $sql = "SELECT * FROM VIAJE AS v INNER JOIN RUTA AS r ON r.RUTCOD = v.RUTCOD WHERE r.RUTCOD = '$id'"; return $this->db->getAll($sql); } public function seating_active(...
true
226a3b8b96e8d50b1fc4f9f3faf8f5a9cec17c8b
PHP
asifrc/natphp
/User.php
UTF-8
1,785
3.15625
3
[]
no_license
<?php //Bismillah /*-------------------*\ | userModel Class | \*-------------------*/ /* DESCRIPTION: Provides interface between userController and cookie contianing user information MVC MIGRATION: - Copy to Models folder Migration Steps: 1. Extend a proper Model parent class (e.g. CI_Model or AppModel) */ cl...
true
a1bb2c32ff690ae33bbf2ec12a61b3b5b86cd42a
PHP
lewisliang82/wDesign
/command/Invoker.php
UTF-8
514
2.828125
3
[]
no_license
<?php namespace command; class Invoker { protected $context; public function __construct() { $this->context = new CommandContext; } public function getContext() { return $this->context; } public function process() { $cmd = new LoginCommand($this->context-...
true
a8680183b19289fd7ddfa03e09a849ff33991444
PHP
alfredosotil/meraki
/models/OrderSearch.php
UTF-8
2,782
2.609375
3
[ "MIT" ]
permissive
<?php namespace app\models; use Yii; use yii\base\Model; use yii\data\ActiveDataProvider; use app\models\Order; /** * OrderSearch represents the model behind the search form about `app\models\Order`. */ class OrderSearch extends Order { /** * @inheritdoc */ public function rules() { r...
true
cfa049c59514a7136bee7fb16ab39318b8a4aa84
PHP
czim/laravel-cms-models
/src/ModelInformation/Collector/ModelInformationFileReader.php
UTF-8
1,903
2.9375
3
[ "MIT" ]
permissive
<?php namespace Czim\CmsModels\ModelInformation\Collector; use Czim\CmsModels\Contracts\ModelInformation\Collector\ModelInformationFileReaderInterface; use Czim\CmsModels\Exceptions\ModelConfigurationFileException; use Exception; class ModelInformationFileReader implements ModelInformationFileReaderInterface { /...
true
67c2394f9b99ae7b06928b22740fd1304a597cb7
PHP
saeedbodaghi/Saloos
/lib/utility/git.php
UTF-8
3,034
3.234375
3
[]
no_license
<?php namespace lib\utility; /** Git management **/ class git { public static function createPackage($_saloos = true) { echo "<pre>"; $res = array(); //get details from last commit if($_saloos) { chdir(core); } exec("git log --name-only --max-count=4", $res); //keep only files names, not commit d...
true
a5e297a21b51977bf4fceeb87d2ddbc8a77870dd
PHP
ccmoralesj/TrabajoDeBases
/UniasFelices/busquedas.php
UTF-8
2,696
2.5625
3
[]
no_license
<html> <head> <link rel="stylesheet" href="css/general.css" /> </head> <body> <section class="todo"> <div class="contenedor"> <?php // // //SELECT c.cod,c.colorh.nombre,ic.cantidad //FROM carritoxitem ic, item h, carrito c //WHERE ic.cod_carrito='...
true
e91f3387c697ad0c7dab1f95c5b6eccbd73b6cf7
PHP
dianaamfr/LTW_feup_animalshelter
/includes/session.php
UTF-8
594
2.734375
3
[]
no_license
<?php session_start(); if (!isset($_SESSION['csrf'])) { $_SESSION['csrf'] = generate_random_token(); } function generate_random_token() { return bin2hex(openssl_random_pseudo_bytes(32)); } function setCurrentUser($username) { $_SESSION['username'] = $username; } function setLastPage($las...
true
be1e47a899118b00e2e52c6c95a41d595e4728a6
PHP
ddebin/mc-google-visualization
/lib/MC/Parser/Def/Regex.php
UTF-8
1,555
3.171875
3
[ "MIT" ]
permissive
<?php declare(strict_types = 1); namespace MC\Parser\Def; use MC\Parser\Def; use MC\Parser\ParseError; /** * Generic grammar rule for matching a regular expression. */ class Regex extends Def { /** @var string */ public const DELIMITER = '/'; // Subclasses of this can just modify the $regex, $flags, ...
true
7ee86dacc9b49f928549e07ea091f25adff1fe96
PHP
zamzar/php-activerecord
/test/helpers/model_autoloader.php
UTF-8
1,110
2.890625
3
[ "MIT" ]
permissive
<?php /* * We currently run our own autoloader because our model files cannot be readily loaded by Composer. * Eventually, we will want our models to be loaded via Composer and will achieve this by "moving" * them to the namespaces corresponding to their locations on disk. * * However, changing the namespace of al...
true
7bbd9caf21192f0baf1062052f2a2f77394daa19
PHP
kopunova/good_shop
/check_user.php
UTF-8
992
2.84375
3
[]
no_license
<?php //echo '111'; session_start(); $email = $_POST['email']; $password = $_POST['password']; $db = new mysqli('localhost', 'root', '1111', 'good_shop'); if (mysqli_connect_errno()) { echo 'Не удалось установить соединение с БД.'; return; } $query = "select * from users where email = '".$email."' and password = '"...
true
d07c7b8597bcde8049efe724acc7ba7aa3c5c693
PHP
brijal1987/laravelRBAC
/app/Models/Role.php
UTF-8
496
2.578125
3
[ "MIT" ]
permissive
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Role extends Model { protected $table = 'roles'; /** * The name of the "created at" column. * * @var string */ const CREATED_AT = 'created_on'; /** * The name of the "updated at" column. * ...
true
313cf1eb77ac016b1477e67fa9b7c7e4740b9dd2
PHP
pranjal07pandey/rt-dashboard-backend
/app/Repositories/V2/DocketManualTimerBreakRepository.php
UTF-8
1,927
2.671875
3
[ "MIT" ]
permissive
<?php namespace App\Repositories\V2; use App\AppInterface\IRepository; use App\DocketManualTimerBreak; class DocketManualTimerBreakRepository implements IRepository { public function getModel() { return new DocketManualTimerBreak(); } public function getDataById($request = null) { ...
true
9ba4c7ff10c9ecb5e40459bee0d6e024ddcf1035
PHP
dvkhang/flyer
/oop/src/staff.php
UTF-8
299
2.9375
3
[]
no_license
<?php namespace Mike; use Mike\user\person; class Staff{ protected $member = []; function __construct($member = []) { $this->member = $member; } public function add(Person $person){ $this->member[] = $person; } public function member(){ return $this->member; } } ?>
true
b37b35ac162755bb5b4d59f4675f03de28f927af
PHP
mariofdezfdez/DesarrolloWebEntornoServidor20-21
/Tema03-Funciones/Ejercicios/Boletin3/Boletin3/ejercicio05.php
UTF-8
2,334
3.828125
4
[]
no_license
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Ejercicio 5</title> </head> <body> <h2>Solución de una ecuación de 2º grado</h2> <?php // Función que resuelve una ecuación de 2º grado. // Devuelve las raíces en un array function r...
true
4d1b056637436a88cbb5dae6193760addde4b9b8
PHP
srirammails/iedr
/src/crs-console/src/main/www/protected/models/DocumentsModel.php
UTF-8
7,042
2.578125
3
[]
no_license
<?php /** * Helper model for dealing with documents upload */ class DocumentsModel extends CFormModel { const FREE_FILENAME_LIMIT = 100; const MISSING_DOMAINNAMES_UPLOAD_STATUS = "MISSING_DOMAINNAMES"; const CANNOT_CREATE_TMP_FILE_UPLOAD_STATUS = "CANNOT_CREATE_TMP_FILE"; private $isSetup = false;...
true
53e43065b50a737f66265e9239118ad9a7593b78
PHP
alejandrogarsan89/game-portal
/src/AppBundle/Domain/Model/VideoGame/VideoGameDescription.php
UTF-8
1,156
3.0625
3
[]
no_license
<?php namespace AppBundle\Domain\Model\VideoGame; use Doctrine\ORM\Mapping as ORM; /** * Class VideoGameDescription * * @ORM\Embeddable * * @package AppBundle\Domain\Model\VideoGame */ final class VideoGameDescription { /** * @var int */ public static $MAX_LENGTH = 1000; /** @ORM\Column...
true
e8948637f12588d8fbfe6ea7a5fc5485ac7904bb
PHP
eabatalov/educational-gaming-platform
/website/protected/models/api/v1/DateApiModel.php
UTF-8
1,130
3.171875
3
[]
no_license
<?php /** * Description of DateApiModel * * @author eugene */ class DateApiModel { /* * @throws: InvalidArgumentException if very basic validation has failed */ public function initFromArray($fieldsArray) { TU::throwIfNot(is_array($fieldsArray), TU::INTERNAL_ERROR_EXCEPTION); $thi...
true
4e4aa894b0d33b8990549bbd1312b84294587038
PHP
ronv/the-black
/kirby/vendor/getkirby/toolkit/lib/timer.php
UTF-8
595
3.046875
3
[ "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php /** * Timer * * @package Kirby Toolkit * @author Bastian Allgeier <bastian@getkirby.com> * @link http://getkirby.com * @copyright Bastian Allgeier * @license http://www.opensource.org/licenses/mit-license.php MIT License */ class Timer { public static $time = null; public static functio...
true
4ad2d9ac1f805e6e8879501e8a469867beb09cad
PHP
luigif/WsdlToPhp
/samples/paypal/BMB/Req/PayPalTypeBMButtonSearchReq.php
UTF-8
1,193
2.765625
3
[]
no_license
<?php /** * Class file for PayPalTypeBMButtonSearchReq * @date 14/07/2012 */ /** * Class PayPalTypeBMButtonSearchReq * @date 14/07/2012 */ class PayPalTypeBMButtonSearchReq extends PayPalWsdlClass { /** * The BMButtonSearchRequest * @var PayPalTypeBMButtonSearchRequestType */ public $BMButtonSearchRequest...
true
cd18655cbd01cda6deac058fd292ffca510ba1be
PHP
AlexHarlamov/dbproject
/app/core/application/template_parse_application/FR_TemplateParser.php
UTF-8
987
3.0625
3
[]
no_license
<?php namespace app\core\application\template_parse_application; use app\core\application\Application; class FR_TemplateParser implements Application { /** * @param $params * @return string|string[] * * Provides simple functionality of injecting variables values into template by name (if v...
true
8f3eef11fb77505b0ae5d4618c04ce21742234af
PHP
RicoCallirgos/woocommerce-plugin
/vendor/paycertify/wrappers/php/lib/src/PayCertify/Gateway/Response.php
UTF-8
425
2.734375
3
[]
no_license
<?php namespace PayCertify\Gateway; class Response { const APPROVED = '0'; private $status; private $originalBody; /** * Response constructor. * * @param $response */ public function __construct($response) { $this->status = $response->getStatusCode(); $this->originalBody = simplexml_...
true
496e43facfb7544a1eb89fd82cb14b59d8666e0e
PHP
ylabio/yii2-administer
/src/components/access/BaseAccessControl.php
UTF-8
1,114
2.765625
3
[]
no_license
<?php namespace ylab\administer\components\access; use yii\base\Component; use yii\web\ForbiddenHttpException; /** * Abstract class for check access to management of model. */ abstract class BaseAccessControl extends Component { /** * @var string Role that has access to the module */ public $defa...
true
9d89d6f4814a3151f9573b48ceb58e7b36eccdc3
PHP
ThayalanGR/ERPElastomers_mobile_responsive_web_build
/erp_elastomers/modules/changes/libraries/XML/Query2XML/Callback.php
UTF-8
3,142
3.21875
3
[]
no_license
<?php /** * This file contains the interface XML_Query2XML_Callback. * * PHP version 5 * * @category XML * @package XML_Query2XML * @author Lukas Feiler <lukas.feiler@lukasfeiler.com> * @copyright 2007 Lukas Feiler * @license http://www.gnu.org/copyleft/lesser.html LGPL Version 2.1 * @version CVS: ...
true
d4c2ea60bb22aec9c302979fe9af05d0737f3674
PHP
FlasherUa/myTestCode
/app-php/lib/Models/User.php
UTF-8
4,264
2.921875
3
[]
no_license
<?php /** * Created by PhpStorm. * User: flasher * Date: 05.11.17 * Time: 12:46 */ namespace Models; final class User extends \System\Db { private static $_usersTable = "user_yiutr6"; private static $_pt = "sa3dp5opkdn8"; /** * gets user by email * @param $email * @return int user ID...
true
09407975c62399699483a9fdc3427930a0a03f7b
PHP
yayefall/QCM-CHEIKH-IBRA-DIOP
/SRC/creer-question.php
UTF-8
10,017
2.71875
3
[]
no_license
<?php if(isset($_POST)){ if(!empty($_POST['question']) && !empty($_POST['reponse']) && ($_POST['reponse']=="texte")&& !empty($_POST['point']) && !empty($_POST['requette2'])) { $fichier="../ASSET/JSON/question.json"; $js=file_get_contents($fichier); $json=json_decode($js,true);...
true
64cc7280d48704fb4589b3891c6019904365eb66
PHP
idlesign/dja
/dja/templatetags/i18n.php
UTF-8
9,797
2.53125
3
[ "BSD-2-Clause" ]
permissive
<?php class GetAvailableLanguagesNode extends Node { public function __construct($variable) { $this->variable = $variable; } public function render($context) { $intl_ = Dja::getI18n(); $langs_ = array(); foreach ($intl_->getLanguages() as $code_ => $name_) { $...
true
31028a2d1302fbd21c2987fa64dd75171949b1d7
PHP
ThomasWeinert/workshop-pcre
/tasks/ValidateTitleAndName.php
UTF-8
572
2.859375
3
[]
no_license
<?php class ValidateTitleAndName extends TaskTestCase { /** * @test * @param string $subject * @param bool $shouldMatch * @testdox Validate that "$subject" is a name with a title, expecting "$shouldMatch". * @testWith * ["Mr. Doe", true] * ["Mrs. Jane Doe", true] * ["Ms. Marple", true]...
true
df71c0d45e7402e44e401e03a84b2ed59d5587fd
PHP
Kyev/PetAdoption
/php/showpets2.php
UTF-8
1,557
2.671875
3
[]
no_license
<?php //ini_set('display_errors', 1); include 'pet.inc.php'; session_start(); if(isset($_POST['animalSubmit'])){ $_SESSION['animal'] = $_POST['animalSubmit']; } if(isset($_POST['animalReserve'])){ $id = $_POST['animalReserve']; echo $id; $res = new Pet(); ...
true
d258e2116d89a76a8d557b417fe21827fd9898c4
PHP
SvyaznoyMarket/project13
/main/controller/Wishlist/AddProductAction.php
UTF-8
2,462
2.578125
3
[]
no_license
<?php namespace Controller\Wishlist; use EnterQuery as Query; class AddProductAction { use \EnterApplication\CurlTrait; /** * @param \Http\Request $request * @return \Http\JsonResponse * @throws \Exception */ public function execute(\Http\Request $request) { //\App::logger()-...
true
d04dd5468d54d01130adb4c7eacf9d158779f3e5
PHP
nscoincommunity/socboost
/app/Repositories/PacketRepository.php
UTF-8
1,629
2.75
3
[]
no_license
<?php namespace App\Repositories; use App\Models\Packet; use App\Repositories\BaseRepository; /** * Class PacketRepository * @package App\Repositories * @version November 21, 2019, 9:41 pm UTC * * @method Packet findWithoutFail($id, $columns = ['*']) * @method Packet find($id, $columns = ['*']) * @method Pack...
true
92abfeef706c8fab00db96cb4fe292e15a498c6c
PHP
htuzel/survey
/adminpanel/edit.php
UTF-8
2,761
3.03125
3
[]
no_license
<?php // Initialize the session session_start(); // If session variable is not set it will redirect to login page if(!isset($_SESSION['username']) || empty($_SESSION['username'])){ header("location: login.php"); exit; } ?> <?php // including the database connection file include_once("../config.ini.php"); if(i...
true
3c11b4b604e86097431c9e80124819f77c8506ec
PHP
sendanor/php-rest
/lib/SimpleREST/Session/iStore.interface.php
UTF-8
525
2.921875
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace SimpleREST\Session; interface iStore { /** * Check if a session exists * * @param string $key * @return bool */ public function hasSession (string $key) : bool; /** * Fetch a session by key * * @param string $key * @return Session */ pub...
true
1eb9884858346695ab4891d9b3ef7bff8bb4a0a7
PHP
imyoungyang/PHP7StudyGroup
/src/LanguageFeatures/PHPOOO/PolyMorphism/BabyVersion1.php
UTF-8
641
4.0625
4
[]
no_license
<?php namespace DemoDI; class Cup { private $name; public function __construct($name) { $this->name = $name; } public function drink():string { return 'a drink of ' . $this->name; } } // An example use Constructor DI class Baby { private $cup; // Constructor pub...
true
f0200d926a3942de025a4d9828c6f38fba87fd8d
PHP
TomasVotruba/Monorepo
/src/Process/ProcessFactory.php
UTF-8
1,581
2.609375
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Symplify\Monorepo\Process; use Symfony\Component\Process\Process; use Symplify\Monorepo\Configuration\BashFiles; use Symplify\Monorepo\Configuration\RepositoryGuard; final class ProcessFactory { /** * @var string */ private $cwd; /** * @var Reposit...
true
d7e75d1f3e8d09cd50e6923dba4c3d37c6381680
PHP
vidhiyaElangovan/laravel-angular
/app/Http/Controllers/EmployeeController.php
UTF-8
4,505
2.828125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\Employee; use App\Students; use App\Blogs; use Illuminate\Http\Request; class EmployeeController extends Controller { //To view the records public function index($id = null) { if ($id == null) { return Employee::orderBy('id', 'asc')->get(); ...
true
b10cd085ab66db93138efd8ff8fd7590a70e8def
PHP
tranvanmy/ForumMTV
/app/Repositories/User/UserRepositoryInterface.php
UTF-8
460
2.578125
3
[]
no_license
<?php namespace App\Repositories\User; use App\Models\User; use App\Repositories\RepositoryInterface; /** * Interface UserRepositoryInterface * * @package Framgia\Gmt\Repositories\User */ interface UserRepositoryInterface extends RepositoryInterface { /** * Find all users matched a given roleId * ...
true
0370d6b2e359d51a4ed193cc2e5791db25ea597d
PHP
JuanLuisGarciaBorrego/jedy
/src/AppBundle/Validator/Constraints/HasTranslationParentValidator.php
UTF-8
1,803
2.578125
3
[]
no_license
<?php namespace AppBundle\Validator\Constraints; use AppBundle\Entity\Category; use AppBundle\Util\Locales; use Doctrine\ORM\EntityManager; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; /** * Class HasTranslationParentValidator * * Make sure the selected category...
true
4f1649cdb4d1301865aa15278932d8cd2c3ec8a3
PHP
freshy969/arras
/src/AssetService.php
UTF-8
3,945
2.78125
3
[]
no_license
<?php /** * AssetService.php */ namespace Arras; /** * Class AssetService * @package Arras */ class AssetService { /** * @var array */ private $config = []; /** * @var string */ private $baseUrl = ''; /** * @var bool */ private $isDevEnv = false; /** * @var array */ private $styleSch...
true
6b8d409eaa58503092287857a044aca59c180406
PHP
stevotvr/adventofcode2015
/day13/part2.php
UTF-8
1,482
3.1875
3
[ "CC0-1.0" ]
permissive
<?php $lines = file('input.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); $data = array(); foreach($lines as $line) { if(preg_match('/(\w+) would (gain|lose) (\d+) happiness units by sitting next to (\w+)/i', $line, $matches)) { $value = $matches[2] === 'gain' ? (int)$matches[3] : -(int)$matches[3]...
true
b0d64af8c406c339e62b1015b759cd7109dafae7
PHP
Tasnimmumu/SQL-Project
/php_stuffs/login.inside.php
UTF-8
1,123
2.734375
3
[]
no_license
<?php if (isset($_POST['login-submit'])) { require 'database_connection.php'; $User = $_POST['uname']; $password = $_POST['pwd']; if(empty($User) || empty($password)){ header("Location: ../sign.php?result=emptyfields"); exit(); } else { //SQl to find the user $sql ...
true
2f747bcbcc5f76893a1d9cef038c8a251f580244
PHP
Florkin/dev-blog
/src/Controller/Form/LoginForm.php
UTF-8
2,251
2.75
3
[]
no_license
<?php namespace App\Controller\Form; use \App\Config; use App\Controller\Validator\Session; use FormManager\Factory as F; class LoginForm { private $emailField; private $passwordField; private $rememberCheck; private $submitButton; private $actionLink; /** * Create fields for login form...
true
98b5840e2ee757daea48b50ea6d9bf7ac524923e
PHP
lucasblasco/M-services
/app/CoffeeInvitation.php
UTF-8
691
2.53125
3
[ "MIT" ]
permissive
<?php namespace App; use Illuminate\Database\Eloquent\Model; class CoffeeInvitation extends Model { // nombre correspondiente a la table en la base de datos protected $table = 'coffee_invitations'; // Atributos que se pueden asignar de manera masiva. protected $fillable = array('id_activity_user_send', ...
true
00eaecc7f7c881a406634ab2f5397744feea54af
PHP
xaav/Hyperlight
/hyperlight/plugins/wordpress/hyperlight.php
UTF-8
3,262
2.765625
3
[]
no_license
<?php // Plugin Name: Hyperlight for WordPress // Plugin URI: http://code.google.com/p/hyperlight // Description: Static, CSS-based syntax highlighter for a variety of languages. // Author: Konrad Rudolph // Version: 0.1.0 // Author URI: http://madrat.net/ require_once('hyperlight/hyperlight.php'); $hyperlight_codes ...
true
2298bb9782c49a9d1402da2425a6f73737724161
PHP
jbulharvard77/p2.jbulharvard77.biz
/test.php
UTF-8
306
3.328125
3
[]
no_license
<?php class A { public $testA = 1; } class B { public $testB = "class B"; } $a = new A; $b = $a; $b->testA = 2; $c = new B; $a = $c; $a->testB = "Changed Class B"; echo "<br/> object a: "; var_dump($a); echo "<br/> object b: "; var_dump($b); echo "<br/> object c: "; var_dump($c); ?>
true
3734cc096d6bafa4f9b47d8dcbe34299185d62c1
PHP
johannv/arelidon
/page/motdepasse.php
ISO-8859-1
1,915
2.90625
3
[ "MIT" ]
permissive
<?php if(isset($_POST['mail']) or isset($_POST['pseudo'])){ function Genere_Password($size) { //Initialisation des caractres utilisables $characters = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", ...
true
aa63c6d65b14a247ea9a9df74cd8d4641acfcb1a
PHP
wellrootedmedia/wp-bootstrap-theme
/inc/Classes/CarouselQuery.php
UTF-8
360
2.609375
3
[]
no_license
<?php class CarouselQuery { public function CarouselQuery() { $carousels = query_posts( array( 'cat' => 2, 'posts_per_page' => 3, 'orderby' => 'date', 'order' => 'DESC' ) ); return $carousels; } } function carouselPosts() { $obj =...
true
a36370550da2a92d543a01f8fd25624bbca27654
PHP
Penneo/api-utils
/php/casefile/multiple-doc-one-signer/run.php
UTF-8
2,785
3.046875
3
[ "MIT" ]
permissive
<?php /** * This script shows how to generate a signing request link for a signer that * signs multiple documents * * Usage: * php run.php \ * --endpoint="https://sandbox.penneo.com/api/v1/" \ * --key=key \ * --secret=secret \ * --files=document.pdf,contract.pdf */ namespace Penneo\SDK; require(__DIR__...
true
b05fee01122532f995c71431174337b8ce341220
PHP
leonardonadin/xfitness
/model/Pessoa.php
UTF-8
1,539
2.890625
3
[]
no_license
<?php require_once 'XFitness.php'; /** * */ class Pessoa extends XFitness { protected $table = 'pessoa'; protected $data; protected $primary_key = 'codpes'; protected $success_message = 'Pessoa adicionada com sucesso!'; protected $columns = [ 'nompes', 'dtnaspes', 'emailpes', 'sexpes', ...
true
21f1d8727130b33a746d45ce56bac2e7ccaa8450
PHP
cnamaq/zac2
/Domain/FormationUniteOuverte.php
UTF-8
3,597
2.78125
3
[]
no_license
<?php /** * @author Denis Fohl */ namespace Zac2\Domain; use Zac2\Entity\EntityAbstract; class FormationUniteOuverte extends EntityAbstract { /** * @var string */ protected $formation_code; /** * @var string */ protected $formation_libelle; /** * @var string */ ...
true
1a3dff45538da3018d98a3f670c81afa77c58cc6
PHP
xiecaian/comment
/api_for_study/Home/Model/CoursesModel.class.php
UTF-8
1,700
2.609375
3
[]
no_license
<?php namespace Home\Model; use Think\Model; class CoursesModel extends Model { function getCourse(){ $map['status'] = 1; $res = $this -> order('id') -> where($map) -> select(); return $res; } function getCourses($page){ $map['status'] = 1; $count = $this -> where($map) -> count(); ...
true
4203d9a679de04142942ef14eefae47d475ac25b
PHP
fadiKaba/samiweb
/src/html/getemail.php
UTF-8
1,021
2.546875
3
[]
no_license
<?php $msg = ""; $msg2 = ""; if ($_SERVER['REQUEST_METHOD'] == 'POST'){ if(empty($_POST['name']) && empty($_POST['email']) && empty($_POST['subject']) && empty($_POST['message'])){ $msg2 = 'please fill the required fields'; $msg = ""; }else{ $name =htmlentities($_POST['name']); $ema...
true
caa302f40bae8d728c02b1056b5b96f7ced47e3b
PHP
15520824/JobDesc
/jsmath.php
UTF-8
26,060
2.65625
3
[]
no_license
<?php include_once "common.php"; /* php: function write_math_script(); javascript: function mathFunctionsListText(); function mathDisplayFunctionList(); function parseExpression(st); function checkExpression(expression, function (varname) ); function calculateExpression(expression, function ...
true
319de16ebee46a33e7a6a7bf8c4073867ffd09d8
PHP
nkulow/senior-project
/phptest.php
UTF-8
1,379
3.078125
3
[ "MIT" ]
permissive
<!DOCTYPE html> <html> <head> <title> PHP TEST </title> </head> <body> <h1> PHP TEST </h1> <?php require_once ('config.php'); // include ('config2.php'); $sql = "SELECT ProductName FROM Products WHERE ProductID = 1"; $stmt = sqlsrv_query($conn, $sql); if($conn){ echo "Connection establ...
true
e20a08ac6bc82b48b649911bee0274f7ff2c6435
PHP
jcohenho/OLLCF-SRS
/osis/manage/room_profile.php
UTF-8
2,901
2.5625
3
[]
no_license
<?php if (!isset($_SESSION)) { session_start(); include "../logout.php"; $level = $_SESSION['level']; //if not logged in, redirect to login page. if( $level == ""){ header("Location: ../login.php"); } else if( $level == 1 or $level == 2) { } else{ header("Location: ../error_unauthorized.php"); } } ...
true
fe12285071d9aff37d14a293d21832c3cd41b934
PHP
gorutoba1217/silverstripe-ecommerce
/src/Tasks/EcommerceTaskCountryAndRegion.php
UTF-8
1,788
2.640625
3
[]
no_license
<?php namespace Sunnysideup\Ecommerce\Tasks; use SilverStripe\Core\Convert; use SilverStripe\Dev\BuildTask; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DB; use Sunnysideup\Ecommerce\Config\EcommerceConfig; use Sunnysideup\Ecommerce\Model\Address\EcommerceCountry; /** * create standard country and regions....
true
7c3c82213037f7d066f38bf909fcf7ba09d22fda
PHP
OakAndAspen/swisscovery-api-v1
/src/Entity/PointOfInterest.php
UTF-8
4,069
2.546875
3
[]
no_license
<?php namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass="App\Repository\PointOfInterestRepository") */ class PointOfInterest { /** * @ORM\Id() * @ORM\GeneratedValue() ...
true
b6a57d08aa774f2fa9e8593f7b138ac6877ce208
PHP
allisonplus/still-spinning
/inc/loops.php
UTF-8
2,420
2.546875
3
[]
no_license
<?php /** * Custom loops. * * @package Spin */ /** * Show Recent Posts. */ function cps_show_recent_posts() { ?> <?php $recent_posts = cps_get_recent_posts(); ?> <section class="recent-post-container"> <?php while ( $recent_posts->have_posts() ) : $recent_posts->the_post(); ?> <article id="post-<?php the_ID(...
true
1df716e147d4348717735cc803aa0002fbccc75e
PHP
AppUlvi/wifi-jwe21
/PHP/PHP1/Final/inhalte/zufallspasswort.php
UTF-8
876
2.5625
3
[ "MIT" ]
permissive
<div id='journal'> <div class='wrapper'> <div class='row'> <div class='col-xs-12'> <h1>Zufallspasswort</h1> </div> </div> <div class='row'> <div class='col-xs-12'> <?PHP ...
true
cb9d4501e11d48a3ca0e0410b78bf1c0295ce6f3
PHP
egzy1992/tourist_service
/api/v1/CrudHandler.php
UTF-8
2,668
2.734375
3
[]
no_license
<?php require_once("SimpleRest.php"); require_once("DBSender.php"); class CrudHandler extends SimpleRest { public function create($table,$data_array){ switch($table){ case "cities": $handler = new CrudHandler(); echo "1"; break; case "travellers": $handler = new CrudHandler(); echo "2"...
true
d81c3efdd1a00d5ba56c16887a040928412bb34c
PHP
plentymarkets/plugin-payment-payone
/resources/lib/PayoneApi/Response/ClientErrorResponse.php
UTF-8
1,440
2.890625
3
[]
no_license
<?php namespace PayoneApi\Response; /** * Class ClientErrorResponse */ class ClientErrorResponse extends ResponseDataAbstract implements ResponseContract { /** * @var string */ protected $errorMessage; /** * @var mixed */ protected $requestData; /** * @var mixed *...
true
a5941c8341b6e93ab7d9248ab139009c17121e5c
PHP
KateBlkv/compliments210522
/src/Compliments.php
UTF-8
229
2.78125
3
[]
no_license
<?php declare(strict_types=1); namespace Katya\Compliments210522; class Compliments { public function getCompliment(string $name): string { $compliment = $name . ", ты лапушка!"; return $compliment; } }
true
8acef125b56302d60fac1712f1d89dc4957a1894
PHP
cgy1992/web_hqoj
/library/util/upload/Upload.class.php
UTF-8
1,739
2.921875
3
[]
no_license
<?php class Upload { /** * 移动上传的文件 * * @param $field string 表单域 * @param $file string 目的路径 * @return boolean */ public static function move($field, $file) { $tmpFile = self::getTmpName($field); if (empty($tmpFile)) { return false; } ...
true
38d1517606a1338ecca6ad8daf0a838625c73624
PHP
afosto/fashion-partner
/src/Helpers/ShippingMethodHelper.php
UTF-8
1,818
2.71875
3
[ "Apache-2.0" ]
permissive
<?php namespace Afosto\FashionPartner\Helpers; class ShippingMethodHelper { const METHOD_POST_NL = 'PNL'; const METHOD_POST_NL_PAKJEGEMAK = 'PNLPL'; const METHOD_DHL = 'SVR'; const METHOD_DHL_PICKUP_POINT = 'SVRPS'; const METHOD_DPD = 'DPD'; /** * @param bool $filterImplemented ...
true
1bb82dc2dfcfa033147ad1c4ba6c9213caef78b7
PHP
erikaisl/orange
/Archive/picture/picture-backend.php
UTF-8
1,345
2.953125
3
[]
no_license
<?php $sPictureFilename = $_FILES['the-uploaded-picture']['name']; $sTemporaryPath = $_FILES['the-uploaded-picture']['tmp_name']; $sTargetDirectory = 'uploads/'; // CHANGE FOLDERNAME HERE! $sFinalPath = $sTargetDirectory . $sPictureFilename; $sImageFileType = pathinfo( $sFinalPath, PATHINFO_EXTENSION) ; $sFi...
true
3e0089a8b39a3a1916aee8d6ab4b9341bbcdf063
PHP
MiguelScript/sistema_inventario_alquimista
/src/DollarRate/UseCases/CreateSaleUseCase.php
UTF-8
3,571
2.75
3
[ "MIT" ]
permissive
<?php namespace Src\Sales\UseCases; use Src\Sales\Services\CreateSaleService; use Src\Sales\Services\CreateSaleCodeService; //add products to Sale use Src\Sales\Services\AddProductsToVentaService; use Src\Products\Services\UpdateMultipleProductsService; //discount products from stock use Src\Sales\Services\Getproduct...
true