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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
7e731e8cdf0ccd576e088ea0eb1e0696abe4d5e9 | PHP | PHP-CS-Fixer/PHP-CS-Fixer | /src/Fixer/FunctionNotation/RegularCallableCallFixer.php | UTF-8 | 9,160 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\Fixe... | true |
de5552c91a98c4f58b616e4637070b8041ffff82 | PHP | kapilg12/lmk | /app/Office.php | UTF-8 | 1,330 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\Scope\ActiveScope;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
use Baum;
use Auth;
class Office extends Baum\Node
{
protected $table = 'offices';
// 'parent_id' column name
protected $parentColumn = 'parent_id';
// 'lft' column name
... | true |
fad689483c31f15893308660eae301f511e198ee | PHP | Targoniy/PHP-with-MySQL-Essential-Training | /includes/session.php | UTF-8 | 905 | 2.65625 | 3 | [] | no_license | <?php
session_start();
function message()
{
if (isset($_SESSION["message"])) {
$output = "<div class=\"message\">";
$output .= htmlentities($_SESSION["message"]);
$output .= "</div>";
$_SESSION["message"] = null;
return $output;
}
}
function errors()
{
if (isset($... | true |
80b36a023b093ac66d68ddf17b3f64974fe56ca7 | PHP | diegoromero93/elaniin-test | /app/Models/Product.php | UTF-8 | 1,061 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'sku',
'na... | true |
1321127dfc62eb9d0fb2d9bec7ff56fb3f5b5e13 | PHP | vadzzim/commission-task | /src/Model/Operation.php | UTF-8 | 484 | 3.03125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Model;
class Operation
{
public string $date;
public string $type;
public string $amount;
public string $currency;
public string $rate;
public function __construct(string $date, string $type, string $amount, string $currency, string $rate)
{
... | true |
f6b06225b30925146afe3db0c34862f3f49c14d7 | PHP | rmm429/reading | /php/config.php | UTF-8 | 2,818 | 2.71875 | 3 | [] | no_license | <?php
$datetimeUTC = gmdate("Y-m-d H:i:s");
if(isset($_REQUEST))
{
error_reporting(E_ALL && ~E_NOTICE && E_COMPILE_ERROR);
/*
***UNCOMMENT AND SET SRC WHEN TESTING***
$breach_log_file = 'HIDDEN';
$$blocked_file = 'HIDDEN';
$error_log_file = 'HIDDEN';
*/
$ip = $_SERVER["REMOTE_A... | true |
fac3f061ec08bcf47d0cfe88854d120967a3a697 | PHP | brainmangv/omnipay-pagseguro | /src/Message/TransactionSearchResponse.php | UTF-8 | 1,518 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Omnipay\PagSeguro\Message;
use Omnipay\Common\Message\AbstractResponse;
use Omnipay\Common\Message\RequestInterface;
class TransactionSearchResponse extends AbstractResponse
{
public function __construct(RequestInterface $request, $data)
{
parent::__construct($request, $data);
... | true |
46184cdfba265a735dedc1adc438c4357684ad97 | PHP | bxav/service_handler | /src/Bxav/Bundle/ServiceHandlerBundle/Service/SoapServiceManagerService.php | UTF-8 | 766 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Bxav\Bundle\ServiceHandlerBundle\Service;
use Bxav\Bundle\ServiceHandlerBundle\Model\ServiceProviderChain;
class SoapServiceManagerService
{
protected $serviceChain;
public function __construct(ServiceProviderChain $serviceChain)
{
$this->serviceChain = $serviceChain;
}
... | true |
d253e49371b05eaeb04fccbc07acc9d556077fec | PHP | buiphong/sanglocsosinh | /Library/Rewrite.php | UTF-8 | 7,579 | 2.765625 | 3 | [] | no_license | <?php
/**
* Rewrite url
* @author buiphong
*
*/
class Rewrite
{
/**
* Router hiện tại
* @var Router
*/
protected $_router;
/**
* Router trong file rewrite
*/
protected $_routers;
protected $fileName = 'Rewrite.php';
public $file = 'rewrite.xml';
/**
* request uri
*/
protected $_reque... | true |
7866f7510083d8a64d5a076cd7e7ea70b37d4a35 | PHP | saidreamx/Alumni-Network | /backend/upload.php | UTF-8 | 1,725 | 2.71875 | 3 | [] | no_license | <?php
$target_dir = "uploads/";
$time=number_format(round(microtime(true) * 1000),0,'.','');
$target_file = $target_dir . $time .".". pathinfo($_FILES["image"]["name"],PATHINFO_EXTENSION);
$target_file_output=$time .".". pathinfo($_FILES["image"]["name"],PATHINFO_EXTENSION);
$sid=$_POST["s_id"];
echo $sid;
$uplo... | true |
54d0a2c893a4c7df342e5f5c06085e854fb1d07e | PHP | amphp/sync | /src/SemaphoreMutex.php | UTF-8 | 827 | 2.75 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Amp\Sync;
use Amp\ForbidCloning;
use Amp\ForbidSerialization;
final class SemaphoreMutex implements Mutex
{
use ForbidCloning;
use ForbidSerialization;
private bool $locked = false;
/**
* @param Semaphore $semaphore A semaphore with a single lock.
... | true |
5091ee4aefbe324f0414eb83596c9f250d7f28e8 | PHP | yii2-vn/payment | /src/BaseMerchant.php | UTF-8 | 2,182 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @link https://github.com/yii2-vn/payment
* @copyright Copyright (c) 2017 Yii2VN
* @license [New BSD License](http://www.opensource.org/licenses/bsd-license.php)
*/
namespace yii2vn\payment;
use yii\base\Component;
use yii\base\NotSupportedException;
/**
* Class BaseMerchant
*
* @property BasePaym... | true |
8567d2649dd973c3c007db4f1039d6aeffc87fc4 | PHP | icrewsystemsofficial/covid19resources | /app/Models/Mission.php | UTF-8 | 3,661 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
use Exception;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use App\Models\User;
class Mission extends Model
{
use HasFactory;
public const ASSIGNED = '0';
public const INPROGRESS = '1';
public const DELAYED = '2';
pub... | true |
554b5b746b7dd0b4aa52b419922d5e0deae0e5bb | PHP | kennitromero/php-learning | /design-patterns/src/AbstractFactory/ExampleTemplates/ConcreteElements/PHP/PHPTemplateRenderer.php | UTF-8 | 735 | 3.203125 | 3 | [] | no_license | <?php
namespace DesignPatterns\AbstractFactory\ExampleTemplate\ConcreteElements\PHP;
use DesignPatterns\AbstractFactory\ExampleTemplate\AbstractElements\TemplateRenderer;
/**
* Class PHPTemplateRenderer
* @package DesignPatterns\AbstractFactory\ExampleTemplate\ConcreteElements\PHP
*/
class PHPTemplateRenderer imp... | true |
4b805b318ebd7f6b0a2380ff469282319673b712 | PHP | WaseemCake/qb | /tests/intrinsic-sin.phpt | UTF-8 | 740 | 3.078125 | 3 | [] | no_license | --TEST--
Sine test
--FILE--
<?php
/**
* A test function
*
* @engine qb
* @param float64 $[ab]
* @param float32 $[cd]
* @param int32 $i
*
* @return void
*
*/
function test_function($a, $b, $c, $d, $i) {
echo sin($a), "\n";
echo sin($b), "\n";
echo sin($c), "\n";
echo sin($d), "\n";
... | true |
469831568b30eca4f6e9e4df79343126fc3ae8a0 | PHP | JanBlatter/ICT-133_JBR | /Site/view/register.php | UTF-8 | 787 | 2.59375 | 3 | [] | no_license | <?php
/**
* ICT-133_JBR - register.php
* User: Jan.BLATTER
* Date: 20.01.2020
*/
// tampon de flux stocké en mémoire
ob_start();//ouvre la mémoire tampon
$titre="Rent A Snow - Accueil"
?>
<form class="form" method="POST" action="index.php?action=register">
<br>
<h1> Création d'un compte </h1>
<b>Userna... | true |
46b7977083aceb63f0a0aee7ba9cfa5b3c4e1cb2 | PHP | nickspaargaren/php-git-leren | /index.php | UTF-8 | 1,159 | 2.734375 | 3 | [] | no_license | <?php
// Algemene variabelen
$pagina = "php, écht mooi";
$base = "//".$_SERVER['HTTP_HOST']."/"; // {BASISDIR}, soort van.
// Database gegevens
$db_hostname = 'localhost';
$db_database = 'test';
$db_userid = 'root';
$db_password = 'root';
// Connectie met database maken
$mysqli = new mysqli($db_hostname, $db_useri... | true |
eb8dc3d5abb9ba3aad9672158eff25a2b327b126 | PHP | kunx-edu/Interview-record | /frontend/models/Interview.php | UTF-8 | 3,048 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace frontend\models;
use common\helper\Helper;
use Yii;
/**
* This is the model class for table "interview".
*
* @property integer $id
* @property integer $class_id
* @property string $company_name
* @property string $company_address
* @property string $salary
* @property integer $company_type
*... | true |
2415684b45c8dc2d224202830e7f2913ebe172a7 | PHP | crianbra/ProyectoPhp-Grupo8 | /admin/ayudante/guardar.php | UTF-8 | 1,036 | 2.890625 | 3 | [
"MIT"
] | permissive | <html>
<head>
</head>
<body>
<div id="main">
<?php
$valor = $_POST["id"];
$valor2 = $_POST["descripcion"];
$valor3 = $_POST["usuario_id"];
$valor3 = $_POST["reconocimiento_id"];
echo 'Hola Usuario con el ID : ' .htmlspecialchars($valor) . '!';
include_once("AyudanteCollector.php");
$AyudanteCollectorObj = new Ayuda... | true |
0618a021f7b993521f812868e76937cf5e748a86 | PHP | LauraHegay/564729-yeticave | /add.php | UTF-8 | 3,343 | 2.515625 | 3 | [] | no_license | <?php
require_once('functions.php'); //подключаем сценарий с функцией-шаблонизатором
require_once('init.php');
$errors=[];
if (empty($user_name)) {
http_response_code(403);
header("Location: /");
exit();
}
if ($_SERVER['REQUEST_METHOD']==='POST'){
$lot=$_POST;
$required_fields=['lot-name','category'... | true |
9cc0c4a3a89dbda39bbecc00a932d664f664264a | PHP | elhadja/CHU-Bdx | /controller/DelPatController.php | UTF-8 | 1,258 | 2.546875 | 3 | [] | no_license | <?php
include_once 'model/MatStatisticModel.php';
include_once 'view/Welcome.php';
include_once 'model/DelPatModel.php';
class DelPatController
{
private $view;
public function __construct($bdd){
$this->view = new Welcome($bdd);
$model = new MatStatisticModel($bdd);
... | true |
2d156919490f327a1af2b124c89f837709ea3869 | PHP | qlwz/mock | /src/random/helper.php | UTF-8 | 1,742 | 3.375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Mock 一些转换
*
* @author 情留メ蚊子 <qlwz@qq.com>
* @link http://www.94qing.com
*/
/**
* 把字符串的第一个字母转换为大写。
*
* @param string $word
* @return string
*/
function mock_random_capitalize($word = null)
{
if (!$word) {
return $word;
}
return strtoupper(substr($word, 0, 1)) . substr($word... | true |
6681728b7f4718c06e5f24bbbacf97d6d60d3981 | PHP | techichitoltek/zend_istef | /application/modules/backoffice/controllers/PortailurlController.php | UTF-8 | 715 | 2.5625 | 3 | [] | no_license | <?php
/**
* Gestion des url portails
*
* @category backoffice
* @package backoffice_controllers
* @copyright RCWEB
*/
class PortailurlController extends App_Backoffice_Controller
{
/**
* Overrides Zend_Controller_Action::init()
*
* @access public
* @return void
*/
public function... | true |
4ad4885dddd1ff5bc74589befdfa947c4945c99d | PHP | yousafsyed/fyp_fuzzy_keyword | /app/Http/Controllers/UserController.php | UTF-8 | 647 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* User Controller
*/
namespace App\Http\Controllers;
use App\User;
class UserController extends Controller
{
/**
* Confirm email and verify account
* @param String $token
* @return
*/
public function confirmEmail($token)
{
try {
User::whereToken($token... | true |
faf606d7626ddec51a153fe1b53a6ed9dca2b35e | PHP | Detachment-550/det550website | /application/models/Alumni_model.php | UTF-8 | 621 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
use Illuminate\Database\Eloquent\Model;
/**
* Class Test
*/
class Alumni_model extends Model
{
/**
* @var string
*/
protected $table = 'alumni';
/**
* @var string
... | true |
30ab6d35a402eeed8f60b30702b65ebf2a196853 | PHP | gonzalobrolyn/gonejofire | /procesos/registro/empresas.php | UTF-8 | 1,023 | 2.609375 | 3 | [] | no_license |
<?php
session_start();
require_once "../../clases/Imagenes.php";
require_once "../../clases/Empresas.php";
$objImg = new imagenes();
$objEmp = new empresas();
$idPersona = $_SESSION['persona'];
$fechaMundial = time('Y-m-d H:i:s');
$fechaLocal = $fechaMundial - (7*60*60);
$fechaHora = date(... | true |
e2becde34b557777cee7c2b044f00eb4461f01e7 | PHP | nechin/lumen-doctrine-restfull-api | /app/Repositories/Contracts/BaseRepository.php | UTF-8 | 347 | 2.625 | 3 | [] | no_license | <?php
namespace App\Repositories\Contracts;
interface BaseRepository
{
/**
* @param mixed $id
* @return object|null
*/
public function find($id);
/**
* @return array
*/
public function findAll();
/**
* @param array $data
*/
public function insertOrUpdateByE... | true |
3c525b13bb4f7454a2b28aa7d0ba7e5707121530 | PHP | D1ed/spez-gost.ru | /public_html/catalog/model/extension/module/multi_fish_landing.php | UTF-8 | 589 | 2.578125 | 3 | [] | no_license | <?php
class ModelExtensionModuleMultiFishLanding extends Model {
public function getLanding($landing_id) {
$data = array();
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "multi_fish_landing WHERE landing_id = '" . (int)$landing_id . "'");
foreach ($query->rows as $result)... | true |
1cdca9cf452280db7d3e650c052dda304c64b9e8 | PHP | ming123jew/sdcms | /doc/Mysqli.php | UTF-8 | 662 | 3.015625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ming123jew
* Date: 2018-4-17
* Time: 10:43
*/
namespace IMooc;
use IMooc\IDatabase;
class Mysqli implements IDatabase
{
protected $conn;
function connect($host, $user, $password, $dbname)
{
// TODO: Implement connect() method.
$con... | true |
dbc0c6375d710f775deed85c5adeba6fed1b1dc2 | PHP | netzonjoelui/test-backend-app | /tests/NetricTest/Entity/ObjType/NotificationTest.php | UTF-8 | 4,271 | 2.59375 | 3 | [] | no_license | <?php
/**
* Test notification
*/
namespace NetricTest\Entity\ObjType;
use Netric\Entity\EntityInterface;
use Netric\EntityLoader;
use Netric\Entity\ObjType\UserEntity;
use PHPUnit_Framework_TestCase;
use Netric\Mail\Transport\InMemory;
use Netric\EntityQuery;
class NotificationTest extends PHPUnit_Framework_TestCas... | true |
3bf5558e3fa697a7726afb948ef779a4be63abb4 | PHP | VPopchev/phalcon-kanban-board | /app/controllers/UserController.php | UTF-8 | 2,260 | 2.6875 | 3 | [] | no_license | <?php
use App\Forms\UsersForm;
use App\Models\Users;
class UserController extends \Phalcon\Mvc\Controller
{
public function indexAction()
{
}
public function logoutAction()
{
$sessions = $this->getDI()->getShared('session');
$sessions->remove('user_id');
$sessions->remov... | true |
a4c390fece4e41800624b0a22e01f5d0b256e35c | PHP | Takahiro928800/task.php | /task_17-21.php | UTF-8 | 3,398 | 3.859375 | 4 | [] | no_license | print("#####q17#####".PHP_EOL);
<?php
class User
{
protected $name;
protected $age;
protected $gender;
function __construct($user_name,$user_age,$user_gender) {
$this->name = $user_name;
$this->age = $user_age;
$this->gender = $user_gender;
}
function info() {
... | true |
96f4f77e6e5d18a3dd597ea81f6d560390fbca38 | PHP | dyhb/windsforce | /upload/source/include/DoYouHaoBaby/Base/View/#note/View.class.php | UTF-8 | 1,235 | 2.921875 | 3 | [
"BSD-3-Clause"
] | permissive | <?dyhb
class View{
/**
* Template控件
*
* @access private
* @var array
*/
private $_oPar=null;
/**
* Template控件
*
* @access private
* @var array
*/
private $_oTemplate;
/**
* 是否分享全局Template控件
*
* @access private
* @static
* @var object
*/
static private $... | true |
1788b9bb950861eef050a01e4e912bede24c58a9 | PHP | s3inlc/cineast-evaluator | /inc/gamification/Phrases.class.php | UTF-8 | 755 | 3 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by IntelliJ IDEA.
* User: sein
* Date: 20.06.17
* Time: 13:27
*/
class Phrases {
const PHRASES_FILE = "phrases.json";
const PHRASES_START = "startPhrases";
const PHRASES_NORMAL = "phrases";
private $phrases = array();
function __construct() {
$this->phrases = json_decod... | true |
7812ad0f8060a71cf34eb164a8d074844e6534be | PHP | pablo-maldonado/eventosTemplate | /modals/registro.php | UTF-8 | 1,928 | 2.609375 | 3 | [] | no_license | <?php
REQUIRE("conexion.php");
header("Content-Type: text/html;charset=utf-8");
$name = $_POST["nombre"];
$surname = $_POST["apellido"];
$email = $_POST["email"];
$empresa = $_POST["empresa"];
$birthdate = $_POST["birthdate"];
$events_id = $_POST["events_id"];
$maxDate = date("Y-m-d", strtotime('-8 year'));
... | true |
0a04ff52f022672a3eb25ccdb937dd8dd87357aa | PHP | KrystianMroczkowski/Website-project | /login.php | UTF-8 | 2,269 | 2.828125 | 3 | [] | no_license | <?php
session_start();
if(isset($_POST['login']))
{
$OK = true;
$login = $_POST['login'];
$pasw = $_POST['pasw'];
$login = htmlentities($login, ENT_QUOTES, "UTF-8");
require_once "dbconnect.php";
$connection = new mysqli ($host, $db_user, $db_password, $db_name);
try
{... | true |
3d3f50634c17e13a25d37914aec2f68edef12b33 | PHP | crupko93/credit-calculator | /src/helpers.php | UTF-8 | 3,926 | 3.234375 | 3 | [] | no_license | <?php
namespace Credits;
use DateTime;
use DateInterval;
/**
* Считаем дату, на которую приходится следующее погашение
*
* @param DateTime $initial Начальная дата
* @param int $durationType Продолжительность платежного периода
* @param int $repaymentNumber Номер платежного периода
* @return DateTime
* @throws... | true |
10abdc88ae69c2615d47ecee86ac5549b54f231e | PHP | pedrammehrdad/react-with-yii-example | /backend/models/Tracker.php | UTF-8 | 1,246 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for collection "tracker".
*
* @property \MongoDB\BSON\ObjectID|string $_id
* @property mixed $start_time
* @property mixed $end_time
* @property mixed $description
* @property mixed $duration
*/
class Tracker extends \yii\mongodb\ActiveRecord... | true |
974568c1f751a3a7d932598fc51fdf38c195c88f | PHP | bhavisha828/php-day6 | /database/databases.php | UTF-8 | 2,210 | 2.640625 | 3 | [] | no_license | <?php
$connection = mysqli_connect("localhost","root","","tbl_student");
if ($_POST) {
$Name = $_POST['txt1'];
$Gender = $_POST['txt2'];
$Date_of_Birth = $_POST['txt3'];
$Email = $_POST['txt4'];
$Mobileno = $_POST['txt5'];
$Address = $_POST['txt6'];
$Area = $_POST['txt7'];
$Pincode = $_P... | true |
e6b32251bde3523aca9b887b912947a4620fef58 | PHP | SwithFr/BookStore | /views/editors/index.php | UTF-8 | 1,606 | 2.546875 | 3 | [] | no_license | <?php require(D_VIEWS . DS . 'elements' . DS . 'editors-form.php');
use Helpers\Html;
?>
<div class="section">
<div class="section__header">
<h2 class="section__title">Selectionnez un editeur</h2>
</div>
<ul class="filter__list">
<?php for ($i = 'a'; $i <= 'z'; $i++): ?>
<li cla... | true |
f0d2518a92b6962df21dc3201371d9642b37a09f | PHP | maelzx/sodingv1 | /index.php | UTF-8 | 2,917 | 3.15625 | 3 | [] | no_license | <?php
require('db.php');
$db = new Db;
if (isset($_GET['action']) && strtolower($_GET['action']) == "submitadd")
{
if ($_POST['name'] != '' && $_POST['due_date'] != '')
{
$db->insert_todo($_POST['name'], $_POST['due_date']);
}
header('Location: index.php');
}
else if (isset($_GET['action']) ... | true |
3485558062058c6e6e2adb7944af13a385994947 | PHP | AfrikuS/adventure | /app/Modules/Oil/Persistence/Repositories/OilPumpRepo.php | UTF-8 | 1,708 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Modules\Oil\Persistence\Repositories;
use App\Models\Core\Equipment;
use App\Modules\Oil\Domain\Entities\OilPump;
use App\Modules\Oil\Persistence\Dao\EquipmentsDao;
class OilPumpRepo
{
/** @var EquipmentsDao */
private $equipmentsDao;
public function __construct(EquipmentsDao $equipm... | true |
03514ec8c4ced282e6adff183ba86e850c574897 | PHP | eriksencosta/silex-docker-example | /src/Example/Command/FixtureLoad.php | UTF-8 | 2,123 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Example\Command;
use Knp\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class FixtureLoad extends Command
{
protected function configure()
{
$this
-... | true |
61c6ab6e055eefee97d84d80b920ffe3f2e7ab97 | PHP | guidoleen/members_area | /admin_showuser/show-list.php | UTF-8 | 2,465 | 2.78125 | 3 | [] | no_license | <?php
/* Plugin Name: Members Lijst Centre
Plugin URI: http://guidoleen.nl
Desciption: ListBuilder
Version: 1.0
Author: Guido Leen
*/
// TODO > show members from location > SELECT FROM WHERE ....
// Show the widget
function wddp_showfrom_db()
{
echo wddp_search_form();
echo "<br>De gebruikers die eventueel aan t... | true |
b6663f0780806b0c42a240b045a269043a03dd66 | PHP | edufacio/vxml | /src/api/filmpreferences/FilmPreferencesStorage.php | UTF-8 | 1,313 | 2.875 | 3 | [] | no_license | <?php
class FilmPreferencesStorage extends DbStorage{
const PHONE = 'phone';
const FAVOURITE_DIRECTORS = 'favourite_directors';
const FAVOURITE_ACTORS = 'favourite_actors';
const FAVOURITE_GENRES = 'favourite_genres';
const DISLIKED_DIRECTORS = 'disliked_directors';
const DISLIKED_ACTORS = 'disliked_actors';
co... | true |
c9df5bc69fb78fc6d744e91ada6282f733bcb525 | PHP | laudesj/banque | /classes/Compte.php | UTF-8 | 857 | 3.40625 | 3 | [] | no_license | <?php
class Compte {
private $numero;
private $solde;
private $client;
function __construct($solde, $client) {
$this->numero = uniqid();
$this->solde = $solde;
$this->client = $client;
}
public function crediter($montant) {
if($montant > 0) {
$this->solde += $montant;
return $this;
} else {
... | true |
e67ae30faaa71ce2c4415c59381b78a83843b751 | PHP | jadsson/noticias | /Rules/Connection/Connection.php | UTF-8 | 383 | 2.953125 | 3 | [] | no_license | <?php
class Connection {
private static $i;
static function Con() {
if(!isset(self::$i)) {
try {
self::$i = new PDO('mysql:dbname=a_news; host=localhost','root', 'root');
} catch (Exception $e) {
echo 'Erro : '.$e->getMessage();
... | true |
6d206a319bc52fb257ca13bbe800fd752ce71b5e | PHP | TuncayBasak25/AJAX | /multiplication.php | UTF-8 | 464 | 3.953125 | 4 | [] | no_license | <?php
if (isset($_GET['nombre'])) { // Comme c'est une requete de type GET on vas chercher ça dans $_GET
$nombre = $_GET['nombre'];
echo "Voici la table de multiplication de " . $nombre;
echo "<br>";
echo "<br>";
for ($i = 0; $i < 11; $i++) {
echo $nombre . " ... | true |
12acf36b5b208c3842d5f0aabbfd73ed50303a20 | PHP | Gemy-Dev/Redbubble-API | /class.redbubble_cache.php | UTF-8 | 1,032 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
class RedbubbleCache
{
protected $cache_path = '/redbubble_cache/';
protected $duration = 172800; // two days
public function getPath()
{
return dirname(__FILE__) . $this->cache_path;
}
public function getDuration()
{
return $this->duration;
}
pub... | true |
95c3b0621f2dc55b99f3c6f6cd1654cffb9563ca | PHP | tomasfejfar/datetime-strict | /src/DateTime/DateTimeErrorHandler.php | UTF-8 | 490 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace TomasFejfar\DateTime;
class DateTimeErrorHandler
{
public function handle($date, array $errors)
{
$noWarnings = $errors['warning_count'] === 0;
$noErrors = $errors['error_count'] === 0;
$dateParsingSucceeded = ($date !== false);
if ($dateParsingSucceeded && $noWa... | true |
a8950c2f1f977d96d6aaeb05b7d8a5f4d1e3dd61 | PHP | pietrop/team21php | /report/myReportsToAssess.php | UTF-8 | 2,280 | 2.703125 | 3 | [] | no_license | <?php
include "../navbar/navbar.php";
?>
<main>
<!--All assessments group needs to make-->
<div class="container">
<h1>My Assessments to Make</h1>
<?php
$query = "SELECT * FROM `groupreportassessment` AS g INNER JOIN reports AS r
WHERE g.report_ID = r.reportID AND g.group_ID =".$_SESSION['group'].... | true |
695ab51a2493473366bfeaa6882fe76382840055 | PHP | david-beglari/php-mvc | /function.php | UTF-8 | 423 | 2.734375 | 3 | [] | no_license | <?php
/**
* @param object $data
* @param bool $rule
*/
function dd($data, $rule = true)
{
echo '<pre>';
print_r($data);
$rule ? exit() : print ('</pre>');
}
/**
* @param $name
* @param $data
* @return mixed
*/
function view($name, $data = [])
{
extract($data);
return require "app/views/{$na... | true |
9997864b6764279630d31ff70e0f00115418a820 | PHP | big-picture-medical/openehr-data-structures | /src/Rm/DataTypes/Text/DvCodedText.php | UTF-8 | 429 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace BigPictureMedical\OpenEhr\Rm\DataTypes\Text;
class DvCodedText extends DvText
{
public string $_type = 'DV_CODED_TEXT';
public CodePhrase $defining_code;
public static function make(string $value, string $codeString, string $terminologyId): self
{
return new self(
... | true |
7743fad860b915d053b84b982a5fcf7b4a6714ce | PHP | stevenakida/notification | /app/controllers/SubscriptionsController.php | UTF-8 | 3,219 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Carbon\Carbon as Cb;
class SubscriptionsController extends \BaseController {
/**
* Display a listing of subscriptions
*
* @return Response
*/
public function index()
{
$clients = Client::with(['services'])->get()->toArray();
return View::make('subscriptions.index', compact('clien... | true |
b1b6ef30d67a22a225d77e55fa6d4679040852e2 | PHP | roxanerg/projet4 | /App/Model/Comments.php | UTF-8 | 3,610 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Model;
use Core;
class Comments extends \Core\Model
{
/**
* @fn public function get($episodeId)
*
* @brief Gets the comment using the given episode identifier
*
* @author Roxane Riff
* @date 25/03/2019
*
* @param episodeId The episode Identifier to get.
... | true |
4e3fc022949eb4b0148cf326e061e1c61b612db1 | PHP | TheJohnSub/mouseBrains | /Models/Change.php | UTF-8 | 2,460 | 2.890625 | 3 | [] | no_license | <?php
class Change
{
public $ChangeID = 0;
public $MapID = 0;
public $UserID = 0;
public $ChangeDate;
public $ChangeType = 0;
public $OriginalValue = '';
public $NewValue = '';
public $IsPublicChange = 'TRUE';
public $ChangeLog = '';
function CreateFromQuery($DBRow)
{
$this->ChangeID = $DBRow[0];
$thi... | true |
5ed75ac2bd25761a7fe45c8b84f2e235f6033d84 | PHP | dkelly1127/CS405 | /admin/files/php/submit/addProduct.php | UTF-8 | 1,294 | 2.75 | 3 | [] | no_license | <?php
require_once ("../../../../files/database/db_connect.php");
$product_name = $_POST['name'];
$description = $_POST['description'];
$quantity = $_POST['quantity'];
$category_id = $_POST['category_id'];
$price = $_POST['price'];
$image = $_POST['image'];
$discount = $_POST['discount'];
//Sets the image to a defaul... | true |
428fd25fad7c905aac4871fc76aed1b41fcd6e78 | PHP | whoicliu/ooo | /www/Common/Api/SystemApi.class.php | UTF-8 | 726 | 2.671875 | 3 | [] | no_license | <?php
namespace Common\Api;
/**
* 系统API
*/
class SystemApi
{
/**
* 获取插件数量
*
* @param array $where 查询条件数组,默认为空
*
* @return [type] [description]
*/
public function getAddonCount($where = array())
{
$map = !empty($where) ? $where : array('status' => 1);
... | true |
af18e0463a2094db59857bb3326be4037431bc9e | PHP | chitkadia/doodooadmin | /src/Commands/ResetEmailLimitCommand.php | UTF-8 | 4,219 | 2.59375 | 3 | [] | no_license | <?php
/**
* Used to reset Quota of mail account as per user plan
*/
namespace App\Commands;
use \Psr\Http\Message\ServerRequestInterface;
use \Psr\Http\Message\ResponseInterface;
use \Interop\Container\ContainerInterface;
use \App\Components\DateTimeComponent;
use \App\Components\SHAppComponent;
use \App\Components\... | true |
3ac0d154ea910a891f058baf9cde65bb1bdb3e2c | PHP | wnmribeiro/test | /Insecure File Uploads/example2.php | UTF-8 | 565 | 2.96875 | 3 | [] | no_license |
// Is it an image?
if( ( $uploaded_type == "image/jpeg" || $uploaded_type == "image/png" ) &&
( $uploaded_size < 100000 ) ) {
// Can we move the file to the upload folder?
if( !move_uploaded_file( $_FILES[ 'uploaded' ][ 'tmp_name' ], $target_path ) ) {
// No
$html .= '<pre>Your image was not upl... | true |
37ed3927d429a6a7aee1653746ae5ed489414c5c | PHP | bhagoes86/siaro | /application/helpers/coresys_helper.php | UTF-8 | 5,371 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
if (! function_exists('get_controller'))
{
function get_controller($url) {
$ctrl_name = str_replace('/arisan/', '', $url);
$ctrl_name = explode('/', $ctrl_name);
$ctrl_name = $ctrl_name[0]; // controller name
//$ctrl_name = str_r... | true |
a10942b1a7cfd41f3189b6f47c668dafc91f9093 | PHP | lunid/mvc | /sys/classes/commerce/ItemPedido.php | UTF-8 | 6,895 | 3.015625 | 3 | [] | no_license | <?php
namespace sys\classes\commerce;
class ItemPedido {
private $descricao = '';
private $quantidade = 1;
private $precoUnit = 0;
private $unidade = 'CX';
private $campanha = '';
private $saveItem = FALSE;//TRUE = grava o registro atual no servidor remoto.
private $preco... | true |
e341cb0bdc80e0ad789d3bceea708999422d0414 | PHP | Mayowajunior6/fones | /app/Http/Controllers/Admin/ProvincesController.php | UTF-8 | 3,224 | 2.609375 | 3 | [] | no_license | <?php
/**
* Controller for Admin Provinces crud
* @file ProvincesController.php
* @author Mayowa Ajamu <ajamu-m@webmail.uwinnipeg.ca>
* @updated_at 2020-12-5
*/
namespace App\Http\Controllers\admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Province;
class ProvincesController ex... | true |
cf950b33235c66e109753c83292cd2b5bdab4f49 | PHP | threadshare/yii2-alipay | /AlipayApi.php | UTF-8 | 2,741 | 2.515625 | 3 | [] | no_license | <?php
namespace leyestd\alipay;
use leyestd\alipay\Aliconfig;
use leyestd\alipay\lib\AlipaySubmit;
use leyestd\alipay\lib\AlipayCore;
/**
* @abstract 支付宝订单管理
* @author lenovo
*
*/
class AlipayApi extends AlipaySubmit {
public $alipay_config = [];
public function __construct(){
... | true |
5f173393304e1e2a160522ddbfac5128e90d7474 | PHP | WPTEbilkent/WPTE | /database/migrations/2015_12_18_120032_create_tutorials_table.php | UTF-8 | 1,136 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTutorialsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tutorials', function (Blueprint $table) {
... | true |
033e43f14bbd6c51990e21ec5556eef90a9b772e | PHP | ecomsh/webstore | /common/models/Curl.php | UTF-8 | 8,125 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* This is the base curl class
*/
namespace common\models;
use Yii;
use yii\web\BadRequestHttpException;
/**
* Curl Class for curl rest apis
* Normally you should new a Curl entity and call function
* exapmle:
* $this->_curl = Curl::getInstance();
* $data = $this->get();
*
*
*
*... | true |
e54cd4d9171a3430c099058ee879a25b5ce9df50 | PHP | renattomartins/photo-viewer | /src/Widgets/PhotoGallery/GalleryPhoto.php | UTF-8 | 2,711 | 2.96875 | 3 | [] | no_license | <?php
namespace Widgets\PhotoGallery;
use Widgets\Widget;
use Models\PhotoRecord;
/**
* Classe GalleryPhoto.
*
* Essa classe é a representação principal da foto, onde além da imagem em si,
* são renderizados marcações HTML que estruturam e posicionam a imagem dentro
* galeria. Essa classe tem a responsabilidade... | true |
dc8bf3207a140c2ec534047ecf694ad0d2996f93 | PHP | TYPO3-extensions/fal_webdav | /Classes/Utility/EncryptionUtility.php | UTF-8 | 6,273 | 2.8125 | 3 | [] | no_license | <?php
namespace TYPO3\FalWebdav\Utility;
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license inform... | true |
6c42ee91d0f9ae6fa05a6992ba6b1173e4fb636e | PHP | ThanhTrieu/laravel1808e | /app/Models/Brands.php | UTF-8 | 693 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Brands extends Model
{
// chi dinh file model nay lam viec voi bang du lieu nao
protected $table = 'brands';
// tao phuong thuc de lien ket quan he voi model khac
public function products()
{
// y dinh : phuong thuc se l... | true |
d7294e6422906ff0ce6773c5159308eacf931c12 | PHP | gopalindians/base | /src/base/php/router/URI.php | UTF-8 | 2,180 | 3.359375 | 3 | [
"MIT"
] | permissive | <?php
namespace base;
/**
* Class to work with RESTful URIs.
*
* @author Marvin Blum
*/
class URI{
const DELIMETER = '/';
const PARAM_DELIMETER = '/:';
const PARAM_OPTIONAL = '?';
private $route = array();
private $params = array();
private $optionalParams = array();
function __construct($route = null){
... | true |
629459a43d3fb355450b722e06060187a19036f5 | PHP | itkg/core | /src/Itkg/Core/Cache/Adapter/Memcached.php | UTF-8 | 3,150 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Itkg\Core\Cache\Adapter;
use Itkg\Core\Cache\AdapterAbstract;
use Itkg\Core\Cache\AdapterInterface;
use Itkg\Core\CacheableInterface;
/**
* Memcached cache adapter
*/
class Memcached extends AdapterAbstract implements AdapterInterface
{
/**
* Memcached connection instance
* @var \Memc... | true |
e9cc7e18ec5dcfa0f04a9be63f8d1f87a3465ac8 | PHP | alexcaussades/ShadeArmy | /assets/class/players.php | UTF-8 | 3,339 | 2.859375 | 3 | [] | no_license | <?php
namespace ShadeLife;
use PDO;
require 'trait/trait_player.php';
require 'bdd.php';
class Players
{
use TPlayers;
//public $pid;
public function __construct()
{
$this->pid = $this->regexPid();
}
/**
* regexPid
* - Vérifie que le pid soit conforme a la numerotation de steam pour preparer le fonctione... | true |
7d180394741117a481a8146e188f4cca031309c7 | PHP | utopszkij/uklogin | /models/pdfparser.php | UTF-8 | 16,090 | 2.578125 | 3 | [] | no_license | <?php
/**
* OpenId szolgáltatás magyarorszag.hu ügyfélkapu használatával
* @package uklogin
* @author Fogler Tibor
*/
include_once 'vendor/autoload.php';
/** PdfData rekord */
class PdfData {
/** hibaüzenet */
public $error = '';
/** PDF tartalomban a név */
public $txt_name = '';
/** PDF tar... | true |
9787fcb45ca744b41c82d2871e3d99ad3b91b64f | PHP | adamkenway007/PHP-Awal | /pertemuan4/mktime/index.php | UTF-8 | 275 | 2.671875 | 3 | [] | no_license | <?php
// mktime
// membuat sendiri detik sendiri dari detik yang sudah berlalu sejak 1 Januari 1970
// mktime(0,0,0,0,0,0)
//jam-menit-detik-bulan-tanggal-tahun
echo "<br>";
echo mktime(0,0,0,1,10,1998);
echo "<br>";
echo date("l, d-M-Y", mktime(0,0,0,1,10,1998));
?> | true |
56112c8c6950843e3c217f26d70ca96b40167bf9 | PHP | maukoese/lulu | /src/Lulu.php | UTF-8 | 2,613 | 2.671875 | 3 | [] | no_license | ssword on www.lulusms.com
function __construct($AccountNo, $UserName, $Password)
{
$this->$AccountNo = $AccountNo;
$this->$UserName = $UserName;
$this->$Password = $Password;
}
function sms($To , $SMS, $From = 'lulusms.com')
{
// Creates our data array that we want to post to the endpoint
$dat... | true |
d970e9daa3371053bdd79a3d356aa4ded6624a42 | PHP | ctx2002/Tools | /partial_generator.php | UTF-8 | 734 | 3.15625 | 3 | [] | no_license | <?php
function partial($func, ...$args): Closure
{
return static function() use($func, $args) {
return call_user_func_array($func, array_merge($args, func_get_args()));
};
}
function identity ($value) { return $value; };
function compose(...$funcs)
{
return array_reduce($funcs, stati... | true |
2d5ab8305eed45c1d6209f61b4ce2336bee271ad | PHP | JohnWick1975/klases-projektas-CARMOTO | /app/models/Random.php | UTF-8 | 463 | 2.828125 | 3 | [] | no_license | <?php
class Random
{
private $db;
public function __construct()
{
$this->db = new Database();
}
public function randomInfoUrl()
{
$this->db->query("SELECT `img_url` FROM `random` ORDER BY RAND() LIMIT 1");
return $this->db->single();
}
public function random... | true |
fe5a8704842d30f46d76ed98edc25f17f4bcfe36 | PHP | bugrov/yandex-tracker | /src/Api/Requests/Queue/QueueGetAllRequest.php | UTF-8 | 1,275 | 2.6875 | 3 | [] | no_license | <?php
namespace BugrovWeb\YandexTracker\Api\Requests\Queue;
use BugrovWeb\YandexTracker\Api\Client;
/**
* Класс-конструктор для запроса к GET /v2/queues/
*
* @see https://cloud.yandex.ru/docs/tracker/concepts/queues/get-queues
*
* @method QueueGetAllRequest expand(string $field) Дополнительные поля, ... | true |
f7587d302496057d289755f1cf9731ae611c5893 | PHP | rishirajshekhawat/wordpress | /olomo/include/reviews/ratings.php | UTF-8 | 5,915 | 2.703125 | 3 | [] | no_license | <?php
/**
* Listing Ratings
*
*/
/* ============== Ratings Stars ============ */if(!function_exists('olomo_ratings_stars')){
function olomo_ratings_stars($metaboxID, $postID) {
$rating = listing_get_metabox_by_ID($metaboxID ,$postID);
if( !empty($rating)){
$blankstars = 5;
while( $rating > 0){
if($rating... | true |
071cc7c4f56bb75f6efc4a3cf39555d7b49beb00 | PHP | one45/evaluation-data-grabber | /one45api.php | UTF-8 | 5,974 | 2.953125 | 3 | [] | no_license | <?php
class one45API
{
private $base_url;
private $public_api_url;
public $regular_api_url;
private $client_key;
private $client_secret;
private $curl_http_headers = array();
private $session_id = null;
private $authorization = null;
private $access_token = null;
private $curl_headers = array();
private $def... | true |
c5f1742476911c4d4f75f2cf598a8245b44a9cbe | PHP | wasiseal/iLearn_iSearch_API | /refreshDepartPage.php | UTF-8 | 7,471 | 2.65625 | 3 | [] | no_license | <?php
////////////////////////////////////////
//refreshDepartPage.php
//
//1.return string of the department page
//
//#001 Phantom+Odie, 20130430,
// For those departments come from computer list, cannot be edited or deleted.
// flag=1 means manually
// flag=2 means added by computer list
//... | true |
1aa8accec2759ec09276e848776d9b4b976db7b1 | PHP | mele1/music | /includes/classes/LineItem.php | UTF-8 | 471 | 3.515625 | 4 | [] | no_license | <?php
class LineItem {
private $item;
private $quantity;
public function __construct($item, $quantity) {
$this->item = $item;
$this->quantity = $quantity;
}
public function __toString() {
return "Item = ".$this->item.": Quantity = ".$this->quantity;
}
public function getQuantity() {
return $this->qu... | true |
5711ef4901c54b972e968f1837492f297ee416c8 | PHP | JsTimur/pingip | /src/Services/ViewService.php | UTF-8 | 348 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Services;
class ViewService {
private $path;
public function __construct()
{
$this->path = dirname(__DIR__, 2).'/views/';
}
public function show($template = "index", $data = []) {
if (count($data)>0) {
extract($data);
}
return require_once($this->pa... | true |
d63a0510e811adacfea7417f51efc1c950322a17 | PHP | edg2s/PHPDOM | /src/Element/HTML/HTMLMetaElement.php | UTF-8 | 1,597 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Rowbot\DOM\Element\HTML;
/**
* Represents the HTML <meta> element.
*
* @see https://html.spec.whatwg.org/#the-meta-element
*
* @property string $content Reflects the value of the HTML content attribute.
* Contains the value part of a name => value pair when the name attribute
* is presen... | true |
2430186a2e16f3b110d1d42471646d01d239cf85 | PHP | hirdeshvishwdewa/eexam | /editProfile.php | UTF-8 | 1,758 | 2.53125 | 3 | [] | no_license | <?php
if (session_start() && !(isset ($_SESSION['pass']) && isset ($_SESSION['username']))) {
header("Location: login.php");
} else {
require "connection.php";
$username=$_GET["username"];
$sql="SELECT username,name,result,semester,enrollment,email,branch,mobno FROM users WHERE username='$username'";
$res... | true |
1eb22de6a75690e8164519812732ed76b5c2fa91 | PHP | aminemouloud/projet_s6_symfony | /src/DataFixtures/UserFixture.php | UTF-8 | 7,296 | 2.578125 | 3 | [] | no_license | <?php
namespace App\DataFixtures;
use App\Entity\Etudiant;
use App\Entity\Fichepedago;
use App\Entity\UE;
use App\Entity\Parcours;
use App\Entity\Semestre;
use App\Entity\User;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
use Symfony\Component\Security\Core\Encoder\UserPasswordEn... | true |
9ed268cd0d748a5fcd0fbe1a9528b397b4d02fba | PHP | Vieraw/TranslateApi | /TranslateApi/GoogleTranslate.php | UTF-8 | 3,009 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Vieraw
* Date: 25.04.2018
* Time: 13:33
*/
namespace TranslateApi;
/**
* Class GoogleTranslate
* @package TranslateApi
*/
class GoogleTranslate extends AbstractTranslate
{
/**
* GoogleTranslate constr... | true |
42c119b39a274ffb2fb012314ad9ad7793e66a10 | PHP | mobasherfasihi/target-rule-system | /app/Traits/TargetRuleTrait.php | UTF-8 | 1,694 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Traits;
use App\Models\PageTarget;
use App\Models\TargetRule;
use App\User;
trait TargetRuleTrait
{
/**
* Create Target Rules
*
* @param array $ruleData
* @param \App\Models\PageTarget $pageTarget
* @return void
*/
public function createTargetRule(array $rul... | true |
7b2b0b033a03e4b6459431b434d675286fa0bced | PHP | saad197/PHP-Art-Store | /includes/process-review.php | UTF-8 | 1,159 | 2.703125 | 3 | [] | no_license | <?php
require_once ('config.inc.php');
$comment = $_POST['message'];
$star = $_POST['rat'];
$paintingid = $_POST['paintingid'];
echo "$comment";
echo '<br>';
echo "$star";
try {
$conn = new PDO(DBCONNSTRING,DBUSER,DBPASS);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, ... | true |
994980b0b419c77da8b3b81ed06968df2942ad2c | PHP | chege-maina/php-erp | /includes/load_purchase_branch_filter.php | UTF-8 | 610 | 2.515625 | 3 | [] | no_license | <?php
include_once '../includes/dbconnect.php';
session_start();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$branch = $_POST["branch"];
$query = "SELECT count(branch), branch FROM tbl_requisition WHERE status='approved' and branch= '$branch'";
$result = mysqli_query($conn, $query);
$response = array();
while ... | true |
99f9b2aac449a651f492d9c0a64ead2a5014770c | PHP | romulocriston/php7 | /cursoemvideo/PHP/_aula10 referencia/exerc11referencia.php | UTF-8 | 2,128 | 3.09375 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../_css/estilo.css">
<title>Function com referencia</title>
</head>
<body>
<div id="cabecalho">
<p class="cab"> Curso de PHP -... | true |
9a85c98b34b14fc7729546f5b2869121cffc0d11 | PHP | jeffreywang1988/thinkphp-swoole-process | /application/Http/Middleware/ApiRequest.php | UTF-8 | 414 | 2.53125 | 3 | [
"PHP-3.0",
"Apache-2.0"
] | permissive | <?php
namespace app\Http\Middleware;
use think\facade\Env;
use think\facade\Log;
class ApiRequest
{
public $debug;
public function __construct()
{
$this->debug = Env::get('api.HTTP_DEBUG_SWITCH');
}
public function handle($request, \Closure $next)
{
$this->debug && Log::record('request:'... | true |
66128be27cca802eb45cb3e9a037793c33232250 | PHP | swissup/module-core | /Console/Command/ThemeCreate.php | UTF-8 | 4,843 | 2.578125 | 3 | [] | no_license | <?php
namespace Swissup\Core\Console\Command;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\Filesystem;
use Swissup\Core\Console\Command\ThemeCreateCommand;
class ThemeCreate
{
const THEME_COMPOSER_TEMPLATE = <<<EOT
{
"name": "{{... | true |
7f3b7df614b09d81e931cfc054249be8f1a042b6 | PHP | melai-melai/php-console-games | /src/Engine.php | UTF-8 | 1,930 | 3.328125 | 3 | [] | no_license | <?php
namespace PhpConsoleGames\Engine;
use function cli\line;
use function cli\prompt;
use function cli\choose;
use function PhpConsoleGames\Games\HappyTicketGame\runTicketGame;
use function PhpConsoleGames\Games\ParityGame\runParityGame;
/**
* Main scenario
*/
function run()
{
line("Hello, my friend! \n");
... | true |
2ca244a15a2537d7e3cda84e365ea14b1ce0f185 | PHP | bluegrass/blues | /src/Bluegrass/Blues/Component/Widget/Builder/WidgetBuilderInterface.php | UTF-8 | 410 | 2.59375 | 3 | [] | no_license | <?php
namespace Bluegrass\Blues\Component\Widget\Builder;
use Bluegrass\Blues\Component\Widget\WidgetInterface;
/**
* Interfaz que deben implementar las clases encargadas de construir un modelo
* para una vista a partir de un widget.
*
* @author gcaseres
*/
interface WidgetBuilderInterface
{
/**
* Co... | true |
a35d9c529594acba9068e6ad78d47adb085c8960 | PHP | gaua/design-patterns | /Impl/Structural/Composite/Printer.php | UTF-8 | 1,018 | 3.265625 | 3 | [] | no_license | <?php declare(strict_types = 1);
namespace Impl\Structural\Composite;
class Printer
{
const TAB = "    ";
public function print(ToDo $item) : void
{
$this->printWithSpace($item);
}
private function printWithSpace(ToDo $item, string $space = "", int $level = 0) : void
... | true |
9988de301a093285b59cdb93dd559fb070171825 | PHP | zeroisstart/firetech | /backend/models/ResetPasswordForm.php | UTF-8 | 1,800 | 2.90625 | 3 | [] | no_license | <?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2020-06-03 11:36:59
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2020-06-03 11:40:21
*/
namespace backend\models;
use yii\base\InvalidArgumentException;
use yii\base\Model;
use common\models\User;
... | true |
8f2e6187195bb5e6e908596d38e14d3afe6164bc | PHP | sslab-gatech/autofz | /docker/benchmark/seeds/fuzzer-test-suite/php-fuzz-parser/error_reporting10.phpt | UTF-8 | 350 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
error_reporting(E_ALL);
function make_exception()
{
@$blah;
error_reporting(0);
throw new Exception();
}
try {
@make_exception();
} catch (Exception $e) {}
var_dump(error_reporting());
error_reporting(E_ALL&~E_NOTICE);
try {
@make_exception();
} catch (Exception $e) {}
var_dump(error_re... | true |
96b20e4d9be24c15f5758f1996f2162d9c0a2f98 | PHP | kurnikarz/Biskupiec | /src/Entity/PsEmployeeSession.php | UTF-8 | 1,320 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* PsEmployeeSession
*
* @ORM\Table(name="ps_employee_session")
* @ORM\Entity
*/
class PsEmployeeSession
{
/**
* @var int
*
* @ORM\Column(name="id_employee_session", type="integer", nullable=false, options={"unsigned"=true})
... | true |
15a27d78b7f9978606ea16f7a08118c813c9f5bb | PHP | buttjer/Hopkins | /lib.php | UTF-8 | 3,225 | 2.609375 | 3 | [] | no_license | <?php
class Lib {
public $options;
protected $routes;
function __construct($options = array()) {
$this->options = array(
'root' => dirname(__FILE__)
);
foreach ($options as $key => $value) {
$this->options[$key] = $value;
}
$path = scandir(realpath($this->options['... | true |