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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4fcdf69fb6fd11f0cf8fb67d3e2adab00dfeda38 | PHP | CynthiaLipinski/CynthiaLipinski_n01176789 | /Labs/Lab4/includes/functions.php | UTF-8 | 552 | 2.984375 | 3 | [] | no_license | <?php
function populateDropdown($options, $select = ""){
$dropdown = "";
foreach ($options as $code => $name) {
$selected = $select == $code ? "selected" : "";
$dropdown .= "<option $selected value='$code'>$name</option>";
}
return $dropdown;
}
function displayNavigation(array $menu,... | true |
5dc911c5cdc083e5a96fa781298320bb2316c4e9 | PHP | hip0216/logger | /src/Logger.php | UTF-8 | 2,485 | 3.109375 | 3 | [] | no_license | <?php
namespace Php\Exam;
use Psr\Log\LoggerInterface;
/**
* this class give to run.php use
*/
class Logger implements LoggerInterface
{
protected $connection = null;
/**
*this method when class load will create database syslog.sqlite3 and create table logs
*/
public function __construct()
... | true |
ca394561f4b543df3251f14221c6d4de71a5f646 | PHP | davidc4747/MathChallenge | /php/recoverPass.php | UTF-8 | 929 | 2.671875 | 3 | [] | no_license | <?php
// Created on : Mar 28, 2015, 11:35 PM
// Author : David G Chung
require_once './BusinessRules/UserRules.php';
//get post data from site
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
$uName = $request->name;
//Get user object from db
$mess = UserRules::recoverPass(... | true |
a36ba7743eeab939057c8bed548ffdb4a08ac69f | PHP | Yumanz/rdptest3 | /login.php | UTF-8 | 996 | 2.609375 | 3 | [] | no_license |
<?php
session_start();
include('entete.php');
// Définition des paramètres
$PARAM_hote='localhost';
$PARAM_port='3306';
$PARAM_nom_bd='rdptest1';
$PARAM_utilisateur='root';
$PARAM_mot_passe='Hehida852Agos';
try
{
$bdd = new PDO('mysql:host='.$PARAM_hote.';port='.$PARAM_port.';dbname='.$PARAM_nom_bd, $PARAM_utilisat... | true |
71c8cafe797989e89454c631a9348a8deca1ed86 | PHP | faisalarbain/decouple-entitiy-from-eloquent | /src/Acme/Adapter/EloquentStudentProxy.php | UTF-8 | 608 | 2.90625 | 3 | [] | no_license | <?php
namespace Acme\Adapter;
use Acme\EmailAddress;
use Acme\Score;
use Acme\Student;
class EloquentStudentProxy extends Student{
public static function toEloquent($student)
{
$model = EloquentStudent::findOrNew($student->id);
$model->fill([
"name" => $student->name,
"email" => (string) $student->e... | true |
50160755c054b854617364e0d3ecb582b9cfa7bb | PHP | Eglaf/egf-base | /src/Egf/Sf/ImportBundle/Model/ImportCol/Entity.php | UTF-8 | 5,325 | 2.71875 | 3 | [
"Unlicense"
] | permissive | <?php
namespace Egf\Sf\ImportBundle\Model\ImportCol;
use Egf\Base\Func as BaseFunc;
use Egf\Sf\Func as SfFunc;
/**
* Class Entity
* @todo enableCreate
* @todo don't create twice!
*/
class Entity extends BaseCol {
/**
* @return object Some entity.
*/
public function getData() {
// Lo... | true |
b9bacabd056d09c8df299f247560b7b62e1e8d72 | PHP | freelaxdeveloper/hubid | /src/HubAPI.php | UTF-8 | 3,752 | 2.84375 | 3 | [] | no_license | <?php namespace HubID;
use GuzzleHttp\Psr7;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
use Valitron\Validator;
class HubAPI
{
private $private_key;
private $public_key;
private $hubUrl;
public $client;
public $response;
public static $token = null;
public function __construct($c... | true |
bcd1ca6c7f70fcaebc42d4b35f4639b131a9abc7 | PHP | AnourValar/eloquent-request | /src/Builders/SortBuilder.php | UTF-8 | 2,184 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace AnourValar\EloquentRequest\Builders;
use AnourValar\EloquentRequest\Validators\ValidatorInterface;
use Illuminate\Database\Eloquent\Builder;
class SortBuilder extends AbstractBuilder
{
/**
* @var array
*/
protected $directions = ['ASC', 'DESC'];
/**
* {@inheritDoc}
* ... | true |
8cd4590bc06aaa8ba370ceb9159d6923179fa155 | PHP | idbari/xprsdeliver | /config/database.php | UTF-8 | 423 | 2.671875 | 3 | [] | no_license | <?php
$host = "expdelivary.db.11492557.hostedresource.com";
$db_name = "expdelivary";
$username = "expdelivary";
$password = "Digity@50";
try {
$con = new PDO("mysql:host={$host};dbname={$db_name}", $username, $password);
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
//to handle connectio... | true |
24de0b963beda40c4d63610b78f1d5c836620fcd | PHP | k-giardchase/volunteer_management | /tests/EventTest.php | UTF-8 | 13,967 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
$DB = new PDO('pgsql: host=localhost;dbname=volunteer_management_test');
require_once __DIR__.'/../src/Event.php';
require_once __DIR__.'/../src/Volunteer.php';
require_once __DIR__.'/../src/Committee.php';
... | true |
b5fa87498a8499e06c6f888d17387c4c9ec5ce8a | PHP | gechiui/gechiui-develop | /tests/phpunit/tests/post/getPageChildren.php | UTF-8 | 2,371 | 2.765625 | 3 | [] | no_license | <?php
/**
* @group post
*/
class Tests_Post_GetPageChildren extends GC_UnitTestCase {
protected $pages = array();
/*
* Here's the tree we are testing (4 is not in the tree):
*
* pages[0]
* - pages[1]
* -- pages[3]
* - pages[2]
* -- pages[6]
* --- pages[7]
* ---- pages[8]
* - pages[5]
*/
pub... | true |
268bd62619befa848f9c0d0d49ad1742df924d19 | PHP | nbezzala/workshop-manager | /test/IOFactoryTest.php | UTF-8 | 1,632 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace PhpSchool\WorkshopManagerTest;
use Composer\IO\ConsoleIO;
use Composer\IO\NullIO;
use PhpSchool\WorkshopManager\IOFactory;
use PHPUnit_Framework_TestCase;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* @author Aydin Hassan <aydin@hotma... | true |
57b6504b63d0ec8928e81f43cacc2f41da28f8cd | PHP | allanroberto18/twitch | /app/Providers/WebhookProvider.php | UTF-8 | 1,232 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Providers;
use App\Providers\Interfaces\WebhookProviderInterface;
use GuzzleHttp\ClientInterface;
use Illuminate\Http\Request;
class WebhookProvider implements WebhookProviderInterface
{
/**
* @var ClientInterface $client
*/
private $client;
/**
... | true |
554e9d4724a0115b2c22d7829ad2a5da5efeb007 | PHP | Ramunas-Bkr/php-home_works | /funkcijos/index4.php | UTF-8 | 1,385 | 3.125 | 3 | [] | no_license | <?php
// Parašykite funkciją, kuri skaičiuotų, iš kiek sveikų skaičių jos
// argumentas dalijasi be liekanos (išskyrus vienetą ir patį save)
// Argumentą užrašykite taip, kad būtų galima įvesti tik sveiką skaičių;
function PrimaryNumbers ($number) {
global $x;
$x = 0;
for ($i = 2; $i < $number; $i++) {
... | true |
99d47a584cb18d75936b8b2fea132dd3d9eb2d1f | PHP | doomy23/cmless | /cmless/csrf.php | UTF-8 | 370 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class CSRF {
public static function generate_token() {
$token = bin2hex(random_bytes(32));
$_SESSION['csrfToken'] = $token;
return $token;
}
public static function validate_token($token) {
if(isset($_SESSION['csrfToken']) && $_SESSION['csrfToken'] != $token)
... | true |
3b23f5b09e6f88a7fdd7676737e6e2679f7f052a | PHP | AndreyGorovoy/cinema | /cinema/ApacheWebServer-master/ApacheWebServer-master/www/index.php | UTF-8 | 3,223 | 3 | 3 | [] | no_license | <!--Link to the twitter bootstrap style sheet for the page -->
<link href="css/bootstrap.css" rel="stylesheet">
<?php
//Includes the navigation bar at the top of the page
include("navbar.php");
//Includes the Database Configuration file to be used in SQL queries on the page
include("dbconf.php");
//Define the SQL que... | true |
5ce7dd4a1e4faa4555c68fae664833693d529760 | PHP | RombolaFrank/OSMGB | /Anagrafe/persone/ins_persona.php | UTF-8 | 2,550 | 2.59375 | 3 | [] | no_license | <?php
/*
*** ins_persona.php
*** Richiamata da gest_persone.php
*** attiva insert_persona.php
*** 15/03/2020: A.Carlone: Modifiche e correzioni varie
*** 01/03/2020:Gobbi Dennis Arneodo Alessandro
*/
$config_path = __DIR__;
$util1 = $config_path .'/../util.php';
$util2 = $config_path .'/../db/db_conn.php';
require_once... | true |
83893cc1955025aa09a287ee3a4b522f56b9af4c | PHP | Max201/nanocore | /engine/Service/Module/RecursiveTree.php | UTF-8 | 1,263 | 2.921875 | 3 | [] | no_license | <?php
/**
* @Product: NanoCore
* @Author: Maxim P.
*/
namespace Service\Module;
use ActiveRecord\Model;
/**
* Class RecursiveTree
* @package Service\Module
*/
class RecursiveTree
{
/**
* @var array
*/
private $tree = [];
/**
* @var array
*/
private $list = [];
/**
... | true |
cc8a1e07b8862e51b8158499d32653a4a1e346f1 | PHP | Aminat-Okunuga/SCA-Task-Exception-And-File-I-O | /week7/Product/Entity/Brand.php | UTF-8 | 700 | 3.078125 | 3 | [] | no_license | <?php
namespace Entity;
class Brand {
public $id;
public $name;
public $categories;
public function __construct($name, $categories) {
$this->name = $name;
$this->categories = $categories;
}
// public function getId()
// {
// return $this->id;
// }
//
// public ... | true |
e2de5140ddfb78ddd8b0a4d435c0ffbfab78789b | PHP | hassanazimi/PHP_DateTime | /22/identifiers.php | UTF-8 | 396 | 2.71875 | 3 | [] | no_license | <?php
$identifiers = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, 'IR');
echo '<p>' . count($identifiers) . ' identifiers found:</p>';
echo '<ul>';
foreach ($identifiers as $id) {
echo '<li>';
echo $id;
$tz = new DateTimeZone($id);
$comments = $tz->getLocation()['comments'];
if ($comment... | true |
39acacd662343e3a57bb876e7dc9d93ebbe89dfd | PHP | illa4257/ObjectConverterForDevelNext | /bundle project/src/vendor/develnext.bundle.oc.OCBundle/bundle/oc/OC.php | UTF-8 | 6,423 | 2.65625 | 3 | [] | no_license | <?php
namespace bundle\oc;
use std, Exception, facade\Json;
/**
* Class Object Converter
*
* --RU--
* Класс Конвертора для объектов
*
*/
class OC
{
/**
* Object to array
* --RU--
* Объект в массив
*
* @param $obj
* @return array
*/
public static function objToArr($o... | true |
9deaf4798b4547de27e5c2d5f3a5730824526043 | PHP | Menes1337/fhem-migrate-logfiles | /src/ValueObject/Device.php | UTF-8 | 775 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace FhemMigrateLogfiles\ValueObject;
class Device
{
/** @var string */
private $name;
/** @var string */
private $type;
/**
* @param string $name
* @param string $type
*/
public function __construct(string $name, string $type)
{
$this->n... | true |
068a859bb95d58aa67a67597dff32ba9ab131738 | PHP | reechalee/mongoapp | /iterate.php | UTF-8 | 439 | 2.859375 | 3 | [] | no_license | <?php
//tests find
// connect
$m = new Mongo();
// select a database
$db = $m->mydb;
sleep(2);
// select a collection (analogous to a relational database's table)
$collection = $db->things;
// find everything in the collection
$cursor = $collection->find();
// iterate through the results
foreach ($cursor as $obj)... | true |
7a2d9524d5f4c7643e0313cb62a963cee91039b3 | PHP | xcezx/Text_CsvReader | /tests/Text/CsvReader/Grepper/UniqueTest.php | UTF-8 | 2,183 | 2.515625 | 3 | [] | no_license | <?php
class Text_CsvReader_Grepper_UniqueTest extends PHPUnit_Framework_TestCase
{
public function test001()
{
$input = array(
array(' 1', ' 2x '),
array(3, 4),
array(3, '2x'),
array(3, 4.0),
array(' 1', 5),
array(3, 5),
);
... | true |
ab1b0b573d7847ead802ffadc23d7517050c7511 | PHP | kimon89/pathfinder | /app/Services/GraphGenerator/AdjacencyList.php | UTF-8 | 799 | 3.34375 | 3 | [] | no_license | <?php
namespace App\Services\GraphGenerator;
/**
* Graph generator from data.
*/
class AdjacencyList implements GraphGeneratorInterface
{
/**
* Create a graph out of given data.
*
* @param array $data Input data
*
* @return array An array representing a graph
*/
public function... | true |
1eebd6e83fb913faf0cd96a6db13fbaedae9a13c | PHP | Farzoqe/UserBobSample | /userbob/userbob.php | UTF-8 | 4,314 | 2.765625 | 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 UserBob;
/**
* Description of userbob
*
* @author Farzoqe
*/
class UserBob {
private $baseUrl = "https://us... | true |
09f457097fbfa0afd74263d797c742ad11dc97d2 | PHP | sibsonpaul/FOSBook | /lib/classes/chart.php | UTF-8 | 3,144 | 2.703125 | 3 | [] | no_license | <?php
class chart{
private $id="";
private $subject="";
private $xCats ="";
public function __construct($ID, $subject){
$this->id=$ID;
$this->subject= $subject;
}
function sibson_get_individual_chart(){
global $wpdb;
$assessDataSQL =$wpdb->get_results("SELECT assessment_description, as... | true |
c10441abe1edee9f42f4f2cbf5f7fcef47bf9738 | PHP | techzonesol/SurgeITCRM | /app/Http/Controllers/Auth/RegisterController.php | UTF-8 | 3,331 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Http\Request;
use Carbon\Carbon;
use Auth;
use App\Employee;
class RegisterContro... | true |
e55f763a8c6ba5d1e2ae736c6e672d7ebd61bbea | PHP | sammarks/able | /lib/scaffolds/module/callbacks/file.php | UTF-8 | 660 | 2.921875 | 3 | [] | no_license | <?php
// All actions are prefixed with action_
function action_testing($first_argument)
{
// Do some stuff...
$hello = "Hello {$first_argument}!";
// Return the rendered theme.
return theme('test_theme', array('hello' => $hello));
}
function action_date()
{
// Nothing to do here...
// Return the rendered them... | true |
864604e800be284a4ed982ba9b178f37a8162123 | PHP | susantamlt/skillsPro | /application/modules/clients/models/Classes_model.php | UTF-8 | 1,375 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php class Classes_model extends CI_Model
{
function __construct() {
parent::__construct();
}
public function get_class_list($data='') {
$user_id=$this->session->userdata('clients_user_id');
$org_id=$this->session->userdata('clients_org_id');
$tableName='class';
$columns=array(
... | true |
c48b187122262ce164ef62f432365882693f80c1 | PHP | NICHLE1/sexy-summer-jobs | /Assignment 3 (Project)/Site/Staff Area/Scatter graph by lab/staffAreaShowScatterGraphsByLabController.php | UTF-8 | 2,307 | 2.78125 | 3 | [] | no_license | <!--
This controller is intended to show scatter graphs by individual student, using form input to tie the lab number selection into the database.
Its base files are staffAreaShowScatterGraphsByLabForm.html.php and staffAreaShowScatterGraphsByLabOutput.html.php
-->
<?php
include '../../utilities/connect.... | true |
e15fe84a0bdeae10cb140e1f0c4fa3019556578b | PHP | sahana-shelly/service_plugin_shortcode | /service_shortcode.php | UTF-8 | 1,052 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: shelly
* Date: 11/13/18
* Time: 12:02 AM
*/
class Service_Shortcode{
public $text="sahaaaaaaaaaaaaaaaaaa";
function __construct()
{
add_shortcode('service', (array($this, 'service_shortcode')));
add_shortcode('lorem','lorem_shortcode');
... | true |
ec7fb7838b002d721b44e5d74feff53fc17d77e6 | PHP | luongdoan277/PHP_basic | /Session3/Snippet8.php | UTF-8 | 219 | 3.1875 | 3 | [] | no_license | <?php
include 'Snippet7.php';
use aptech\{Boston,NewYork};
use function aptech\{foo1,foo2};
$d = new Boston();
$d->say();
echo "</br>";
$n = new NewYork();
$n->say();
echo "</br>";
$n->foo1();
echo "</br>";
$n->foo2(); | true |
d4b1cda0de015d5985d9ccd6519bd7fa1e7a9ab7 | PHP | wilsonosorio/CentroMedico | /listarConsultorios.php | UTF-8 | 1,820 | 2.734375 | 3 | [] | no_license | <?php
require "../Modelo/conexionBasesDatos.php";
require "../Modelo/Consultorio.php";
extract ($_REQUEST);
if (!isset($_REQUEST['x']))
$_REQUEST['x']=0;
$objConsultorio=new Consultorio();
$consultorio=$objConsultorio->consultarConsultorios();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN... | true |
d294bb51a48f0335284afcab3000f75a6b6bc161 | PHP | 9emDesign/tuts_new | /test.php | UTF-8 | 4,838 | 2.78125 | 3 | [
"CC-BY-4.0"
] | permissive | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<!--Madlibs app -->
<!-- <form class="form" action="test.php" method="post">
<... | true |
6b2d1341218611d8e4f3d56d4f55842724689595 | PHP | MarcoPerVaz/phpunit_basico | /tests/4/tests/SlugTest.php | UTF-8 | 499 | 2.59375 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
use App\Slug;
class SlugTest extends TestCase
{
public function test_render()
{
$slug = new Slug("Cursos de Laravel");
$this->assertEquals( $slug->render(), "cursos-de-laravel" );
}
// public function test_render_sin_espacios()
// ó
pub... | true |
f76c4440c9a127142bb8fbfde68e91baee747ae9 | PHP | ObySkY/fk-and-twit_automate_php | /facebook_automate/fonctions.php | WINDOWS-1250 | 2,630 | 2.78125 | 3 | [] | no_license | <?php
/* EXEMPLE UTILISATION CLASSE SECURITE
$pseudo = Securite::bdd($_POST['pseudo']);
$password = Securite::bdd( $_POST['password'] );
$requete = "SELECT * FROM membre
WHERE pseudo = '$pseudo' AND password = '$password' ";
*/
class Securite
{
// Donnes entrantes
public static function bdd($string)
{
... | true |
afd5909f044bc4b48353f1b8d880e5966282fd13 | PHP | DeJongeToon/web-backend-oplossingen | /Opdrachten/1/opdracht-string-extra-functions/string-extra-functions-deel1.php | UTF-8 | 436 | 3.140625 | 3 | [] | no_license | <?php
$fruit = "kokosnoot";
$lenFruit = strlen($fruit);
$letterO = "o";
$eersteLetter = strpos($fruit, $letterO);
?>
<!DOCTYPE html>
<html>
<head></head>
<body>
<p>De lengte van <?php echo $fruit ?> bedraagt <?php echo $lenFruit ?> karakters.</p>
<p>De eerste letter <?php echo $le... | true |
7e32560f9eb1ca9e0af4df5f2f6023f2160e97b5 | PHP | mark38/yii2-site-mng | /common/models/shop/ShopClients.php | UTF-8 | 2,213 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models\shop;
use common\models\User;
use Yii;
/**
* This is the model class for table "shop_clients".
*
* @property integer $id
* @property integer $shop_users_id
* @property string $fio
* @property string $city
* @property string $street
* @property string $home_number
* @property st... | true |
4c76365cab6e052b9929900799891ad7f60f0fe6 | PHP | rogeriotaques/seed-php | /index.php | UTF-8 | 6,548 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Seed-PHP Microframework.
* @author Rogerio Taques
* @license MIT
* @see http://github.com/rogeriotaques/seed-php
*/
/**
* Forces the API tomezone.
*/
date_default_timezone_set('Asia/Tokyo');
/**
* Requires composer auto-loader
*/
require_once __DIR__ . '/vendor/autoload.php';
/**
* Imports th... | true |
45fe76bb8d77b955a17f5bd4bfba90796b444c1d | PHP | kritawit/IT-iService | /protected/models/Group.php | UTF-8 | 5,902 | 2.640625 | 3 | [] | no_license | <?php
// สร้าง class Group สืบทอดมาจาก CActiveRecord
class Group extends CActiveRecord {
// สร้าง function model เอาไว้ใช้สร้าง object
public static function model($className = __CLASS__) {
return parent::model($className);
}
// กำหนดให้เชื่อมกับตารางชื่อ groups
public function tableName(... | true |
b3ce6ec970d8d9a7e9b3feeb7828665a43a8effe | PHP | RalfsCimermanis/project | /project/app/Http/Controllers/GamesController.php | UTF-8 | 1,892 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Game;
use App\Team;
use Illuminate\Http\Request;
class GamesController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
{
$teams = Team::al... | true |
8858c178141a5684b2822c9ae0efd3d685818fa9 | PHP | jcamp/helpful | /core/classes/class-helpful-helper-values.php | UTF-8 | 8,498 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Helper for getting stored values in database,
* for insert pro or contra and for deleting helpful
* from single post.
*
* @package Helpful
* @author Pixelbart <me@pixelbart.de>
*/
class Helpful_Helper_Values {
/**
* Database table name for helpful
*
* @var $table_helpful
*/
protected stat... | true |
7a7afd6a064902d3757204fe473efbe7bcf2d0cd | PHP | elgrim312/swift-api_symfony | /src/Service/CheckifUser.php | UTF-8 | 582 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: elgrim
* Date: 26/04/18
* Time: 18:21
*/
namespace App\Service;
use App\Repository\UserRepository;
use Symfony\Component\Serializer\SerializerInterface;
class CheckifUser
{
private $userRepository;
public function __construct(UserRepository $userRepository)
... | true |
5e68b3eb471c64e7223857c3318789e7c636368c | PHP | dkulyk/query | /src/Types/Enum.php | UTF-8 | 1,035 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace DKulyk\Eloquent\Query\Types;
/**
* Class Enum
*
* @package DKulyk\Eloquent\Query\Types
*/
class Enum extends AbstractType
{
/**
* @var array
*/
protected $values;
/**
* Enum constructor.
*
* @param array $values
*/
public func... | true |
a1d9673f46f29fe02671d39c91fc79724674dd95 | PHP | santiagorrosa1990/priotti_php | /Modelo/DAOActualizar.php | UTF-8 | 12,675 | 2.6875 | 3 | [] | no_license | <?php
session_start();
include "./Conexion.php";
class DAOActualizar
{
///ACTUALIZACION NO USA LAS TABLAS MARCA NI RUBROS
public static function selector()
{
if (isset($_POST["opc"])) {
switch ($_POST["opc"]) {
case 1:
if (self::esAdmin()) {
... | true |
61c2a4929a3ad08309cae1eb615ee53d659ce887 | PHP | intelliscl/sdk-php | /src/BasicIdapHandler.php | UTF-8 | 1,040 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Intellischool;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\RequestOptions;
class BasicIdapHandler extends IDaPAuthHandler
{
private string $deploymentId;
private string $deploymentSecret;
public function __construct(string $deploymentId, string $deplo... | true |
f648e5add7ee4db2202018eb85d5874420459122 | PHP | gufei/We-Framework-PHP | /wfphp/wfsystem/config.php | UTF-8 | 1,296 | 2.703125 | 3 | [] | no_license | <?php
/**
* config
*
* @author Jiaheng.Wu <gufei005@163.com>
*/
class Wfsystem_Config {
/**
* 重新载入配置文件
*/
public static function load(){
$GLOBALS['WF_CONFIG'] = array();
foreach(glob(WF_SYS_CONF_PATH."*".EXT) as $conf_file_name){
if(file_exists($conf_file_name)){
... | true |
5d34406b9e5b7e87b39d13f4ceea27813beb22a1 | PHP | frescoal/HBCC | /app/Model/Team.php | UTF-8 | 549 | 2.671875 | 3 | [] | no_license | <?php
/**
* Définition du modèle Team, qui représente une équipe avec des matchs et des
* résultats liés
*
* @author Alain Fresco
* @package Modele
* @since 14.08.2013
*/
class Team extends AppModel {
var $hasMany = array('Post','Training');
var $validate = array(
'photo' => array(
... | true |
5645cd2205a777b243fa5f563db9f4347a58a185 | PHP | Emmanuel640/coffee | /login.php | UTF-8 | 3,078 | 2.671875 | 3 | [] | no_license | <?php
session_start();
require_once "password.php";
require_once "constants.php";
$action = (isset($_GET["action"])) ? htmlspecialchars($_GET["action"]) : '';
if ($action === "logout") {
session_destroy();
header("Location: " . BASEURL);
exit();
}
// Si ya ha una session iniciada, redirigir a la pagina ... | true |
f70838b5b710279065943334996d3113ad5bcabe | PHP | environet/environet | /sys/Upload/Statistics.php | UTF-8 | 11,567 | 3 | 3 | [] | no_license | <?php
namespace Environet\Sys\Upload;
use DateTime;
use DateTimeInterface;
use Exception;
use SimpleXMLElement;
/**
* Class Statistics
*
* @package Environet\Sys\Upload
* @author Ádám Bálint <adam.balint@srg.hu>
*/
class Statistics {
/**
* @var int of uploaded properties
*/
protected int $inputPropertie... | true |
3a8845bfa75ed1d2fe579bbaa841392502aea7d9 | PHP | Cristhern90/fv_aplication | /Videojuegos/controller/empresasController.php | UTF-8 | 1,917 | 2.65625 | 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 dessarrolladoraController
*
* @author Cristian
*/
class empresasController implements Controller {
... | true |
ff852fc95231d38392ec5b9d3c23116dacd25082 | PHP | pf070811/wechat | /src/Code/Mp/QrCode.php | UTF-8 | 1,027 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: wangpenghai
* Date: 2018/08/04
* Time: 下午2:45
*/
namespace pfWechat\Code\Mp;
use pfWechat\Code\Support\BaseRequest;
/**
* 二维码
*/
class QrCode extends BaseRequest{
const API_QRCODE_CREATE = 'https://api.weixin.qq.com/cgi-bin/qrcode/create';
const API_SHOW = 'ht... | true |
8e81c2c3794851fec54020e292eb090771610288 | PHP | robburley/primer | /app/Helpers/PredefinedFields/PhoneNumber.php | UTF-8 | 504 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Helpers\PredefinedFields;
use libphonenumber\NumberParseException;
use Propaganistas\LaravelPhone\PhoneNumber as PhoneNumberGenerator;
class PhoneNumber extends PredefinedField
{
protected $rules = [
'nullable',
'phone:AUTO,GB',
];
public function formatData($data)
... | true |
398879731a39e77480b733c0b96a7c69b51744f4 | PHP | largeden/nmsxe | /modules/nms/nms.socket.php | UTF-8 | 12,540 | 2.765625 | 3 | [] | no_license | <?php
/**
* @class nmsSocket
* @author largeden (developer@nmsxe.com)
* @brief nmsXE Socket class
**/
class nmsSocket {
var $socketClass;
var $socketType;
var $socketTime;
var $FileHandler;
/**
* @brief 유일한 nmsSocket 객체를 반환 (Singleton)
... | true |
9e97c9a29acfe30704d3706c3eee3fbf2de5cf47 | PHP | Nann-Kavdavid/pingcrm-symfony | /src/Controller/BaseController.php | UTF-8 | 650 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Controller;
use App\Entity\Account;
use App\Entity\User;
class BaseController extends AbstractInertiaController
{
protected function getCurrentUserAccount(): Account
{
/** @var ?User $currentUser */
$currentUser = $this->getUser();
if ($c... | true |
74d715017db28861e382cb45e0ab75acae8aa1d3 | PHP | thecodingmachine/graphqlite-laravel | /src/Mappers/Parameters/ParameterValidator.php | UTF-8 | 2,384 | 2.59375 | 3 | [] | no_license | <?php
namespace TheCodingMachine\GraphQLite\Laravel\Mappers\Parameters;
use GraphQL\Type\Definition\InputType;
use GraphQL\Type\Definition\ResolveInfo;
use GraphQL\Type\Definition\Type;
use Illuminate\Validation\Factory as ValidationFactory;
use TheCodingMachine\GraphQLite\Exceptions\GraphQLAggregateException;
use ... | true |
eaeaf4ca92f463537c9f0a87061ffbe21fb38870 | PHP | songguanqun/aspis | /tests/test_www_email.php | UTF-8 | 1,606 | 3.296875 | 3 | [] | no_license | <?php
// checks the syntax of the emailaddress
function check_email($emaildddress)
{
$goodchars = '^[A-Za-z0-9\._-]+@([A-Za-z][A-Za-z0-9-]{1,62})(\.[A-Za-z][A-Za-z0-9-]{1,62})+$';
$isvalid = true;
if(!ereg($goodchars,$emaildddress))
{
$isvalid = false;
}
return $isvalid;
}
// sends the HTML email
function... | true |
57faa2100df7d1003e1798a3ec1a77a53ab89df4 | PHP | tpcwre/yuan | /-学习归纳/27-Smarty模板/smarty使用示例/2.php | UTF-8 | 665 | 2.734375 | 3 | [] | no_license | <?php
session_start();
//导入smarty的初始化文件
require("./init.php");
//4.向模板中放置信息
$smarty->assign("title","smarty模板实例--变量调节器");
//$str="2015-09-21";
//echo preg_replace("/(\d{4})\-(\d{2})\-(\d{2})/","\\2/\\3/\\1",$str);
//echo "asdf\\aasdf";
$smarty->registerPlugin("modifier","ttr","mysubstr"); //将下面自定义 函数mysubstr以ttr名注册到... | true |
5a2b78535d65c5f46689e8de249074dd0cda071d | PHP | jsimpao/pluralsight | /object-oriented-php-essential-constructs/02-object-oriented-php-essential-constructs/ObjectCreate/Clip1/ObjectDestroy.php | UTF-8 | 200 | 2.84375 | 3 | [] | no_license | <?php
//Load the class
require 'classes/Form.php';
//Create new object
$form = new Form();
//Destroy using unset()
unset($form);
var_dump($form);
$form = new Form();
$form = null;
var_dump($form);
| true |
db5a60f63457624a295c3da4dd37c1ad415c0902 | PHP | sd1993/littleT | /core/webapp.php | UTF-8 | 23,306 | 2.609375 | 3 | [] | no_license | <?php
#WA Core Drive Class
final class wa extends core
{
const v = 1.7, x = 'Beta';
static private $action = [];
static public
$referer = '?',
$cookies = [],
$headers = [
'Cache-Control' => 'no-cache',
'Content-Type' => 'text/plain; charset=utf-8',
'Expires' => -1
],
$buffers,
$user,#save sign in userdat... | true |
9dc82566fe8c1d6f425b412cb0c3702bc77097e5 | PHP | PascalTurbo/rssmonster | /app/Http/Controllers/FeedController.php | UTF-8 | 8,290 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use DB;
use App\Article;
use App\Feed;
use ArandiLopez\Feed\Factories\FeedFactory; //use SimplePie to parse RSS feeds, see: https://github.com/arandilopez/laravel-feed-parser
use Illuminate\Http\Request;
class FeedController extends Controller
{
protected $feedFactory;
publ... | true |
21bab5d3cf2a2b36899da1058bdd599e3b2b4f4a | PHP | senthilnscript/ll | /ll/app/Http/Controllers/SubjectController.php | UTF-8 | 2,530 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use DB;
use Illuminate\Http\Request;
use App\Http\Requests\SubjectRequest;
use App\Repositories\SubjectRepository;
class SubjectController extends Controller {
public function __construct()
{
}
/*** to convert array to json ***/
public function ar_to_js($ar)
{
$json... | true |
7ccf37bf436f4cc5ac87734e345022eed13f2d1f | PHP | youserbase/youserbase | /classes/Hook.class.php | UTF-8 | 263 | 2.5625 | 3 | [] | no_license | <?php
abstract class Hook
{
// abstract public static $hooks;
public static function &get_template($filename)
{
$dbt = debug_backtrace();
$template = new Template(realpath(dirname($dbt[0]['file']).'/../templates').'/'.$filename);
return $template;
}
}
?> | true |
1f39879a63992efc326f2dcd8f010773d4a159e9 | PHP | kl4ym4n/StorageForLinks | /controllers/controllerUser.php | UTF-8 | 4,116 | 2.578125 | 3 | [] | no_license | <?php
class ControllerUser extends Controller
{
public function __construct()
{
$this->model = new ModelUser();
$this->view = new View();
}
// public function actionRegistrationPage()
// {
// $this->view = new ViewIndex("Registration");
// $this->view->render();
// ... | true |
968c3a9402d1051bf7ef2d929898a0bd7fb59b46 | PHP | leosantillan/gym-api-and-web-app | /src/Controllers/AppPlanDayController.php | UTF-8 | 1,302 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace VirtuaGym\Controllers;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use VirtuaGym\Template\FrontendRenderer;
use VirtuaGym\MyPDO;
use VirtuaGym\Models\PlanDay;
class AppPlanDayController
{
private $request;
private ... | true |
6297c8a0941ee17f38c5a7279c40c35256e8ed2d | PHP | allannogueira/site | /claudia/app/controller/Cidade.php | UTF-8 | 380 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
require("../classes/Cidade.php");
//PARAMETROS POST OU GET
$uf = $_REQUEST['uf'];
$obj = new Cidade($uf);
$item = [];
for($i = 0;$i < sizeof($obj->getCodigo()); $i++){
$item[] = [
"codigo" => $obj->getCodigo()[$i],
"uf" => $obj->getUf()[$i],
"descricao" => $obj->getDesc... | true |
5b1d172275e268d593ec994784854fa145971ee2 | PHP | WPPlugins/wp-fading-content-slider | /wp-fading-content-slider.php | UTF-8 | 13,605 | 2.515625 | 3 | [] | no_license | <?php
/*
* Plugin Name: WP Fading Content Slider
* Plugin URI: http://www.mba-multimedia.com/en/innovation/wordpress/plugins/wp-fading-content-slider/
* Description: A customizable JQuery content slider with CSS3 animations and fading effects
* Version: 0.2.2
* Author: MBA Multimedia
* Author URI: http://w... | true |
9645af39857b20bdd55860ceb389aeb030228550 | PHP | meganeashayes/hotel-website-assignment | /login.php | UTF-8 | 769 | 2.609375 | 3 | [] | no_license | <?php
/**
* Logs in verified staff members for Velvet & Compass Hotel
* This page is not directly accessed by either guests or staff, but redirects users to the admin.php page
* COSC212 Assignment 2
* Megan Hayes
*/
// Start a session
if (session_id() === "") {
session_start();
}
// Redirect users to the pag... | true |
236112ad8c1003c95652dbfcc813fa85b5990b35 | PHP | kindertheo/Projet-5-PHP-OpenClassrooms | /src/Controller/AdminController.php | UTF-8 | 1,371 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controller;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Error\SyntaxError;
/**
* Class AdminController
* @package App\Controller
*/
class AdminController extends UserController
{
/**
*
*/
const TWIG = 'admin/admin.twig';
/**
* @return string... | true |
4fab4973109b2ea6738e30551cfddd4b40641cba | PHP | saetaweb/susan | /registra_usuario.php | UTF-8 | 868 | 2.84375 | 3 | [] | no_license | <?php
//Cargamos la Libreria Usuario, para poder utilizar sus metodos.
require_once 'class/Usuario.php';
print_r($_POST);
//Creamos nombre de variable para almacenar los datos que vienen via POST.
$email=$_POST['email'];
$usu=$_POST['usuario'];
$pass=$_POST['pass'];
//Instancia del Objeto Usuario.
$obj=new Usuario... | true |
8e42cba5cdcfca9a2e21ed56ded6fbc626cf37d9 | PHP | angelacaterina/php-oop-2 | /index.php | UTF-8 | 2,490 | 3.140625 | 3 | [] | no_license | <!-- Crea un diagramma per una tabella di db che rappresenti gli Users di un blog.
Crea una classe User che rappresenti quella tabella, e usala per stampare in pagina i dati di alcuni Users.
Il database e la tabella non devono essere realmente creati.
-->
<?php
include __DIR__ . '/classes/user.php';
include _... | true |
8b79ce5062945b7c676d064ec2189ec99f5ea9ce | PHP | MatthieuKT/Login | /Controller/loginControl.php | UTF-8 | 689 | 3.03125 | 3 | [] | no_license | <?php
if (isset($_POST['email']) && isset($_POST['pass'])) {
$email = $_POST['email'];
$pass = $_POST['pass'];
if (preg_match('#^[\w.-]+@[\w.-]+\.[a-z]{2,6}$#i', $email) && strlen($pass) >= 5) {
// Connection à la DB
require_once('../model/DBConnection.php');
$requete = "SELECT pass FROM user WHERE email ... | true |
26e9f6a6802cf12d5b1da8b6b99d77af4a2c4295 | PHP | Brian-Luca/PHP | /Aula04/Tipos.php | UTF-8 | 621 | 3.25 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8"/>
<link rel="stylesheet" href="css/estilo.css">
<title>
Tipos de variáveis
</title>
</head>
<body>
<div>
<?php
$n = 4.5;
echo $n. "<br/>";
$no = (string) "Brian";
$n = 17;... | true |
0a410574c47a4f78b8709b5393c0746b2fe66778 | PHP | saysa/vyper | /application/components/Auth/Auth.php | UTF-8 | 1,113 | 2.9375 | 3 | [] | no_license | <?php
namespace application\components\Auth;
use application\models\User;
class Auth {
protected $_error_login = false;
protected $_error_password = false;
public function getError_login() {return $this->_error_login;}
public function getError_password() {return $this->_error_password;}
public function setE... | true |
bba894671d464734a69da1be31a832bed39c6a27 | PHP | elijahogunjole/crud_web_app | /create.php | UTF-8 | 550 | 2.796875 | 3 | [] | no_license | <?php
require 'classes/app.class.php';
//outside class
$app = new App();
?>
<h3> Create New </h3>
<a href="./">Home </a>
<br>
<form method="POST">
<p>
<label> Full Name </label>
<br>
<input type="text" name="fname">
</p>
<p>
<label> Email Address </label>
<br>
<input type="text" name="e... | true |
b1959dbfed40d5ac8827f18d8656f22f629399b2 | PHP | rik43/RussianPost | /src/Providers/OtpravkaApi.php | UTF-8 | 2,725 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace LapayGroup\RussianPost\Providers;
use LapayGroup\RussianPost\AddressList;
use LapayGroup\RussianPost\FioList;
use LapayGroup\RussianPost\PhoneList;
use LapayGroup\RussianPost\Singleton;
use LapayGroup\RussianPost\TariffInfo;
use LapayGroup\RussianPost\ParcelInfo;
class OtpravkaApi
{
use Singleton;... | true |
0c2b54768987eff81abd15d118d40d7d2ff92ed5 | PHP | omnithoper/projects | /array/userclass.php | UTF-8 | 2,678 | 2.953125 | 3 | [] | no_license | <?php
$searchText = !empty($_POST['address'])?$_POST['address']:null;
$cityname = $searchText;
$cityAddressObject = new CityAddress();
$contactObject = new Contacts();
$ColorObject = new Colors();
$cityID = $cityAddressObject->getCityID($cityname);
$contactname = $contactObject->getContactName($cityID);
$colorID = ... | true |
4daa00788a80266476aa6554b89ff0cf2fcbd66d | PHP | GiacoCorsiglia/php-stubs-generator | /test/files/junk.in.php | UTF-8 | 411 | 2.515625 | 3 | [
"MIT"
] | permissive | None of this junk should be included!
<?php
hello();
$say->helloWorld();
Say::helloWorld();
new Say();
if ($foo) {
bar();
} elseif ($buz) {
baz();
}
?>
Some more HTML!
<?php
switch ($foo) {
case 'bar':
buz();
break;
}
'Pointless expression :)';
exit;
echo 'sup';
return [
'foo'... | true |
cd6703b9b5d4905145fed2a778ff458770025ee4 | PHP | SalkerAG/MovilUCA | /application/models/usuarios_model.php | UTF-8 | 1,451 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Usuarios_model extends CI_Model{
public function _construct(){
parent::_construct();
}
//Comprueba si el usuario existe o no
public function verify_user($user){
$conexion = mysqli_connect("localhost", "root","")
or die("No se ha podido conectar");
mysqli_select_db($conexion, "codeigniter")
or die("N... | true |
2371b9560e1314c406c3fb3b88db8ced7d747b0d | PHP | sgrame/openSGrame | /tests/library/SG/Rule/Param/VariableTest.php | UTF-8 | 1,004 | 2.625 | 3 | [] | no_license | <?php
/**
* @group SG
* @group SG_Rule
*/
class SG_Rule_Param_VariableTest extends PHPUnit_Framework_TestCase
{
/**
* Test constructor
*/
public function testVariable()
{
$test = array('foo' => 1, 'bar' => '2');
$variables = new SG_Rule_Variables($test);
$variab... | true |
f8e8c2de5fe86d0e908a75cf0110fc94a12a1de9 | PHP | MarcosMthJr/galeriaVA | /controller/uploadController.php | UTF-8 | 6,537 | 2.578125 | 3 | [] | no_license | <?php
//carregando conexão com banco e autenticação
require "../auth/autenticacao.php";
require "../config/conexao.php";
require "../validation/frmUpload.php";
/* Informa o nível dos erros que serão exibidos */
error_reporting(E_ALL);
/* Habilita a exibição de erros */
ini_set("display_errors", 1);
if ($error == false... | true |
6b9e004ca1806e7d8e13f15fb36b6a5f69ae5eba | PHP | TarasR/tlaravel.loc | /app/Article.php | UTF-8 | 897 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\User;
class Article extends Model
{
//
use SoftDeletes;
protected $table = 'articles';
protected $fillable = ['name','text']; // разрешает добавлять в эти поля иначе нельзя добавлять с ... | true |
44126f28151c4018269ff4d691b74e63b7cf31b2 | PHP | infospeedupzz/learn | /objects/mockreview.php | UTF-8 | 3,004 | 2.828125 | 3 | [] | no_license | <?php
include_once 'functionClass.php';
class Mockreview extends functionClass{
// database connection and table name
private $conn;
private $table_name = "mock_ratings";
// object properties
public $mock_id;
public $review;
public $rate;
public $user_id;
public function __con... | true |
1c3456956e6ffec6066fb677d91f73df0eb41f16 | PHP | CallecYoann/Tautof | /src/tautof/PlatformBundle/Controller/SearchController.php | UTF-8 | 3,004 | 2.53125 | 3 | [] | no_license | <?php
namespace tautof\PlatformBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class SearchController extends Controller {
public function findAllAction() {
$repository = $this
->getDoctrine()
->ge... | true |
c6248600ca25c70af8138b348fc60685c40bf4b8 | PHP | mrpornfee/Sulifer | /test.php | UTF-8 | 1,449 | 3.0625 | 3 | [] | no_license | <?php
use UI\Window;
use UI\Size;
use UI\Controls\Entry;
use UI\Controls\Label;
use UI\Controls\Button;
use UI\Controls\Grid;
//创建一个窗口
//参数一表示窗口标题
//参数二表示窗口大小
//参数三表示是否显示菜单
$win = new Window('简单的计算器', new Size(640, 480), true);
//创建一个文本框
//Entry::Normal 普通单行文本框
//Entry::Password 密码框
//Entry::Search 搜索框
$num1 = new Ent... | true |
fbeb729e36f338505c2318466d87dec6cb1c04d2 | PHP | dudj/laravel | /app/Foundation/Auth/CustomerEloquentHomeProvider.php | UTF-8 | 702 | 2.6875 | 3 | [] | no_license | <?php namespace App\Foundation\Auth;
use Illuminate\Auth\EloquentUserProvider;
use Illuminate\Contracts\Auth\Authenticatable;
class CustomerEloquentHomeProvider extends EloquentUserProvider
{
/**
* Validate a user against the given credentials.
*
* @param \Illuminate\Contracts\Auth\Authenticatable... | true |
0bb1bdbea9f770b74a5a302ab7b2fae2c45a1196 | PHP | motolola/betterjollof-php | /app/Repositories/Basket/Basket.php | UTF-8 | 1,315 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: motolola
* Date: 22/08/2017
* Time: 6:38 PM
*/
namespace App\Repositories\Basket;
use App\Models\Portion;
use Symfony\Component\HttpFoundation\Request;
use Illuminate\Session;
class Basket {
private $key = "basket_key";
public function createOrder()
{
... | true |
254b2a048ba363a30f9a2b02bbd33c3f5c24663e | PHP | ifcanduela/pew | /src/View.php | UTF-8 | 11,799 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace pew;
use Exception;
use RuntimeException;
use SplStack;
use ifcanduela\events\CanEmitEvents;
/**
* This class encapsulates the template rendering functionality.
*/
class View
{
use CanEmitEvents;
/** @var SplStack<string> Base templates directory */
protected ... | true |
98213107b42fc43be957041c0a362ff97d314297 | PHP | chesser25/visual_craft_blog | /src/Service/CsvPostFileValidator.php | UTF-8 | 578 | 2.75 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Constant\MainConstant;
class CsvPostFileValidator
{
private $isValid = false;
const KEYS_TO_COMPARE = [
MainConstant::TITLE_KEY,
MainConstant::BODY_KEY,
MainConstant::CATEGORY_KEY
];
public function validate($csvKeys){
foreach (sel... | true |
9a4dab3734602f9a4caa425951c468ca1e9de734 | PHP | PedroCuadra/Type | /TSubArray.php | UTF-8 | 1,934 | 2.90625 | 3 | [] | no_license | <?php
namespace Type;
class TSubArray extends Type{
public static $arraySplitter = ";";
public $newArray;
function __construct($base, $struct){
if(!($base instanceof TArray))
throw new \Exception('$base is not TArray');
// Si TArray(TAny) entonces no importa que argumento vaya
$thi... | true |
254f24c2476041512042b9836294630e264eeb8e | PHP | mpruessmeier/eccombie | /old stuff/create-db2.php | UTF-8 | 4,737 | 2.953125 | 3 | [] | no_license | <?php
// Parameter
define("SHORT_ECHO", false);
if ($argv[1]=='automatic')
{
echo "Automatik, alle Verzeichnisse 'all really'\n";
$loggerdir = "../../logger_dbs/";
$alleDirs = scandir($loggerdir,1);
foreach($alleDirs as $Dir)
{
// Zu verarbeitende Datei:
echo "\n\n$Dir wird verarbeitet";
if (is_dir($logg... | true |
a75fd56e7a313f86e84e78710f5feec1eb6f3351 | PHP | le-ben-wm/Subscription-Service-Project- | /admin.php | UTF-8 | 1,379 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
require_once('authorize.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="stylesheet1.css" />
</head>
<body>
<h2>Symphonia Users Administration</h2>
<p>Below is a list of ... | true |
3a20b19533df0fe40738a2f95c0f446301c3d1e9 | PHP | mtils/php-ems | /src/Ems/Contracts/Http/Cookie.php | UTF-8 | 5,256 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
/**
* * Created by mtils on 10.01.2022 at 21:00.
**/
namespace Ems\Contracts\Http;
use DateTime;
use DateTimeInterface;
use Ems\Contracts\Core\Stringable;
use Ems\Contracts\Core\StringableTrait;
use OutOfBoundsException;
use UnexpectedValueException;
use function in_array;
use function is_bool;
use function... | true |
a7ab6e33def7763b739fdc5e1ec792fd6452fcb2 | PHP | filecage/i18n-build | /src/Tokens/Text.php | UTF-8 | 328 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
namespace Tholabs\I18nBuild\Tokens;
class Text implements Tokenized {
use ChildlessTokenTrait;
private string $body;
function __construct (string $body) {
$this->body = $body;
}
function getBody () : string {
return $this->body;
... | true |
15b0257ebdc73535a5cc40c370ece7484086ff8a | PHP | Harrison-Wall/DBMS | /Phase 2 - Web implementation/code/courseInfo.php | UTF-8 | 4,307 | 2.6875 | 3 | [] | no_license | <html>
<header>
<title> Student Mentoring </title>
</header>
<body>
</body>
</html>
<?php
function drawTable()
{
include('connect.php');
$getCourses = "SELECT * FROM courses";
$courseResults = mysqli_query($myconnection, $getCourses) or die ('Query failed: '.... | true |
be2b0cfcea370a654c861a6c5db1d801d3d45927 | PHP | reyven90/blog-examples-v5.5 | /app/Blog.php | UTF-8 | 915 | 2.65625 | 3 | [] | no_license | <?php
namespace App;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
/**
* Class Blog
* @package App
*/
class Blog extends Model
{
use Notifiable;
/**
* @var string
*/
protected $table = 'blogs';
/**
* @var array
*/
prot... | true |
a137abdf24549f5de799342000a5e0a9b0ed7891 | PHP | frankdekker/commonmark-ext-emoji | /src/EmojiDataProviderInterface.php | UTF-8 | 409 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace FD\CommonMarkEmoji;
interface EmojiDataProviderInterface
{
/**
* Returns the regex for the supported emoji's
*/
public function getSupportedEmojis(): string;
/**
* Convert key to the native utf8 emoji
* @return string|null returns null if the ... | true |
d4de349695ee6eb7c397e353044e0f38b9735f5f | PHP | piotrmadejkr/PHPzad11 | /settings.php | UTF-8 | 2,829 | 2.921875 | 3 | [] | no_license | <?php
$dzisiaj=2018;
$tab = array();
$tab[] = ['imie' =>'Paweł', 'nazwisko' =>'Nowak', 'dataUrodzenia' =>'1990','szkolaStart'=>'1997', 'szkolaKoniec'=>'2006'];
$tab[] = ['imie' =>'Anna', 'nazwisko' =>'Korus', 'dataUrodzenia' =>'1998','szkolaStart'=>'1990', 'szkolaKoniec'=>'2003'];
$tab[] = ['imie' =>'Staszek', 'nazwi... | true |
5c24ec928b7015f3be83f008321e3cc364ff8bac | PHP | MindyPHP/Mindy_Helper | /src/Text.php | UTF-8 | 876 | 3.328125 | 3 | [] | no_license | <?php
namespace Mindy\Helper;
/**
* Class Text
* @package Mindy\Helper
*/
class Text
{
/**
* Returns given word as CamelCased
* Converts a word like "send_email" to "SendEmail". It
* will remove non alphanumeric character from the word, so
* "who's online" will be converted to "WhoSOnline"
... | true |