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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
aed8c3398b26e69458a3681c79431d787e404155 | PHP | AlogyStudy/thinkphp | /shop/Lib/Action/admin/ManagerAction.class.php | UTF-8 | 3,290 | 2.625 | 3 | [] | no_license | <?php
/**
* 后台管理员控制器
*/
class ManagerAction extends Action {
// 登陆系统
public function login() {
// 读取语言变量信息
// L(name); 读取指定语言信息
// L(); 把全部语言信息以数组信息返回
$lang = L();
if ( !empty($_POST) ) {
// 验证码
if ( md5($_POST['captcha']) == $_SESSION['verify'] ) {
// 用户名和密... | true |
c6dcacf52edd3505cf342efadcfb618b7d2a9b08 | PHP | IsiteYves/php-store-project | /products/delete_product.php | UTF-8 | 886 | 2.640625 | 3 | [] | no_license | <?php
session_start();
if (empty($_SESSION['role'])) {
header('location: ../login.php');
} else {
if ($_SESSION['role'] != 'Manager') {
header('location: ../account.php');
} else {
include "../connect_to_db.php";
$productId = $_REQUEST['id'];
if (!$db_connection) {
... | true |
66a262ecfcb8ab20e0b0b45acd34b1ed5e500701 | PHP | joedulin/element.php | /elements/dl.class.php | UTF-8 | 796 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
class dl extends Element {
public $dt_opts;
public $dd_opts;
//I'm too lazy to write the code to do anything special in the constructor
public function __construct($inner=array(), $opts=array(), $dt_opts=array(), $dd_opts=array()) {
parent::__construct('dl', $opts);
$this->build_inner($inner);
$this->... | true |
7feb726f0b4a0219aee8c6714c1c489fa05f81b8 | PHP | fuchigam1/Instagram | /View/Helper/InstagramHelper.php | UTF-8 | 1,888 | 2.546875 | 3 | [] | no_license | <?php
/*
* インスタグラムプラグイン
* 表示ヘルパー
*
* PHP 5.4.x
*
* @copyright Copyright (c) hiniarata co.ltd
* @link https://hiniarata.jp
* @package Instagram Plugin Project
* @since ver.0.9.0
*/
/* Model and Helper */
App::uses('AppHelper', 'View/Helper');
App::import('Model', 'Instagram.InstagramConfig');
cla... | true |
b60e4867e710bfc458f3c82280ef1f3e2966f13b | PHP | mathildeoldorf/ahousetocallhome | /api/api-like-property.php | UTF-8 | 925 | 2.53125 | 3 | [] | no_license | <?php
session_start();
if(!$_SESSION){
exit;
}
// REQUIRE FUNCTIONS.PHP TO RUN ERROR-FUNCTION AND GET CONTENTS OF DATA.JSON AND DECODE INTO A JSON-OBJECT
require_once(__DIR__.'/../functions.php');
// GET INFORMATION FROM SESSION TO POINT TO THE CORRECT USER IN THE CORRECT NESTED OBJECT (USERS / AGENTS)
$sUserTy... | true |
0b11cf99924d7b02162a4c5238efaae3daddf11e | PHP | ariel-gallardo/labo4-tp1 | /app/Http/Controllers/EmpresaController.php | UTF-8 | 3,604 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Empresa;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Http\Request;
class EmpresaController extends Controller
{
public function validar(Request $req){
$this->validate($req,[
... | true |
6b529a94845be02965e3be4c7debf9f245683fa6 | PHP | luisdomin5/simplepie-ng | /tests/Unit/Enum/CharacterSetTest.php | UTF-8 | 1,291 | 2.625 | 3 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | <?php
/**
* Copyright (c) 2017–2019 Ryan Parman <http://ryanparman.com>.
* Copyright (c) 2017–2019 Contributors.
*
* http://opensource.org/licenses/Apache2.0
*/
declare(strict_types=1);
namespace SimplePie\Test\Unit\Enum;
use SimplePie\Enum\CharacterSet;
use SimplePie\Test\Unit\AbstractTestCase;
class Characte... | true |
82554287f2f5b0d2eb4ee0bc0ac7b2f2cfbeddc6 | PHP | garrus/yace | /library/Yace/LayoutCapableView.php | UTF-8 | 9,090 | 2.609375 | 3 | [] | no_license | <?php
namespace Yace;
use Yace\Exception\DomainException;
use Yace\Exception\InvalidCallbackException;
use Yace\Exception\InvalidViewScriptException;
use Yace\Exception\RuntimeException;
/**
* Yaf layout capable view
*/
class LayoutCapableView implements \Yaf_View_Interface
{
/**
* Application configuratio... | true |
f59fa1008a1894df62e7bd63bde25a4b3e1ac620 | PHP | yongbiboum/agri-business | /ext/agri-business/lib/custom/src/MShop/Product/Item/Product.php | UTF-8 | 4,436 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: faya
* Date: 18/04/2019
* Time: 15:24
*/
namespace Aimeos\MShop\Product\Item;
class Product extends Standard
{
private $myvalues;
public function __construct( array $values, array $listItems = [],
array $refItems = [], array $pro... | true |
0a0f73b867f83de5cfbeff3f0ec611ec4e118724 | PHP | vishesh27k/hrm | /app/Modules/Pim/Http/Requests/EmployeeDocumentRequest.php | UTF-8 | 771 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Modules\Pim\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Route;
class EmployeeDocumentRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return tr... | true |
b6fac4c6fd47c265819938ebe062bca43196766f | PHP | rbtitotito/chop-recipes | /src/ChopShopper/Entity/RecipeStepIngredient.php | UTF-8 | 2,612 | 2.890625 | 3 | [] | no_license | <?php
// src/ChopShopper/Entity/RecipeStep.php
namespace ChopShopper\Entity;
/**
* RecipeStep links together Recipes and Ingredients
* with a direction.
* This way, the ingredient list for the entire recipe
* can be built while the directions are being built.
* @Entity(repositoryClass="ChopShopper\Entity\RecipeSt... | true |
f92f81e899334e28880945e38121b64dea3b7059 | PHP | hopdq/lalachocolate | /application/models/Admin/PageModel.php | UTF-8 | 228 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class PageModel{
public $Page;
public $PageSize;
public $TotalItems;
public $TotalPages;
public function __construct(){
$this->Page = 1;
$this->PageSize = 10;
$this->TotalPages = 0;
$this->TotalItems = 0;
}
} | true |
ff92250068b0079292316e77d1b9a39db434ee3b | PHP | trotri/trotri | /app/administrator/views/bootstrap/components/form/ButtonElement.php | UTF-8 | 1,668 | 2.671875 | 3 | [] | no_license | <?php
/**
* Trotri
*
* @author Huan Song <trotri@yeah.net>
* @link http://github.com/trotri/trotri for the canonical source repository
* @copyright Copyright © 2011-2013 http://www.trotri.com/ All rights reserved.
* @license http://www.apache.org/licenses/LICENSE-2.0
*/
namespace views\bootstrap\... | true |
c333c4ec7d1a86d3d1745e13e7cd4b18c1f7ebcc | PHP | zt-learn/learn-php | /static/test1.php | UTF-8 | 657 | 3.625 | 4 | [] | no_license | <?php
class People
{
private static $people = 'people';
}
class visitors extends People
{
private static $visitors = 0;
private static $sb = 'sdf';
private static $people = 'son';
function __construct()
{
static::$sb = 'sb';
static::$visitors++;
}
public static functi... | true |
95f05fbf30e7d2729b26e6abfc5441183b2d4986 | PHP | TataAdiN/re-regis | /application/models/Model_login.php | UTF-8 | 1,784 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
class Model_login extends CI_Model
{
private $tableStudent = 'student';
function login($student_id , $password)
{
$this->db->select("student_id, student_no_daftar, student_password");
$this->db->from($this->tableStudent);
$this->db->where('is_active', 1);
$this->db->wh... | true |
c7541bfa133b225e1df662be93cd1a6385d538a2 | PHP | lucasfloriani/projeto-nodemcu | /mutations.php | UTF-8 | 719 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
function createTablesDatabase($pdo) {
$sql = "CREATE TABLE IF NOT EXISTS luminosidade (" .
"id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY," .
"luminosidade FLOAT NOT NULL," .
"tempo TIMESTAMP NOT NULL" .
");" .
"CREATE TABLE IF NOT EXISTS umidade (" .
"id INT(6) UNS... | true |
f79253d79b505d2c3c69ef389da2eb8f13505a99 | PHP | pluf/http2 | /tests/Assets/PhpFunctionOverrides.php | UTF-8 | 2,486 | 2.953125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace Pluf;
use Pluf\Tests\Assets\HeaderStack;
/**
* Return the value of the global variable $GLOBALS['getallheaders_return'] if it exists.
* Otherwise the
* function override calls the default php built-in function.
*
* @return array|false
*/
function getallheaders()
{
if (array_key_exists('getal... | true |
6d5145143ad81fbcc3d9ba34cb2b3cfdae504185 | PHP | kozhindev/yii-steroids | /backend/components/Types.php | UTF-8 | 5,168 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace steroids\components;
use steroids\base\Model;
use steroids\base\Type;
use steroids\types\AutoTimeType;
use steroids\types\BooleanType;
use steroids\types\DoubleType;
use steroids\types\MoneyType;
use steroids\types\CustomType;
use steroids\types\DateTimeType;
use steroids\types\DateType;
use steroids\... | true |
0cbed80bd033f651fbcc43f2599c6d1621bc6e54 | PHP | civicrm/civicrm-cxn-rpc | /src/Message/GarbledMessage.php | UTF-8 | 1,092 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the civicrm-cxn-rpc package.
*
* Copyright (c) CiviCRM LLC <info@civicrm.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this package.
*/
namespace Civi\Cxn\Rpc\Message;
use Civi\Cxn\Rpc\Message;
/**
* Class Ga... | true |
92025dc31a14f8b3a830f6dcae839b8e61e1b98c | PHP | chrome242/FLOT-Comming-Soon | /include/scaffolding/admin/table/class.table.panel.php | UTF-8 | 3,199 | 3.15625 | 3 | [] | no_license | <?php
/**
* PanelTable
*
* This extension of table alters the output to remove the div's from the
* table class, so that it will not encounter some of the issues that table
* does when trying to use it with a container div inside of a panel.
*
* The class overwrites the openTable and the closeTable methods, set... | true |
7b24710a2d6558ea32fa7e51fb5c0c7037afecc8 | PHP | andriiluka/geekhub-php-crud | /src/Controllers/HomeworksController.php | UTF-8 | 2,328 | 2.734375 | 3 | [] | no_license | <?php
namespace Controllers;
use Repositories\HomeworksRepository;
class HomeworksController
{
/**
* @var HomeworksRepository
*/
private $repository;
/**
* @var \Twig_Loader_Filesystem
*/
private $loader;
/**
* @var \Twig_Environment
*/
private $twig;
/**
... | true |
594a6ed0d8a3d6565e0f352f8247e2b5d3af7024 | PHP | matry-ny/mainacad_001 | /l06/arrays.php | UTF-8 | 2,175 | 2.890625 | 3 | [] | no_license | <?php
require_once __DIR__ . '/../library.php';
$data = [
[
'firstName' => 'Игорь',
'lastName' => 'Синяков',
'age' => 40,
'isActive' => true,
'skills' => [
'PHP' => '15%',
'JS' => '5%'
]
],
[
'firstName' => 'Максим',
'... | true |
633d323f93a1c24bc329f721d6a563f24d59eefa | PHP | kamil17289/menu | /src/Repository.php | UTF-8 | 3,041 | 3.375 | 3 | [
"MIT"
] | permissive | <?php
namespace Nethead\Menu;
/**
* Repository is a central storage for all menus you define.
* Read through the methods documentation to check how to do add, retrieve and render your menus.
*
* @package Nethead\Menu
*/
final class Repository implements \ArrayAccess {
/**
* Menus array stores all your d... | true |
8ef57d5229077db90f9d05bba5ee03df11ffcd98 | PHP | Lucasmelg97/Sistema_Atendimento_Cliente_Chamadas | /classe-atendimentoclienteDAO.php | UTF-8 | 14,367 | 2.796875 | 3 | [] | no_license | <?php
if(!isset($_SESSION))
{
session_start();
}
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
/* Inclui bibliotecas de classes */
include 'classe-atendimentocliente.php';
include_once "config.php";
class Classe_AtendimentoCliente_DAO{
/* Variável priva... | true |
a2b991102d148cd2865d6ae09c951063ac22a77e | PHP | bowvernon110391/modulfixer | /cleandb.php | UTF-8 | 588 | 3.09375 | 3 | [] | no_license | <?php
include 'include.php';
/**
* clean all tables
*/
function clearTable($db, $tblName) {
echo "Clearing table: {$tblName}...\n";
$db->query("DELETE FROM {$tblName}");
}
if ($argc != 2) {
echo "php cleandb.php [db_file]\n";
echo "delete all rows from specified tables...\n";
} else {
// execu... | true |
94b564ea6401c368e46b164d5034c1cd8d31b5ef | PHP | rubenjariasp/ejercicio-poo | /src/Armors/BronzeArmor.php | UTF-8 | 294 | 3.234375 | 3 | [] | no_license | <?php
namespace Curso\Armors;
use Curso\Unit;
class BronzeArmor implements Armor
{
public function absorbDamage($damage)
{
return $damage/2;
}
public function getDescription(Unit $unit)
{
show("{$unit->getName()} obtuvo una armadura de bronce");
}
} | true |
53c53e93f27ec89cfc0644cb87f80b37f959e5f1 | PHP | lukejsimonetti/hydrator-strategy-pattern | /src/Exception/FormAssemblyProviderException.php | UTF-8 | 1,453 | 3.0625 | 3 | [] | no_license | <?php
namespace src\Exception;
class FormAssemblyProviderException extends ProviderException
{
const OAUTH_TOKEN_REQUIRED = 1;
const CURL_SUPPORT_REQUIRED = 2;
const API_PATH_REQUIRED = 3;
const GENERIC_CURL_ERROR = 4;
const HTTP_STATUS_EXCEPTION = 5;
/**
* @return FormAssemblyProviderEx... | true |
1a8f5bc4450f791c653b7bd4546c5bf5e897ab71 | PHP | ppe3LLVS/ppe3 | /obtention.enc_cavalier-niveau.php | UTF-8 | 3,021 | 2.515625 | 3 | [] | no_license | <?php
include 'cavalier.enc_adresse-login.php';
include 'niveau.php';
class Obtention
{
private $_cavalier;
private $_niveau;
private $_date;
function __construct(Cavalier $cavalier,Niveau $niveau,$date)
{
$this->_cavalier = $cavalier;
$this->_niveau = $niveau;
$this->_date = $dat... | true |
d7027e3555e8eb3ef518e136b56d50e42be41838 | PHP | eichie/ginq | /src/Ginq/Iterator/SelectIterator.php | UTF-8 | 1,897 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Ginq: `LINQ to Object` inspired DSL for PHP
* Copyright 2013, Atsushi Kanehara <akanehara@gmail.com>
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* PHP Version 5.3 or later
*
* @author Atsushi Kanehara <akanehara@gmail.com>
* @copyrigh... | true |
e57c32e39d2b11b02af86882d4b94798fc50ea27 | PHP | alphagov/accessibility-monitoring | /phppgadmin/htdocs/sql.php | UTF-8 | 8,105 | 2.71875 | 3 | [
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
/**
* Process an arbitrary SQL query - tricky! The main problem is that
* unless we implement a full SQL parser, there's no way of knowing
* how many SQL statements have been strung together with semi-colons
* @param $_SESSION['sqlquery'] The SQL query string to execute
*
* $Id: sql.php,v 1.43 2008... | true |
088b5fef84cb660f5474b2ae0e0762c423afbafd | PHP | Pepps/uniculumn | /app/models/Project.php | UTF-8 | 637 | 2.78125 | 3 | [] | no_license | <?php
class Project extends Eloquent
{
/* A Project belongs to many user.
This functionality will be added later on most probably. */
public function users() {
return $this->belongsToMany('User', 'project_user', 'project_id', 'user_id');
}
/* A Project can belong to several categories.
A Project can be eith... | true |
3b94a32009cc02e4ba76a8c2096c715ced37f1db | PHP | andrescevp/chilldebug | /src/ChillDebug/Helper/Serializer.php | UTF-8 | 356 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: andres
* Date: 26/05/17
* Time: 22:01
*/
namespace ChillDebug\Helper;
class Serializer
{
public static function castToArray($object)
{
return (array) $object;
}
public static function castToJson($object)
{
return json_encode((array) $... | true |
b01ed429e1f8c819fba9005b2265af76c8c30d36 | PHP | leadstar116/php_api_call_class | /src/Caller.php | UTF-8 | 9,079 | 3 | 3 | [] | no_license | <?php
namespace App;
interface CallRequest
{
public function make($url, $request_method, $data = false);
public function root();
public function get();
public function where($key, $operator, $value);
public function sort($sort_by, $sort);
public function only($keys);
}
class Caller implements CallRequest
... | true |
38e53747229b70e395a5887c0dbcb3101e127719 | PHP | prosman/znframework | /System/Components/Captcha/CCaptcha.php | UTF-8 | 28,089 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/************************************************************/
/* CAPTCHA COMPONENT */
/************************************************************/
/*
Author: Ozan UYKUN
Site: http://www.zntr.net
Copyright 2012-2015 zntr.net - Tüm hakları saklıdır.
*/
namespace Captcha;
... | true |
0a71217f707f1aae749ba49fd28ce5d3ea04f26d | PHP | alina-projects/validate-package | /src/validate.php | UTF-8 | 2,386 | 2.96875 | 3 | [] | no_license | <?php
namespace Validate;
class Validate {
public function validateData ($dataJson) {
if(!is_null($dataJson)) {
$errors = [];
$isError = false;
$data = json_decode($dataJson, true);
if( 2 > strlen($data['firstname'])) {
$isError = true;
array_push($errors,'Va rugam sa introduceti un n... | true |
a0e2cbf128e7c3640939b01fc43d996a807f3e44 | PHP | joefearnley/usefulness | /src/Utilities/Utilities.php | UTF-8 | 800 | 3.421875 | 3 | [] | no_license | <?php
class Utilities
{
/**
* Default time format.
*
* @param String $date
* @return String
*/
public static function datetimeFormat($date)
{
$date = new DateTime($date);
return $date->format('Y/m/d H:i:s');
}
/**
* Format a datetime string with no... | true |
75021fe8ff0b095b81c50bac1819f78b619bc12a | PHP | Kieu-Trinh522/case_Module2 | /src/model/Order.php | UTF-8 | 1,725 | 3.171875 | 3 | [] | no_license | <?php
namespace App\model;
class Order
{
protected $id;
protected $student;
protected $borrowDate;
protected $returnDate;
protected $status;
/**
* Order constructor.
* @param $studentId
* @param $borrowDate
* @param $returnDate
*/
public function __construct($st... | true |
6a8e585885e1a8097588fe80a3e6a954e3cb59db | PHP | jazerix/sdu-mfa | /src/MFA.php | UTF-8 | 3,729 | 2.640625 | 3 | [] | no_license | <?php
namespace SDU\MFA;
use SDU\MFA\Azure\User;
use SDU\MFA\Exceptions\AlreadyInitializedException;
use SDU\MFA\Exceptions\NotInitializedException;
use SDU\MFA\Protection\Filter;
use SDU\MFA\Protection\Protection;
class MFA
{
/**
* @var MFA The MFA Instance
*/
private static $instance = null;
... | true |
b33da67dec97c706abda1e177fef878b2c39f01c | PHP | youweiqi/ymjs | /common/models/TaskRun.php | UTF-8 | 2,276 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: apple
* Date: 23/1/18
* Time: PM2:21
*/
namespace common\models;
use \common\components\Common;
use Yii;
class TaskRun
{
private $_client;
public function receive($ser, $fd, $fromId, $data)
{
}
public function task($ser,$taskId,$fromId,$data)
{... | true |
0e25bb91edecb6187bada5ead8ba2249d5bf3479 | PHP | Spatts/Web1 | /public_html/assign11.php | UTF-8 | 2,007 | 2.71875 | 3 | [] | no_license | <?php
$field1 = $_GET['first'];
$field2 = $_GET['last'];
$field3 = $_GET['address'];
$field4 = $_GET['phoneNumber'];
$field5 = $_GET['creditNumber'];
$field6 = $_GET['creditCard'];
$field7 = $_GET['month'];
$field8 = $_GET['year'];
$item1 = $_GET['Milk'];
$item2 = $_GET['Cookies'];
$... | true |
39026807612e2a967aa789488daadb6b6d1de08b | PHP | josmel/omni | /source/library/Store/Product.php | UTF-8 | 3,142 | 2.828125 | 3 | [] | no_license | <?php
class Store_Product {
protected $_id = null;
protected $_name = null;
protected $_description = null;
protected $_detail = null;
protected $_quantity = null;
protected $_price = null;
protected $_weight = null;
protected $_boxDescription = '';
protected $_urlPicture = '';
... | true |
f40b1645160ba64e00d2839b8139d4656a8abfec | PHP | LangeHenrik/SDU-ITI-F19 | /camkr16/mvc/app/services/AuthenticationService.php | UTF-8 | 770 | 2.890625 | 3 | [] | no_license | <?php
namespace services;
use core\Database;
use PDO;
class AuthenticationService extends Database {
public function authenticate($username, $password): bool {
$stmt = $this->conn->prepare("SELECT * FROM user WHERE username = :username");
$stmt->bindParam(":username", $username);
$stmt->e... | true |
b7d0b9366ec953eb0d134b9df0c82a686b93faee | PHP | RadoslavNikolov/SoftUni | /Semester_3(Advanced Level - Front End)/PHP_Basics/Exams/Exam_2015_May_03/_01_Kitodat_the_Miner/Kitodar.php | UTF-8 | 712 | 3.1875 | 3 | [] | no_license | <?php
$inputText = $_GET['data'];
$inputArr = preg_split("/\\s*,\\s*/",$inputText,-1, PREG_SPLIT_NO_EMPTY);
//var_dump($inputArr);
$output = [
'gold' => 0,
'silver' => 0,
'diamonds' => 0
];
foreach($inputArr as $line) {
preg_match_all("/mine\\s*(\\w+)\\s*(\\w+)\\s*(\\d+)/",trim($line),$matches);
if... | true |
6d489c1183d1f7ff60bfedff21ee3e668579a958 | PHP | XxRAZpienxX/Practice | /old/src/practice/commands/advanced/ReportCommand.php | UTF-8 | 4,548 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jkorn2324
* Date: 2019-05-03
* Time: 10:58
*/
namespace old\practice\commands\advanced;
use pocketmine\command\CommandSender;
use pocketmine\Player;
use pocketmine\Server;
use pocketmine\utils\TextFormat;
use old\practice\commands\BaseCommand;
use old\practice\commands\p... | true |
073b1da8f4914ccdff26e850e6039d236722f16e | PHP | colonelx/saitowtest | /src/app/Library/TiresDataSourceInterface.php | UTF-8 | 661 | 2.875 | 3 | [] | no_license | <?php
namespace Saitow\Library;
use Saitow\Model\Tire;
/**
* Interface TiresDataSourceInterface
* @package Saitow\Library
*/
interface TiresDataSourceInterface
{
/**
* Fetches all results that correspond to the searchTerm, if none is provided,
* then fetches all items from the DataSource
* @par... | true |
74b335d0cd687b833290d54d8de296252ce7be50 | PHP | mkuswari/ral-travel | /application/controllers/Category.php | UTF-8 | 2,597 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') or exit('No direct script access allowed');
class Category extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->model('Category_model');
$this->load->library('form_validation');
is_logged_in();
must_admin();
}
public function index()
{
... | true |
bc425030af6f722c91cc197b878b2ecbce85dc44 | PHP | devw/backbone-symfony | /src/HighFive/MainBundle/Form/EventListener/NameGuesserListener.php | UTF-8 | 913 | 2.609375 | 3 | [] | no_license | <?php
namespace HighFive\MainBundle\Form\EventListener;
use HighFive\MainBundle\Util\NameGuesserInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
/**
* Listener guessing the name from the email address.
*/
class N... | true |
075ecee6888b60980c09b69c190dcd4c3dea6946 | PHP | adibhanna/reviveString | /tests/SubStringsTest.php | UTF-8 | 1,021 | 2.953125 | 3 | [] | no_license | <?php
use App\Substring;
use PHPUnit\Framework\TestCase;
class SubStringsTest extends TestCase
{
/**
* @test
* @dataProvider strings
*/
function it_calculates_all_substrings_of_a_given_string($string, $expected)
{
$subString = new Substring;
$this->assertEquals(
... | true |
6b883cd43c547cc5f77e30df2278975ca475b15c | PHP | AK-SMART-BUSINESS/elearning | /app/.private/formation/add-formation.php | UTF-8 | 2,903 | 2.53125 | 3 | [] | no_license | <?php
header('Access-Control-Allow-Origin: *');
header('Content-type: application/json; charset:utf-8');
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
require dirn... | true |
ee3712e0bcde3b496e480f53f2ff297e48e89ed4 | PHP | born05/OpenWeatherMap-PHP-Api | /tests/ExampleCacheTest.php | UTF-8 | 1,931 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright Zikula Foundation 2014 - Zikula Application Framework
*
* This work is contributed to the Zikula Foundation under one or more
* Contributor Agreements and licensed to You under the following license:
*
* @license GNU/LGPv3 (or at your option any later version).
* @package OpenWeatherMap-PHP... | true |
d2c9686a9fec9c4a4e91b21f21117733e8c5610b | PHP | wmateam/payir | /src/PayIrTransaction.php | UTF-8 | 771 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* User: afkari
* Date: 7/17/17
* Time: 1:37 AM
*/
namespace wmateam\payIr;
class PayIrTransaction
{
protected $transactionID = null;
protected $gateway = null;
/**
* PayIrTransaction constructor.
* @param number|string $transactionID "Transaction ID"
* @param string $gateway "... | true |
cfc9881b77efceab43e736b7deb28d21adc30417 | PHP | shijianzsh/fenggubao | /Appcenter/V4/Model/CustomerServiceModel.class.php | UTF-8 | 2,851 | 2.671875 | 3 | [] | no_license | <?php
namespace V4\Model;
/**
* 客服平台模型
*/
class CustomerServiceModel extends BaseModel {
public $platform;
protected $platform_name;
protected $platform_config;
protected $target_id;
protected $current_id;
/**
* 构造函数
*
* @param int $current_id 当前用户ID
* @param int $target_id 目标用户ID
*/
public ... | true |
03b93bb5db8371a7987f4fc5f8852e20b4128cc4 | PHP | nealio82/php-cqrs-es | /src/AppBundle/EventSourcing/ComputerBookedForRepairProjector.php | UTF-8 | 632 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\EventSourcing;
use Acme\Computer\ComputerWasBookedForRepair;
use Acme\Repair\RepairJob;
use Doctrine\ORM\EntityManager;
class ComputerBookedForRepairProjector
{
/**
* @var EntityManager
*/
private $entityManager;
public function __construct(EntityManager $entityManag... | true |
770bda7be8020ea10c9afb220213df45720bff81 | PHP | linkorb/amplifier-prototype | /src/AbstractEventDispatcherProxy.php | UTF-8 | 1,765 | 2.609375 | 3 | [] | no_license | <?php
namespace Amplifier;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
abstract class AbstractEventDispatcherProxy implements EventDi... | true |
b8b2ee0f04c174471fe3bc167895a85e9a3b407f | PHP | bersace/strass | /include/Strass/Views/Helpers/TableEffectifs.php | UTF-8 | 2,322 | 2.53125 | 3 | [] | no_license | <?php
class Strass_View_Helper_TableEffectifs
{
protected $view;
public static $headers = array('accr' => '',
'prenom-nom' => 'Nom',
'adelec' => 'Adélec',
'fixe' => 'Fixe',
'portable' => 'Portable',
'adresse' => 'Adresse',
'naissance' => 'Naissance',
);
public function setView... | true |
a876441801366117038e33be331e2e77128aa2e1 | PHP | wesnick/infusionsoft | /src/Wesnick/Infusionsoft/Proxy/Referral.php | UTF-8 | 1,216 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Wesnick\Infusionsoft\Proxy;
use Wesnick\Infusionsoft\Remote\BaseObject;
/**
* class Referral
*/
class Referral extends BaseObject
{
/**
* Id
*
* @var int $Id
*/
public $Id;
/**
* Id
*
* @var int $ContactId
*/
public $ContactId;
/**
... | true |
7003e84b2e567bd47c857986b1e945178080c4c7 | PHP | digiom/woplucore | /src/Interfaces/SettingsInterface.php | UTF-8 | 970 | 2.96875 | 3 | [] | no_license | <?php namespace Digiom\Woplucore\Interfaces;
defined('ABSPATH') || exit;
use Digiom\Woplucore\Exceptions\Exception;
/**
* SettingsInterface
*
* @package Digiom\Woplucore\Interfaces
*/
interface SettingsInterface
{
/**
* Initializing
*
* @return void
* @throws Exception
*/
public function init();
/*... | true |
fb3fda45fab4d5805b74914485bf9cf33b967f66 | PHP | yohtanaka/biz_sys | /app/Http/Requests/Admin/UserRequest.php | UTF-8 | 1,924 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests\Admin;
use Illuminate\Foundation\Http\FormRequest;
use App\Models\User;
class UserRequest extends FormRequest
{
/**
* @return bool
*/
public function authorize()
{
return true;
}
/**
* @return array
*/
public function rules()
... | true |
01433e1f8c8446c41bec624145c17693811f7367 | PHP | Jefersonnnn/operand-is-cool-projects-2017 | /public/classes.php | UTF-8 | 1,704 | 3.671875 | 4 | [] | no_license | <?php
header('Content-Type: text/html; charset=utf-8');
//function comparar($num) {
//
// if($num > 10)
// return $num . ' é maior que 10';
//
// if ($num < 10)
// return $num . ' é menor que 10';
//
// return $num . ' é 10';
//}
//
//
//echo comparar(5);
class Usuario
{
protected $id;
... | true |
256bf33332d7b153a76b8e240a6d2c8f9a8701a7 | PHP | vldmr-k/oplayer3 | /app/Project/User.php | UTF-8 | 1,992 | 2.8125 | 3 | [] | no_license | <?php
namespace Project;
class User {
private static $storage = null;
private static $perms = array();
public static function get( $field = null ) {
$user = self::$storage;
if ( $user ) {
if ( $field ) {
$field = strtolower($field);
$data = $user->toArray();
$newdata = ar... | true |
1fa6a8565358b4af664fc4ab6777e44f9e52f532 | PHP | DirectoryTree/LdapRecord | /tests/Unit/Testing/LdapExpectationTest.php | UTF-8 | 3,318 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace LdapRecord\Tests\Unit\Testing;
use Exception;
use LdapRecord\LdapRecordException;
use LdapRecord\Testing\LdapExpectation;
use LdapRecord\Tests\TestCase;
use PHPUnit\Framework\Constraint\Constraint;
use PHPUnit\Framework\ExpectationFailedException;
class LdapExpectationTest extends TestCase
{
publ... | true |
2e535d35daff090d04a9035629581ea19767ee8b | PHP | KennyDaren/shortener | /app/Web/RedirectPresenter.php | UTF-8 | 626 | 2.6875 | 3 | [] | no_license | <?php
namespace Shortener\Web;
use Nette\Application\UI\Presenter;
use Shortener\Exception\RecordNotFoundException;
use Shortener\Facade\Link\LinkFacade;
/**
* Presenter for performing redirects
*
* @author Hynek Nerad <iam@kennydaren.me>
* @package Shortener\Web
*/
class RedirectPresenter extends Presenter
{
... | true |
d71af8513dcfd44ee0a649854d94b1cde8a52a25 | PHP | xsat/www.elevator.com | /app/interfaces/ApplicationInterface.php | UTF-8 | 204 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Interfaces;
/**
* Interface ApplicationInterface
* @package App\Interfaces
*/
interface ApplicationInterface
{
/**
* @return string
*/
public function main();
}
| true |
c4afb87a16ba62c43b82b1595a042caccfff2531 | PHP | dnburmistrov/HomeWork | /lessons9/theory/index.php | UTF-8 | 270 | 2.515625 | 3 | [] | no_license | <?php
use http\Client\Curl\User;
require_once "Users.php";
$counUsers = 0;
$user1 = new UsersTest('Den', 24,100);
$user2 = new UsersTest('Den', 24,100);
$user1->show();
echo '<br>';
$user2->show();
echo '<br>';
$user1-> year = 2000;
$user1-> month =12;
$user1->show(); | true |
bc9f5c69d7859897fb5edae05c1d416d4969e153 | PHP | mpaluchowski/wishlist-couple | /lib/Controller.php | UTF-8 | 686 | 2.609375 | 3 | [
"CC-BY-4.0"
] | permissive | <?php
namespace lib;
class Controller {
public function processAction() {
if (!isset($_REQUEST['action']))
die('No action, no reaction');
$actionFunction = 'action_' . $_REQUEST['action'];
if (method_exists($this, $actionFunction))
$this->$actionFunction($_REQUEST);
if (!$this->isAjax()) {
header(... | true |
ddce06e9d7cf7d5f3b1c890338dfbab1d94c8ebe | PHP | dimitriyremerov/fcore | /lib/FCore/Textline/Storage.php | UTF-8 | 1,455 | 2.65625 | 3 | [] | no_license | <?php
namespace FCore\Textline;
use FCore\Db\Mongo\Storage as MongoStorage;
use FCore\Textline;
class Storage extends MongoStorage
{
private $lang;
public function __construct($lang)
{
parent::__construct();
$this->lang = $lang;
$this->collectionName .= '_' . $lang;
}
private function loadByMapLang(array ... | true |
a34b22318d2f47d56d7130192008d2f1a8b2ba05 | PHP | pablososa/cqvweb | /app/Lib/Utils.php | UTF-8 | 942 | 3.234375 | 3 | [] | no_license | <?php
/* TOOLSET BOX */
class Utils {
public static function datetize($date) {
if(empty($date)) {
return '';
}
return date('d/m/Y', strtotime($date));
}
public static function datetimetize($date) {
if(empty($date)) {
return '';
}
re... | true |
95d9fc7890a948760683f44d23cbe7ee52068f40 | PHP | mrobles1693/master-php | /aprendiendo-php-poo/02-constructor/coche.php | UTF-8 | 2,063 | 3.78125 | 4 | [] | no_license | <?php
class Coche {
// Atributos o propiedades (Variables)
// PUBLIC:
// Se puede acceder a ellos desde cualquier lugar, dentro de la clase actual
// dentro de las clases que hereden esta clase o fuera de la clase
public $color;
public $velocidad;
public $caballaje;
public $... | true |
86f518fae3eae940646ca10b2e1fcb29d7b113e6 | PHP | yuitsubasapapa/yaf | /core/web/Session.php | UTF-8 | 949 | 2.96875 | 3 | [] | no_license | <?php
/**
* Session/Request/Cookie wrapper
* @author John Skrzypek
* @copyright
* @todo
*/
defined('DIRACCESS') or die('Cannot access this directly');
class Session
{
public function isValid($key){
return array_key_exists($key,$_SESSION);
}
public function __construct(){
if(!isset($_SESSION)){
if(h... | true |
9862d91b740032febc18b69ce5f974e6ca99c057 | PHP | zavh/spl | /app/Http/Presentations/TaxConfig.php | UTF-8 | 4,270 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Presentations;
use Carbon\Carbon;
class TaxConfig{
private $salary;
private $tax_config;
public $summary;
function __construct($ys, $tc){
$this->salary = $ys; //ys = yearly salary, object collection of individual months
$this->tax_config = $tc;
}
p... | true |
264930de5500d3b940fea5e02cb0893eeb8dcde2 | PHP | W17aya/Sistem_Informasi_Kampusku | /login.php | UTF-8 | 619 | 2.8125 | 3 | [] | no_license | <?php
//buat koneksi ke mysql dari file connection.php
include("connection.php");
//filter dengan mysqli_real_escape_string
$username=mysqli_real_escape_string($link,$username);
$password=mysqli_real_escape_string($link,$password);
//generate hashing
$password_sha1 = sha1($password);
//cek apakah username dan passwo... | true |
ee7cdfe2fdacc0d75929b2e49e60de8b57a0c709 | PHP | codewarrior-007/idcgamer | /app/Console/Commands/GenerateKey.php | UTF-8 | 921 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class GenerateKey extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'gamer:generate-key';
/**
* The console command description.
*
* @va... | true |
cdea087a1c1effb2edc7cd56299e42dbe3464522 | PHP | scottstuff/GCProtractorJS | /src/GotChosen/SiteBundle/Entity/ScholarshipEntry.php | UTF-8 | 4,260 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace GotChosen\SiteBundle\Entity;
use Doctrine\Common\Cache\ArrayCache;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* ScholarshipEntry
*
* @ORM\Table(name="Entries", uniqueConstraints={
* @ORM\UniqueConstraint(name="UniqueIndexStoU", columns={"idScholarsh... | true |
54939fc1037a42695bf0bc280092ce8799bd0973 | PHP | DavideSadotti/001-hotel | /database/seeds/GuestsSeederTable.php | UTF-8 | 513 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
use App\Guest;
use Illuminate\Support\Str;
use Illuminate\Database\Seeder;
use Faker\Generator as Faker;
class GuestsSeederTable extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run(Faker $faker)
{
for($i = 0; $i < 20; $i++){
... | true |
9f291ff0e812e429c2d5e85b08eab43833984ebc | PHP | ZacMillionaire/mage | /pages/dashboard/models/news/newsListModel.php | UTF-8 | 623 | 2.515625 | 3 | [] | no_license | <?php
class NewsListModel extends Dashboard {
protected static $db;
public function __construct(){
self::$db = Dashboard::$sys->DatabaseSystem();
$actions = Dashboard::ParseAction();
@$actions[1] = (!isset($actions[1])) ? 0 : $actions[1];
self::GetNewsList($actions[1]);
}
public function GetNewsList... | true |
d67ecd60c2af0103d18b153a6e9cc27dc9d387b2 | PHP | danielholmes/battle-for-hill-218 | /src/TheBattleForHill218/Functional/partition_to_lists.php | UTF-8 | 342 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace TheBattleForHill218\Functional;
use Functional as F;
/**
* @param \Traversable|array $collection
* @param callable $callback
* @return array
*/
function partition_to_lists($collection, $callback)
{
return F\map(F\partition($collection, $callback), function ($array) {
return array_valu... | true |
3667bf0ae20d3fe7a0a058668284d0ef36b6a191 | PHP | proteichik/lifestyle | /app/Repositories/ModelRepository.php | UTF-8 | 2,002 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Contracts\ObjectRepository;
use Illuminate\Database\Eloquent\Model;
use Kyslik\ColumnSortable\Sortable;
class ModelRepository implements ObjectRepository
{
/**
* @var Model
*/
protected $model;
/**
* ModelRepository constructor.
* @param Mode... | true |
e67adcee569f5a740f1b042c901baa268021ff44 | PHP | Zawatsuka/P8-php | /Exo4/page2.php | UTF-8 | 455 | 2.828125 | 3 | [] | no_license | <?php
$login = $_GET['login'];
$pass = $_GET['password'];
setcookie('user' , $login , time()+36000);
setcookie('pass' , $pass , time()+36000);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pag... | true |
ee0865c79bb4a3b01c1e22bdf388c5b97937616b | PHP | adonaicruz/stackapi | /persist.php | UTF-8 | 1,486 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
header('Content-Type: application/json; charset=utf-8');
$url = "https://api.stackexchange.com/2.2/questions?order=desc&sort=creation&pagesize=99&tagged=PHP&site=stackoverflow";
try {
//GET StackOverflow API Data
$content = @file_get_contents($url);
$content = gzdecode($content);
if ($conten... | true |
5e0c137672d0aa092e798f8608ee41dd06f691b7 | PHP | weicong-5/new | /school/common/ykocomposer/components/client.php | UTF-8 | 1,454 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @Copyright Copyright (c) 2016 @client.php By Kami
* @License http://www.yuzhai.tv/
*/
namespace common\ykocomposer\components;
use SoapClient;
use SoapFault;
use yii\base\Component;
use yii\base\InvalidConfigException;
/**
* The SOAP Client class.
*
* Note, PHP SOAP extension is required.
*
* @au... | true |
a7fe5908f7b6dffcb8dfbd0a270b781ab7423fad | PHP | xiaoxiangzaoji/huibu | /admin/php/uploadclass.php | UTF-8 | 2,537 | 2.578125 | 3 | [] | no_license | <?php
//添加图片到数据库
require("./index2.php");
header("content-type:text/html;charset=utf-8");
$uploaddir = "../html/temp/upload/";//设置文件保存目录 注意包含/
$type=array("jpg","gif","bmp","jpeg","png");//设置允许上传文件的类型
$file = $_FILES['file'];//得到传输的数据
//获取文件后缀名函数
function fileext($filename)
{
return substr(strrchr($filename, '.'), 1);... | true |
9ba128ba6d3c15795d10505f20a34d40b580fe80 | PHP | jer-lim/Stonksim | /src/Interfaces/Indicator.php | UTF-8 | 366 | 3.03125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Jerlim\Stonksim\Interfaces;
use Jerlim\Stonksim\OrderTime;
interface Indicator
{
/**
* Get the value of the indicator at a given interval number
* @param int $intervalNum
* @param OrderTime $orderTime
* @return float
*/
public function get(int... | true |
1be7de56d63664db484a332a0d2a5600d8b2ea83 | PHP | tomtam/swoole-thinkphp5 | /application/common/lib/Task.php | UTF-8 | 1,264 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: chen
* Date: 18-9-26
* Time: 下午4:34
*/
namespace app\common\lib;
/** 任务助手类 用来同意分发执行不同的任务 */
use app\common\lib\ali\Sms;
class Task{
public function smsSend($server,$data){
try{
$response = Sms::send($data['phone_num'],$data['code']);
}cat... | true |
e4a0c6884e5b6060caba07f3d21a4f6c9263732d | PHP | kuollivo64/CRUD-PHP-JS-AJAX-MYSQL | /programas/clientes.php | UTF-8 | 1,310 | 3.0625 | 3 | [] | no_license | <?php
include('personas.php');
class Cliente extends Personas
{
protected $idCliente;
protected $razonSocial;
protected $nit;
protected $telefono;
protected $direccion;
function __construct($vIdC,$vRas,$vNit,$vTel,$vDir,$vCi,$vNom,$vPat,$vMat,$vSex,$vFecN){
parent::__construct($vCi,... | true |
b5d023ba8c2721b47a8ffa497f83fd09167d2264 | PHP | nnamnguyen/dotb_ims_new | /modules/DynamicFields/templates/Fields/TemplateDecimal.php | UTF-8 | 459 | 2.515625 | 3 | [] | no_license | <?php
class TemplateDecimal extends TemplateFloat{
var $type = 'decimal';
var $default = null;
var $default_value = null;
public function __construct()
{
parent::__construct();
}
function get_db_type()
{
if(empty($this->len)) {
return parent::get_db_type();
}
$precision = (!empty($th... | true |
d3783ceb520a514f172e9a98f5efa85b1dbef915 | PHP | longnt203/kfxt | /Front/Lib/Util/BTOInterface.class.php | UTF-8 | 2,197 | 2.625 | 3 | [] | no_license | <?php
/**
* 商业大亨接口
* @author php-朱磊
*
*/
class BTOInterface {
/**
* Util_Httpdown
* @var Util_Httpdown
*/
private $_httpdown;
private $_key='kelvin818';//key
private $_sendUrl=null;
private $_sendPage='api_interface.php';//发送页面
public function __construct(){
import('@.Util.... | true |
2ac8521638f79ff563f3d0ea02150948811b91b5 | PHP | fmaksim/php-algorithms | /sort/mergeSort.php | UTF-8 | 1,022 | 3.546875 | 4 | [] | no_license | <?php
function merge(array $left, array $right): array
{
$result = [];
while (count($left) > 0 && count($right) > 0) {
if ($left[0] > $right[0]) {
array_push($result, $right[0]);
$right = array_slice($right, 1);
} else {
array_push($result, $left[0]);
... | true |
7f84e2616049a4f4c1651b3914a4c971736ef7a7 | PHP | sjardon/anima | /App/Models/Share/Route/Parameter.php | UTF-8 | 808 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Models\Share\Route;
class Parameter{
protected $name;
protected $value;
protected $validations;
public function __construct($name=false,$value=false,$validations=false){
$this->name = $name;
$this->value = $value;
$this->validations = $validations;
... | true |
d97e276a828816357862acab9eb471a756115581 | PHP | fouv/POO-trial | /src/Desktop.php | UTF-8 | 675 | 3.171875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: florence
* Date: 09/05/17
* Time: 11:46
*/
namespace wcs;
class Desktop extends Computer implements DeskotInterface
{
private $boxType;
public function __construct($proc, $memory)
{
parent::__construct($proc, $memory);
}
public function di... | true |
0dfe1959d4a8417faf859a238a82f29c5ca5db71 | PHP | atemengue/phpGraph | /cli/test.php | UTF-8 | 338 | 2.828125 | 3 | [] | no_license | <?php
require dirname(__DIR__) . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'Creneau.php';
require dirname(__DIR__) . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'Form.php';
$creneau = new Creneau(9, 12);
$creneau2 = new Creneau(10, 16);
var_dump($creneau->intersect($creneau2));
echo $... | true |
530abecc6b34d56e60b219941918bb581894c1a0 | PHP | TimeToogo/Pinq | /Tests/Integration/DataTest.php | UTF-8 | 5,194 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Pinq\Tests\Integration;
abstract class DataTest extends \Pinq\Tests\PinqTestCase
{
private $implementationCounter = 0;
abstract protected function implementationsFor(array $data);
final protected function getImplementations(array $data)
{
$implementations = [];
forea... | true |
ac3dc52b2687977f42cd5a05ed53aa6d2a1f23de | PHP | webcluesinfo/code-gists | /API + Services/Import/Validation/ValidStudentData.php | UTF-8 | 8,465 | 2.671875 | 3 | [] | no_license | <?php
namespace App\import\Validation;
use App\Masters\Type;
use App\Import\ImportRepeatedDataTrait;
class ValidStudentData
{
use ImportRepeatedDataTrait;
public function StudentData($students)
{
$errors = [];
$success = [];
$grades = $this->standardGrades();
$sessions = ... | true |
36b0ddd5eda865407d47f09b5858d64706922135 | PHP | KSouthwood/HTML-PHP-Stuff | /CS50_Finance_2014/public/quote.php | UTF-8 | 841 | 2.90625 | 3 | [] | no_license | <?php
// configuration
require("../includes/config.php");
// if form was submitted
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
// Check if a stock symbol was entered.
if ($_POST["symbol"] == "")
{
apologize("Please enter a stock symbol.");
}
... | true |
8f6f769c92de6d2a11abca97fee3b3428a724641 | PHP | majidYousefi/-0_O_- | /laravel/app/library/element.php | UTF-8 | 2,798 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\library;
use DB;
/*
* 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 editor
*
* @author HP TMP253
*/
class element {
//put your code ... | true |
9c1373020e1ec280ce94659e34209824d5934e5b | PHP | arpitjain1989/pms | /fetch_compensationdata.php | UTF-8 | 2,349 | 2.75 | 3 | [] | no_license | <?php
include('common.php');
include_once('includes/class.attendance.php');
$objAttendance = new attendance();
$arrResult = array("exceedondate"=>"-", "exceedfortime"=>"-", "compensationtime"=>"-", "fromH"=>"-", "fromM"=>"-", "fromAMPM"=>"-", "toH"=>"-", "toM"=>"-", "toAMPM"=>"-");
/* Set default compensa... | true |
534af5f26e076c3f3bc3421313609bd661a14d82 | PHP | stromknight/printTicket | /printer.class.php | UTF-8 | 8,137 | 2.625 | 3 | [] | no_license | <?php
require 'IMGGenerator.php';
class Printer
{
const WIDTH = 700;//打印纸宽度
const HEIGHT = 350;//打印纸高度
const FONT_SIZE = 90;//字体大小(字体高度)
const RATIO = 0.5;//字体宽高比22.5
const OFFSET = -20;//左侧偏移量
const PRINTER_NAME = 'Godex 500';//打印机名称
const OTHER_FONT_SIZE_RATIO = 0.325;//除姓名外的公司与职位的字体高度比例
public $name = '';
... | true |
08a18d28b607fd57ad87824e693fac73147b2a70 | PHP | DarkGeekMS/match-reservation-website | /app/Http/Controllers/CustomerController.php | UTF-8 | 14,700 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\User;
use App\Models\Reservation;
use App\Models\Match;
use App\Models\Stadiums;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use JWTAuth;
use Illuminate\Validation\Rule;
u... | true |
04e74a44c0a1cf3c94f2a5ba7235612b27a5634a | PHP | cmd0315/jobfair-onlinev3 | /content/table-search-applicants.php | UTF-8 | 4,518 | 2.59375 | 3 | [] | no_license | <?php
include './includes/functions.php';
include './includes/db.php';
//extract variables in link
extract($_GET);
$content = "";
$jobPosition = getJobPost($jobPostCode, "job-pos");
$jobPosition = getJobPost($jobPostCode, "job-pos-name");
$applicantsQuery = "SELECT employee.username FROM employee INNER JOIN account ... | true |
165298210a12c82495701e9912b45f59d795c8c9 | PHP | kokiso/portal | /escutaPorta/sendsuntechCmd.php | UTF-8 | 1,385 | 2.84375 | 3 | [] | no_license | <?php
$continua = true;
if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false) {
$continua=false;
echo "socket_create() falhou: razao: " . socket_strerror(socket_last_error()) . "\n";
};
if (socket_bind($sock, $address, $port) === false) {
$continua=false;
echo "socket_bind(... | true |
430740374b2e9dd0a73c5e7fdcbbd32f730880aa | PHP | shirotaypit/redbluedragons | /dragongs/test.php | UTF-8 | 12,810 | 3.046875 | 3 | [] | no_license | <?php
$WaitTime = 1; // タイマー値(秒)
#------------------------------------
# 初期処理
#------------------------------------
// Initial connect database
syslog(LOG_INFO,"Initial connect database");
try {
$pdo = new PDO("mysql:host=localhost;dbname=awdb;charset=utf8","root","", [PDO::... | true |