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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
17519519be880e0bb18e2e71951b1df4df0e7c56 | PHP | PaulaoDeveloper/JSKhanFramework | /lib/Sockets/vendor/greg0/lazer-database/src/Lazer/Classes/Helpers/Config.php | UTF-8 | 2,328 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Lazer\Classes\Helpers;
/**
* Config managing class
*
* @category Helpers
* @author Grzegorz Kuźnik
* @copyright (c) 2013, Grzegorz Kuźnik
* @license http://opensource.org/licenses/MIT The MIT License
* @link https://github.com/Greg0/Lazer-Database GitHub Repository
*/
class Config... | true |
4cd1df25e85c32d291b17f3804f7686132ab6381 | PHP | eddiejaoude/DesignPatternsPHP | /Structural/Proxy/Record.php | UTF-8 | 815 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
namespace DesignPatterns\Structural\Proxy;
/**
* class Record
*/
class Record
{
/**
* @var array|null
*/
protected $data;
/**
* @param null $data
*/
public function __construct($data = null)
{
$this->data = (array) $data;
}
/**
* magic setter
... | true |
9ff7558bc786845e70f668e1ab4731b3d4e475b1 | PHP | Deadpoolzzz/homeworks | /commentsv2.local/classes/User.php | UTF-8 | 2,255 | 3.03125 | 3 | [] | no_license | <?php
class User
{
private $email;
private $pass;
private $is_admin;
public function setEmail($email) {
$this->email = $email;
}
public function setPass($pass) {
$this->pass = $pass;
}
public function setAdmin($is_admin) {
$this->is_admin = $is_admin;
}
... | true |
9e79657a7c220c12da63d2415767d7bd10b47327 | PHP | ki6ool/WPQ | /wp-content/plugins/wpq-qait/wpq-qait.php | UTF-8 | 2,426 | 2.640625 | 3 | [] | no_license | <?php
/**
* Plugin Name: WPQ Qait
* Plugin URI: http://6oolab.com/
* Description:Qait
* Version: 1.0.0
* Author: @ki6ool
* Author URI: https://github.com/ki6ool
*/
register_activation_hook(__FILE__, 'WPQ_QAIT_START');
function WPQ_QAIT_START() {
wp_schedule_event(time(), 'hourly', 'WPQ_QAIT_TRIGGER');
}
regis... | true |
99da361f76d0872ee51815eb18d9debf24f3cb88 | PHP | johnenrick/pos_core | /api/database/seeds/RouteMockData.php | UTF-8 | 1,038 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
class RouteMockData extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Faker::create();
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
DB:: table('routes')-... | true |
88dc7091aed8c9ac77326e2a83c64442ad16360c | PHP | nekulin/ontico | /app/protected/components/Curl.php | UTF-8 | 768 | 2.9375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class Curl {
public static function get($strUrl, array $attrParams=array()) {
if ($attrParams) {
$strUrl .= '?' . http_build_query($attrParams);
}
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $strUrl);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true)... | true |
5ca3dbcc2e53ff995909fa4e80330b260ad49cb9 | PHP | gomezlucas/Landing-Page-for-APP- | /subscriptions.php | UTF-8 | 1,790 | 2.859375 | 3 | [] | no_license | <?php
//Conect Database
include('./db_connect.php');
//write queries for all the subscribers
$sql = 'SELECT id, email, created_at from subscriptions';
//make query
$results = mysqli_query($conn, $sql);
//fetch the resulting rows as an array
$users = mysqli_fetch_all($results, MYSQLI_ASSOC);
// free the memory
... | true |
c8603fcfebf1b9c5ccb6e04f6507929ba4b63ceb | PHP | hariadi/sitk | /database/seeds/UsersTableSeeder.php | UTF-8 | 841 | 2.671875 | 3 | [] | no_license | <?php
use App\User;
use Illuminate\Database\Seeder;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
foreach (['pemohon', 'pelulus', 'pentadbir'] as $key => $user) {
$role_id = $key+1;
Us... | true |
8748366bf2418329b144bad4397f6cf873def452 | PHP | birching01/DtApp-Plugin-for-PHP | /src/MiniProgram/WeChatClient.php | UTF-8 | 2,634 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* (c) Chaim <gc@dtapp.net>
*/
namespace DtApp\MiniProgram;
use DtApp\MiniProgram\WeChat\Auth;
use DtApp\MiniProgram\WeChat\User;
use DtApp\Tool\DtAppException;
/**
* 微信小程序
* Class WeChatClient
* @package DtApp\MiniProgram
*/
class WeChatClient
{
/**
* 小程序ID
* @var mixed|string
*/
... | true |
24da7914b7e2bd1003df7a84a602cfcbf6b88a78 | PHP | jcColala/SistemaVentas | /app/Models/DetalleCajaModel.php | UTF-8 | 1,580 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Models;
use CodeIgniter\Model;
class DetalleCajaModel extends Model{
protected $table = 'detalle_caja_comprobante';
protected $primaryKey = 'iddetalle_ccomprobante';
protected $returnType = 'objet';
protected $useSoftDeletes = true;
protected $allowedFields = ['idde... | true |
25097801220d245a72a09d6f7829d1e27fd02408 | PHP | khantminnaing/is113 | /session11/exercises/ex3/add.php | UTF-8 | 953 | 2.765625 | 3 | [] | no_license | <?php
//Add code here
if(isset($_POST['name']) && isset($_POST['gender']) && isset($_POST['age'])){
$dsn = "mysql:host=localhost;dbname=week11;port=3306";
$pdo = new PDO($dsn, 'root', '');
$qstr = 'insert into person(name,gender,age) values(:name, :gender, :age);';
$qst... | true |
486f1991f3a9270252f27a5c6ef80cce4a4249fe | PHP | rvergarap/catalogs | /app/Http/Controllers/CatalogController.php | UTF-8 | 1,700 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Integrator;
use App\CatalogProduct;
use Illuminate\Http\Request;
use Illuminate\support\Facades\DB;
class CatalogController extends Controller
{
public function showAllCatalogs(Request $request)
{
// TODO: Validate id
$id = (int)$request->id;
... | true |
628dd911fd5740b1479aa6717eb7cdaa418310d6 | PHP | RenzcPHP/3dproduct | /system/libraries/Product_assemblyService.php | UTF-8 | 1,515 | 2.625 | 3 | [] | no_license | <?php defined('SYSPATH') OR die('No direct access allowed.');
class Product_assemblyService_Core extends DefaultService_Core {
/* 兼容php5.2环境 Start */
private static $instance = NULL;
// 获取单态实例
public static function get_instance(){
if(self::$instance === null){
$classname = __CLAS... | true |
f3db552ec00ca414f47a94fa48fa6a0811e75d84 | PHP | koitkorela/3.kodutoo-II-ruhm | /leht/Create user.php | UTF-8 | 3,636 | 3 | 3 | [] | no_license | <?php
$page_title = "Konto loomine";
$file_name = "";
?>
<?php require_once("../header.php"); ?>
<?php
// ühenduse loomiseks kasuta
require_once("../../config.php");
$database = "if15_koitkor_2";
$mysqli = new mysqli($servername, $server_username, $server_password, $database);
//echo $_POST["email"];
//definee... | true |
ee03c1ebe77ee2bf42fab365c37bd9a889d4d10d | PHP | Ashot219/mvc_project | /components/functions.php | UTF-8 | 1,293 | 2.953125 | 3 | [] | no_license | <?php
class functions {
public function get_post($post_key) {
if (isset($_POST[$post_key]) && !empty($_POST[$post_key])) {
$data = $_POST[$post_key];
return $data;
} else
return null;
}
public function define_post($post_key) {
if (is_array($post... | true |
e9015fd5270e629c3e9361f7c474e85292e8574f | PHP | OmarAldulaimi/PHP-Course | /Gesällprovet/send.php | UTF-8 | 727 | 2.609375 | 3 | [] | no_license | <?php
$db = mysqli_connect("localhost", "root", "", "hej");
$msg = "";
if (isset($_POST['upload'])) {
$target = "images/".basename($_FILES['image']['name']); // images fil som alla bilder ska sparas i
$image = $_FILES['image']['name'];
$name= $_POST['name'];
$price= $_POST['price'];
// lägger in informat... | true |
eea28058f4867218de00f854a1998a30e5e8dab9 | PHP | ymj70/lpxiangcunxitong | /Application/Home/Controller/CommonController.class.php | UTF-8 | 2,745 | 2.5625 | 3 | [] | no_license | <?php
namespace Home\Controller;
use Think\Controller;
use Org\Request\Request;
class CommonController extends Controller
{
var $javaUrl = "";//java接口url的信息
var $requestObject= "";//java接口url的信息
public function _initialize()
{
//获取java接口url的信息
$this->javaUrl = C("javaUrl");
$... | true |
520d82ce87c134de94893e419612f9c0cb06774d | PHP | karlosgares/adoracion | /src/Entity/Sacerdote.php | UTF-8 | 3,018 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\SacerdoteRepository")
*/
class Sacerdote
{
const color = "#AACA31";
/**
* @ORM\Id()
* @ORM... | true |
d348850ddbb1cb1acc071f6d3a988b0816762ba3 | PHP | yasser1416/Desarrollo-Web | /Ej examen/Sección php básico2/sumar.php | UTF-8 | 639 | 2.921875 | 3 | [] | no_license | <?php
$n1=$_GET['numero1'];
$n2=$_GET['numero2'];
$filas=1;
$columnas=5;
$resultado;
?>
<style type="text/css"></style>
<link rel="stylesheet" href="diseño.css">
<style type="text/css">
tr{
background: lightgreen;
}
</style>
<table border="1" width="300" >
<?php
$con=1;
for ($i=1;$i<=$filas;$i++)
{
?>... | true |
69f1f03bef3ff2cce0bb8abf5c477c8a16f2524c | PHP | inlm/schema-generator | /src/DiffGenerator.php | UTF-8 | 14,945 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Inlm\SchemaGenerator;
use CzProject\SqlSchema;
class DiffGenerator
{
/** @var SqlSchema\Schema */
private $old;
/** @var SqlSchema\Schema */
private $new;
/** @var bool */
private $prepared = FALSE;
/** @var Diffs\CreatedTable[] */
private $createdTables;
/** @var Diffs\Rem... | true |
2f16eb0167d1bc47c8b2267e0cfb894fb6a198e6 | PHP | igorgodi/webservice | /WebService.php | UTF-8 | 363 | 2.984375 | 3 | [] | no_license | <?php
namespace ServeurSoap;
// Webservice lui-même
class WebService
{
// TODO : ne pas oublier les annotations
/**
* Test de passage de variable
*
* @param int $i valeur
* @return int
*/
public function test($i)
{
return $i;
}
/**
* Méthode hello
*
* @return string
*/
public function hel... | true |
9407248c98598167a1d43f3bbe05b7275cb33c02 | PHP | andre-braithwaite/mvc-shuffle | /app/models/DeckModel.php | UTF-8 | 9,115 | 3.0625 | 3 | [] | no_license | <?php
class DeckModel
{
static function deckFolder()
{
return '../app/models/data/';
}
static function getField($deck, $rank, $field)
{
$xml = new SimpleXMLElement($deck, 0, true);
foreach ($xml->children() as $card) {
if ($rank == $card->rank) {
... | true |
4555fe51ba5f36d6ee84c2781d57bee2c1067109 | PHP | hromoi/PHP | /1.php | UTF-8 | 135 | 2.5625 | 3 | [] | no_license | #!/usr/bin/php
<?php
fscanf(STDIN, "%d", $coll);
printf("%d\n", array_sum(array_unique(preg_split("/[\s]+/", trim(fgets(STDIN))))));
?> | true |
fbed12573211a3fb5c8dec974c5a0885a8c11935 | PHP | f4lty/twigtime | /src/TwigExtensions/Diffrence.php | UTF-8 | 1,185 | 3.046875 | 3 | [] | no_license | <?php
namespace TwigExtensions;
class Diffrence {
public function __construct($now, $then) {
$this->diff = $this->getUnixDiffrence($now, $then);
$this->doWork();
}
private function getUnixDiffrence($now, $then) {
list($now, $then) = array(strtotime($now), strtotime($then));
return $now > $then ? ($now - ... | true |
660ce600c4382a2e170d2830b63250bca39ed966 | PHP | qq928672/nkust-0903 | /test02/index.php | UTF-8 | 2,932 | 2.71875 | 3 | [] | no_license | <?php
session_start();
$user_type= $_SESSION["user_type"];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
body{
font-family:標楷體;
background-color:#F5EFFF;
background-image:url('https://cdn.pixabay.com/photo/2020/02/11/17/00/cat-484031... | true |
6f8983dbc7a9f62dacccba495884a323b5ac3dbe | PHP | midnightman3000/midnightman3000-test | /public/index_tmp.php | UTF-8 | 835 | 3.859375 | 4 | [] | no_license | <?php
trait Movement {
public function topSpeed() {
$this->speed = 100;
echo "Running at 100 %!" . PHP_EOL;
}
public function getSpeed() {
echo "Current speed $this->speed" . PHP_EOL;
}
public function stop() {
$this->speed = 0;
echo "Stopped moving!" . PHP_E... | true |
6e8757c1d60bad2863beded61f4ca4766fd076bb | PHP | zhouzishu/laravel-z5encrypt | /src/Z5Encrypt.php | UTF-8 | 1,316 | 2.6875 | 3 | [] | no_license | <?php
namespace Zhouzishu\LaravelZ5Encrypt;
use Firebase\JWT\JWT;
use GuzzleHttp\Client;
use Zhouzishu\LaravelZ5Encrypt\Exceptions\Z5EncryptException;
class Z5Encrypt
{
protected $config;
public function __construct(array $config)
{
$this->config = $config;
}
public function encryptFile... | true |
79245a57e2d666291e244c2f25eb369759540ff0 | PHP | ElStevie/mood-marble | /database/seeders/UserSeeder.php | UTF-8 | 1,587 | 2.625 | 3 | [] | no_license | <?php
namespace Database\Seeders;
use App\Models\Team;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class UserSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$max_us... | true |
62330a0ed63e6cb1944ee60c6593fef8940b6f48 | PHP | VictorReyesMartinez/DWES | /ejerciciosTema4/Ejercicio16.php | UTF-8 | 993 | 3.71875 | 4 | [] | no_license | <!DOCTYPE html>
<!--
Ejercicio 16
Escribe un programa que diga si un número introducido por teclado es o no primo. Un número
primo es aquel que sólo es divisible entre él mismo y la unidad.
-->
<html>
<head>
<meta charset="UTF-8">
<title>Ejercicio 16</title>
</head>
<body>
<?php
... | true |
58230e7a09609899899c1913c098b6a703521a93 | PHP | revenue-hack/mock-reservation | /app/Http/Middleware/Authenticate.php | UTF-8 | 1,033 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class Authenticate
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
public fun... | true |
984448b239a1e1f0b88e8e7726390591bb81280e | PHP | 2vans/WeatherApp | /src/AppBundle/Service/WeatherService.php | UTF-8 | 3,394 | 2.703125 | 3 | [] | no_license | <?php
namespace AppBundle\Service;
use AppBundle\Entity\City;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class WeatherService
{
private $entityManager;
private $baseUrl;
private $baseYql;
/**
* WeatherService constructor.
* @... | true |
6a8818d18235dffcf81b4c4a1261622f313bc0e6 | PHP | chrisauletta/RbxFut | /model/TimeDAO.php | UTF-8 | 684 | 2.875 | 3 | [] | no_license | <?php
include_once "../controller/ConexaoPDO.php";
class TimeDAO
{
public static function lista(){
$sql = "SELECT * FROM TIME;";
$sth = Conexao::getConexao()->prepare($sql);
$sth->execute();
if ($sth->rowcount() > 0) {
return $sth->fetchAll(PDO::FETCH_ASSOC);
}e... | true |
518103155f0e1dff19e707b6798dee184f2afb79 | PHP | AbbeYassine/e-commerce-api | /database/migrations/2018_10_13_131224_create_purchases_table.php | UTF-8 | 1,355 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePurchasesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('Purchase', fu... | true |
7726b94e02b77435a3627b534d2d1e680bdc3986 | PHP | BrkOne/erc20andETH | /src/Foundation/Transaction/SignedTransaction.php | UTF-8 | 779 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
/**
* User: Placecodex
* Date: 11/23/2020
* Time: 2:21 AM
*/
namespace Placecodex\Ethereum\Foundation\Transaction;
use Exception;
use Placecodex\Ethereum\Foundation\Eth;
class SignedTransaction
{
private $hash;
private $eth;
public function __construct(string $hash, Eth $eth = null)
{
... | true |
7c0a2e1242556a9133beeead7a78b3323499de63 | PHP | JanisLeja96/Codelex | /Basics/Arithmetic/CheckOddEven.php | UTF-8 | 162 | 3.453125 | 3 | [] | no_license | <?php
function checkOddEven(int $number) {
echo $number % 2 == 0 ? 'Even number' : 'Odd number';
}
checkOddEven(readline('Enter a number:'));
echo "\nbye!";
| true |
c43f85cd8783b640bac2aa32e131ba37dd4ef03f | PHP | pvesey/vesey.atspace.eu | /db/md5.php | UTF-8 | 159 | 2.859375 | 3 | [] | no_license | <?php
$ttime = time();
echo $ttime. "<br>";
for ($i=0;$i<300; $i++){
$ttime -= 1;
$result = md5($ttime);
echo $result . "<br>";
}
?>
| true |
b5aaa069eb421fc06b81dbbc0465ea2a49a4bd1f | PHP | alitvinenko/mongodb-nested-tree-extension | /lib/NestedTreeExtension/Document/Repository/NestedTreeRepository.php | UTF-8 | 20,002 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace NestedTreeExtension\Document\Repository;
use NestedTreeExtension\Strategy\ODM\MongoDB\Nested;
use Doctrine\ODM\MongoDB\Query\Builder;
use Doctrine\ODM\MongoDB\Query\Query;
use Gedmo\Exception\InvalidArgumentException;
use Gedmo\Exception\UnexpectedValueException;
use Gedmo\Tool\Wrapper\MongoDocumentWr... | true |
c1e2940d8eb919fe323ac15023c3656befa63263 | PHP | alex19870220/LeadForce | /app/database/migrations/archive/2014_09_27_030028_create_lead_forms_table.php | UTF-8 | 877 | 2.59375 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateLeadFormsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('lead_forms', function(Blueprint $table)
{
$table->increments('id');
$t... | true |
19a8cd10ce9c58d69c7753980575ab27f4ba27f1 | PHP | childelins/laravel-api-template | /app/Traits/ResponseTrait.php | UTF-8 | 487 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Traits;
trait ResponseTrait
{
// { statusCode: 200, data: xxx }
public function ok($data = null)
{
$res = ['statusCode' => 200];
if ($data) {
$res['data'] = $data;
}
return response()->json($res);
}
// { statusCode: 500, msg: xxx }... | true |
ef832dfd4fb97f914ee209ab7423228aaf4cf333 | PHP | ltdagabriel/Projeto-BD | /site/classes/Entidades/personagem.php | UTF-8 | 348 | 2.921875 | 3 | [] | no_license | <?php
class personagem{
private $nome;
private $foto;
public function get_nome() {
return $this->nome;
}
public function set_nome($nome) {
$this->nome=$nome;
}
public function get_foto() {
return $this->foto;
}
public function set_foto($foto) {
$th... | true |
41ff181b1c57f00a603ca424674e3fea8f9c2099 | PHP | millenium59170/POO | /06-tp-geometrie/index.php | UTF-8 | 197 | 3.046875 | 3 | [] | no_license | <?php
require_once 'formule.php';
$rectangle = new Rectangle(5, 10);
$square = new Square(5); // Un carré étend la classe rectangle
$circle = new Circle(5); // L'argument est le rayon du cercle | true |
bd55bb6bce0d1a2cfefa48655fd342b265b879c0 | PHP | MensEtManus/GoBook | /public/events.php | UTF-8 | 2,333 | 2.75 | 3 | [] | no_license | <?php
header('Content-type: text/json');
// configuration
require("../includes/config.php");
$sendback = array();
// if form was submitted
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$event = array("name" => $_POST["eventName"], "date" => $_POST["eventDate"], "time" => $_P... | true |
385346117cecdcf694e7a70eb69295d2d51747d4 | PHP | cryptooman/cc-project | /components/src/VarsException.php | UTF-8 | 469 | 2.609375 | 3 | [] | no_license | <?php
/**
*
*/
class VarsException extends Exception
{
const E_DEFAULT = 12000;
const E_EMPTY = 12001;
const E_BAD_TYPE = 12002;
const E_BAD_VALUE = 12003;
const E_RANGE_LESS = 12004;
const E_RANGE_MORE = 12005;
const E_MISMATCH_PATTERN = 12006;
const E_CAL... | true |
974f321a20435c97617c969768b63f324cc834e3 | PHP | Teepokun/Pickem | /Pickem/scripts/validateLogin.php | UTF-8 | 555 | 2.703125 | 3 | [] | no_license | <?php
$name=$_POST["name"];
$password=$_POST["password"];
$con=mysqli_connect("127.0.0.1","dlindem3","T@R63dis","dlindem3");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$query = "Select * from useraccount where Email = '" . $name . "'";
print($... | true |
cf7029b23a7a6cbd27a8fbf5b3071939e379a567 | PHP | AsistenteWeb/Hostingcart | /src/Ap/ResellerclubBundle/Api/Contacts/Operations/ContactAdd.php | UTF-8 | 2,453 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: aprendephp
* Date: 16/11/14
* Time: 08:02 AM
*/
namespace Ap\ResellerclubBundle\Api\Contacts\Operations;
use Ap\ResellerclubBundle\Api\Contacts\Contacts;
use Ap\ResellerclubBundle\Api\Interfaces\OperationInterface;
class ContactAdd extends Contacts implements OperationIn... | true |
f4711ff8cff50b304dc8eaf623d40a0822a1f26f | PHP | juliangt/TusLibros | /docs/iteracion1/Cart.php | UTF-8 | 1,849 | 3.546875 | 4 | [] | no_license | <?php
class Cart
{
const INVALID_PRODUCT = "Product not in catalog";
const INVALID_NUMBER_OF_PRODUCTS = "Number of products must be a positive integer";
private array $contents;
private array $catalog;
/**
* Cart constructor.
* @param array $catalog
*/
public function __constr... | true |
30bed61ecc8f49a2ebfc05320e36a27e917f7607 | PHP | fetus-hina/stat.ink | /commands/RerecognizeController.php | UTF-8 | 1,675 | 2.5625 | 3 | [
"MIT",
"BSD-3-Clause",
"CC-BY-4.0"
] | permissive | <?php
/**
* @copyright Copyright (C) 2016 AIZAWA Hina
* @license https://github.com/fetus-hina/stat.ink/blob/master/LICENSE MIT
* @author AIZAWA Hina <hina@fetus.jp>
*/
namespace app\commands;
use Yii;
use app\models\BattleRerecognizeForm;
use yii\base\InvalidParamException;
use yii\console\Controller;
use yii\h... | true |
a9178240bf6cc81f1f1b199f393018138121c6f6 | PHP | jumboluo/tracking | /trackingDEV/thinkapp/App/Lib/Util/PHPExcel/PHPExcel/Writer/PDF/mPDF.php | UTF-8 | 9,600 | 2.53125 | 3 | [] | no_license | <?php
/**
* PHPExcel
*
* Copyright (c) 2006 - 2012 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later ve... | true |
668ee8d1d23a964411dbdcb0c2857cd05819b56f | PHP | kyleahughes/AlumSpot | /app/Event.php | UTF-8 | 851 | 2.640625 | 3 | [] | no_license | <?php
namespace AlumSpot;
use Illuminate\Database\Eloquent\Model;
use AlumSpot\User;
class Event extends Model
{
//fillable = the fields we are allowing to be passed through the events form
//guarded = the fields we are not allowing to be passed through the form
protected $fillable = ['title', 'body', '... | true |
7a149da067028fda5a338f8460341b08d49ddaa6 | PHP | dario1985/adodb | /Examples/PDO/createTestTable.php | UTF-8 | 1,121 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/*
* Copyright 2011 (c) Dario Mancuso
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
require 'config.php';
$db = NewADOConnection('mysql');
$db->Connect(TEST_PDO_HOSTNAME, TEST_PDO_USERNAME, TEST_PDO_PASSWORD);
const MAX_RECORDS = 1e6;
f... | true |
02e64603b525e88ea6846d2f39dba9b3189a0fa4 | PHP | mvenkat777/server-api | /se/Users/Handlers/Commands/CreateUserCommandHandler.php | UTF-8 | 3,530 | 2.515625 | 3 | [] | no_license | <?php
namespace Platform\Users\Handlers\Commands;
use Platform\App\Commanding\CommandHandler;
use Platform\App\Events\EventDispatcher;
use Platform\App\Events\EventGenerator;
use Platform\App\Exceptions\SeException;
use Platform\App\Helpers\Helpers;
use Platform\Users\Commands\CreateUserCommand;
use Platform\Users\Re... | true |
cb83ee07273342d04fb23bcfa666eca6dab40340 | PHP | tuaki/fksdb | /app/model/Tasks/SeriesData.php | UTF-8 | 1,765 | 3.25 | 3 | [] | no_license | <?php
namespace Tasks;
use FKSDB\ORM\ModelContest;
/**
* "POD" to hold series pipeline processing data.
*
* @author Michal Koutný <michal@fykos.cz>
*/
class SeriesData {
/**
* @var ModelContest
*/
private $contest;
/**
* @var int
*/
private $year;
/**
* @var int
... | true |
4766a79e4381fc18292e4de07e77f9f2ee7db750 | PHP | ElMulot/life | /module/Blog/src/Entity/Post.php | UTF-8 | 5,600 | 2.609375 | 3 | [] | no_license | <?php
/**
* @copyright Copyright (c) 2015 - 2016
* @license https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
* @author Mulot
* @link http://life.je.gfns.ru/
* @version 0.1 alpha
* @since ... | true |
86ab737a2b533eb8dbad13bbf447d6ccad02fe5f | PHP | kingPowers/projectlist | /dhgj/wx/Common/common.php | UTF-8 | 6,271 | 2.859375 | 3 | [] | no_license | <?php
/**
+----------------------------------------------------------
* 字符串截取,支持中文和其他编码
+----------------------------------------------------------
* @static
* @access public
+----------------------------------------------------------
* @param string $str 需要转换的字符串
* @param string $start 开始位置
* @param strin... | true |
41fe2a7b63ecb780dabce93314db002500b6b1f5 | PHP | Hetal2425/auto-loads-web-yii2 | /console/migrations/m190115_140951_seo.php | UTF-8 | 1,189 | 2.546875 | 3 | [] | no_license | <?php
use yii\db\Migration;
class m190115_140951_seo extends Migration
{
public function init()
{
$this->db = 'db';
parent::init();
}
public function safeUp()
{
$tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci ENGINE=InnoDB'; // utf8mb4 to use correct 4 b... | true |
52e55f70277f8d17c0f9ec8d78b8db6171a42dfe | PHP | moonprism/kicoephp-src | /core/Route.php | UTF-8 | 10,455 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace kicoe\core;
use ReflectionClass;
use ReflectionException;
class Route
{
/**
* 超快速的路由前缀树实现
* example:
* @route get /index/{var1}
* @route get /index/test
* 'GET' => {
* 'path' => '/'
* 'handler' => [],
* 'children' => [
* 'i' => {
* ... | true |
aa7d7a3c0c5b67c9dc001642ed868b43b690c95d | PHP | Tacheyon-Devs/Ecommerce-App | /application/models/Item_model.php | UTF-8 | 1,246 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Item_model extends CI_Model
{
public function addTags($tag,$item)
{
$array = array
(
"tagId"=>$tag,
"itemId"=>$item
);
$this->db->insert("itemtags",$array);
}
public function getItemOwner($id)
{
$this->db->select("*");
... | true |
cd9c1d5466e57161cfd38b8e1b6a6e8a0b36d266 | PHP | samokishV/errors | /1_set_error_handler.php | UTF-8 | 1,343 | 2.71875 | 3 | [] | no_license | <?php
function myErrorHandler($errno, $message, $file, $line) {
//error types
$errors = array(
1 => "E_ERROR",
2 => "E_WARNING",
4 => "E_PARSE",
8 => "E_NOTICE",
16 => "E_CORE_ERROR",
32 => "E_CORE_WARNING",
64 => "E_COMPILE_ERROR",
... | true |
3f0a1edc4fcebb4d07322ff23fa75c64e5ac98df | PHP | gn0st1k4m/PhalconPoll | /src/Models/RedisModel.php | UTF-8 | 609 | 2.75 | 3 | [] | no_license | <?php
namespace PhalconPoll\Models;
use Phalcon\Di;
/**
* @author Peter Chung <touhonoob@gmail.com>
* @date Mar 28, 2015
*/
abstract class RedisModel
{
private static $redis;
/**
*
* @return \Redis
*/
protected static function r()
{
if (!isset(self::$redis)) {
... | true |
dd640bb461f4edad081da4833bbcc71b4ff5ae07 | PHP | takahashi-166-20/projectP2020_166 | /ex2/js6_server.php | UTF-8 | 306 | 2.828125 | 3 | [] | no_license | <?php
if(isset($_POST["text"]))$text = get_text();
print($text."が送られてきました");
function get_text(){
if($_POST["text"]!=null){
$ntxt = htmlspecialchars($_POST["text"],ENT_QUOTES,"UTF-8");
return $ntxt;
}
else return null;
}
?>
| true |
5a7d676d86a1504925f4dd018264120f5557c31c | PHP | rifkyalamsyah/Pweb2 | /P2/konstanta.php | UTF-8 | 539 | 3.015625 | 3 | [] | no_license | <?php
// Konstanta
// Contoh Menggunakan keyword cons
const alamat_univ = "http://Amikom.ac.id";
echo alamat_univ;
echo "<br>";
// Contoh menggunakan fungsi define
define("alamat_unive", "http://Amikom.ac.id");
echo alamat_unive;
echo "<br>";
?>
<?php
// Bisa menggunakan konstantanya
define('echo', 'Universitas Amik... | true |
0108d02b10703ba4058411e8f59f6d4a08e305bf | PHP | TrollScien/unidad-sanitaria | /ajax/cargo.ajax.php | UTF-8 | 691 | 2.546875 | 3 | [] | no_license | <?php
require_once "../controlador/gestorCargo.php";
require_once "../modelo/gestorCargo.php";
class AjaxCargo{
/*=============================================
EDITAR CARGO
=============================================*/
public $idCargo;
public function ajaxEditarCargo(){
$item = "id_cargo";
$valor = $... | true |
c3a52aca4e27973430915f7476274d3a743692b8 | PHP | daniel-simms/content-bidder | /reset_pass_process.php | UTF-8 | 2,494 | 2.6875 | 3 | [] | no_license |
<?php
# Checking for Password Link Expiration
if(isset($_GET['encrypt']) && isset($_GET['user_id'])){
$encrypt = $_GET['encrypt'];
$user_id = $_GET['user_id'];
$sql = "SELECT * FROM users WHERE user_id = '$user_id' AND sha1(1290*3+$user_id)='$encrypt' ";
$result = mysqli_query($conn, $sql) ;
$record = mysqli_... | true |
7e989ce71adbfc82dfd2741a2f74b08b563cd33f | PHP | phamphuchinh1606/philippe_paxsky | /app/Http/Controllers/InvestorController.php | UTF-8 | 1,364 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class InvestorController extends Controller
{
private function showView($viewName,$arrayData = []){
return View('investors.'.$viewName, $arrayData);
}
public function index(){
$investors = $this->investorService->getAll()... | true |
8e3d25a1412863bed98eb6aa0efa28c882619e92 | PHP | rafliher/edom_uswah | /database/migrations/2020_07_07_140226_create_edom_ratings_table.php | UTF-8 | 1,019 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEdomRatingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('edom_rating... | true |
55c7b3bc8c02879c4e9409b1d16b2ebe830d05ac | PHP | techdivision/TechDivision_Collections | /src/TechDivision/Collections/TreeMap.php | UTF-8 | 6,446 | 3.375 | 3 | [] | no_license | <?php
/**
* \TechDivision\Collections\TreeMap
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @category Library
* @package TechDivis... | true |
6255a08b9e656b5a9fcd1db641c1602a80b5532d | PHP | ashutosh1209/ringcentral | /module/Application/src/Model/Index.php | UTF-8 | 1,272 | 2.796875 | 3 | [] | no_license | <?php
namespace Application\Model;
class Index {
public $ID;
public $token_type;
public $access_token ;
public $expires_in;
public $expire_time;
public $refresh_token;
public $refresh_token_expires_in;
public $refresh_token_expire_time;
public $scope;
public $owner_id;
public function... | true |
5e529ce5da36902622c173bfff4319153b8ec770 | PHP | guoyu07/zeus-php | /zeus/base/event/AbstractEvent.php | UTF-8 | 2,096 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Class AbstractEvent
* @package zeus\base\event
*/
namespace zeus\base\event;
abstract class AbstractEvent
{
protected $eventId;
protected $eventType;
private $data = [];
private $method;
private $idempotent = 0;
public function __construct()
{
$class = get_class($... | true |
ba3725ba24d6b93c0e6f1043941eb3b5c0ea1db4 | PHP | mason-wolf/Project-Budget | /CreateAccount.php | UTF-8 | 2,495 | 2.71875 | 3 | [] | no_license | <?php
include 'header.php';
if (isset($_POST['createaccount'])) {
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$email = $_POST['email'];
$password = $_POST['password'];
if (empty($firstname) || empty($lastname) || empty($email) || empty($password)) {
$accountconfli... | true |
ee8177aff12d65cddc042fffb984b5eee2d1a558 | PHP | zulfikrizulkiflee/PENTA-CORRAD | /control_file.php | UTF-8 | 9,792 | 2.875 | 3 | [] | no_license | <?php
/*
Luqman Shariffudin
Generate PDF or CSV from report component
*/
require_once('system_prerequisite.php');
//validate that user have session
require_once('func_common.php');
validateUserSession();
/*---- START FUNCTIONS ----*/
//generate and sync index from name(key)
function SyncNameWithIndex($array)
{
$fin... | true |
165102f934796b4eeb25e755bf1d4bb99d409950 | PHP | volosgoto/PHPAcademy | /be/php_basics_tasks/task_13.php | UTF-8 | 744 | 3.390625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Task 13</title>
<meta charset="UTF-8">
<meta name="keywords" content="php_basics_tasks">
<meta name="description" content="php_basics_tasks">
<meta name="author" content="Volosovich Andrey">
</head>
<body>
<?php
// <p>13. Заданы две переменные: s - длина участка, который проех... | true |
c33a6fee3da27729a4b9dab5b403d56e041682ef | PHP | lhk218/sage_system | /managers/includes/functions/functions_edit_staff.php | UTF-8 | 1,701 | 2.765625 | 3 | [] | no_license | <?php
/**
* This file handles all edit functions related to staff management.
*
* Framework used:
* UserSpice 5
* An Open Source PHP User Management System by the UserSpice Team at http://UserSpice.com
*
* @author Stephanie Gomes
* @version 19/04/2020
*/
if(isset($_GET['action']) && $_GET['action'] == 'edit') {
if... | true |
24c07f917345da92c12a44f917477ae826264844 | PHP | kbond/php-jwt | /src/Signer/OpenSSL/Keychain.php | UTF-8 | 854 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Zenstruck\JWT\Signer\OpenSSL;
/**
* @author Kevin Bond <kevinbond@gmail.com>
*/
final class Keychain
{
private $publicKey;
private $privateKey;
/**
* @param PublicKey|mixed $publicKey
* @param PrivateKey|mixed $privateKey
* @param string|null $passphrase
*/
... | true |
94a03686520a5f1a29fd8770cbf8d8835423b7f9 | PHP | kenpeter/jot-bot | /app/Http/routes.php | UTF-8 | 1,195 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond ... | true |
838f7743f82c0cbebfd61f08ca622f2188940db7 | PHP | Aurtenechea/programacion3 | /abm_1erParcial_php/insert.php | UTF-8 | 1,079 | 2.71875 | 3 | [] | no_license | <?php
require_once("lib.php");
const FOLDER = "./fotos";
// const SLASH = "/";
if(isset($_POST['enviar']) && isset($_POST['name']) && isset($_POST['lastname']) isset($_POST['dni']) && isset($_FILES['file'])){
$nombre = $_POST['name'];
$archivo = $_FILES['file'];
$apellido = $_POST['lastname'];
$dni =... | true |
a4778f9bee017cb61f583c8768612648c42daf1a | PHP | ArnaudFavier/PouletArmy | /models/rapport.php | UTF-8 | 4,100 | 2.890625 | 3 | [] | no_license | <?php
require_once('database/database.php');
require_once('params/config.php');
require_once('params/rules.php');
require_once('user.php');
/*
|------------------------------
| Classe Rapport
| Manipulation des rapports de
| combats entre les joueurs
|------------------------------
*/
class Rapport {
/*
... | true |
06400fd396639ab082a410358cc36e14f58b7a79 | PHP | oney/opencart-laravel | /system/laravel/services/RegisterService.php | UTF-8 | 2,717 | 2.515625 | 3 | [] | no_license | <?php namespace App\Service;
use App\Eloquent\Customer;
use App\Eloquent\Address;
use App\Eloquent\CustomerLogin;
use App\Eloquent\CustomerActivity;
use App\Eloquent\CustomerGroup;
use App\Validation\RegisterValidator;
class RegisterService
{
protected $opencart;
protected $params;
protected $error_messages;
... | true |
0f7c78dae0ce6b767a0834138f1505317944862a | PHP | yuMcdull/Study_notes | /设计模式/创建型/工厂模式/抽象工厂模式/platformFactoryClassic.php | UTF-8 | 346 | 2.765625 | 3 | [] | no_license | <?php
namespace DesignPatterns\Creational\AbstractFactory;
require_once "abFactory.php";
require_once "product.php";
class platformFactoryClassic extends AbstractFactory {
public function CreateMysqlDB()
{
return new ClassicMysqlDB();
}
public function CreateSqliteDB()
{
return new ... | true |
bbf4fc1548c453a7dea7b916bdee91c21e7d495e | PHP | MorleyWebDev/gradedunit2 | /php/buyTickets.php | UTF-8 | 3,885 | 2.828125 | 3 | [] | no_license | <?php
// start php sessions
session_start();
// connect to db
require("../includes/dbconx.php");
// get user id
$uid = $_SESSION['id'];
// get exhibition id from
$exid = $_GET["exid"];
$tcost;
$vPassword = $_POST['bookPassword'];
$ticketNo = $_POST["bookingselec"];
$ticketNo = (int)$ticketNo;
// get price and spaces ... | true |
d8d9b22e5557fd0708636d9d168afc8cff937ac6 | PHP | HilkiahMakemo/demo-novam-css | /app/Http/Controllers/Controller.php | UTF-8 | 1,262 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Controller extends BaseControll... | true |
1979da7ee2fa55b27f1c91bb4e0ddc37e8505b08 | PHP | MarcelRaschke/php-src | /ext/intl/breakiterator/breakiterator.stub.php | UTF-8 | 2,831 | 2.6875 | 3 | [
"PHP-3.01",
"GD",
"IJG",
"Zlib",
"LicenseRef-scancode-other-permissive",
"TCL",
"BSD-3-Clause",
"BSD-4-Clause-UC",
"OLDAP-2.8",
"ISC",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause"
] | permissive | <?php
/** @generate-class-entries */
class IntlBreakIterator implements IteratorAggregate
{
/** @tentative-return-type */
public static function createCharacterInstance(?string $locale = null): ?IntlBreakIterator {}
/** @tentative-return-type */
public static function createCodePointInstance(): IntlC... | true |
e094e7b2313b981133a84aab46ad5c8a6ca87c9a | PHP | fyllekanin/com.thishabbo.web | /rest/app/Repositories/Impl/PageRepository/PageRepositoryImpl.php | UTF-8 | 421 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Repositories\Impl\PageRepository;
use App\Repositories\Repository\PageRepository;
class PageRepositoryImpl implements PageRepository {
private $myPageDBO;
public function __construct() {
$this->myPageDBO = new PageDBO();
}
public function getPageByPath(string $path) {
... | true |
e76e15dc07a2059c3f3e289a3b6cb96392e69e46 | PHP | TUArchers/club-website | /app/Domain/Identity/PermissionRepositoryInterface.php | UTF-8 | 689 | 2.921875 | 3 | [] | no_license | <?php
namespace TuaWebsite\Domain\Identity;
/**
* Permission Repository Interface
*
* @package TuaWebsite\Domain\Identity
* @author
* @version 0.1.0
* @since 0.1.0
*/
interface PermissionRepositoryInterface
{
/**
* @param Permission $permission
*/
public function add(Permission $permission)... | true |
552cc44559b6c17441a4c916e8fcd41a11b7a6f8 | PHP | nloreti/infovis-final | /tiempo.php | UTF-8 | 1,426 | 2.78125 | 3 | [] | no_license | <?php
sleep(5);
session_start();
//var_dump($_SESSION);
$finalArray = "[['Periodo'";
$hashtags = explode (',', $_SESSION['hashtags']);
foreach ($hashtags as $hashtag)
{
$finalArray = $finalArray . ",'" . $hashtag . "'";
}
$finalArray = $finalArray . '],';
$round = $_SESSION['round'];
$round = $round - 4;
if ($round ... | true |
237ee1ab02f319227900f76375fb60a2d3353f6a | PHP | fjzwn/designPattern | /structure/composite/Dir.php | UTF-8 | 1,305 | 3.359375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: cengweinan
* Date: 18/4/25
* Time: 下午2:46
*/
declare(strict_types = 1);
namespace structure\composite;
class Dir extends Filesystem
{
private $filesystems = [];
/**
* 组合对象必须实现添加方法,文件和目录都能添加
*
* @param Filesystem $filesystem
*/
public funct... | true |
9f4682ed224705577a267157b64bc74d6cc225c4 | PHP | b-heilman/snap-php | /src/Snap/Prototype/Topic/Model/Doctrine/Topic.php | UTF-8 | 1,826 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Snap\Prototype\Topic\Model\Doctrine;
/**
* @Entity @Table(name="topics")
* @InheritanceType("TABLE_PER_CLASS")
**/
class Topic extends \Snap\Model\Doctrine
implements \Snap\Prototype\Tagging\Lib\Taggable {
protected
/**
* @Column(type="string")
**/
$name,
/**
* @Column... | true |
26d7cee68524fc5846229b4e309f2dcc6919d12c | PHP | DarkB0t776/PHP | /blog/ajax/process_signin.php | UTF-8 | 973 | 2.546875 | 3 | [] | no_license | <?php
session_start();
require_once __DIR__ . '/../includes/classes/Account.php';
require_once __DIR__ . '/../includes/classes/Sanitizer.php';
$data = [];
$whiteList = ['username'];
$account = new Account;
foreach ($_POST as $key => $value) {
if (in_array($key, $whiteList) && !empty($value)) {
$data[$key]... | true |
04a190771e77a8a6841ee7c41a01e83cf5de6ba6 | PHP | quangdung92/php_demo | /app/tests/ExampleTest.php | UTF-8 | 1,717 | 2.65625 | 3 | [] | no_license | <?php
class ExampleTest extends TestCase {
/**
* A basic functional test example.
*
* @return void
*/
public function testBasicExample()
{
$crawler = $this->client->request('GET', '/');
$this->assertTrue($this->client->getResponse()->isOk());
}
public function test_login()
{
$credential... | true |
7e12d188fe80ea9e0855ae8a07af78975e49b8d2 | PHP | JarJarMP/MyToolbox | /DesignPatterns/php2/09_strategy/cube.php | UTF-8 | 110 | 2.984375 | 3 | [] | no_license | <?php
class Cube
{
public function output($input)
{
return $input * $input * $input;
}
}
| true |
bd480826ea3500167f8e1dd0fe27979d7e9bdf8f | PHP | lipeRomani/factory_arrays_generators | /generators/ReportDao.php | UTF-8 | 774 | 3.296875 | 3 | [] | no_license | <?php
class ReportDao {
private $reportData = [];
public function __construct() {
$this->reportData = [
new ReportDto("Pablo Scobar", 45),
new ReportDto("Frank Underwood", 63),
new ReportDto("Jhon Snow", 35),
new ReportDto("Heisenberg", 45),
... | true |
90dab7833583540999b5e845f276c05390bfdbb0 | PHP | shyam1s15/motoBlogger | /database/seeds/postsSeeder.php | UTF-8 | 690 | 2.765625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\posts;
use App\students;
use App\boats;
class postsSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
$post = new posts;
$post->type = "c++";
$post->descriptio... | true |
dde062219aa4c3e97a5d0a7554f3bcb745c7cee5 | PHP | Time-travelers/php-test | /model/easy-tips-master/patterns/observer/spl/test.php | UTF-8 | 940 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* 行为型模式
*
* php观察者模式
* 观察者观察被观察者,被观察者通知观察者
*
* @author jealone <https://github.com/jealone>
* @example 运行 php test.php
*/
// 注册自加载
spl_autoload_register('autoload');
function autoload($class)
{
require dirname($_SERVER['SCRIPT_FILENAME']) . '//..//' . str_replace('\\', '/', $class) . '.php';
}
... | true |
90d1c1d6cf04d71ac084824ffaf96d73770b4864 | PHP | wayneabarquez/kaonph | /app/tests/factories/factories.php | UTF-8 | 1,854 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Laracasts\TestDummy\Factory;
$factory('User', function($faker) {
$gender = array_rand(Config::get('enums.gender'));
return [
'role_id' => $faker->numberBetween(1, 3),
'email' => $faker->unique(true, 100000)->email,
'password' => 'password1234',
'firstname' => $faker->unique... | true |
25633e7ed7b3f34808f74953045cd501b0bff9ae | PHP | ruan-webdev/Sites | /RoseBuffet/admin/contato/list.php | UTF-8 | 1,194 | 2.671875 | 3 | [] | no_license | <?php
/*
require_once("conecta.php");
$buscar = $conn->prepare("SELECT * FROM depoimento ORDER BY id");
$buscar ->execute();
$resultado = $buscar->fetchAll(PDO::FETCH_ASSOC);*/
require_once("global.php");
$conta = new contaClasse();
$lista = $conta->listar();
?>
<h1>Contato</h1>
<table class="tabela" border=... | true |
3bc8469cc0c13062dac29733288988116895f783 | PHP | jeethualex/core | /src/MessageBuilder/Message/ListMessage.php | UTF-8 | 2,234 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace OpenDialogAi\MessageBuilder\Message;
use OpenDialogAi\MessageBuilder\Message\Button\CallbackButton;
use OpenDialogAi\MessageBuilder\Message\Button\LinkButton;
use OpenDialogAi\MessageBuilder\Message\Button\TabSwitchButton;
use OpenDialogAi\MessageBuilder\Message\Button\TranscriptDownloadButton;
class... | true |
a8249f93643ed8d667fe5c13ccccbd866c37e4f8 | PHP | hkulekci/basic_auth | /server/json.php | UTF-8 | 2,882 | 2.5625 | 3 | [] | no_license | <?php
/*
This file is hosted on server to get with ajax from mobile device.
@username => session username use before session start
@password => session password use before session start
@auth => session use after session start
*/
define('DEBUG', true);
if (DEBUG){
error_reporting(E_ALL);
ini_set('display_er... | true |
16adcbc048f2e495267fdf304ca6565210375759 | PHP | mohammad7997/laravel | /app/Repository/ThreadRepository.php | UTF-8 | 1,736 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repository;
use App\Models\Thread;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
class ThreadRepository
{
/**
* show all threads
* @return mixed
*/
public function AllThreads()
{
return Thread::whereFlag(1)->latest()->get();
}
/**
*... | true |
80668343b86748c1528534b4c3a72477dbeb5561 | PHP | victorlevandovski/teamo-ddd-example | /app/Project/Application/Command/TodoList/UpdateTodoCommentHandler.php | UTF-8 | 814 | 2.546875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Teamo\Project\Application\Command\TodoList;
use Teamo\Project\Domain\Model\Project\Comment\CommentId;
use Teamo\Project\Domain\Model\Project\TodoList\TodoCommentRepository;
use Teamo\Project\Domain\Model\Project\TodoList\TodoId;
use Teamo\Project\Domain\Model\Team\TeamMemberId... | true |
c7e9967260176e316c548e14e6a97bef9fd198c4 | PHP | Slam5guil/StPaulDuTerray | /app/routes.php | UTF-8 | 541 | 2.671875 | 3 | [] | no_license | <?php
$app->get('/ping', function() use ($app) {
return 'ping';
});
$app->get('/hello', function() use ($app) {
return 'Hello world';
});
$app->get('/', function () {
require '/model.php';
$sejours = getSejours();
ob_start(); // start buffering HTML output
requir... | true |
770bd04a7c91965477b09b3111aae21a95b459a2 | PHP | armasmontse/revista192 | /themes/192-theme/functions/theme/controllers/R192_Single_Controller.php | UTF-8 | 1,869 | 2.78125 | 3 | [] | no_license | <?php
class R192_Single_Controller extends R192_Feat_and_Archive_Controller
{
public function __construct($wp_post)
{
$this->feat_post = $wp_post;
$this->setFeatPost();
if( $this->setCategorySlug() ){
$this->setPosts();
$this->setFechasLinks($this->category_slug);
$t... | true |