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
61b789f3394787d0ecb5ae021896af5c4900bea0
PHP
kenstewart/recipe-manager
/tests/Controller/RecipeControllerTest.php
UTF-8
3,246
2.625
3
[]
no_license
<?php namespace App\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\HttpFoundation\Response; class RecipeControllerTest extends WebTestCase { public function testFormSubmitsWithValidData() { // arrange $url = '/recipe/'; $httpMethod = 'GET'...
true
75afa9b8e9e490ef115f5b99736e45550d7943fe
PHP
icephoenixz/PERSONAL_ProyectoMysqlAlumno
/modelos/Usuarios.php
UTF-8
14,691
2.765625
3
[]
no_license
<?php class Usuarios extends Conectar { public function get_filas_usuario() { $conectar = parent::conexion(); $sql = "select * from usuarios"; $sql = $conectar->prepare($sql); $sql->execute(); $resultado = $sql->fetchAll(PDO::FETCH_ASSOC); return $sql->rowCount(); } public function log...
true
8364b7242a802bca4d59e84a72a178f965540ef0
PHP
gerryron/Web2
/Pertemuan-4/Latihan8.php
UTF-8
83
2.640625
3
[]
no_license
<?php for($i=1; $i<11; $i++) { if($i%2==0) continue; else echo $i; } ?>
true
2450689a7b3bcdcc9494408c5fdc84a4ae43edac
PHP
georgepercic/laravelAPI
/database/migrations/2015_10_22_080458_create_images_table.php
UTF-8
897
2.515625
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateImagesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('images', function (Blueprint $table) { $tab...
true
2f6fd0dde540f09e02862094b65fc4679d09968d
PHP
PcComponentes/open-api-messaging-context
/src/OpenApi/OpenApiSchemaParser.php
UTF-8
4,574
2.59375
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace PcComponentes\OpenApiMessagingContext\OpenApi; final class OpenApiSchemaParser { public function __construct(private array $originalContent) { } public function parse($name): array { $schemaSpec = $this->originalContent['components']['schemas'][$na...
true
23f3c4feb253228b8a2f7aad3362dae168b1a01f
PHP
awardfact/board
/phpPractice/update.php
UTF-8
1,693
2.53125
3
[]
no_license
<?php session_start(); if($_SESSION["loginId"]){ echo "현재 접속중 아이디 : ", $_SESSION["loginId"]; } $clickNumber; $originTitle; $originContent; $id; $clickNumber; if($_SERVER['REQUEST_METHOD'] == 'GET' && $_GET['originContent']){ if($_GET['makeId'] == $_SESSION["loginId"]){ $originTitle = $_GET['originTitle']...
true
204ef363afdd40633f25e72a669edbf780344af3
PHP
gscolera-depric/Camagru
/app/models/UserModel.class.php
UTF-8
3,689
2.59375
3
[]
no_license
<?php namespace app\models; class UserModel extends \app\core\Model { public static function checkPreferences() { if (!isset($_SESSION['user'])) exit(json_encode(['error' => 'not logged in'])); $sql = 'SELECT notification, userpic FROM users WHERE login = :login'; $params = ['login' => $_SESSION['user']];...
true
9546afc573795bb76e568ebdab2c06fe6a24d142
PHP
SeanSmyth1994/SimplePHPLogin
/login.php
UTF-8
1,005
2.96875
3
[]
no_license
<?php session_start(); $valid = false; $myfile = file('file'); if(isset($_POST['submit'])){ $_SESSION['user'] = $_POST["user"]; $_SESSION['password'] = $_POST["password"]; $_SESSION['result'] = $_SESSION['user']." ".$_SESSION['password']; if(empty($_SESSION['user'])){ $valid = false; } elseif(empty($_SESSION...
true
626f53a6709636cb4330ad918c236193503725ac
PHP
piotr-fraczek/urlhub
/tests/Unit/Controllers/UrlControllerTest.php
UTF-8
4,895
2.5625
3
[ "MIT" ]
permissive
<?php namespace Tests\Unit\Controllers; use App\Models\Url; use App\Rules\StrAlphaUnderscore; use App\Rules\StrLowercase; use App\Rules\URL\KeywordBlacklist; use Illuminate\Http\Request; use Illuminate\Support\Facades\Validator; use Tests\TestCase; class UrlControllerTest extends TestCase { /** * When the g...
true
fba245a915c0f40a979d59a10f68378faafc70cb
PHP
webosys-technologies/arrowline
/application/models/Item_model.php
UTF-8
8,930
2.546875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Item_model extends CI_Model { public function __construct(){ parent:: __construct(); } /* Get Category and item join data */ public function getItems() { if($this->session->userdata('type...
true
2b9a07535021b8b7bed0d74d3d69255591e45f41
PHP
o-nasteka/e-shop
/models/Cart.php
UTF-8
1,663
2.859375
3
[ "BSD-3-Clause" ]
permissive
<?php /** * Created by PhpStorm. * User: nasteka * Date: 3/24/17 * Time: 14:41 */ namespace app\models; use yii\db\ActiveRecord; class Cart extends ActiveRecord{ public function addToCart($product, $qty = 1){ // add min 1 qty product // Create Cart // if Product has in Cart, add + qty ...
true
0126c18ab2a6d471b608335c17127296dfe81952
PHP
ibrahimBougaoua/filament-login-as
/src/Traits/LoginAs.php
UTF-8
1,945
2.59375
3
[ "MIT" ]
permissive
<?php namespace IbrahimBougaoua\FilamentLoginAs\Traits; use App\Models\User; use Filament\Notifications\Notification; use Illuminate\Support\Facades\Auth; trait LoginAs { public static function login($user_id) { $user = User::find($user_id); if ($user) { self::storeCurrentUserId(...
true
d9f3649e1ae0a5137cd61d16198e8f26a2afe108
PHP
Denisdif/SistGOC-Project
/app/Repositories/PredecesoraRepository.php
UTF-8
679
2.578125
3
[ "MIT" ]
permissive
<?php namespace App\Repositories; use App\Models\Predecesora; use App\Repositories\BaseRepository; /** * Class PredecesoraRepository * @package App\Repositories * @version November 25, 2020, 7:43 am -03 */ class PredecesoraRepository extends BaseRepository { /** * @var array */ protected $field...
true
583f9b1285df3a008ae7264a8cd3be9f0f07873c
PHP
jaxma/threeperson
/App/Modules/Radmin/Action/RegulationsAction.class.php
UTF-8
2,926
2.515625
3
[]
no_license
<?php /** * topos经销商管理系统 */ class RegulationsAction extends CommonAction { //条例信息 public function index() { $list = D('Regulations')->find(); //如果没有记录则创建一条记录 if (empty($list)) { $row = array( 'id' => 1, 'news' => '条款未填写', ...
true
c320006fef33363700e4b5f55c9a5d882765c6ea
PHP
est111/lion-mirror
/src/Biocare/StorageBundle/Entity/Cart.php
UTF-8
804
2.625
3
[]
no_license
<?php namespace Biocare\StorageBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Description of Cart * * @author Karol Gontarski * @ORM\Table() * @ORM\Entity() * */ class Cart extends Storage{ public function __construct() { $createdAt = new \DateTime('NOW', new \DateTimeZone('UTC') ...
true
320ea8f5c9de41676ae664b7183169d232068012
PHP
indrafarros/ci3-restful-jwt
/application/controllers/Welcome.php
UTF-8
4,756
2.59375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php defined('BASEPATH') or exit('No direct script access allowed'); use chriskacerguis\RestServer\RestController; class Welcome extends RestController { public function __construct() { parent::__construct(); // header('Access-Control-Allow-Origin: *'); // header("Access-Control-Allow-Methods: POST, GET, ...
true
429cbf9ff16bcb51e8cb7f812a351edbec7fbc83
PHP
luisconcha/lacc_php7
/study/zend-stratigility/src/App/Rota1Middleware.php
UTF-8
700
2.625
3
[]
no_license
<?php /** * File: Rota1Middleware.php * Created by: Luis Alberto Concha Curay. * Email: luisconchacuray@gmail.com * Language: PHP * Date: 26/02/17 * Time: 19:03 * Project: lacc_php7 * Copyright: 2017 */ namespace App; use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterf...
true
521b1b701eb1b2d890f29f6ce6a2c9d8e87379c0
PHP
alessandro-orlov/php-oop-1
/User.php
UTF-8
470
3.484375
3
[]
no_license
<?php // Classe User class User { public $name; public $lastname; public $email; public function __construct($_nome, $_cognome, $_email) { $this->name = $_nome; $this->lastname = $_cognome; $this->email = $_email; } public function getUserData() ...
true
07a1ba3ed3386bd25acb72e23005619e28c462bf
PHP
benvens/php-framework
/src/Framework/Twig/BootstrapFormExtension.php
UTF-8
3,644
2.890625
3
[ "MIT" ]
permissive
<?php namespace Framework\Twig; use Twig_SimpleFunction; /** * Class FormExtension * @author Lievens Benjamin <l.benjamin185@gmail.com> * @package Framework\Twig */ class BootstrapFormExtension extends \Twig_Extension { /** * @return Twig_SimpleFunction[] */ public function getFunctions() ...
true
54d0d3b70c6860c3526aac9e355f272c37e67ae6
PHP
itk-dev/serviceplatformen
/lib/DigitalPost/MeMo/Action/ActionAType.php
UTF-8
3,141
2.859375
3
[ "MIT" ]
permissive
<?php namespace DigitalPost\MeMo\Action; /** * Class representing ActionAType */ class ActionAType { /** * @var string $label */ private $label = null; /** * @var string $actionCode */ private $actionCode = null; /** * @var \DateTime $startDateTime */ private ...
true
d19e0d116b694fb60622975d378eb29a16e61294
PHP
146119/informatica
/Functies/Splitsen.php
UTF-8
1,075
3.015625
3
[]
no_license
<?php function splitsen($woordenzoeker) { global $gesplitst, $zoekwoorden, $woordenzoeker; //array splitsen in een woordzoeker deel en een zoekwoorden deel $witregel = file("witregel.txt"); $witregel = $witregel[0]; $MagischWitRegelNummer = array_search($witregel, $woordenzoeker); unset($woordenzoek...
true
3899620674bc44d1bcb0475159f495c316e450da
PHP
pinzhenin/demo
/models/demo/DemoRule.php
UTF-8
3,209
2.703125
3
[]
no_license
<?php /** * Модель "Тест / Правила" */ namespace app\models\demo; use Yii; use app\models\BookRule; /** * This is the model class for table "demo_rule". * * @property int $id ID * @property int $demo_id DEMO_ID * @property int $book_rule_id ID учебника * @property int $given задано заданий * @property int ...
true
86d9db5a5f4c1aa875b51e69d82aefb0717e9146
PHP
Amro-Soliman/E-Commerce-Buss-Transportaion-Booking-System-App-Built-With-Laravel
/database/migrations/2019_07_20_130916_create_operationalintervals_table.php
UTF-8
1,191
2.65625
3
[]
no_license
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateOperationalintervalsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('op...
true
17960d70e1a426f24eb85ec66ee413b77aa21746
PHP
foodkit/dev-tools
/app/Http/Controllers/Tokens/GitHubController.php
UTF-8
1,668
2.546875
3
[]
no_license
<?php namespace App\Http\Controllers\Tokens; use App\Http\Controllers\Controller; use App\Integrations\GitHub; use App\Repositories\Collaborators; use Illuminate\Http\Request; use App\Services\Settings; class GitHubController extends Controller { protected $github; protected $collaborators; protected $se...
true
579e3c775281389ac5f8243b73945273bc9a941f
PHP
leondeng/carClean
/src/Interfaces/IEntityManager.php
UTF-8
209
2.734375
3
[]
no_license
<?php namespace CarClean\Interfaces; interface IEntityManager { public function store(IEntity $entity); public function find(string $entityClass, int $id) : IEntity; public function reset(); }
true
4d13d144e158668370e96f3ebbaecc7b51ce64fc
PHP
noelan/clothA
/src/DataFixtures/MaterialFixtures.php
UTF-8
780
2.5625
3
[]
no_license
<?php namespace App\DataFixtures; use Doctrine\Bundle\FixturesBundle\Fixture; use Doctrine\Common\Persistence\ObjectManager; use App\Entity\Material; use Faker; class MaterialFixtures extends Fixture { public function load(ObjectManager $manager) { // $product = new Product(); // $manager->pe...
true
88d99c3888dc4b3ebf4a68478974b5f8f5380f3f
PHP
shikong-sk/Python_SomeTools
/CTF/BugKu/PHP_encrypt_1(ISCCCTF)/PHP_encrypt_1/index.php
UTF-8
411
2.640625
3
[]
no_license
<?php function encrypt($data,$key) { $key = md5('ISCC'); $x = 0; $len = strlen($data); $klen = strlen($key); for ($i=0; $i < $len; $i++) { if ($x == $klen) { $x = 0; } $char .= $key[$x]; $x+=1; } for ($i=0; $i < $len; $i++) { $str ...
true
7bfc05f9188c9ef116148386c7f171f2ba10e23c
PHP
wm981684753/CI-Smarty
/application/controllers/Welcome.php
UTF-8
1,345
2.640625
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Welcome extends MY_Controller { /** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/index * - or - * Since this contro...
true
d84b5af28bfd9d9382d0dd7550e604f294cdd834
PHP
RonakPrasad/Legato-Guitar-Store
/reset.php
UTF-8
2,793
2.78125
3
[]
no_license
<html> <head> <link rel="icon" type="image/ico" href="icon.png"> <title>Reset Password - Legato Guitar Store</title> <?php $password=$email=""; $passwordErr=$emailErr=""; $hashed_password=""; $leg=""; $dis=""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["email"])) { $emailErr = "*Email is requi...
true
576183e66088818436a725cb31aa88f24705a353
PHP
Geniusmicheal/testapi
/comment.php
UTF-8
2,333
2.53125
3
[]
no_license
<?php require_once('DbConnection.php'); header("Access-Control-Allow-Origin: *"); header("Access-Control-Allow-Headers: Origin, X-Requested-With,Content-Type, Accept, Authorization"); header("Content-Type: application/json"); if($_SERVER['REQUEST_METHOD'] !== 'POST') { $message='Request Meth...
true
c691f116eb5d0c3ec246d320d754575bf1355a4a
PHP
v6ak/Gridito
/models/DibiModel.php
UTF-8
1,705
2.828125
3
[ "MIT" ]
permissive
<?php namespace Gridito; use \Gridito\IModel; use \DibiFluent; use \Nette\Object; use \StdClass; /** * @author Vít Šesták * An IModel based on dibi database layer. */ abstract class DibiModel extends Object implements IModel{ // TODO: consider renaming to AbstractDibiModel /** @var int */ priv...
true
5ad04034751a3f25a433fd96215ef338321359df
PHP
Corviz/jwt
/src/Validator/Validator.php
UTF-8
428
2.953125
3
[ "MIT" ]
permissive
<?php namespace Corviz\Jwt\Validator; abstract class Validator { /** * Must return the validated field name; * * @return string */ abstract function validates() : string; /** * Validates the field specified by validates(). * Returns true when valid; false otherwise. * ...
true
43feff44e691a5ef13ebff0fe15c25fd7d5b7144
PHP
axiomattik/skoveler
/user-routes.php
UTF-8
3,419
2.625
3
[ "MIT" ]
permissive
<?php function setup_user_routes($router) { $router->add( 'GET', '/login', function() { global $user; if ( $user->get_role() == "guest" ) { require 'templates/header.php'; require 'templates/login.php'; require 'templates/footer.php'; } else { http_response_code(303); header('Location: /'); } ...
true
2c1b2129787848ef38e24c9b18ceaf111455f9a1
PHP
vanhoang1001/BaiTap
/LeVanHoang_BTTuan4/bai4_kq.php
UTF-8
700
2.8125
3
[]
no_license
<?php if(isset($_POST['monkhaivi'])&& isset($_POST['monchinh'])&& isset($_POST['montrangmieng'])){ $monKhaiVi = $_POST['monkhaivi']; $monChinh = $_POST['monchinh']; $monTrangMieng = $_POST['montrangmieng']; echo "MonKhaiVi:"; foreach ($monKhaiVi as $khai) { echo ("<li>$kha...
true
12a44468c8ddd4a3ea054b222575ae0d79a24f13
PHP
Boataround/Office-Fussball
/application/model/FixturesModel.php
UTF-8
9,098
2.828125
3
[]
no_license
<?php class FixturesModel { public $fixtureId; public $competitionId; public $homeTeamId; public $awayTeamId; public $statusId; public $homeTeam; // user obj public $awayTeam; // user obj public $errors = array(); function __construct($db) { try { $this->db = $...
true
b0a93a5771d15ff9164f4f0c0bbde2e7f76ff883
PHP
qianlizeguo/gouyu
/Lib/Model/GuessChampionUserModel.class.php
UTF-8
4,999
2.890625
3
[]
no_license
<?php /** * 猜冠军用户模型类 */ class GuessChampionUserModel extends Model { private $guess_champion_user_id; /** * 构造函数 * @author 姜伟 * @todo 构造函数 */ public function __construct($guess_champion_user_id=0) { parent::__construct("guess_champion_user"); $this->guess_champion_...
true
66c860fbe1483d7aa1a5be6f82b3684ad93d3d64
PHP
ehayn/VolunteerWebsite
/Volunteer/editTraining.php
UTF-8
2,666
2.78125
3
[]
no_license
<?php require_once "dbconnect.php"; require_once "header.php"; $id = $_GET['id']; $sql = "SELECT * FROM VW_TRAINING_EDIT where TID = $id"; $result = mysql_query($sql, $conn) or die(mysql_error()); $row = mysql_fetch_assoc($result); //Variables initilizaion $da = $row['Date']; //Date $na = $row[...
true
9384a393c26ac61c2bb1f2bc37eb0b47621a213f
PHP
wietsedejonge/werkbonSysteemLaravel
/app/Http/Controllers/werkbon.php
UTF-8
932
2.546875
3
[]
no_license
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\werkboninfo; class werkbon extends Controller { //pakt alle names van de inputs en plaatst in de database function save(Request $req) { //print_r($req->input()); $user = new werkboninfo; $user->name...
true
c32a233049208f5e3e110c5e683cb12f71abd114
PHP
amayer3/wfprj
/application/core/Request.php
UTF-8
546
2.71875
3
[]
no_license
<?php /** * SPRINT 01 * * @author: Kilian Kraus * @Matrikel: * Datum: 08.04.2015 * * User­Story (Nr. 20 ): Als Dozent möchte ich mich zur Verwaltung meiner Daten online einloggen können. (42 Points) * Zeit: 0.1 */ /** * @author Kilian Kraus * Klasse um get/post zu handeln. */ class Request { public static func...
true
8574d24ba8dbe28a5bfeb83121ad5259d77b1a85
PHP
geertvangent/ects
/Application/Sync/Bamaflex/Synchronization/Type/CourseCategory/AcademicYearCourseCategorySynchronization.php
UTF-8
1,451
2.5625
3
[]
no_license
<?php namespace Ehb\Application\Sync\Bamaflex\Synchronization\Type\CourseCategory; use Ehb\Application\Sync\Bamaflex\Synchronization\Type\CourseCategorySynchronization; class AcademicYearCourseCategorySynchronization extends CourseCategorySynchronization { CONST IDENTIFIER = 'AY'; public function get_code() ...
true
c58a9c37ea06fd67d1d3cce0cb650a0f5aeafe2b
PHP
pacificnm/pnm
/module/ClientAccount/src/ClientAccount/Entity/AccountEntity.php
UTF-8
1,643
2.78125
3
[]
no_license
<?php namespace ClientAccount\Entity; class AccountEntity { /** * * @var number */ protected $clientAccountId; /** * * @var number */ protected $clientId; /** * * @var number */ protected $accountId; /** * * @var AccountEntity ...
true
fc5f3f7177637794211f8a190375858dc4f2a52e
PHP
nemundo/process
/src/App/Calendar/Type/CalendarIndexTrait.php
UTF-8
836
2.640625
3
[]
no_license
<?php namespace Nemundo\Process\App\Calendar\Type; use Nemundo\Process\App\Calendar\Data\CalendarIndex\CalendarIndex; use Nemundo\Process\App\Calendar\Data\CalendarIndex\CalendarIndexDelete; trait CalendarIndexTrait { public $date; public $title; abstract protected function getDate(); protec...
true
4040e8bb1880f248987891edd475c929d7c99aff
PHP
barell/human
/src/Body/ChannelInterface.php
UTF-8
281
2.90625
3
[]
no_license
<?php namespace Human\Body; interface ChannelInterface { public function fillWith(FluidInterface $fluid): void; public function getFluid(): ?FluidInterface; public function suck(int $volume): ?FluidInterface; public function pump(?FluidInterface $fluid): void; }
true
9d80f0db828abac3c192926b3493a5d0681fd999
PHP
JohanAngenberg/rent-a-car-backend
/models/Car.php
UTF-8
812
3.078125
3
[]
no_license
<?php class Car { private $conn; private $table = 'cartypes'; public $cartype_id; public $cartype_name; public $cartype_kmprice; public $cartype_day_rental; public $cartype_day_multiplier; public $cartype_km_multiplier; public $cartype_img; ...
true
29856e9300766ee08a6e4afead4789adcfbdeddb
PHP
Saparbek28/PHP15
/app/Core/_Apstracts/Model.php
UTF-8
1,270
2.640625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: ��������� * Date: 18.02.2020 * Time: 18:02 */ namespace Core\_Apstracts; use Core\Db; /* * Class Model * @package Core/_Apstracts; * * @method static select( $join, $columns = null, $where = null); * @method static insert( $datas); * @method static update( $data, ...
true
52ca3ba66a5110986de0be048eab48f31d289dea
PHP
mvsnash/designpatterns
/src/AppCode/Form/Elements/Input.php
UTF-8
614
2.578125
3
[]
no_license
<?php namespace AppCode\Form\Elements; class Input extends ElementAbstract { public function render() { if((!$this->getUnified()) || ($this->getUnified() === 'first')){ echo "<div class='col-sm-10 '>"; } echo "\n<input "; foreach ( $this->attributes as $attKey =...
true
9aca7bd2a266126c703a52d7e75e249240e46b65
PHP
tanphat13/web-assignment
/views/categories.php
UTF-8
4,458
2.65625
3
[]
no_license
<?php $PageTitle="Category". ' | ' . "smartphone.com"; include_once('layout/header.php'); ?> <script> function setbounds($low, $high) { low_bound = $low; high_bound= $high; return 0; } </script> <?php $categoryList = array(); $products = array(); f...
true
7d634154ea10569372d34f44e1c0165db84b9d77
PHP
mortada-jafar/panel-module
/Dynamic/view/Text.php
UTF-8
467
2.8125
3
[]
no_license
<?php namespace Modules\PanelCore\Dynamic\view; use Modules\PanelCore\Dynamic\core\Element; class Text extends Element { public ?string $text; /** * Badge constructor. * @param string|null $text */ public function __construct(string $text=null) { $this->text = $text; } ...
true
b384466f5bb8e4509074888d492e5f8270fd9726
PHP
IFPB-PRPIPG/periodicos-ifpb
/tools/copyAccessLogFileTool.php
UTF-8
6,172
2.59375
3
[]
no_license
<?php /** * @file tools/CopyAcessLogFileTool.php * * Copyright (c) 2013-2015 Simon Fraser University Library * Copyright (c) 2003-2015 John Willinsky * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. * * @class CopyAccessLogFileTool * @ingroup tools * * @brief CLI tool to copy apa...
true
7f7bc3c6991a556f323dd7dac3fba8571344d8a1
PHP
wuwx/evaluator
/src/Adapter/Memory.php
UTF-8
2,481
2.78125
3
[ "MIT" ]
permissive
<?php namespace Elepunk\Evaluator\Adapter; use Illuminate\Support\Fluent; use Illuminate\Support\Arr as A; use Elepunk\Evaluator\Contracts\AdapterInterface; use Elepunk\Evaluator\Traits\ExpressionCheckerTrait; use Elepunk\Evaluator\Exceptions\MissingExpressionException; class Memory implements AdapterInterface { ...
true
67b6e1d0a4b7a0f0545352fbb5e60f9549b77450
PHP
T4SG/Bangalore-Team-8
/registrationhandler.php
UTF-8
2,493
2.6875
3
[]
no_license
<?php echo"Hi"; session_start(); // Starting Session $error=''; // Variable To Store Error Message if (isset($_POST['submit'])) { if (empty($_POST['name']) || empty($_POST['email']) || empty($_POST['password1']) || empty($_POST['password2'])) { $error = "Some fields are empty"; //if(empty($_FILES["uploadedima...
true
568fb209a4b6a7ee5b520071f674f92c6aa0ceb8
PHP
karimsamir/sym_desireware
/src/Desireware/ProductBundle/Entity/Product.php
UTF-8
1,230
2.625
3
[ "BSD-3-Clause", "MIT" ]
permissive
<?php namespace Desireware\ProductBundle\Entity; /** * Product */ class Product { /** * @var integer */ private $id; /** * @var string */ private $name; /** * @var \Desireware\ProductBundle\Entity\Category */ private $category; /** * Get id * ...
true
b24f03e43fc43896276ece2ac8025d41b67a2ca5
PHP
tanlinhua/DesignPattern
/php/00.Demo/工厂方法.php
UTF-8
1,945
3.546875
4
[ "MIT" ]
permissive
<?php /** * 目的 * 对比简单工厂模式的优点是,您可以将其子类用不同的方法来创建一个对象。 * 举一个简单的例子,这个抽象类可能只是一个接口。 * 这种模式是「真正」的设计模式, 因为他实现了 S.O.L.I.D 原则中「D」的 「依赖倒置」。 * 这意味着工厂方法模式取决于抽象类,而不是具体的类。 这是与简单工厂模式和静态工厂模式相比的优势。 */ //日志接口 interface Logger { public function log(string $message); } //日志工厂接口 interface LoggerFactory { public function cre...
true
0201abd0b639ca94fa6e1d5b20b4d0ed1603e8fd
PHP
cash2one/wechat
/pack_unpack.php
UTF-8
2,402
3.140625
3
[ "MIT" ]
permissive
<?php /* @author hongxiaoqiang @email cool.hxq@gmail.com @desc 数据的打包解包接口封装 */ function _read_fp($fp, $len, $type) { $data = fread($fp, $len); $ret = unpack($type, $data); return $ret[1]; } //uint8 function pack_uint8($number) { return pack("C", $number); } function unpack_uint8($fp) { return _...
true
f586aacc415236349e2cd77b692650f2b7c56272
PHP
nansou13/ngframework
/ngframework/framework/include/Sql.class.php
UTF-8
544
2.828125
3
[]
no_license
<?php class Sql { private $server; private $user; private $password; private $basename; function __construct() { $this->server = _SERVER_SQL; $this->user = _USER_SQL; $this->password = _PASSWORD_SQL; $this->basename = _BASENAME_SQL; } function connect(){ if(isset($this->server)){ $db_li...
true
3155226ddc4178c98c668558c24eb896319d7de0
PHP
eickhardt/training
/app/Http/Controllers/WordsController.php
UTF-8
2,649
2.796875
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\Http\Requests; use App\Http\Controllers\Controller; use App\Word; use Session; class WordsController extends Controller { /** * @var Word */ private $word; public function __construct(Word $word) { $this->middleware('auth'); $this->word = $word; } /** ...
true
77f0522827af8cdbf208500a528ea625b610963e
PHP
mihaichitic/GPIO
/src/GPIOInterface.php
UTF-8
801
3.25
3
[ "MIT" ]
permissive
<?php namespace PiPHP\GPIO; use PiPHP\GPIO\Interrupt\InterruptWatcherInterface; use PiPHP\GPIO\Pin\InputPinInterface; use PiPHP\GPIO\Pin\OutputPinInterface; interface GPIOInterface { /** * Get an input pin. * * @param int $number The pin number * * @return InputPinInterface */ ...
true
ed71f644d6d31acf9c4bcbf922e6184f5651ed88
PHP
ducthang211/ddthang
/app/Providers/UserProvider.php
UTF-8
3,673
2.5625
3
[]
no_license
<?php namespace App\Providers; use App\Helpers\HttpHelper; use App\User; use GuzzleHttp\Exception\ClientException; use Illuminate\Contracts\Auth\Authenticatable; use \Illuminate\Contracts\Auth\UserProvider as IlluminateUserProvider; class UserProvider implements IlluminateUserProvider { private $httpHelper; ...
true
4b47794d33cbc195c33d71a704cc64144b56bfc3
PHP
kmdmustaq/phpunit
/app/Calculator/Division.php
UTF-8
439
2.984375
3
[]
no_license
<?php namespace App\Calculator; class Division extends CalculatorAbstract implements CalculatorInterface { public function calculate() { if (empty($this->opperands)){ throw new NoOperandsException; } return array_reduce($this->opperands, function($a, $b) { if ...
true
11f3a0d49733d7e05e439b5a7a9d5489d98c04f1
PHP
isaquemenezes/upload_Images
/models/ModelConexao.php
UTF-8
311
2.84375
3
[ "MIT" ]
permissive
<?php namespace Models; abstract class ModelConexao{ #Connect to database protected function conectaDB() { try{ return $con=new \PDO("mysql:host=".HOST.";dbname=".DB."",USER,PASS); }catch (\PDOException $erro){ return $erro->getMessage(); } } }
true
fd0edd6246e881a31a857b3fb9cbe00737c9bfe9
PHP
salodev/salodev
/src/IO/ClientSocket.php
UTF-8
1,756
3.03125
3
[]
no_license
<?php namespace salodev\IO; use salodev\IO\Exceptions\Socket\ConnectionRefused; use salodev\IO\Exceptions\Socket\ConnectionTimedOut; use salodev\IO\Exceptions\Socket as SocketException; use salodev\IO\Stream; /** * Una abstracción para los consumidores de flujo. */ class ClientSocket extends ClientStream { stat...
true
68e94a8cae44ef80e4e86df326597f23c502101d
PHP
robert589/pacific
/common/libraries/UserLibrary.php
UTF-8
1,241
2.6875
3
[ "BSD-3-Clause" ]
permissive
<?php namespace common\libraries; use common\models\User; use common\models\Admin; use frontend\daos\UserDao; use common\models\Owner; class UserLibrary { public static function getRole($id = null) { $dao = new UserDao(); if(!$id) { $id = \Yii::$app->user->getId(); ...
true
b2076b8d086bf8d70df6ed417bda2b75a7ffa4d4
PHP
GreenSoilPeople/aim
/aim-api/database/migrations/2018_03_04_090129_create_sdds_table.php
UTF-8
811
2.515625
3
[]
no_license
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateSddsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('sdds', function (B...
true
2938157cb1f0fc9e3ccaa218f71058c6415fc2f2
PHP
AnnaIi/woofinfo
/libs/write_html.php
UTF-8
268
2.640625
3
[]
no_license
<?php function write_html ($title, $body){ /** функция для работы с шаблоном файла */ $str = file_get_contents("templates/base.html"); $str = str_replace(array("{{title}}", "{{body}}"),array($title, $body), $str); return $str; }
true
939080a480e9ffcd16d1d33c7a6c794974dbc90c
PHP
TypiCMS/form
/src/Elements/DateTimeLocal.php
UTF-8
659
2.71875
3
[ "MIT" ]
permissive
<?php namespace TypiCMS\Form\Elements; use DateTime; class DateTimeLocal extends Text { protected array $attributes = [ 'type' => 'datetime-local', ]; public function value(mixed $value): Input { if ($value instanceof DateTime) { $value = $value->format('Y-m-d\TH:i'); ...
true
68335d2e16fb0d99e96f6b616b935edf87b3473f
PHP
TemirkhanN/view
/src/ViewInterface.php
UTF-8
222
2.59375
3
[]
no_license
<?php declare(strict_types=1); namespace Temirkhan\View; interface ViewInterface { /** * @param mixed $context * * @return string|int|float|array|null */ public function getView($context); }
true
82d6bf17bf3fbea2992c7d2cf788390df5c4c9be
PHP
wp-cli/php-cli-tools
/tests/test-arguments.php
UTF-8
8,085
2.921875
3
[ "MIT" ]
permissive
<?php use cli\Arguments; use WP_CLI\Tests\TestCase; /** * Class TestArguments * @todo add more tests to increase coverage * * @backupGlobals enabled */ class TestArguments extends TestCase { /** * Array of expected settings * @var array */ protected $settings = null; /** * Array ...
true
63bfc4090186d6f8b9aacaf9883776fa71b357b1
PHP
hank789/inwehub_app
/app/Third/Weapp/WeApp.php
UTF-8
2,842
2.65625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Jiawei * Date: 2017/7/29 * Time: 10:04 */ namespace App\Third\Weapp; use App\Third\Weapp\Api\CustomMsg; use App\Third\Weapp\Api\QRCode; use App\Third\Weapp\Api\SessionKey; use App\Third\Weapp\Api\Statistic; use App\Third\Weapp\Api\TemplateMsg; use App\Third\Weapp\Api\WeA...
true
01c1d30ba8f08cc4b967800fe04669b1acf6b12d
PHP
marcioAlmada/redsql
/src/Filters/FilterILIKE.php
UTF-8
709
2.609375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace RedBeanPHP\Plugins\RedSql\Filters; use RedBean_Facade as R; use RedBean_QueryWriter_PostgreSQL; class FilterILIKE extends GenericFilter { protected $operator = 'ILIKE'; public function apply(&$sql_reference, array &$values_reference, array $parameters) { $values_reference[] = $pa...
true
da5a21e8b1bb91a8ce651ddd257510877c2537f2
PHP
radzikowski/ankieta
/lib/model/doctrine/base/BaseConfig.class.php
UTF-8
2,023
2.515625
3
[]
no_license
<?php // Connection Component Binding Doctrine_Manager::getInstance()->bindComponent('Config', 'doctrine'); /** * BaseConfig * * This class has been auto-generated by the Doctrine ORM Framework * * @property string $name * @property string $value * @property timestamp $created_at * * @method string getN...
true
665e3ebdab280e30b89febfc7bd0565252ffbdce
PHP
maxshup/phpcourse
/src/tasks/mysql/1.php
UTF-8
692
2.75
3
[]
no_license
<?php function addToDb($dsn, $username, $password) { try { $dbconnection = new PDO($dsn, $username, $password); } catch (PDOException $exception) { echo $exception->getMessage(); } $statement = $dbconnection->query('SHOW TABLES'); $statement = $dbconnection->prepare("INSERT INTO category(name, description)...
true
9beff1ae852b41b9e0f3b1f97db403789aa3c5d1
PHP
vasil1960/MyApi
/core/Empl.php
UTF-8
363
3.0625
3
[]
no_license
<?php class Empl { public $pdo; public function __construct($pdo) { $this->pdo = $pdo; } public function seyHello() { //$this->pdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); $sql = "SELECT * FROM empl LIMIT 100"; $sth = $this->pdo->prepare($sql); $sth->execute(); re...
true
09b6766eb97e55d9909e00431000639c437c630b
PHP
willpots/MiddMusic
/main/createMain.php
UTF-8
2,927
2.734375
3
[]
no_license
<?php if(isset($_GET['band'])) { ?> <?php if(isset($_POST['submitupdate'])) { global $dbHost, $dbUser, $dbPass, $dbSchema; $con = mysql_connect($dbHost, $dbUser, $dbPass); if(!$con) die('Could not connect: ' . mysql_error()); mysql_select_db($dbSchema, $con) or die('Could not select database'); $picture=nul...
true
ddd99fb2648d5a9c1dc471f4d0522cffe7973aab
PHP
Lyssal/seo
/src/Model/Website.php
UTF-8
2,532
2.921875
3
[]
no_license
<?php /** * This file is part of a Lyssal project. * * @copyright Rémi Leclerc * @author Rémi Leclerc */ namespace Lyssal\Seo\Model; /** * A website. */ class Website { /** * @var string The title */ protected $title; /** * @var \Lyssal\Seo\Model\Page The home page */ protec...
true
60404904f4be6a8295913528ba6bc43e4ae91747
PHP
oxiEva/masakiNews
/Controller/RegistrarUsuario.php
UTF-8
1,218
2.515625
3
[]
no_license
<?php /*Establir la connexio*/ require_once "../Classes/Conexion.php"; /*Carregar les classes q necessitem*/ require_once "../Model/Usuario.php"; require_once "../Model/TipoUsuario.php"; /*Reanudem la sessió*/ session_start(); /*Comprovem que el botó submit cliqui*/ $usuari = new Conexion(); if(isset($_POST['registr...
true
684f4247a4a9f129fcf062e2a6362466fa3a8217
PHP
nasidyo/hdri-new
/util/loadGroupVillage.php
UTF-8
906
2.671875
3
[ "MIT" ]
permissive
<?php require '../connection/database.php'; $db = new Database(); $conn= $db->getConnection(); $sql2=" SELECT "; $sql2.=" idGroupVillage , nameGroupVillage "; $sql2.=" FROM GroupVillage "; $sql2.=" WHERE 1=1 "; if (isset($_GET['idArea'])) { $sql2 .= "AND idArea =".$_GET['idArea']; } if (isset($_GE...
true
94d59ef889627e03f419b4840e3048d1bc0554db
PHP
wordpress2/wordpress2
/asset/unit/app/App.class.php
UTF-8
957
2.71875
3
[]
no_license
<?php /** * unit-app:/App.class.php * * @creation 2018-04-04 * @version 1.0 * @package unit-app * @author Tomoaki Nagahara <tomoaki.nagahara@gmail.com> * @copyright Tomoaki Nagahara All right reserved. */ /** App * * @creation 2018-04-04 * @version 1.0 * @package unit-app * @author Tomoaki...
true
c987cb558f53cb4643cb2265bde095946a25786e
PHP
joshlopes/dota2.mapapi
/src/Dota2MapApi/Controller/MapController.php
UTF-8
1,892
2.703125
3
[]
no_license
<?php namespace Dota2MapApi\Controller; use Dota2MapApi\Api\ApiProblem; use Dota2MapApi\Api\ApiProblemException; use Dota2MapApi\Map\Item\HeroItem; use Dota2MapApi\Map\MapService; use Silex\ControllerCollection; use Symfony\Component\HttpFoundation\Response; class MapController extends BaseController { protected...
true
c4377d38a35659188964a2cd7d8f8d6eb57057d5
PHP
vzsMike82/API_test
/src/ApiPaymentBundle/Validation/Models/ChargeModel.php
UTF-8
874
2.59375
3
[ "MIT" ]
permissive
<?php namespace ApiPaymentBundle\Validation\Models; use Symfony\Component\Validator\Constraints as Assert; use \ApiPaymentBundle\Validation\ConstraintCollection as ModelAssert; class ChargeModel { /** * @ModelAssert\ConstraintAlphanumeric(code="400", message="Invalid parameter \payment_id\") */ pr...
true
3fa040e53baa8777822aeeafb6072f78d0d863e8
PHP
Edrard/Atm
/src/Atm/Database/DataManipulate.php
UTF-8
1,686
2.609375
3
[]
no_license
<?php namespace edrard\Atm\Database; use edrard\Log\MyLog; use Pixie\QueryBuilder\QueryBuilderHandler; use edrard\Atm\Exception\CriticalAtmException; use edrard\Atm\Database\DbBase; use edrard\Atm\Database\IntDataManipulate; class DataManipulate extends DbBase implements IntDataManipulate { public function insert...
true
bae1352f301a677b62230188bbef2a01c8463d94
PHP
Gundwane/busweb
/public_html/construyeBondis.php
UTF-8
1,022
2.734375
3
[]
no_license
<?php require './Conexion.php'; $conexion = new Conexion(); $getConexion = $conexion->getConexion(); $asientos = $_POST['numeroAsientos']; $patente = $_POST['patente']; echo "<script language='javascript'>console.log($asientos)</script>"; try { for ($i = 0; $i <= $asientos - 1; $i++) { if ($i < 2...
true
4ffc9ff200a8754a9831d3a5ea9572c54be54b11
PHP
derkurier100/igl
/sitecake/2.4.10/src/Sitecake/Plugin/PluginRegistry.php
UTF-8
2,719
2.5625
3
[]
no_license
<?php namespace Sitecake\Plugin; use Composer\Autoload\ClassLoader; use Sitecake\Api\Exception\MissingPluginException; use Sitecake\Api\Sitecake; use Sitecake\ServiceProviders\Config\Configuration; use Sitecake\Util\ObjectRegistry; use Sitecake\Util\Text; class PluginRegistry extends ObjectRegistry { const NAMES...
true
53355b3ff7373c8ecac4121f9abcd5ae4244dda2
PHP
ElomariHana/GestionVeaux
/createLivestock.php
UTF-8
4,987
2.59375
3
[ "LicenseRef-scancode-other-permissive" ]
permissive
<?php session_start(); if(!isset($_SESSION['login'])) { header("Location: login.php"); } require 'db.php'; $message = ''; if (isset ($_POST['type']) && isset($_POST['Troupeau']) && isset($_POST['sexe']) && isset($_POST['ID']) && isset($_POST['DateNaissance']) &&isset($_POST['PoidsNaissance']) && ...
true
e1e955c0a5a5c5bfc90484a9d1e3a9175a892c76
PHP
DjebbZ/drupalcommerce
/modules/order/includes/views/handlers/commerce_order_handler_field_order_total_quantity.inc
UTF-8
902
2.5625
3
[]
no_license
<?php // $Id$ /** * Field handler to present a link to an order. */ class commerce_order_handler_field_order_total_quantity extends views_handler_field { function construct() { parent::construct(); $this->additional_fields['order_id'] = 'order_id'; } function query() { $this->ensure_my_table(); ...
true
32a623e83dbd515350437077e9d197a352f9f223
PHP
eXistenZx/Find-Your-Team
/content/themes/fyt/inc/customizer/customize-header.php
UTF-8
1,536
2.59375
3
[]
no_license
<?php create_section_header($wp_customize, 'find_your_team_theme_panel'); function create_section_header($wp_customize, $panel_id) { // Ajout d'une section pour la gestion des posts sur la front page $wp_customize->add_section( 'fyt_header' , [ 'title' => 'Header', 'panel' => $panel_id, ]); ...
true
c96842cc8dd4bb357bbd8287fce9eebef8fea6c1
PHP
akazad1235/lumen-api-basic-to-advance
/app/Http/Controllers/MyController.php
UTF-8
410
2.53125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\User; use Illuminate\Http\Request; Class MyController extends Controller{ public function person(){ $myArray = array('name'=>'md.azad hsoen', 'age'=> 23, 'roll'=> 11); return response()->json($myArray); } //data input from body, header & ...
true
82aadad5b26b14f454dbc3261062e974b110d538
PHP
Maelien22/algoBreizz
/Site/model/back/function.php
UTF-8
4,317
2.703125
3
[]
no_license
<?php require('../../model/general/database.php'); /***** Catégories *****/ function affiche_cat(){ global $bdd; $req = $bdd->query('SELECT * FROM categorie WHERE id_parent = 0'); $cat = $req; return $cat; } function cat(){ global $bdd; $req = $bdd->query('SELECT * FROM categorie');...
true
94100de82d34523efd9925156a909f6b34ded03f
PHP
spira/spira
/api/app/Extensions/Socialite/One/AbstractProvider.php
UTF-8
3,299
2.546875
3
[ "MIT" ]
permissive
<?php /* * This file is part of the Spira framework. * * @link https://github.com/spira/spira * * For the full copyright and license information, please view the LICENSE file that was distributed with this source code. */ namespace App\Extensions\Socialite\One; use Illuminate\Http\Request; use Illuminate\Suppo...
true
68476110788485652e6886bef860dcc72bee30d9
PHP
codesinging/pin-admin-backup-20210206
/src/Viewless/Validation/Rule.php
UTF-8
5,788
2.921875
3
[ "MIT" ]
permissive
<?php /** * Author: codesinging <codesinging@gmail.com> * Github: https://github.com/codesinging */ namespace CodeSinging\PinAdmin\Viewless\Validation; use Closure; use Illuminate\Support\Str; /** * Class Rule * * @method $this isString() * @method $this isNumber() * @method $this isBoolean() * @method $thi...
true
7467ce499d3f0be7b795e9268ebbcca7814c3d48
PHP
alex60217101990/ratchet-reactphp-pthreads
/app/Listeners/ProtobufTCPSubscribe.php
UTF-8
2,071
2.53125
3
[ "MIT" ]
permissive
<?php namespace App\Listeners; use App\CustomClasses\Interfaces\GlobalConstants; use App\Events\ProtobufTCPEvent; use Exception; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Redis; use Proto\Data\User; use Proto...
true
e28add9b3665280a01b8399b18e124c4fc21d546
PHP
GEEI-MAP-Group15/geeimap
/src/Entity/Student.php
UTF-8
4,848
2.59375
3
[]
no_license
<?php namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity(repositoryClass="App\Repository\StudentRepository") */ class Student { /** * @O...
true
78c3411661e313cf835ac890a1eb4366cf2b9ea6
PHP
humweb/sociable
/src/Models/SocialConnection.php
UTF-8
1,791
2.609375
3
[ "MIT" ]
permissive
<?php namespace Humweb\Sociable\Models; use Illuminate\Database\Eloquent\Model; /** * Class SocialAuth * * @package Humweb\SociableConnection\Models */ class SocialConnection extends Model { protected $table = 'social_connections'; protected $fillable = ['provider', 'user_id', 'social_id', 'oauth_versi...
true
33608a9940ab70f07ce70c5cb15bb8ec6568baab
PHP
rasansmn/Quiz_App
/quiz_extended/application/models/questionmodel.php
UTF-8
2,302
2.5625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class QuestionModel extends CI_Model{ function __construct(){ parent::__construct(); $this->load->database(); } public function get_question($args){ $valid_column_names = array('qid', 'question', 'opt1', 'opt2', 'opt3', 'opt4', 'answer'); $where =...
true
d787317eb875f5e077a50503fe68ba03f5108b7a
PHP
mhunger/taurus
/taurus/framework/annotation/PasswordHash.php
UTF-8
1,197
2.828125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: michaelhunger * Date: 05/11/17 * Time: 17:46 */ namespace taurus\framework\annotation; class PasswordHash extends AbstractAnnotation implements InputProcessor { const ANNOTATION_NAME_PASSWORD_HASH = 'PasswordHash'; /** @var string */ private $algo; /** ...
true
53d21aeabe5066585fbd662ea3b757f6f0aabb02
PHP
fabiing10/smsgroup
/app/controllers/FilesController.php
UTF-8
2,188
2.546875
3
[ "MIT" ]
permissive
<?php class FilesController extends \BaseController { /** * Display a listing of the resource. * * @return Response */ public function link_adjunto($mensaje){ $adjunto_mensaje = AdjuntoMensaje::where('mensaje_id','=',$mensaje)->get(); foreach($adjunto_mensaje as $a_m){ ...
true
80aa06178f85e466623c80623087ec1adb0e6ddd
PHP
sineus/shop.ironova.com
/test/paymentTest.php
UTF-8
4,969
2.625
3
[]
no_license
<?php //** CONNECT BDD $host = 'ironovacmo2015.mysql.db'; $name = 'ironovacmo2015'; $user = 'ironovacmo2015'; $psw = 'RPzaYCjhEFUR'; try{ $bdd = new PDO('mysql:host='.$host.';dbname='.$name, $user, $psw); $bdd->exec("SET CHARACTER SET utf8"); } catch(Exception $e){ die('Erreur : '.$e->getMessage...
true
fb53bf24db4c108c69296f3c95fd0bc5a0c19773
PHP
mohammadDV/parim
/system/Database/Traits/HasRelation.php
UTF-8
3,918
2.578125
3
[]
no_license
<?php namespace System\Database\Traits; trait HasRelation { protected function hasOne($model,$foreignKey,$localKey) { if (!empty($this->{$this->primaryKey})){ $modelObject = new $model(); return $modelObject->getHasOneRelation($this->table,$foreignKey,$localKey,$this->$local...
true
7a7421d6abcb97a26848f3b0d11fd0d0182b2b2b
PHP
dmiyakoshi/PHP_exercise
/01_study/08/function_scope.php
UTF-8
97
3.203125
3
[]
no_license
<?php function add($a, $b) { $sum = $a + $b; return $sum; } add(2, 3); var_dump($sum);
true
bebc10028a4ecadce4b5956822a961027b04c9d9
PHP
cglu/tlook
/B00001_php_pattern/iterator/index.php
UTF-8
2,918
3.953125
4
[]
no_license
<?php /** * 具體迭代器 * @author root * */ class ConcreteIterator implements Iterator { private $_arr; private $_key; public function __construct($arr) { $this->_arr = $arr; $this->_key = 0; } /* * (non-PHPdoc) * @see Iterator::current() */ public function ...
true
26dbad8e76543a69125c627f58d634e311a00fbf
PHP
gunderwonder/cobweb
/utilities/logging/firephp_log_formatter.class.php
UTF-8
1,853
2.75
3
[]
no_license
<?php /** * @version $Id$ * @licence http://www.opensource.org/licenses/bsd-license.php The BSD License * @copyright Upstruct Berlin Oslo */ require_once COBWEB_DIRECTORY . '/vendor/firephp/FirePHP.class.php'; /** * @package Cobweb * @subpackage Logging * @author Øystein Riiser Gundersen <oystein@upstru...
true