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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e8199b85493a5ed0779991e13ee27b38a4cdb1d6 | PHP | symfony/symfony | /src/Symfony/Component/Console/Command/DumpCompletionCommand.php | UTF-8 | 5,401 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Console\Command;
use Symfony\Component\Console\Attrib... | true |
94841ced5edfbb74874001a0001a71a2d986b338 | PHP | tausiful/inventory | /database/migrations/2021_03_17_015749_create_product_issue_lists_table.php | UTF-8 | 993 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProductIssueListsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('produ... | true |
4f7fc01c7b80cdc7e65e2f5a3695dca4eb86ab46 | PHP | trevm1226/Trevitter | /src/settingspage.php | UTF-8 | 603 | 2.65625 | 3 | [] | no_license | <html>
<head><title>Settings</title></head>
<body>
<?php
$db = new mysqli("localhost", "trevm12", "CxgY8Eb2tA006aAL", "faketwitter");
if ($db->connect_errno)
{
echo "Sorry, this website is experiencing problems.";
echo "Error: " . $mysqli->connect_error . "\n";
exit;
}
$id = $_GET["id"];
$s... | true |
a1979d80b957db4357f07e5b312b4c40b5fbcfd4 | PHP | fai222/sw_rp | /php/store_character_sheet.php | UTF-8 | 5,956 | 2.546875 | 3 | [] | no_license | <?php
session_start();
session_regenerate_id();
if ($_SESSION['logedin'] == true) {
try {
include 'connect.php';
$character_sheet = json_decode($_POST['character_sheet'], true);
$tables = array(
'armor',
'item',
'obligation',
'motivation',
'talent',
... | true |
ce51b57e65cc717fbd052c0d9bd0648e2620503a | PHP | kojiro526/php-checklist | /src/Libs/Doc/Node.php | UTF-8 | 2,113 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
namespace PhpChecklist\Libs\Doc;
abstract class Node
{
/**
* 生データ
*
* @var string
*/
protected $raw_text;
protected $children = [];
protected $sequence = 0;
/**
* 生のテキストをセットする
*
* @param string $text
*/
protected function setRawText(... | true |
8dd468ad849a10a2ae186aeb42f4c421fbce9405 | PHP | apetitopessoal/curso_web | /contato.php | UTF-8 | 2,209 | 2.609375 | 3 | [] | no_license | <?php
include_once("configuracao.php");
unset($msg_erro, $msg_sucesso);
if($_POST){
if(empty($_POST["nome"]) || empty($_POST["email"]) || empty($_POST["telefone"])){
$msg_erro = "Por favor digite o nome, email e telefone!";
}else{
$assunto = "Contato enviado pelo site - ".date("d")."/".date("M")."/"... | true |
f7c55dc8bc3193a2abd932dba1c0c25c0489bb69 | PHP | frankchn/sofo-2012 | /lib/init/functions.php | UTF-8 | 501 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
function require_login() {
global $user;
if($user == null) error('You must login to access this page.');
}
function error($message) {
echo "<strong>Internal Server Error: $message</strong>";
die();
}
function redirect($url) {
header("Location: $url");
die();
}
function create_link($action, $get_params =... | true |
d0ab9bf77d296784cc357219e04dc903fd50300c | PHP | HecticKaluha/ICT_Rails | /database/seeders/VehicleTypeSeeder.php | UTF-8 | 1,287 | 2.546875 | 3 | [] | no_license | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class VehicleTypeSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
if (Schema::hasTable('... | true |
6f81c1f19ce9d348a11648f430b5a7c94fba7fb6 | PHP | werdan/gfdd-server | /www/tests/application/library/DistanceCalculatorTest.php | UTF-8 | 624 | 2.671875 | 3 | [] | no_license | <?php
class DistanceCalculatorTest extends Zend_Test_PHPUnit_AbstractApiTestCase {
public function testDistanceToTargetInMeters() {
/**
* Check using http://jan.ucc.nau.edu/cvm-cgi-bin/latlongdist.pl
*/
$user = new User();
$user->latitude = 55.45123;
$user->longit... | true |
42a0ca17cad7dde94bd30b321478c887bc1a9c44 | PHP | fanqingxuan/di-ext | /examples/demo2.php | UTF-8 | 506 | 2.65625 | 3 | [] | no_license | <?php
use JsonDi\Di;
use JsonDi\Config;
$di = new Di;
$di->set('config', new Config(
[
'database' => [
'host' => 'localhost',
'username' => 'root',
'password' => '111111'
]
]
));
class MysqlDb
{
public function __construct($config)
{
... | true |
a6813436843a85a13aa005bd76c38d709319a7a1 | PHP | soitpl/php-value-objects | /tests/unit/Objects/DateTime/Unit/MinuteTest.php | UTF-8 | 3,611 | 2.796875 | 3 | [] | no_license | <?php
/**
* MinuteTest.php
*
* @lastModification 22.07.2020, 00:37
* @author Rafał Tadaszak <r.tadaszak@soit.pl>
* @copyright soIT.pl 2018 - 2020
* @url http://www.soit.pl
*/
namespace soIT\ValueObjects\Objects\DateTime\Unit;
use DateTime;
use Faker\Factory;
use Mockery;
use PHPUnit\Framework\TestCase;
use Ref... | true |
e679611380becd6e09168b66a6003e39b7f253ed | PHP | huayun-docs/huayun-openapi-php-api | /ChinacApi/Vpc/V10/ModifyNetworkAttributes.php | UTF-8 | 1,302 | 2.6875 | 3 | [] | no_license | <?php
/**
* 修改私有网络名称、描述
* @author Tu
*/
namespace ChinacApi\Vpc\V10;
use ChinacApi\Core\RpcRequest;
class ModifyNetworkAttributes extends RpcRequest
{
function __construct()
{
parent::__construct('Vpc', '1.0', 'ModifyNetworkAttributes');
}
/**
* 私网Id *(星号为必填,下同)
* @var string
... | true |
82232fd62a640ada21103d9bf28b403201e8a050 | PHP | guitarpoet/clips-tool | /src/Clips/Libraries/Upload.php | UTF-8 | 8,992 | 2.59375 | 3 | [] | no_license | <?php namespace Clips\Libraries; in_array(__FILE__, get_included_files()) or exit("No direct script access allowed");
use Clips\BaseService;
/**
* The same upload library like CodeIgniter
*
* @author Jack
* @date Sat Aug 8 12:15:20 2015
* @version 1.1
*/
class Upload extends BaseService {
public $max_size = 0... | true |
1af74ef2e049e250afca24607dd564ba5b53c732 | PHP | CocoCouq/Velvet-Record | /controllers/lib/library.php | UTF-8 | 1,422 | 3.078125 | 3 | [] | no_license | <?php
function sanitize_int ($input)
{
// Supprime les caractères spéciaux
$result = htmlspecialchars($input);
// Vérifie qu'il s'agit d'un INT
$result = filter_var($result, FILTER_VALIDATE_INT);
// Par exemple pour l'année
$result = trim($result);
// Ret... | true |
2ec9db5f6a2993ca384dd8be5a4232772f1454e0 | PHP | austinkregel/formmodel | /src/FormModel/Frameworks/Materialize.php | UTF-8 | 3,467 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Kregel\FormModel\Frameworks;
class Materialize extends Plain
{
/**
* Generate the form.
*
* @param array $options
*
* @return string
*/
public function form(array $options = [])
{
$method = empty($options['method']) ? $options['method'] : '';
i... | true |
eeaedfb47fb7ef28d0a472d627a3b0cff5f63ca5 | PHP | FlavioLimas/php-udemy | /cookies/exemplo-02.php | UTF-8 | 338 | 2.984375 | 3 | [] | no_license | <?php
// Usando os cookies criados na maquina do usuario
// Se o cookie com nome informado existir ele entra no if
if(isset($_COOKIE["TESTE_COOKIE"])){
// json_decode (,true) com segundo parametro como true retorna um array e sem o true ele retorna um objeto
$obj = json_decode($_COOKIE["TESTE_COOKIE"]);
echo $obj-... | true |
780795e7685303908ad3772508ff56b6102824e6 | PHP | ominux/acawriter | /app/Http/Controllers/HomeController.php | UTF-8 | 1,238 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\User;
use Illuminate\Support\Facades\DB;
use App\Feature;
use App\Document;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
... | true |
5f543225673ae406796ab0ba7c9476afb7c52e3f | PHP | Jimmy-kiarie8/jimInsurance | /app/Http/Controllers/CertificateController.php | UTF-8 | 4,723 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Certificate;
use Illuminate\Http\Request;
use PDF;
use Illuminate\Support\Carbon;
use App\User;
use PdfReport;
// use ExcelReport;
use Auth;
class CertificateController extends Controller
{
/**
* Store a newly created resource in storage.
*
* @param \... | true |
f4072b07e7cbc59ae496602ee51ca9c4e247adb8 | PHP | faecie/async-sockets | /demos/Demo/SimpleServer.php | UTF-8 | 8,703 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Async sockets
*
* @copyright Copyright (c) 2015-2017, Efimov Evgenij <edefimov.it@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Demo;
use AsyncSockets\Event\AcceptEvent;
use AsyncSockets\Event\EventType;
use As... | true |
4d230e276bafd9e8942ff4b480ccfd1015094feb | PHP | trone007/tournament-manager | /src/Controller/TournamentController.php | UTF-8 | 2,639 | 2.59375 | 3 | [] | no_license | <?php
namespace Src\Controller;
use Core\Controller;
use Doctrine\ORM\EntityManagerInterface;
use Src\Assembler\TournamentBracketResourceAssembler;
use Src\Assembler\TournamentResourceAssembler;
use Src\Service\TournamentServiceInterface;
use Twig\Environment;
class TournamentController extends Controller
{
/**
... | true |
845ab4e9959acc4ec3f51dcc6a41e0ed92457862 | PHP | aslijiasheng/ciFramework | /ciFramework/system/core/AutoImports.php | UTF-8 | 1,774 | 2.53125 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* CI_AutoImports
* customerautoimport
* @package
* @version $id$
* @copyright 1997-2005 The PHP Group
* @author Tobias Schlitt <sky@php.net>
* @license PHP Version 5.3
*/
class CI_AutoImports {
protected $autoImport;
public fun... | true |
b908df6b4eee9061ac964804dafe42707c0b13fc | PHP | PrinceDeBoulogne/symfony | /src/Entity/Artiste.php | UTF-8 | 2,999 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ArtisteRepository")
*/
class Artiste
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column... | true |
721d69d3694cb221782bcde299f2c3535ff8f6a5 | PHP | cappelleMedia/farao | /php/dao/sqlsuper.php | UTF-8 | 1,689 | 2.984375 | 3 | [] | no_license | <?php
class SqlSuper {
private $_connection;
public function __construct($host, $username, $passwd, $database) {
//have to make sure database exists on sql server or find way to set db on the fly
$dsn = $host . ';dbname=' . $database;
try {
$this->_connection = new PDO($ds... | true |
5c209933ef447270c031fc6617e1bf1488094e08 | PHP | nikita4380/Khakimov_WEB.github.io | /lab3/s3-5_p.php | UTF-8 | 889 | 2.65625 | 3 | [] | no_license | <?
$question1 = array($_POST["v3"], $_POST["v9"], $_POST["v10"],$_POST["v13"],$_POST["v14"], $_POST["v19"]);
$question2 = array($_POST["v1"], $_POST["v2"], $_POST["v4"],$_POST["v5"],$_POST["v6"], $_POST["v7"],
$_POST["v8"], $_POST["v11"], $_POST["v12"], $_POST["v15"], $_POST["v16"], $_POST["v17"], $_POST["v18"], $_POS... | true |
f9b1c33ff3b48eb12c8992fb6e6348a938147482 | PHP | marioiram2000/DEWS-Nerea | /segundo/DEWS PHP 2/02EjericioIniciacion/ejercicios/ej3.php | UTF-8 | 615 | 2.578125 | 3 | [] | no_license | <!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
$ciudade... | true |
41700935bb4af7706553c19608992392910f1886 | PHP | albatronic/gesgold | /apps/GesGold/entities/models/CaptacionPstoEntity.class.php | UTF-8 | 2,231 | 2.75 | 3 | [] | no_license | <?php
/**
* @author Sergio Perez <sergio.perez@albatronic.com>
* @copyright INFORMATICA ALBATRONIC SL
* @since 25.04.2012 12:27:39
*/
/**
* @orm:Entity(captacion_psto)
*/
class CaptacionPstoEntity extends Entity {
/**
* @orm:GeneratedValue
* @orm:Id
* @orm:Column(type="integer")
* @asse... | true |
3d52fe250f76ee7c3878014a1011245a16adfeff | PHP | WoLfulus/topsort | /src/Implementations/BaseImplementation.php | UTF-8 | 1,763 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace WoLfulus\Topsort\Implementations;
use WoLfulus\Topsort\CircularDependencyException;
abstract class BaseImplementation
{
/**
* @var bool
*/
protected $throwCircularDependency = true;
/**
* @var callable
*/
protected $circularInterceptor;
public function __co... | true |
88f133617013f0d5e0928cfcc40101da405523ac | PHP | Vincentlz/leadshop | /modules/setting/models/Waybill.php | UTF-8 | 3,131 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace setting\models;
use framework\common\CommonModels;
/**
* This is the model class for table "{{%waybill}}".
*
* @property int $id ID
* @property string $code 物流公司编号
* @property string $name 名称
* @property string $mobile 联系方式
* @property string $province 省
* @property string $city 市
* @propert... | true |
a43eb830da11835cf9574684c877a9e7fa340a7c | PHP | khashiz/digibooking | /components/com_vikappointments/helpers/libraries/widget/radio/radio.php | UTF-8 | 2,401 | 2.828125 | 3 | [] | no_license | <?php
/**
* @package VikAppointments
* @subpackage com_vikappointments
* @author Matteo Galletti - e4j
* @copyright Copyright (C) 2019 e4j - Extensionsforjoomla.com. All Rights Reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* @link https://extensionsforjoomla.com
*/
// No di... | true |
dc4ad4578e1230481c7e39c1b1e9884ffd82d6bf | PHP | Swoot1/Rentatool | /application/Tests/ENFrameworkTests/HelperTests/ValidationTests/StringValidationTest.php | UTF-8 | 1,488 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: elinnilsson
* Date: 24/07/14
* Time: 22:15
*/
namespace Rentatool\Tests\ENFrameworkTests\HelperTests\ValidationTests;
use Rentatool\Application\ENFramework\Helpers\Validation\StringValidation;
class StringValidationTest extends \PHPUnit_Framework_TestCase{
/**
* ... | true |
1759161a460e073d2af9abdee31ad0b3590ad4d7 | PHP | Stefkoff/livesocketserver | /src/MyApp/Client.php | UTF-8 | 1,117 | 2.96875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: stefkoff
* Date: 2/11/16
* Time: 7:08 PM
*/
namespace MyApp;
use Ratchet\ConnectionInterface;
class Client extends \SplObjectStorage {
public $topic;
public $id;
/**
* @var ConnectionInterface
*/
private $connection;
public function __co... | true |
fecbeedfb10d01f1ee508114af262d9c7cd8edf2 | PHP | antonyhopkins008/myapp-back-end | /src/Entity/PublishedEntityInterface.php | UTF-8 | 161 | 2.625 | 3 | [] | no_license | <?php
namespace App\Entity;
interface PublishedEntityInterface {
public function setPublished(\DateTimeInterface $published): PublishedEntityInterface;
} | true |
656352e47aa977631c29769d91f09844408fe8e7 | PHP | arueckauer/minion | /test/Command/KevinTest.php | UTF-8 | 686 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace MinionTest\Command;
use Minion\Command\Kevin;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Tester\CommandTester;
class KevinTest extends TestCase
{
/**
* @covers \Minion\Command\Kevin
*/
public function testExecute(): void
{
$co... | true |
7e4b4ce67b8e19dd860cc71d18ba53e8a775be3d | PHP | almamaka/php_gyak | /php/webshop_ajax_komment/password/reset.php | UTF-8 | 3,019 | 2.578125 | 3 | [] | no_license | <?php
require 'PHPMailer/Exception.php';
require 'PHPMailer/PHPMailer.php';
require 'PHPMailer/SMTP.php';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
$mail = new PHPMailer(true);
if(isset($_POST['send'])) {
$pwd = "65432... | true |
25febf2332672e60a3e3800d87fcf2a85a829a96 | PHP | kelvinmo/simplejwt | /src/SimpleJWT/JWT.php | UTF-8 | 16,482 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* SimpleJWT
*
* Copyright (C) Kelvin Mo 2015-2023
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of cond... | true |
193309911baa7a122830d6c472540aae3fd2701e | PHP | danielsdeboer/Mutable | /src/Abstracts/TypeBase.php | UTF-8 | 802 | 3.21875 | 3 | [] | no_license | <?php
namespace Aviator\Mutable\Abstracts;
use Aviator\Mutable\Interfaces\Type;
abstract class TypeBase implements Type
{
/**
* Store for the input
* @var mixed
*/
protected $input;
/**
* Constructor
* @param mixed $input
*/
public function __construct($input)
{
... | true |
6c12765eade8e255ea491340373f13fe50c3c465 | PHP | giseleyasmin/atividades | /cadastrosimples/cadastrar.php | UTF-8 | 720 | 2.734375 | 3 | [] | no_license | <?php
require_once("menu.php");
session_start();
$nome = $_REQUEST["nome"];
$sexo = $_REQUEST["sexo"];
if(!isset($_SESSION["cadastros"])){
$_SESSION["cadastros"] = array();
}
$camposValidados = true;
if(empty($nome)){
echo "Por favor, preencha o... | true |
6a28b094f9190b1615910a5d03db17e8d7367ed9 | PHP | BreiteSeite/ip | /src/Formatter/IPv6/GmpFormatter.php | UTF-8 | 1,006 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: breiti
* Date: 14/06/16
* Time: 22:16
*/
namespace BreiteSeite\IP\Formatter\IPv6;
class GmpFormatter implements FormatterInterface
{
/**
* @var \GMP
*/
private $gmpNumber;
/**
* GmpFormatter constructor.
* @param \GMP $gmpNumber
*/
... | true |
ee5af489dc017e16cc90cbf349aacbb29f7b5335 | PHP | ixiandou/idlebean | /app/Services/Sms.php | UTF-8 | 1,022 | 2.625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Services;
class Sms
{
const URL = 'http://106.ihuyi.cn/webservice/sms.php?method=Submit';
public function send($mobile, $content)
{
file_put_contents('/tmp/sms', var_export(['mobile' => $mobile, 'msg' => $content], true));
$account = env('SMS_ACCOUNT');
$password = env('SMS_PASSWORD');
$... | true |
9cce6ba7fadcbb597616e7117cac846c05ea3f76 | PHP | RandyOfosu/PHP-ADVANCED | /4-Functions/taak02/functies-2.php | UTF-8 | 490 | 3.296875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reken uit!</title>
</head>
<body>
<?php
function rekenUit($nummer1 = 0, $nummer2 = 0, $nummer3 = 0){
$totaal = $nummer1 + $nummer2 + $nummer3;
echo "Als ik d... | true |
51cb8c1ca6051c6682f5cb0fd7eab514d520337f | PHP | ProtonMail/predis | /tests/PHPUnit/PredisTestCase.php | UTF-8 | 10,370 | 2.71875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* This file is part of the Predis package.
*
* (c) Daniele Alessandri <suppakilla@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Predis\Client;
use Predis\Command;
use Predis\Connection;
use Predis\Profil... | true |
abe452a6e73628af8f1089f09abe39ade97ae5a9 | PHP | partho-royy/Simple-Bus-ticket_Reservation-System | /login.php | UTF-8 | 631 | 2.53125 | 3 | [] | no_license | <?php
session_start();
require "db.php";
$login = $_POST['username'];
$password = $_POST['password'];
$qry="SELECT * FROM admin WHERE username='$login' AND password='$password'";
$result=mysqli_query($connect,$qry);
if($result) {
if(mysqli_num_rows($result) > 0) {
session_regenerate_id();
$member = m... | true |
3b7136318671b3c9923dbab98481f264f8b46d5f | PHP | SuSuSoo/Task-Schedule | /app/Event/Message.php | UTF-8 | 369 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* This file is part of Task-Schedule.
*
* @license https://github.com/Hyperf-Glory/Task-Schedule/main/LICENSE
*/
namespace App\Event;
class Message
{
public $message;
public $type;
public function __construct($message, $type = 'text')
{
$this->message ... | true |
3d21d684ef1e1243c88eee3d81b3366ccb333d6c | PHP | dnorth98/victoropsnotifier | /src/Signiant/VictorOps/Notifier.php | UTF-8 | 908 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Signiant\VictorOps;
use GuzzleHttp\Client;
class MissingEndpointURLException extends \Exception
{
}
class Notifier implements Transport
{
public function __construct($config)
{
$routing_key = "everyone";
if (is_array($config))
{
if (array_key_exists("routing_key",$config))
{
$rout... | true |
d3902a39e2ac1dd7d4ba5b9bafe95004358b4245 | PHP | nomadlife/php | /chapter6/ex0603_Adding items to an array and retrieving them.php | UTF-8 | 229 | 3.40625 | 3 | [] | no_license | <?php
echo "ex0603 <br>";
echo "Adding items to an array and retrieving them <br><br>";
$paper[] = "Copier";
$paper[] = "Inkjet";
$paper[] = "Laser";
$paper[] = "Photo";
for ($j = 0 ; $j < 4 ; ++$j)
echo "$j: $paper[$j]<br>";
?> | true |
99cc21978ea93ab06ae96cfe29195ae10d96414e | PHP | waqaskamran/ecash | /ecash-common.cfe/code/ECash/CFE/Action/QueueRemoveAll.php | UTF-8 | 652 | 2.5625 | 3 | [] | no_license | <?php
/**
* Remove from all queues
*
*/
class ECash_CFE_Action_QueueRemoveAll extends ECash_CFE_Base_BaseAction
{
public function getType()
{
return 'QueueRemoveAll';
}
public function getParameters()
{
return array();
}
public function execute(ECash_CFE_IContext $c)
{
$qi = new ECa... | true |
91f1f8f0bac449a39b4e46eec429774818ab2b89 | PHP | fluxbb/commonmark | /src/Parser/Inline/ImageParser.php | UTF-8 | 3,406 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace FluxBB\CommonMark\Parser\Inline;
use FluxBB\CommonMark\Common\Text;
use FluxBB\CommonMark\Node\Inline\Image;
use FluxBB\CommonMark\Node\InlineNodeAcceptorInterface;
use FluxBB\CommonMark\Parser\AbstractInlineParser;
class ImageParser extends AbstractInlineParser
{
/**
* Parse the given cont... | true |
3801afab609e133cb334120a34dfece6ec980dea | PHP | PHPExif/php-exif-common | /tests/Data/ValueObject/ApertureTest.php | UTF-8 | 6,895 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\PHPExif\Common\Data\ValueObject;
use Mockery as m;
use PHPExif\Common\Data\ValueObject\Aperture;
/**
* Class: ApertureTest
*
* @see \PHPUnit_Framework_TestCase
* @abstract
* @coversDefaultClass \PHPExif\Common\Data\ValueObject\Aperture
* @covers ::<!public>
*/
class ApertureTest extends ... | true |
97d4a459196e6325764f0c266b432e7ab0f4c3d6 | PHP | EmaBrr/Kintamieji-ir-salygos-PHP | /index.php | UTF-8 | 8,208 | 3.625 | 4 | [] | 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>Document</title>
</head>
<body>
<?php
// pirma užduotis
echo "<h3>Pirma užduotis: </h3>";
$vardas ... | true |
3781b25b474630e22cfd88b513e0cbd066b30eac | PHP | hyf847510938/TimePost | /app/Models/Email.php | UTF-8 | 381 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Email extends Model
{
protected $primaryKey="email_id";
protected $fillable=[
'title','subject','content','to','status','send_time','scope','user_id'
];
public static function PostEmail(array $attrbute){
$email... | true |
5ad5a4fc4b703d2c8764ff870874c1015b4aca3d | PHP | lmil0001/flinders-mppda | /mppda_open/breadcrumbs/code/BreadcrumbsExtension.php | UTF-8 | 1,568 | 2.984375 | 3 | [] | no_license | <?php
/**
* @package silverstripe-breadcrumbs
*/
class BreadcrumbsExtension extends Extension {
protected $unshifted = array();
protected $pushed = array();
/**
* @param int $depth
* @return string
*/
public function Breadcrumbs($depth = 20) {
$items = $this->getBreadcrumbItems($depth);
$parts = arr... | true |
fc5a9d79bf768c0beb38e2312c93d759ac7c06ee | PHP | juliocaba/blog | /database/seeders/RoleSeeder.php | UTF-8 | 2,759 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
/* importo los modelos de roles de spatie*/
use Spatie\Permission\Models\Role;
use Spatie\Permission\Models\Permission;
/* se crea para la asignacion de roles, para crearlo uso:
php artisan make:seeder RoleSeeder
*/
class RoleSeeder extends Seeder
... | true |
c47cd2c86f28a305cb7ec2561feeb9082d676264 | PHP | TomSygiel/lejt_project | /includes/admin_server.php | UTF-8 | 479 | 2.640625 | 3 | [] | no_license | <?php
require 'database_connection.php';
include '../classes/Admin_posts.php';
$object = new Admin($pdo);
$admin = $object->getAlladminPosts();
// Selects from database in descending order
$statement = $pdo->prepare("SELECT post_id, title, description, created_by, post_date FROM `posts` ORDER BY post_id DESC ");
/... | true |
aac73caa2b6d867847cd60a97078b618badceb47 | PHP | linsbrasil/balbinos | /modelo/funcionario/UsuarioDAO.class.php | UTF-8 | 12,444 | 2.828125 | 3 | [] | no_license | <?php
/**
* Description of UsuarioDAO
*
* @author emers
*/
class UsuarioDAO extends Usuario{
private $table;
private $table_uni;
private $con;
private $SenhaRetorno;
private $SenhaCripto;
private $SenhaNova;
function getSenhaNova() {
return $this->SenhaNova;
}
function s... | true |
2108465d80f76beff8d88c7d924ddaa7bb5e3d74 | PHP | matgargano/chatbot | /app/Http/Controllers/BaseController.php | UTF-8 | 2,963 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class BaseController extends Controller
{
use Autho... | true |
f0c766867b04f15c299e7f53122a1b21d5852b2a | PHP | AAbercrombie0492/solar-suitability-app | /api/email.php | UTF-8 | 1,969 | 2.640625 | 3 | [] | no_license | <?php
/**
* Solarapp Form Handler
* PHP Version 5.2.0
* @author Andy Walz <dev@andywalz.com>
*/
include ("function_library.php");
// Check key (prevent undesireable posts)
if($_POST['skey'] == "Vdb2PwCgMQsEVV3jWfLvqEMLeXchevqq") {
$to = $_POST['to'];
if( isBadEmail($to) ) {
//Email address is bad
if (vers... | true |
04e182b1f5ceef8b92986ff6d2b1359a9cf1d12f | PHP | mattpetts/self-destruct-message | /public_html/assets/php/processor.php | UTF-8 | 2,183 | 3.09375 | 3 | [] | no_license | <?php
class ProcessMessage
{
public function __construct($db_host, $db_user, $db_pass, $db_dbse){
$this->host = $db_host;
$this->dbse = $db_dbse;
$this->user = $db_user;
$this->pass = $db_pass;
}
public function connect () {
$host = $this->host;
$user = $... | true |
b60375cbd7d3ff644a8d8abcff4a77b0b28e2363 | PHP | ngovantu96/php-advanced | /php/week2/constructfruit.php | UTF-8 | 736 | 3.546875 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
class Fruit{
public $name;
public $color;
function __construct($name,$color){
... | true |
2feff90b5c4c3d89ecef306ec087d70efc0a796a | PHP | OfficialOzioma/bitcoinInvest | /models/Investment.php | UTF-8 | 811 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace app\models;
use thecodeholic\phpmvc\db\DbModel;
class Investment extends DbModel
{
public string $package_id;
public string $user_id;
public string $amount_invested;
public string $amount_to_earn;
public string $status = '';
public static function tableName(): string
{
... | true |
de168f2b4046fb48bd9f09781408b010a65a3b29 | PHP | matthewc7/music-chart | /bundles/format/format.php | UTF-8 | 2,196 | 3.515625 | 4 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
class Format {
/**
* Format date from datetime into date only.
* @param strsing $value [value]
* @param string $format [date format]
* @return string
*/
public static function date($value, $format = 'Y-m-d')
{
return date_format(date_create($value), $format);
}
/**
* Replace characte... | true |
005012f545fa583c429e9441f9f315e6c48ca2f9 | PHP | BeaPetazeta/PingPong | /src/repository/ChampionshipRepository.php | UTF-8 | 2,740 | 3.078125 | 3 | [] | no_license | <?php
namespace LeanProgrammers\Repository;
use LeanProgrammers\Model\Championship;
use LeanProgrammers\Framework\Database;
use LeanProgrammers\Repository\PlayerRepository;
class ChampionshipRepository{
//devuelve lista de campeonatos
static public function getAll(){
$pdo = Database::getInstance();
... | true |
6891da661ae9d416700bd3f9eb589ff66dc682d1 | PHP | mccs0064/autt | /protected/models/Driver.php | UTF-8 | 4,553 | 2.53125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "driver".
*
* The followings are the available columns in table 'driver':
* @property integer $id
* @property string $autium_id
* @property string $password
* @property string $full_name
* @property string $policy_number
* @property string $insurer
* @property st... | true |
8bd0c5207e7b4dcaf0c5fe62ead0185535589d2b | PHP | dianeyang/foodfinder | /mobile/mdigest.php | UTF-8 | 2,002 | 2.875 | 3 | [] | no_license | <?php
/*********************************
*
* digest.php
* Harvard Food Finder
*
* allows user to subscribe or unsubscribe to daily digest email
*
********************************/
require("mincludes/config.php");
// if form not yet submitted
if($_SERVER["REQUEST_METHOD"] != "POST")
mrender("mtemplates/diges... | true |
ff2a629134c398c6a2cb11da4dc16ea74c426741 | PHP | dbierer/zf.unlikelysource.net | /data/zf1_examples/zend_form_set_element_filters.php | UTF-8 | 1,061 | 2.671875 | 3 | [] | no_license | <?php
require 'Zend/Form.php';
require 'Zend/Form/Element/Text.php';
require 'Zend/Filter/StringTrim.php';
require 'Zend/Filter/StringToLower.php';
$form = new Zend_Form('test');
$input = new Zend_Form_Element_Text('name');
$input->setFilters(array('StringToLower'));
$form->addElement($input);
if ($form->isValid(array... | true |
fbec8cc74bdc635d3953ade5630a429a61ebf977 | PHP | NewLifeWorks/Software_-Bulgaria | /for_Atomsolution/source_code/e_commorce_kinomania/part_one_frond_end/includes/functions.php | UTF-8 | 314 | 2.796875 | 3 | [] | no_license | <?php
function displayCategories($procesedData){
while($row=mysqli_fetch_assoc($procesedData)){
$category_title = $row['cat_title'];
$category_link = $row['cat_link'];
$display="<li><a href='$category_link'>$category_title</a></li>";
echo $display;
}
}
?> | true |
4a47ad3871396177544d3cba4121fab55131873d | PHP | devmenezes/removedordepalavroes | /src/RemovedorDePalavroes.php | UTF-8 | 2,120 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace RemoverPalavroes;
use RemoverPalavroes\Utils\Juiz;
use RemoverPalavroes\Utils\Limpador;
use RemoverPalavroes\Utils\TextUtil;
use RemoverPalavroes\Configs\Filtros;
class RemovedorDePalavroes
{
private $filtros;
public function __construct()
{
$this->filtros = new Filtros();
}... | true |
25bdfbeb7f1b5e86041f35232c27799cb732c8db | PHP | SeanPortfolio/gateway | /modules/sitemap/main.php | UTF-8 | 2,975 | 2.515625 | 3 | [] | no_license | <?php
$level = 1;
function create_sitemap($parent = 0, $pages)
{
global $htmlroot, $page, $level, $page_accommodation;
$sqlPages = "SELECT gp.`id` AS page_id,
pmd.`id` AS meta_data_id,
pmd.`name`,
pmd.`menu_label` AS menu_label,
pmd.`title` AS page_title,
pmd.`url` AS page_url,
pmd.`f... | true |
49d28a4dc9b8a1c4ab58d041f5c52d45161dfd97 | PHP | Leonardus-dot/crud-codeigniter | /application/views/v_user.php | UTF-8 | 1,050 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <html>
<head>
<title> Leonardus - 2016 </title>
</head>
<body>
<h1>Tabel user</h1>
welcome <?php echo $this->session->userdata('username'); ?> , <?php print " <a href=" . $this->config->base_url() . "login/logout> Logout"; ?><br>
<?php
print "<a href=" . $this->config->bas... | true |
0f4059b509a9dad2344a58fa6ef0f8ab4cac4ad1 | PHP | thefoovault/mars-rover-mission | /src/MarsRoverMission/Domain/TwoDimensionalPlane/Point.php | UTF-8 | 372 | 2.796875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace MarsRoverMission\Domain\TwoDimensionalPlane;
abstract class Point
{
public function __construct(
protected Coordinates $x,
protected Coordinates $y
){}
public function x(): Coordinates
{
return $this->x;
}
public function y():... | true |
4d68789545e1af1018094daaae70bfb158c99fa0 | PHP | zvlzvl/namudarbai1 | /bank2/app/Json.php | UTF-8 | 3,352 | 2.640625 | 3 | [] | no_license | <?php
namespace App;
class Json {
private static $jsonObj;
private $data;
public static function getDB() {
return self::$jsonObj ?? self::$jsonObj = new self;
}
private function __construct()
{
if (!file_exists(DIR.'data/clients.json')) {// pirmas kartas
$data ... | true |
81a692a4bac659a8125491cf295210af3e71b26f | PHP | BrunoNicholas/road-legal | /app/Models/Post.php | UTF-8 | 708 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\Comment;
use App\User;
class Post extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'user_id',
'post_date',
'title',
'd... | true |
62f1d9646d17f77f02c5a25073e867516a5368c6 | PHP | agilee/graphql-server | /src/PersistedQueries/GraphQLPersistedQueryUtils.php | UTF-8 | 1,555 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace GraphQLByPoP\GraphQLServer\PersistedQueries;
use PoP\API\Facades\PersistedQueryManagerFacade;
use PoP\API\Facades\PersistedFragmentManagerFacade;
use GraphQLByPoP\GraphQLQuery\Facades\GraphQLQueryConvertorFacade;
/**
* Watch out! The GraphqL queries will be parsed ALWAYS, f... | true |
3bf0974ac2429abce0cdd30c86905d5892f72917 | PHP | taiwen/OAuth2 | /src/Oauth2/Client/IDP.php | UTF-8 | 5,731 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace OAuth2\Client;
use Guzzle\Service\Client as GuzzleClient;
class IDPException extends \Exception
{
protected $result;
public function __construct($result)
{
$this->result = $result;
$code = isset($result['code']) ? $result['code'] : 0;
if (isset($result['error'])... | true |
0f93f5535833a482dceebf0024f255672b7fe3c0 | PHP | secmohammed/qalzam-backend | /app/Common/Http/Middleware/ParseJWTToken.php | UTF-8 | 1,768 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Common\Http\Middleware;
use Closure;
use JWTAuth;
use Tymon\JWTAuth\Exceptions\JWTException;
use Tymon\JWTAuth\Exceptions\TokenExpiredException;
class ParseJWTToken
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next... | true |
2a867fce8b2b7b5617bb47290efa369f98f1a1c2 | PHP | hackphp/http | /src/Parsers/UploadedFilesParser.php | UTF-8 | 1,938 | 2.859375 | 3 | [] | no_license | <?php
namespace HackPHP\Http\Parsers;
use HackPHP\Http\Stream\StreamFactory;
use HackPHP\Http\Upload\UploadedFileFactory;
class UploadedFilesParser
{
public function __invoke(array $files)
{
return $this->parse($files);
}
private function parse(array $files)
{
$parsed = [];
... | true |
72b772e943d33e16bc3bf097648bf503d48db56f | PHP | pekkis/temp-test | /tests/Pekkis/Drawing/Tests/SquareTest.php | UTF-8 | 473 | 2.9375 | 3 | [] | no_license | <?php
use Pekkis\Drawing\Square;
class SquareTest extends \PHPUnit_Framework_TestCase
{
/**
* @test
*/
public function instantiates()
{
$shape = new Square(123);
$this->assertSame(123, $shape->getWidth());
$this->assertSame(123, $shape->getHeight());
}
/**
*... | true |
5db2f8cc34fd11116796e207be700a5c585ab74e | PHP | Pondit-Hasan/innova | /update_banner.php | UTF-8 | 2,832 | 2.515625 | 3 | [] | no_license | <?php
session_start();
require 'db_connect.php';
$id = $_POST['id'];
$banner_title = htmlentities($_POST['banner_title'], ENT_QUOTES);
$banner_desp = htmlentities($_POST['banner_desp'], ENT_QUOTES);
$banner_btn = htmlentities($_POST['banner_btn'], ENT_QUOTES);
$banner_status = $_POST['banner_status'];
$photo_update =... | true |
36e8077e24dee3a86e87ab11dcf0077bafec1198 | PHP | fgyost3/worcount_tracker | /wordtrackcal.class.php | UTF-8 | 2,226 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
namespace Yostworks\Classes;
class WordTracker
{
const VERSION = "1.0.0";
const LAST_UPDATED = "2019/11/17";
public function __construct()
{
// variables declared
} // end __construct
public function addYear($year = "2019")
{
// method that initiates the ... | true |
4c295c61ffb96a8a3061e39892b6e01b0e72532f | PHP | emiliopedrollo/apsoo | /app/Support/GravatarDecorator.php | UTF-8 | 857 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Support;
use App\Models\User;
use \Pedrollo\GravatarLib\Gravatar;
class GravatarDecorator extends Gravatar
{
const DEFAULT_IMAGE_404 = '404';
const DEFAULT_IMAGE_MM = 'mm';
const DEFAULT_IMAGE_IDENT_ICON = 'identicon';
const DEFAULT_IMAGE_MONSTER_ID = 'monsterid';
const DEFAU... | true |
bd5f30a6ccdebf57a2ce973f1bbd03c827c1cb88 | PHP | ekotanjyan/staffApplication | /app/Http/Middleware/StripeConnected.php | UTF-8 | 607 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
class StripeConnected
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(!auth()->user(... | true |
c5548616584987701b7d386f99faad939d2688ba | PHP | pauloafonso/inventory-control | /src/Domain/Validator/NotEmptyValidator.php | UTF-8 | 369 | 2.9375 | 3 | [] | no_license | <?php
namespace Domain\Validator;
use Domain\Validator\Exceptions\{
ValidatorException,
NotEmptyException,
};
class NotEmptyValidator implements ValidatorInterface
{
public function isValid(mixed $value): void
{
if (empty($value) || "" === $value) {
throw new NotEmptyException("Valu... | true |
9dfb646eb21d363cf086808ad2a1c419543568cb | PHP | borkenegg/Vue_personnelManagement | /php/getData.php | UTF-8 | 562 | 2.875 | 3 | [] | no_license | <?php
require("./connect.php");
class Member{
public $name;
public $sex;
public $tel;
};
$data = array();
$select_sql = "select * from member";
$query_res = mysql_query($select_sql);
while($res = mysql_fetch_assoc($query_res)){
$member = new Member();
... | true |
33cc9c1f12eeb00f0ede65be26fdefeffe2303cd | PHP | wushihchi/SnakeGame | /htdocs/classes/view/php_view.class.php | UTF-8 | 854 | 2.9375 | 3 | [] | no_license | <?php
class PHP_View implements View {
protected $headers = array('Content-Type' => 'text/html; charset=utf-8');
protected $tpl;
protected $data;
public static function make($tpl,array $data=array()) {
return new static($tpl, $data);
}
public function __construct($tpl, $data) {
... | true |
b5ed33ad538a755710e543eb43de8d37f03e6769 | PHP | alexkuzmov/battleships | /services/BattleshipsGame/Ships/Battleship.php | UTF-8 | 371 | 2.671875 | 3 | [] | no_license | <?php
namespace services\BattleshipsGame\Ships;
use services\BattleshipsGame\Ships\Ship;
/**
* Game Battleship Ship class
*
* The Battleship ship class is one of the game ships used
*
* @file Battleship.php
* @author Alex Kuzmov <alexkuzmov@gmail.com>
*
*/
class Battleship extends Ship
{
protected $_length... | true |
a3896990dc9d3d0185d54c195e89797be94b1e03 | PHP | thetimbanks/ogvys | /app/Controller/ScoresController.php | UTF-8 | 2,331 | 2.515625 | 3 | [] | no_license | <?
App::import('Vendor', 'OAuth/OAuthClient');
class ScoresController extends AppController {
public function retrieve() {
$client = $this->createClient();
$requestToken = $client->getRequestToken('https://api.login.yahoo.com/oauth/v2/get_request_token', 'http://127.0.0.1/scores/callback');
... | true |
42776a71a7c5c9a90742d49ed2b223076edbb077 | PHP | solarphp/core | /Solar/Auth/Storage/Adapter/Sql.php | UTF-8 | 9,020 | 2.890625 | 3 | [] | no_license | <?php
/**
*
* Authenticate against an SQL database table.
*
* @category Solar
*
* @package Solar_Auth
*
* @author Paul M. Jones <pmjones@solarphp.com>
*
* @license http://opensource.org/licenses/bsd-license.php BSD
*
* @version $Id$
*
*/
class Solar_Auth_Storage_Adapter_Sql extends ... | true |
ff51208ca1652751c4733377140b9c09e6d245f3 | PHP | locomotivemtl/charcoal-contrib-command | /src/Charcoal/Command/Service/QueueStack.php | UTF-8 | 1,372 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Charcoal\Command\Service;
use Charcoal\Command\CommandQueue;
use Charcoal\Model\ModelFactoryTrait;
use Charcoal\Model\ModelInterface;
use InvalidArgumentException;
/**
* Class QueueStack
*
* @package Charcoal\Command\Service
*/
class QueueStack
{
use ModelFactoryTrait;
/**
* QueueSt... | true |
9d63658b697be1027535ff6d874d68582e6b319b | PHP | benjaminrubin/ITP303_fullstack_development | /assignment_09/details.php | UTF-8 | 4,171 | 2.71875 | 3 | [] | no_license | <?php
if ( !isset($_GET['id']) || empty($_GET['id']) ) {
$error = "Invalid Track ID";
}
else {
//open connection with the database
$host = "303.itpwebdev.com";
$password = "Iaminla123";
$db = "benjamfr_DVD_db";
$user = "benjamfr_db_user";
//connect to database
$mysqli = new mysqli($host,$user,$pa... | true |
d9335d70594a7df07509f11581052214fbf0fe0f | PHP | afane20/testPlan | /src/main/webapp/cs213/public_html/cs313/php/assign04.php | UTF-8 | 2,676 | 3.359375 | 3 | [] | no_license | <?php
header('Content-type: text/html');
?>
<html>
<head>
<title>PHP Data Base</title>
</head>
<body>
<p>
<?php
$hostname="157.201.194.254";
$mysql_login="Anonymous";
$mysql_password= '';
$database="ercanbracks";
// connect to the database server
if (!($con = new mysqli($hostname, $mysql_login , $mysql... | true |
0dd4d20e0df4c483979c8f43688be13f9d7a63df | PHP | angelomatel/Performance-Task | /checking.php | UTF-8 | 1,569 | 3.71875 | 4 | [] | no_license | <html>
<body>
<?php
// 11.
echo ("<br>");
$x = 2;
$y = 2.0;
$a = ($x == $y ? "TRUE" : "FALSE"); // $x IS EQUAL TO $y = TRUE
$b = ($x === $y ? "TRUE" : "FALSE"); // $x IS EQUAL AND SAME TYPE AS $y = FALSE
$c = ($x != $y ? "TRUE" : "FALSE"); // $x IS NOT EQUAL TO $y = FALSE
$d = ($x <> $y ? "TRUE" : "FALSE"); // $x IS ... | true |
89cbfaf17f2ccb0180a9f52308661757d8d3d8c7 | PHP | barontan136/dolphin | /Utils/DbMedooConnBox.php | UTF-8 | 666 | 2.796875 | 3 | [] | no_license | <?php
namespace Utils;
use Utils\DbMedooConn;
/**
* 数据库连接类,依赖 PDO_MYSQL 扩展
* 在 https://github.com/catfan/medoo 的基础上修改而成
*/
class DbMedooConnBox
{
protected $conn = null;
protected $options = null;
public function __construct($options)
{
$this->options = $options;
$th... | true |
e97e4cf8c768a0076f0a5c93d1e289cac92ce93a | PHP | Stickano/Phpinit | /connection.php | UTF-8 | 267 | 2.859375 | 3 | [] | no_license | <?php
class Connection extends mysqli {
public function __construct($host, $username, $password, $database) {
@parent::__construct($host, $username, $password, $database);
if(mysqli_connect_error())
die('Connection Error: '.mysqli_connect_error());
}
}
?> | true |
076c4f3d1a41f7b58b5ca69750f02ac49064d1d8 | PHP | romababika/HomeWorkHillel | /index.php | UTF-8 | 3,028 | 3.640625 | 4 | [] | no_license |
<?php
error_reporting(-1);
$arr = [1, 2, 3, 7, 31, 4, 1, 8, 6];
//посчитать длину массива
echo "Длина массива :".(count($arr));
echo '<br>';
//переместить первые 4 элемента массива в конец массива
array_push($arr,'1','2','3','7');
unset($arr[0],$arr[1],$arr[2],$arr[3]);
echo '<pre>';
print_r($arr);
echo '</pre>';
... | true |
ec4f90f4dba248ba54bfea91b1659d99d592b643 | PHP | foodoutgroup/foodoutgroup | /src/Food/OrderBundle/Service/Events/BanklinkEvent.php | UTF-8 | 1,870 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Food\OrderBundle\Service\Events;
use Symfony\Component\EventDispatcher\Event;
use Food\UserBundle\Entity\User;
class BanklinkEvent extends Event
{
const BANKLINK_REQUEST = 'banklink.request';
const BANKLINK_RESPONSE = 'banklink.response';
protected $orderId;
protected $userId;
pr... | true |
9253aab07628982acd3d850115135b2f169f76ad | PHP | marcosvazquezfer/padel_optare | /view/courts/view.php | UTF-8 | 3,240 | 2.65625 | 3 | [] | no_license | <?php
//file: view/courts/view.php
require_once(__DIR__."/../../core/ViewManager.php");
$view = ViewManager::getInstance();
$courtId = $view->getVariable("courtId");
$date = $view->getVariable("date");
$time = $view->getVariable("time");
$occupations = $view->getVariable("occupations");
$hours = $view->getVariable("h... | true |
f92836fcc01632689fdf0501ff137fe25def83ba | PHP | milejko/mmi | /src/Mmi/EventManager/EventManager.php | UTF-8 | 5,122 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Mmi\EventManager;
use Mmi\EventManager\Exception\RuntimeException;
class EventManager implements EventManagerInterface
{
protected array $events = [];
protected EventInterface $eventPrototype;
protected array $identifiers = [];
public function __construct()
{
$this->eve... | true |
e84b0ff432f53a79a5e4dee4ed886da02e55fe21 | PHP | spronkey/bulletinlibs | /src/Spronkware/BulletinLibs/Protocol/MessageProtocol.php | UTF-8 | 486 | 2.640625 | 3 | [] | no_license | <?php
namespace Spronkware\BulletinLibs\Protocol;
class MessageProtocol
{
public static function renderToProperties(\Spronkware\BulletinLibs\Message $message)
{
$data = array();
$data['to'] = $message->to;
$data['body'] = $message->body;
$data['messageId'] = $message->id;
if(!empty($message->from)) {
$d... | true |
2258ca8480d962f15fcfef47dcdb993c1062ee2d | PHP | shouyintv/beehive-php | /src/Kernel/ArrayObject.php | UTF-8 | 1,607 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Beehive\Kernel;
use ArrayAccess;
use Countable;
use Iterator;
/**
* 数据存储
*
* @author Ewenlaz
*/
class ArrayObject implements ArrayAccess, Countable, Iterator
{
protected $storage = [];
public function __construct(array $array)
{
$this->storage = $array;
}
public funct... | true |
bb4ff000ed0b7f5eadaf7bcc1ed1c17d49c486b6 | PHP | marcqualie/mongominify | /src/MongoMinify/Pipeline.php | UTF-8 | 2,819 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace MongoMinify;
class Pipeline
{
private $collection;
private $original = array();
public $compressed = array();
public $mappings = array();
public function __construct($original, $collection)
{
$this->collection = $collection;
$this->original = $original;
... | true |
f4297f33129e23600ac42047d07ad17b968acc3b | PHP | lowhow/BLECT_WP_Theme | /content/themes/blect/framework/Extensions/Search.php | UTF-8 | 738 | 2.703125 | 3 | [] | no_license | <?php namespace Framework\Extensions;
use Framework\Core\Observer as Observer;
use Framework\WordPress\Loader as Loader;
class Search implements Observer
{
private $loader;
public function __construct( Loader $loader )
{
$this->loader = $loader;
}
public function handle()
{
$this->loader
->add_filter( '... | true |