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
10e630e2a4d636ee721eb1f4c117475ebfdb24e8
PHP
ShayHa/trip-project
/functions/functions.php
UTF-8
11,851
3.015625
3
[]
no_license
<?php session_start(); define( "MAX_SEARCH_RESULTS", "5" ); /* * Initialize DB connection * From outer config file */ $configs = include("../config.php"); $host = $configs['host']; $database = $configs['database']; $user =$configs['user']; $password = $configs['password']; // mysqli constructor $mysqli = new mysq...
true
b723d23f247f0172e56dbb2a37f8ac8593825f10
PHP
donnymaster/ppsa
/app/Services/DoctorService.php
UTF-8
1,952
2.515625
3
[ "MIT" ]
permissive
<?php namespace App\Services; use App\Models\Doctor; use App\Models\Role; use App\Models\User; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; use App\Contracts\FileStorageServiceContract as FileStorage; class DoctorService { private $fileService; public function __construct(FileSt...
true
baecf71fefe03c58ca66aaa7e1a3bb981be8f16d
PHP
Tecnoready/Common
/Service/Statistics/Adapter/Yii2ActiveRecordAdapter.php
UTF-8
2,655
2.578125
3
[ "Apache-2.0" ]
permissive
<?php /* * This file is part of the BtoB4Rewards package. * * (c) www.btob4rewards.com * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Tecnoready\Common\Service\Statistics\Adapter; use Tecnoready\Common\Model\Statist...
true
00868cfb4be233b4484f75db95ed4a2a1b7b27c1
PHP
nhrade/DBMScienceFairProject
/LoginManager.php
UTF-8
3,064
2.953125
3
[]
no_license
<?php /** * LoginManager.php */ require_once 'config.php'; class LoginManager { public static function show_error_alert($msg) { echo <<<ALERT_WRONG_PASS <div id="wrong-pass-alert" style="max-width: 20em; margin: 0 auto;" class="alert alert-danger aler...
true
c957659fa9a8c2b33c962dc2b34edf1c9d27ebb4
PHP
liyadongcn/g2gw
/common/models/AuthAssignment.php
UTF-8
2,437
2.671875
3
[]
no_license
<?php namespace common\models; use Yii; use yii\db\ActiveRecord; use yii\behaviors\TimestampBehavior; use common\models\AuthItem; use common\models\User; use yii\helpers\ArrayHelper; /** * This is the model class for table "auth_assignment". * * @property string $item_name * @property string $user_id * @propert...
true
fa8c4e1bcdc65f525e9884a1fe771a37352a85ad
PHP
EvgeniiZaets/PersonnelDepartment-Yii2-
/services/Notifier.php
UTF-8
480
2.828125
3
[ "BSD-3-Clause" ]
permissive
<?php namespace app\services; use Yii; class Notifier implements NotifierInterface { private $fromEmail; public function __construct($fromEmail) { $this->fromEmail = $fromEmail; } public function notify($email, $message) { if ($email) { Yii::$app->mailer->compose(...
true
e622dcf6ecf05a8e1c4f294267ab8057a1723022
PHP
kojamam/CodeIQ
/closed/2495-sinchoku.php
UTF-8
187
2.734375
3
[]
no_license
<?php $in = explode(",", trim(fgets(STDIN))); $progress = $in[1] / $in[0]; if($progress > 1){ echo "invalid"; }else{ for ($i=0; $i < floor($progress*100); $i++) { echo $in[2]; } }
true
3c0224c811e253af291e54725af4962e126361cb
PHP
Maarten-Mollee/image-library
/index.php
UTF-8
2,184
2.546875
3
[]
no_license
<?php include "DB_connect.php"; session_start(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="css/style.css" type="text/css"> <link rel="stylesheet" href="css/index.css" type="text/css"> <title>Index</title> </head> <...
true
620b450d3492195ce2886a9e0c0b54eff814cf7c
PHP
lordkaiser/evolve
/web/library/Controller.php
UTF-8
2,841
2.65625
3
[]
no_license
<?php require_once('View.php'); date_default_timezone_set('America/Denver'); class Controller{ public $view; function __construct(){ $this->view = new View(); } public function load($view, $queries = array()){ $data = array(); foreach($queries as $key => $value) { $data[$key] = $value; } $pat...
true
b415f2705061310f9a2ac75d0e7abd6b6896437c
PHP
GuldLuca/web-dev
/fourth-lesson/loops.php
UTF-8
542
3.75
4
[]
no_license
<?php $letters = ['a', 'b', 'c']; // For each loop /*foreach($letters as $letter){ echo $letter; echo '<br>'; }*/ /*foreach($letters as $index =>$value){ echo $index; echo '<br>'; echo $value; echo '<br>'; }*/ //For loop /*for($i = 0 ;...
true
94abb54e8c97d5a87f2efa31415bfebe0ea721eb
PHP
highestgoodlikewater/ecshoptk
/ThinkPHP/Library/Vendor/Smarty/plugins/function.url.php
UTF-8
1,033
2.75
3
[ "Apache-2.0" ]
permissive
<?php /** * Smarty plugin * * @package Smarty * @subpackage PluginsFunction */ /** * Smarty {fetch} plugin * * Type: function<br> * Name: fetch<br> * Purpose: fetch file, web or ftp data and display results * * @link http://www.smarty.net/manual/en/language.function.fetch.php {fetch} * (Sma...
true
aad02834593d2455215645b54aeab763babf8746
PHP
kalwe/boas_praticas
/SOLID/SRP/Solucao/Repository/ClienteRepository.php
UTF-8
1,132
3.265625
3
[]
no_license
<?php // Repository e um padrao // Responsabilidade de conhecer* o banco e executar a acao class ClienteRepository { // Este metodo ainda nao esta perfeito, // porem ja conseguimos isolar a conexao com database, do dominio da minha aplicacao public function adicionaCliente($cliente) { // Conecta ...
true
d48a05bb5d04826a73c5bc341ea85c4f0ebf3656
PHP
mod2/bookkeeper
/templates/hidden.php
UTF-8
1,467
2.515625
3
[]
no_license
<?php include 'header.php'; ?> <section id="detail"> <div id="view"> <h1>Hidden</h1> <nav class="history"><a href="<?php echo $args->app_url . '/' . $args->username . '/finished'; ?>">Finished &rarr;</a></nav> <?php if (count($args->hiddenBooks) > 0): ?> <ul class="allbooks archive"> <?php $lastYear = '';...
true
93e6905956bf8667ffff2b648c1fb0fd22fcdd26
PHP
delboy1978uk/pimcore
/pimcore/lib/Pimcore/Placeholder.php
UTF-8
9,659
2.78125
3
[ "BSD-3-Clause" ]
permissive
<?php /** * Pimcore * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://www.pimcore.org/license * * @copyright Copyright (c) 2009-2014 pimcore GmbH (h...
true
4697fbf8208b1d2e65d1c1d22dae6e87bb3d614e
PHP
ahmedsamir732/Cart
/src/Controller/ProductController.php
UTF-8
716
2.703125
3
[]
no_license
<?php /** * Product Controller. * * @author Ahmed Samir <ahmedsamir732@gmail.com> */ namespace App\Controller; use Symfony\Component\HttpFoundation\Response; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\Routing\Annotation\Route; use App\Entity\Product; class ProductController ex...
true
08f2227591dc735af0f2499be1b5577706d029ea
PHP
Rishabh0492/ap
/app/Repositories/LabelRepository.php
UTF-8
3,858
2.765625
3
[ "MIT" ]
permissive
<?php namespace App\Repositories; use App\Label; use Illuminate\Http\Request; class LabelRepository implements BaseRepository { /** * Delete a task. * * @param integer $id * * @return boolean */ public function deleteLabel($id) { $labels=Label::find($id); $labels->delete(); return true; } ...
true
8dfc10b87676ad679bbdfbfc2d2b46eb23c3f458
PHP
gitalexd/Pet
/pets/php/simple_numbers/v2.php
UTF-8
526
3.3125
3
[]
no_license
<h1>Простые числа</h1> <p>Добрый день! Вашему вниманию представляется алгоритм вывода простых чисел.</p> <?php $x = range(2, 10000); for ($i=0; $i <count($x) ; $i++) { $str = ''; for ($y=1; $y <= $x[$i]; $y++) { if (($x[$i]%$y) == 0) { if ($y == 1) continue; if ($y...
true
aa839f79e41f7d30af76a45fc097738badcfde86
PHP
college-retirement/gma
/app/lib/GMA/Data/Models/SortableModel.php
UTF-8
579
2.59375
3
[ "MIT" ]
permissive
<?php namespace GMA\Data\Models; use Jenssegers\Mongodb\Model as Model; class SortableModel extends Model { public function scopeWithSortables($query, $sortables) { if (count($sortables) < 1) { return $query; } if (count($sortables) == 1) { return $query->o...
true
578be4f73d996b4eeb1db0b51059fa046957a6f5
PHP
microsoftgraph/msgraph-beta-sdk-php
/src/Generated/Models/UnifiedRoleManagementPolicy.php
UTF-8
11,639
2.640625
3
[ "MIT" ]
permissive
<?php namespace Microsoft\Graph\Beta\Generated\Models; use DateTime; use Microsoft\Kiota\Abstractions\Serialization\Parsable; use Microsoft\Kiota\Abstractions\Serialization\ParseNode; use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter; use Microsoft\Kiota\Abstractions\Types\TypeUtils; class UnifiedRo...
true
8f3d9f7e9e020d477364c16871afa27e18834d4e
PHP
yazaki-ryo/line_api_test
/app/Traits/Repositories/Notifiable.php
UTF-8
1,432
2.625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace App\Traits\Repositories; use App\Repositories\NotificationRepository; use Illuminate\Notifications\DatabaseNotificationCollection; trait Notifiable { /** * @param mixed $instance * @return void */ public function notify($instance): void { ...
true
dabe8e0a8a5f240c9ef36a7974c4067b8ef0546e
PHP
Lord-Me/drinks
/gettext.php
UTF-8
835
2.53125
3
[ "MIT" ]
permissive
<?php use Twig\Environment; use Twig\Loader\FilesystemLoader; require('config/bootstrap.php'); $tplDir = dirname(__FILE__).'/templates'; $tmpDir = dirname(__FILE__).'/templates_php'; $loader = new FilesystemLoader($tplDir); // force auto-reload to always have the latest version of the template $twig = new Environment($...
true
4a4cc7ee7ce6dd8ee698bb74d37be99c77fdc757
PHP
omissis/psr-http
/src/Psr/Http/Response/Header/RefreshInterface.php
UTF-8
465
2.734375
3
[]
no_license
<?php namespace Psr\Http\Message\Header; use Psr\Http\HeaderInterface; /** * Interface for Refresh header * Used in redirection, or when a new resource has been created. * This refresh redirects after 5 seconds. * This is a proprietary, non-standard header extension introduced by Netscape and supported by most...
true
70d4734fdcc9d392f8ba4c47df8f904f11491c16
PHP
martinsik/php-doc-parser
/features/bootstrap/ParserResultContext.php
UTF-8
2,690
2.578125
3
[ "CC-BY-3.0", "MIT" ]
permissive
<?php use Behat\Behat\Context\ClosuredContextInterface, Behat\Behat\Context\TranslatedContextInterface, Behat\Behat\Context\BehatContext, Behat\Behat\Exception\PendingException; use Behat\Gherkin\Node\PyStringNode, Behat\Gherkin\Node\TableNode; use DocParser\ParserResult; class ParserResultContext ex...
true
9a9cf0aa4bb6f2e8e93a53060419d9b30c53ccac
PHP
jbeyer1984/Portal
/src/Acme/PortalBundle/Form/DataTransformer/TagTransformer.php
UTF-8
890
2.703125
3
[ "MIT" ]
permissive
<?php namespace Acme\PortalBundle\Form\DataTransformer; use Symfony\Component\Form\DataTransformerInterface; class TagTransformer implements DataTransformerInterface { /** * Transforms the Document's value to a value for the form field */ public function reverseTransform($tag) { if (!$tag) { $t...
true
8a90ec07f71529a9014afaf86c8af5bad2defae9
PHP
igorbush/php-diplom
/models/users.php
UTF-8
1,956
3.34375
3
[]
no_license
<?php class Users { public $db = null; /** * Users constructor. * @param object(PDO) $db */ public function __construct($db) { $this->db = $db; } /** * @return array */ public function getAll() { $query = "SELECT id, login, password FROM admins"; $sth = $this->db->prepare($query); $sth->exe...
true
dc6b47b91d4124a10ed08a31537d4747e4c3a48a
PHP
SeStep/typeful
/src/TestDoubles/DummyTypefulRepository.php
UTF-8
646
2.59375
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace SeStep\Typeful\TestDoubles; use SeStep\Typeful\Service\TypefulRepository; class DummyTypefulRepository extends TypefulRepository { private $created = []; private $updated = []; public function getCreated(): array { return $this->created; } pu...
true
f99e39612c5ad5b083da898c5b80a2137da7f93c
PHP
carlonicora/php-test-2020101
/src/Models/Index.php
UTF-8
1,718
2.671875
3
[]
no_license
<?php namespace CarloNicora\Minimalism\PhpTest\Models; use CarloNicora\JsonApi\Objects\Link; use CarloNicora\Minimalism\Abstracts\AbstractModel; use CarloNicora\Minimalism\PhpTest\Commands\ApiCommand; use CarloNicora\Minimalism\PhpTest\PhpTest; use Exception; class Index extends AbstractModel { /** @var string|nu...
true
aeb48a8ce30907b817ec6dcb74eb38077d7b4a2c
PHP
dafik/dfi-zf
/src/Dfi/View/Helper/DynamicForm/Modal.php
UTF-8
5,815
2.671875
3
[ "MIT" ]
permissive
<?php namespace Dfi\View\Helper\DynamicForm; use Dfi\Exception\AppException; use Dfi\View\Helper\DynamicForm\Callback as Clback; class Modal { /** * @var string */ protected $selector; /** * @var string */ protected $title; /** * @var string */ protected $open...
true
c804ccc6cb9b77900f2728d55aeb57239bdaa678
PHP
Deden-Den/project01
/shalahuddin/app/Config/Validation.php
UTF-8
1,563
2.65625
3
[ "MIT" ]
permissive
<?php namespace Config; class Validation { //-------------------------------------------------------------------- // Setup //-------------------------------------------------------------------- /** * Stores the classes that contain the * rules that are available. * * @var array */ public $ruleSets = [...
true
5ddf5552802d5258bd93ca51c2b678c3b1b87312
PHP
EOLed/mcac
/www/app/Controller/Component/FlyLoaderComponent.php
UTF-8
2,390
2.671875
3
[]
no_license
<?php class FlyLoaderComponent extends Component { var $controller = null; var $COMPONENT_TYPE = "Component"; var $HELPER_TYPE = "Helper"; var $BEHAVIOR_TYPE = "Behavior"; function initialize(Controller $controller) { // saving the controller reference for later use $this->...
true
21abbbca90921fe90ffe774a86ae4d400aff1823
PHP
mhoumann87/php
/basic_php/lab_1_1/index.php
UTF-8
499
3.75
4
[]
no_license
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Hello</title> <link rel="stylesheet" href="style.css"> </head> <body> <?php //echo '<h1>Hello World</h1><br>'; //simpel website /* multiline comments */ $myCounter = 1; $myString = "Hello"; $myArray = array("One", "Two", "Three"); $na...
true
9531b619f1e48f81c5de91a7acb57b2a1fd67141
PHP
casudinlix/tes-app-license
/app/Console/Commands/getapi.php
UTF-8
2,191
2.8125
3
[ "MIT" ]
permissive
<?php namespace App\Console\Commands; use Illuminate\Console\Command; use Curl\Curl; class getapi extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'get:token {app_type} {app_name} {app_domain} {app_ip_server}'; /** ...
true
7301b9ffb658fbde623fed976c49cedacbdcc398
PHP
orcknight/GameServer
/trunk/server/main/dao/NpcDao.php
UTF-8
755
2.96875
3
[]
no_license
<?php namespace dao; use DbHelper; require_once __DIR__ . '/../db/DbHelper.php'; class NpcDao{ public function queryNpcs($roomName){ $db = new DbHelper(); $querySql = "SELECT * FROM npc WHERE roomName = '$roomName'"; $result = $db->query($querySql); if(!$result){ ...
true
ab48b619f29d3d954d41d5950465b6208a59b6db
PHP
SeriaAS/SeriaPlatform
/apps/cdn/classes/SERIA_CDNServer.class.php
UTF-8
2,011
2.578125
3
[]
no_license
<?php class SERIA_CDNServer extends SERIA_FluentObject { static function createObject($p=false) { return SERIA_Fluent::createObject('SERIA_CDNServer', $p); } static function fromDB($row) { return SERIA_Fluent::createObject('SERIA_CDNServer', $row); } public static function fluentSpec() { return array('table...
true
120d046ad10ca0b6f35b6f02befb132acf45938a
PHP
BensalemIlyas/Projet-PHP-DUT
/vue/Table.php
UTF-8
665
3.203125
3
[]
no_license
<?php class Table{ private $_table; public function __construct($border,$cellpadding,$cellspacing,$width){ $this->_table .='<table border="'.$cellpadding.'" cellpadding= "'.$cellpadding.'" cellspacing="'.$cellspacing.'" width="'.$width.'"> '; } public function trStart(){ $this->_table .="<tr>"; } ...
true
2b65d8a08ee087f88232235db951994b181a6b83
PHP
jhazz/icity
/js/jsa/src/json_getdir.php
UTF-8
2,077
2.6875
3
[ "MIT" ]
permissive
<?php function collectFiles($localPath,&$dirRecords,&$recId,$parentId=0,$level=0){ $recCount=0; $localFileRecords=array(); if (is_dir($localPath)) { if ($dh = opendir($localPath)) { while (($fileName = readdir($dh)) !== false) { if(($fileName=='.')||($fileName=='..')) con...
true
31b9014a9ae41a35c9a78f3f6ffbea6a2811f04a
PHP
ksindev/POP-Framework
/lib/db/mysql.php
UTF-8
1,439
2.90625
3
[]
no_license
<?php class MySql { protected static $connection; public function __construct($host, $user, $pass, $database) { if (!isset(self::$connection)) { self::$connection = new mysqli($host, $user, $pass, $database); } if (self::$connection === false) { //TO DO: implement error logging echo "Connection er...
true
11934e60a4bad971b0012c20b46503b8421ffdf1
PHP
AUFrasier/reliapost-general-plugin
/classes/log.php
UTF-8
1,700
2.78125
3
[]
no_license
<?php namespace reliapost_registration; class Log { public static function addEntry($message) { $file = static::getLogFile(); if (is_writable($file)) { $date = date("m-d-Y H:i:s e", time()); $bt = debug_backtrace(); $filepath = basename($bt[0]['file']); $tag = $filepath ...
true
ea5eff45c93a0b394354da4ccc1705b27e81964f
PHP
dev-mev/to_do
/app/init.php
UTF-8
494
2.5625
3
[]
no_license
<?php session_start(); $_SESSION['user_id'] = 1; $url = getenv('JAWSDB_URL'); $dbparts = parse_url($url); $hostname = $dbparts['host']; $username = $dbparts['user']; $password = $dbparts['pass']; $database = ltrim($dbparts['path'],'/'); $conn = new PDO("mysql:host=$hostname;dbname=$database", $username, $password);...
true
6176571453b5661872b64fb273324ab589a786aa
PHP
ElasticOrange/Canon-Easter
/app/Http/Controllers/Admin/AdminUserController.php
UTF-8
2,313
2.609375
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Admin; use Illuminate\Http\Response; use Session; use App\Admin; use App\Http\Requests; use App\Http\Controllers\Controller; //use Illuminate\Http\Request; use Request; class AdminUserController extends Controller { public function index() { $users = Admin::all(); ...
true
c9872fbfd4a9e1d56e63ea2c31a20129ab027d21
PHP
asepmedia/saga-cms
/application/models/module/M_role.php
UTF-8
3,102
2.59375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /** * @name Saga Role Model * @author Asep Yayat * @version v.0.0.1 * @since 2018 * @email asepmedia18@gmail.com */ class M_role extends CI_Model { static $table = 'saga_module_role'; static $pk; /** * Has Role function * * @...
true
7f1a44a6b3edf48f9ca3b4e3ae68f6cfabbe5ef6
PHP
wentmac/TmacPHP
/Tmac/Plugin/Functions.class.php
UTF-8
10,979
2.828125
3
[]
no_license
<?php /** * 函数库 * ============================================================================ * Power By Tmac PHP MVC framework * $Author: zhangwentao $ <zwttmac@qq.com> * $Id: Functions.class.php 325 2016-05-31 10:07:35Z zhangwentao $ * http://www.t-mac.org; */ class Functions { /** * 获取客户端IP地址 ...
true
dd58739636349a2ca43fe3991e343dd342e653d3
PHP
ridwandevs/expos-backend
/app/Repositories/Merchants/Employees/AttendanceRepository.php
UTF-8
1,309
2.59375
3
[ "MIT" ]
permissive
<?php namespace App\Repositories\Merchants\Employees; use App\Repositories\Merchants\Stores\IdentifierRepository; use Carbon\Carbon; use Illuminate\Support\Facades\Hash; class AttendanceRepository { protected $store; protected $dt; public function __construct($store) { $id = new IdentifierRe...
true
18b222babbfb3d8091dd6ab401441767e92d0ac1
PHP
algebrateam/phpdev2019
/mdrnasin/6.2.vrste_polja.php
UTF-8
399
3.21875
3
[ "MIT" ]
permissive
<?php $polje=array('Tesla','Edison','Bell'); print_r($polje); //debugger echo "<hr>"; var_dump($polje); echo "<hr>"; $polje[]='Benjamin Franklin'; var_dump($polje); //array push echo "<hr>"; array_push($polje, 9876); var_dump($polje); // dodajemo direktno echo "<hr>"; $polje[5]='Newton'; var_dump($polje); ...
true
10329c1f994a9bdf513a0ab99655b0256c8bb08e
PHP
dvsa/olcs-backend
/module/Api/src/Domain/Command/Task/CreateTranslateToWelshTask.php
UTF-8
604
2.640625
3
[ "MIT" ]
permissive
<?php /** * Create Translate To Welsh Task * * @author Rob Caiger <rob@clocal.co.uk> */ namespace Dvsa\Olcs\Api\Domain\Command\Task; use Dvsa\Olcs\Transfer\Command\AbstractCommand; /** * Create Translate To Welsh Task * * @author Rob Caiger <rob@clocal.co.uk> */ final class CreateTranslateToWelshTask extends...
true
c23b1b68c8497d1b812639929a9320bff69ae457
PHP
Smart-Web-Elements/space-sdk
/tests/SpaceTestCase.php
UTF-8
6,813
2.609375
3
[]
no_license
<?php namespace Swe\SpaceSDK\Tests; use GuzzleHttp\Exception\GuzzleException; use Swe\SpaceSDK\AbstractApi; use Swe\SpaceSDK\Space; /** * Class SpaceTestCase * * @package Swe\SpaceSDK\Tests * @author Luca Braun <l.braun@s-w-e.com> */ class SpaceTestCase extends ClientTestCase { /** * @var Space */...
true
8cebdbac8f629f6385097fd37e46454a59776f97
PHP
soplar/ciBlog
/application/models/Post_model.php
UTF-8
2,676
2.71875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php // Vergeet niet in config/autoload model te laden // in config/database voer gegevens in class post_model extends CI_Model{ public function __construct(){ $this->load->Database(); } public function get_posts($slug = FALSE){ if($slug === FALSE){ ...
true
78ea63a5deb26f65e82fd981435aba59d26a7125
PHP
lanlin/phptars-ide-helper
/src/TUPAPI.php
UTF-8
12,898
2.71875
3
[ "MIT" ]
permissive
<?php /** * ---------------------------------------------------------------------------------- * Tup API * ---------------------------------------------------------------------------------- * * @author lanlin * @change 2021/06/01 */ class TUPAPI { // ---------------------------------------------------------...
true
73b10811a393595e69be807335d37daa0bd916c7
PHP
vladimirbulichev/gilded-rose-refactoring-kata-php
/php7/src/Sulfuras.php
UTF-8
552
2.640625
3
[ "MIT" ]
permissive
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ namespace App; /** * Description of Sulfuras * * @author vvb */ class Sulfuras extends Item { //put your code here ...
true
0640afa64e7ecd7340246a505874373bc29eb877
PHP
Nathaelle/TP_Todolist_Cavaillon
/controllers/Membre.php
UTF-8
1,332
2.625
3
[]
no_license
<?php namespace Controllers; use Models\Tache; class Membre { private $view; function __construct() { } function init() { if(isset($_REQUEST['tache'])) { $this->view = $this->indexWithTask(); } else { $this->view = $this->index(); } } functi...
true
680757c96fba9e1ed1f3326a6758fddbaac0c9a0
PHP
dongxiaofu/algorithm-note
/Sort/ShellSort.php
UTF-8
1,279
3.234375
3
[]
no_license
<?php /** * 希尔排序 * 1.按一组连续的步长N1,N2,N3,对N1 和 N1-N1 比较大小,并交换位置 * 2.一个步长排序完毕后,就按下一个步长排序,最后分解为按步长1排序。 * 3.按步长1排序数组,可以实现排序,之前的步长排序的作用是使数组变得有序一些,使最后按步长1排序效率高。 */ namespace App\Sort; require_once dirname(__DIR__) . '/Autoload.php'; class ShellSort extends BaseSort { private const BASE_STEP = 2; public functio...
true
3d9f9c403043a8e326ab80501cb25d51f9488d3a
PHP
dileeban/way2sms-php
/way.php
UTF-8
4,144
2.8125
3
[]
no_license
<?php // SMS class - See send.php for simple usage class way2sms { private $DOMAIN = "http://site5.way2sms.com"; private $INDEXURL; private $AUTHURL; private $SMSURL; private $KILLURL; private $FETCHACTIONURL; private $COOKIEFILE; private $action; private $isloggedin; //constructor that initializes all th...
true
aa96ecf07ed39020de554de5baabedf426c3609a
PHP
breatheco-de/old_website
/wp-content/themes/thedocs-child/src/php/BreatheCode/Controller/SearchController.php
UTF-8
2,294
2.515625
3
[]
no_license
<?php namespace BreatheCode\Controller; use WPAS\Exception\WPASException; use \WP_Query; class SearchController{ public function renderSearch(){ $query_args = array( 's' => $_GET['s'], 'post_type' => $_GET['post_type'], 'posts_per_page' => -1 );...
true
4c7a5549ea806b9b49e717b52e78a20fccf36844
PHP
CrixuAMG/laravel-circuitry
/src/Circuitry/Circuit.php
UTF-8
1,175
2.875
3
[]
no_license
<?php namespace CrixuAMG\Circuitry\Circuitry; use Illuminate\Support\Manager; use CrixuAMG\Circuitry\Drivers\ApcuDriver; class Circuit extends Manager { private static array $instances = []; /** * @return mixed The default driver is being returned. */ public function getDefaultDriver(): mixed ...
true
0f9bdd809e7719b8dc1962a8aafaeec2d4782c08
PHP
ChoMihyang/PHP-study
/mvc model example/model/Model.php
UTF-8
680
3.09375
3
[]
no_license
<?php include_once "model/Book.php"; class Model { // 재고 도서 목록 저장 private $books; public function __construct() { $this->books = array( "Chori JJang" => new Book("Chori JJang", "YC Jung", "Chori's life I"), "Younghan JJang" => new Book("Younghan JJang", "YH Woo", "...
true
32fb156401ad2435767496def0860f774fcdc3d4
PHP
gobb/webfilez
/libs/Reqresp/Uri.php
UTF-8
6,201
3.15625
3
[]
no_license
<?php namespace Reqresp; /** * URI Class * * Detects the current URI as best as possible, and returns information * about it. Useful for MVC frameworks, or any other URI-driven routing-based * application. * * @author Casey McLaughlin */ class Uri { /** * @var boolean */ protected $https; ...
true
237f4db4b173a112117b1ceb8d000d4445623513
PHP
barkerja/EightPHP
/system/classes/helpers/notice.php
UTF-8
994
2.59375
3
[ "BSD-3-Clause", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php /** * Notice helper class. * * @package System * @subpackage Helpers * @author EightPHP Development Team * @copyright (c) 2009-2010 EightPHP * @license http://license.eightphp.com */ class notice_Core { private static $counter; public static function error($message, $title="An error has occured...
true
e13f0bfcf79908fe1ca47f84fc5082775d6bd5d6
PHP
gpsart/gpsart
/src/Api/Service/RequestHandler/GpxFileRequestHandler.php
UTF-8
934
2.53125
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace App\Api\Service\RequestHandler; use App\Api\Entity\GpxFileRequest; use App\Api\Type\GpxFileType; use Symfony\Component\Form\FormFactoryInterface; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\Request; class GpxFileRequestHandler...
true
d933554b9dc55cbd4fa773f46db9aff0a1614d5f
PHP
Anoirb47/Webdevelopping
/imageprocessing.php
UTF-8
1,053
2.546875
3
[]
no_license
<?php $target_file =$target_dir. $newfilename; //. basename($_FILES["img"]["name"]); $uploadOk = 1; $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION)); $check = getimagesize($_FILES["img"]["tmp_name"]); if($check !== false) { // echo "File is an image - " . $check["mime"] . "."; ...
true
01348075b18ec4c6ff77e3e10fafdf9728e6bb88
PHP
joyaka2020/personnal-works
/EVAL_MVC_JDY/src/Model/Type.php
UTF-8
2,740
3.484375
3
[]
no_license
<?php class Type { // ces propriétés doivent avoir exactement le même nom que leur homologue en BDD private $id; private $name; protected $created_at; protected $updated_at; /** * Méthode permettant de rétourner le détail d'un produit * en fonction de son identifiant * * @...
true
ec26714e2873be250ad665537913aa6ea22a5948
PHP
AndroZa0812/HotPlanet
/templates/ordersTable.php
UTF-8
297
2.96875
3
[]
no_license
<?php for ($i = 0; ($i + 1) < count($seatsArray); $i++) { $chairIndexes=explode("_",$seatsArray[$i]); ?> <tr> <td><?php echo $i + 1?></td> <td><span></span><?php echo $chairIndexes[0]?></td> <td><span></span><?php echo $chairIndexes[1]?></td> </tr> <?php }?>
true
56aca31b77fc56086805ca7d525447987a73fef2
PHP
omouren/php-atoum-reminder
/src/Domain/PentaminosFactory.php
UTF-8
4,154
2.78125
3
[]
no_license
<?php namespace app\Domain; class PentaminosFactory { private $list = []; public function __construct() { foreach ($this->getPossibilities() as $p) { $this->list[] = new Pentaminos([$p[1], $p[2], $p[3], $p[4]], $p[0]); } } public function getList(): array { ...
true
4eb1853f110cad6dc1fc3b4d6b95d31db32ff6ea
PHP
juanFCA/Sistema-Bibliotecario
/Biblioteca/modelo/autor.php
UTF-8
723
3.140625
3
[]
no_license
<?php class autor { private $idtb_autor; private $nomeAutor; public function __construct($idtb_autor, $nomeAutor) { $this->idtb_autor = $idtb_autor; $this->nomeAutor = $nomeAutor; } public function getIdtbAutor() { ...
true
b4ec94753e04f49a7fb8a398b0decdc0aff0dda4
PHP
jdomenechb/brchain
/src/AbstractFactory/AbsFactoryInterface.php
UTF-8
632
2.828125
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); /** * This file is part of the brchain package. * * (c) Jordi Domènech Bonilla * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Jdomenechb\BRChain\AbstractFactory; /** * Interface repres...
true
8a84e47af4874f804406c4084f2a84be9cea1cba
PHP
ADesoutter/php-basic-p7
/notations.php
UTF-8
360
4.0625
4
[]
no_license
<?php if (true) { echo "C'est vrai"; } $i = 0; while ($i < 3) { echo $i; $i++; } // il y a la même notation pour : // - la boucle for (for et endfor) // - la boucle foreach (foreach et endforeach) ?> <?php if (true): ?> <p> C'est vrai </p> <?php endif ?> <ul> <?php while ($i < 3 ): ?> <li><?= $i...
true
014655eddae861bc3aecfd2c2ec2f3d128046253
PHP
dehbka/maltego
/src/Entity.php
UTF-8
286
2.609375
3
[]
no_license
<?php declare(strict_types=1); namespace Dehbka\Maltego; interface Entity { public function getType(): string; public function getValue(): string; public function getWeight(): int; /** @return AdditionalField[] */ public function getAdditionFields(): array; }
true
324073b140bd87cb07d917a3235ad7b5c163b710
PHP
wesz/gonzo
/gonzo.php
UTF-8
34,793
2.625
3
[]
no_license
<?php define('GONZO', microtime(true)); defined('GONZO_EXT') || define('GONZO_EXT', '.php'); defined('GONZO_SLASH') || define('GONZO_SLASH', '/'); defined('GONZO_NL') || define('GONZO_NL', "\n"); defined('GONZO_PATH') || define('GONZO_PATH', realpath(dirname(__FILE__)).GONZO_SLASH); function path_base($path) { if ...
true
9280969d8fe526d4766941814ab0c1e1ec9a5236
PHP
balambasik/requestinfo
/src/Info/PlatformIconPath.php
UTF-8
868
2.65625
3
[]
no_license
<?php namespace Balambasik\RequestInfo\Info; class PlatformIconPath { private $platform; public function __construct(Platform $platform) { $this->platform = $platform; } public function getInfo() { return $this->getIconPath(); } protected function getIconPath() {...
true
fb936478ebec1c404098e3aec7b6c19645b053ff
PHP
Cubano23/asl_psa
/psa/controler/FragiliteControler.php
ISO-8859-1
3,705
2.53125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: gisgo * Date: 16/04/18 * Time: 14:30 */ require_once ("bean/Fragilite.php"); require_once ("persistence/DossierMapper.php"); class FragiliteControler { var $mappingTable; private $fragilite; function __construct() { $this->fragilite = new Fragilit...
true
52ea23afb4ecfc0e7434119228012cf2527674cd
PHP
gunderwonder/cobweb
/test/utilities/cw_array.test.php
UTF-8
4,030
2.859375
3
[]
no_license
<?php class CWArrayTest extends CobwebTestCase { public function testEmptyArray() { $a = new CWArray(); $this->assertTrue(count($a) === 0); $this->assertFalse(isset($a['key'])); try { $b = $a['key']; $this->fail('Non-existant key should throw error exception'); } catch (Exception $e) { $th...
true
30a013b58f4745f52612fbfcbb9d6ffa66894228
PHP
mingfunwong/AndyCMS
/_manager/libraries/fields/field_file.php
UTF-8
5,749
2.765625
3
[ "MIT" ]
permissive
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); /** * CMS 扩展字段 */ class field_file { /** * $k * 自定义的字段标识,需要唯一 * * @var string * @access public * */ public $k = 'file'; /** * $v * 自定义的字段名称 * * @var string * @access publ...
true
042bf6cb9829bb08daf33744532f929d87fa0f08
PHP
markotallgren/PHPform
/harjoitus.php
UTF-8
6,618
3.140625
3
[]
no_license
<?php class Harjoitus implements JsonSerializable { private static $virhelista = array ( -1 => "Tuntematon virhe", 0 => "", 1 => "Kenttä ei voi olla tyhjä", 2 => "Nimessä voi olla merkkejä enintään 30", 4 => "Nimessä tulee olla vain kirjaimia", 5 => "Valitse O...
true
89c066ad2c3fd3904521298a1a620530a1b319c2
PHP
SDIBTACM/TrainingRank
/app/Services/RankingCalculator/Contestant.php
UTF-8
442
2.53125
3
[]
no_license
<?php /** * It have many bugs * Created in dreaming. * User: Boxjan * Datetime: 2019-03-16 13:28 */ namespace App\Services\RankingCalculator; class Contestant { public $party, $rank, $points, $rating, $seed, $delta, $needRating; public function __construct($party, $rank, $points, $rating) { $th...
true
63bdf33d06accf6053fd4d6bc188ddc4978f4840
PHP
okfn-brasil/site
/wp-content/plugins/ithemes-security-pro/core/lib/class-itsec-lib-login.php
UTF-8
1,412
2.921875
3
[ "GPL-2.0-or-later", "GPL-1.0-or-later", "GPL-2.0-only", "MIT" ]
permissive
<?php class ITSEC_Lib_Login { /** * Get a user account by the user's provided identifier. * * @param string $identifier * * @return WP_User|null */ public static function get_user( $identifier ) { foreach ( self::get_user_lookup_fields() as $field ) { if ( $user = get_user_by( $field, $identifier ) ...
true
29a8b8873a54f09dd38f2588f96da93f157db451
PHP
CodingWorker/enhancingProgram
/PHP/course-xiangjun/96.php
UTF-8
1,008
2.703125
3
[]
no_license
<?php /* var_dump(get_loaded_extensions());//打开已经加载的扩展库 var_dump(get_extension_funcs('gd'));//获得扩展库里的函数名;如果扩展库不存在或没开启就返回布尔值false var_dump(extension_loaded('gd'));//判断扩展库是否已经加载,返回布尔值 */ /* var_dump(get_loaded_extensions());//打开已经加载的扩展库 var_dump(get_extension_funcs('gd'));//获得扩展库里的函数名 var_dump(extension_loaded('gd'));/...
true
bbcbc130a869aac78b276c2e81f6549401dd1fc8
PHP
semiller/managelog
/toolkit/classes/JournalCategory.php
UTF-8
2,754
3
3
[]
no_license
<?php class JournalCategory extends Journal { // define properties protected $accountId; protected $journalCategoryId; protected $journalCategoryName; protected $managerDepartment; public function __construct() { parent::__construct(); } // end construct public function addJournalCategory() { $result ...
true
754398beab93f701852298c90ab1fc8398809952
PHP
mvhenten/Pico
/Application/lib/View/Index.php
UTF-8
3,187
2.546875
3
[]
no_license
<?php /** * Application/lib/View/Index.php * * @author Matthijs van Henten <matthijs@ischen.nl> * @package Bison */ class Pico_View_Index extends Nano_App_View{ /** * * * @param object $request * @param unknown $config */ public function __construct( Nano_App_Request $request, ...
true
1844e9ccbafd2e74f0508e6bc0b5a4341acb817f
PHP
marionelo/PHP-8-Programming-Tips-Tricks-and-Best-Practices
/ch02/includes/auth_callback.php
UTF-8
1,896
2.65625
3
[ "MIT" ]
permissive
<?php // /repo/ch02/includes/auth_callback.php define('DB_FILE', __DIR__ . '/../sample_data/sqlite.db'); define('PATTERN', '%-8s | %4s | %-28s | %-15s'); define('DEFAULT_TABLE', 'Unknown'); define('DEFAULT_USER', 'guest'); define('ACL' , [ // user => [table => rights, table => rights, etc.] 'admin' => [ ...
true
89e321713c729ffa96b60ffbcf8614227704e560
PHP
anzusystems/core-dam-bundle
/src/Domain/Keyword/KeywordFactory.php
UTF-8
405
2.5625
3
[ "Apache-2.0" ]
permissive
<?php declare(strict_types=1); namespace AnzuSystems\CoreDamBundle\Domain\Keyword; use AnzuSystems\CoreDamBundle\Entity\ExtSystem; use AnzuSystems\CoreDamBundle\Entity\Keyword; final class KeywordFactory { public function create(string $name, ExtSystem $extSystem): Keyword { return (new Keyword()) ...
true
ae4186a94b9adb637ed5f3cfc3f9997c3ee3e794
PHP
ibpabisiak/psiai-project
/application/models/login_model.php
UTF-8
855
2.921875
3
[]
no_license
<?php class LoginModel { private $db; function __construct($db) { $this->db = $db; } function login($user_email, $user_password) { $result = false; if(!empty($user_email) && !empty($user_password) && null == $_SESSION[USER_SESSION]) { $query = " SELECT * FROM users JOIN groups ON...
true
994d1f94dfcadf60eb26e040385af1b8602926f8
PHP
ColonelBlimp/html-go
/system/core/classes/templating/TwigTemplateEngine.php
UTF-8
1,004
3.078125
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace html_go\templating; use Twig\Environment; use Twig\Loader\FilesystemLoader; final class TwigTemplateEngine implements TemplateEngine { private Environment $engine; private string $ext; /** * TwigTemplateEngine Constructor. * @param array<mixed> $template...
true
2b38c7872c67c0991b81028229b6c8e9d126ad5f
PHP
bigstepdenmark/gray_owl
/src/Import/Import.php
UTF-8
908
3.3125
3
[ "MIT" ]
permissive
<?php namespace SDM\Import; class Import implements ImportInterface { /** * Importer * * @param string $filePath The path to the csv file * @param string $delimiter CSV delimter */ public function __construct( string $filePath, string $delimiter = ',' ) { } /** * Pa...
true
a102dd1bec61a2efb181cd2c44c296daff01d05c
PHP
Andres0919/seguimiento_referencia
/core/app/model/AreaData.php
UTF-8
1,431
2.84375
3
[]
no_license
<?php class AreaData { public static $tablename = "area"; public function AreaData(){ } public function add(){ $sql = "insert into area (nombre) "; $sql .= "value (\"$this->nombre\")"; return Executor::doit($sql); } public static function delById($id){ $sql = "delete from ".self::$tabl...
true
799a1dd59f3ff0c16f88314191a0124616505c98
PHP
VladaHejda/NetteSimpleTranslator
/src/Storage/NetteDatabase.php
UTF-8
936
2.890625
3
[ "BSD-3-Clause" ]
permissive
<?php namespace NetteSimpleTranslator\Storage; use Nette\Database\Context; class NetteDatabase implements \NetteSimpleTranslator\ITranslatorStorage { /** @var Context */ private $database; /** @var string */ private $translationTable; /** * @param string $translationTable name of table with translated te...
true
94b47e4e73d1ebd9273fe9e8890240711a5e90fb
PHP
Myteam-I-am-Famous/MyTeam
/pack_card_check.php
UTF-8
2,559
2.5625
3
[]
no_license
<?php session_start(); include "./includes/functions.php"; header('Content-Type: application/json'); header('Access-Control-Allow-Origin: *'); if (!isset($_SESSION['uid'])) { header("location: shop_card.php?code=accessdenied"); exit; } if (!isset($_POST['id'])) { header('location: shop_card.php?code=...
true
4344d74d362aaca83e5048319e0dd39697266fc9
PHP
izoo/student-attendace-system
/logged.php
UTF-8
1,018
2.96875
3
[]
no_license
<?php require_once("db_config.php"); if(isset($_POST['user']) && isset($_POST['password']) && isset($_POST['otp'])) { $error = array(); $username = $_POST['user']; $password = $_POST['password']; $otp = $_POST['otp']; if(empty($username) && empty($password) && empty($otp)) { $error[]="Y...
true
1a6a8a9656adee4b7247987dcc80dea31b9ce68d
PHP
cimpeanuionut/Licenta
/Primarie/control_server_primarie.php
UTF-8
496
2.515625
3
[ "MIT" ]
permissive
<?php if (!empty($_SERVER["HTTP_CLIENT_IP"])) { $ip = $_SERVER["HTTP_CLIENT_IP"]; } else if (!empty($_SERVER["HTTP_X_FORWARDED_FOR"])) { $ip = $_SERVER["HTTP_X_FORWARDED_FOR"]; } else { $ip = $_SERVER["REMOTE_ADDR"]; } $file = file_get_contents("ip_primarie.txt"); if ((strstr($file, $ip))){ echo "Acces Permis! <...
true
33444bd7d931471e2816ea3e4b416f3f0ebaa1c9
PHP
anacfbernardi/api-ebx
/app/Http/Controllers/Reset/ResetController.php
UTF-8
767
2.609375
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Reset; use Symfony\Component\HttpFoundation\Response; use App\Http\Controllers\ApiController; use App\Business\Reset\ResetBiz; /** * Reset Controller */ class ResetController extends ApiController { private $resetBiz; /** * Default constructor */ public ...
true
582a93941028263c7ec58dbc8874129aad9942d2
PHP
Jaro13/php-practitioner
/zsmieci/class.php
UTF-8
886
3.046875
3
[]
no_license
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ class Task2{ public $description;//zmieić na protected public $completed=false;//co jesli zmienimy na true ...
true
525ac9208b7a4f964670be915f9bdf3653551bbb
PHP
caper/cosmos
/Mikron/Db/Mysql.inc
UTF-8
2,169
2.84375
3
[]
no_license
<?php class Mikron_Db_Mysql implements Mikron_Db_Engine { private $connection = null; private $args = null; public function __construct($server, $port, $username, $password, $database_name) { $this->args = func_get_args(); } private function getConnection() { if(is_null($this->co...
true
b87409acf96afb61fa5be9f0361341bf7dc02ecc
PHP
dxprog/DxCMS
/controller/ext/content.ext.comic.php
UTF-8
346
2.65625
3
[]
no_license
<?php /** * Determines the comic's image path and attaches it as a new property to the content object */ function ext_formatPostComic($content) { if ($content->type == 'comic') { $date = date("Ymd", $content->date); $content->comic_image = 'cm_' . $date . '_' . substr(md5($date), 0, 1) . '.png'; } ...
true
4f29fffce6bd610c4caa1826287e6a682652d588
PHP
yiyulianzhou/prepare-lessons
/project/case3/admin/user/edit.php
UTF-8
2,368
2.875
3
[]
no_license
<?php echo '此页是编辑页面 自己写'; exit; header("content-type:text/html;charset=utf-8"); require './config.php'; $id = $_GET['id']; $link = mysqli_connect(HOST,USER,PWD,DB) or die('数据库连接又失败了!!'); mysqli_set_charset($link,'utf8'); $sql = "SELECT `id`,`name`,`sex`,`age`,`province` pro FROM ".PRE...
true
29c400008adc1312d1511c02fc90a6ac2bcdc6e3
PHP
jmbanda/DrugSafetyPortal-V.20
/ds_exp/components/grid/grid_states/open_inline_insert_editors_grid_state.php
UTF-8
811
2.59375
3
[]
no_license
<?php class OpenInlineInsertEditorsGridState extends GridState { private $nameSuffix; public function __construct(Grid $grid) { parent::__construct($grid); $this->nameSuffix = '_inline_' . mt_rand(); } public function ProcessMessages() { $columns = $this->grid->GetView...
true
a29a81d9320e4c27d36fc609b05b76a27c8169d4
PHP
barry-sr/location-based-marketing
/deviceUsersReg.php
UTF-8
1,781
2.75
3
[]
no_license
<?php define("servername", "localhost"); define("dbusername", "root"); define("dbpassword", ""); define("dbname", "mydb"); $json = json_decode(file_get_contents('php://input'), true); if(empty($json)){ $response = "No data"; echo json_encode($response); } else { $username =$json['username']; $password...
true
819a04b947a31804edecfc351dbe082aa2219c02
PHP
xRubin/brainstorm
/wamba/Strategy/BadGateway.php
UTF-8
574
2.625
3
[]
no_license
<?php namespace Brainstorm\WambaPHP\Strategy; use Brainstorm\Strategy; class BadGateway extends Strategy { /** * @param string $html * @return bool */ public function check($html) { return mb_strpos($html, '502 Bad Gateway') !== false; } /** * @param...
true
1b932a7155895033d46e7394dbfef100111d077e
PHP
MartinCazamajor/rpg
/src/Controller/Fight.php
UTF-8
2,074
2.828125
3
[]
no_license
<?php namespace App\Controller; require_once __DIR__ . '/../../vendor/autoload.php'; use App\Model\Check; use App\Model\Database; use App\Model\Character; class Fight { public function select(): array { $pdo = new Database(DSN, USER, PASS); $characters = $pdo->showCharacters(); if ...
true
6b9eb352722f7e4b3d39574f34ab3388b9ba4a07
PHP
andrewleader/hiking-site
/wwwroot/wp-content/themes/blogslog/inc/options.php
UTF-8
5,215
2.625
3
[ "MIT", "GPL-2.0-or-later", "GPL-1.0-or-later", "GPL-2.0-only", "LicenseRef-scancode-unknown-license-reference", "CC0-1.0", "GPL-3.0-or-later", "GPL-3.0-only" ]
permissive
<?php /** * Theme Palace options * * @package Theme Palace * @subpackage BlogSlog * @since BlogSlog 1.0.0 */ /** * List of pages for page choices. * @return Array Array of page ids and name. */ function blogslog_page_choices() { $pages = get_pages(); $choices = array(); $choices[0] = esc_html__( '...
true
6c6a4d37d016db7b76dc95035b7ee06fa6febb3f
PHP
tidal/PEIP
/examples/HelloWorld/hello_world_scripted.php
UTF-8
820
3.0625
3
[ "MIT" ]
permissive
<?php // This is the PEIP�s way of "hello world" done by just scripting (no config) // requiring autoloader require_once dirname(__FILE__).'/../../misc/bootstrap.php'; // simple service class class HelloService { public function greet($name) { return 'Hello '.$name; } } // create channels $inp...
true
111c389f2e5e1058372df6a7a4cfc8b671ac5964
PHP
mauriciogsc/ATbarPT
/pt/dev/server-services/spell/dictionary/xmlhttp/inc/WP/plugins/pmwiki_attachments.class.php
UTF-8
1,192
2.90625
3
[]
no_license
<?php require_once(dirname(__FILE__) . '/../interface/startOfLine.interface.php'); class pmwiki_attachments implements startOfLine { const regular_expression = '/Attach:(.*?)(\..*?|)( |$|<)/i'; public function __construct() { } public function startOfLine($line) { /...
true
314fbf8528e39a6986b2534cc3716aa6b50ae8ad
PHP
adampielak/CMDocument
/include/common.php
UTF-8
217
2.6875
3
[]
no_license
<?php function showMessage($class,$message) { echo '<div class="'. $class . '">' . "\r\n" . " " . //adds space for proper html source code viewing $message . "\r\n" . '</div>' . "\r\n"; } ?>
true