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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9665b6a1d6a65da62165277a295855a7ed6dab3f | PHP | sgfdevs/h4g-api-jobs | /database/migrations/2019_10_01_020000_create_locations_table.php | UTF-8 | 983 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLocationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('locations', f... | true |
823aa7d5a15af809be46e36c55c956a3cdd99e06 | PHP | Voradius/Api | /src/Voradius/Entity/ProductCategory.php | UTF-8 | 873 | 2.953125 | 3 | [] | no_license | <?php namespace Voradius\Entity;
use Voradius\ClientInterface;
use Voradius\Exceptions\InvalidParameterException;
use Voradius\Helpers\Url;
/**
* Class ProductCategory
* @package Voradius\Entity
*/
class ProductCategory extends AbstractEntity implements EntityInterface
{
/**
*
*/
const PATH = '/... | true |
ab7290b7732419bcbbfc82965fe08772d9adac29 | PHP | ehrlichandreas/ehrlichandreas1-db | /src/EhrlichAndreas/Db/Insert.php | UTF-8 | 3,867 | 3.0625 | 3 | [
"Unlicense"
] | permissive | <?php
//require_once 'EhrlichAndreas/Db/Exception.php';
//require_once 'EhrlichAndreas/Db/Sql.php';
/**
* Class for SQL INSERT generation and results.
*
* @author Ehrlich, Andreas <ehrlich.andreas@googlemail.com>
*/
class EhrlichAndreas_Db_Insert extends EhrlichAndreas_Db_Sql
{
/**
* The initial value... | true |
74cd01c281ca15ffadd6697905fc0a5567fee68c | PHP | jgararuna/main-project | /app/persistence/CustoDAO.php | UTF-8 | 2,042 | 3.046875 | 3 | [] | no_license | <?php
include_once 'PDOConnectionFactory.php';
interface CustoDAO {
public function salvaDAO($custo);
public function alteraCustoDAO($custo);
}
class DefaultCustoDAO extends PDOConnectionFactory implements CustoDAO{
private $conex = null;
public function __construct(){
$this->conex = PDOConnectionFactory:... | true |
573d8f8793326f8b3e730bf498cc86a523b0cc92 | PHP | GLAMOS/dataportal | /vendor/viniciusgava/google-translate-api/src/TranslateInterface.php | UTF-8 | 1,263 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace GoogleTranslate;
/**
* Google Translate API PHP Client
*
* @link https://github.com/viniciusgava/google-translate-php-client
* @license http://www.gnu.org/copyleft/gpl.html
* @version 2.0
* @author Vinicius Gava (gava.vinicius@gmail.com)
*/
interface TranslateInterface
{
/**
* Translat... | true |
baed548e29466da347dd55a7be2f34eb99ee9743 | PHP | forks-library/noteBook | /php/Demo/JavaPHP/Bicycle.php | UTF-8 | 992 | 3.640625 | 4 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: 小粽子
* Date: 2018/12/28
* Time: 14:14
*/
namespace PHP\Demo\JavaPHP;
class Bicycle
{
// 预定义变量
public $cadence;
public $speed;
public $gear;
// 构造函数
public function __construct(int $startCadence, int $startSpeed, int $startGear)
{
$this-... | true |
325d40420abf54b100e0c6a69a83ca3d09cab87e | PHP | tectronics/openpublisher | /modules/keyword/actions/ActionKeywordUpgrade.php | UTF-8 | 3,442 | 2.890625 | 3 | [] | no_license | <?php
// ---------------------------------------------
// Open Publisher CMS
// Copyright (c) 2006
// by Armand Turpel < opublisher@gmail.com >
// http://code.google.com/p/openpublisher//
// ---------------------------------------------
// LICENSE LGPL
// http://www.gnu.org/licenses/lgpl.html
// -----------------------... | true |
6a7c99b32ec99bbb8c5f6ab4274eb77a978d6d0c | PHP | SeanHood/laravel-opentelemetry | /src/Middleware/Trace.php | UTF-8 | 3,293 | 2.6875 | 3 | [] | no_license | <?php
namespace SeanHood\LaravelOpenTelemetry\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use OpenTelemetry\Trace\Span;
use OpenTelemetry\Trace\SpanStatus;
use OpenTelemetry\Trace\Tracer;
/**
* Trace an incoming HTTP request
*/
class Trace
{
/**
* @var Tracer $trace... | true |
41034250e64800da97784e43da4d2186910fae1e | PHP | huygjgjgjgj/thaihuy | /app/Model/User.php | UTF-8 | 3,407 | 2.546875 | 3 | [] | no_license | <?php
App::uses('Model', 'Model','SimplePasswordHasher', 'Controller/Component/Auth');
App::uses('SimplePasswordHasher', 'Controller/Component/Auth');
class User extends AppModel{
public $useTable = 'users';
public $name = 'User';
public function beforeSave($options = array()) {
if (isset($this->data[$this->... | true |
1835e9d7c475007b6a29f6ee7705ee749b53491a | PHP | sadiqhussainrajani/wp-sql-builder | /includes/Query.php | UTF-8 | 17,229 | 2.984375 | 3 | [] | no_license | <?php
namespace WpSqlBuilder;
use WpSqlBuilder\Components\Table;
use WpSqlBuilder\Components\Column;
use WpSqlBuilder\Components\Joint;
use WpSqlBuilder\Components\Limit;
use WpSqlBuilder\Components\Order;
use WpSqlBuilder\Components\Conditions\Simple as Condition;
use WpSqlBuilder\Components\Conditions\Complex as Co... | true |
ecf7dbb496013de0fdff1958baaab864dd8c079c | PHP | alainhays/Olympus | /app/components/Error/FileLogger.php | UTF-8 | 723 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace GetOlympus\Components\Error;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
/**
* Log all errors in log file
*
* @category PHP
* @package GetOlympus
* @subpackage Components\Error\FileLogger
* @author Achraf Chouk <achrafchouk@gmail.com>
* @license https://github.com/GetOly... | true |
26147fb6e1c64aa2997ae45a392d908e584596db | PHP | danieldec/SIMA | /www/php/produccion/listNumCNumEmp.php | UTF-8 | 2,760 | 2.515625 | 3 | [] | no_license | <?php
echo $_SERVER['HTTP_USER_AGENT'];
include '../conexion/conexion.php';
/* otra forma de vincular el resultado de la consulta con una variable cuando se conoce el número de tablas*/
$consulta="select MAX(asistencia.fecha) as fecha from asistencia";
$resultado=$conexion->query($consulta);
if (!$resultado... | true |
958a1bc9d478ee96bbc770b6777ec75b5c0c5896 | PHP | luffy730/Resume | /selfblog/blog/Hdphp/Validate/VaAction.php | UTF-8 | 5,103 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php namespace Hdphp\Validate;
class VaAction
{
//闭包函数
public static $validate=array();
//错误信息
public $message;
/**
* 内容不能为空
*
* @param $name
* @param $value
* @param $msg
*
* @return bool
*/
public function required($name, $valu... | true |
624b87db44c5a2714ba53ca4b11541f4c64cc795 | PHP | Fred-shen0421/backfront-php | /UpdateCardata.php | UTF-8 | 2,192 | 3.0625 | 3 | [] | no_license | <?php
include 'connection.php';
//---------------------------------------------------
//判斷是否上傳成功
if($_POST["BRAND"] == ''){
echo "上傳失敗: 錯誤代碼";
}else{
//取得上傳的檔案資訊=======================================
$one = $_POST["BRAND"]; //檔案名稱含副檔名
$two = $_POST["CARMODEL"];
... | true |
20e8cc0433b6ae9f700a077a6b25ac8a1bb73eb3 | PHP | imu83/AmranProjects | /application/BabulVai/authentication.php | UTF-8 | 817 | 2.59375 | 3 | [] | no_license | <?php
include_once 'Utility/Functions.php';
SetupConnectionToDB ();
$db_tbl_name = 'users';
if (isset ( $_REQUEST ['uid'] )) {
if (! empty ( $_REQUEST ['uid'] )) {
$id = $_REQUEST ['uid'];
$password = $_REQUEST ['upass'];
$myQuery = "SELECT * FROM {$db_tbl_name}
where userID = '{$id}' and userPassw... | true |
2a4913c836db11a5afec688afb57508d5a268c31 | PHP | KNIGHTTH0R/Online-Chat | /online.php | UTF-8 | 439 | 2.578125 | 3 | [] | no_license | <?php
session_start();
include 'database.php';
$n = $_SESSION['username'];
$qry3 = mysql_query("SELECT * FROM `login` WHERE `status`='on';") or die(mysql_error());
echo "People who are online : <br>(If no names are displayed it implies that no one is online right now)";
echo "<h4>";
while($result3 = mysql_fetch_ar... | true |
65eb8760c3e780e7c0f9b91b155cef8c542ba5e4 | PHP | woowup/vtex-woowup-connector | /src/Exceptions/VTEXException.php | UTF-8 | 423 | 2.703125 | 3 | [] | no_license | <?php
namespace WoowUpConnectors\Exceptions;
class VTEXException extends \Exception
{
private $requestParams;
public function __construct($endpoint = "",$params = [])
{
parent::__construct("Mensaje: Maxima cantidad de intentos alcanzada Endpoint: $endpoint");
$this->requestParams = $params;... | true |
3b7c57c347b515fd80afa1832ceecdf3e8253c3c | PHP | awoolstrum/Code-Samples | /2. Coding Challenges/Exercise 3/php_video_rental_statement/src/TextStatement.php | UTF-8 | 409 | 2.859375 | 3 | [] | no_license | <?php
class TextStatement extends Statement
{
public function print()
{
echo $this->getHeader() . "\n";
// determine amounts for each line
foreach ($this->customer->getRentals() as $rental) {
echo "\t" . $this->getMovie( $rental ) . "\n";
}
// add footer lines
ech... | true |
324557a2c1a42a743b51c7766d912c26d1bff5ec | PHP | mouaadBenAllal/boardgametournament | /app/Models/Tournament.php | UTF-8 | 1,567 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Tournament extends Model
{
/**
* Define the usage for softDeletes
*/
use SoftDeletes;
/**
* The variable to store the name of the table.
* @var string
*/
p... | true |
42ff1efb8b79782d890c47076e8033d712e1d9eb | PHP | jzecca/oauth2-monizze | /tests/Provider/MonizzeUserTest.php | UTF-8 | 1,576 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Jzecca\OAuth2\Client\Test\Provider;
use Jzecca\OAuth2\Client\Provider\MonizzeUser;
use PHPUnit\Framework\TestCase;
class MonizzeUserTest extends TestCase
{
/**
* @var MonizzeUser
*/
private $user;
protected function setUp(): void
{
$this->user = new MonizzeUser([
... | true |
491876d5b9a83f7b6c268353f02d0cb13d99a0e8 | PHP | Harvie/Programs | /php/evolutia.php | UTF-8 | 3,169 | 2.546875 | 3 | [] | no_license | <h1>ASIIArt Evolution Matrix</h1>
<?php
$aart='';
$width=20;
$height=10;
$childs=14;
$chars='.*+oO ';
$ratio=9; //probability 1/ratio
if(isset($_POST['aart'])) $aart=$_POST['aart'];
if(isset($_POST['width'])) $width=$_POST['width'];
if(isset($_POST['height'])) $height=$_POST['height'];
if(isset($_POST['child... | true |
aa210f5b0ca94123190e55019d91a8e87cb99f26 | PHP | fahriedr/store_laravel | /database/migrations/2021_01_13_152624_rename_column_brands_table.php | UTF-8 | 882 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class RenameColumnBrandsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('brands', fu... | true |
eb5126f968a858c9f5f377dfc3f4ca0d2a9e31cc | PHP | jensjac/Tenta | /createuser.php | ISO-8859-1 | 805 | 2.765625 | 3 | [] | no_license | <?php
require_once('conn.php');
if(isset($_POST['user']))
{
$dbConn = mysqli_connect($db_hostname, $db_username, $db_password, $db_database);
$user = $_POST['user'];
$pass = $_POST['pass'];
$slump = time() . "gubben" . $user;
$salt = hash('sha256', $slump);
$pass = hash('sha256', $salt.$pass);
$pass = $sal... | true |
d23f5661716fecdb339db52927461147ad6e1e3a | PHP | franky-100977/stock-appro-1 | /model/classes/Article.class.php | UTF-8 | 1,994 | 3.296875 | 3 | [] | no_license | <?php
class Article{
protected
$id = 0, $id_section = 0, $designation = "", $unit_price = 0, $stock = 0,
$minimum_stock = 3, $maximun_stock = 30;
public function __construct(array $datas){
$this->hydrate($datas);
}
public function hydrate(array $donnees){
foreach($donnees as $key => $value){
$method = '... | true |
cbdc64f5d07c6a90ca6b88868b270313c617896b | PHP | Justtolook/BKOlsberg | /bkoapp.hlammert.de/classes/DatabaseHandler.php | UTF-8 | 1,152 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Christian
* Date: 16.10.2018
* Time: 13:07
*/
class DatabaseHandler
{
private $ldbName = "bkoapp";
private $ldbHost = "127.0.0.1";
private $ldbPort = "3306";
private $ldbUser = "bkoapp_admin";
private $ldbPassword = "KP955JeFAeGmHZmZckesdP... | true |
ac10c7e6fe6d6a3c0f8eb9c3190bd805f311cc0c | PHP | ramyareye/elegant | /app/Console/Commands/ResetDemoApp.php | UTF-8 | 1,170 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Services\Installation\AppInstallationService;
/**
* Class ResetDemoApp.
*/
class ResetDemoApp extends Command
{
/**
* @var string
*/
protected $signature = 'demo:reset';
/**
* @var string
*/
protected... | true |
5260281a289b4b7212f2c0fd8860dc216094cba2 | PHP | AllanRanieri/99helps | /classes/usuario.class.php | UTF-8 | 7,267 | 2.890625 | 3 | [] | no_license | <?php
# MODULO USUÁRIO
// Desenvolvido por: Douglas e Jefferson
class Usuario Extends Site {
public $nome = "";
public $sobrenome = "";
public $sexo = "";
public $datanascimento = "";
public $imagem_perfil = "";
public $estado = "";
public $fk_cidades = "";
public $email = "";... | true |
5a17d82c38997d4e063bb8a6e06b7583ab8c1f1d | PHP | 0xWormh0le/gold-pillar | /src/Utils/TakePayments/Gateway/SOAP/SOAPParamAttribute.php | UTF-8 | 836 | 2.984375 | 3 | [] | no_license | <?php
namespace App\Utils\TakePayments\Gateway\SOAP;
use Exception;
class SOAPParamAttribute
{
/**
* @var string
*/
private $m_szName;
/**
* @var string
*/
private $m_szValue;
/**
* @return string
*/
public function getName()
{
return $this->m_szName... | true |
f071f5be8fa6d9b2e142cab3633611d468129308 | PHP | Obusorna/Sonar | /rncphp_sample.php | UTF-8 | 384 | 2.84375 | 3 | [] | no_license | <?php
class Obj {
function foo() {
return "foo";
}
function bar() {
return "bar";
}
};
$myObj = new Obj();
$myObj->foo();
$myObj->bar();
$contacts1 = RNCPHP\Contact::find("Name.Last = 'Smith'"); // NOK {{Use Fetch(ID) instead of Find() for be... | true |
f12bb1ca0d32e3ea30f6d8b3237f934ef6ff1d02 | PHP | Baha2rM98/CarpetShop | /app/Helper/Helper.php | UTF-8 | 1,512 | 2.75 | 3 | [] | no_license | <?php
namespace App\Helper;
use Illuminate\Support\Str;
trait Helper
{
/**
* Returns absolute path of uploaded files on server
*
* @param string $path
* @param string $dir
*
* @return string
*/
public static function getFileAbsolutePath($dir, $path)
{
return... | true |
4c3a03514647e6e549983572c563e5da446b2bc9 | PHP | iskun/iskun.net | /src/DataBundle/Entity/DepartmentsTeachers.php | UTF-8 | 2,474 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace DataBundle\Entity;
/**
* DepartmentsTeachers
*/
class DepartmentsTeachers
{
/**
* @var integer
*/
private $id;
/**
* @var integer
*/
private $status;
/**
* @var \DataBundle\Entity\Departments
*/
private $departments;
/**
* @var \DataB... | true |
309b7d81811391d461f20177c8ff155394d404c8 | PHP | eleazar-rafael/sc | /application/libraries/Parent_child_tree.php | UTF-8 | 3,829 | 3.171875 | 3 | [] | no_license | <?php
class Parent_child_tree{
function __construct()
{
// Call the Model constructor
//parent::__construct();
}
var $item_identifier_field_name; //may be the primary key of the table : as decided by the db designer
var $parent_identifier_field_name; //the fileld n... | true |
aa4a976827543293c08562cb0de86d1ba57a271a | PHP | neos/contentrepository-development-collection | /Neos.EventSourcedContentRepository/Classes/Domain/ValueObject/WorkspaceDescription.php | UTF-8 | 1,179 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Neos\EventSourcedContentRepository\Domain\ValueObject;
/*
* This file is part of the Neos.Neos package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICEN... | true |
bad0dc173790ba049881d44be222c68836866c41 | PHP | rahhal/magasin | /src/Entity/LigneSortie.php | UTF-8 | 2,451 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\LigneSortieRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=LigneSortieRepository::class)
*/
class LigneSortie
{
/**
* @ORM\Id()
* ... | true |
666078bae17278b649520e87dca6261a3b526e5b | PHP | victorcampdelacreu/chess | /prueba.php | UTF-8 | 934 | 2.78125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PRUEBAS</title>
<link rel="stylesheet" href="estilos2.css">
</head>
<body>
<form method="POST" act... | true |
f02467301ed9ade21a3225bbcaddb00c38462eef | PHP | JuanchiSan/Bootcamp | /Day12/classes/VoxineAppcache.class.php | UTF-8 | 2,823 | 3.09375 | 3 | [] | no_license | <?php
/**
* Automatically generates appcache.
*
* @author Alberto Miranda <alberto@nextive.com>
*/
class VoxineAppcache {
/**
* Files and dirs to be excluded from cache
* @var array
*/
private $excluded = array(
'appcache.php',
'.htaccess',
'VoxineAppcache.class.php... | true |
c2725a01297af02d2c074813995124c6b11be0de | PHP | MichalStrzelczyk/zend | /global/naming.php | UTF-8 | 955 | 3.421875 | 3 | [] | no_license | <?php
namespace a\B\c;
$number = 15;
$hex = 0x00000f;
$binary = 0b1111;
$exponential = 0.123456e3;
var_dump(
$number === $number, // true
$hex === $number, // true
$hex === $binary, // true
$exponential === 123.456 // true
);
/**
* Naming
*/
// variables
// - case ... | true |
9b37f6034adf955693fd4686b78c8044a2034389 | PHP | mohammadreza-soft74/engin | /app/Clasess/Base/Managers/ContainerManager/ContainerManager.php | UTF-8 | 10,274 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: mohammadreza
* Date: 11/21/18
* Time: 3:27 PM
*/
namespace App\Clasess\Base\Managers\ContainerManager;
use App\Clasess\Base\Managers\FileManager\FileManager;
use Config;
use Docker\Docker;
use Docker\DockerClientFactory;
use Docker\API\Model\HostConfig;
use Docker\API\Mod... | true |
9d608a297a44c9d39f21470f79ecd844b410292c | PHP | junn-mendoza/kansai.laravel8 | /app/Components/Company.php | UTF-8 | 766 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Components;
use App\Models\GlobalKansai;
use App\Constants\General;
class Company
{
public $name;
public $address;
public $telephone;
public $email;
public $emil2;
public function __construct($countryCode = General::DEFAULT_COUNTRY_CODE)
{
$this->setSiteCount... | true |
82a9e070dbdb325cbac38172169c8a9a10aa44bd | PHP | Uromero11/PhpDB | /Consulta-Oficina.php | UTF-8 | 922 | 2.6875 | 3 | [] | no_license | <html>
<head>
<title>Consulta Oficina</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
include("conexionOficinas.php");
$consulta="Select * from oficinas order by oficina";
echo "<table border='2'>
<tr>
<th>oficina </th>
<th>ciudad </th>
<th>region </th>
<th>directo... | true |
4a7b7eb1e7b818f8ee01ffe2b38c32e0502fb93d | PHP | tatar2/ScrumBA | /controllers/controller_user.php | UTF-8 | 5,637 | 2.75 | 3 | [] | no_license | <?php
/**
* @author Tatar <tatarzb@poczta.onet.pl>
* @version: 0.1
* @license http://www.gnu.org/copyleft/lesser.html
*/
require 'classes/controller.php';
/**
* Controller class for user pages - login, register, index
*
* @abstract
*/
class controller_user extends controller {
/**
* Constructor
*
* Load an... | true |
e22ef1a7d41ae1fa281591b0f932cfcac4acc08f | PHP | Zuckerwattederivat/inomad-blog | /app/controllers/Errors.php | UTF-8 | 638 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/*
* App Errors Controller Class
* Loads error pages
*/
class Errors extends Controller {
public function __construct() {
$this->catModel = $this->model('Category');
}
// index loads 404 method
public function index() {
header('Location: ' . URLROOT . '/errors/page_not_foun... | true |
eaded4f10a218b8223032d7d93bc8441d98ea5d6 | PHP | LauLaman/laravel-assignment | /app/Domain/Import/Customer/CustomerImporter.php | UTF-8 | 3,038 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Domain\Import\Customer;
use App\Domain\CreditCard\CreditCardDatabaseHandlerInterface;
use App\Domain\Customer\CustomerDatabaseHandlerInterface;
use App\Domain\Customer\CustomerModel;
use App\Domain\Database\Exception\NoResultException;
use App\Domain\Import\Requirement\Cr... | true |
06770cbfa8fa6b8ba65b1a55bc4df936267698d4 | PHP | rbtmarques/locadora | /tutor/app/control/Presentation/Forms/FormBuilderView.class.php | UTF-8 | 3,025 | 2.640625 | 3 | [] | no_license | <?php
/**
* FormBuilderView
*
* @version 1.0
* @package samples
* @subpackage tutor
* @author Pablo Dall'Oglio
* @copyright Copyright (c) 2006 Adianti Solutions Ltd. (http://www.adianti.com.br)
* @license http://www.adianti.com.br/framework-license
*/
class FormBuilderView extends TPage
{
pri... | true |
d2c2884c3ca8c1f0bc63937828a213a9e608f00c | PHP | tongsmartza/ProjectDatabase | /response.php | UTF-8 | 1,464 | 2.703125 | 3 | [] | no_license | <html>
<head>
<title>Responding</title>
</head>
<body>
Welcome <?php echo $_POST["FirstName"]; ?>
<?php echo $_POST["LastName"]; ?> <br>
ID <?php echo $_POST["StudentID"]; ?> <br>
Facalty <?php echo $_POST["Facalty"]; ?> <br>
Department <?php echo $_POST["DepartmentName"]; ?> <br>
<br><br>
</body>
<?php
$con=... | true |
be94915fbfb7d16d2ab7dbd2a378e77ba78822cc | PHP | winch123/lombards | /app/lib/Phalib/Paginator/Adapter/SimplePaginatorModel.php | UTF-8 | 4,725 | 2.75 | 3 | [] | no_license | <?php
/*
+------------------------------------------------------------------------+
| Phalcon Framework |
+------------------------------------------------------------------------+
| Copyright (c) 2011-2017 Phalcon Team (https://phalconphp.com) |
... | true |
23def9fe340d648bc54f07e9978e1958a6cf0615 | PHP | codingandcommunity/Learn-With-Coding-And-Community | /moodle/lib/tests/fixtures/testable_core_media_player_native.php | UTF-8 | 2,711 | 2.640625 | 3 | [
"GPL-1.0-or-later",
"GPL-3.0-only",
"MIT"
] | permissive | <?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle ... | true |
e2ec3f0d97808aef9256221e5aea574d58606189 | PHP | jejemaes/webkot | /module/page/view/PageView.class.php | UTF-8 | 1,874 | 2.96875 | 3 | [] | no_license | <?php
class PageView extends View implements iView{
/**
* Constructor
* @param iTemplate $template
*/
public function __construct(iTemplate $template, Module $module){
parent::setTemplate($template);
parent::setModule($module);
$this->configureTemplate();
}
/**
* Set up the Layout according to the ... | true |
28013ffaa5acb81bcee54f9686aa7b4e00d2e60f | PHP | minhduc98/OMS-Laravel-2020 | /app/Http/Controllers/YearController.php | UTF-8 | 1,485 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Year;
use Illuminate\Support\Facades\DB;
class YearController extends Controller
{
public function index(Request $request)
{
$title = 'Year';
$years = Year::all();
return view('year', compact('years', 't... | true |
5450975ef5d2573666e7789f9850ab751f04e96e | PHP | MQEnergy/MQCMS | /service/app/Utils/Redis.php | UTF-8 | 474 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Utils;
use Hyperf\Redis\RedisFactory;
use Hyperf\Utils\ApplicationContext;
class Redis
{
protected $poolName = 'default';
/**
* @return string
*/
public static function getPoolName(): string
{
return (new static())->poolName;
}
... | true |
bb0bbc342909f066533b989968b729198e9ce1c9 | PHP | j311yb311y97/resLifeProject | /database/seeds/BuildingsTableSeeder.php | UTF-8 | 1,181 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class BuildingsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('Building')->insert(array(
['BuildingID' => 1, 'IsAvailable' => 1, 'YearOfResidenceID' => 1, 'BuildingDesc... | true |
d6fe2ccfe119333b98ce5a652830bda949f2cd21 | PHP | tynanoun/condo_management | /database/migrations/2017_09_11_033955_create_maintenances_table.php | UTF-8 | 1,010 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMaintenancesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('maintenanc... | true |
80e00d08ea9b287dea5a2c4f8220b5b562af4c07 | PHP | whizdummy/GpsTracker | /app/Business/ClientBusiness.php | UTF-8 | 882 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Business;
use App\Client;
use App\Repository\ClientRepository;
class ClientBusiness{
public function createClient(Client $client){
if ($client->strFirstName == null || $client->strFirstName == "" || $client->strFirstName == " "){
return "failed-input1";
}
if ($client->strLastN... | true |
5bb5b5a43c0338b72b58b59474d801cdf5aa01ae | PHP | bangil0/SimpleCiShop | /application/controllers/admin/Coupon.php | UTF-8 | 1,543 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
class Coupon extends CI_Controller {
public function __construct()
{
parent::__construct();
}
public function index()
{
$this->list_coupon();
}
public function list_coupon()
{
$coupons = $this->coupon_model->get_all_coupons();
$data = array(
'title' => $this->lang->line('main_manage_coupon... | true |
e806a2fda81c65b119d825f4bef24ca002d3517a | PHP | TheLupa61/phpRegisterWithoutMysql | /vendor/signup.php | UTF-8 | 2,556 | 2.609375 | 3 | [] | no_license | <?php
session_start();
require_once 'connect.php';
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email = $_POST['email'];
$password = $_POST['password'];
$password_confirm = $_POST['password_confirm'];
if (in_array($email, array_column($kitchen, 'em... | true |
b9b65ee47106015ee0ad3edc9099a8060eb2f537 | PHP | hamza1234-ux/carreants | /admin/dealercon.php | UTF-8 | 1,029 | 2.65625 | 3 | [] | no_license | <?php
session_start();
$db = mysqli_connect('localhost', 'root', '', 'carrental');
// initialize variables
$name = "";
$address = "";
$phoneno="";
$id = 0;
$update = false;
if (isset($_POST['save'])) {
$name = $_POST['name'];
$address = $_POST['address'];
$phoneno = $_POST['phone_no'];
mysqli_qu... | true |
bfcc8e8c88ad7b29153dd23551f39610ad6475d6 | PHP | Nortido/task | /app/controllers/ControllerUser.php | UTF-8 | 3,901 | 2.671875 | 3 | [] | no_license | <?php
/**
* @author Evgeny Novoselov <nortido@gmail.com>
*/
use Task\App\Core\Controller;
use Task\App\Core\Route;
use Task\TaskBase;
class ControllerUser extends Controller
{
/**
* ControllerUser constructor.
* @param TaskBase $app
*/
public function __construct(TaskBase $app)
{
$... | true |
431bdcba17bb56bb372c44d576142e3497079ef1 | PHP | sgtpepper9907/sugar-pack | /src/Configuration/OS.php | UTF-8 | 802 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace SugarPack\Configuration;
class OS
{
private function __construct()
{
}
public static function getConfigDir() : string
{
$dir = '$HOME/.config/sugar-pack';
if (static::isWindows()) {
$dir = '%APPDATA%\SugarPack';
}
return exec('echo... | true |
e7619fa15469687311646bb20f901663955ae3aa | PHP | hoatrangnv/tiengtrunganhduong.com | /common/modules/quiz/baseModels/QuizFn.php | UTF-8 | 3,412 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\modules\quiz\baseModels;
use Yii;
/**
* This is the model class for table "quiz_fn".
*
* @property integer $id
* @property string $name
* @property string $description
* @property string $parameters
* @property string $body
* @property string $return_type
* @property integer $async
*... | true |
39df9c0dca3116db944d59f5b0115c5798a4a3ea | PHP | francebenoit/m2i | /Formateur.php | UTF-8 | 5,387 | 3.0625 | 3 | [] | no_license | <?php
include ('Personne.php');
include('Session.php');
class Formateur extends Personne
{
private $entreprise;
private $id;
private $sessions;
//modif
public function setEntreprise($entreprise)
{
$this->entreprise = $entreprise ;
}
public function setId($id)
{
$this->id = $id ;
}
public function ge... | true |
a99762ead7422ab1c5c7aa30ce48921f19482aae | PHP | jasoncot/php-ramda | /src/_isTruthy.php | UTF-8 | 890 | 3.046875 | 3 | [] | no_license | <?php
namespace PHRamda;
/**
* determine if the given value is truthy
* @param mixed $a the subject to be testing
* @return boolean the result of determining the thing is truthy
*/
function _isTruthy($a = null)
{
$argCount = func_num_args();
if ($argCount < 1) {
$initialArgs = func_get_args();... | true |
07198c0212f2d4c61477c8129491df516d2515b3 | PHP | phuongdev89/yii2-ffmpeg | /coordinate/Dimension.php | UTF-8 | 744 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by Navatech.
*
* @project linkyes-net
* @author Phuong
* @email notteen[at]gmail.com
* @date 1/19/2019
* @time 6:04 PM
*/
namespace phuong17889\ffmpeg\coordinate;
class Dimension extends \FFMpeg\Coordinate\Dimension {
const H360 = 360;
const H480 = 480;
const H720 = 720;
... | true |
ff2ce468601fc67d62cc80f5bf214d31c4dd9fd2 | PHP | Nadeemkhattak/wordpress | /wp-content/themes/eduma/inc/widgets/course-categories/tpl/base-v2.php | UTF-8 | 1,433 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later",
"GPL-2.0-only",
"GPL-2.0-or-later"
] | permissive | <?php
echo '<pre>'; print_r( $instance ); echo '</pre>';
$show_count = isset( $instance['list-options']['show_counts'] ) ? $instance['list-options']['show_counts'] : 0 ;
$hierarchical = isset( $instance['list-options']['hierarchical'] ) ? $instance['list-options']['hierarchical'] : true;
$taxonomy = 'course_categ... | true |
1f7fdf86452c77b8f491ac661c81832fba4e95fa | PHP | tony-brewerio/yii2_events_test | /components/EventsBootstrap.php | UTF-8 | 1,323 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\components;
use app\components\events\EventArticleCreated;
use app\components\events\EventUserRegistered;
use app\models\Article;
use app\models\User;
use Yii;
use yii\base\BootstrapInterface;
use yii\base\Event;
use yii\db\ActiveRecord;
class EventsBootstrap implements BootstrapInterface
{
... | true |
b04ad8c054ce92496bac6588a7c6de413b9a757a | PHP | cypryradu/advanced-filter | /src/Filter.php | UTF-8 | 4,817 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
namespace CypryRadu\AdvancedFilter;
use CypryRadu\AdvancedFilter\QueryBuilder\QueryBuilderInterface;
use CypryRadu\AdvancedFilter\ValueObject\TableVO;
use CypryRadu\AdvancedFilter\ValueObject\FieldVO;
/**
* The entry point class for creating the filter.
*
* @author Ciprian Radu <cypryradu@gmail.com>
*/
cla... | true |
b97257fa8bd0352edb30a4b2973874d7bd57008c | PHP | barrioscrespomatias/lab_prog_III | /modelo_parcial/pp_prog_3_lab_3/BACKEND/clases/ICRUD.php | UTF-8 | 620 | 2.96875 | 3 | [] | no_license | <?php
interface ICRUD{
//Retorna un array de EMPLEADOS desde la DB con la descripcion
//del perfil y su foto.
public static function TraerTodos():array;
//A partir de la instancia actual, agrega un nuevo registro en la DB
//TABLA EMPLEADOS. Si pudo agregar retorna TRUE.
public fu... | true |
34abf180e738105a8b13cdd44b23d70a61c074b3 | PHP | hunzhiwange/framework | /tests/assets/database/migrations/20200417142403_test_version.php | UTF-8 | 996 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class TestVersion extends AbstractMigration
{
public function up(): void
{
$this->struct();
}
public function down(): void
{
$this->table('test_version')->drop()->save();
}
private function struc... | true |
5eb702b3d91e49db0c3d8badf0aae1bc281f0e65 | PHP | redbonzai/Laravel-JWT-API-Boilerplate | /app/Http/Controllers/API/PostsController.php | UTF-8 | 4,062 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Http\Resources\PostResource;
use App\Services\AuthService;
use App\Traits\ApiResponder;
use Illuminate\Http\Request;
use App\Models\Likes;
use App\Models\Posts;
use Illuminate\Support\Facades\Log;
class PostsController extends Con... | true |
164e192725ae5060dffd3836fa0aaf5481ae7224 | PHP | noikiy/Bunxious-Website | /Core/Search/Lucene/Analysis/TokenFilter/LowerCase.php | UTF-8 | 645 | 2.5625 | 3 | [] | no_license | <?php
namespace Core\Search\Lucene\Analysis\TokenFilter;
class LowerCase extends \Core\Search\Lucene\Analysis\TokenFilter {
/**
* Normalize Token or remove it (if null is returned)
*
* @param \Core\Search\Lucene\Analysis\Token $srcToken
* @return \Core\Search\Lucene\Analysis\Token
*/
public funct... | true |
a93b5c3c8bbbbdf1aa84e24096f551db77831024 | PHP | giladt/php | /u_zeichenkette.php | UTF-8 | 774 | 3.28125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<?php
//Article details
$article1 = 22.50;
$article2 = 12.30;
$article3 = 5.20;
//Brutto price calculation
$netto_price = $article1 + $article2 + $article3;
$vat_factor = 1.19;
$unit = "€";
$brutto_price = $netto_pri... | true |
cf9d4d4bbc022bfbacddaf184f153e5dc2180fde | PHP | Maksoson/makson.f-dev.ru-public | /components/DB.php | UTF-8 | 491 | 2.78125 | 3 | [] | no_license | <? namespace Makson;
class DB
{
public static function getDb()
{
$config = include $_SERVER["DOCUMENT_ROOT"]."/config/dbconfig.php";
$dsn = "mysql:host={$config['host']};dbname={$config['dbname']}";
try {
$db = new \PDO($dsn, $config['user'], $config['password']);
... | true |
237d2cfcfde1ddf23da6e9b04dab8ec3146d4a79 | PHP | zawaruddin/qb | /code_gen/handlers/Misc/GetTime.php | UTF-8 | 415 | 2.703125 | 3 | [
"PHP-3.01"
] | permissive | <?php
class GetTime extends Handler {
use MultipleAddressMode, NullaryOperator, FloatingPointOnly, Slow;
protected function getActionOnUnitData() {
$lines = array();
$lines[] = "struct timeval tp;";
$lines[] = "if(gettimeofday(&tp, NULL) != -1) {";
$lines[] = "res = tp.tv_sec + tp.tv_usec / 1000000.0;";
... | true |
a8babb5a2aa1bfd8d9b7f529a063b6f06cc4c556 | PHP | Zdalisa/RNS-user_qualification_city | /php/model/user_list.php | UTF-8 | 3,777 | 3.109375 | 3 | [] | no_license | <?php
/*
* Список пользователей
*
*/
// подгрузить необходимые классы
include_once "{$path_model}/common/ticket_list.php";
// описание класса
class UserList extends TicketList {
//--------------------------------------------------------------------------------------------------------------------------------------... | true |
acba9601939be11a89ad8201250390ecf778f6ee | PHP | subscribepro/subscribepro-magento2-ext | /Platform/Platform.php | UTF-8 | 2,833 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Swarming\SubscribePro\Platform;
class Platform
{
/**
* @var \Swarming\SubscribePro\Platform\SdkFactory
*/
protected $sdkFactory;
/**
* @var \Swarming\SubscribePro\Model\Config\Platform
*/
protected $platformConfig;
/**
* @var array
*/
protected $... | true |
5e881a0403c15252b5513adac10e0980858a55cb | PHP | phore/phore-vcs | /src/VcsRepository.php | UTF-8 | 972 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: matthias
* Date: 12.09.18
* Time: 10:00
*/
namespace Phore\VCS;
use Phore\ObjectStore\ObjectStore;
use Phore\ObjectStore\Type\ObjectStoreObject;
interface VcsRepository
{
const STAT_CREATE = "create";
const STAT_MODIFY = "modify";
const STAT_DELETE = "delet... | true |
ea034d5d347567b32dd78fd65071624d55ecace2 | PHP | w3313003/mengyankanshij | /php/application/admin/controller/Video.php | UTF-8 | 13,040 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\admin\controller;
use think\Controller;
use think\Request;
class Video extends Controller
{
//视频分类
public function videoclass_list(){
$class=$class=db('videoclass')->paginate(10);
$this->assign('class',$class);
$page = $class->render();
$this->assign('page'... | true |
ab52e03c6ba94e6e20f0611b375785065f4bdd22 | PHP | ChamesBenJelloul/ParcInformatique | /app/Http/Controllers/HomeController.php | UTF-8 | 1,144 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the appl... | true |
6684b75f6e2ed34413c6414134772283b8a770d7 | PHP | vejlebib/ims-client | /src/Query/Type/GetFineSortingDetailsForTransportUnitResponse.php | UTF-8 | 628 | 2.5625 | 3 | [] | no_license | <?php
namespace IMS\Query\Type;
class GetFineSortingDetailsForTransportUnitResponse
{
/**
* @var \IMS\Query\Type\FineSortingDetailedResultType
*/
private $Result = null;
/**
* @return \IMS\Query\Type\FineSortingDetailedResultType
*/
public function getResult()
{
retur... | true |
e948932aa514c0ba00b15b342b1235e2e84e7f6a | PHP | phuongnguyenpnv/The-Coin-and-Gift-Shop | /connect.php | UTF-8 | 518 | 2.859375 | 3 | [] | no_license | <?php
$conn = mysqli_connect("localhost", "root", "", "thecoingiftshop");
if (!$conn) {
echo "\jdhsfjjsdf";
}
// $sql = "SELECT * FROM products_detail";
// $result = $conn->query($sql);
// if ($result->num_rows > 0) {
// // output data of each row
// while($row = $result->fetch_assoc()) {
... | true |
83128ef924615fec989f52962190b2532e5c1b6e | PHP | franklinmarques/rhsuite-app | /application/entities/EiEscolasCursos.php | UTF-8 | 313 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
include_once APPPATH . 'entities/Entity.php';
class EiEscolasCursos extends Entity
{
protected $id;
protected $id_escola;
protected $id_curso;
protected $id_diretoria_curso;
protected $casts = [
'id' => 'int',
'id_escola' => 'int',
'id_curso' => 'int',
'id_diretoria_curso' => '?int'
];
}
| true |
9795da949ae08172345eeec7b1d7eec77c57f861 | PHP | baophong09/skh-api-client-php | /src/Skh/Request/CurlRequest.php | UTF-8 | 2,195 | 2.9375 | 3 | [] | no_license | <?php
namespace Skh\Request;
class CurlRequest implements RequestInterface
{
public function request($type, $url, $params = [], $token = null)
{
$type = strtolower($type);
return self::$type($url, $params, $token);
}
public static function execute($method = '', $url = ''... | true |
b82e8ec573941f9246e4c4a6e08171b722024f45 | PHP | eclectic-matt/wordpress | /plugins/pre-publish-checklist/pre-publish-checklist.php | UTF-8 | 3,029 | 2.515625 | 3 | [] | no_license | <?php
/**
* @package Pre-Publish Checklist
* @version 0.2
*/
/*
Plugin Name: Pre-Publish Checklist
Plugin URI: http://wordpress.org/plugins/pre-publish-checklist/
Description: This plugin adds a checklist into the Wordpress post editor, and once the author has checked that the requirements for the post have been met... | true |
4399a3e70ff7184eb617dda8cacc35f2b1c8e73a | PHP | fumin666/putian1 | /php/clear.php | UTF-8 | 671 | 3.171875 | 3 | [] | no_license | <?php
function _clear($obj){
// 把两头的空格清空
$obj = trim($obj);
// 把特别的字符不进行解析
$obj = htmlspecialchars($obj);
return $obj;
}
// 弹出框函数
function _alert($info){
echo "<script>alert('$info');window.history.back()</script>";
exit; //相当于JS return
}
// 检查用户名:
function checkName($str,$min,$max){
// 判断长度
i... | true |
93fd23b2575f08d92fa9557cc8353b19208e59e9 | PHP | kanneh/kannehcoddings | /system/classes/system.php | UTF-8 | 408 | 2.859375 | 3 | [] | no_license | <?php
/**
* system class
*/
class System
{
private $version="1.0.0";
private $versionstr="100";
function __construct()
{
}
public function compareVersion()
{
$hnd=curl_init('http://127.0.0.1:88');
ob_start();
$res=curl_exec($hnd);
$ret=ob_clean();
ob_flush();
curl_close($hnd);
... | true |
57aafd77132f4ce9f9af16f656af934055af540c | PHP | ascasc/Yan-Used-book | /public_html/admin/update_book.php | UTF-8 | 5,435 | 2.703125 | 3 | [] | no_license | <?php
header('Content-Type: application/json; charset=utf-8');
include('../HttpStatusCode.php');
include('../../db.php');
try {
$pdo = new PDO("mysql:host=$db[host];dbname=$db[dbname];port=$db[port];charset=$db[charset]", $db['username'], $db['password']);
} catch (PDOException $e) {
echo "Database connection failed.... | true |
8bcc92a44b0f8e3822538a08deab3d2a39e7b4b3 | PHP | elbinfr/aprendiendodedios | /app/Helpers/helpers.php | UTF-8 | 16,504 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
/*
* Verificar si el usuario esta logueado
*/
function is_login()
{
return Auth::check();
}
/*
* Usuario logueado
*/
function current_user()
{
return Auth::user();
}
/*
* Verificar si es superusuario: id = 4
*/
function es_superadmin()
{
if(Auth::user()->perfil_id == 4)
{
return tru... | true |
90907698cdd3cabd35d95b798e9b4ec65f7b9854 | PHP | octalmage/wib | /php-7.3.0/ext/standard/tests/file/file_get_contents_basic.phpt | UTF-8 | 1,232 | 3.078125 | 3 | [
"MIT",
"BSD-4-Clause-UC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"TCL",
"ISC",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"blessing"
] | permissive | --TEST--
file_get_contents() function : basic functionality
--CREDITS--
Dave Kelsey <d_kelsey@uk.ibm.com>
--FILE--
<?php
/* Prototype: string file_get_contents( string $filename[, bool $use_include_path[,
* resource $context[, int $offset[, int $maxlen]]]] )
* Description: Rea... | true |
4ff56052979934afb27b675acd999e1dceda84a5 | PHP | baisam/lemon-ui | /src/Grid/Actions/CheckboxAction.php | UTF-8 | 2,073 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* CheckboxAction.php
* BaiSam huixin
*
* Created by realeff on 2018/11/16.
* Copyright ©2018 Jiangxi baisam information technology co., LTD. All rights reserved.
*/
namespace BaiSam\UI\Grid\Actions;
use BaiSam\UI\Element;
use BaiSam\UI\Form\Traits\Options;
use BaiSam\UI\Grid\Action;
use BaiSam\UI\Gr... | true |
c7fa28ed590b01f0706044e729881ea08d294f71 | PHP | Jevonius/programmes-frontend | /tests/BaseTemplateTestCase.php | UTF-8 | 1,726 | 2.625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | <?php
declare(strict_types = 1);
namespace Tests\App;
use App\DsShared\BasePresenter;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DomCrawler\Crawler;
use Twig_Environment;
abstract class BaseTemplateTestCase extends TestCase
{
/** @var Twig_Environment */
static private $twig;
public static fun... | true |
e46980b50a37ec279b8e28858ac5fd61081a7464 | PHP | z554278767/guild | /app/Repositories/CommerceRepository.php | UTF-8 | 3,729 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use Illuminate\Support\Facades\Input;
use App\Articles;
/**
* @var Commerce仓库
* @author Mr.zqp
*/
class CommerceRepository
{
/**
* 动态列表
* @return json
*/
public function message_list()
{
$re = Articles::orderBy('updated_at','asc')->get(array('a_... | true |
d974b03432a6c7789f13ba67673fc2bf8a286419 | PHP | cxty/pay.dbowner.com | /include/ext/pay/PayCommon.php | UTF-8 | 976 | 2.78125 | 3 | [] | no_license | <?php
/**
* 支付统一接口
*
* @author wbqing405@sina.com
*/
class PayCommon{
public function __construct(){
}
/**
* 初始化支付类
*/
private function init(){
$paytype = strtolower($GLOBALS['config']['pay']['paytype']);
$file = dirname(__FILE__).'/partner/'.$paytype.'.php';
if( file_exists($file) ){
... | true |
b4d562560d8ce23a91ac2aeab3257c27683cac74 | PHP | matoal/IT1 | /kap_10/Losning_oppgaver_i_onenote/oppgave8.php | UTF-8 | 413 | 3.46875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="no" dir="ltr">
<head>
<meta charset="utf-8">
<title>gjennomsnitt</title>
</head>
<body>
<?php
$tallene = array(1, 4, 5, 6);
$sum=0;
for ($tallNr=0; $tallNr < count($tallene); $tallNr++) {
$sum += $tallene[$tallNr];
}
$gjennomsnittet=$su... | true |
20365b35c42ae91e20b161da93d3b5eaebf08b19 | PHP | Elao/ElaoBrowserDetectorBundle | /EventListener/RequestListener.php | UTF-8 | 996 | 2.640625 | 3 | [] | no_license | <?php
namespace Elao\Bundle\BrowserDetectorBundle\EventListener;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\HttpKernel;
use Elao\BrowserDetector\BrowserDetector;
/**
* Request Listener
*/
class RequestListener
{
/**
* Listener manager
*
* @var Brows... | true |
7a206e67e1716457ed7a9f5511a7964982145362 | PHP | cdeguillage/PizzaStore | /pizza_list.php | UTF-8 | 1,785 | 2.546875 | 3 | [] | no_license | <?php
// Title
$currentPageTitle = 'Nos pizzas';
// Utilisateur
$admin = false;
// Header du site web
require_once(__DIR__.'/partials/header.php');
// BDD : On va chercher la liste des pizzas
$query = $db->query('SELECT * FROM pizza WHERE visible = 1 ORDER BY id DESC');
$pizzas = ... | true |
410f03b1647bf4e642c8fbfc53e7b3e76ebd88c3 | PHP | Radius0555/PHP_BOOK_Przestrzenie_nazw | /lista.php | UTF-8 | 247 | 2.578125 | 3 | [] | no_license | <?php
require_once('domestic.php');
require_once('wild.php');
$a=new zwierze();
printf("%s\n",$a->get_type());
$b=new dzikie\zwierze();
printf("%s\n",$b->get_type());
use dzikie\zwierze as bestia;
$c=new bestia();
printf("%s\n",$c->get_type());
?> | true |
b1cf60c9478ba081f98b33c5b02544a30fe011a8 | PHP | movoin/one-swoole | /src/Protocol/Responders/Handlers/XmlHandler.php | UTF-8 | 2,322 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* This file is part of the One package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package One\Protocol\Responders\Handlers
* @author Allen Luo <movoin@gmail.com>
* @since 0.1
*/
namespace One\Pro... | true |
837e7266c6997282cb29ffe09637176796e862c2 | PHP | ririli47/member_picture_book | /app/Libs/Images/UserImageResize.php | UTF-8 | 581 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Libs\Images;
use Intervention\Image\ImageManager;
class UserImageResize
{
public function resize(\SplFileInfo $imageSource): \SplFileInfo
{
$imageDestination = tempnam(sys_get_temp_dir(), '');
(new ImageManager())
->make($imageSource->getRealPath())
... | true |
a975e935e10f56a643f555ef7b1f39b63c1bccab | PHP | prakrit79/php-sql-project | /Core/Hash.php | UTF-8 | 241 | 2.75 | 3 | [] | no_license | <?php
class Hash{
public static function encrypt($password){
return password_hash($password,PASSWORD_DEFAULT);
}
public static function decrypt($password,$hash){
return password_verify($password,$hash);
}
}
?> | true |
d9f05e002668a6cfe086767c4f73c72dcd4ec210 | PHP | adwconsulting/adw-helper | /src/Auth/Tenant.php | UTF-8 | 1,374 | 2.78125 | 3 | [] | no_license | <?php
namespace Adw\Auth;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
use Adw\Exceptions\ConfigMissingException;
use Adw\Exceptions\InvalidTenantException;
class Tenant {
protected $tenantBaseUrl;
protected $tenantClient;
public function __construct()
{
$this->tenan... | true |
cb47af49127632ff4128f0a522d61b0d3867ed3e | PHP | sendim/lbaw1743 | /lbaw-laravel/app/Http/Middleware/Task/UserAssignTask.php | UTF-8 | 757 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Middleware\Task;
use Closure;
use Illuminate\Support\Facades\Auth;
use App\Model\Project;
use App\Model\Task;
class UserAssignTask
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null ... | true |