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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ce601b76bd2399caaf5a7112e62d1493914b3607 | PHP | dtokos/php-search | /src/Engines/Compiled/SearchSources/Field/FieldSearchSource.php | UTF-8 | 1,744 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Artvys\Search\Engines\Compiled\SearchSources\Field;
use Artvys\Search\Engines\Compiled\CompiledQuery;
use Artvys\Search\Engines\Compiled\SearchSource;
use Artvys\Search\SearchResult;
abstract class FieldSearchSource implements SearchSource {
/** @inheritDoc */
public function search(CompiledQuery $... | true |
ca4dcce6c0f379032b94d9a8b7daca02806e99ce | PHP | aminatadjer/Find-Your-Translator | /User/Vues/routeurProfile.php | UTF-8 | 621 | 2.671875 | 3 | [] | no_license | <?php
require_once ('GeneralComponents.php');
require_once('ProfileTraducteur.php');
require_once('profileClient.php');
if (!isset($_SESSION['id_user'])) {
header('Location: routeurAcceuil.php');
exit();
}
class routeurProfile
{
public function affich(){
$g=new GeneralComponents();
if ($_SE... | true |
7efbaafadc1da7baf458f7cc7da1e605ab222c2f | PHP | vijay2507/oops | /protected.php | UTF-8 | 490 | 3.515625 | 4 | [] | no_license |
<?php
class employeedetail{
public $name;
public $salary;
public $age;
// constructer function
function __construct($name,$salary,$age){
$this->name=$name;
$this->salary=$salary;
$this->age=$age;
$this->employee();
}
protected function employee(){
echo"name of the employee $this->name <br>... | true |
cdcd488103dca90823bc555feb0ca4248d00bcbe | PHP | rynoceris/bspokgroup | /featured-designs.php | UTF-8 | 2,491 | 3.09375 | 3 | [] | no_license | <?php
//Create variables telling the PHP class how to parse the XML file and tell it where the XML file is
$xml_file = $_SERVER['DOCUMENT_ROOT'] . "/featured-designs.xml";
$xml_picture_key = "*DESIGNS*FEATURED*PICTURE";
/*$xml_name_key = "*DESIGNS*FEATURED*NAME";
$xml_size_key = "*DESIGNS*FEATURED*SIZE";*... | true |
108fc5f8612cd61bf21e00d48ee4747603543a50 | PHP | PietroCarrara/CodeRace2018 | /src/model/Peso.php | UTF-8 | 260 | 2.78125 | 3 | [] | no_license | <?php
function newPeso($peso) {
if (is_array($peso)) {
$obj = [];
foreach($peso as $p) {
$tmp = R::dispense('peso');
$tmp->peso = $p;
$obj[] = $tmp;
}
} else {
$obj = R::dispense('peso');
$obj->peso = $peso;
}
return $obj;
}
?>
| true |
05de3e0555f7481f457664521b2f276c609054a8 | PHP | bethlakshmi/GBE | /gbe_signup.inc | UTF-8 | 5,740 | 2.984375 | 3 | [] | no_license | <?php
/* gbe_Signup.inc - defines the baselines for Signup management.
*
* Last Updated 10/14/2013 by BB
*
*/
/* Class Signup
*
* This class represents all that is needed to describe an Signup.
*
*/
class Signup
{
// These public properties represent the various columns in the table.
public $Sig... | true |
5df48036869111b3a92f78dcdaf24d72f461d961 | PHP | mcirami/bookmakersedge | /app/Services/UserService.php | UTF-8 | 2,682 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: matteocirami
* Date: 10/24/18
* Time: 3:30 PM
*/
namespace App\Services;
use App\User;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Auth;
//use Spatie\Permission\Traits\HasRoles;
class UserService {
... | true |
cf66f3d1e5ff337f136d77ddd0ed2f03dd943be5 | PHP | moguomoguo/moguo | /src/api/connect.php | UTF-8 | 401 | 2.828125 | 3 | [] | no_license | <?php
/*
1)连接数据库
*/
$servername = "localhost";
$username = "root";
$password = "";
$dbname = 'mggg';
// 创建连接
$conn = new mysqli($servername, $username, $password, $dbname);
// 检测连接是否成功
if ($conn->connect_error) {
die("连接失败: " . $conn->connect_error);
}
//查询前设置编码,防止输出乱码
$conn->set_charset('... | true |
edd367f71d09f2c2b6f608eac2a0fafbd8e3f86c | PHP | masgeek/disciplinary-tracking | /modules/tracking/models/STUDENTSSTATUS.php | UTF-8 | 1,499 | 2.609375 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\tracking\models;
use Yii;
/**
* This is the model class for table "STUDENTS_STATUS".
*
* @property string $STATUS_CODE
* @property string $STATUS_DESCRIPTION
* @property string $PRINT_TRANSCRIPT
* @property string $CURRENT_STUDENT
*
* @property CASEINCIDENCES[] $cASEINCIDENCESs
*... | true |
7c41d4185181d904e267fc5eaa656763ff7aeef7 | PHP | cheikhdiopgaye/Gestion_Etudant | /type.php | UTF-8 | 773 | 2.515625 | 3 | [] | no_license | <?php
require 'requet.php';
Autoloader::register();
class Typedebourse{
private $pension;
private $libelle;
public function __construct($libelle='',$pension=0){
$this->$libelle;
$this->$pension;
}
public function getPension(){
return $this-... | true |
86407f2415af7e937e2d65cfa613e0f833da79f4 | PHP | ShaevMV/systo | /Backend/src/Shared/Infrastructure/Bus/Event/MySql/MySqlDoctrineEventBus.php | UTF-8 | 1,636 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Tickets\Shared\Infrastructure\Bus\Event\MySql;
use Tickets\Shared\Domain\Bus\Event\DomainEvent;
use Tickets\Shared\Domain\Bus\Event\EventBus;
use Tickets\Shared\Domain\Utils;
use Doctrine\DBAL\Connection;
use Doctrine\ORM\EntityManager;
use function Lambdish\Phunctional\each;... | true |
001a96717991274006004930db9d9536bfb53b22 | PHP | oliwierptak/Everon1 | /src/Everon/Rest/Resource/Basic.php | UTF-8 | 1,969 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Everon framework.
*
* (c) Oliwier Ptak <oliwierptak@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Everon\Rest\Resource;
use Everon\Helper;
use Everon\Rest\Interfaces;
a... | true |
a3daa04ff43b434f991c1e22067014503796efae | PHP | 77web/slack-message-to-github-issue-php | /src/DependencyInjection/OpenModalActionProvider.php | UTF-8 | 1,135 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Quartetcom\SlackToGithubIssue\DependencyInjection;
use GuzzleHttp\Client;
use Quartetcom\SlackToGithubIssue\Action\OpenModal;
use Quartetcom\SlackToGithubIssue\Slack\DialogFactoryInterface;
use Ray\Di\Di\Named;
use Ray\Di\ProviderInterface;
class OpenModalActionProvider implements ProviderInterface... | true |
1d486601e43ffacfd7c0cdde40a24e59eff2f11a | PHP | HanchiAhmed100/gym-project | /service/SerachClient.php | UTF-8 | 634 | 2.640625 | 3 | [] | no_license | <?php
session_start();
if(empty($_SESSION['token']) || empty($_SESSION['id'])){
exit("Session Expired");
}
include_once '../class/users.class.php';
$name = $_GET['name'];
$users = new users();
$user = $users->Search_users($name);
echo '<br />';
if($user->rowCount() != 0)
... | true |
2a4482dfc4b010ae7988fa2f9e2030adfdabc9e6 | PHP | aistis/radio | /Libs/Helper.php | UTF-8 | 726 | 2.9375 | 3 | [] | no_license | <?php
class Helper
{
protected function tableExists($pdo, $table) {
// Try a select statement against the table
// Run it in try/catch in case PDO is in ERRMODE_EXCEPTION.
try {
$result = $pdo->query("SELECT 1 FROM $table LIMIT 1");
} catch (Exception $e) {
// We got an exception == ... | true |
9f867db11eaaa88539a908ad46ff1e6185fcc7c1 | PHP | kublaj/php-schema.org-model | /examples/full/Order.php | UTF-8 | 2,982 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace SchemaOrg;
/**
* Order
*
* @link http://schema.org/Order
*/
class Order extends Intangible
{
/**
* Accepted Offer
*
* @var Offer The offer(s) -- e.g., product, quantity and price combinations -- included in the order.
*/
protected $acceptedOffer;
/**
* Billing ... | true |
02daaa68f1be1481742adc6007c8cbc1988bb078 | PHP | railken/search-query | /src/Languages/BoomTree/Resolvers/NullResolver.php | UTF-8 | 694 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | <?php
namespace Railken\SQ\Languages\BoomTree\Resolvers;
use Railken\SQ\Contracts\NodeContract;
use Railken\SQ\Languages\BoomTree\Nodes as Nodes;
class NullResolver extends ComparisonOperatorResolver
{
/**
* Node resolved.
*
* @var string
*/
public $node = Nodes\NullNode::class;
/**
... | true |
f271eecc38c1d4af55d74a23eb71b615f4f701c5 | PHP | anaap/ejerciciosphp | /ejercicio10/App.php | UTF-8 | 355 | 2.875 | 3 | [] | no_license | <?php
/**
*Clase App
*/
require_once 'Usuario.php';
Class App
{
private $_usuario=array();
public function __construct()
{
//echo 'En App';
if(isset($_GET) && !empty($_GET))
{
$this->_usuario[] = new Usuario($_GET['nombre'], $_GET['telefono']);
//echo "$this->usuario"
}
foreach ($_GET['usuario'] as $... | true |
4c5a7d1d10234af08e128471d424d6bef969fe78 | PHP | slickframework/mvc | /src/ControllerInterface.php | UTF-8 | 2,646 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of slick/mvc package
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Slick\Mvc;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
/**
* MVC Controller In... | true |
d1c0ca813391d6e2f4626171842e280f43d33016 | PHP | hoangkhoinguyen3001/doan | /admin/category/edit.php | UTF-8 | 5,360 | 2.53125 | 3 | [] | no_license | <?php
session_start();
include('../session.php');
include('../../connection.php');
include('../common/admin-header.php');
include('../common/admin-footer.php');
$conn = conn_db();
if (isset($_GET['id']) && !empty($_GET['id'])) {
$parentErr = $cateNameErr = "";
$paren... | true |
b18c070cc240dde371d1ced2b08ab94131146107 | PHP | lubem5612/glade-pay | /src/GladePay.php | UTF-8 | 4,120 | 2.796875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Lubem\GladePay;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\ValidationException;
class GladePay
{
/**
* @var
* get the merchant key from config
*/
protected $key;
/**
* the merchant key from config
* @va... | true |
6ca13b8a9f02d97ef59e2486ecd51d48a5b346f4 | PHP | dangerfield/dangerframe | /includes/DangerFrame/MultiLineLabel.class.php | UTF-8 | 949 | 2.9375 | 3 | [] | no_license | <?php
class DangerFrame_MultiLineLabel extends DangerFrame_WebComponent
{
protected $text;
public function __construct($id, $text)
{
parent::__construct($id);
$this->text = $text;
}
public function render()
{
$this->removeChildren();
foreach(self::splitIntoParagraphs($this->text) AS $paragraph... | true |
6b236d7ba0d6e4aa4541b5d8b780a20cf17c373c | PHP | Dragonice1995/XsollaSchoolTasks | /Day1/d1task2.php | UTF-8 | 2,273 | 3.34375 | 3 | [] | no_license | <?php
//здесь a и b - массивы
function cmp($a, $b)
{
if ($a[0] == $b[0]) {
return 0;
}
return ($a[0] < $b[0]) ? -1 : 1;
}
function maxCountAndTimeInterval($str) {
$strArray = explode(" ", $str);
$allTimes = array();
//разбиваем интервалы на начальное и конечное время
//записываем вре... | true |
763ac3410058359dd1109d0e94a0949ca1d975ce | PHP | mivancic/treestructure | /lib/API/Value/TreeItem.php | UTF-8 | 367 | 2.671875 | 3 | [] | no_license | <?php
namespace LibPoint\TreeStructure\API\Value;
class TreeItem extends ValueObject
{
public $id;
public $parentId;
public $inner;
public $children;
public function addChild(TreeItem $item)
{
$this->children[] = $item;
return $this;
}
public function getChildren(... | true |
11ad7a4ef7d102afde239bea6d5d677ccf709927 | PHP | riotkit-org/s3-powerful-backup | /src/Application/Event/BackupIsBeingCreatedEvent.php | UTF-8 | 383 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php declare(strict_types=1);
namespace App\Application\Event;
class BackupIsBeingCreatedEvent
{
public string $maxAllVersionsSize;
public string $oneVersionSize;
public function __construct(string $maxAllVersionsSize, string $oneVersionSize)
{
$this->maxAllVersionsSize = $maxAllVersionsSize... | true |
57080fb42c1263bccefebd9368547adaf296454d | PHP | Ben-yachou/CoursAlkas | /php/formulaires/exercices/convertisseurBandePassante/traitement.php | UTF-8 | 1,212 | 3.625 | 4 | [] | no_license | <?php
//on vérifie que nos valeur soient présentes
if (isset($_POST['num']) && isset($_POST['unit1']) && isset($_POST['unit2'])){
//et on les stocke
$num = $_POST['num'];
//si notre valeur à convertir est un nombre
if (is_numeric($num)){
$unit1 = $_POST['unit1'];
$unit2 = $_POST['unit2'... | true |
c8de5a451a77d99740d41dcadc6e030832b349d8 | PHP | ariadna934/fiscalizacion | /library/Session.php | UTF-8 | 395 | 3 | 3 | [] | no_license | <?php
class Session
{
//Iniciamos la sesion
function start(){
@session_start();
}
//Obtenemos el valor de un de los indice de sesion
static function getSession($name){
return $_SESSION[$name];
}
static function setSession($name,$data){
$_SESSION[$name]=$data;
... | true |
3e2b8ec6ed09b7ae05042fe133c87f4755dd5a03 | PHP | mremolt/php53-seminar | /detailverbesserungen/spl_stack.php | UTF-8 | 801 | 3.71875 | 4 | [] | no_license | <?php
/*
* Ein Stack, Deutsch Stapel ist eine Array-ähnliche Konstruktion, bei der
* immer die Elemente zuürückgegeben werden, die als letztes hinzugefügt wurden.
*
* Beispiel:
* Es werden die Zahlen 1 4 7 9 einzeln hinzugefügt.
* Wenn die Elemente ausgelesen werden, erhalte ich diese in der
* Reihenfolge 9 7 4... | true |
75474d90b168ff387ca313f78d10f5b3a06df7f3 | PHP | Pythagus/lydia | /src/Exceptions/InvalidLydiaResponseException.php | UTF-8 | 639 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Pythagus\Lydia\Exceptions;
use Pythagus\Lydia\Contracts\LydiaException;
/**
* Class InvalidLydiaResponseException
* @package Pythagus\Lydia\Exceptions
*
* @property array response
*
* @author: Damien MOLINA
*/
class InvalidLydiaResponseException extends LydiaException {
/**
* Make a ... | true |
4514d817d80e7e3149e532408fbbaaadb28cd9c9 | PHP | Fale/vodafone | /app/controllers/CsvController.php | UTF-8 | 3,082 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
class CsvController extends BaseController {
public function to($to = 'z')
{
return $this->all('0', $to);
}
public function all($from = "0", $to = 'z')
{
/*return DB::table("vodafone")
->select("COUNT(*) as PerCount")
->select(function($query)
{
$query->'SUM(CASE tipo WHEN "Servizi di messaggisti... | true |
528dc0df985a43b238653ba9ebb2912c5e0b7e15 | PHP | olegpolukhin/test-algorithm | /two_arrays.php | UTF-8 | 969 | 3.40625 | 3 | [] | no_license | <?php
/*
Задача 1
Даны два неубывающих массива a(k), b(m) написать функцию которая вернет объединенный неубывающий массив. Нельзя использовать встроенные функции работы с массивами, sort, array_merge и другие. Нельзя использовать алгоритмы сортировки.
[-1,2,3,3,4,5]
[0,2,2,3,6,6,7,99]
*/
$A = [-1,2,3,3,4,5];
... | true |
3a5379586cd1f6d49e371566ada2d409efbb3a9f | PHP | 1658544535/php | /logic/synthetical_dictBean.php | UTF-8 | 1,146 | 2.53125 | 3 | [] | no_license | <?php
if ( !defined('HN1') ) die("no permission");
class synthetical_dictBean
{
// 获取品牌名
function get_brand($db,$val)
{
$sql = "SELECT `name` FROM ".SYNTHETICAL_DICT_TABLE." WHERE `type`='brand' AND `value`='".$val."'";
return $db->get_row($sql)->name;
}
// 包装方式
function get_pack($db,$val)
... | true |
da237d4456fa4c26799799d9ee7c7280d1d4d938 | PHP | johannijdam/stringrenamer | /index.php | UTF-8 | 693 | 2.5625 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
//fill the below fields with your values
$searchfor = "";
$replacewith = "";
$parentfolder = "./";
//change nothing from here
$di = new RecursiveDirectoryIterator($parentfolder);
foreach (new RecursiveIteratorIterator($di) as $filename => $file) {
//open... | true |
52a7de696a098f55dab23feca39cb6302ffd543b | PHP | MockingMagician/shot | /tests/tests/ParameterIteratorTest.php | UTF-8 | 2,955 | 2.984375 | 3 | [] | no_license | <?php
namespace MockingMagician\Shot\Tests;
use MockingMagician\Shot\Exceptions\ParameterTypeImplementException;
use MockingMagician\Shot\Parameter;
use MockingMagician\Shot\ParameterIterator;
use PHPUnit\Framework\TestCase;
class ParameterIteratorTest extends TestCase
{
/** @var \Generator */
protected $par... | true |
91da3649c2a75a403d92d3cdef5238460cc7fa2d | PHP | Granoo/Projet3 | /display_details.php | UTF-8 | 6,083 | 2.71875 | 3 | [] | no_license | <?php
session_start();
try
{
// On se connecte à MySQL
$bdd = new PDO('mysql:host=localhost;dbname=gbaf;charset=utf8', 'root', '');
}
catch(Exception $e)
{
// En cas d'erreur, on affiche un message et on arrête tout
die('Erreur : '.$e->getMessage());
}
?>
<!DOCTYPE html>
<html langue="fr">
<... | true |
e813d7a2835f9015478665509e50f1361512c3a1 | PHP | adadki4103/Senior-Project | /currentBuild_WIP/associatedPHP/login.php | UTF-8 | 556 | 2.734375 | 3 | [] | no_license |
<?php
//db_name, username, & password,INSERT Details, & POST Details removed for Security Purposes.
$db_name = "";
$mysql_username = "";
$mysql_password = "";
$server_name = "";
$conn = mysqli_connect($server_name, $mysql_username, $mysql_password, $db_name);
$user_name = $_POST[""];
$user_pass = $_POST[""];
// Ch... | true |
0d396470c07d64e983ebb4feae1273469f3a0e6f | PHP | t-ibrand/laravel-ueditor | /src/Uploader/Upload.php | UTF-8 | 4,149 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php namespace iBrand\UEditor\Uploader;
use Symfony\Component\HttpFoundation\File\Exception\FileException;
/**
* Abstract Class Upload
* 文件上传抽象类
*
*
* @package iBrand\UEditor\Uploader
*/
abstract class Upload
{
protected $fileField; //文件域名
protected $file; //文件上传对象
protected $base64; //文件上传对象
protected $co... | true |
fe05de4e5541c22c093684fc739da01a3d50b47f | PHP | Frostmornex/12 | /controller.php | UTF-8 | 3,977 | 2.8125 | 3 | [] | no_license | <?php
error_reporting(E_ALL); // устанавливает уровень отслеживаемых ошибок интерпретатором php
ini_set('display_errors', 1); // дает команду интерпретатору php выводить все отслеживаемые ошибки в браузере
$dbhost = 'localhost';
$dbtable = 'les_galery';
$dbuser = 'root';
$dbpass = 'root';
try {
$db = new PDO... | true |
3180ea1b431d6361e9d6668573a5878bbdffe9af | PHP | lcbiplove/efoodbasket | /App/Models/User.php | UTF-8 | 14,477 | 3.078125 | 3 | [] | no_license | <?php
namespace App\Models;
use PDO;
use App\Extra;
/**
* Example user model
*
* PHP version 7.3
*/
class User extends \Core\Model
{
/**
* Admin role type
* @var string
*/
public const ROLE_ADMIN = 'ADMIN';
/**
* Trader role type
* @var string
*/
public const ROLE_T... | true |
3f87b342c5ef6d1d37a13e90369014c8e5351f1c | PHP | BogdanOnishchuk/homeworks | /php_basics_tasks/20-22.php | UTF-8 | 400 | 3.15625 | 3 | [] | no_license | <?php
$a = 20;
$b = 0;
$c = -20;
var_dump((bool)$a,(bool)$b,(bool)$c);
//Приведение числовых значений к логическим осуществляется по следующему правилу: результатом будет false,
// если исходное значение было 0. В остальных случаях результатом будет true. | true |
1fd7321b3209bcc726edd80f584eb8a64af6c0dd | PHP | Attelecoms/corevx | /app/Http/Controllers/ContactMessageController.php | UTF-8 | 959 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Mail;
use Illuminate\Http\Request;
class ContactMessageController extends Controller
{
public function create(){
return view('contact');
}
//
public function store(Request $request)
{
// validation first
// dd($request->all());
// v... | true |
b6df622555c5eb0fb4510149fc9346548b1d6c9d | PHP | UltimaPHP/UltimaPHP | /scripts/mobiles/Monsters/ML/Humanoid/Melee/Minotaur.php | UTF-8 | 785 | 2.546875 | 3 | [] | no_license | <?php
/**
* Ultima PHP - OpenSource Ultima Online Server written in PHP
* Version: 0.1 - Pre Alpha
*/
class Minotaur extends Mobile {
public function summon() {
$this->name = "a minotaur";
$this->body = 263;
$this->type = "";
$this->flags = 0x00;
$this->color = 0x00;
$this->basesoundid = 0;
$this->str ... | true |
96fb9e26f142bf4d8b2ea406f4a42952a5642c00 | PHP | AlexsandroAndre/supero | /app/Http/Controllers/TaskController.php | UTF-8 | 4,011 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Task;
use Illuminate\Http\Request;
class TaskController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return response(Task::where('status', 0)->orde... | true |
12a6ce82249a8147d5e43c4ad1a5fa2b5a99adcf | PHP | skyselang/yylAdmin | /app/common/cache/member/LogCache.php | UTF-8 | 2,013 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
// +----------------------------------------------------------------------
// | yylAdmin 前后分离,简单轻量,免费开源,开箱即用,极简后台管理系统
// +----------------------------------------------------------------------
// | Copyright https://gitee.com/skyselang All rights reserved
// +------------------------------------------------------... | true |
dbdb9b7c0fd76161b1fdf310908891a9f4a0ac67 | PHP | matipoo/EducAR-1 | /class/class.tipsex.php | UTF-8 | 383 | 2.6875 | 3 | [] | no_license | <?php
/**
*
*/
class Tipsex{
public $db;
function __construct($db)
{
$this->conn = $db;
}
function show(){
try {
$stmt = $this->conn->prepare('SELECT * FROM TipSex');
$stmt->execute();
return $stmt;
} catch (PDOException $e) {
echo $e-... | true |
654fe67b52c51c1018934aef94357f5deab66d0c | PHP | allambin/forum-yii | /modules/forum/models/UserThreadView.php | UTF-8 | 623 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\forum\models;
use Yii;
/**
* This is the model class for table "user_thread_views".
*
* @property integer $id
* @property string $creation_date
* @property integer $author
* @property integer $thread_id
*
* @property Threads $thread
*/
class UserThreadView extends \yii\db\ActiveR... | true |
a9cce21798b8531fd760d24c41ac05c3d3fecaa7 | PHP | brandonekoto/medapp | /composants/HttpStatut.php | UTF-8 | 733 | 2.75 | 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.
*/
/**
* Description of HttpStatut
*
* @author brandonekoto
*/
class HttpStatut {
private $code;
private $message;
... | true |
b5cc531b8e6a03fbac972a02fc105132508b6d99 | PHP | pedrolgarcia/php7Course | /include_require/ex02.php | UTF-8 | 500 | 3.046875 | 3 | [] | no_license | <?php
//REQUIRE obriga que o arquivo exista e que esteja funcionando corretamente, ou vai gerar um erro FATAL.
//INCLUDE tenta funcionar e possui mais recursos (include_path). Include dinâmico, péssima prática.
include "ex01.php";
//require "ex01.php";
//include_once e require_once Chama o arquivo... | true |
1aa061c8b0f863b1882b44f9b6dbf791d84e8d8a | PHP | mashagrig/mysite8.dem | /localhost/app/Listeners/Shedules/CheckSheduleSendNotification.php | UTF-8 | 1,136 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Listeners\Shedules;
use App\Events\Shedules\CheckSheduleEvent;
use App\Mail\Shedules\CheckSheduleEmail;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Mail;
use Swift_TransportException;
class CheckSheduleSendNotification
{
... | true |
a9d84df6973ed24f18e251f23f4f5276c081f8f5 | PHP | asmodeusta/fluent | /tests/UserTest.php | UTF-8 | 1,184 | 2.78125 | 3 | [] | no_license | <?php
namespace Tests;
use Fluent\User;
use Fluent\UserFluent;
use Fluent\UserSimple;
use PHPUnit\Framework\TestCase;
class UserTest extends TestCase
{
public function testUserSimple()
{
$user = new UserSimple();
$user->id = 1;
$user->name = 'John';
$user->password = '12345';... | true |
878335cf2ef24ac328b49a97c7347a83ce57b797 | PHP | marcello-ants/saidadeemergencia.com.br | /_old/banda_saida/galeria/admin/images/indexThumbView.class.php | UTF-8 | 4,633 | 2.78125 | 3 | [] | no_license | <?php
//-------------------------------------------------------------------------------------------------
// OSW - Gerenciador Galeria de Imagens
// http://www.onlinesolucoesweb.com.br
// 2010
//-------------------------------------------------------------------------------------------------
class IndexThumbView
{
... | true |
041fd4e15b713d54b8d96f004e433f1cf54f88f5 | PHP | ShanksZheng/php_mud | /BasicLib/Time.php | UTF-8 | 2,041 | 3.546875 | 4 | [] | no_license | <?php
namespace BasicLib
{
//获取当前时间毫秒
function GetTimeMS()
{
return (int)(microtime(true) * 1000);
}
//获取当前时间秒
function GetTimeS()
{
return time();
}
//获取当前时间分
function GetTimeM()
{
return (int)(time() / 60);
}
//获取当前时间小时
function GetTimeH()
{
return (int)(time() / 3600);
}
//秒转换为毫秒
function seconds(int $t) {... | true |
a2bbdc56a4229721e0bfda976a1a6dd5e0574d1d | PHP | jkosmetos/facebook-messenger-api | /src/JK/FacebookMessenger/Core/ButtonInterface.php | UTF-8 | 462 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: john
* Date: 2016/06/14
* Time: 11:10 AM
*/
namespace JK\FacebookMessenger\Core;
/**
* Interface ButtonInterface
* @package JK\FacebookMessenger\Core
*/
interface ButtonInterface
{
/**
* @return string
*/
public function getType();
/**
... | true |
42fba12c88c8c6c03b5974bec89ea4b7858c9d97 | PHP | CM-Denver/ForumSite | /search.php | UTF-8 | 1,152 | 2.96875 | 3 | [] | no_license | <?php
include('top.php');
$searchItem = $_REQUEST['search'];
//Convert to lowercase because post title will be converted to lowercase:
$searchItem = strtolower($searchItem);
//Create an array of all the text files (posts):
$files = glob("./posts/" . "*");
//loop through each text file (post):
foreach ($files as $p... | true |
b15777679bc52c0ea872b4103dfb14cc5edf2de7 | PHP | swow/swow | /ext/tests/swow_buffer/clone.phpt | UTF-8 | 1,222 | 2.703125 | 3 | [
"Apache-2.0",
"ISC",
"BSL-1.0",
"MIT",
"BSD-2-Clause"
] | permissive | --TEST--
swow_buffer: clone object
--SKIPIF--
<?php
require __DIR__ . '/../include/skipif.php';
?>
--FILE--
<?php
require __DIR__ . '/../include/bootstrap.php';
use Swow\Buffer;
const CUSTOM_SIZE = Buffer::COMMON_SIZE + 3 * Buffer::PAGE_SIZE;
$buffer = new Buffer(CUSTOM_SIZE);
Assert::same($buffer->getSize(), CUSTOM... | true |
d0d8f2951330c5786926b9d94c663a65f0032730 | PHP | designpatterns/designpatterns | /proxy/php/example_bankaccount/bankaccount.php | UTF-8 | 993 | 3.015625 | 3 | [
"Unlicense"
] | permissive | <?php
Interface IAccount {
function getBalance();
}
// special exception for testing purpose
class AccountException extends Exception{}
class AccountProxy implements IAccount
{
private $realAccount;
public function getBalance()
{
$this->realAccount=new Account();
return $this->realAccount->getBalance();
... | true |
390b365234ce40068eafb14439c527c25292b857 | PHP | ElenaTellez/PHP | /LECCION 1/Ejercicio7.php | UTF-8 | 670 | 3.328125 | 3 | [] | no_license | <!DOCTYPE html>
<!--
Ejercicio 7
Crea las variables $nombre , $direccion y $telefono y asígnales los valores adecuados.
Muestra los valores por pantalla de tal forma que el resultado sea el mismo que
el del ejercicio 2.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
... | true |
31d4b80966af19e5e2a21876a91ccd983f4a601a | PHP | vic-donetsk/Travel-agency | /app/Http/Controllers/BasketController.php | UTF-8 | 4,138 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Auth;
use App\Models\Tour;
use App\Models\Deal;
use App\Models\Order;
class BasketController extends Controller
{
// сохранение элемента в корзине
public function store(Re... | true |
e24ac26934c0d55aaeba0d9d5a25aeee061d34d2 | PHP | swimtobird/fastd-client | /src/Process/SubscribeProcess.php | UTF-8 | 1,950 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author jan huang <bboyjanhuang@gmail.com>
* @copyright 2017
*
* @see https://www.github.com/janhuang
* @see http://www.fast-d.cn/
*/
namespace Process;
use FastD\Packet\Json;
use FastD\Process\AbstractProcess;
use swoole_process;
use swoole_client;
/**
* Class NodeProcess
* @packag... | true |
8410c2907292a81ac7904dde43c16a9aaf564de6 | PHP | cycle/schema-builder | /src/Generator/ValidateEntities.php | UTF-8 | 707 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Cycle\Schema\Generator;
use Cycle\Schema\Exception\EntityException;
use Cycle\Schema\GeneratorInterface;
use Cycle\Schema\Registry;
final class ValidateEntities implements GeneratorInterface
{
/**
* @param Registry $registry
*
* @throws EntityException
... | true |
6fd72b33ecabfae69f8b45bd55feccd67a9eb003 | PHP | damianociarla/test | /library/uec-media-uploader/src/MediaUploader/Type/Pdf/Adapter/Validator/PdfValidator.php | UTF-8 | 848 | 2.546875 | 3 | [] | no_license | <?php
namespace UEC\MediaUploader\Type\Pdf\Adapter\Validator;
use UEC\MediaUploader\Core\Adapter\AdapterInterface;
use UEC\MediaUploader\Core\Adapter\Validator\AdapterValidatorInterface;
class PdfValidator implements AdapterValidatorInterface
{
public function supports(AdapterInterface $adapter)
{
re... | true |
87c09b0f1fb42fc740bbce00617abce06247ec6e | PHP | diego95root/diego95root.github.io | /assets/posts_details/Admirer/files/html/utility-scripts/admin_tasks.php | UTF-8 | 1,795 | 2.53125 | 3 | [
"MIT"
] | permissive | <html>
<head>
<title>Administrative Tasks</title>
</head>
<body>
<h3>Admin Tasks Web Interface (v0.01 beta)</h3>
<?php
// Web Interface to the admin_tasks script
//
if(isset($_REQUEST['task']))
{
$task = $_REQUEST['task'];
if($task == '1' || $task == '2' || $task == '3' || $task == '4' ||
... | true |
acac65396d02b15524acc563a191adcdfef07d64 | PHP | diego-scano/php-snacks-b1 | /Snack 2/index.php | UTF-8 | 559 | 2.953125 | 3 | [] | no_license | <!-- SNACK 2
Passare come parametri GET name, mail e age e verificare (cercando i metodi che non
conosciamo nella documentazione) che:
1. name sia più lungo di 3 caratteri,
2. mail contenga un punto e una chiocciola
3. age sia un numero.
Se tutto è ok stampare “Accesso riuscito”, altrimenti “Accesso negato”. -->
... | true |
c502a737b946138b71de2cdd53e9732f869616c6 | PHP | rasyidrrd/WAD-RASYID-1202184094 | /MODUL4 RASYID/update.php | UTF-8 | 1,034 | 2.578125 | 3 | [] | no_license | <?php
session_start();
require_once("config.php");
if(isset($_POST['update'])){
$nama = filter_input(INPUT_POST, 'nama', FILTER_SANITIZE_STRING);
$no_hp = filter_input(INPUT_POST, 'no_hp', FILTER_SANITIZE_STRING);
// enkripsi password
$password = password_hash($_POST["password"], PASSWORD_DEFAULT);
... | true |
0a90da6625a1a2682cdad82c753ffebbdc97a82c | PHP | Deferdy/job_test | /view.php | UTF-8 | 3,269 | 2.53125 | 3 | [] | no_license | <?php
require 'admin/database.php';
if(isset($_SESSION['name'])){
header("Location: admin.php");
exit;
}
if(!empty($_GET['id'])) {
$id = checkInput($_GET['id']);
}
$db = Database::connect();
$statement = $db->prepare("SELECT exercice.id, exercice.description, exercice.address, exercice... | true |
f2672b5145f964b166dca183583dce706433b450 | PHP | aoifeoneill01/book-repo | /profile-includes/notes/edit-note-db.php | UTF-8 | 1,017 | 2.609375 | 3 | [] | no_license | <?php
include '../../includes/db-connect.php';
// Edit Note
if(isset($_POST['save-edit'])) {
$noteInput = mysqli_real_escape_string($conn, $_POST['noteEdit']);
$noteName = mysqli_real_escape_string($conn, $_POST['noteName']);
$id = mysqli_real_escape_string($conn, $_POST['id']);
$queryUpda... | true |
39da53e6235207005c96dac2fea9e1ec98540b00 | PHP | betocaeirojr/ComicSite | /db/create_tables.php | UTF-8 | 1,948 | 2.65625 | 3 | [] | no_license | <?php
require('config.php');
$conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)
or die('Could not connect to MySQL database. ' . mysql_error());
mysql_select_db(SQL_DB,$conn);
// Table CHARACTER MAIN
$sql1 = "CREATE TABLE IF NOT EXISTS char_main
(
id int(11) NOT NULL auto_increment,
alias varcha... | true |
1089228a496f529342f29fee03f0b8c66a140b45 | PHP | anuislam/AS-CMS-modules | /Eccommerce/Database/Migrations/2018_04_20_202001_shipping_method.php | UTF-8 | 789 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ShippingMethod extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('shipping_method', f... | true |
fea161ebedbd9c31fea097d20897f4ca8d23ac7c | PHP | brick/translation | /src/LocaleFallback/ConfigurableFallback.php | UTF-8 | 1,219 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Brick\Translation\LocaleFallback;
use Brick\Translation\LocaleFallback;
use Brick\Translation\Translator;
class ConfigurableFallback implements LocaleFallback
{
/**
* @var array
*/
private $fallbacks = [];
/**
* {@inheritdoc}
*/
public fu... | true |
600d6c7ddaaf004e63d0e3bac07344e770001a37 | PHP | savarirajunc/nc-new-api-v4 | /app/controllers/NidarakidphysicalinfoController.php | UTF-8 | 10,265 | 2.546875 | 3 | [] | no_license | <?php
use Phalcon\Mvc\Micro;
use Phalcon\Validation;
use Phalcon\Validation\Validator\Digit;
use Phalcon\Validation\Validator\Alpha;
use Phalcon\Validation\Validator\StringLength;
use Phalcon\Validation\Validator\PresenceOf;
class NidarakidphysicalinfoController extends \Phalcon\Mvc\Controller {
public function i... | true |
87d170d5e33c679dba871952cb393f2f145fb5bf | PHP | johyunchol/php-gson2 | /test/cases/Extractor/TestObject.php | UTF-8 | 487 | 3.390625 | 3 | [] | no_license | <?php
class TestObject {
private $name = "Raff";
private $lastName = "Martinez";
private $propertyWithoutGetter = 'propertyWithoutGetter';
protected $protectedProperty = 'protectedProperty';
public $publicProperty = 'publicProperty';
/**
* @return string
*/
public function g... | true |
e9846438e53485b35d6da8fd3d64f07447974044 | PHP | NetInventors/sw.ext.neti_tags | /Service/Decorations/CategoryService.php | UTF-8 | 3,803 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* @copyright Copyright (c) 2017, Net Inventors GmbH
* @category NetiTags
* @author bmueller
*/
namespace NetiTags\Service\Decorations;
use NetiTags\Service\RelationInterface;
use NetiTags\Service\TagsCache;
use Shopware\Bundle\StoreFrontBundle\Service\CategoryServiceInterface as CoreService;
use ... | true |
a59abddad1d4cd751f9219947c9a7d70ac39718c | PHP | lethuan-04102000/MCV_Customer_docker | /src/model/UserDB.php | UTF-8 | 2,126 | 3.21875 | 3 | [] | no_license | <?php
namespace Model;
class UserDB
{
public $connection;
public function __construct($connection)
{
$this->connection = $connection;
}
public function create($user)
{
$sql = "INSERT INTO user(name, username, email,password,avatar) VALUES (?, ? , ? , ? , ?)";
$statement = $this->c... | true |
5cf8fae32f06c8ffce32cbf2ed6987d0ee74c56c | PHP | wajaja/sf-opi | /src/OP/MessageBundle/DocumentManager/ThreadManager.php | UTF-8 | 2,556 | 2.546875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace OP\MessageBundle\DocumentManager;
use OP\MessageBundle\Model\{ ParticipantInterface};
use Doctrine\ODM\MongoDB\DocumentManager,
OP\UserBundle\Repository\OpinionUserManager,
OP\MessageBundle\DataTransformer\ObjectToArrayTransformer,
OP\MessageBundle\ModelManager\ThreadManager as BaseThreadM... | true |
d764ee25c5ecd6032c19a88f569306056a2f3902 | PHP | jaimeirazabal1/funciones_emerson | /functions.php | UTF-8 | 12,597 | 2.953125 | 3 | [] | no_license | <?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// # Importa los datos de un archivo de excel o csv a una tabla
// importData(String tabName, String filePath) {
// ...
// return Boolean done;
// }
define('HOST', 'localhost');
define('USER', 'root');
define('PA... | true |
90afc279880e5aacdc421b235fc2d63d95915e89 | PHP | betopinheiro1005/curso-php-85bits | /aula-03/aula-03n.php | UTF-8 | 103 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
$ano = "2019";
$x = function($txt) use($ano){
echo "Hello $txt $ano";
};
$x("World");
?>
| true |
f399bca6b203493173040280f051e5b8a4d08ddf | PHP | Castrioph/CursoJS2017 | /pokemonDaw/Modelo/Jabiermeri.php | UTF-8 | 728 | 3.125 | 3 | [] | no_license | <?php
/**
*
*/
class Jabiermeri extends Pokemon{
private $tipo="Fantasma";
function __construct($nombre, $vida, $lvl,$ataques,$tipo){
parent::__construct($nombre, $vida, $lvl,$ataques);
$this->tipo=$tipo;
}
public function getStats(){
$str=parent::getStats();
$str=$str."Tipo: ".$this->tipo... | true |
ecbf540c1b54536e80e8dab59f6c05f0a533881c | PHP | patrickDugan04/server | /pass.php | UTF-8 | 433 | 2.765625 | 3 | [] | no_license | <head>
<h1>
<?php
$in = $_POST["password"];
$pass = "patrick";
if($in == $pass){
echo ' You Win The Challenge! ';
echo '<form action = "/exec.php" method="post">
<input type="text" name="insert">
<input type="hidden" name="prev" vale = "">
<input type="submit" value="submit">
</f... | true |
f61289da10aefba985ae916d8652b15ecab0e69c | PHP | hpie/rmsa | /application/third_party/smtp_mail/Security.php | UTF-8 | 3,346 | 3.46875 | 3 | [] | no_license | <?php
class Security {
# Private key
public static $salt = 'DarshitCodeALl';
# Encrypt a value using
public function encrypt_string($input) {
$inputlen = strlen($input); // Counts number characters in string $input
$randkey = rand(1, 9); // Gets a ran... | true |
0eea1e8bdd26f9348c619b531085360c7fb017f4 | PHP | ameeuw23/oauth2-framework | /src/Component/OpenIdConnect/IdTokenBuilderFactory.php | UTF-8 | 1,423 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2018 Spomky-Labs
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace OAuth2Framework\Component\OpenIdConnect;
use OAuth2Framework\Component\Core... | true |
75ce9d1f829faccc1898086e5f41635d65c8abd6 | PHP | gerardoGomr/efortnight | /app/Domain/Fortnight/Entry.php | UTF-8 | 685 | 3.34375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Domain\Fortnight;
/**
* Class Entry
*
* @author Gerardo Gómez <gerardo.gomr@gmail.com>
*/
class Entry implements FortnightMovement
{
/**
* @var string
*/
private $name;
/**
* Entry amount
*
* @var double
*/
private $amount;
/**
* Entry Constructor
*
* @param string $n... | true |
9fd381b7fbd8cadd91441affd4e45be0c9a7a37f | PHP | deivi88/examen_php_mysql | /EXAMEN PHP Y MYSQL/Ejercicios/10. Ejercicios Formularios1/Soluciones Chari/ej1.php | ISO-8859-1 | 275 | 3.140625 | 3 | [] | no_license | <html>
<head>
<title> Ejercicio 1 </title>
</head>
<body>
<?php
//primero compruebo que haya algn dato en el campo nom
if($_GET['nom'])
{
$nombre= $_GET['nom'];
echo "Hola $nombre";
}
else
{
echo "no has introducido nombre";
}
?>
</body>
</html> | true |
1480cf2b559d3d832c4c4fa4a0ac066329c62aa7 | PHP | Ramedlav/test | /php/select/Query.php | UTF-8 | 786 | 3.0625 | 3 | [] | no_license | <?php
class Select extends DB{
function Selector()
{
$query = "SELECT * FROM `users`";
$result = $this->connect()->query($query);
while ($row = $result->fetch_assoc()) {
$show[] = $row;
}
return $show;
}
function Inserter($str, $val){
$str = ... | true |
86e112d99fdb4ebc331b0c0e39617a2886f601e7 | PHP | tayron/string-object | /src/StringObject.php | UTF-8 | 12,104 | 3.859375 | 4 | [] | no_license | <?php
namespace Tayron;
/**
* Classe para gerenciamento de string
*
* @author Tayron Miranda <dev@tayron.com.br>
*/
class StringObject
{
/**
* Posição a que se refere ao preenchimento de string no método fillString
*/
const LEFT = 'LEFT';
/**
* Posição a que se refere ao preenc... | true |
6d23f771cb5532df3251b76774cd89ec37d6f724 | PHP | jgwill/lampyno | /www/wp-content/plugins/wp-recipe-maker/includes/public/shortcodes/recipe/class-wprm-sc-unit-conversion.php | UTF-8 | 1,467 | 2.546875 | 3 | [
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only",
"MIT"
] | permissive | <?php
/**
* Handle the recipe unit conversion shortcode.
*
* @link http://bootstrapped.ventures
* @since 3.3.0
*
* @package WP_Recipe_Maker
* @subpackage WP_Recipe_Maker/includes/public/shortcodes/recipe
*/
/**
* Handle the recipe unit conversion shortcode.
*
* @since 3.3.0
* @package ... | true |
b6379fa0e8ccc3551c5697dca95b1a17f8e0252b | PHP | EmilyLopez-Ichikawa/Sustain | /query_by_category.php | UTF-8 | 884 | 2.75 | 3 | [] | no_license | <?php
ini_set("session.cookie_httponly", 1);
session_start();
header("Content-Type: application/json");
require "database.php";
$json_str = file_get_contents('php://input');
$json_obj = json_decode($json_str, true);
$category = $json_obj['category'];
$food_name = $_SESSION['food'];
$stm... | true |
ad7a3cdc399c56ceb71a4633a35b08deda7298c2 | PHP | adamstrawson/BBMembershipSystem | /app/Repo/InductionRepository.php | UTF-8 | 4,499 | 2.703125 | 3 | [] | no_license | <?php namespace BB\Repo;
use BB\Entities\Induction;
use Illuminate\Database\Eloquent\Collection;
class InductionRepository extends DBRepository
{
/**
* @var Induction
*/
protected $model;
public function __construct(Induction $model)
{
$this->model = $model;
}
/**
* ... | true |
3318f9f583a47ac359ea66248ce56e08794861f7 | PHP | phpstan/phpstan-src | /src/Node/Constant/ClassConstantFetch.php | UTF-8 | 407 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace PHPStan\Node\Constant;
use PhpParser\Node\Expr\ClassConstFetch;
use PHPStan\Analyser\Scope;
/** @api */
class ClassConstantFetch
{
public function __construct(private ClassConstFetch $node, private Scope $scope)
{
}
public function getNode(): ClassConstFetch
{
retu... | true |
03a347183ae63a74cefc56bb01d0552354844b57 | PHP | NivRemy/api_sport_univ | /models/User.php | UTF-8 | 3,854 | 3.15625 | 3 | [] | no_license | <?php
class User{
//Mettre les attributs d'un utilisateurs
public $_id;
public $_user_type;
public $_name;
public $_last_name;
public $_phone;
public $_email;
public $_login;
public $_password;
public $_street;
public $_city;
public $_zipcode;
public $_country;
//Mettre un attribut BDD
private $_conn;
... | true |
117e155413a485111787cebf1d8190f22c76e3b4 | PHP | w4yne4125/X-MAS-CTF-2019 | /web/Sequel Fun/source.php | UTF-8 | 1,585 | 2.640625 | 3 | [] | no_license | <?php
if (isset ($_GET['source'])) {
show_source ("index.php");
die ();
}
?>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<?php
include ("config.php");
if (isset ($_GET['user']) && isset ($_GET['pass'])) {
$user = $_GET['user'];
$pass = $_GET['pass']... | true |
458b81faf24ab3e7b1c80167bf55a650fbba08a7 | PHP | liangxiaowxylk/parith | /Src/Controller/Basic.php | UTF-8 | 521 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Controller
*
* Parith :: a compact PHP framework
*
* @package Parith
* @author Zephyr Sun
* @copyright 2009-2013 Zephyr Sun
* @license http://www.parith.net/license
* @link http://www.parith.net/
*/
namespace Parith;
abstract class Basic
{
/**
* @param $name
* @param $args
* ... | true |
a798096082894c966aca9adb96694177e2941574 | PHP | JamesBondsky/4lapy | /src/Migrator/Entity/Status.php | UTF-8 | 2,767 | 2.796875 | 3 | [] | no_license | <?php
namespace FourPaws\Migrator\Entity;
use FourPaws\Migrator\Entity\Exceptions\UpdateException;
/**
* Class Status
*
* @package FourPaws\Migrator\Entity
*/
class Status extends AbstractEntity
{
/**
* @inheritdoc
*/
public function getTimestampByItem(array $item) : string
{
return... | true |
f0f0fbab9665f2df113aec321e571769fa82ec1f | PHP | mizcaroll/phplessons | /index.php | UTF-8 | 5,807 | 3.90625 | 4 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="styles.css">
<title>phplessons</title>
</head>
<body>
<ul>
<li><a href="index.php">Home</a></li>
<li><... | true |
fd3ebd37317ae563b092c38b06b8296869b76d8c | PHP | treehouselabs/FMClassificationBundle | /src/FM/ClassificationBundle/Tests/Guesser/StringGuesserTest.php | UTF-8 | 2,245 | 2.625 | 3 | [] | no_license | <?php
namespace FM\ClassificationBundle\Tests\Guesser;
use FM\ClassificationBundle\DataSource\ArrayDataSource;
use FM\ClassificationBundle\Guesser\StringGuesser;
use FM\ClassificationBundle\Normalizer\LowercaseNormalizer;
use FM\ClassificationBundle\Tokenizer\WhitespaceAndPunctuationTokenizer;
class StringGuesserTes... | true |
e03b8d89fee713700c29424830a49416dee76bac | PHP | reggiegulle/karaokeapp | /src/classes/Video.php | UTF-8 | 1,161 | 3.125 | 3 | [] | no_license | <?php
class Video{
private $_db,
$_data;
public function __construct(){
$this->_db = DB::getInstance();
}
public function safe_string($string) {
$this->_db->quote($string);
return $string;
}
public function create($fields = []){
if(!$this->_db->insert('videos', $fields)){
throw new Exception(... | true |
ec8460ce0b677747d577eb7a9496ada0249976aa | PHP | digbang/doctrine | /src/Commands/Schema/DropCommand.php | UTF-8 | 3,451 | 2.75 | 3 | [] | no_license | <?php namespace Digbang\Doctrine\Commands\Schema;
use Doctrine\ORM\EntityManagerInterface;
use Illuminate\Contracts\Config\Repository;
use Symfony\Component\Console\Input\InputOption;
use Doctrine\ORM\Tools\SchemaTool;
/**
* Command to drop the database schema for a set of classes based on their mappings.
*
* @lin... | true |
75bc7e9bdc025bc664b143f4425309581b90fdae | PHP | josephldaigle/pl-project | /src/IdentityAccess/Message/Query/User/FindUserByUsername.php | UTF-8 | 644 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: joe
* Date: 11/21/18
* Time: 7:12 PM
*/
namespace PapaLocal\IdentityAccess\Message\Query\User;
/**
* Class FindUserByUsername
*
* @package PapaLocal\IdentityAccess\Message\Query\User
*/
class FindUserByUsername
{
/**
* @var string
*/
private $usern... | true |
a5f1ef69d82b39e3382c8c8d54b6f5384bfbb4f3 | PHP | lhquentin/Ipssi-cleancode | /test/Ipssi/Test/MathTest.php | UTF-8 | 723 | 2.640625 | 3 | [] | no_license | <?php
namespace Ipssi\Test;
use Ipssi\Math;
use PHPUnit\Framework\TestCase;
class MathTest extends TestCase
{
public function testDoubleNumber()
{
$this->assertEquals(4, Math::doubleNumber(2));
}
public function testDoubleNumberWithString()
{
$this->expectException(\TypeError::class);
Mat... | true |
d8748ebb58bcc42e432ce235c9a76708dc4ac364 | PHP | AgustinJimenez/pekelandia_web | /Modules/Revistas/Http/Requests/RevistasRequest.php | UTF-8 | 572 | 2.640625 | 3 | [] | no_license | <?php namespace Modules\Revistas\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class RevistasRequest extends FormRequest {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules tha... | true |
99c500f02bd1043927d4ece2d221960f1a100297 | PHP | shinyhouse/remp | /Mailer/app/Hermes/HermesTasksQueue.php | UTF-8 | 2,082 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Remp\MailerModule\Hermes;
use Predis\Client;
class HermesTasksQueue
{
const TASKS_KEY = 'hermes_tasks';
const STATS_KEY = 'hermes_stats';
/** @var Client */
private $redis;
private $host;
private $port;
private $db;
public function __const... | true |