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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
663c789eeef847bbf0d89daecdae04c7b37286f8 | PHP | Rafa-upsrj/Cleinte-Servidor | /auth_server.php | UTF-8 | 771 | 2.84375 | 3 | [] | no_license | <?php
// curl http://localhost:8001 -X 'POST' -H 'X-CLIENT-ID:1' -H 'X-PASSWORD:1234'
$method = strtoupper($_SERVER['REQUEST_METHOD']);
$token = sha1('Seper Secreto!');
if ($method === 'POST') {
if ( !array_key_exists('HTTP_X_CLIENT_ID', $_SERVER) || !array_key_exists('HTTP_X_PASSWORD', $_SERVER) ){
die;
... | true |
c5ece1afec56ddf5fdfe1e454f85bb5c7cc38838 | PHP | harm-less/php-encoder | /tests/PE/Samples/Specials/RequiredConstructorVariables.php | UTF-8 | 691 | 2.953125 | 3 | [] | no_license | <?php
namespace PE\Samples\Specials;
class RequiredConstructorVariables {
private $name;
private $variableCategory;
private $optional;
function __construct($name, $variableCategory, $optional = true) {
$this->name = $name;
$this->setVariableCategory($variableCategory);
$this->setOptional($optional);
}
... | true |
ee27b93b700bea21f2889928f442323534df240e | PHP | ThrusterIO/data-cacher | /src/DataCachers.php | UTF-8 | 1,789 | 3.015625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Thruster\Component\DataCacher;
use Thruster\Component\DataCacher\Exception\DataCacherNotFoundException;
/**
* Class DataCachers
*
* @package Thruster\Component\DataCacher
* @author Aurimas Niekis <aurimas@niekis.lt>
*/
class DataCachers
{
/**
* @var DataCacher[]
*/
protected $... | true |
12f6f433766a576eac4de471a6aebca1ce5f4d4f | PHP | kirolechka/test | /lib/ProtoHTML2/TProtoHTMLExtra.php | UTF-8 | 2,907 | 2.78125 | 3 | [] | no_license | <?php
trait TProtoHTMLExtra {
public static function css($url) {
return (new ProtoHTMLObject('link'))->set('rel', 'stylesheet')
->set('type', 'text/css')
->set('href', $url);
}
public static function icon($url) {
return (new ProtoHTMLObject('link'))->set('rel', 'shortcut icon')
-... | true |
11b93f52eb08dbe38fecbbb7372d567b149a6aac | PHP | acadhe/usf | /app/Contracts/Auth/HashPasswordService.php | UTF-8 | 169 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Contracts\Auth;
interface HashPasswordService
{
public function hash($plain);
public function equalsWithHashed($plaintext,$hashedPwd);
} | true |
8c4b703feb1d95ced0af53ac41678d4c0a443376 | PHP | hector81/Daw2_Php | /Formulario_Pizza_Arrays/Funciones.php | UTF-8 | 14,448 | 3.15625 | 3 | [] | no_license | <?php
///creamos el clientes con los datos pasados por post
function crearCliente($nombre,$direccion,$telefono,$email){
$cliente = array(
'<tr class='.'precioTr'.'><td class='."precioTituloTD".'>Nombre del cliente </td>
<td class='."pedidoTD".'>' => $nombre.'</td></tr>',
'<tr class='.'precioTr'.'><t... | true |
686552c0bd7d59e85cac943347c9ceb9626da131 | PHP | chitanka/rechko | /lib/form/doctrine/base/BaseDerivativeFormForm.class.php | UTF-8 | 1,452 | 2.515625 | 3 | [] | no_license | <?php
/**
* DerivativeForm form base class.
*
* @method DerivativeForm getObject() Returns the current form's model object
*
* @package rechnik
* @subpackage form
* @author borislav
* @version SVN: $Id: sfDoctrineFormGeneratedInheritanceTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
*/
abs... | true |
6a3c3137b12bd2fe4c3245fc6345430963adcdaa | PHP | mamalias23/mvtsdashboard | /app/controllers/ChatsController.php | UTF-8 | 2,100 | 2.5625 | 3 | [] | no_license | <?php
class ChatsController extends \BaseController {
protected $pusher;
public function __construct()
{
//$this->beforeFilter('csrf', array('on'=>'post'));
$this->beforeFilter('auth');
$this->pusher = new Pusher('a4b5ea994e8c612a010e', '132b6e79df2108598a90', '121464');
}
/*... | true |
3b21c01f192a615139a0e8d70e9c9a978707266d | PHP | ddrv/php-open-api-generator | /tests/Unit/Document/SecurityTest.php | UTF-8 | 3,642 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Tests\Ddrv\OpenApiGenerator\Unit\Document;
use Ddrv\OpenApiGenerator\Document\Security;
use Ddrv\OpenApiGenerator\Exception\InvalidNameException;
use PHPUnit\Framework\TestCase;
class SecurityTest extends TestCase
{
/**
* @dataProvider provideConstruct
*
... | true |
7bccad548040f28393873a88b00b1df270bf5978 | PHP | sahadatSunny/attendanceScanner | /create.php | UTF-8 | 1,114 | 2.671875 | 3 | [] | no_license | <?php
session_start();
include_once ($_SERVER['DOCUMENT_ROOT'].'/attendanceScanner/config.php');
use App\utility\Validator;
use App\utility\Sanitizer;
$employee = [];
if(array_key_exists('employeeList', $_COOKIE)){
$employee = unserialize($_COOKIE['employeeList']);
}
if(isset($_POST['submit'])){
... | true |
7926aeeb5c309522ed89ea311b1051e4c4c825a2 | PHP | tebru/stripe-sdk | /src/Model/Property/ShippingCarrier.php | UTF-8 | 730 | 2.578125 | 3 | [] | no_license | <?php
/*
* Copyright (c) 2015 Nate Brunette.
* Distributed under the MIT License (http://opensource.org/licenses/MIT)
*/
namespace Tebru\Stripe\Model\Property;
use JMS\Serializer\Annotation\Type;
/**
* Trait ShippingCarrier
*
* @author Nate Brunette <n@tebru.net>
*/
trait ShippingCarrier
{
/**
* @var... | true |
45446e0ae9dbe3833585269d25af09580caf7d38 | PHP | ProgWeb201701/Grupo12 | /login/criarPost.php | UTF-8 | 3,079 | 3.109375 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "1030";
$dbname = "revistaart";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if (isset($_POST['criar'])... | true |
0c6ced822d1d96a23a5c38d3374cf31a5a52cdd0 | PHP | iZaL/mgo | /src/Payment/PaymentRepository.php | UTF-8 | 563 | 2.5625 | 3 | [] | no_license | <?php namespace Acme\Payment;
use Acme\Core\BaseRepository;
use Payment;
class PaymentRepository extends BaseRepository {
public $paymentMethds = ['paypal'];
/**
* @param Payment $model
*/
public function __construct(Payment $model)
{
$this->model = $model;
}
public functi... | true |
9c445b24525c88473db16357fb7c90b87fd6d7e6 | PHP | Martin-52/cst336 | /practice/p6/api/getProduct.php | UTF-8 | 614 | 2.6875 | 3 | [] | no_license | <?php
include '../../../inc/dbConnection.php';
$dbConn = getDatabaseConnection("midtermPractice");
$dbConn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$productId = $_GET["productId"];
$sql = "SELECT * FROM mp_product WHERE productId = :pId";
$np = array();
... | true |
2fabfcc7b8cdd4ee16ce0c7997a3ce337d3aacdf | PHP | idera/geoservicios | /sources.php | UTF-8 | 7,314 | 2.6875 | 3 | [] | no_license | <?php
// Configuracion de debug
$debug = false;
if (!$debug){ error_reporting(0);}
// Abrir archivo de sources
$jsources = file_get_contents('sources.json');
$sources = json_decode($jsources, true);
$jSources = json_encode($sources, JSON_UNESCAPED_UNICODE);
// parametro format: plain|html|qgis js???????json???
$form... | true |
9f118ad3d3e77fed8378db4da5fb8bbf8c1037f7 | PHP | juliangt/TusLibros | /docs/iteracion3/TusLibrosRestInterfaceTest.php | UTF-8 | 12,910 | 2.5625 | 3 | [] | no_license | <?php
require_once 'TusLibrosRestInterface.php';
require_once 'AuthenticationSystem.php';
require_once 'SupermarketTestObjects.php';
require_once 'MerchantProcessor.php';
require_once 'ManualClock.php';
use PHPUnit\Framework\TestCase;
class TusLibrosRestInterfaceTest extends TestCase implements AuthenticationSystem,... | true |
c023a6322f5ad6c156313ddb2450e2c0735343b4 | PHP | wawrzynkiewicz/contentful-management.php | /src/Management/Resource/Space.php | UTF-8 | 1,448 | 2.796875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* This file is part of the contentful-management.php package.
*
* @copyright 2015-2017 Contentful GmbH
* @license MIT
*/
namespace Contentful\Management\Resource;
/**
* Space class.
*
* This class represents a resource with type "Space" in Contentful.
*
* @see https://www.contentful.com/develop... | true |
f00b51c19ec4bfb8091893b728daf31aef661700 | PHP | Cosmin-Parvulescu/kraken | /app/Kraken/Core/Helpers/PictogramManager.php | UTF-8 | 1,296 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Kraken\Core\Helpers;
use App\Kraken\Core\Pictogram;
use Storage;
class PictogramManager {
private $storage;
public function __construct(Storage $storage) {
$this->storage = $storage;
}
public function addOrUpdatePictogram($tenantId, $pictogramable, $file) {
... | true |
3ea634aaea6f15fcf3ae4f99ea8dd7ac12a8729e | PHP | kubrafelek/LeetCodes | /examp.php | UTF-8 | 238 | 3.21875 | 3 | [] | no_license | <?php
function topla() {
$toplam = 0;
$argumanSayisi = func_num_args();
for ($i = 0; $i < $argumanSayisi; $i ++) {
$toplam += func_get_arg($i);
}
return $toplam;
}
// Ornek Kullanim
// echo topla(5, 10, 15); // 30 dondurur | true |
b12cbe8320720acdf2af705e776b4c097d029b01 | PHP | jinniepark/Noshspoon | /new_recipe.php | UTF-8 | 1,891 | 2.75 | 3 | [] | no_license | <?php include 'header.php'; ?>
<body>
<?php include 'nav_bar.php'; ?>
<?php include 'modal.php'; ?>
<div class="container">
<div id="alert-indicator">
</div>
<?php require_once 'library.php';
date_default_timezone_set('UTC');
$connection = new mysqli($hostname, $username, $password, $database);
if ($c... | true |
9999b25acb460560068f0e18738e233ae063737f | PHP | Pando65/Apis | /services/dataLayer.php | UTF-8 | 1,210 | 2.90625 | 3 | [] | no_license | <?php
function connection() {
$host = "localhost";
$username = "root"; //Mysql username
$password = "root"; // Mysql password
$db_name = "apisdb"; // Database name
return new mysqli("$host", "$username", "$password", "$db_name");
}
function isThereConnection() {
return connection()->ping() !=... | true |
04713d1e3d9d4e768364e99fde17c57e2faeb79a | PHP | MTco/bolt | /tests/BoltSystemMock.php | UTF-8 | 373 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Bolt\Tests;
/**
*
*/
class BoltSystemMock
{
static $values = array();
static public function set($function, $values) {
self::$values[$function] = $values;
}
static public function get($function) {
if (isset(self::$values[$function])) {
re... | true |
96835f06ec53dd0ea28409ace557c8b3b47ea693 | PHP | marxjohnson/moodle-block_mrbs | /web/admin.php | UTF-8 | 4,204 | 2.5625 | 3 | [] | no_license | <?php
# $Id: admin.php,v 1.7 2010/01/16 14:05:45 arborrow Exp $
require_once("../../../config.php");
require_once "grab_globals.inc.php";
require "config.inc.php";
require "functions.php";
require "$dbsys.php";
require "mrbs_auth.php";
require_login();
$day=optional_param('day',0 ,PARAM_INT);
$month=optional_param('mo... | true |
afa6556eab349127e0a6bc0b4e7e9938603655b2 | PHP | kuchuku/englisplay | /englishplay/web/datos/usuario.php | UTF-8 | 490 | 2.5625 | 3 | [] | no_license | <?php
include('../../conexionDB.php');
function insertarUsuario($codigoUsuario, $nombreUsuario, $tipoUsuario) {
global $conexion;
$sql = "INSERT INTO usuario(codigoUsuario, nombreUsuario, tipoUsuario) VALUES('$codigoUsuario', '$nombreUsuario', '$tipoUsuario')";
mysqli_query($conexion, $sql);
}
function con... | true |
e6e38acbe52b4d9130e859759ac76aae96a81d39 | PHP | happyfridayM2/pruebasgit | /code/Connectif/Integration/Observer/Newsletter/Subscribe.php | UTF-8 | 1,675 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Connectif\Integration\Observer\Newsletter;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Stdlib\CookieManagerInterface;
use Magento\Framework\Stdlib\Cookie\CookieMetadataFactory;
use Magento\Framework\Session\SessionManagerInterface;
use Mag... | true |
09ac21d194efc209a34251f9a697dd63c29a4727 | PHP | nullcookies/neuro-car-classifier | /www/app/Telegrambot/Commands/BaseCommand.php | UTF-8 | 6,189 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Telegrambot\Commands;
use App\Telegrambot\CommandUtils\ConversationUtils;
use Longman\TelegramBot\Commands\Command;
use Longman\TelegramBot\Conversation;
use Longman\TelegramBot\Entities\Keyboard;
use Longman\TelegramBot\Entities\Message;
use Longman\TelegramBot\Entities\ServerResponse;
use Longma... | true |
43c07cbc95009a1cc57b42b9aea387cb38fccbd5 | PHP | bemcasei/ModulusCore | /src/Services/Factory/IuguServiceFactory.php | UTF-8 | 520 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace ModulusCore\Services\Factory;
use Interop\Container\ContainerInterface;
use Iugu\Sdk\Iugu;
use ModulusCore\Services\IuguService;
class IuguServiceFactory
{
/**
* Factory Iugu Service
*
* @param ContainerInterface $container
* @return IuguService
*/
public function __i... | true |
6fd8f3a48fc117641220082f93e30ee771c4240d | PHP | gpupo/cnova-sdk | /src/Entity/Order/Manager.php | UTF-8 | 2,598 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of gpupo/cnova-sdk
* Created by Gilmar Pupo <contact@gpupo.com>
* For the information of copyright and license you should read the file
* LICENSE which is distributed with this source code.
* Para a informação dos direitos autorais e de licença você deve ler o arquivo
* LICENSE que é... | true |
55b038ba752298aec703228a8349d59319d4c4cc | PHP | pedroac/url4php | /src/AccessorTrait.php | UTF-8 | 1,094 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
/**
* AccessorTrait trait.
* @license http://opensource.org/licenses/MIT
* @author pedroac
* @version 0.2.1
*/
namespace pedroac\url;
/**
* @ignore
* @codeCoverageIgnore
*/
trait AccessorTrait
{
/**
* @param string $property
* @return mixed
*/
public function __get($property)
... | true |
5d478732cd19e728de70d2a143b8d1521638b31a | PHP | developerrizki/klinik_madani | /models/class.DoctorModel.php | UTF-8 | 745 | 2.546875 | 3 | [] | no_license | <?php
/**
*
*/
class DoctorModel extends Model
{
public function __construct()
{
parent::__construct();
$this->_table = 'dp_dokter';
$this->_id = 'id_dokter';
}
public function getDetail($id)
{
global $cfg;
$sql = "SELECT * FROM dp_dokter WHERE id_dokter = '$id'";
$res = null;
try {
$thi... | true |
b8e03688ea297ad9148d6a65e0afa26fd11f5fde | PHP | coderlynx/goequip | /php/controllerReporte.php | UTF-8 | 1,012 | 2.703125 | 3 | [] | no_license | <?php
require_once 'autoload.php';
require_once ('lib/mercadopago.php');
session_start();
//EXTRAER el metodo de la peticion (GET,POST,PUT,DELETE)
$metodo = strtolower($_SERVER['REQUEST_METHOD']);
// Filtrar método
switch ($metodo) {
case 'get':
break;
case 'post':
$filtros... | true |
2e0a4813386bff744d9ddc1395158083ee46640c | PHP | nicocabral/SES | /api/objects/Subject.php | UTF-8 | 3,981 | 3.28125 | 3 | [] | no_license | <?php
class Subject{
// database connection and table name
private $conn;
private $table_name = "subjects";
// object properties
public $id;
public $code;
public $name;
public $description;
public $unit;
public $status;
// constructor
public function __construct($db){
... | true |
d963110bafd8ae28ad9045f90c45ce0ddd9f40f8 | PHP | SBU-BMI/PathDB | /quip/web/themes/contrib/bootstrap/bootstrap.api.php | UTF-8 | 2,945 | 2.75 | 3 | [
"GPL-2.0-only",
"BSD-3-Clause"
] | permissive | <?php
/**
* @file
* List of available procedural hook and alter APIs for use in your sub-theme.
*/
/**
* @addtogroup plugins_alter
*
* @{
*/
/**
* Allows sub-themes to alter the array used for colorizing text.
*
* @param array $texts
* An associative array containing the text and classes to be matched, ... | true |
537f9edb5e3ea709a1a2b2607fa1f0242537b945 | PHP | nusyce/ilead | /application/models/Option_model.php | UTF-8 | 621 | 2.546875 | 3 | [] | no_license | <?php
defined('BASEPATH') or exit('No direct script access allowed');
class Option_model extends CI_Model
{
public function __construct()
{
parent::__construct();
}
/**
* @param string Email address for login
* @param string User Password
* @param boolean Set cookies for user ... | true |
b4c90b5b81978389894bff1c8f80a7b8cddec7be | PHP | KirinyetBrian/Simple-Calculator-in-OO-PHP | /index.php | UTF-8 | 1,078 | 3.109375 | 3 | [] | no_license |
<?php
include 'calculator.php';
?>
<!DOCTYPE html>
<html>
<head>
<title>Calculator In PHP</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap-grid.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap-grid.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap-reboot.css">... | true |
7f45c8d555236191e489836b5fbc164fedefade4 | PHP | alexandra-fedotova/zf3-sample-app | /module/Axmit/Dao/src/Criterion/Specification/Doctrine/DoctrineSpecificationManager.php | UTF-8 | 2,833 | 2.609375 | 3 | [] | no_license | <?php
namespace Axmit\Dao\Criterion\Specification\Doctrine;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\QueryBuilder;
use Axmit\Dao\Criterion\Filter;
use Axmit\Dao\Criterion\Specification\SpecificationInterface;
use Axmit\Dao\Criterion\Specification\SpecificationManager;
use RuntimeException;
/**
* C... | true |
5fdf5b3dae840fba79de9605e67421227bb01fa0 | PHP | mashurex/DownloadTimer | /Transfer.php | UTF-8 | 1,640 | 3.296875 | 3 | [] | no_license | <?php
/**
* curl file transfer class.
*
* @author Mustafa Ashurex <mustafa@ashurexconsulting.com>
* @version $Id$
* @license Apache 2.0
*/
/**
* Transfers specified URL using cURL.
*/
class Transfer
{
/**
* @var string URL to download from.
*/
private $url;
public function __construct(ar... | true |
5f03f6d981443055434bf9174626f60962afa85e | PHP | trovit/PCCronManagerBundle | /Entity/TblCronTask.php | UTF-8 | 2,792 | 2.71875 | 3 | [] | no_license | <?php
namespace Trovit\CronManagerBundle\Entity;
/**
* TblCronTask entity
*/
class TblCronTask
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $name;
/**
* @var string
*/
private $description;
/**
* @var string
*/
private $com... | true |
8108ee15befe9fd09cfeee65c1249ed57f775bc5 | PHP | joelamawhe/sugvoting | /vote.php | UTF-8 | 4,300 | 2.53125 | 3 | [] | no_license | <?php session_start() ;?>
<!DOCTYPE html>
<html>
<head>
<title>Voting Page > SUG OnlineVoting website</title>
<link rel="stylesheet" type="text/css" href="styles/main_style.css"/>
</head>
<body>
<?php
include('includes/db_conn.php');
include('includes/header.php');
if(isset($_SESSION['user'])){
$userid=$_SESS... | true |
1f9624c057b6fa5482c603357c56240e1aea1775 | PHP | victorpuello/SISAC | /app/Http/Middleware/VerifyIndicadores.php | UTF-8 | 1,017 | 2.5625 | 3 | [] | no_license | <?php
namespace ATS\Http\Middleware;
use ATS\Clases\Indicador\IndicadoresPlanilla;
use ATS\Clases\Planilla\ConfigPlanillass;
use ATS\Exceptions\IndicadoresException;
use Closure;
use Illuminate\Auth\Access\AuthorizationException;
class VerifyIndicadores
{
protected $planilla;
/**
* @param $request
... | true |
78355499503263d4b7a5947125dcdcd3d6e84578 | PHP | jonathanortizdam1993445/DWES | /boletin5(FUNCIONES)/ejercicio9.php | UTF-8 | 174 | 2.953125 | 3 | [] | no_license | <html>
<head>
</head>
<body>
<?php
function potencia($numero,$potencia){
$ope=pow($numero,$potencia);
echo $ope."</br>";
}
potencia(5,0);
?>
</body>
</html>
| true |
87f46656cec43e2d2724350ddc6b36e6637d9005 | PHP | DNIB/104-project-cyan | /database/seeds/LocationSeeder.php | UTF-8 | 831 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
use App\Models\Locations;
use Illuminate\Database\Seeder;
class LocationSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return integer
*/
public function run()
{
$locations = [
'First',
'Second',
'Third',
'Fourth'... | true |
1a69b5f795a6a5eeacad4702a97a2205f48be54c | PHP | katiacarvalho/CakePHP-02 | /app/Model/Inscricao.php | UTF-8 | 1,986 | 2.59375 | 3 | [] | no_license | <?php
class Inscricao extends AppModel {
public $order = array('nome' => 'ASC');
public $cacheQueries = true;
public $displayField = 'nome';
public $validate = array(
'nome' => array(
array(
'rule' => 'notEmpty',... | true |
391b10ea6abe46acce97bfee9d65583d6ed435d1 | PHP | gecr-cse/project-x | /admin/system/manager/department-manager.php | UTF-8 | 281 | 2.53125 | 3 | [] | no_license | <?php
class departmentManager extends Application{
//function to return all the name of departments
function getAllDept(){
echo
$query = "SELECT dept_name,dept_id FROM department";
$result = $this->executeQuery($query);
return $result;
}
}
?>
| true |
dce0a9fa998800b5c2bd7f07a5c8b2e2717a74f4 | PHP | 2tanak/setevik | /app/Models/Watch.php | UTF-8 | 544 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
use App\User;
use Illuminate\Database\Eloquent\Model;
class Watch extends Model
{
protected $fillable = [
'user_id',
'watchable_id',
'watchable_type',
];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function ... | true |
6d945ebb1e25197c2d30818ab20e8c7a33a2c172 | PHP | JorgeBesgaSanchez/ProyectoRutas | /app/Http/Controllers/UsuarioController.php | UTF-8 | 4,034 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Usuario;
use Illuminate\Http\Request;
use Session;
class UsuarioController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$title = 'Usuarios';
... | true |
37f115852f5c36922d5651119f843ed567d00eb9 | PHP | jobinrjohnson/library_management_ci | /application/models/Book.php | UTF-8 | 1,417 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is subject to the terms and conditions defined in
* file 'LICENSE.txt', which is part of this source code package.
*/
/**
* Description of Book
*
* @author jobinrjohnson
*/
class Book extends CI_Model {
public function add_book($param) {
$q = 'INSERT INTO books (' . implode('... | true |
69b56f5e4862e3d5a391c24d47e18e8f66f2c886 | PHP | striversist/TV | /public/json/utils.php | UTF-8 | 5,970 | 3.0625 | 3 | [] | no_license | <?php
// --------------------------- Functions --------------------------------
function getOnPlayingProgram($channel)
{
$program = array();
$today = date("w");
if ($today == "0") // Sunday
$today = "7";
$now = date("H:i");
$programs = $channel["days"]... | true |
670be7067bfa9570f0f420ce13b749c3562414ba | PHP | qingxin-xu/arqnet | /yii/protected/models/Question.php | UTF-8 | 6,904 | 2.59375 | 3 | [] | no_license | <?php
/**
* This is the model class for table "question".
*
* The followings are the available columns in table 'question':
* @property integer $question_id
* @property integer $user_id
* @property string $content
* @property string $quantitive
* @property integer $is_active
* @property string $date_created
... | true |
2464bf1c58d7b5a1b066c6cc2cce3aeba7fa01ae | PHP | doomj08/catecno | /app/Http/Requests/ConductorRequest.php | UTF-8 | 1,926 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Conductor;
use Illuminate\Foundation\Http\FormRequest;
class ConductorRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
... | true |
4a8e69cd4596787eb2f3701aecd6e6fbf05460b4 | PHP | sargon1404/venus | /src/venus/classes/View.php | UTF-8 | 5,563 | 2.734375 | 3 | [] | no_license | <?php
/**
* The View Class
* @package Venus
*/
namespace Venus;
use Mars\Controller;
/**
* The View Class
* Implements the View functionality of the MVC pattern
*/
abstract class View extends \Mars\View
{
use MvcTrait;
/**
* @var string $base_url The base url of the controller to which the view belongs.
*/
pub... | true |
38ae386fdc2673c5ec131d70733221ea15ae2ec3 | PHP | h0sam/cms | /admin/submit.php | UTF-8 | 17,577 | 2.5625 | 3 | [] | no_license | <?php
session_start();
include_once("../includes/config.php");
if (isset($_GET["page"])){
$page=VerifyInput($_GET["page"]);
}
if (isset($_GET["action"])){
$action=VerifyInput($_GET["action"]);
}
$uid = $_SESSION["uid"];
$time_now=time();
if(isset($_SERVER['HTTP_X_REQUESTED_WITH'])){
//AJAX Request
echo print_... | true |
97edbf8c89440463bf827da9907fc4090372ad26 | PHP | yourant/custom-service | /modules/mails/components/CdiscountMessageSender.php | UTF-8 | 1,809 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\mails\components;
use app\modules\services\modules\amazon\components\Mail;
use yii\helpers\Json;
/**
* cdiscount邮件发送
*/
class CdiscountMessageSender extends MessageSenderAbstract
{
public function runSendMessage()
{
try {
//邮件标题
$subject = $this->m... | true |
19895308fab50347aa8abb744fdfc828ec953c65 | PHP | javirg1/ejercicios_curso_Android_INATEC_PHP_HTML | /20_ejer_videoclub/funciones.php | UTF-8 | 560 | 3.40625 | 3 | [] | no_license | <?php
// Usuario alfanumérico y mínimo 6 caracteres
function verifica_usuario($usuario){
$user = false;
if (is_numeric($usuario)==false && strlen($usuario)>=6) {
$user = true;
}else{
$user = false;
}
return $user;
}
// Password numérico, impar y máximo 4 dígitos
function veri... | true |
0df39233e9f643e92fcbfdc3816dea25d2f0060d | PHP | SkysoulDesign/dreamsark.dev | /app/Jobs/Project/Committee/Review/ReviewCreateExpenseJob.php | UTF-8 | 1,252 | 2.640625 | 3 | [] | no_license | <?php
namespace DreamsArk\Jobs\Project\Committee\Review;
use DreamsArk\Events\Project\Expenditure\ExpenditureWasCreated;
use DreamsArk\Jobs\Job;
use DreamsArk\Models\Project\Expenditures\Expense;
use DreamsArk\Models\Project\Project;
/**
* Class ReviewCreateExpenseJob
*
* @package DreamsArk\Jobs\Project\Committee... | true |
d085df2b457080f11571299242c3b97c186d49f2 | PHP | mwilde345/WebDevelopmentAssignments | /week9/php03.php | UTF-8 | 363 | 2.828125 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<title>Hey</title>
</head>
<body>
<center>
<h1> Got it! </h1>
<?php
$listvals=$_POST['mylist'];
$n=count($listvals);
echo "User chose $n items from the list.<br>\n";
for($i=0;$i<$n;$i++)
echo "Item $i=".$listvals[$i]."<br>\n";
... | true |
e0783479334f358f3354defb5cde96ad37cb52a1 | PHP | zilltine/zilltine.github.io | /Masyvai/Index.php | UTF-8 | 1,714 | 2.6875 | 3 | [] | no_license | <?php
include 'Masyvai.php';
$dvimatis = array (
array(1, -15, 45, 5, -10, 40, 10),
array(30, 15, 45, 5, 10, -40, 35, 10)
);
$daugiaumatis = array (
array(1, 2, 3),
array(2, 2, 1),
array(3, 1, 4)
);
$masyvas = array(30, 15, 45, -5, 10, 35, -10);
$masyvas2 = array(-30, -15, 45, 5, -10, 40, 35, 10);
$masyvai = new... | true |
7962a33a0225c6212d9395ef6c9b859deaddb99a | PHP | migueluma/parcial1_tpi | /class.carrito.php | UTF-8 | 3,222 | 2.65625 | 3 | [] | no_license | <?php
@session_start();
class Carrito
{
function agregaElemento($producto, $cantidad)
{
if (!isset($_SESSION["carrito"]))
{
$_SESSION["carrito"][$producto]=$cantidad;
} /* if (!isset($_SESSION["carrito"])) */
else
... | true |
ac3cda44e59d21ef31977c9d3da34b8bc58f9869 | PHP | foolishwang/php-functions-4 | /test/functions/FunctionsTest.php | UTF-8 | 1,237 | 2.8125 | 3 | [] | no_license | <?php
require_once dirname(dirname(__DIR__)).'/functions/functions.php';
class Suin_PhpFunctions_FunctionsTest extends PHPUnit_Framework_TestCase
{
/**
* @return Suin_PhpFunctions
*/
public function newFunctions()
{
return new Suin_PhpFunctions();
}
/**
* @param $expect
* @param $string
* @dataProvi... | true |
17346f0d8810dc7e8df8f3ae95bacea66e0d1cc7 | PHP | phpists/sk | /api/modules/Main/Services/Pattern/ReplaceableFinder.php | UTF-8 | 3,326 | 2.8125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Modules\Main\Services\Pattern;
use Illuminate\Support\Collection;
final class ReplaceableFinder
{
public function getVariables(string $pattern, callable $resolveVariableValue): array
{
$variables = $this->getSimpleVariables($pattern, $resolveVariableValue);
... | true |
2e7af8e655856fe378240cbf46c64a46addee119 | PHP | fwang1395/LeetCode | /php/Sorting&Searching/MergeSortedArray.php | UTF-8 | 1,049 | 3.96875 | 4 | [] | no_license | <?php
/**
* Merge Sorted Array
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
Note:
The number of elements initialized in nums1 and nums2 are m and n respectively.
You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additi... | true |
a3a1b01cfc336e83b525f56571914bc2719d285f | PHP | matthew-hss/Duralex | /Duralex/dto/LawyerDto.php | UTF-8 | 1,246 | 3.140625 | 3 | [] | no_license | <?php
include_once '../dto/SpecialtyDto.php';
class LawyerDto {
private $id;
private $rut;
private $name;
private $hireDate;
private $specialty;
private $hourValue;
function __construct() {
$this->id = null;
$this->rut = null;
$this->name = null;
$this->hi... | true |
deb356b3e7937f73b534ba783a07b37301606e8f | PHP | liangyaohua/OAuth_DIY | /openid/newuser.php | UTF-8 | 1,088 | 2.53125 | 3 | [] | no_license | <?php
include_once('db_connection.php');
if(isset($_GET['username']) && $_GET['username'] != ""){
$username = $_GET['username'];
} else {
die("username required");
}
if(isset($_GET['lastname']) && $_GET['lastname'] != ""){
$lastname = $_GET['lastname'];
} else {
die("lastname required");
}
if(isset($_G... | true |
c6b956fd6b339e7d9bf35cb3ac0ab70c3143495f | PHP | qsardw/qsardw-frontend | /src/Qsardw/Frontend/Traits/BeanSerializer.php | UTF-8 | 2,445 | 3 | 3 | [] | no_license | <?php
/*
* This file is part of the QSARDW Frontend project
*
* (c) Javier Caride Ulloa <javier.caride@qsardw.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Qsardw\Frontend\Traits;
use Qsardw\Frontend\Application;
... | true |
08793207da4aab50f576c1ff0bcd8452579f17f4 | PHP | soarescbm/e-cidade | /e-cidade/std/legacy/EmulatePHP53.php | UTF-8 | 2,600 | 2.84375 | 3 | [] | no_license | <?php
class EmulatePHP53 {
private static $egpcs = array(
'ENV', 'GET', 'POST', 'COOKIE', 'SERVER', 'SESSION'
);
/**
* Emula a variavel de ambiente $_ENV
*
* @return boolean
*/
public static function env() {
$GLOBAL['_ENV'] = array();
$GLOBAL['_ENV']['PATH_INFO'] = getenv('PATH_INFO'... | true |
3eb38608c5f4d0d15eebce982cae94d07106a466 | PHP | wawanneutron/learning-with-OOP-php-beginer | /prodk.php | UTF-8 | 1,131 | 4 | 4 | [] | no_license | <?php
// class tempat untuk membut instan dari object
// class mendefinisikan object
// satu class dapat digunakan banyak object
class Produk
{
// properti
public $judul = 'judul',
$penulis = 'penulis',
$penerbit = 'penerbit',
$harga = 0;
// method
public function getL... | true |
49cf79808f71219c216842a8764a6a0ac5521d2e | PHP | haidark/rahat | /www/getNodes.php | UTF-8 | 952 | 2.9375 | 3 | [] | no_license | <?php
//start this users session
session_start();
//include DB helper functions
include_once("DBhelpers.php");
//get the phrase from this users session data
$phrase=$_SESSION['phrase'];
//connect to the DB
$mysqli = new mysqli("127.0.0.1", "www", "pin101", "haramain2");
if($mysqli->connect_errno){
echo "<p>Failed to... | true |
85fca84b3ee44a4e2fe0293962f6430ad519a29a | PHP | ckwalsh/LibSprite | /src/php5_3/CKWalsh/LibSprite/Options.php | UTF-8 | 1,902 | 2.984375 | 3 | [] | no_license | <?php
/**
* @package LibSprite
* @copyright (c) 2011 Cullen Walsh
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
*/
namespace CKWalsh\LibSprite;
/**
* Represents a set of options that should be respected when the associated
* image is placed in a map
* @package LibSprite
*/
class Options {
... | true |
a26827add006e9edd001b81c250f858637a98da2 | PHP | seans888/Bgy-Project | /SOFTDEV/barangay august 31 2016/barangay/core/subclasses/day_care.php | UTF-8 | 4,093 | 2.796875 | 3 | [] | no_license | <?php
require_once 'day_care_dd.php';
class day_care extends data_abstraction
{
var $fields = array();
function __construct()
{
$this->fields = day_care_dd::load_dictionary();
$this->relations = day_care_dd::load_relationships();
$this->subclasses = day_care_dd::load_subclass_... | true |
06140ab69bb23d0cd6cd68524afd5e2393f9663b | PHP | kakamband/autowpdb | /Tests/Unit/src/DBWorker/Worker/copyTable.php | UTF-8 | 1,101 | 2.671875 | 3 | [] | no_license | <?php
namespace Screenfeed\AutoWPDB\Tests\Unit\src\DBWorker\Worker;
use Screenfeed\AutoWPDB\DBWorker\Worker;
use wpdb;
/**
* Tests for Worker->copy_table().
*
* @covers Worker::copy_table
* @group Worker
*/
class Test_CopyTable extends TestCase {
public function testShouldReturnNumberOfDeletedRows() {
$this... | true |
617be52330baf78932641e1943aa667b0b0eb949 | PHP | aideo/php-commons-phpspreadsheet | /src/Utilities/PhpOffice/PhpSpreadsheetUtils.php | UTF-8 | 5,893 | 3.0625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Ideo\Utilities\PhpOffice;
use Ideo\Utilities\StringUtils;
use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
use PhpOffice\PhpSpreadsheet\NamedRange;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet... | true |
9c6e4ba7c53ceb2c3acee5c2e6839fad9f36ea37 | PHP | pdawczak/base | /lib/my/mySeoManager.class.php | UTF-8 | 1,604 | 3.03125 | 3 | [] | no_license | <?php
class mySeoManager
{
private $_contents = array();
private $_title_tag = null;
/**
* Add a seo content
* @param mySeoContentInterface $content
*/
public function add(mySeoContent $content)
{
$this->_contents[] = $content;
}
/**
* Sets a title tag for site
* @param string $titl... | true |
79560df8cfbb14c2c58841efd873cf53d761ea85 | PHP | h4rrold/waffle-forum | /Core/App.php | UTF-8 | 397 | 2.96875 | 3 | [] | no_license | <?php
class App
{
use Singleton;
private $middleware= [];
/**
* @return array
*/
public static function getMiddleware(): array
{
return self::getInstance()->middleware;
}
/**
* @param array $middleware
*/
public static function setMiddleware(array $middleware)... | true |
05b8dad4b790b564d021aa09e5ad0a7be41fc8c4 | PHP | joshwedlake/Rowing-Analytics | /common.php | UTF-8 | 4,296 | 2.8125 | 3 | [] | no_license | <?php
$title_software = 'Rowing Analytics';
$conn = null;
$rowserver = "127.0.0.1";
$rowuser = "rowuser";
$rowpass = "password";
$rowdb = "rowing";
$show_debug = true;
// should be an object?
$config_current_season_id=null;
$config_month_schoolyear_begins=null;
$config_day_schoolyear_begins=null;
$config_season_date... | true |
ea0046155fb0cfc005570b98e85733a156675bf3 | PHP | saltybeagle/jackalope | /src/Jackalope/Query/QOM/UpperCase.php | UTF-8 | 926 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Jackalope\Query\QOM;
use PHPCR\Query\QOM\UpperCaseInterface;
use PHPCR\Query\QOM\DynamicOperandInterface;
/**
* Evaluates to the upper-case string value (or values, if multi-valued) of
* operand.
*
* If operand does not evaluate to a string value, its value is first converted
* to a string.
*
... | true |
36cf3926bae7388288d8106a83047889ae8636d4 | PHP | iansnew1/laravel1 | /Http/Requests/ShowAlphaNumericRequest.php | UTF-8 | 573 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use App\Http\Validators\AlphaNumericIdValidator;
class ShowAlphaNumericRequest extends RestRequestAbstract
{
private $alphaNumericIdValidator;
public function __construct(AlphaNumericIdValidator $alphaNumericIdValidator)
{
$this->alphaNumericIdValidator = $alphaNumericIdValid... | true |
8cf72155972eb7ca1a177f93424760245ee51971 | PHP | flik/powerorm | /src/Migration/Operation/OperationInterface.php | UTF-8 | 1,782 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the powerorm package.
*
* (c) Eddilbert Macharia <edd.cowan@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Eddmash\PowerOrm\Migration\Operation;
use Eddmash\PowerOrm\Db\SchemaEditor;... | true |
7a2c3ab8a259317da511959dce8c18c4eadcfb9a | PHP | bmf-san/Rubel | /src/core-app/app/Exceptions/Handler.php | UTF-8 | 3,354 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Rubel\Exceptions;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Auth\AuthException;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\HttpException;
class... | true |
7601e8efde5ded7b2226e7dd1ab6eda8566cd490 | PHP | nlunga/Camagru | /stickers.php | UTF-8 | 1,855 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
require_once 'imageInsert.php';
require_once 'reconnect.php';
function getStickerImage($table_name, $imageId)
{
global $handle;
try {
$sql = "SELECT * FROM $table_name WHERE id='$imageId'";
$stmt = $handle->prepare($sql);
$stmt->execute();
$row = $stmt->fetch(PDO:... | true |
223ff31055127428669d4f0db0b3d5242e8bd8ea | PHP | wtorsi/mipt | /protected/controllers/user/RegisterAction.php | UTF-8 | 924 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: andreylukin
* Date: 12.06.13
* Time: 18:40
* To change this template use File | Settings | File Templates.
*/
class RegisterAction extends Action {
public function run(){
$model = new RegisterForm();
if($pdata = Request::post('RegisterForm')){
$model-... | true |
3f06f3ed0653587cff6daf7b879fcdfe28031138 | PHP | ThiagoRipardoDeLima/devsbook-oo | /signup_action.php | UTF-8 | 1,501 | 2.6875 | 3 | [] | no_license | <?php
require 'config.php';
require 'models/Auth.php';
$email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);
$password = filter_input(INPUT_POST, 'password');
$name = filter_input(INPUT_POST, 'name');
$birthdate= filter_input(INPUT_POST, 'birthdate');
if( $email && $password && $name && $birthdate... | true |
934135ef5e9d29a1a4008bfff8331a1c26517f04 | PHP | mixaroot/patterns.mi | /patterns/observer/Observer.php | UTF-8 | 844 | 3.125 | 3 | [] | no_license | <?php
namespace patterns\observer;
/**
* Клвсс для реализации субъекта паттерна Наблюдатель (Observer)
* Class Observer
* @package patterns\observer
*/
class Observer implements \SplObserver
{
/**
* Сохраняем историю изменения наблюдаемого объекта
* @var array
*/
private $historyOfChanges = ... | true |
d0215b29c0761d8f0c28a0f216b2f94bfd4d584b | PHP | mcpanic/talkscape | /class.Highlight.php | UTF-8 | 1,288 | 2.578125 | 3 | [] | no_license | <?php
include_once "utils.php";
class Highlight{
public $id;
public $talk_id;
public $title;
public $start_at;
public $thumbnail_link;
public $owner;
function __construct(){
//$this->id = $id;
}
function getURL(){
return "";
}
function getHTML(){
$html = "";
$html .= "<li data-id='$this->id' data... | true |
4e9e0f6df5080d7191cfb9722d8b2915d1263319 | PHP | lucas-leal/sistema-treinamento-v2 | /app/Models/Registration.php | UTF-8 | 1,464 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Registration extends Model
{
public const AVERAGE_SCORE_TO_PASS = 70;
use HasFactory, UuidTrait;
public $incrementing = false;
public function user()
{
retur... | true |
e957bce133227426ffbf98220891e788658a1dfc | PHP | volodymyr-volynets/backend | /IO/PDF/Wrapper.php | UTF-8 | 3,575 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Numbers\Backend\IO\PDF;
class Wrapper extends \TCPDF {
/**
* Options
*
* @var array
*/
public $__options = [];
/**
* Odd color
*/
const ODD_COLOR = 'EEEEEE';
/**
* Constructor
*
* @param array $options
*/
public function __construct($options = []) {
// preset settings
i... | true |
7296189377ccc2a3649986a64ca8357d02bc7916 | PHP | AndresSierraM/asisge | /app/Http/Requests/PlanEmergenciaRequest.php | UTF-8 | 12,870 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
class PlanEmergenciaRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validati... | true |
049d40df6920a08a3680a70f0d61eb71bf792dff | PHP | leocavalcante/siler | /examples/graphql-annotations/src/Query.php | UTF-8 | 1,270 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Siler\Example\GraphQL\Annotation;
use DateTime;
use GraphQL\Type\Definition\ResolveInfo;
use Siler\GraphQL\Annotation\Field;
use Siler\GraphQL\Annotation\ObjectType;
use function Siler\Functional\always;
use function Siler\Functional\map;
/** @ObjectType */
class Query
{
... | true |
49ec434cac5035950ea385b2272fbb15e51d6f76 | PHP | FnK-Lap/Social-tracker | /src/SocialTracker/Bundle/ApplicationBundle/Command/YoutubeFetchCommand.php | UTF-8 | 1,967 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace SocialTracker\Bundle\ApplicationBundle\Command;
use SocialTracker\Bundle\ApplicationBundle\Entity\YoutubePost;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\... | true |
bf0794038b4f03fa1b57093b6377b72a10d9a0a9 | PHP | sharkcreep87/hoocay_dev | /vendor/cyvelnet/laravel-billplz/src/Cyvelnet/LaravelBillplz/Messages/BillplzOpenCollectionMessage.php | UTF-8 | 4,836 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Cyvelnet\LaravelBillplz\Messages;
use Cyvelnet\LaravelBillplz\BillplzPayment;
use Illuminate\Support\Str;
/**
* Class BillplzOpenCollectionMessage.
*/
class BillplzOpenCollectionMessage extends BillplzCollectionCommonMessage
{
/**
* @var string
*/
protected $description;
/**
... | true |
3de7ed944d3dad51de2a1e2220f4248685f4d45b | PHP | akimikimikimikimikimikimika/LangComparison | /PHP/Legacy/Process.php | UTF-8 | 866 | 2.703125 | 3 | [] | no_license | #! /usr/bin/env php
<?php
require_once("Utility.php");
function Process() {
global $i;
// 最終更新時刻取得用
$dt=new DateTime();
date_timestamp_set($dt,getlastmod());
println(<<<"Process"
プロセスID: {$i(getmypid())}
PHP
バージョン: {$i(PHP_VERSION)}{$i(PHP_EXTRA_VERSION)}
実行ファイル: {$i(PHP_BINARY)}
マニュアル: {... | true |
b75b21746edfd018362f12c987fab287a5a43e5b | PHP | leosantoscunha/blocksonline-test | /app/Models/User.php | UTF-8 | 1,342 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
{
... | true |
1fca7fb2e5438133cfa79d005b9797c6eed53690 | PHP | SheseR/simpaas | /src/Validation/ValidationErrorsTrait.php | UTF-8 | 1,266 | 2.875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Levtechdev\Simpaas\Validation;
trait ValidationErrorsTrait
{
protected array $validationErrors = [];
/**
* @param $error
* @param null $index
*
* @return $this
*/
protected function addValidationError($error, $index = null): self
{
... | true |
2bfb73b0a443b4162953ca0b5ee1c8181d856a46 | PHP | sunitchandra/LetsClock | /getData2_2.php | UTF-8 | 24,110 | 2.609375 | 3 | [] | no_license | <?php
include_once 'config/db_connection.php';
$time_line = array ();
for($i = 0; $i < 24; $i ++) {
$tym = date ( "H:i", strtotime ( $i . ':00' ) );
$endTime = date ( "H:i", strtotime ( '+30 minutes', strtotime ( $tym ) ) );
$time_line [$i] [0] = $tym;
$time_line [$i] [1] = $endTime;
}
$time_line2 = arra... | true |
46cbd06c0038b09569c6080c0fbdd1f785112543 | PHP | humaun-kabir/advance_php | /class.php | UTF-8 | 279 | 3.40625 | 3 | [] | no_license | <?php
// A php class is a group of values with a set of operations to manipulate this values.
class Mobile{
public $model;
function showModel($number){
$this->model = $number;
echo "Model number: $this->model";
}
}
?> | true |
f0912bb1f30af21acd34fbd4030e2a25331470c2 | PHP | privarepan/pan-zoe-blog-api | /app/Models/Collect.php | UTF-8 | 1,801 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\Collect
*
* @property int $id
* @property int $user_id
* @property int $topic_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Da... | true |
58234b04b12a4d385a718e7e2ee639532ed469f6 | PHP | Tuseki/ForumPrima | /Forumprima/model/tools/RegisterTools.php | ISO-8859-1 | 5,070 | 2.78125 | 3 | [] | no_license | <?php
require_once(APPPATH.'/model/DAO/UserDAO.php');
class RegisterTools{
private $userDAO;
private $err_tab;
private $user;
//definition des constantes d'erreur
const LOGIN_EMPTY = "Vous devez introduire un login";
const LOGIN_ALREADY_EXIST = "Le login existe dj";
const LOGIN_TOO_SHORT = "Le login... | true |
a46d36e8e482a5ee7d095becf652c69cca358b97 | PHP | nodes-php/counter-cache | /src/Exceptions/RelationNotFoundException.php | UTF-8 | 647 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Nodes\CounterCache\Exceptions;
/**
* Class RelationNotFoundException.
*/
class RelationNotFoundException extends CounterCacheException
{
/**
* RelationNotFoundException constructor.
*
* @author Morten Rugaard <moru@nodes.dk>
*
* @param string $message
* @param int ... | true |
d0ec19cbf4039f98a61258bf2ad3a3f244bc6856 | PHP | Tanguyrob/formulaire | /templates/suppression2.php | UTF-8 | 719 | 2.828125 | 3 | [] | no_license | <?php
//connection au serveur:
$connect = mysql_connect( "localhost", "root", "" ) ;
//sélection de la base de données:
$basedonnees = mysql_select_db( "INFOS" ) ;
//récupération de la variable d'URL,
//qui va nous permettre de savoir quel enregistrement supprimer:
$id = $_GET["idPersonne"] ;
//r... | true |
6e170b9f694cdabd0f547ed4c422b3018378f89e | PHP | dannywj/MiaApiDoc | /www/Srv/Api/Api.class.php | UTF-8 | 1,736 | 2.84375 | 3 | [] | no_license | <?php
/**
* API初始化类
* Created by DannyWang
* 2015-07-15
*/
namespace ApiDocs\Api;
include __DIR__ . '/Config.php';
class Api {
private $_api_path;
private $_api_function;
/**
* 初始化
* @throws \ApiDocs\Core\Exception\ServerException
*/
public function init() {
$this->_check... | true |
8f0f01e9db615add9be3a1a3c8623404b1767e4b | PHP | marcinstawicki/extract-ms-php | /app/entity/uri-abstract.php | UTF-8 | 2,337 | 3.046875 | 3 | [] | no_license | <?php
namespace MsPhp\App\Entity;
abstract class UriAbstract {
protected bool $isAbsolute = false;
protected string $referer = '';
protected string $scheme = 'http';
protected string $host = '';
protected string $fragment = '';
protected ?string $result = '';
protected array | null $query ... | true |