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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
749d5492904996406ba9fea6284dea590143654f | PHP | SemPatent/JimohSadeeq | /wwwpractical/addbadaction.php | UTF-8 | 2,470 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Sadeeq
* Date: 5/24/14
* Time: 5:56 PM
*/
$sqlhost="127.0.0.1"; // Host name
$sqlusername="root"; // Mysql username
$sqlpassword=""; // Mysql password
$db_name="test"; // Database name
$tbl_name="bad"; // Table name
$conn = mysql_connect("$sqlhost", "$sqlusername", "$sqlpa... | true |
0d8e9d5ca4af35b982add9e06218fdcb71cb00ec | PHP | BCleverly/backend | /src/Actions/File/ShowDirectory.php | UTF-8 | 837 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace BCleverly\Backend\Actions\File;
use Illuminate\Contracts\Filesystem\Factory as Filesystem;
use Lorisleiva\Actions\Concerns\AsAction;
class ShowDirectory
{
use AsAction;
private \Illuminate\Contracts\Filesystem\Filesystem $storage;
public function __construct(Filesystem $storage)
{
... | true |
94a89e164a247db5093515180ba9df40104f6f69 | PHP | khanhvan1999/khanhvan.github.io | /Chuong02/05-array.php | UTF-8 | 1,481 | 3.4375 | 3 | [] | no_license | <?php
$courses = array("PHP", "Joomla", "Python", "Java", "C#", "JQuery", "PHP");
echo "<pre>";
print_r($courses);
echo "</pre>";
$newArr = array_unique($courses);
echo "<pre>";
print_r($newArr);
echo "</pre>";
//xóa
unset($courses[1], $courses[2]);
echo "<pre>... | true |
1d5e2ced8ac893f1c6d7c260adb2cd21bab53566 | PHP | gvard/gvard.github.io | /php/action.php | UTF-8 | 1,670 | 3.078125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>PHP response</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h2>Пример обработки форм, метод POST<... | true |
994ba0716fbef990c29120011f6ee22696a64a7d | PHP | concretecms/concretecms | /concrete/src/Board/Designer/Command/AddDesignerSlotToBoardCommand.php | UTF-8 | 2,216 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Concrete\Core\Board\Designer\Command;
use Concrete\Core\Board\Command\BoardSlotCommand;
use Concrete\Core\Entity\User\User;
class AddDesignerSlotToBoardCommand extends BoardSlotCommand
{
/**
* @var string
*/
protected $batchIdentifier;
/**
* @var string
*/
protec... | true |
d034ec8460d58ce36a27eb29b3c4e8aaff41dfde | PHP | borislavtotev/ConferenceScheduler | /FrameworkCore/UserRoles.php | UTF-8 | 1,075 | 2.796875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace SoftUni\FrameworkCore;
use SoftUni\Config;
class UserRoles
{
public static function getAllRoles()
{
if (self::checkUserRoleFile()) {
return array_keys(Config\UserConfig::Roles);
}
throw new \Exception("Undefined user... | true |
a865da5d478b6f35593ffac141c81197d189304c | PHP | AhmedSaidAsmail/souvenir-shamr | /app/src/sync-hasmany/SyncBuilder.php | UTF-8 | 1,807 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Sync\HasMany;
class SyncBuilder implements SyncInterface
{
/**
* @var Sync $wrapper
*/
private $wrapper;
/**
* SyncBuilder constructor.
* @param Sync $wrapper
*/
public function __construct(Sync $wrapper)
{
$this->wrapper = $wrapper;
}
/*... | true |
d6075143d14e5babde363824a5b611824d07e858 | PHP | dbarmperis/Digital-Systems-Interfaces | /codes/submitdata.php | UTF-8 | 1,086 | 3.09375 | 3 | [] | no_license | <?php
// Checks if the variables exist and then
// creates php code in the file data.php that stores the current values of the variables
// but also the last time they were triggered (set to 1)
if(isset($_GET['temp'],$_GET['door'],$_GET['motion'],$_GET['smoke'])) {
if(file_exists('data.php')){
include 'data.php'... | true |
80fbe867d9e9e71ce76ce1836e6239d0d66304ec | PHP | zack965/to_do_list_web_app_project | /Project/to_do_list_web_app_project/home/missionPage/Profile/x.php | UTF-8 | 2,222 | 2.734375 | 3 | [] | no_license | <?php
include "../../../connect.php";
session_start();
//$idd = $row5["user_id"];
$xidd = $_SESSION['uid'];
//echo $xidd;
//echo $xidd;
//echo "hhhhhhhhhhh";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My P... | true |
e851a4e047f05b794508be62cdabafce876600d9 | PHP | sexyboys/Kraken | /src/Kraken/Exceptions/ServiceDisableException.php | UTF-8 | 489 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Kraken\Exceptions;
/**
* Class ServiceDisableException
* @package Kraken\Exceptions
* @author Eric Pidoux
* @version 1.0
*/
class ServiceDisableException extends \Exception {
public function __construct($message=null, $code = 1, \Exception $previous = null) {
parent::__construct("T... | true |
1768e9087134a7ba07717f6c9a303cb0cbba598f | PHP | Bipasha88/laravel-migration | /database/factories/ProductFactory.php | UTF-8 | 1,606 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Factories;
use App\Models\Product;
use Illuminate\Database\Eloquent\Factories\Factory;
class ProductFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Product::class;
/**
* Define the mode... | true |
05264a64d1b6c5dac35d250fc3c296538c30bff8 | PHP | mykytadenysenkov/trading_signal_service | /Config.php | UTF-8 | 277 | 2.96875 | 3 | [] | no_license | <?php
class Config {
private static $config = [];
public static function get($name) {
return isset(Config::$config[$name]) ? Config::$config[$name] : null;
}
public static function set($name, $value) {
Config::$config[$name] = $value;
}
} | true |
eacfe1bffcde19b9073ceb2a1af26cc0cf400394 | PHP | diegosposito/alcec | /lib/form/doctrine/BuscarBajasForm.class.php | UTF-8 | 1,529 | 2.59375 | 3 | [] | no_license | <?php
class BuscarBajasForm extends sfForm
{
public function configure()
{
$sedes = Doctrine_Core::getTable('Sedes')->findAll();
$arregloSedes[0] = "----TODOS----";
foreach($sedes as $sede){
$arregloSedes[$sede->getIdsede()] = $sede->getNombre();
}
asort($arregloSedes);
$facultades = Doctrine_Core::ge... | true |
4e33422848e6545dd6cacb563f6b9f0deae61cd7 | PHP | Plutarch87/skloniste-final | /php/email.php | UTF-8 | 2,279 | 2.625 | 3 | [] | no_license | <?php
if(isset($_POST['email'])) {
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "info@kulturno-skloniste.com";
$email_subject = "Kulturno Skloniste - Nova Poruka";
function died($error) {
// your error code can go here
echo "... | true |
9f6d2818907e5e2c31b755bc5d19c90434620b6f | PHP | mohsalman-smk/mohsalman-smk.github.io | /application/models/public/M_alumni.php | UTF-8 | 1,463 | 2.609375 | 3 | [] | no_license | <?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* SMK Nurul Jadid
* @version v4.6.2
* @author Moh salman| https://instagram.com/mohsalman | mohsalman@gmail.com
* @copyright (c) 2021-2022
* @link http://smknj.sch.id
* @since Version v4.6.2
*/
class M_alumni extends ... | true |
d7ae743396f754c7f5ddf8382aae044bc1d28805 | PHP | mahydit/GlassShop | /Model/ResponseHandler.php | UTF-8 | 5,280 | 3.0625 | 3 | [] | no_license | <?php
class ResponseHandler {
private $db; //an object from MYSQLHandler class
private $logger; //logger object to log response if needed (bonus)
//$db : an object from MYSQLHandler class
public function __construct($db,$logger=null) {
$this->db = $db;
// $this->logger = $logger;
}
//... | true |
4445b6b37053181ef19a636cc087a9b2a61fb5b2 | PHP | polandj/securetomato | /release/src/router/php/ext/sqlite/tests/sqlite_last_error_basic.phpt | UTF-8 | 1,360 | 3.015625 | 3 | [
"BSD-3-Clause",
"BSD-4-Clause-UC",
"Zlib",
"ISC",
"LicenseRef-scancode-other-permissive",
"TCL",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"JSON",
"LicenseRef-scancode-pcre",
"blessing",
"PHP-3.01"
] | permissive | --TEST--
Test sqlite_last_error() function : basic functionality
--SKIPIF--
<?php if (!extension_loaded("sqlite")) print "skip sqlite extension not loaded"; ?>
--FILE--
<?php
/* Prototype : int sqlite_last_error(resource db)
* Description: Returns the error code of the last error for a database.
* Source code: ext... | true |
f6035265836f5c882091752730e96ed44efe254c | PHP | infohojin/daelim_db_2020 | /201930429/class/class01.php | UTF-8 | 623 | 4.21875 | 4 | [] | no_license | <?php
// 함수들의 집합체, 꾸러미
// 클래스
class message {
// 변수
// 프로퍼티
protected $name;
// 인사말출력 함수
function hello($name) {
echo $name;
}
// 학번 출력 함수
// 메서드(method)
private function daelim($num) {
echo $num;
}
... | true |
6920e0ac07d8c3caa6e53c0942115cc832a5eb7c | PHP | Merkeleon/laravel-log | /src/LogRepository.php | UTF-8 | 5,934 | 2.65625 | 3 | [] | no_license | <?php
namespace Merkeleon\Log;
use Merkeleon\Log\Drivers\ElasticSearchLogDriver;
use Merkeleon\Log\Drivers\LogDriver;
use Merkeleon\Log\Drivers\MysqlLogDriver;
use Merkeleon\Log\Exceptions\LogException;
use Merkeleon\Log\Model\Log;
use Illuminate\Support\Arr;
class LogRepository
{
/** @var LogDriver */
prote... | true |
eac793d1e8413c6927f4577b72a6810b7b472060 | PHP | seguyot/Minichat- | /Config/store.php | UTF-8 | 275 | 2.578125 | 3 | [] | no_license | // Insertion du message à l'aide d'une requête préparée
$req = $bdd->prepare('INSERT INTO minichat (pseudo, message) VALUES(?, ?)');
$req->execute(array($_POST['pseudo'], $_POST['message']));
// Puis rediriger vers minichat.php comme ceci :
header('Location: index.php'); | true |
bd95c41456dbc2023d67e21777a69e4eefe69b4d | PHP | sergey-gagarin/test02 | /04_testPHP_new/08_AspectOP_SATURDAY_READY/sample_debug.php | UTF-8 | 1,910 | 3.046875 | 3 | [] | no_license | <?PHP
/*
Sample of debug logging cross-cutting concern decomposition
*/
include("aop.lib.php");
$aspect1 = new Aspect();
$pc1 = $aspect1->pointcut("call Sample::Sample or call Sample::Sample2 or call Sample::Sample3 or call Sample4::Sample4");
$pc1->_before("\SystemFunc::addLog(&\$obj, &\$AspectObj, \$backtrace);")... | true |
6d9b315b876fad7534687f4dd21ba5dfe43517ce | PHP | ahmedsabrysarhan/native_php_ecommerce | /dashboard/index.php | UTF-8 | 1,686 | 2.6875 | 3 | [] | no_license | <?php
ob_start();
session_start();
$noNavbar = '';
$title = 'Login Page';
if(isset($_SESSION['Admin'])){
header('location:dashboard.php');
}
include "init.php";
// check if User coming from POST method
if($_SERVER['REQUEST_METHOD'] == "POST" ){
$username = $_POST['... | true |
08e5694e8cf0b7d192e958776008796d08233172 | PHP | Arasaac/dockerizePHPApp | /php/inc/herramientas/classes/flash/class.flashslideshow.php | UTF-8 | 4,675 | 3.40625 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHP Flash Slide Show
*
* Create simple flash slideshow from sequences of JPEG images
* Requirement:
* You MUST have PHP with Ming installed as PHP Extension
* see http://ming.sourceforge.net and http://php.net/manual/en/ref.ming.php
* Ask your web server administrator if you don't know how to instal... | true |
ccf135521e72b5c9b759c4a24c8e2587e20e4d1b | PHP | ahmed-abdullah9/huurr | /vendor/djb/confer/src/Conversation.php | UTF-8 | 2,864 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace DJB\Confer;
use Illuminate\Database\Eloquent\Model;
class Conversation extends Model {
protected $fillable = ['name', 'is_private'];
protected $table = 'confer_conversations';
protected $guarded = ['id'];
// Relationships
/**
* Get the participants of the conversation
*
* @return bel... | true |
3e2338ec7b05427a5e8373f3c072acdf1785871c | PHP | leo108/crop_wechat | /src/CorpWeChat/Response/JsonResponse.php | UTF-8 | 2,242 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: chenyihong
* Date: 16/8/9
* Time: 10:58
*/
namespace Leo108\CorpWeChat\Response;
use Leo108\CorpWeChat\Exceptions\UnexpectedResponseException;
use Leo108\CorpWeChat\Exceptions\ApiException;
/**
* 格式为JSON字符串的响应
* Class JsonResponse
*
* @package Leo108\CorpWeChat\Respo... | true |
59011447f4b0ef105891e2494f1ad546d3c2b31a | PHP | pengyuanhong/php-helper | /src/Functions/Functions.php | UTF-8 | 29,422 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Kyle
* Date: 2020/6/2
* Time: 12:18 PM
*/
namespace PhpHelper\Functions;
class Functions
{
/**
* 过滤掉emoji表情符号(遍历并检查字符串中的每个字符,如果该字符的长度大于等于4个字节,就将其删除)
* @param $str
* @return mixed
* @date 2017-04-25 11:43
*/
public static function filterEmoji($str)
{
$str =... | true |
76972ad0c3be0f5e2b9734743f11e0358af135b2 | PHP | ClintWinter/portfolio | /app/Http/Controllers/Admin/PostController.php | UTF-8 | 2,376 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use App\Models\Post;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Validation\Rule;
use App\Http\Controllers\Controller;
class PostController extends Controller
{
/**
* Display a listing of posts.
*
* @return \Illuminate\Contrac... | true |
cc3fc08d981db2f5af6aa3a1e7dc25001ffd6856 | PHP | andersonshatch/twit-db | /lib/IDQueryBuilder.php | UTF-8 | 666 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
require_once dirname(__FILE__).'/QueryUtils.php';
class IDQueryBuilder {
/**
* Build query for looking up tweets by ID
* @param array $array either array with key "ids" => csv_list_of_IDs or array of IDs
* @return array query string with parameter placeholders and query parameters for binding
*/
stat... | true |
986aeee6041d6363456eb38a7547e953a177cdbe | PHP | holgerk/php-mike | /test/TaskLoaderTest.php | UTF-8 | 2,038 | 2.578125 | 3 | [] | no_license | <?php
require_once __DIR__ . '/util/BaseTestCase.php';
class TaskLoaderTest extends BaseTestCase {
public function setUp() {
$container = new Mike\DependencyContainer;
$this->loader = $container->getDependencies()->taskLoader;
$this->file = __DIR__ . '/fixtures/dir1/Mikefile';
}
... | true |
69ba9d17385e8b656a3b54d5a46eabe2389c415e | PHP | igorbarato/localizapet | /module/WebService/src/Soap/Servicos.php | UTF-8 | 3,341 | 2.921875 | 3 | [] | no_license | <?php
namespace WebService\Soap;
use WebService\Database\Database;
/**
* @param string $login
* @param string $senha
* @return array
*/
function login($login, $senha){
$db = new Database();
$db->start();
$query = 'SELECT * FROM usuario WHERE login =... | true |
dc33dc19ceec13a7072307fef0b518803e8a3008 | PHP | waynehazleguidance/benefit | /vendor/guidance/tests_base/src/Lib/Curl/Message/Location/Factory.php | UTF-8 | 2,674 | 2.6875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Guidance\Tests\Base\Lib\Curl\Message\Location;
class Factory
{
use \Guidance\Tests\Base\Object\FactoryTrait;
// ########################################
public function create(
string $scheme,
string $host,
int $port,
string $path... | true |
b4c65e696e0cc6424b5f7d1d832d24453259d890 | PHP | swathigramini/demoproject | /userdetails.php | UTF-8 | 418 | 2.59375 | 3 | [] | no_license | <?php
$conn = new mysqli('localhost','root','','test');
if($conn->connect->error){
die('connectionfailed': .$conn->connect->error);
}else{
$sql = "SELECT email from register";
$result = $conn-> query($sql)
if($result->num_rows > 0){
while($row = $result-> fetch_assoc()){
echo "<tr><... | true |
154d71d24b6d5ed73a1aa90b5658681e52b67a92 | PHP | NgocSon15/AmelaProject2 | /app/Services/Impl/CarService.php | UTF-8 | 1,831 | 2.984375 | 3 | [] | no_license | <?php
namespace App\Services\Impl;
use App\Repositories\CarRepositoryImpl;
use App\Services\CarServiceImpl;
class CarService implements CarServiceImpl
{
protected $carRepository;
public function __construct(CarRepositoryImpl $carRepository)
{
$this->carRepository = $carRepository;
}
pub... | true |
ef6599b7ebababf8b3df545c816ae89847575f2d | PHP | fullstack82/Master-php-7 | /poo/constructores/index.php | UTF-8 | 541 | 2.71875 | 3 | [] | no_license | <?php
require_once 'coche.php';
$coche = new Coche("rojo", "ferrari", "murcielago", 150, 200, 2);
echo "<br/>";
$coche1 = new Coche("verde", "alpha", "romeo", 179, 200, 4);
echo "<br/>";
$coche2 = new Coche("rosa", "renault", "clio", 130, 150, 5);
echo "<br/>";
$coche3 = new Coche("amarillo", "ferrari", "X63", 180, 20... | true |
7cecc5ce5b2ea2f076a98ed567b3464435927c12 | PHP | tbanj/php_refresh | /webpractice/first.php | UTF-8 | 931 | 2.84375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>First Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css">
<script src="main.js"><... | true |
b2aa6530991b4af2b295cb392a7bbf8a3a1009fb | PHP | jakaura/civicracy | /civi-php/protected/models/ContactEmail.php | UTF-8 | 1,477 | 2.625 | 3 | [] | no_license | <?php
/**
*
* @author jakob
*
*/
class ContactEmail extends CFormModel
{
public $email_adds;
public $email_text;
public $email_topic;
public $email_adds_arr;
public $sent;
/**
* Declares the validation rules.
*/
public function rules()
{
return array(
array('email_adds, email_text, email_topic',... | true |
43db3c57d3afb150981f86e3749cc40ba062ce75 | PHP | muttavarapu/GroupMailProj | /includes/global.php | UTF-8 | 1,320 | 2.578125 | 3 | [] | no_license | <?php session_start();
include_once("connection.php");
//check if session is set
if(isset($_SESSION['username'])){
$session_username=$_SESSION['username'];
$session_pass=$_SESSION['pass'];
$session_id=$_SESSION['id'];
//check member data
$query="SELECT * FROM doctors WHERE id='$session_id' AND passw... | true |
16814d79bce82a7f52987584eb68c00440903b7d | PHP | PacktPublishing/Web-Security-Common-Vulnerabilities-And-Their-Mitigation | /SecurityCode/Example2-XSS-addComment.php | UTF-8 | 1,926 | 2.96875 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>XSS - Start a discussion with your trusted site!</title>
</head>
<body style="font-family: sans-serif;">
<?php
function getDatabaseConnection() {
$servername = "localhost";
$username = "janani";
$password = "password";
$dbN... | true |
93a1a4413a09be019ccea2203a6b227c3c8b3194 | PHP | sakamata/happy2 | /models/FollowRepository.php | UTF-8 | 898 | 2.765625 | 3 | [] | no_license | <?php
class FollowRepository extends DbRepository
{
public function following($usNo, $followingNo)
{
$sql = "INSERT INTO tbfollow(usNo, followingNo) VALUES(:usNo, :followingNo)";
$stmt = $this->execute($sql, array(
':usNo' => $usNo,
':followingNo' => $followingNo,
));
}
public function CheckFollowing... | true |
2ab2e30eb55adf20865434d5129647e2442b5da4 | PHP | Mohagames205/Tazer | /src/mohagames/Tazer/tasks/PlayerFreezeTask.php | UTF-8 | 691 | 2.75 | 3 | [] | no_license | <?php
namespace mohagames\Tazer\tasks;
use mohagames\Tazer\Main;
use pocketmine\entity\Effect;
use pocketmine\entity\EffectInstance;
use pocketmine\Player;
use pocketmine\scheduler\Task;
class PlayerFreezeTask extends Task{
public $player;
public $main;
public function __construct(Main $main, Player $p... | true |
6d0680ae90ce487c5fd371b1210f20a0b46ca1d3 | PHP | Hxagon/FactoryStuff | /Service/Factory/GameServiceFactory.php | UTF-8 | 956 | 3.21875 | 3 | [] | no_license | <?php
namespace FactoryStuff;
class GameServiceFactory
{
public static function create()
{
$player = new Player();
$enemy = new Enemy();
$world = new World;
$gameEngine = new GameEngine();
$player = self::loadPlayer($gameEngine, $player);
$enemy =... | true |
4c3f31db340eab1b2639936b378424e776aaabdb | PHP | simensen/sculpin | /src/Sculpin/Core/Generator/GeneratorManager.php | UTF-8 | 4,206 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is a part of Sculpin.
*
* (c) Dragonfly Development Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sculpin\Core\Generator;
use Dflydev\DotAccessConfiguration\Configuration;
use Sculpin\Core\D... | true |
ccfed1de3656ebd5152993a52fda665d6a61fb98 | PHP | frankdejonge/Cabinet | /classes/Cabinet/DBAL/Compiler/Sql/Sqlite.php | UTF-8 | 793 | 2.8125 | 3 | [] | no_license | <?php
/**
* Cabinet is an easy flexible PHP 5.3+ Database Abstraction Layer
*
* @package Cabinet
* @version 1.0
* @author Frank de Jonge
* @license MIT License
* @copyright 2011 - 2012 Frank de Jonge
* @link http://cabinetphp.com
*/
namespace Cabinet\DBAL\Compiler\Sql;
use Cabinet\DBAL\Co... | true |
f586a3f4be1f4d4df3049c25893889c7087cbf04 | PHP | a-dovbnya/loftschool-php | /ex-4/index.php | UTF-8 | 1,619 | 3.1875 | 3 | [] | no_license | <?php
require "./classes.php";
try {
echo "
======== Тариф базовый ======== <br/>
Возраст водителя: 25лет;<br/>
Дистанция: 12км;<br/>
Время: 70мин.<br/>
Дополнительные услуги: нет;<br/>
Результат расчета:
";
$base = new BaseTariff(25);
echo $base->calculate(12, 70) ."руб."... | true |
35da962a9abfd58dee128d7ca9d224ba6236bdb1 | PHP | coralie-blc/pokedex | /app/controllers/MainController.php | UTF-8 | 1,433 | 2.828125 | 3 | [] | no_license | <?php
require_once __DIR__."/../utils/DBData.php";
class MainController {
public function show($viewName, $viewVars=[]) {
extract($viewVars);
require_once __DIR__."/../views/header.tpl.php";
require_once __DIR__."/../views/$viewName.tpl.php";
require_once __DIR__."/../views/footer.... | true |
b8a66fc183b79cf1a90413429737298bcc32a17e | PHP | derechoanthony/basecodephpslim | /src/App/Model/UserEditTrail.php | UTF-8 | 2,166 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class UserEditTrail extends Model implements CModelInterface
{
/**
* User Edit Trail table
*/
protected $table = 'user_edit_trail';
/**
* Set create timestamp handling to false
*
* @var string
*/
const UP... | true |
181930ba9402c4d5994ab21375709d18dd9a9d11 | PHP | AlexMasterov/framework | /src/Resolver/AurynResolver.php | UTF-8 | 667 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Equip\Resolver;
use Auryn\Injector;
use Relay\ResolverInterface;
class AurynResolver implements ResolverInterface
{
/**
* @var Injector
*/
private $injector;
public function __construct(Injector $injector)
{
$this->injector = $injector;
}
/**
* Resolve... | true |
c32a694a92a0beac3ff37adafeec220a10c97bd7 | PHP | nowisesys/uup-auth | /test/source/UUP/Authentication/Validator/FileValidatorTest.php | UTF-8 | 7,422 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace UUP\Authentication\Validator;
function tab_encode($data)
{
$array = array();
foreach ($data as $arr) {
$array[] = implode("\t", $arr);
}
return implode("\n", $array);
}
/**
* Generated by PHPUnit_SkeletonGenerator on 2017-11-16 at 14:01:10.
*/
class... | true |
42db6d1581052cd997c89753bd592ea8c3df9029 | PHP | valkyrjaio/valkyrja | /src/Valkyrja/Attribute/Managers/Attributes.php | UTF-8 | 8,432 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of the Valkyrja Framework package.
*
* (c) Melech Mizrachi <melechmizrachi@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Valkyrja\Attribute\Managers;
... | true |
a265aa295687cfb43310f881e86dece73e56e78c | PHP | SamjuTheCoder/mcqs_test | /app/Repositories/Eloquent/TempQuestionRepository.php | UTF-8 | 1,944 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Repositories\Eloquent;
use App\Repositories\TempQuestionInterface;
use Illuminate\Support\Collection;
use App\Models\TempQuestion;
use DB;
//use Your Model
/**
* Class BrandRepository.
*/
class TempQuestionRepository implements TempQuestionInterface
{
protected $model;
public functi... | true |
2c611ca7c55a4608f8270d6dc84265e91fd9a283 | PHP | omarcontreras15/somar | /app/model/user.php | UTF-8 | 5,630 | 2.59375 | 3 | [] | no_license | <?php
require_once "./app/model/model.php";
class UserModel extends Model {
public function loginAdmin($usuario, $password) {
$this->connect();
$consulta = "SELECT nick, email, nombres, apellidos, cc, direccion, fecha_registro FROM usuario WHERE (nick = '$usuario' AND password = '$passwo... | true |
25ae36b9ecb79b761311dbcee7033d8a432738c8 | PHP | frosty84/appManager | /classes/Appointment.class.php | UTF-8 | 3,101 | 3.28125 | 3 | [] | no_license | <?php
/**
* Appointment
*
* Class to incapsulate appointment-related data and logic
*
* @author Vitalii Bondarenko
* @version 0.2
*/
class Appointment extends Interval{
protected $appStart;
protected $appStop;
protected $appDuration;
protected $appDurationInterval;
... | true |
56219ecb576ac41a9f04a660357bb075bae36bfa | PHP | ashokdubariya/customscripts | /magento/set-all-categories-is-anchor-in-magento/set-all-categories-is-anchor-in-magento.php | UTF-8 | 774 | 2.515625 | 3 | [] | no_license | <?php
/*
* Magento - Set all categories is_anchor
*/
require_once('app/Mage.php');
umask(0);
Mage::app();
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
$categoryCollection = Mage::getModel('catalog/category')->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('is_... | true |
e5fbd92ce7fe192d70c8f02d1146e136533e1000 | PHP | gustavoapolinario/system-monitor-php | /apache/html/monitor/app/Console/Commands/RequestserverlogCommand.php | UTF-8 | 918 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\ServerInfo;
use App\Jobs\RequestServerlogJob;
class RequestServerlogCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'command:RequestServer... | true |
417f016d306c5d606d29b5a6ede329da2cd03f91 | PHP | tmangassouba/g-stock | /app/Observers/InvoiceObserver.php | UTF-8 | 251 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Observers;
use App\Models\Invoice;
class InvoiceObserver
{
public function created(Invoice $invoice)
{
$invoice->reference = 'FACT-'.str_pad($invoice->id, 5, '0', STR_PAD_LEFT);
$invoice->save();
}
}
| true |
361604f9443febc389399673623a4b841459c980 | PHP | OrochiProject/hhvm-verifier | /hphp/testcase/unary.php | UTF-8 | 608 | 3.5 | 4 | [
"BSD-3-Clause",
"Zend-2.0",
"PHP-3.01"
] | permissive | <?php
$int = NULL;
$int = add_multi($int, 1, 1);
$int = add_multi($int, 2, 2);
$result = ~$int;
print("BitNot: ");
print($result);
print("\n");
$result = (bool)$int;
print("CastBool: ");
print($result);
print("\n");
$result = (double)$int;
print("CastDouble: ");
print($result);
print("\n");
$result = (int)$int;
pr... | true |
00e0f439290243efe48b2eaea8b185e93cc1e831 | PHP | shubham0809200/My-PortFolio | /contact.php | UTF-8 | 635 | 2.6875 | 3 | [] | no_license | <?php
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
// Database connection
$conn = new mysqli("localhost","root","","test1");
if($conn->connect_error){
echo "$conn->connect_error";
die("Something went wrong, Try Again!: ". $conn->connect_error);
} ... | true |
b7d685b039c4862f31956ae812b3768b91967754 | PHP | benzomedia/chatmail | /chatmail.php | UTF-8 | 3,387 | 2.5625 | 3 | [] | no_license | <?php
/**
* @package Chat_Bot
* @version 1.0
*/
/*
Plugin Name: ChatMail by Webscope
Plugin URI: http://wordpress.org/plugins/hello-dolly/
Description: A chat bot lookalike that makes it easy for users to contact the website owner
Author: Webscope
Version: 1.0
Author URI: https://webscopeapp.com
*/
include( 'chatma... | true |
bcc59a7b73b2c759f7606c146693af23ca9996f0 | PHP | wyanez/ZF2DoctrineBase | /src/ZF2DoctrineBase/Controller/BaseDoctrineController.php | UTF-8 | 1,371 | 2.578125 | 3 | [] | no_license | <?php
namespace ZF2DoctrineBase\Controller;
use Zend\Mvc\Controller\AbstractActionController;
use DoctrineModule\Persistence\ObjectManagerAwareInterface;
use Doctrine\Common\Persistence\ObjectManager;
/**
* BaseDoctrineController
* Controlador Base para todos los controladores que usen Doctrine2 ORM
* @author William... | true |
7f5da551ff11f84c64ee8e905aa38ba3dd807d87 | PHP | jbrinley/BuggyPress | /classes/forms/elements/BuggyPress_Form_Element_IssueAssignee.php | UTF-8 | 1,310 | 2.671875 | 3 | [] | no_license | <?php
class BuggyPress_Form_Element_IssueAssignee extends Zend_Form_Element_Select {
const FIELD_NAME = 'buggypress_issue_assignee';
/** @var BuggyPress_Issue */
protected $_issue = NULL;
public function __construct( $spec, $options = NULL ) {
if ( $spec instanceof BuggyPress_Issue ) {
$this->_issue = $spec;... | true |
a9d144695943306995851788f8d5e0f0e9ecddfa | PHP | mattiellojr/binary-MLM---Team-Platinum | /mlm/bonus.php | UTF-8 | 1,131 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
include('php-includes/connect.php');
include('php-includes/check-login.php');
$userid = $_SESSION['userid'];
$search = $userid;
?>
<table class="table table-striped">
<thead>
<tr>
<th>UUID</th>
<th>Full Name</th>
<th>Email</th>
<th>Access Key</th>
... | true |
c0ea59ae2b4664b2b21f575501ae5fc52a26d924 | PHP | narrowei/PHP-Hadoop-AssociationRule | /examples/apriori/reducer.php | UTF-8 | 4,165 | 2.515625 | 3 | [
"MIT"
] | permissive | #!/usr/bin/php
<?php
require_once __DIR__ . '/../../src/Reducer.php';
require_once __DIR__ . '/../../src/Reducer/Iterator.php';
class Reducer extends \Makotokw\HadoopStreaming\Reducer
{
protected function reduce($key, $emits)
{
//print_r($key);
//print_r($emits);
$file=exec('sed -n \'1p... | true |
2e6c5923beec5c84b0f3dc3b4b175a2162d34a6a | PHP | finalcut/doxer | /src/plugins/library/model/library.php | UTF-8 | 552 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace doxer\plugins\library\model;
use marshall\core\NonPersistentBean as NonPersistentBean;
class Library extends NonPersistentBean
{
// example of how to create your own constructor while calling the parent constructor
public function __construct($name){
parent::__construct();
$this->name =... | true |
773e7f51877e9d6c628982f2b7ab668bdabb1304 | PHP | agaluf/vatty | /tests/Unit/Entity/VatTest.php | UTF-8 | 1,777 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Vatty\tests\Unit\Entity;
use PHPUnit\Framework\TestCase;
use Vatty\Entity\Vat;
/**
* @coversDefaultClass \Vatty\Entity\Vat
*/
class VatTest extends TestCase {
/**
* Assert that the Vat object is correctly constructed.
*
* @covers ::__construct
*/
public function testConstructor() ... | true |
4f505f81f717d471d30564110603587124aba4d4 | PHP | torounit/EventCalendar | /Factory.php | UTF-8 | 555 | 2.75 | 3 | [] | no_license | <?php
namespace Torounit\EventCalendar;
class Factory {
/** @var Calendar[] */
private static $calendars = [ ];
/**
* @param $year
* @param $monthnum
*
* @return Calendar
*/
public static function create( $year ) {
$key = intval( $year );
if ( ! isset( self::$calendars[ $key ] ) ) {
$calendar... | true |
a09e02286fafdeb15bb8336257c6d5077eeed4e6 | PHP | mafisz/race_form | /app/Mail/NewRegister.php | UTF-8 | 1,437 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class NewRegister extends Mailable
{
use Queueable, SerializesModels;
public $member;
public $pdf;
public $path;
/**
* Cr... | true |
08aee1801db3dc0f2450941fea1648ffa7e92295 | PHP | MinePlay85/pterobilling | /app/Http/Middleware/Store/CheckIfAffiliateProgramEnabled.php | UTF-8 | 553 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware\Store;
use Closure;
use Illuminate\Http\Request;
class CheckIfAffiliateProgramEnabled
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle(Reques... | true |
abebb80e22990f4f0335c0243737efbf008ba47b | PHP | goncalogoncalves/esqueleto | /app/src/classes/Translator.class.php | UTF-8 | 482 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Esqueleto\Classes;
class Translator {
public $activeLang;
public function __construct($activeLang = null)
{
if ($activeLang == null) {
$activeLang = $_SESSION['LANG'];
}
$this->activeLang = $activeLang;
}
public function translate($txtToTrans... | true |
a8fd6908717e8b091d5a08c9f0fc884134d5a190 | PHP | Thuata/ComponentBundle | /Http/RestResponse.php | UTF-8 | 3,300 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Enjoy Your Business.
* Date: 10/11/2016
* Time: 08:45
* Copyright 2014 Enjoy Your Business - RCS Bourges B 800 159 295 ©
*/
namespace Thuata\ComponentBundle\Http;
use JMS\Serializer\SerializationContext;
use JMS\Serializer\SerializerBuilder;
/**
* Class RestResponse
*
* @package Thuat... | true |
0e9c1f7c4eeb290f399d14b6622f3e5e79cf154a | PHP | lihuaba/product | /module/Spu/Goods/RelationShip.class.php | UTF-8 | 5,907 | 2.84375 | 3 | [] | no_license | <?php
/**
* 模型 SPU
*/
class Spu_Goods_RelationShip {
use Base_MiniModel;
/**
* 数据库配置
*/
const DATABASE = 'product';
/**
* 表名
*/
const TABLE_NAME = 'spu_goods_relationship';
/**
* 字段
*/
const FIELDS = 'spu_id,goods_id,spu_goods_name';
/... | true |
674d640882e71917397b5635378b203074ce2c85 | PHP | renegens/RentMyHouse | /view_advanced-searchresults.php | UTF-8 | 3,549 | 2.53125 | 3 | [] | no_license | <?php
$title = "Advanced Search Results";
require_once "config.php";
if (isset($_GET['houseID'])) {
$query = ("SELECT * FROM houses WHERE houseID=:houseID ");
try {
$statement = $db->prepare($query);
$statement->execute(array(':houseID' => $_GET['houseID']));
if ($statement->rowCount() >... | true |
91c8666e1f08b7d1a549e6d247a5eccd5615bed1 | PHP | TheSwedishScout/pizzajakten | /admin/assets/getpizzeriaspizzas.php | UTF-8 | 1,032 | 2.59375 | 3 | [] | no_license | <?php
include '../../function.php';
if (isset($_GET['pizzeria']) && !empty($_GET['pizzeria'])) {
/**
* Pizza
*/
$pizzor = [];
$conn = connect_to_db();
$pizzeria = (int)test_input($_GET['pizzeria']);
$sql = "SELECT * FROM `pizzorinpizzeria` WHERE `pizzeria` = ? ORDER BY `pizzanr` ASC";
$stmt = $conn->prepare($s... | true |
49dcf49303547d5863fd6a9ec873f2a682a3e1cd | PHP | noheeuceda/IS410-II2016-IUnidad | /PHP/ejemplo_formulario_2/index.php | UTF-8 | 2,266 | 2.875 | 3 | [] | no_license | <?php
if (count($_GET)>0){
echo "Si hay informacion para procesar";
include_once("class/class_producto.php");
$producto = new Producto(
$_GET["txt-codigo-producto"],
$_GET["txt-nombre-producto"],
$_GET["slc-marca"],
$_GET["txt-precio"],
$_GET["chk-categoria"],
$_GET["rbt-tipo-pago"]
);
$p... | true |
5d05157ff839404a06dad3cff896abb99e6b23b5 | PHP | sanmark/laravel-standard-json-responses | /src/Responses/ErrorResponse.php | UTF-8 | 531 | 2.671875 | 3 | [] | no_license | <?php
namespace Sanmark\LaravelStandardJsonResponses\Responses;
class ErrorResponse
{
private $errors;
private $statusCode;
public function __construct($errors, $statusCode = 200)
{
$this -> errors = $errors;
$this -> statusCode = $statusCode;
}
public function getResponse()
... | true |
e58998ae1f4590ff204e8edb02dae26b177b3369 | PHP | vitalii-zahorodniuk/y2shop | /common/models/Currency.php | UTF-8 | 15,665 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
use yii\helpers\ArrayHelper;
use yii\web\Cookie;
/**
* This is the model class for table "{{%currency}}".
*
* @property integer $id
* @property integer $is_default
* @property integer ... | true |
adfd0f4f8a374a92cd6e2c4e0562d83d724fec8e | PHP | wangyelou/DbViewer | /index.php | UTF-8 | 936 | 2.515625 | 3 | [] | no_license | <?php
/**
*数据库数据可视化工具
*@author wangyelou <[<email address>]>
*@date 2018-08-21
*/
require_once './config/autoloader.php';
try {
//获取参数
$GLOBALS['param'] = array_merge($_POST, $_GET);
if (!isset($GLOBALS['param']['contro']) || !isset($GLOBALS['param']['action'])) {
throw new Exception('', -100);
}
$contro ... | true |
e5c417eb2715308b64b83b89005c0f7d698e2e97 | PHP | forkcms/forkcms | /src/Backend/Modules/Tags/Actions/MassAction.php | UTF-8 | 1,322 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Backend\Modules\Tags\Actions;
use Backend\Core\Engine\Base\Action as BackendBaseAction;
use Backend\Core\Engine\Model as BackendModel;
use Backend\Modules\Tags\Engine\Model as BackendTagsModel;
/**
* This action is used to perform mass actions on tags (delete, ...)
*/
class MassAction extends Backe... | true |
4ef20d5abfb48016a76631f94032a465bf3824a8 | PHP | dhonyfikri/Tugas_Individu | /Tugas_Optional (PemWeb)/login.php | UTF-8 | 870 | 2.578125 | 3 | [] | no_license | <?php
include 'config.php';
// menghubungkan dengan file config.php yaitu file koneksi database
$username = $_POST['username'];
// menerima nilai pada input form username
$password = md5($_POST['password']);
// menerima nilai pada input form password dan men des enkripsikan password
$login = mysql_query("sel... | true |
b82aacb4d65fbdf40b992d4e9037b926299f75e8 | PHP | YxMingY/SpecialNumbers | /perfect_num.php | UTF-8 | 160 | 3.046875 | 3 | [] | no_license | <?php
require "factor_num.php";
$perfects = [];
for ($i = 1; $i < 10000; $i++) {
if (array_sum(factors($i)) == $i)
$perfects[] = $i;
}
print_r($perfects); | true |
899b3218f54acbe85763ad5a3be9f9fd357d8379 | PHP | carstep/cyclonephp | /modules/simpledb/classes/db/query/custom.php | UTF-8 | 544 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @author Bence Eros <crystal@cyclonephp.com>
* @package SimpleDB
*/
class DB_Query_Custom implements DB_Query {
protected $sql;
public function __construct($sql) {
$this->sql = $sql;
}
public function compile($database = 'default') {
return $this->sql;
}
publi... | true |
edd39fe7ab5588fcec4c408d3e2468cb0cd124db | PHP | SupremeWei/hm | /app/Services/CompanyImageService.php | UTF-8 | 787 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Repositories\CompanyImageRepository;
/**
* Class CompanyImageService
* @package App\Services
*/
class CompanyImageService
{
/**
* CompanyImageService constructor.
* @param CompanyImageRepository $companyImageRepository
*/
public function __construct(Com... | true |
79235d98540d060fc10ff5f71937891924f66f9f | PHP | donarol/Proyecto_Sis | /Laravel/app/Http/BL/TurnoBL.php | UTF-8 | 1,194 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\BL;
use App\Modelos\Turno;
use App\Http\DAO\TurnoDAO;
class TurnoBL{
public function crear($datos){
$turno = new Turno;
$turno->nombre=$datos['nombre'];
$turno->monto=$datos['monto'];
$turno->gestion=$datos['gestion'];
$turno->hora_inicio=$dato... | true |
3c3723c7e10841a21f8f5c23eb787ba632e6ad26 | PHP | fossabot/ossm | /vendor/ze-it/smseagle-sdk-php/src/Transport/TransportAbstract.php | UTF-8 | 2,336 | 2.84375 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Zeit\SmsEagle\Transport;
use Zeit\SmsEagle\Helper\ConfigTrait;
use Zeit\SmsEagle\Request\BaseRequest;
use Zeit\SmsEagle\Response\Type\TypeInterface;
use Zeit\SmsEagle\Exception\ResponseTypeNotSupportedException;
abstract class TransportAbstract
{
use ConfigTrait;
/**
* @var TypeInterfac... | true |
07474f509b8f2a5e98b9fb0be97d38e8f794a71d | PHP | LennyLouis/maxence | /src/Entity/Prognostic.php | UTF-8 | 3,203 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\PrognosticRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=PrognosticRepository::class)
*/
class Prognostic
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @O... | true |
f7f09e76d28e03f3df0437bddc061936537e3633 | PHP | darhyur/PhamaX | /app/Http/Controllers/UnitController.php | UTF-8 | 4,529 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Unit;
use App\Brand;
use App\Product;
use Illuminate\Http\Request;
class UnitController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$units=Unit::... | true |
fa769882dd63abff6ca712da2e7ba34d92d6e4d7 | PHP | profbass/booj-website | /bundles/blog/controllers/admin/tag.php | UTF-8 | 2,413 | 2.515625 | 3 | [] | no_license | <?php
use Blog\Models\Post as Post;
use Blog\Models\Tag as Tag;
class Blog_Admin_Tag_Controller extends Admin_Base_Controller {
public $restful = true;
public function __construct()
{
parent::__construct();
// only grant access to people in these groups
$this->filter('before', 'user_in_group', array(arr... | true |
0ab75eea23a53fefeb24865019700abd8d607cee | PHP | mizuki-n-2/daily-life | /daily_life/app/Http/Controllers/TodoController.php | UTF-8 | 5,046 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Todo;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;
class TodoController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
... | true |
950670a2089fe360238de5be24b62fb09adcd4ed | PHP | simivar/tibiadata-api | /src/TibiaDataApi/Response/AbstractResponse.php | UTF-8 | 678 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace TibiaDataApi\Response;
use TibiaDataApi\Entity\Information;
class AbstractResponse
{
/** @var Information */
private $information;
public function __construct(\stdClass $response)
{
$this->information = new Information(
$response->informa... | true |
4e463fadd662b57742ceb01a80d82fb05fed3227 | PHP | edison2872/swoole_server_chess | /TSF/Component/MySQL/MySQLPool.php | UTF-8 | 7,058 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: roketyyang
* Date: 2016/9/21
* Time: 21:28
*/
namespace TSF\Component\MySQL;
use TSF\Exception\Pool\MySQLPoolException;
class MySQLPool
{
static protected $init = false;
static protected $spareConns = [];
static protected $busyConns = [];
static prote... | true |
b951234948bfac9a0c56f6f04e53165451e2106a | PHP | ManuWiizzle/renoving_habitat | /src/Entity/EarthWork.php | UTF-8 | 862 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
class EarthWork
{
private $disabledConcrete;
private $concreteSlab;
private $floorTiles;
public function getDisabledConcrete(): ?bool
{
return $this->disabledConcrete;
}
public function setDisabledConcrete(?bool $disabledConcrete): self
{
... | true |
9f595a823f06ed25695b0e325ad5b1cffb576adc | PHP | lutraina/prodplaga | /app/Controller/Component/DateComponent.php | UTF-8 | 122 | 2.546875 | 3 | [] | no_license | <?php
class DateComponent extends Component{
public function test(){
$date = 'oi';
return $date;
}
}
| true |
4106094673fcf1db14182275c60c1c4ef06bec26 | PHP | Diego-Brocanelli/podcast-rss-reader | /src/Image.php | UTF-8 | 613 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace DiegoBrocanelli\Podcast;
/**
* @author Diego Brocanelli <diegod2@msn.com>
*/
class Image
{
private string $title;
private string $url;
private string $link;
public function __construct(string $title, string $url, string $link)
{
$this->title = $... | true |
1f3c22e73bdc1e533c487b6c6728c0b4836688f0 | PHP | raphaelts3/php-parallel | /WorkerManager.php | UTF-8 | 3,361 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
class WorkerManager implements Countable
{
const STDIN = 0;
const STDOUT = 1;
const STDERR = 2;
const NON_BLOCKING = 0;
const BLOCKING = 1;
private static $DESCRIPTORSPEC = array(
self::STDIN => array('pipe', 'r'),
self::STDOUT => array('pipe', 'w'),
self::... | true |
6b0191deaf68dd5065f4b5f0f1a6f1f942c425d3 | PHP | HieuDuong99/Phat-Trien-Phan-Mem-Phan-Tan | /SourceCode/base/Controller.php | UTF-8 | 659 | 2.75 | 3 | [] | no_license | <?php
require_once ROOT.'/auth/Authentication.php';
class Controller {
public $auth;
public function __construct() {
$this->auth = new Authentication();
$this->run();
}
public function run() {
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$this->post();
}
if ($_SERVER['REQUEST_METHOD'... | true |
bf60940ce98e5cce8114ec59cb471394629dbe4e | PHP | sslab-gatech/autofz | /docker/benchmark/seeds/fuzzer-test-suite/php-fuzz-parser/bug72530.phpt | UTF-8 | 244 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
class ryat {
var $ryat;
var $chtg;
function __destruct() {
$this->chtg = $this->ryat;
$this->ryat = 1;
}
}
$o = new ryat;
$o->ryat = $o;
$x =& $o->chtg;
unset($o);
gc_collect_cycles();
var_dump($x);
?> | true |
c82125b2658025a4c27ec08fa44e1c1e182cd62a | PHP | blunttester/test1bluntinstr | /plugins/woocommerce-gateway-checkout-fi-wcv/class-sv-wc-gateway-checkout-fi-plugin-compatibility.php | UTF-8 | 3,132 | 2.734375 | 3 | [] | no_license | <?php
/**
* WooCommerce Plugin Compatibility
*
* This source file is subject to the GNU General Public License v3.0
* that is bundled with this package in the file license.txt.
* It is also available through the world-wide-web at this URL:
* http://www.gnu.org/licenses/gpl-3.0.html
* If you did not receive a cop... | true |
d11cebd90ef5ef6750899ffaaf5b813c641168a1 | PHP | aliyunmq/mq-http-php-sdk | /MQ/MQConsumer.php | UTF-8 | 5,340 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace MQ;
use MQ\Exception\InvalidArgumentException;
use MQ\Exception\MQException;
use MQ\Exception\TopicNotExistException;
use MQ\Http\HttpClient;
use MQ\Model\Message;
use MQ\Requests\AckMessageRequest;
use MQ\Requests\ConsumeMessageRequest;
use MQ\Responses\AckMessageResponse;
use MQ\Responses\ConsumeMess... | true |
424d9797626dc5fb5f0a4ae1780c27a74b247958 | PHP | JMSBot/widget | /tests/libs/Qwin/Qwin_IpTest.php | UTF-8 | 1,577 | 2.546875 | 3 | [] | no_license | <?php
require_once dirname(__FILE__) . '/../../../libs/Qwin.php';
require_once dirname(__FILE__) . '/../../../libs/Qwin/Ip.php';
/**
* Test class for Qwin_Ip.
* Generated by PHPUnit on 2012-01-18 at 09:10:34.
*/
class Qwin_IpTest extends PHPUnit_Framework_TestCase {
/**
* @var Qwin_Ip
*/
protect... | true |
07de1fd0c011d66b99203975bb270e760af3f54b | PHP | DataFighter/pudl | /pudlCompare.php | UTF-8 | 2,809 | 2.890625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | <?php
trait pudlCompare {
public static function between( $v1, $v2, $v3=false) { return new pudlBetween( $v1, $v2, $v3); }
public static function appendSet( $value) { return new pudlAppendSet( $value); }
public static function removeSet( $value) { return new pudlRemoveSet( $value); }
public static func... | true |
5faa0fee64b7807cf2bd553c32e46cf07adffaf0 | PHP | felipemm/site-seed-template | /classes/Authenticator.class.php | UTF-8 | 5,915 | 2.75 | 3 | [] | no_license | <?php
define('AUTH_DB', 1);
define('AUTH_FB', 2);
define('AUTH_LDAP', 3);
class Authenticator{
public function __construct($auth_type){
switch($auth_type){
case AUTH_DB:
$auth = new DatabaseAuth();
}
}
}
class Au... | true |