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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b748f648c10137ae82d2754f7324d4788c1f4d52 | PHP | jpfuentes1223/ejercicioPHPforms | /usuarios_id.php | UTF-8 | 733 | 2.984375 | 3 | [] | no_license | <?php
$mysqli = new mysqli("localhost", "root", "", "ejerciciophp_users");
$id = $_GET['id'];
if ($id == null) {
echo("Debe de introducir un ID valido <br/>");
echo '<a href="index.html"><button type="button">Volver atras</button></a>';
exit();
}
if ($mysqli -> connect_errno) {
echo ("Connect failed: ... | true |
4cd1983413394942a790dc8fa21e34c66636c793 | PHP | rzproject/UserSecurityBundle | /Model/SessionInterface.php | UTF-8 | 1,104 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Rz\UserSecurityBundle\Model;
interface SessionInterface
{
/**
* Set ipAddress
*
* @param string $ipAddress
* @return \Rz\UserSecurityBundle\Entity\Session
*/
public function setIpAddress($ipAddress);
/**
* Get ipAddress
... | true |
51a19a9eb1758c3c0c8a4d3d3c1809a3ecb5fe7f | PHP | oggzr/Laravel-portfolio | /app/Project.php | UTF-8 | 580 | 2.546875 | 3 | [] | no_license | <?php
namespace App;
use App\Tag;
use App\Image;
use App\Comment;
use Illuminate\Database\Eloquent\Model;
class Project extends Model
{
protected $fillable = ['title' , 'description' , 'image_id'];
//Many to many relationship for tags and projects
public function Tags() {
return $this->belongsToMa... | true |
decb38c829329ad9ea6b511e2c403555403e4196 | PHP | gechiui/gechiui-develop | /tests/phpunit/includes/class-gc-fake-block-type.php | UTF-8 | 573 | 2.71875 | 3 | [] | no_license | <?php
/**
* GC_Fake_Block_Type for testing
*
* @package GeChiUI
* @subpackage Blocks
* @since 5.0.0
*/
/**
* Test class extending GC_Block_Type
*
* @since 5.0.0
*/
class GC_Fake_Block_Type extends GC_Block_Type {
/**
* Render the fake block.
*
* @param array $attributes Optional. Block attributes. D... | true |
547e76a5806ac98d29d847d909d13435d948f52d | PHP | mhoumann87/nybo_dk | /production/public/foto.php | UTF-8 | 3,722 | 2.5625 | 3 | [] | no_license | <?php
$title = "Theis Nybo Foto - Fotografi";
$side = 'foto';
require_once ('./../private/initialize.inc.php');
require_once('./../private/shared/header.inc.php');
?>
<main>
<section class="foto-side">
<aside class="sidebar">
<?php
if(is_get_request()) {
if(isset($_GET['id'])) {
... | true |
c134635bf3a1f75ec8f1589d56e981854a68de47 | PHP | JingJWang/wxhuishoutong | /view/diserver/dataobj/command/LoginByWX.php | UTF-8 | 6,342 | 2.796875 | 3 | [] | no_license | <?php
/**
* @brief 登陆(通过微信code)命令类定义文件。
* @author 赵一
* @date 2016/04/07
* @version 0.1
*/
/**
* @class LoginByWX
* @brief 登陆(通过微信code)命令类。
* @author 赵一
*/
class LoginByWX extends BaseCommand {
/**
* @brief 执行函数。(派生类实现)
* @author 赵一
* @param[in] $params 命令参数。
* @return ... | true |
15d584a9807414d229e886fbcf1b6b61f3dacc83 | PHP | audef1/ch.bfh.bti7054.myshop | /lib/controllers/CheckoutController.php | UTF-8 | 2,259 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: florianauderset
* Date: 13.01.16
* Time: 15:00
*/
class CheckoutController
{
private $view;
public function __construct($parameter)
{
if (isset($_SESSION['user'])){
if (isset($_GET['ordersubmitted'])){
//write order to db
... | true |
f53eea584145ce45b80fb1df21f4fc96abded182 | PHP | larrychen04/frontend | /crop-image.php | UTF-8 | 2,706 | 2.625 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
use Aws\S3\S3Client;
use Aws\S3\Exception\S3Exception;
// Instantiate an S3 client
// $s3 = S3Client::factory(array(
// 'key' => '',
// 'secret' => '',
// ));
$imgUrl = $_POST['imgUrl'];
$imgInitW = $_POST['imgInitW'];
$imgInitH = $_POST['imgInitH']... | true |
e40c405bf4cc3fa1021e8811d476ca37f8044c18 | PHP | stu-ad/lumberjack-core | /src/Application.php | UTF-8 | 5,982 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Rareloop\Lumberjack;
use DI\ContainerBuilder;
use Illuminate\Support\Collection;
use Interop\Container\ContainerInterface as InteropContainerInterface;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ResponseInterface;
use function Http\Response\send;
class Application implements Container... | true |
873ffcb84844d55e3213dbb4777c2e526d500b46 | PHP | NaraHiroyuki/php-learn | /section10-5/MachineTrait.php | UTF-8 | 199 | 2.921875 | 3 | [] | no_license | <?php
// MachineTraitトレイトを定義
trait MachineTrait {
private $starting = 'Starting...Run!';
// 機器を起動
public function run() {
echo $this->starting;
}
}
?> | true |
4d91042fc482cc6192967c172867a93d184498a1 | PHP | SBordier44/laravel56-demo-app | /tests/Feature/RegisterTest.php | UTF-8 | 960 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Feature;
use Tests\TestCase;
class RegisterTest extends TestCase
{
/**
* Register test.
*
* @return void
*/
public function testRegister()
{
$data = [
'name' => 'Martin',
'email' => 'martin@chezlui.fr',
'password' => 'm... | true |
756179b6ceaae5e55722887173e394638d557570 | PHP | ezctrlz/Babysitter_PHP_MYSQL | /src/errors/ValidationError.php | UTF-8 | 174 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
class ValidationError extends Exception
{
public function __construct($error = "Validation Error", $code = 0) {
parent::__construct($error, $code);
}
}
| true |
7cc2586842be683f8b917b87fc5a2b8f28a9628e | PHP | mushedi/final-project | /dateVal.php | UTF-8 | 667 | 2.796875 | 3 | [] | no_license | <!-- /* Azul Lanas
Date: 12/13/2020 */ -->
<?php
if (!empty($_POST)) {
if(!empty($_POST["date1"]) && !empty($_POST["date2"])){
$date1 = $_POST['date1'];
$date2 = $_POST['date2'];
$timeDiff = $_POST['timeDiff'];
$test_arr = explode('/', $date1);
$test_arr2 = explode('... | true |
a7d9866d5d7092245b649ca24d8900068a23de37 | PHP | mahui-wangjin/unioncms | /app/Models/TemplateMessage.php | UTF-8 | 2,891 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class TemplateMessage extends Model {
const TABLE_NAME = 'template_message',
TEMPLATE_TYPE = [
0 => '邮件',
1 => '短信',
];
protected $table = self::TABLE_NAME;
public $timestamp... | true |
beef85994d030f099e77c06f2cbf81226fb5a114 | PHP | mmqrama/Tarade-Barter-System | /TR1/dbConnect/func_db.php | UTF-8 | 4,534 | 2.921875 | 3 | [] | no_license | <?php
//signup functions
function emptyInputSignup($name, $number, $email, $pass, $repass){
$result;
if(empty($name) || empty($number) || empty($email) || empty($pass) || empty($repass)){
$result = true;
}
else{
$result = false;
}
... | true |
22cb58271f81d3565314b2405ad720125a2ccd1d | PHP | joaofsa2000/Trabalhos | /PHP/Ficha1/EX04/Index.php | UTF-8 | 117 | 3.0625 | 3 | [] | no_license | <?php
echo "Tabuada do 6: <br>";
for ($i=1;$i<11;$i++){
echo "6x$i=".($i*6)."<br>";
}
?> | true |
6ead5a22f89d0b788f1676321327af37b73c4f7b | PHP | ronan-gloo/FuelPHP-Twitter-Bootstrap | /classes/form/button.php | UTF-8 | 861 | 2.609375 | 3 | [] | no_license | <?php
namespace Bootstrap;
class Form_Button extends BootstrapModuleBtn {
public function make($instance, $field, $value)
{
$this->data = compact('field', 'value');
$this->instance = $instance;
return $this;
}
public function render()
{
extract($this->data);
$this->set_button()->set_icon($val... | true |
7833a5f965ce4363a9738f956013d5e56f3ef2ad | PHP | tgajewski007/BragaPlanningPoker | /include/base/Action.php | UTF-8 | 1,608 | 2.609375 | 3 | [] | no_license | <?php
/**
*
* @package common
* @author Tomasz.Gajewski
* @abstract Created on 2009-04-06 10:40:13
* klasa odpowiedzialna za pętle komunikatów oraz wstępne sprawdzenie
* przychodzących danych
*/
abstract class Action extends BaseAction
{
// ------------------------------------------------------------... | true |
180a8c158d951a7a07ca3d2406092ee16733998a | PHP | kenbonilla/MovieDB | /list_the_movies.php | UTF-8 | 1,074 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
include 'dblogin.php';
include 'htmlhead.php';
include 'menu.php';
?>
<h1>Movies, Ratings, and Genres</h1>
<br><br>
Lists every movie with their rating and genres
<br><br>
<div>
<?php
$titles = $db->query('SELECT * FROM `Titles`');
echo"<div id='mytable'>"... | true |
cbc2fca63f01029a4eb0dda1c4f1185fdfa94924 | PHP | Lukeluha/bp-hamrla | /app/controls/breadcrumbs/BreadcrumbsControl.php | UTF-8 | 527 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Controls;
use Nette\Application\UI\Control;
/**
* Class Breadcrumbs
* Control for breacrumbs navigation
* @package App\Controls
*/
class BreadcrumbsControl extends Control
{
/**
* @var array
*/
private $links;
public function render()
{
$this->template->links = $this->links;
$thi... | true |
e99f6d21dc9f2b772ea61c052febe1f905622a77 | PHP | bluesnowman/fphp-saber | /classes/Saber/Data/IInt32/Module.php | UTF-8 | 20,732 | 2.828125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php
/**
* Copyright 2014-2016 Blue Snowman
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... | true |
3bd7c4a9143be947c7abd98acfd2e34f341c27b4 | PHP | YlikScherbak/Restourant_Laravel | /app/Services/Implementation/OrderServiceImpl.php | UTF-8 | 3,231 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Services\Implementation;
use App\Services\OrderService;
use App\Model\Order;
use Auth;
use Carbon\Carbon;
use DB;
use Gate;
use Log;
class OrderServiceImpl extends MainService implements OrderService
{
public function createOrder($id)
{
$user = Auth::user();
$table =... | true |
dd5779aa3110bcfbdc3a6ea2bf873c5ea5f6fa27 | PHP | vn-ajith/laravel_testing | /app/controllers/UsersController.php | UTF-8 | 6,847 | 2.53125 | 3 | [] | no_license | <?php
class UsersController extends BaseController
{
public function __construct()
{
// $this->beforeFilter('csrf', array('on'=>'post'));
}
public function register()
{
return View::make('Users.register');
}
public function doRegister()
{
$input = Input::all();
$rules = array(
'username'... | true |
a538968187f1e174f6cf00eeba44e6f6db7b88b1 | PHP | davidthedev/registration_system | /app/App/Domain/User/User.php | UTF-8 | 2,367 | 3.453125 | 3 | [] | no_license | <?php
namespace App\Domain\User;
/**
* User class creates a user object. Two static 'factory' methods
* allow to create user object from different states, upon registration and
* upon fetching user details from the database
*/
class User
{
private $id, $firstname, $username, $email, $password, $group;
p... | true |
3cc3485f75a11ee3314125be4e29cade9fef731c | PHP | NewEXE/php-oop-tasks-solutions | /29/index.php | UTF-8 | 542 | 3.640625 | 4 | [] | no_license | <?php
/*
* Статические методы.
* Статические методы внутри класса.
* http://code.mu/ru/php/book/oop/static-methods/
*/
require_once 'ArraySumHelper.php';
/*
* Задача 29.2
* Пусть дан массив с числами. Найдите с помощью класса ArraySumHelper сумму квадратов элементов этого массива.
*/
$arr = [1,2,3... | true |
d609a9de7ffa11d6f78f23c834985dc1cae74cec | PHP | lucky091588/exercise | /inc/import.php | UTF-8 | 1,943 | 3.078125 | 3 | [] | no_license | <?php
/*
* Processing all imported data and send it to be included in the table
*
*/
function processData($data) {
// include states with list of population
include 'state-popu.php';
// assign $data in $row var
$row = $data;
// check each data if set and not null and assign to their variables
$first = is... | true |
0cc16d8a491638ed9839e3c3d44deaa91dc6c2b8 | PHP | MishkaSimakov/ftk-sut | /app/Notifications/Traits/SendMultilinesTelegramMessage.php | UTF-8 | 548 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Notifications\Traits;
trait SendMultilinesTelegramMessage
{
protected function getParsedMessage(): string
{
$lines = $this->getMessageLines();
$message = join("\n", $lines);
return $this->removeProhibitedTags($message);
}
protected function removeProhib... | true |
d2952dc8be1e3bf788d5c9eea62772872377bf2f | PHP | davidchaoFSO/LikesTV1308 | /fuel/app/classes/controller/channels.php | UTF-8 | 5,044 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
require_once APPPATH.'facebook.php';
class Controller_Channels extends Controller_Template
{
public function action_index()
{
require APPPATH.'likestv.php';
// Twitch TV Client ID
$ttvclientid = '563pl149qc2s3obor1d7rmm2xuu2io0';
// API parameters for Twitch API calls
$apiparams = array(
'ht... | true |
56f62dd66c7b9dad1250fc990616088b7cda3d34 | PHP | thembinkosiklein/myprojects | /locations/queries/get.queries.php | UTF-8 | 4,303 | 2.703125 | 3 | [] | no_license | <?php
class Get extends Database {
protected $db;
function __construct() {
$this->db = new Database();
}
function location($params) {
switch (TRUE) {
// Get location by name
case (isset($params['name'])):
$query = $this->db->select("*");
$query.= $this->db->from("locations");
... | true |
a09ad011c61cb94e326c460cc8d7b54552c8e3b5 | PHP | MakielZ/Sistema-baseball | /Modelo/Escuelas.php | UTF-8 | 204 | 2.65625 | 3 | [] | no_license | <?php
class Escuela extends Conexion{
private $id = '';
private $nombre = '';
private $mensaje = '';
function __construct($id, $nombre)
{
$this->id = $id;
$this->nombre = $nombre;
}
}
| true |
6866795f8004be96d886e3c19b51b80759852374 | PHP | fullstack82/Master-php-7 | /php7/variables/index.php | UTF-8 | 1,164 | 4.34375 | 4 | [] | no_license | <?php
/*
* Variables locales: Son las que se definen dentro de una función y no pueden ser
* usadas fuera de la función, solo estan disponibles dentro, a no ser que haga un return.
*
* Variables globales: son las que se declaran fuera de una función y estan disponibles
* dentro y fuera de las funciones;
* En php si t... | true |
fa7f021187d06fe68e44b2e099fdad44e56b908f | PHP | WilliamPring/SET | /2nd year/Web Design and Development/PHP Text Editor/Write_File.php | UTF-8 | 2,629 | 3.265625 | 3 | [] | no_license | <?php
/*
Filename: Write_File.php
Assignment: Assignment 5 WDD
By: Naween Mehanmal
Date: December 4, 2015
Description: The server side script the handles all of the file io calls, opening, reading/writing
and saving files on the MyFiles directory located on the server side
*/
header('Content-type: text/java... | true |
86e60386d6a5136d08dad4aa041f0cdae4f46f92 | PHP | haolinbird/phpFamily | /Vendor/PHPServer_set/PHPServer1.4.12/thirdparty/Anodoc/Anodoc/Tags/NullTag.php | UTF-8 | 232 | 2.65625 | 3 | [] | no_license | <?php
namespace Anodoc\Tags;
class NullTag extends Tag {
function __construct($tag_name, $value) {}
function getValue() {}
function getTagName() {}
function __toString() {}
function isNull() {
return true;
}
} | true |
9470fd24e0f778ca3ed202c774e131538dd7ae9c | PHP | Grummfy/dpc-2019-architecture-talk | /modules/sample-app/src/Application/Command/Phone/ModifyPhoneDetailsHandlerImpl.php | UTF-8 | 1,126 | 2.515625 | 3 | [] | no_license | <?php
/**
* Amazium Application
*
* @copyright Amazium bvba
* @since {2019-03-30}
*/
namespace Amazium\SampleApp\Application\Command\Phone;
use Amazium\Kernel\Application\Context\Context;
/**
* Class ModifyPhoneDetailsHandlerImpl
* @package Amazium\SampleApp\Application\Command\Phone
*/
class ModifyPhoneDeta... | true |
678588b3202bbebf9e8e7f5dd2e4b722598b09b5 | PHP | codehaiku/subway | /src/Taxonomy/Taxonomy.php | UTF-8 | 3,267 | 2.8125 | 3 | [] | no_license | <?php
namespace Subway\Taxonomy;
use Subway\Options\Options;
use Subway\User\User;
use Subway\View\View;
class Taxonomy {
protected $view;
public function __construct( View $view ) {
$this->view = $view;
}
/**
* @param $term
*
* @return $this
*/
public function taxonomy_option( $term ) {
$this->... | true |
7a2ec43202d807c9f9b871f2f23dd321ba8b78dd | PHP | MrBaummann/FroshPluginUploader | /src/Commands/UploadPluginCommand.php | UTF-8 | 3,683 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace FroshPluginUploader\Commands;
use FroshPluginUploader\Components\PluginBinaryUploader;
use FroshPluginUploader\Components\PluginFinder;
use FroshPluginUploader\Components\ReleaseFactory;
use FroshPluginUploader\Components\SBP\Client;
use FroshPluginUploader\Structs\Input\Uploa... | true |
b5a2987b3a2bf6777d069b34e0fcc6ba185452a1 | PHP | rsen1015/collegeSportsWeb | /studreg2.php | UTF-8 | 1,391 | 2.796875 | 3 | [] | no_license | <html>
<body>
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "cricket";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$year =... | true |
ec9ac17f511b32ec65356f3e89ff5912918e7b96 | PHP | orssaud/projet9oc | /lib/arrayToPng.php | UTF-8 | 1,464 | 3 | 3 | [] | no_license | <?php
namespace projet9\lib;
class arrayToPng{
private $bg;
private $wood;
private $damage;
private $start;
private $end;
public function __construct(){
$this->bg = imagecreatefrompng('./public/img/min/bg.png');
$this->wood = imagecreatefrompng('./public/img/min/wood.png');
$this->damage = imagecreat... | true |
a3ddf4d75374e5e3e62be825302c4fb272180f9a | PHP | scotchjdmacdonald/Chat-App-BE | /src/models/Message.php | UTF-8 | 1,875 | 3.09375 | 3 | [] | no_license | <?php
require_once __DIR__ . '/../services/Logger.php';
class Message {
private $dbConnection;
public $message_id;
public $sender_id;
public $recipient_id;
public $created_at;
public $message_text;
public function __construct($db) {
$this->dbConnection = $db;
}
publi... | true |
5260d2a2d93e0a7c938f07e3c94db2ee7cbc627f | PHP | ks7000/laconia | /src/models/Session.php | UTF-8 | 3,113 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Session Class
*
* Determine and modify the state of user authentication.
*
* While the User class is used to access and modify permanent user
* data in the `users` table, the Session class is used to check the
* state of a user's authentication. Laconia uses the PHP session
* superglobal to de... | true |
454d6122ebc47a1d20704fc35338baebf445e619 | PHP | oxygencms/users | /src/Policies/PermissionPolicy.php | UTF-8 | 1,457 | 2.515625 | 3 | [] | no_license | <?php
namespace Oxygencms\Users\Policies;
use App\Models\User;
use Oxygencms\Core\Policies\BasePolicy;
use Illuminate\Auth\Access\HandlesAuthorization;
class PermissionPolicy extends BasePolicy
{
use HandlesAuthorization;
/**
* @param User $user
*
* @return mixed
*/
public function i... | true |
2792a35b6fc51102b162d4f4f7e38545b88f72d3 | PHP | tuanht/creational-patterns-exercise | /src/Car/Model/EngineInterface.php | UTF-8 | 98 | 2.671875 | 3 | [] | no_license | <?php
namespace Car\Model;
interface EngineInterface
{
public function start($kilometer);
}
| true |
b125317a2d4e7fd61e0dc701a7415af3f0f6b5fc | PHP | GS03-18-Nick/kadai | /8/functions.php | UTF-8 | 478 | 2.859375 | 3 | [] | no_license | <?php
function connect () {
global $pdo;
$pdo = new PDO('mysql:dbname=kadai;host=localhost;charset=utf8', 'root', '');
}
function saveChanges ( $change ) {
global $pdo;
$sql = "INSERT INTO kadai (ID, firstname, lastname, email, password, fish, pet, hometown, starwars) VALUES (:id, :firstname, :lastname, :... | true |
54bfe20997d7bc1a5a3c6349c901b69fd7040526 | PHP | onesy/eav_search | /eavSearch/EavSearch/SearchEngine.php | UTF-8 | 1,431 | 2.6875 | 3 | [] | no_license | <?php
namespace eavSearch\EavSearch;
use DI\Container;
use Dotenv\Dotenv;
use eavSearch\Entities\ArrayEntity;
use Medoo\Medoo;
/**
* Created by PhpStorm.
* User: sunyuw
* Date: 4/27/18
* Time: 11:24 AM
*/
class SearchEngine
{
const TABLE_NAME = "column_search";
protected $db;
public function __const... | true |
09b3b77e56382797fde78c7ab3a6475a811c4cb5 | PHP | SmythyCosta/PHP-coffee_ecommerce | /views/list_categories.php | UTF-8 | 846 | 3.015625 | 3 | [] | no_license | <?php
// This page is included by shop.php.
// This page displays the individual categories.
// This page will make use of the query result $r.
// The query returns an array of: id, category, description, and image.
// Begin the HTML box:
echo BOX_BEGIN;
echo '<ul class="items-list">';
while ($row = mysqli_fetch_ar... | true |
9578e0f7c46d94a7be49a4abe512753c8f3a1432 | PHP | ddnode/crawler | /app/Console/Commands/CrawlDomainRecords.php | UTF-8 | 2,462 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\DomainRecord;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Symfony\Component\DomCrawler\Crawler;
class CrawlDomainRecords extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature ... | true |
3b90c8f073ce3ee62028981c753d3d6723c6a2d7 | PHP | claudito/perutecacademy | /2ciclo/php2/grupo2/pos/demo/imprimir.php | UTF-8 | 936 | 2.765625 | 3 | [] | no_license | <?php
/* Call this file 'hello-world.php' */
require '../libreria/autoload.php';
include'../autoload_project.php';
use Mike42\Escpos\PrintConnectors\FilePrintConnector;
use Mike42\Escpos\Printer;
#Ruta de Impresora Compartida
$connector = new FilePrintConnector("\\\\192.168.1.9\\BIXOLON");
$printer = new Printer($con... | true |
bc2c580e70ad2437e7306dcd5705141d0f3bf151 | PHP | SabinaMuskietorz/assignment_web_programming | /public/contact.php | UTF-8 | 1,396 | 2.8125 | 3 | [] | no_license | <?php
session_start();
require '../components/connection.php';
$title = 'Contact us';
require '../components/head.php';
require '../components/basenav.php';
//anyone can access that page
/* code to register the messages from users through the contact form.
If they have any queries they can send a message,
and it will ... | true |
6f2a95d2cdd45ea02459c926f6bc9db38f9267c9 | PHP | ArthurPeyrichou/CDP_Gr1_Eq1_Dev | /src/DataFixtures/ProjectFixture.php | UTF-8 | 2,024 | 2.609375 | 3 | [] | no_license | <?php
namespace App\DataFixtures;
use App\Entity\Member;
use App\Entity\Project;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
class ProjectFixture extends Fixture implements DependentFixtureInterface
{
publi... | true |
b882e475bdb6e6d8b1009451d6033030041fe7ae | PHP | designeo/symfony-template | /src/AppBundle/Model/PackageModel.php | UTF-8 | 2,534 | 2.625 | 3 | [] | no_license | <?php
namespace AppBundle\Model;
use AppBundle\Entity\Package;
use AppBundle\Repository\PackageRepository;
use Designeo\FrameworkBundle\Model\AbstractLoggerAwareModel;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\DBAL\DBALException;
use AppBundle\Exception\PackageException;
/**
* Model for Package entity
... | true |
1563a4a63c4f8deec99413f3ef134ffed031244e | PHP | hdnha11/lvtn-giaothongct | /Project/lib/ex_map_to_img.php | UTF-8 | 3,568 | 2.640625 | 3 | [] | no_license | <?php
/**
* Hoàng Đức Nhã
* Sinh viên lớp Hệ thống thông tin K34
* Khoa CNTT & Truyền thông
* Trường Đại học Cần Thơ
* Email: hdnha11@gmail.com
* Lấy ảnh của các lớp bản đồ từ server và merge lại lưu trong thư mục tmp
* Trả về đường dẫn đến file ảnh
*/
$TEMP_DIR = dirname(__FILE__) . '/../tmp/';
$T... | true |
81c7fbb6b6681754fe54b56d2e62156136c7b2b6 | PHP | Naruttam/travelguidemaster | /module/Application/Form/LoginAuth.php | UTF-8 | 560 | 2.609375 | 3 | [] | no_license | <?php
namespace Application\Form;
use Zend\Form\Form;
class LoginAuth extends Form
{
public function __construct($name = null)
{
parent::__construct( 'application' );
$this->setMethod('post');
$this->add(
'text','username',array(
'label' => 'Username :',
'required' => true,
'filters' => arr... | true |
c1799f6ac311684323ecdab79b0fb80222b749f8 | PHP | Csardelacal/PHPAuthServer | /spitfire/io/stream/StreamSegment.php | UTF-8 | 3,421 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php namespace spitfire\io\stream;
use spitfire\exceptions\OutOfBoundsException;
/*
* The MIT License
*
* Copyright 2018 César de la Cal Bretschneider <cesar@magic3w.com>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (th... | true |
b81f75ecba37add3e6e00044dbfe1257a37ef8f6 | PHP | makinacorpus/php-acl | /src/Collector/CallbackProfileCollector.php | UTF-8 | 491 | 2.671875 | 3 | [] | no_license | <?php
namespace MakinaCorpus\ACL\Collector;
class CallbackProfileCollector implements ProfileCollectorInterface
{
private $callback;
/**
* Default constructor
*
* @param callable $callback
*/
public function __construct(callable $callback)
{
$this->callback = $callback;
... | true |
ed02ec8d783cad9ab5d8807efa7043ea48cafcc6 | PHP | danis24/Hash_Themes | /includes/helpers/nav-menu-custom-field.php | UTF-8 | 2,175 | 2.65625 | 3 | [] | no_license | <?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Hash_Nav_Menu_Custom_Field{
private static $_instance = null;
/**
* Hook da stuff!
*/
function init() {
add_action( 'wp_edit_nav_menu_walker', array( $this, 'edit_nav_menu_walker' ) );
add_action( 'wp_update_nav_menu_item', arr... | true |
0d9e933a01e147d2151145ad4f693b906bbe84ba | PHP | thudsonbu/sports_pro | /tech_support/customer_manager/processCustomer.php | UTF-8 | 4,860 | 3.03125 | 3 | [] | no_license | <?php
// put/post query
require "../model/customer/newCustomer.php";
require "../model/customer/postCustomer.php";
require "../model/testInput.php";
// passes through program using placeholder customerID ;p
if (!isset($_POST['customerID'] )) { // set error url for new customer page
$_POST['customerID'] = "";
... | true |
892a60c96167cdc7be45ddf2e03dfd4fddbf56a2 | PHP | HelloImKevo/PhpPlayground | /src/FunWithArrays.php | UTF-8 | 1,603 | 3.90625 | 4 | [] | no_license | <?php
/*
* PluralSight Course
* PHP Fundamentals
* by Jill Gunderson
*/
// Indexed Arrays
$authors = array("Charles Dickens", "Jane Austin", "William Shakespeare",
"Mark Twain", "Louisa May Alcott");
$books = ["Little Women", "Jane Eyre", "Richard III", "Oliver Twist"];
$allTypes = [10, 1.3, "Howdy", true];
... | true |
1db28e0abb23ab742fec35c317fba2f6087a459b | PHP | nicoq07/web | /src/Controller/FotosProductosController.php | UTF-8 | 6,212 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Controller\AppController;
/**
* FotosProductos Controller
*
* @property \App\Model\Table\FotosProductosTable $FotosProductos
*/
class FotosProductosController extends AppController
{
public function isAuthorized($user)
{
if(isset($user['rol_id']) && $user['rol_id'] == ... | true |
409bef59d79586a8b1c0cfa131460684558ea973 | PHP | aldanfirdaus/Tugas-Praktek-5-GET-POST | /linkcookies.php | UTF-8 | 243 | 2.65625 | 3 | [] | no_license | <?php
Setcookie("variable_cookies","ini adalah variable cookies",time()+60); //set cookies dengan menulis variabel,value cookies dan waktu cookies
echo "<a href=cekcookies.php>Cek Cookies</a>" //menampilkan link ke halaman cekcookies.php
?> | true |
390b322ffd3e2e23519e0a7749a026c76eb832ad | PHP | Melvin-4A6B/mvz | /core/Database.php | UTF-8 | 2,303 | 3.265625 | 3 | [] | no_license | <?php
class Database extends Controller {
public $conn;
public function __construct()
{
try
{
$this->conn = new PDO(DSN, USER, PASS);
$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
return $this->conn;
}
... | true |
ba0978460166397cb24981978295a345c7e8632e | PHP | Deutsche-Digitale-Bibliothek/ddb-virtualexhibitions | /omeka/application/libraries/Omeka/File/MimeType/Detect/Strategy/GetId3.php | UTF-8 | 864 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Omeka
*
* @copyright Copyright 2007-2012 Roy Rosenzweig Center for History and New Media
* @license http://www.gnu.org/licenses/gpl-3.0.txt GNU GPLv3
*/
/**
* @package Omeka\File\MimeType\Detect\Strategy
*/
class Omeka_File_MimeType_Detect_Strategy_GetId3 implements Omeka_File_MimeType_Detect_Strat... | true |
b201c9f978b87f3ed250ed4d238bb3da07e4ed73 | PHP | parabameya/SeaStore | /php/product.php | UTF-8 | 642 | 3.078125 | 3 | [] | no_license | <?php
//including the connection file
include "connect.php";
//validating whether the post value is set and not null
try{
session_start();
$category = $_POST["Category"];
//querying the database
$query = "select * from products where producttype = " . $category ;
$result = mysql_query($query) or die(error_get_last... | true |
f62e1c13407ad68667aaffd29fd44c06c0d9a5b5 | PHP | boluijten3/BASALT_PAMsoftware | /htdocs/gino-pam/php_cm/modules/interface/interfaceobjects/employee/competence/EmployeeAssessmentEdit.class.php | UTF-8 | 2,232 | 2.71875 | 3 | [] | no_license | <?php
/**
* Description of EmployeeAssessmentViewInterfaceObject
*
* @author ben.dokter
*/
require_once('modules/interface/interfaceobjects/base/BaseValueObjectInterfaceObject.class.php');
class EmployeeAssessmentEdit extends BaseValueObjectInterfaceObject
{
const TEMPLATE_FILE = 'employee/competence/employe... | true |
faf1db2ba8cf084ee596c44b7a4096fc021c9134 | PHP | cheerokee/botchampions | /module/Admin/src/Admin/Service/AbstractService.php | UTF-8 | 1,858 | 3.109375 | 3 | [] | no_license | <?php
namespace Admin\Service;
//PULO DO GATO
use Doctrine\ORM\EntityManager;
//Vai ajudar bastante na parte de preencher os dados.
use DoctrineModule\Stdlib\Hydrator\DoctrineObject as DoctrineHydrator;
abstract class AbstractService{
/*
* @var EntityManager
*/
protected $em;
//NOME DA ENTIDADE ... | true |
8ad439c46f539c71174efa5bb587fc947156eddc | PHP | gabriel-detassigny/payg-utility-calculator | /src/DataProvider/ReadingProvider.php | UTF-8 | 1,984 | 2.796875 | 3 | [] | no_license | <?php
namespace GabrielDeTassigny\Puc\DataProvider;
use DateTime;
use GabrielDeTassigny\Puc\Entity\Reading;
use GabrielDeTassigny\Puc\Entity\Utility;
use GabrielDeTassigny\Puc\Repository\ReadingRepository;
use RuntimeException;
class ReadingProvider
{
private ReadingRepository $readingRepository;
public fun... | true |
bc1d147fbcdeab264c0f2f5ee3f2f27f8c1d3011 | PHP | attackerbeater/solid-principles | /COR/test.php | UTF-8 | 240 | 3.03125 | 3 | [] | no_license | <?php
interface DBHandlerInterface
{
public function connect();
public function disconnect();
}
abstract class DBHandler
{
private $db;
public function __construct(
DBHandlerInterface $db
){
$this->db = $db
}
}
| true |
99ac05a5fbff4d088d015b1e9cdb31d5a28445ba | PHP | janmoravec/czech-crime | /app/FrontModule/presenters/MyTranslator.php | UTF-8 | 353 | 2.6875 | 3 | [] | no_license | <?php
class MyTranslator extends Zend_Translate implements Nette\Localization\ITranslator
{
/**
* Translates the given string.
* @param string message
* @param int plural count
* @return string
*/
public function translate($message, $count = NULL)
{
return parent::... | true |
26c4e21eeef2937f4c083752de32fb8c641a00a1 | PHP | fer0nan3do/2DAW | /DWS/repaso/ej6/ej4.php | UTF-8 | 1,328 | 3.015625 | 3 | [] | no_license | <?php
if (isset($_GET['enviar'])) {
if ($_GET['num1'] > $_GET['num2'] && $_GET['num1'] > $_GET['num3']) {
echo "El mayor es " . $_GET['num1'];
if ($_GET['num2'] > $_GET['num3']) {
echo " y el menor es " . $_GET['num3'];
}
if ($_GET['num3'] > $_GET['num2']) {
... | true |
71730b6a193455293354dbddc9b81c3c1709dd01 | PHP | selimrezaa/customerms | /loginProfile.php | UTF-8 | 1,564 | 2.65625 | 3 | [] | no_license | <?php
define('TITLE', 'Login Profile');
include('includes/header.php');
include('connection.php');
session_start();
if($_SESSION['is_login']){
$email = $_SESSION['email'];
}else{
echo "<script>location.href='login.php'</script>";
}
$sql = "SELECT name, email FROM new_table WHERE email = '$email'";
$resul... | true |
cc45bfd9aaa8efc5df529c130016f34d60585a5e | PHP | genma2612/Modelos_Primer_Parcial_Programacion | /Helados/ValidarCliente.php | UTF-8 | 725 | 2.859375 | 3 | [] | no_license | <?php
require_once('./Clases/Cliente.php');
if(isset($_POST['correo']) && isset($_POST['clave']))
{
$retorno = "Cliente inexistente";
$correo = $_POST['correo'];
$clave = $_POST['clave'];
$archivo = "./clientes/clientesActuales.txt";
$f = fopen($archivo, "r");
while(!feof($f))
{
... | true |
bb1894e657fe583ec3be4dfa92fff82ea79c0ead | PHP | KIMEUIJOON/workspace | /web/application/libraries/EX_Form_validation.php | UTF-8 | 5,196 | 2.828125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Ex_Form_validation extends CI_Form_validation
{
public $CI;
public function __construct($rules = array())
{
parent::__construct($rules);
$this->CI =& get_instance();
$this->CI->load->helper('form');
$this->set_error_delimi... | true |
bcc77ff10159b5099bde3481fdb24e45b20a4854 | PHP | Mivgander/chat-app | /database/seeders/WiadomosciSeeder.php | UTF-8 | 916 | 2.78125 | 3 | [] | no_license | <?php
namespace Database\Seeders;
use App\Models\Wiadomosc;
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;
class WiadomosciSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$this->generateWiadomosci(1, [1, 2]);
... | true |
d6534b6725086f5973cc31f336e6b37c636f9c8b | PHP | iamsark/swpanel | /server/classes/db/dal.php | UTF-8 | 2,180 | 3.109375 | 3 | [] | no_license | <?php
require_once ( dirname(dirname(dirname(__FILE__))) ."/config/db-config.php" );
class DALQueryResult {
public $_results = array();
public function __construct(){}
public function __set($var,$val){
$this->_results[$var] = $val;
}
public function __get($var){
if (isset($this->_results[$var])){
retur... | true |
16727396abaebebd7c7687e4668223e50fae4b3b | PHP | hiteshsinghal92/php-rest-api | /backend/controllers/EmployeeController.php | UTF-8 | 10,230 | 2.640625 | 3 | [] | no_license | <?php
namespace backend\controllers;
use backend\models\Employee;
use backend\models\EmployeeAddress;
use yii\filters\VerbFilter;
class EmployeeController extends \yii\web\Controller {
public $enableCsrfValidation = false;
public $data = [];
public function __construct($id, $module, $config = []) {
... | true |
04dea0d816a96594a95f231c3bf6b700dede52b8 | PHP | erandirjunior/backend | /src/Infrastructure/Validator/ClientValidator.php | UTF-8 | 709 | 2.96875 | 3 | [] | no_license | <?php
namespace SRC\Infrastructure\Validator;
class ClientValidator implements \SRC\Domain\Client\Interfaces\ClientValidator
{
private $errors;
public function __construct()
{
$this->errors = [];
}
public function validate(\SRC\Domain\Client\Interfaces\ClientBoundery $clientBoundery): bo... | true |
9543d496cf22b7e6c4ecfa0076ef930cfccb52b8 | PHP | greevex/grunge | /system/searchers/searcher.php | UTF-8 | 566 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace grunge\system\searchers;
/**
* Description of searcher
*
* @author GreeveX <greevex@gmail.com>
*/
class searcher {
private static $backend;
public static function factory($configName = 'default')
{
if(!isset(self::$backend[$configName])) {
$config = \grunge... | true |
2f6408c55f08da51ede0ef5dab65d5d5dd4160ef | PHP | pwn2winctf/challenges-2020 | /web-Watchers/deploy/watchers/weaponlyzer.php | UTF-8 | 2,902 | 2.65625 | 3 | [] | no_license | <?php
function weaponlyzer($home_url, $about_url, $contact_url) {
# kill puppeteer orphans
shell_exec("ps -elf | awk '{if ($5 == 1 && $3 != \"root\" && match($15,'puppeteer')) {print $4}}' | xargs kill -9");
$targets = [$home_url, $about_url, $contact_url];
$applications = ... | true |
7627fe6d6ba6216d8c372e7dbf5189d0abcf86a4 | PHP | MarkForest/network | /models/WorkForm.php | UTF-8 | 1,334 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use yii\base\Model;
class WorkForm extends Model
{
public $organizetion_title;
public $from;
public $to;
public $post;
public function attributeLabels()
{
return [
'organizetion_title'=>'Название организации',
'from'=>'Год устройс... | true |
8ce83143411da332d63b2c7b4f4b5219d43ca622 | PHP | HendrikEduard/PHP-form-validation | /form.php | UTF-8 | 1,649 | 2.6875 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>PHP Secure Form With Validation</title>
<style>
body {background:#f0f8ff; font-size: 16px;}
.error {color: ... | true |
c78cdfa3b0f944e226ca5ad77d5366337b68fc59 | PHP | rochelli/deployThalesmee | /src/metro/admin/modifUser.php | UTF-8 | 4,656 | 2.578125 | 3 | [] | no_license | <?php
require('../conf/connexion_param.php');
require('top.php');
if(isset($_POST["idUser"]))//si l'utilisateur à valider le formulaire, on traite la modification
{
//récup des infos
$idUser=$_POST["idUser"];
$login=htmlspecialchars(mysqli_real_escape_string($bdd,$_POST["login"]));
$nom=strtoupper(htmlspecialchar... | true |
4fbfe726333dd33722963929536efdeea89e5aff | PHP | deferdie/FerdieForum | /app/Http/helpers/functions.php | UTF-8 | 445 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
function process($string, $replacement_array)
{
// dd($replacement_array);
return $string_processed = preg_replace_callback(
'~\{\[\$(.*?)\]\}~si',
function($match) use ($replacement_array)
{
foreach($replacement_array as $var)
{
if($var->name == $match[1])
... | true |
ec84b0f14c7d1aa3926402e02a14752d8f1c5ca0 | PHP | sixno/soxPHP | /sdk/lib/HtmlDom/HtmlDomParser.php | UTF-8 | 5,172 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace HtmlDom;
use \HtmlDom\simple_html_dom;
/**
* Website: http://sourceforge.net/projects/simplehtmldom/
* Additional projects that may be used: http://sourceforge.net/projects/debugobject/
* Acknowledge: Jose Solorzano (https://sourceforge.net/projects/php-html/)
* Contributions by:
* Yousuke Kumak... | true |
aa3ecbb3853e0f8d55848348b5a2d6ec3c535968 | PHP | QPoser/game-table | /src/Entity/Game/Team/GameTeam.php | UTF-8 | 4,602 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Entity\Game\Team;
use App\Entity\Game\Game;
use App\Entity\User;
use App\Repository\Game\Team\GameTeamRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer... | true |
54e9cfccf55f3ece3598adb7cb31f81009897878 | PHP | pewegrzy/financeplan | /dbConnect.php | UTF-8 | 740 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: Peter Wegrzynek
* Date: 20.11.13
* Time: 14:53
* To change this template use File | Settings | File Templates.
*/
require_once('config.php');
class dbConnect {
public static function getConnection() {
$dbhost=config::$dbhost;
$dbuser=config... | true |
73fc5cd859967167955f9c4bf47d97aa624799b9 | PHP | KeithJohnFox/LEARNfrome | /includes/classes/VideoGrid.php | UTF-8 | 11,420 | 3.078125 | 3 | [] | no_license | <?php
require_once("includes/classes/Video.php");
//Video Layout Class
class VideoGrid {
//Private Variables used
private $con, $userLoggedInObj;
private $largeMode = false;
private $gridClass = "videoGrid";
//Constructor
public function __construct($con, $userLoggedInObj) {
$this->co... | true |
e1f02cd3b9355f3e3b32f0dc2144efb225dacb6b | PHP | rheedwahn/oyara-hackathon | /app/Http/Middleware/CustomerBalance.php | UTF-8 | 1,043 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use App\Enum\TransactionType;
use App\Models\Customer;
use App\Services\Transaction\TransactionChargeService;
use Closure;
class CustomerBalance
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
... | true |
16be43eb39e91e53724069770f5a098b1ec1778c | PHP | fjugaldev/mo2o | /src/Domain/Runtasty.php | UTF-8 | 2,393 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Domain;
use GuzzleHttp\Client;
use App\Data\Recipe;
class Runtasty {
public function getReceip(int $page = 1, string $terms = '', string $ingredient = ''): array {
$guzzleClient = new Client(['base_uri' => 'http://www.recipepuppy.com/api/']);
$guzzleResponse = $guzzleClient->... | true |
623483c89a0d3c2d85bf05b37867fddc273eb7d4 | PHP | 554665488/hometest | /continue/continue.php | UTF-8 | 394 | 2.875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 554665488
* Date: 2016/8/27
* Time: 22:36
*/
$i = 0;
while ($i++ < 5) {
echo "Outer<br />\n";
while (1) {
echo "Middle<br />\n";
while (1) {
echo "Inner<br />\n";
continue 3;
}
//echo "This neve... | true |
53828a3dce022d2a7726f16b95455a7f957fc53f | PHP | hanifazzuhdi/learn-oop-php | /Trait.php | UTF-8 | 687 | 3.796875 | 4 | [] | no_license | <?php
// trait mirip dengan extension atau ultilities
// kita bisa menggunakan trait pada class dengan memnaggilnya menggunkan use
// method / property yang ada pada trait yang di use diclass dapat digunakan sebagaimana halnya method / properti class
trait Hello
{
public $name = "__KOSONG__";
public functio... | true |
cbbb0dfbd800da460019deadc7777745a70996a5 | PHP | maureen69170/jeu-combat | /index.php | UTF-8 | 9,412 | 2.734375 | 3 | [] | no_license | <?php
include 'config/autoload.php';
session_start();
if (isset($_GET['deconnexion'])){
session_destroy();
header('Location: .');
exit();
}
include 'config/db.php';
/*$pdo = new PDO('mysql:dbname=jeu_combat;host=127.0.0.1', 'root', '');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCE... | true |
4e2f777f8c41dd209f22d2ad559c537b4d19ac40 | PHP | LiTeraLogic/storeWithComposer | /controllers/Controller.php | UTF-8 | 3,713 | 2.703125 | 3 | [] | no_license | <?php
namespace App\controllers;
use App\services\renderers\IRenderer;
use App\core\App;
use App\services\renderers\TwigRenderer;
use App\services\Request;
/**
* Class Controller
* @package App\controllers
*
* @property Request request
*/
abstract class Controller
{
protected $defaultAction = 'all';
pro... | true |
a244285d8bc344e74b319e0eda596277b1d34ce4 | PHP | Ocramius/Finalizer | /test/FinalizerTestAsset/Finalizable/ClassWithNoMethods.php | UTF-8 | 206 | 2.546875 | 3 | [] | no_license | <?php
namespace FinalizerTestAsset\Finalizable;
use FinalizerTestAsset\EmptyInterface;
/**
* A class that can be made final and has no methods
*/
class ClassWithNoMethods implements EmptyInterface
{
}
| true |
626592843860555dabb7828bf76bdd8cd78f9226 | PHP | PyRowMan/faktory_worker_php | /src/FaktoryWorker.php | UTF-8 | 3,227 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace BaseKit\Faktory;
use Psr\Log\LoggerInterface;
class FaktoryWorker
{
/**
* @var FaktoryClient
*/
private $client;
/**
* @var LoggerInterface
*/
private $logger;
/**
* @var array
*/
private $queues = [];
/**
* @v... | true |
c2a323c51015f504252c3d3748de51a3fb5a391a | PHP | psger/for-Swoole | /catch_error.php | UTF-8 | 1,644 | 2.5625 | 3 | [] | no_license | <?php
register_shutdown_function('handleFatal');
function handleFatal()
{
$error = error_get_last();
// Array
// (
// [type] => 8
// [message] => Undefined variable: hello
// [file] => /home/passenger/swoole/shutdown_function.php
// [line] => 3
// )
if(isset($error['type']))
{
... | true |
ed7111ac0ee77454426826f45dd7c5755f225d56 | PHP | antriver/spend-tracker | /app/Models/Category.php | UTF-8 | 919 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace SpendTracker\Models;
/**
* SpendTracker\Models\Category
*
* @property int $id
* @property string $name
* @property int|null $parentCategoryId
* @property-read \Illuminate\Database\Eloquent\Collection|\SpendTracker\Models\Merchant[] $merchants
* @method static \Illuminate\Database\Eloquent\Build... | true |
eb9a5e9f51d103ab9d66918189b51d73615dafba | PHP | mikolo-94/BookingSystem2 | /app/reservation.php | UTF-8 | 3,263 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class reservation extends Model
{
public function room()
{
return $this->belongsTo('App\room');
}
public function customer()
{
return $this->belongsTo('App\customer');
}
public static function loadCalendarReser... | true |
52f24dabc54bebc09245a3c548e84d328a0f6212 | PHP | anhphambkit/takacrm | /plugins/history/src/Repositories/Caches/CacheHistoryRepositories.php | UTF-8 | 714 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Plugins\History\Repositories\Caches;
use Core\Master\Repositories\Cache\CacheAbstractDecorator;
use Plugins\History\Repositories\Interfaces\HistoryRepositories;
class CacheHistoryRepositories extends CacheAbstractDecorator implements HistoryRepositories
{
/**
* @var HistoryRepositories
... | true |
98fd7962ec4cfc35e726548517675975859ac7b6 | PHP | Buran/ResourceManager | /Resource.php | UTF-8 | 3,818 | 2.984375 | 3 | [] | no_license | <?php
interface iResource {
public function setString($data);
public function setFile($file_name);
}
class Resource extends BaseResource implements iResource {
var $data = false;
var $file_name = false;
public function __construct($driver = false) {
parent::__construct($driver);
}
public fun... | true |
1da609780444ef42e3df0e58c2fbfb3e578ea820 | PHP | MontealegreLuis/php-testing-tools | /ewallet/tests/src/PHPUnit/Constraints/AmountLowerThanConstraint.php | UTF-8 | 841 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
/**
* PHP version 7.4
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
namespace PHPUnit\Constraints;
use Money\Money;
use PHPUnit\Framework\Constraint\Constraint;
final class AmountLowerThanConstraint extends Constraint
{
... | true |
d891ccfe471131af5c9a1dd40a4d026e4955452e | PHP | webstream-framework/WebStream | /src/Annotation/Test/Fixtures/FilterFixture7.php | UTF-8 | 638 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace WebStream\Annotation\Test\Fixtures;
use WebStream\Annotation\Base\IAnnotatable;
use WebStream\Annotation\Attributes\Filter;
/**
* exceptとonlyを同時に指定した場合、exceptが有効になること
* アクションメソッド「だけ=only」でフィルタが有効になり、アクションメソッドで「除外=except」するのでexceptが有効
*/
class FilterFixture7 implements IAnnotatable
{
/**
... | true |