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
09f518b857911863d13226ea03bb86acef2028b9
PHP
VikasJKatariya/array_function
/array_merge_recursive.php
UTF-8
1,056
3.78125
4
[]
no_license
<?php //******************************************************* //Author : Vikas Katariya //******************************************************* //The array_merge_recursive() function merges one or more arrays into one array. //The difference between this function and the array_merge() function is when two or m...
true
7d74ce6f9f8ba97fe9e6352350a0555519dbf0b2
PHP
ahlaaa/phpRep
/app/Repositories/ExchangelogRepository.php
UTF-8
631
2.578125
3
[ "MIT" ]
permissive
<?php namespace App\Repositories; use App\Models\Exchangelog; /** * Class ArticleRepository * @package App\Repositories * @version January 22, 2018, 8:54 pm CST * * @method Article findWithoutFail($id, $columns = ['*']) * @method Article find($id, $columns = ['*']) * @method Article first($columns = ['*']) *...
true
504b1f716bf69fb2650047fa07e1ed71dda89ef7
PHP
VistResearch/nem2-sdk-php
/src/util/util.php
UTF-8
401
2.953125
3
[ "Apache-2.0" ]
permissive
<?php class util{ public static function unhexlify($str){ return pack("H*", $str); } public static function decode_hex($str){ if (ctype_xdigit($str)){ return $str; } else{ return hex2bin($str); } } public static function utf82hex($str){ $intArray = unpack("C*", $str); $chars = array_map("chr...
true
bd3be13cb174b9817c57a92372f3f08381c87f0b
PHP
abdiiwan1841/sakip
/app/Helpers/User.php
UTF-8
264
2.515625
3
[ "MIT" ]
permissive
<?php namespace App\Helpers; use Illuminate\Support\Facades\DB; class User { public static function get_username($user_id) { $user = DB::table('users')->where('id', $user_id)->first(); return (isset($user->name) ? $user->name : ''); } }
true
b755a7ebe8ddd3afbb2012fe5e2a5776161413c1
PHP
AnjaliSiyasoft/LoyaltyPlusSlim
/src/routes/configurator/state.php
UTF-8
4,961
2.828125
3
[]
no_license
<?php use \Psr\Http\Message\ServerRequestInterface as Request; use \Psr\Http\Message\ResponseInterface as Response; //////////////////////////////// Insert State //////////////////////////////// $app->post('/api/state/add', function (Request $request, Response $response) { $title = $request->getParam('title');...
true
78b1758ba208237c92221db143a92e9fbe15a7cf
PHP
iotronlabs/nurture_api
/app/Http/Middleware/AuthenticateAllUsers.php
UTF-8
432
2.625
3
[]
no_license
<?php namespace App\Http\Middleware; use Closure; use Auth; class AuthenticateAllUsers { public function handle($request, Closure $next) { // if ((! Auth::guard('user_teachers')->check()) || (! Auth::guard('students')->check()) || (! Auth::guard('user_staffs')->check()) || (! Auth::guard('user...
true
03f2dab17dfe0603c05dcd18e9e78bbd77577d3b
PHP
DavidGarciaOriol/CommUNITY
/app/Http/Requests/CommunityRequest.php
UTF-8
1,358
2.765625
3
[]
no_license
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class CommunityRequest extends FormRequest{ public function authorize(){ return true; } public function rules(){ return [ 'name' => 'required|min:3', 'creator_nickname' => 'required|min:3...
true
26743cad5c64162c421412279453bf7302fa8952
PHP
meaamer/coaching_classes
/application/models/FeesModel.php
UTF-8
2,658
2.734375
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php class FeesModel extends CI_Model { public function SelectFees($id=null) { $this->db->select('*'); $this->db->from('student_addmission'); $this->db->order_by("student_addmission.std_id", "DESC"); $result = $this->db->get(); $datax = ""; foreach ($result->result_array() as $data) { $tDebit=0...
true
b8098fcf73ce75b845bacdfd996dbc8f5e8b06e3
PHP
michaeljennings/table
/src/Michaeljennings/Table/Query/Eloquent/Query.php
UTF-8
3,831
3.125
3
[]
no_license
<?php namespace Michaeljennings\Table\Query\Eloquent; use Michaeljennings\Table\Query\QueryInterface as QueryInterface; class Query implements QueryInterface { /** * The model the query is being run on * * @var object */ protected $model; /** * The columns to select * * @var array...
true
f3f4cb184f347b4d605209ad4e9d7b4587a67775
PHP
detera14/detera
/processorder.php
UTF-8
1,199
2.6875
3
[]
no_license
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Bob's Auto Parts - Order Results</title> </head> <body> <h1>Bob's Auto Parts</h1> <h2>Order Results</h2> <?php echo "<p>...
true
810725d78fbe2e9af24e54d39f58583168f5442e
PHP
s0utakada/designPattern
/Bridge/DataSource.php
UTF-8
494
2.65625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: s_takada * Date: 14/05/14 * Time: 16:47 */ namespace Bridge; /** * Interface DataSource * * @package Bridge */ interface DataSource { /** * @return mixed */ public function open()...
true
d421e6edce1bf0faad5ae1f2d4296088fd16c0ca
PHP
Mobile-Fintech-20/mobile-fintech-20-backend
/mobile-backend-20@api/modal/Contribution.php
UTF-8
3,867
2.6875
3
[ "MIT" ]
permissive
<?php include_once( '../include/class.database.php' ); include_once( '../include/functions.php' ); include_once( 'app.php' ); class Contribution extends App { public $ApplicationNo; public $ApprovalDate; public $MemberId; public $amountApproved; public $LoanID; public $Fillables = array( ...
true
6c092dc2226e45d247ed842acdbfa50ec78afd52
PHP
phamtuanphong187/QLSV
/models/StudentModel.php
UTF-8
731
2.640625
3
[]
no_license
<?php class StudentModel extends CI_Model { public function __construct() { } public function getList() { $query = $this->db->query("SELECT * FROM students;"); return $query->result_array(); } public function insert($data) { return $insert=$this->db->insert("stud...
true
61861e7e4e95eb35503022ee29246640c50d8b89
PHP
arhone/php-storing
/source/StorageMemoryAdapter.php
UTF-8
2,290
3.109375
3
[]
no_license
<?php declare(strict_types = 1); namespace arhone\storing; /** * Хранилище данных (ключ - значение) (PHP 7) * * Class StorageMemoryAdapter * @package arhone\storing * @author Алексей Арх <info@arh.one> */ class StorageMemoryAdapter implements StorageInterface { /** * Хранилище * * @var arra...
true
477d33ed8c223e6a223961dbfc785ff9d7d1a9bc
PHP
sleite31/Loja
/class/produtoFactory.php
UTF-8
310
3.09375
3
[]
no_license
<?php class ProdutoFactory { private $classes = array("Ebook", "LivroFisico"); function criaPor($tipoProduto, $nome, $preco) { if (in_array($tipoProduto, $this->classes)) { return new $tipoProduto($nome, $preco); } return new LivroFisico($nome,$preco); } } ?>
true
2f540c0dec4437608414619f51b263a57908af4e
PHP
vishnupriyam/MAM
/protected/controllers/OrganisationController.php
UTF-8
11,265
2.609375
3
[]
no_license
<?php class OrganisationController extends Controller { public function actions() { return array( // captcha action renders the CAPTCHA image displayed on the organisation register page 'captcha'=>array( 'class'=>'CCaptchaAction', 'backColor'=>0xFFFFFF, ), // page action renders "static" page...
true
78384d7a90286bd9bdf945aa57aa68910ff2bef0
PHP
MD-khan/project-progress-laravel5.4
/app/Project.php
UTF-8
2,002
2.84375
3
[]
no_license
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Project extends Model { protected $fillable = [ 'project_name', 'category', 'site-manager', 'site_manager', 'developers', 'designers', 'clients' ]; public function category() { return $this->belongsTo( ProjectCategory:: cl...
true
228a026feabda0617d83aeb0ced8595716449348
PHP
joshutt/wmffl
/football/transactions/livedraft/setPick.php
UTF-8
1,139
2.546875
3
[]
no_license
<?php require_once "utils/start.php"; require_once "utils/StringUtils.php"; require "DraftUtils.php"; header("Content-type: text/x-json"); if (!$isin) { print json_encode( array("error"=> "Not Logged In") ); exit(); } // Get the team and the pick $teamId = $_SESSION["teamnum"]; $fullPlayer = array_key_exists...
true
8660b84ef7367d1204f25366cb38a16c57e34664
PHP
OnTheGoSystems/wpml-page-builders
/tests/phpunit/tests/st/strategy/shortcode/test-StringCleanUp.php
UTF-8
1,571
2.65625
3
[]
no_license
<?php namespace WPML\PB\Shortcode; class Test_StringCleanUp extends \WPML_PB_TestCase { public function setUp() { parent::setUp(); $this->existingStrings = [ md5( 'string1' ) => 'string1', md5( 'string2' ) => 'string2' ]; } /** * @test */ public function it_can_get_existing_strings() { $postId = 123;...
true
ab61358c8f55a41647c4c86d8a8989d3307779ee
PHP
BECKQuentin/Sculpture-with-Symfony
/src/Entity/Article.php
UTF-8
6,057
2.578125
3
[]
no_license
<?php namespace App\Entity; use App\Entity\User; use App\Repository\ArticleRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=ArticleRepository::class) */ class Article { /** * @ORM\Id ...
true
0072c12971aac4ac4dc1d0e895d601d727358b41
PHP
cis355/cis355
/ecfeders/BootStrap/project/updateProject.php
UTF-8
8,082
2.765625
3
[ "MIT" ]
permissive
<?php /* ******************************************************************* * filename : updateProject.php * author : Erik Federspiel & Start Bootstrap & Star Tutorial * https://startbootstrap.com/template-overviews/simple-sidebar/ https://www.startutorial.com/ * username : ecfeders ...
true
1559049e415415235de0c3715e7f9dc397b5511a
PHP
Maxusha/Boat-site
/models/Product.php
UTF-8
918
3.015625
3
[]
no_license
<?php class Products { public static function getProductById ($id) { $id = intval($id); if ($id) { $db = Db::getConnection(); $result = $db->query('SELECT * from products WHERE id='.$id); $result->setFetchMode(PDO::FETCH_ASSOC); $productItem = $result->fetch(); return $product...
true
cf4ba7d66cb6bb38a9fe4732e57bdad938bd977c
PHP
tejrajs/laravelOauthServer
/app/Http/Controllers/ClientsController.php
UTF-8
3,537
2.5625
3
[]
no_license
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Validator; use App\Http\Requests; use Dingo\Api\Routing\Helpers; use App\Clients; class ClientsController extends Controller { // use Helpers; // public function __construct() // { // // Only apply to the index method. // $this->scope...
true
cba33e0f4994c3e1a6f89bd34633228c48b06659
PHP
skarraaws/firefighters
/clinic/updateArrive.php
UTF-8
429
2.609375
3
[]
no_license
<?php include('../config/autoload.php'); if(isset($_POST['id']) && !empty($_POST['id'])) { $id = $_POST['id']; include('../config/database.php'); $update = "UPDATE appointment SET arrive_status = 1 WHERE app_id = '".$id."'"; if (mysqli_query($conn, $update)) { echo "Record updated success...
true
08e9c5d629936e16f242108a57bdc45d29933421
PHP
FormHandler/FormHandler
/tests/Encoding/Utf8EncodingTest.php
UTF-8
928
2.875
3
[ "MIT" ]
permissive
<?php namespace FormHandler\Tests\Encoding; use FormHandler\Form; use FormHandler\Tests\TestCase; use FormHandler\Encoding\Utf8EncodingFilter; class Utf8EncodingTest extends TestCase { public function testUtf8EncodingFilter() { $encoding = new Utf8EncodingFilter(); $form = new Form(); ...
true
b2636f61999c0a306d8c1197230aafc0d1654ef3
PHP
srichakrakoppula/Codestreet
/timemismatch.php
UTF-8
2,372
2.609375
3
[]
no_license
<?php include 'session_func.php'; confirmLoggedIn(); if(!isset($_GET['time'])||!isset($_GET['tid'])){ header("Location: index.php"); } $time = $_GET['time']; if($time!="less"&&$time!="more") header("Location: index.php"); $testid = $_GET['tid']; include 'db_initializer.php'; //////////Checking if the test is active ...
true
4da4cf00480a64669a1ae1c081bfc399082c40a1
PHP
quie87/1dv610
/lectures/examples/l9/prepare/CitiesDatabase.php
UTF-8
2,140
3.15625
3
[ "MIT" ]
permissive
<?php class CitiesDatabase extends CityDAL { private static $DATABASE_NAME = "world"; private static $CREATE_DB_QUERY = "CREATE DATABASE IF NOT EXISTS world "; private static $REMOVE_DB_QUERY = "DROP DATABASE IF EXISTS world "; private static $CREATE_TABLE_QUERY = "CREATE TABLE IF NOT EXISTS City ( pk ...
true
33941cea6c96cd07b1561bf4f3d7b3fd91324db6
PHP
shukyoo/anything
/php/Api.php
UTF-8
935
2.6875
3
[]
no_license
<?php /** * api container * Api::user('Point')->gettest(); */ class Api { protected static $container = []; public static function load($name, $flag = null) { $key = $name .'_'. $flag; if (!isset(self::$container[$key])) { $name = ucfirst($name) .'Api'; ...
true
00521f3087a831de85bd5663b606b4d8dc1798b8
PHP
flatphp/database
/Connection.php
UTF-8
8,551
3.046875
3
[]
no_license
<?php namespace Flatphp\Database; use PDO; /** * config * array( 'dsn' => '', 'username' => '', 'password' => '', 'options' => [PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'], 'slave' => array( 'dsn' => '', 'username' => '', 'passw...
true
4797f19c503c8591fe1f88cfa3c230811b22dc69
PHP
godofping/foodstuff
/getTable.php
UTF-8
2,122
2.53125
3
[]
no_license
<?php include 'connection.php'; $date = mysqli_real_escape_string($connection,htmlentities(trim($_POST['date']))); ?> <h4>Goodies Inventory - Date: <?php echo $date; ?></h4> <a href="print/print-reports-goodies-inventory.php?date=<?php if(!isset($_GET['date'])) { echo date('Y-m-d'); }else{ echo $_GET['d...
true
e816d1f3880b59b631bb6b4f8e8dd4f61c491e06
PHP
OxfordInfoLabs/kinintel
/php/src/ValueObjects/Parameter/Parameter.php
UTF-8
3,528
3.375
3
[]
no_license
<?php namespace Kinintel\ValueObjects\Parameter; /** * Parameters for use in datasets and dashboards as input and for additional filtering. * * Class Parameter * @package Kinintel\ValueObjects\Parameter */ class Parameter { /** * The name as used to reference this parameter * * @var string ...
true
e35aa5d51326552be13fa1ff77d2e4bf3d3737d5
PHP
frmain/sportlinkclubdata
/src/MatchPlayers.php
UTF-8
2,038
2.96875
3
[ "MIT" ]
permissive
<?php namespace SportlinkClubData; /** * @author Foeke * */ class MatchPlayers extends ClubDataItem { /** * @var integer */ private $wedstrijdcode; /** * @var MatchPlayer[] */ protected $playershome; /** * @var MatchPlayer[] */ protected $playersaway; /** ...
true
e4287deb924adac6dd619c227e0689be0f932107
PHP
mrjac1111/blog_saj
/app/model/helper/emailValidation.php
UTF-8
2,930
2.828125
3
[]
no_license
<?php class emailValidation { protected $email; protected $emailErr; private $testInput; private $insertion=1; private $checkEmail; private $runEmail; function __construct() { $this->email=$this->emailErr=""; $this->testInput=new testInputFields(); $conn = new C...
true
311c5b67a793fdc93711e8e5ed12b75e0be3c1db
PHP
lamka02sk/wrinche
/app/Models/TokensModel.php
UTF-8
2,896
3.140625
3
[ "MIT" ]
permissive
<?php /* * wrinche. Modern, powerful and user friendly CMS. * Tokens Model. Manages users' tokens list. * Version: 0.1.1 * Authors: lamka02sk */ namespace App\Models; use App\Database\QueryBuilder; class TokensModel extends MainModel { /** * @var string * Models' primary DB table */ pub...
true
4d1e3f8d2b92b7b24b8112b6d6b974ed1b5c7bf5
PHP
Bkolenc/BKToolBox
/snipets/NettoyageFichiers/JSONtoBDD.php
UTF-8
10,900
2.640625
3
[]
no_license
<?php // 1 - Sélectionner un fichier geojson, // 2 - Demander le nom de la table, l'insérer dans une variable // 3 - Pour la géométrie et pour chaque propriété, créer un champs de formulaire, préfilled avec le nom de la propriété json, insérer dans des variables créées dynamiquement // 4 - Créer une connexion PDO // 5 ...
true
63bfa2cd0ee96e5990163bd47183037734b3bf43
PHP
Willz789/Tennisklub
/TrainingTeam.php
UTF-8
5,899
2.546875
3
[]
no_license
<!DOCTYPE html> <html lang="en"> <?php session_start(); // Jeg starter sessionen, som skal indeholde login-data, efter jeg logger ind. require_once("./core/db_connect.php"); // Jeg forbinder til databasen. ?> <head> <link rel="stylesheet" href="./style/Stylesheet.css"> <link rel="stylesheet" href="./sty...
true
02fdcf021f1e4678db3379338e8688f0451a7150
PHP
pchaow/kwanphayao5
/app/Services/CategoryService.php
UTF-8
1,666
2.625
3
[]
no_license
<?php namespace App\Services; /** * Created by PhpStorm. * User: chaow * Date: 2/12/2015 AD * Time: 12:21 PM */ use App\Models\Category; use App\Models\MainCategory; class CategoryService extends Service { var $withArr = []; public function setWithArray(array $a) { $this->withArr = $a; ...
true
438a356e30058f826f321127b2f93d83cfccf7e5
PHP
LuckyOne117/Sortir.com
/src/Controller/SortieController.php
UTF-8
15,970
2.578125
3
[]
no_license
<?php namespace App\Controller; use App\Entity\Etat; use App\Entity\Inscription; use App\Entity\Participant; use App\Entity\Sortie; use App\Form\SortieType; use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\Form...
true
01aff523ac8cf3f832b59458e6a2e1f0300d782c
PHP
danlangford/buttonmen
/src/engine/BMSkillAuxiliary.php
UTF-8
1,379
3.0625
3
[ "BSD-3-Clause" ]
permissive
<?php /** * BMSkillAuxiliary: Code specific to the auxiliary die skill * * @author james */ /** * This class contains code specific to the auxiliary die skill */ class BMSkillAuxiliary extends BMSkill { /** * An array containing the names of functions run by * BMCanHaveSkill->run_hooks() * ...
true
3a80f8fa9cec46eb5d8357b386739a7fbd9d356c
PHP
xdeenist/home-work
/3/$arr.php
UTF-8
130
2.640625
3
[]
no_license
<?php $arr = ['0' => 1, '1' => 2, '2' => 3, '3' => 4]; print_r($arr); unset($arr [2]); print_r($arr); print_r(array_values($arr));
true
9f2243d3f9f9d9ef9a82f43aeb6e49ce4295eb54
PHP
rnlaufz/memo
/includes/form_handlers/register_handler.php
UTF-8
2,915
2.90625
3
[]
no_license
<?php // Declare form variables $name = ''; $email = ''; $passwordOne = ''; $passwordTwo = ''; $userKey = ''; $date = ''; // date of register $errorArray = array(); // array for errors $messageArray = array(); // array for messages if(isset($_POST['registerButton'])){ // Registration form values // Remove html ta...
true
efc6200f56c6675314651507d29e6b1661807c6d
PHP
ahmadfaidulbasyar95/ci_master
/application/libraries/pea/form/keyword.php
UTF-8
886
2.625
3
[]
no_license
<?php defined('BASEPATH') OR exit('No direct script access allowed'); include_once __DIR__.'/text.php'; class lib_pea_frm_keyword extends lib_pea_frm_text { public $searchField = array(); public $is_full_text = 0; function __construct($opt, $name) { parent::__construct($opt, $name); } public function addSe...
true
0c2f6051defbfa9e4ec8dc49c6ddad8f9885d4b4
PHP
Magein/laravel-utils
/src/Common.php
UTF-8
1,402
2.8125
3
[]
no_license
<?php if (!function_exists('isLocal')) { /** * @return bool */ function isLocal(): bool { if (app()->environment() == 'local') { return true; } return false; } } if (!function_exists('domain')) { /** * @return mixed|string */ function dom...
true
d030bb95ae5fa1553887e8b99ba4a779689456d8
PHP
home2home-ae/ab-lab
/app/Http/Controllers/AuthController.php
UTF-8
969
2.640625
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; class AuthController extends Controller { public function changePasswordForm(Request $request) { return view('auth.change-password', compact('request')); } ...
true
89d3f85253c2cfaac24bca32afe1369994381a2b
PHP
laravel-rocket/service-auth
/src/Console/Commands/ServiceGeneratorCommand.php
UTF-8
1,207
2.5625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace LaravelRocket\ServiceAuthentication\Console\Commands; use LaravelRocket\Generator\Console\Commands\GeneratorCommand; use LaravelRocket\ServiceAuthentication\Generators\ServiceGenerator; use Symfony\Component\Console\Input\InputArgument; class ServiceGeneratorCommand extends GeneratorCommand { prot...
true
16f9a4f9caa1c04e73803728585b4bfffee29aee
PHP
brunarocha/safety-cubic
/app/Support/Helpers/objectToArray.php
UTF-8
373
2.734375
3
[]
no_license
<?php /** * objectToArray.php * * @author Breno Pereira <breno.pereira@nextem.com.br> * @package Hofund * */ if (!function_exists('objectToArray')) { function objectToArray($d) { if (is_object($d)) { $d = get_object_vars($d); } if (is_array($d)) { return array_...
true
369ef0eb859a0d3bcab38ea6cf72a0ccacb006ba
PHP
zakkimdfr/smartoffice
/plugins/horizonstack/espj/components/TripList.php
UTF-8
5,083
2.671875
3
[ "MIT" ]
permissive
<?php namespace Horizonstack\ESPJ\Components; use Cms\Classes\ComponentBase; use Horizonstack\eSPJ\Models\Trip; use Auth; class TripList extends ComponentBase { public $listTrips, $user; const SORT_OPTION_1 = 'name-asc'; const SORT_OPTION_2 = 'name-desc'; const SORT_OPTION_3 = 'created_at-asc'; c...
true
1b21e6a45beeeb7be3f72dba324d9d669913fc32
PHP
MirajHoque/XML
/FormValidationFromFileXML/validation.php
UTF-8
308
2.578125
3
[]
no_license
<?php $f=0; $values=array(); include("loadInfo.php"); dataFromFile(); //dataFromXML(); foreach($values as $infos) { if($_POST["name"]==$infos["name"] && $_POST["pass"]==$infos["password"] ) { echo "welcome you are a valid user"."<br>"; $f=1; } } if(!$f==1) { echo "invalid user"."<br>"; } ?>
true
a0ab13460298791923332085a29ba2a714953eda
PHP
HeresZix/Desolation
/game/scavenge/scripts/eventsold.php
UTF-8
1,230
3.09375
3
[]
no_license
<?php $event1 = rand(0, 500); $event2 = rand(0, 500); $item1 = rand(0, 128); $item2 = rand(0, 128); $item3 = rand(0, 128); $item4 = rand(0, 128); $item5 = rand(0, 128); if ($event1 > 450) { echo "Event 1 Option 1 <br>"; } elseif ($event1 > 350) { echo "Event 1 Option 2 <br>"; } elseif ($event1 > 300) { echo "Even...
true
7ca8a19290bcde4ebe5b9a01d3e6c4e3b4a12890
PHP
mhcrocky/citiqs
/application/models/Campaignlist_model.php
UTF-8
5,374
2.734375
3
[]
no_license
<?php declare(strict_types=1); require_once APPPATH . 'interfaces/InterfaceCrud_model.php'; require_once APPPATH . 'interfaces/InterfaceValidate_model.php'; require_once APPPATH . 'abstract/AbstractSet_model.php'; if (!defined('BASEPATH')) exit('No direct script access allowed'); Class Campai...
true
3aeca49df91d6377a9d71375da3b496703b89459
PHP
donaldsimmons/sugar-sands-site
/application/models/ssbw_model.php
UTF-8
52,450
2.8125
3
[]
no_license
<? class SSBW_Model extends CI_Model { public function __construct() { #when the model is loaded, load the database so it can be queried $this->load->database(); }//end __Construct Function public function getUserByPassword...
true
7574d228b24a41871c7397b644f05510ce249a38
PHP
akinuri/php-lib
/string/startsWith.php
UTF-8
347
3.53125
4
[]
no_license
<?php /** * Checks whether the string starts with a specific substring. */ function startsWith(string $haystack = null, string $needle = null): bool { if (empty($haystack) || empty($needle)) { return false; } return $haystack[0] === $needle[0] ? \strncmp($haystack, $needle, strlen($needle...
true
d868c6e5695dd2bcb1426962f611eec221402947
PHP
bytic/staging
/src/Staging.php
UTF-8
3,295
2.78125
3
[ "MIT" ]
permissive
<?php namespace Nip\Staging; use Nip\Staging\Stage\Stage; /** * Class Staging * @package Nip\Staging */ class Staging { use Staging\HasCurrentStage; use Staging\HasConfig; /** * @var Stage[] */ protected $stages = null; protected $publicStages = ['production', 'staging', 'demo']; ...
true
30318774fd57d62c197d2257dfd6ff5d1a5cd7b7
PHP
raphaelsmend/urlShortener
/sistems/html/shortener-api/app/Traits/GeneralFuncions.php
UTF-8
527
2.8125
3
[ "MIT" ]
permissive
<?php namespace App\Traits; use Carbon\Carbon; trait GeneralFuncions { private $defaultDaysExpiration = 7; private function generateUrlShortened() { $validChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRXTUVWXYZ0123456789'; $shuffle = str_shuffle($validChars); return substr...
true
1bf99187de485a196d7d95ed61b3237290f6aaa9
PHP
thearyanahmed/websec-buet-hackathon-2019
/app/Http/Controllers/API/Post/Approve.php
UTF-8
1,607
2.546875
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\API\Post; use Illuminate\Http\Request; use App\Http\Controllers\Controller; use App\Exceptions\Error; use App\Services\PostService; use App\Models\Post; use App\Http\Resources\GenericResponseResource as GenericResponse; class Approve extends Controller { private $postSvc; ...
true
ed640019a68614c9cc0884bb0353be9f2089325b
PHP
spiderbuddy411/spiderbuddy.open
/EloBuddy.Website/elobuddy.net/applications/core/extensions/core/LiveSearch/Members.php
UTF-8
1,721
2.640625
3
[]
no_license
<?php /** * @brief ACP Live Search Extension: Members * @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a> * @copyright (c) 2001 - 2016 Invision Power Services, Inc. * @license http://www.invisionpower.com/legal/standards/ * @package IPS Community Suite * @since 18 Sept 2013 * ...
true
2c4d4771661f4cb3debd357b9d617d93d72a2191
PHP
gerimo/arriendas
/lib/form/doctrine/base/BaseAvailabilityForm.class.php
UTF-8
2,008
2.578125
3
[]
no_license
<?php /** * Availability form base class. * * @method Availability getObject() Returns the current form's model object * * @package CarSharing * @subpackage form * @author Your name here * @version SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $ *...
true
95d5160d5991b709524642702b54caacd47640c5
PHP
phpstan/phpstan-src
/tests/PHPStan/Rules/Comparison/data/bug-8776-1.php
UTF-8
1,117
2.9375
3
[ "MIT" ]
permissive
<?php declare(strict_types = 1); namespace Bug8776Part1; use LogicException; /** * @param mixed $value * * @return array|bool * * @throws LogicException */ function validate($value, array $schema = null) { if (is_int($value)) { if (isset($schema['minimum'])) { $minimum = $schema['minimum']; if (filter...
true
02d4e6499dbc75faaaa2f41364edea7241c244df
PHP
iyard/short-url
/tests/Unit/TokenTest.php
UTF-8
404
2.671875
3
[]
no_license
<?php namespace Tests\Unit; use App\Token; use PHPUnit\Framework\TestCase; class TokenTest extends TestCase { /** * Test get method. * * @return void */ public function testGet() { $token = Token::get(); $this->assertEquals(Token::DEFAULT_LENGTH, strlen($token)); ...
true
5a42afca335f1020e173f361cb891cbc3c93e379
PHP
cipowelahan/caremom-backend
/database/migrations/2018_04_05_101646_create_table_checkups.php
UTF-8
907
2.625
3
[ "MIT" ]
permissive
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateTableCheckups extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('checkups', fun...
true
6574312d49e640692be75d48c16fb89b1244f376
PHP
teamonyx-va/phpvms
/app/Repositories/UserRepository.php
UTF-8
1,742
2.75
3
[ "BSD-3-Clause" ]
permissive
<?php namespace App\Repositories; use App\Contracts\Repository; use App\Models\Enums\UserState; use App\Models\User; use App\Repositories\Criteria\WhereCriteria; use Illuminate\Http\Request; /** * Class UserRepository */ class UserRepository extends Repository { protected $fieldSearchable = [ 'name' =...
true
982a5dec971461913859c803a09a9267c3c718f2
PHP
rianwiguna/PWEB_SK04_1521024156_Rian_Wiguna
/4_1_1521024156_RianWiguna.php
UTF-8
301
3.34375
3
[]
no_license
<!DOCTYPE html> <html> <head> <title>Studi Kasus 4_1</title> </head> <body> <?php $n = 101; if (($n>=0) && ($n<=59)) { echo "Cukup"; } elseif (($n>=60) && ($n<=85)) { echo "Baik"; } elseif (($n>=85) && ($n<=100)) { echo "Baik Sekali"; } else { echo "Input Salah"; } ?> </body> </html>
true
dc44cf1ab8ca3d81a71f798fa569ef6f38209a65
PHP
phacility/phabricator
/src/applications/auth/management/PhabricatorAuthManagementRecoverWorkflow.php
UTF-8
2,646
2.765625
3
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php final class PhabricatorAuthManagementRecoverWorkflow extends PhabricatorAuthManagementWorkflow { protected function didConstruct() { $this ->setName('recover') ->setExamples('**recover** __username__') ->setSynopsis( pht( 'Recover access to an account if you have lock...
true
4e4ec20e668c1c7fe66f1d6e0503293fd7863519
PHP
jensklose/ZendX_View_Autoescaping
/ZendX/View/Facade/Bean.php
UTF-8
2,345
2.5625
3
[]
no_license
<?php /** * Zend Framework Extention * * 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://framework.zend.com/license/new-bsd * If you did not receive a copy of the...
true
f8499d76f089bfbf8f58269af4313eff9023b163
PHP
thiagogomesverissimo/moodle-block_extensao
/src/Service/USPDatabase.php
UTF-8
2,899
2.953125
3
[]
no_license
<?php namespace block_extensao\Service; use PDO; class USPDatabase { private static $instance; /** * Singleton sybase connection */ public static function getInstance(){ global $CFG; $host = get_config('block_extensao','host'); //var_dump($host); die(); ...
true
8528883bcb1d321cf8c7eda22771a48287e30d5e
PHP
DZDeemix/Guitarshop
/app/Http/Requests/SliderRequest.php
UTF-8
2,302
2.703125
3
[]
no_license
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class SliderRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; } /** * Get the...
true
31c5341eba9f2c62809f5d41560981f264979693
PHP
shadoskill/yetonemorephpframework
/src/Generator/ModelFactory.php
UTF-8
10,983
2.734375
3
[]
no_license
<?php namespace YAPF\Generator; class ModelFactory extends GeneratorWriter { /** * getTableColumns * returns the table schema.columns or null * @return mixed[] or null */ protected function getTableColumns(string $target_table, string $target_database): ?array { $where_config =...
true
53111f29ba9dbd153daa8b6333444a3202e96da0
PHP
VyacheslavGL/PHP_work
/HW_5/part 2/url_shorter.php
UTF-8
1,529
3.03125
3
[]
no_license
<!DOCTYPE html> <html lang="ru"> <head> <meta charset="UTF-8"> <title>url_shorter</title> </head> <body> <?php $post = $_POST; var_dump($post['link']); $mylink = 'https://qps.ru/'; $link = $post['link']; if (!filter_var($link, FILTER_VALIDATE_URL)){ echo "Ссылка не валидна </br>"; return; ...
true
9c2c1d0eca82d3926155e51141c0ba69c2a0fb2f
PHP
andradecierdo/networking
/app/Repositories/Experience/ExperienceRepository.php
UTF-8
1,150
2.8125
3
[]
no_license
<?php namespace App\Repositories\Experience; use App\Repositories\BaseRepository; use App\Models\Experience; class ExperienceRepository extends BaseRepository implements ExperienceRepositoryInterface { protected $model; /** * Guard Repository constructor. * * @param Experience $experience ...
true
f9be05f8009a9f65106de51596e5b2a959c4ac87
PHP
jychoi910/jychoi910
/CW/CW4/test.php
UTF-8
498
3.46875
3
[]
no_license
<!DOCTYPE html> <html> <body> <form action="test.php" method="get"> Enter a value: <input type="number" name="$n"> <input type="submit"> </form> <br> <?php function triangle($n){ for ($x = 0; $x < $n; $x++) { for($y = 0; $y <= $x; $y++){ ...
true
afa7b6a14482d54396e7cde6dd63f00778d541b6
PHP
vikash291/codilar
/webservice/hospital.php
UTF-8
1,517
2.5625
3
[]
no_license
<?php $action=$_REQUEST['action']; $patient_id=$_REQUEST['pid']; $finalresult=[]; if(empty($patient_id)){ $finalresult['status']="400"; $finalresult["message"]="patient id can not be empty"; echo json_encode($finalresult); exit; } else if(empty($action)){ $finalresult['status']="400"; $finalresult["...
true
289d3ac3b1c39a0dda353bc5daf280095c21726f
PHP
ClanWolf/ASCard
/save.php
UTF-8
2,797
2.515625
3
[ "Apache-2.0" ]
permissive
<?php session_start(); ini_set("display_errors", 1); error_reporting(E_ALL); require('./logger.php'); require_once('./db.php'); $index = isset($_GET["index"]) ? $_GET["index"] : ""; $h = isset($_GET["h"]) ? $_GET["h"] : ""; $a = isset($_GET["a"]) ? $_GET["a"] : ""; $s = isset($_GET["s"...
true
084501270e323ad4956318465b1f724502edff94
PHP
davidCadillo/comodin
/database/migrations/2017_05_15_133001_create_table_tipo_usuarios.php
UTF-8
1,094
2.515625
3
[ "MIT" ]
permissive
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateTableTipoUsuarios extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('tipo_usuarios'...
true
b25b63d4cfa677188b6ec3c93bdcf55f2f7c75cc
PHP
NinjaBuggs/todo_list
/php/app/src/Todo/Domain/DTO/Task.php
UTF-8
926
2.71875
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace App\Todo\Domain\DTO; use JMS\Serializer\Annotation as Serializer; class Task { /** * @Serializer\SerializedName("id") * @Serializer\Type("string") * @Serializer\Groups({ * "tasks-list", * "task-detail", * }) */ public $id; ...
true
031af74626338a18fc2e91a3fa834cefc3a9f091
PHP
abstractalgo/Toxic
/app/request.php
UTF-8
4,212
3.125
3
[]
no_license
<?php require 'controller.php'; /** * Class that handles the request and decides what is next to be executed.<br> * It takes careof the URL format and parameters. */ final class Request { private static $uri; /** * Stylizes the requested URI to the uniform format. * * @return formatted uri */...
true
2b0d0dc4f0060299b0e023e4dd72915220309e39
PHP
babi-hh/Blog
/framework/base/ErrorException.class.php
UTF-8
1,842
3.03125
3
[]
no_license
<?php /** * 处理未捕获的异常 * @author Seldoon <Sedloon@sina.cn> * Created: Mar 7, 2017 9:33:54 AM * @todo 把错误类和异常类分开 */ namespace framework\base; use framework\base\ErrorHandler; /** * @param type $status 错误状态代码 如 404 * @param type $message 错误消息 * @param type $code 错误级别 * @param \Exception $previous 上一个异常对象 ...
true
86570f1c7ef6c51fe5a685b30ae02b7d190f4afa
PHP
anggaprasetya-fs/codeigniter-ecourse
/application/controllers/ClassLesson.php
UTF-8
2,407
2.53125
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php class ClassLesson extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('ClassLesson_m'); if (!$this->ion_auth->logged_in()) { $this->session->set_flashdata('message', 'You must login to view this page'); redirec...
true
3f6d77f85f6a49ba5346e2b9e473fd98969d569b
PHP
chas-academy/dragons-06-imdb-clone
/app/Http/Controllers/Auth/AdminLoginController.php
UTF-8
875
2.6875
3
[]
no_license
<?php namespace MoviKyte\Http\Controllers\Auth; use Illuminate\Http\Request; use MoviKyte\Http\Controllers\Controller; use Auth; class AdminLoginController extends Controller { public function __construct() { $this->middleware('guest:admin'); } public function showLoginForm() { return view ('auth.admin...
true
23bd29e7eedfd5492e47cd12a98a3850ed8ef7d8
PHP
letrunghieu/fizzbuzz-design-patterns
/src/Bridges/ValueIterators/InternalValueIterator.php
UTF-8
694
3.265625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace HieuLe\FizzBuzz\Bridges\ValueIterators; use HieuLe\FizzBuzz\Bridges\Value; class InternalValueIterator implements ValueIteratorInterface { private int $min; private int $max; private int $currentValue; public function __construct(int $min, int $max) { ...
true
4d9c9adbd2c55897b7f6c54362d44d4568b1bae5
PHP
nusje2000/cards-against-humanity
/src/Domain/Card/BlackCard.php
UTF-8
487
3
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Nusje2000\CAH\Domain\Card; final class BlackCard implements Card { /** * @var Id */ private Id $id; /** * @var Text */ private Text $text; public function __construct(Id $id, Text $text) { $this->id = $id; $this->t...
true
bd171ba695bcb85bfe451698be2f3a2fb8496f62
PHP
richhaho/ligapi2
/src/Api/Mapper/ConsignmentMapper.php
UTF-8
4,769
2.609375
3
[]
no_license
<?php declare(strict_types=1); namespace App\Api\Mapper; use App\Api\Dto\CreateConsignmentDto; use App\Api\Dto\PutConsignmentDto; use App\Entity\Consignment; use App\Entity\Data\ChangeAction; use App\Entity\Project; use App\Entity\User; use App\Event\ChangeEvent; use App\Exceptions\Domain\MissingDataException; use...
true
d44b4a2ab5cdd03c021435e1734ef23917628c79
PHP
bmanio/hypeGeo
/views/default/output/geo/country.php
UTF-8
875
2.859375
3
[]
no_license
<?php /** * Outputs a country name with a flag * * @uses $vars['value'] Country code or country name */ namespace hypeJunction\Geo; $countriesByIso = Countries::getCountries('iso', 'name'); $countriesByName = Countries::getCountries('name', 'iso'); $value = elgg_extract('value', $vars); if (!$valu...
true
c4776d25c96a42b639b8773ce6dcf74a48c13fee
PHP
DassiShenkar/personalTaste
/index.php
UTF-8
3,262
2.609375
3
[]
no_license
<?php include ('dbHandler.php'); if(isset($_SESSION["userID"])) { $_SESSION["userID"] = FALSE; session_destroy(); } $username = null; $password = null; if($_SERVER['REQUEST_METHOD'] == 'POST') { if(isset($_POST['username']) && isset($_POST["password"])) ...
true
f81921fa436e13e9e08c9fda43bd16f575a6ab7b
PHP
techart/tao3
/src/TAO/Fields.php
UTF-8
2,778
2.59375
3
[]
no_license
<?php namespace TAO; use TAO\Fields\Exception\SyntaxErrorInType; use TAO\Fields\Exception\UndefinedType; class Fields { protected $schemaWasUpdated = array(); protected $parsedTypes = array(); protected $classes = array(); public function init() { $this->classes = config('tao.fields', []); } public functi...
true
dbaac46235b0c8d08beb137ca8f4673a9c20d9f0
PHP
mfinkels/miPrimerProyecto
/ALANAPI/vendor/psliwa/php-pdf/tests/PHPPdf/PHPUnit/Framework/Constraint/ValidateByCallback.php
UTF-8
973
2.59375
3
[ "MIT", "BSD-3-Clause" ]
permissive
<?php namespace PHPPdf\PHPUnit\Framework\Constraint; class ValidateByCallback extends \PHPUnit_Framework_Constraint { private $closure; private $testCase; private $failureException; private $valid = null; public function __construct(\Closure $closure, \PHPUnit_Framework_TestCase $testCase) ...
true
be2c9335b62b778b454ec50b5d64f4d8d67bb72f
PHP
kurisukun/STI_Projet2
/site/classes/Database.php
UTF-8
858
3.109375
3
[]
no_license
<?php namespace App; use PDO; class Database { private static ?Database $instance = null; private PDO $pdo; /** * Database constructor. */ private function __construct() { try { $this->pdo = new PDO('mysql:host=database;dbname=sti', 'sti', 'sti'); $thi...
true
c2730b1afa21d7da8d2068d55042c4c1ff98a0de
PHP
hernan226/Programacion_III-1
/Clases Rodrigo/clase02/Clases/Alumno.php
UTF-8
765
3.109375
3
[]
no_license
<?php class Alumno { // Declaración de una propiedad public $nombre; public $legajo; public $cuatrimestre; public static $alumnos = array(); public function __construct($nombre="", $legajo=0, $cuatrimestre=0) { $this->$nombre=$nombre; $this->legajo = $legajo; $this->cua...
true
6de849bec9e6468031c9461881414bb470b7c168
PHP
OnlineDistrict/website_dev
/lib/easydb.php
UTF-8
5,011
3.234375
3
[]
no_license
<?php //DB接続をラクにするために一連の処理をクラス化 class easyDB{ public $mysqli; //mysqli() public $count; //SQLで何とかかんとかした行数 public $err_msg = ""; //接続エラーの時とかここにエラーメッセージを入れておく //コンストラクタ function __construct($host,$user,$pwd,$db){ //DBに接続を試みる(ホスト名,ユーザ名,パスワー...
true
346cab4f0881a10fbdf06a81d31d87a8f1c75f21
PHP
mr-kamc/test
/3learn/gallery.php
UTF-8
321
2.640625
3
[]
no_license
<?php $images = include __DIR__ . '/data.php'; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <?php foreach($images as $num=>$img){ ?> <a href="image.php?file=<?php echo $num; ?>"><img src="/img/<?php echo $img; ?>"></a></br> <?php } ?> </body> </html...
true
a90e890e2be24e87d567100a5719579fe7033728
PHP
CherryFramework/cherry-site
/inc/widgets/carousel/class-carousel-widget.php
UTF-8
13,919
2.625
3
[]
no_license
<?php /* Widget Name: Carousel widget Description: This widget is used to display a list of your posts in a carousel layout Settings: Title - Widget's text title Choose taxonomy type - Choose posts source type Select category / Select tag - Choose tags or categories as your posts source Posts count - Limit the post...
true
cbb98cceb74bf738a32084651bb1c47076c424a2
PHP
danielkit/todo-app
/controllers/TaskController.php
UTF-8
1,433
2.546875
3
[]
no_license
<?php namespace app\controllers; use app\models\Tasklist; use app\models\Task; use yii\web\Controller; class TaskController extends Controller { public function actionIndex() { $query = Tasklist::find()->all(); return $this->render('index', [ 'tasklists' => $query...
true
c84c7019e26be9bcc113fba18600899f782dacf2
PHP
MdYusufBinNur/IG-master
/app/Http/Controllers/Admin/InstituteController.php
UTF-8
2,480
2.546875
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers\Admin; use App\Admin\Institute; use App\Http\Controllers\Controller; use App\Repositories\InstituteRepository; use Illuminate\Http\Request; class InstituteController extends Controller { public $instituteRepository; public function __construct(InstituteRepository $instit...
true
cf2a9ae1a0f54755a786c814c7b7de2ba772e64a
PHP
famoser/archive
/mindbodyonline-api-php-wrapper/src/ClientService/DeleteClientRelationshipsResponse.php
UTF-8
1,074
2.578125
3
[ "MIT" ]
permissive
<?php namespace Famoser\MBOApiWrapper\ClientService; class DeleteClientRelationshipsResponse { /** * @var DeleteClientRelationshipsResult $DeleteClientRelationshipsResult */ protected $DeleteClientRelationshipsResult = null; /** * @param DeleteClientRelationshipsResult $DeleteClientRelati...
true
1161709073c0a582921202db67ae159282e35447
PHP
fernand5/cubesummation
/app/Http/Controllers/CubeController.php
UTF-8
1,599
2.8125
3
[]
no_license
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Cube; use Form; class CubeController extends Controller { public function index(){ return view('pages/index'); } /** * Receive the request that contain the N and M value * plus the sentences * * @param...
true
fd7600101e12a89cf688610b815a96efced64d57
PHP
intercom/intercom-php
/src/IntercomSegments.php
UTF-8
805
2.8125
3
[ "Apache-2.0" ]
permissive
<?php namespace Intercom; use Http\Client\Exception; use stdClass; class IntercomSegments extends IntercomResource { /** * Gets a single segment by ID. * * @see https://developers.intercom.com/reference#view-a-segment * @param string $id * @param array $options * @return stdCl...
true
4c400e5d77ca295210f9dbd2cb222cabf33ab62f
PHP
flame-org/Tester
/Flame/Tester/Helpers/Application.php
UTF-8
2,571
2.828125
3
[]
no_license
<?php /** * Class Application * * @author: Jiří Šifalda <sifalda.jiri@gmail.com> * @author Filip Procházka <filip@prochazka.su> * @date: 23.05.13 */ namespace Flame\Tester\Helpers; use Flame\Tester\Tools\UIFormTestingPresenter; use Nette\ComponentModel\IComponent; use Nette\InvalidStateException; use Nette\Objec...
true
fcbe0d4846df5dec1cb9fa5e260a52df62c60bef
PHP
sithumoemyint-code/OOP
/MvcOopShopping/Models/ProductModel.php
UTF-8
256
2.71875
3
[]
no_license
<?php namespace Models; class ProductModel extends BaseModel { public function getProducts() { $sql = "SELECT * FROM pro"; $result = $this->mysqli->query($sql); $products = $result->fetch_all(MYSQLI_ASSOC); return $products; } }
true
9ec2d77fc00d16816a2a6336a34ad1e6c02ac810
PHP
Sefakor-Ankora/PES-App
/settings-stock-modify.php
UTF-8
4,877
2.578125
3
[]
no_license
<?php require_once'includes/initialize.php'; $stock = Stock::find_by_id(base64_decode(filter_input(INPUT_GET, "id", FILTER_DEFAULT))); if(filter_input(INPUT_POST, "submit")){ $type = trim(filter_input(INPUT_POST, "type", FILTER_DEFAULT)); $qty = trim(filter_input(INPUT_POST, "qty...
true
7561b56079638d67415799627fce6de838e3f684
PHP
puiutucutu/php-functions
/src/array/indexByKeyValue.php
UTF-8
464
3.203125
3
[]
no_license
<?php /** * @param array $items * @param string $keyName * * @return array * @throws OutOfBoundsException */ function indexByKeyValue(array $items, $keyName) { $temp = []; foreach ($items as $k => $v) { if (!isset($v[$keyName])) { throw new OutOfBoundsException( "Key ...
true
5687a0da893da835d0ab4bad442ecdcec002e14f
PHP
Metaljunkfr/Portfolio
/src/Controller/ContactController.php
UTF-8
2,172
2.671875
3
[ "MIT" ]
permissive
<?php namespace App\Controller; use App\Entity\Contact; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Mailer\MailerInterface; use Symfony\Br...
true