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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3b25cfcb5665e54755bd76376ade0f09ac75a2dc | PHP | alejo2212/teusaquillo | /model/controlCompostajeTableClass.php | UTF-8 | 5,708 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
use mvc\model\modelClass;
use mvc\config\configClass;
/**
* Description of controlCompostajeTableClass
*
* @author Patricia Arteaga <aprendiz.patricia-819@hotmail.com>
*/
class controlCompostajeTableClass extends controlCompostajeBaseTableClass {
public static function getCountPages() {
... | true |
8603425f0ac3a319dadca0b07da038f2482609a5 | PHP | alexsk/rsgate | /core/logicboxes.class.php | UTF-8 | 5,824 | 2.640625 | 3 | [] | no_license | <?php
class LogicBoxesAPI {
var $key;
var $formParameters = array();
var $formActionURL = array('url' => '', 'method' => '');
var $transid = '';
var $userid = 0;
var $name = '';
var $emailAddr = '';
var $sellingcurrencyamount = 0;
var $accountingcurrencyamount = 0;
var $redir... | true |
ca51607771fd8a5d4bfefeedb5e895db4cf47c55 | PHP | random-labs/Stellar-Clicker-Web | /database/seeds/UserTableSeeder.php | UTF-8 | 1,789 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
// ===============================================================================================================
// User Table Seeder
// ---------------------------------------------------------------------------------------------------------------
// Stellar Clicker
// https:/... | true |
4ede00a1d5f91b307054a38a82c0d14872e84a2b | PHP | MmeOokamy/php_desing_pattern_exercises | /ex00/Single.php | UTF-8 | 295 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
final class Single
{
// Your code here
private static $instance;
public function __construct(){}
public static function getInstance(): Single
{
if (!self::$instance){
self::$instance = new self();
}
return self::$instance;
}
} | true |
b20528d2981c0331a0bf52343234465d71fe0885 | PHP | weltonwms/clare | /application/models/cliente/Cliente_datatables.php | UTF-8 | 3,079 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Classe responsável por receber requisições do Datatables e processar os dados para o mesmo
*/
class Cliente_datatables extends CI_Model {
private function start() {
$this->db->select('c.id_cliente, c.nome, c.endereco, c.telefone... | true |
614f0ef3f8f8ab81ad813555ab6f15f29cf0e3e7 | PHP | UFOP-CSI477/2016-02-atividades-saraiva3 | /Atividade-003-Academico/app/Http/Controllers/DisciplinaController.php | UTF-8 | 3,060 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Disciplina;
use App\Turma;
use Illuminate\Support\Facades\Auth;
class DisciplinaController extends Controller
{
public function __construct(){
//$this->middleware('auth', ['except' => 'index']);
$this->middleware('auth');... | true |
90e71a8bd69089511455b4a617db441b78404755 | PHP | evgenyvh/KnowItAll | /contactform.php | UTF-8 | 687 | 2.515625 | 3 | [] | no_license | <?php
if (isset($_POST['submit'])){
$name = $_POST['name'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$mailTo = "519542@edu.rocmn.nl";
// $headers = "From: ".$mailFrom;
//$mailFrom->SetFrom($mailFrom);
$headers = "Reply-To: " . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
... | true |
ea572afda7b21e0f6f0b0c4c6d5533827458a920 | PHP | Ristpeter/actc_ProgramacionII | /modulos/inicio.php | UTF-8 | 886 | 2.671875 | 3 | [] | no_license | <?php
$qryNoticias = "SELECT titulo, imagen, link FROM noticias";
$rtaNoticias = mysqli_query($cnx, $qryNoticias);
$noticias=[];
while($row = mysqli_fetch_assoc($rtaNoticias)){
array_push($noticias, $row);
}
?>
<section class="noticias">
<h2>Novedades</h2>
<div>
<?php
... | true |
0535bfca05d8c723e8fd8317ddc0ebc7491c6506 | PHP | Pimpys/course | /lesson2.php | UTF-8 | 3,497 | 3.265625 | 3 | [] | no_license | <?php
null;
/*
Переменная считается NULL если:
ей была присвоена константа NULL.
ей еще не было присвоено какое-либо
значение.
она была удалена с помощью unset().
*/
echo $a;//
$a = null;
$a = 1;
unset($a);
echo $a;
/////
false;
//$age = array();
//$age = [];
//$age = 0;
//$age = null;
true;
//$age = array(... | true |
284110d9ab9d9632ba2d73d04a6894760dc14ce3 | PHP | myerscode/utilities-strings | /tests/EndsWithTest.php | UTF-8 | 1,308 | 2.9375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Tests;
class EndsWithTest extends BaseStringSuite
{
protected string $string = 'hello world. this is a unit test.';
public function __validData(): array
{
return [
[true, 'test.'],
[true, 'test.', true],
[true, 'test.', false],
[fals... | true |
8ea0a74d809adcc448acb3dc8e720ed00a615179 | PHP | carl-schelin/inventory | /hardware/devicetype.mysql.php | UTF-8 | 6,171 | 2.65625 | 3 | [] | no_license | <?php
# Script: devicetype.mysql.php
# Owner: Carl Schelin
# Coding Standard 3.0 Applied
# Description: Retrieve data and update the database with the new info. Prepare and display the table
header('Content-Type: text/javascript');
include('settings.php');
$called = 'yes';
include($Loginpath . '/check.php');
... | true |
af08403a9a85f200dae8140cf708ef1fc64d060b | PHP | DFID/aidstream-ogd | /app/Services/RequestManager/Activity/Tag.php | UTF-8 | 393 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php namespace App\Services\RequestManager\Activity;
use App\Core\Version;
Use App;
/**
* Class Tag
* @package App\Services\RequestManager\Activity
*/
class Tag
{
public $sector;
/**
* @param Version $version
*/
function __construct(Version $version)
{
$this->tag = $version->ge... | true |
522a58be38c906053110cc8ee4efe3ace5069248 | PHP | vfremaux/moodle-mod_amvonetroom | /class.Version.php | UTF-8 | 4,397 | 3 | 3 | [] | no_license | <?php
define ("AMVONETROOM_PROTOCOL_VERSION", "2.1");
class amvonetroom_Version {
private $major = 0;
private $minor = 0;
private $build = 0;
private $revision = 0;
public function __construct ($major, $minor = 0) {
if (!$major)
return;
if (is_string($major)) {
... | true |
b438772a09296542b8e45aa441e0e847be6608b3 | PHP | XiaohuChen/evcapi | /app/Libraries/Verify.php | UTF-8 | 1,775 | 3 | 3 | [] | no_license | <?php
namespace App\Libraries;
use App\Exceptions\ArException;
//密码处理相关 加密 验证 核对等
trait Verify
{
/**
* @method 验证密码格式
* @param string $pass 密码
* @param int $min 最小位数
* @param int $max 最大位数
* @param callback $func 验证函数
*/
public static function PassFmt(string $pass, int $min, int... | true |
369c38d8923165b3cde2e249e7a9743a4f127ba1 | PHP | neroidaa/seeutheme | /views/layouts/content-bottom.php | UTF-8 | 1,071 | 2.546875 | 3 | [] | no_license | <?php
if($this->page !== null && count($this->page->contacts)){
echo '<div class="module bottom-module contact-module">';
echo '<h4>Contacts</h4>';
foreach($this->page->contacts as $i => $cnt){
$contact = Contact::model()->localized()->findByPk($cnt->id);
if($contact != null) {
echo '<div class="contac... | true |
663fe71110102f2d9e938bf5a7834f65aefbdc01 | PHP | Brandioo/PhpUnit | /app/Models/Users.php | UTF-8 | 1,170 | 3.09375 | 3 | [] | no_license | <?php
namespace App\Models;
class Users{
public $firstName;
public $lastName;
public $email;
public $password;
/**
* @return mixed
*/
public function getFirstName()
{
return $this->firstName;
}
/**
* @param mixed $firstName
*/
public function setFi... | true |
a45a1554a5dbd59d8aba881f84cec5f401a7a74e | PHP | samalenge74/lms_web_app | /cronjobs/escalations.php | UTF-8 | 715 | 2.703125 | 3 | [] | no_license | <?php
try
{
include_once("../classes/connection.inc.php");
include_once("../classes/mysql_database.inc.php");
$db = DBFactory::CreateDatabaseObject("MySqlDatabase");
$db->Connect($host, $database, $username, $password);
$today = date("Y/m/d");
$db->Begin();
$db->Execute("
SELEC... | true |
3a6fde59e128444f8e82cd40ba657b164fc09035 | PHP | chenyf/redcloud | /tlc_lab/Application/Common/Model/Util/SystemUtilServiceModel.class.php | UTF-8 | 1,430 | 2.5625 | 3 | [] | no_license | <?php
namespace Common\Model\Util;
use Common\Model\Common\BaseModel;
class SystemUtilServiceModel extends BaseModel {
//TODO 删除之前检查该文件是否被其他课程使用
public function removeUnusedUploadFiles() {
$targets = $this->getSystemUtilDao()->getCourseIdsWhereCourseHasDeleted();
if (empty($targets)... | true |
a925aec94609529b903e783c6a17b6600c534d92 | PHP | JaimeJunquera/aloha | /app/Http/Controllers/BlogController.php | UTF-8 | 2,565 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests;
use App\Repository\CategoriaRepository;
use Illuminate\Http\Request;
use App\Repository\DocumentoRepository;
use App\Repository\BlogRepository;
class BlogController extends Controller {
private $blogRepo;
private $catRepo;
private $docRepo;
... | true |
04163557d9c0cf0e3e4bc64aa1b2dc1074a31117 | PHP | marianopeterson/Flitch | /src/Flitch/Cli/ArgumentParser.php | UTF-8 | 7,517 | 3.078125 | 3 | [] | no_license | <?php
/**
* Flitch
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to mail@dasprids.de so I can send you a ... | true |
fe8e403918862f3afe9b2476c8f13f58a44fb784 | PHP | SolumDeSignum/deviation | /src/Services/DeviationLoggerService.php | UTF-8 | 1,625 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace SolumDeSignum\Deviation\Services;
use ErrorException;
use Illuminate\Log\Events\MessageLogged;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use function explode;
use function storage_path;
use const PHP_EOL;
class DeviationLoggerService
{
public Logger $logge... | true |
e2bd8d2df1cd3ac3ec25ccd061aa786eb9bfba01 | PHP | porkaria/locale | /tests/cases/models/behaviors/locale.test.php | UTF-8 | 8,623 | 2.640625 | 3 | [] | no_license | <?php
App::import('Behavior', 'Locale');
App::import('Lib', 'Locale.LocaleException');
/**
* Testes do Behavior Locale
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @author Cauan Cabral <cauan@radig.com.br>, José Agripino <jose@radig.com.br>
* @l... | true |
3607cd8dcd5d2d0757285e4d0fba16a95627040b | PHP | Pablisnky/horebi | /modulos/VerificaAfiliado_comercio.php | UTF-8 | 468 | 2.796875 | 3 | [] | no_license | <?php
if(!isset($_SESSION["AfiliadoCom"])){//sino esta declarada la variable $_SESSION devuelve a ingresar.php, con esto se garantiza que se hizo login
// echo "ID_Afiliado= " . $_SESSION["Afiliado"];
header("location:../vista/ingresar.php");
}
else{
$sesion= $_SESSION["AfiliadoCom"]... | true |
3c2322c4f47a1ef3c3447c8fb83b8d524f059485 | PHP | kelvenbrito/projetoPHP | /cadDepto.php | UTF-8 | 3,323 | 2.90625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>Departamentos - inclusão</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32... | true |
b66f42cfbd28ee5c2bea3675b9b6eb95c7f7d65e | PHP | Jyrno42/EstonianLolLadder | /brain/class.Elophant.php | UTF-8 | 9,999 | 2.640625 | 3 | [] | no_license | <?php
/**
* Elophant.com - PHP API
*
* @author Kaj <EUW Summoner: Edocsyl>
* @since 14.11.2012
* @copyright Kaj <kaj@edocsyl.ch>
* @website http://edocsyl.ch/
* @version 1.1
* @license BSD http://www.opensource.org/licenses/bsd-license.php
* @docs http://elophant.edocsyl.ch/ | http://elophant.com/developers/d... | true |
4d38a65fea31bc80d56f34955fcc6ffa0d2f55c5 | PHP | proyecto-aia/proyecto | /app/Model/Producto.php | UTF-8 | 1,717 | 2.59375 | 3 | [] | no_license | <?php
class Producto extends AppModel {
var $name = 'Producto';
var $belongsTo = array(
'Moneda' => array(
'className' => 'Moneda'
)
);
var $hasMany = array(
'Image' => array(
'className' => 'Image'
)
);
/*
var $hasMany = array(
... | true |
4ee47be345016c994b8ff91ff2eb0afb984ad5b7 | PHP | kaiquegarcia/arraydb-php-mysql | /src/Database/Operators/NotIn.php | UTF-8 | 156 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace ArrayDB\Database\Operators;
class NotIn extends In
{
public function getQuerySymbol(): string
{
return " NOT IN ";
}
} | true |
5e4eab56557d65e5b392b20a9ab87607b9564957 | PHP | rokas0/Project-semester-website | /classes/Database.class.php | UTF-8 | 3,883 | 3.03125 | 3 | [] | no_license | <?php
class Database {
private $db;
// Store the single instance of Database
private static $instance;
private $server;
private $user;
private $pass;
private $database;
function __construct($host = NULL, $username = NULL, $passwd = NULL, $dbname = NULL) {
if (is_null ( $host )) {
$this->se... | true |
71e2233fccd6815fbfdd90ff13653d43c2296994 | PHP | motto/social_uj | /lib/factory.php | UTF-8 | 7,306 | 2.875 | 3 | [] | no_license | <?php
/*tartalmazza:
Universal osztalyt ami meghívható $param függvénnyel(string vagy tömb)
BaseHtml osztályt ami az alap html nézetet állítja elő az univerzál gyermeke
Auto ostály az Universal kiterjesztése automatikusan elindítja a result függvényt vagy amit a futtat paraméterben megadunk
OBJ osztaly objektum gene... | true |
62c5d717e6c6c1307e5b8b7e61244912663c0897 | PHP | unbolt/imp | /app/Console/Commands/RebuildCharacterCache.php | UTF-8 | 3,867 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\User;
use Cache;
use Carbon;
use Lodestone;
class RebuildCharacterCache extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'character:cache';
/*... | true |
5a0b0973b1bd2627be4f851e42bef360eb491bf5 | PHP | myttyy/file-segment-upload | /src/FileSegmentUpload.php | UTF-8 | 5,219 | 2.921875 | 3 | [] | no_license | <?php
/**
* PHP大文件上传
*
*
*/
namespace myttyy;
class FileSegmentUpload{
// 临时文件分隔符
const FILE_SPLIT = '@Split@';
/**
* 上传目录
*
* @var mixed|string
* 2021年1月25日 下午11:43
*/
private static $filePath = '.';
/**
* 文件临时目录
*
* @var mixed
* 2021年1月25日 下午1... | true |
b56432afddb853f484ed469ffd3cdb7c59ba99ed | PHP | CZHIC/webChat | /App/TcpController/Parser.php | UTF-8 | 1,351 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Tioncico
* Date: 2018/10/17 0017
* Time: 9:10
*/
namespace App\TcpController;
use EasySwoole\Socket\Bean\Caller;
use EasySwoole\Socket\Bean\Response;
use EasySwoole\Socket\AbstractInterface\ParserInterface;
use EasySwoole\Utility\CommandLine;
class Parser implements Pars... | true |
077fd90a80041c24788328cbc11989d88cfc4452 | PHP | jasny/phpdoc-parser | /src/Tag/PhpDocumentor/ExampleTag.php | UTF-8 | 1,583 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Jasny\PhpdocParser\Tag\PhpDocumentor;
use Jasny\PhpdocParser\Tag\AbstractTag;
use Jasny\PhpdocParser\PhpdocException;
use function Jasny\array_only;
/**
* Custom logic for PhpDocumentor 'example' tag
*/
class ExampleTag extends AbstractTag
{
/**
* Process a notati... | true |
e0c8f1dd8e5ba42241bfca7c22b05a5ecc143a1e | PHP | tkprocat/laravel-wol | /app/API/Controllers/AuthController.php | UTF-8 | 2,120 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace LaravelWOL\API\Controllers;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Dingo\Api\Facade\API;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Mail;
use LaravelWOL\User;
use Tymon\JWTAuth\Facades\JWTAuth;
use Tymon\JWTAuth\Exceptions\JWTException... | true |
8f015f6a141fb9c2198ea51cd97181f939f20822 | PHP | mayonaiys/TP6-PHP | /formulaire.php | UTF-8 | 3,470 | 3.390625 | 3 | [] | no_license | <hr>
<h2>Exercice 2 :</h2>
<?php
class Formulaire{
//Méthodes :
function __construct($nomfic,$method) {
echo "<form method='".$method."' action='".$nomfic."'>";
}
function ajouterZoneTexte($name){
echo '<input type="text" name='.$name.'/>';
}
function ajouterBouton(){
... | true |
1f4f3e7315eb1873af88c591d87a4ecc3897cb7b | PHP | BukkitGerman/gamer4life-website | /database/migrations/2021_02_07_231602_create_user_follows_user_table.php | UTF-8 | 1,129 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUserFollowsUserTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$usersTable = config('a... | true |
054ad8ceafdd8ab7c18e07114f21374a7a4612e9 | PHP | sshaddicts/Mophpidy | /src/Command/templates/queue.php | UTF-8 | 2,077 | 2.625 | 3 | [] | no_license | <?php
use Longman\TelegramBot\Entities\Update;
use Mophpidy\Api\Player;
use Mophpidy\Command\Command;
use Mophpidy\Entity\CallbackContainer;
use React\Promise as When;
return new class('/queue/i') extends Command {
public function execute(Update $update, array $matches, CallbackContainer $callback = null)
{
... | true |
c6df5a7c3b827c9ae8037bd884b6355b874a6fe7 | PHP | ImperatorDeos/task-sourcing | /edit-bids.php | UTF-8 | 3,291 | 2.734375 | 3 | [] | no_license | <?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en">
<head>
<?php
//start session
session_start();
//check session vaiable admin is present and user logged in
//only admins can access this page
if(isset($_SESSION['username'])){
//include relevant file... | true |
76ed40a719fe626015c0c00154a8db762afcf5dd | PHP | kimkit/vicuna-next | /src/Greeter/GreeterServiceProvider.php | UTF-8 | 326 | 2.703125 | 3 | [] | no_license | <?php
namespace Greeter;
use Illuminate\Support\ServiceProvider;
class GreeterServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->instance('greeter', $this);
}
public function hello($name = 'world')
{
return sprintf('hello %s', $name ?: 'world');
... | true |
84ec4772b088fff9dd3e330b5efb5550c44310b7 | PHP | FabricioRojas/mirTasks | /modulos/DSW/Practica2/index.php | UTF-8 | 1,592 | 2.84375 | 3 | [] | no_license | <?php
//Iniciamos un array vacío
$taskList = array();
//Mostramos el formulario
$html = '<form action="index.php" method="post">';
$html .= '<input type="text" name="task">';
$html .= '<input type="submit" value="Añadir tarea">';
$html .= '</form>';
echo $html;
//SI hay COOKIE guar... | true |
8ab9b0f48ae302efc0018dd7f943da558519cbea | PHP | danreeves/lumberjack | /views/category.php | UTF-8 | 1,014 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Category Views
*
* Usage:
* Calls a function based on the category of a page, in the style of `[cat]_view`
* Hyphens are converted into underscores automatically,
* e.g. case-studies -> case_studies_view
*
* Global context changes should be made either after Initial Set Up in
* this file, or in the... | true |
48220d040d405f7c406dc22eada6ebd2d0abe350 | PHP | grrr-amsterdam/garp3 | /library/Garp/Auth/Adapter/Vimeo.php | UTF-8 | 4,780 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Garp_Auth_Adapter_Vimeo
* Authenticate using Vimeo. Uses Zend_OAuth
*
* @author Harmen Janssen | grrr.nl
* @modifiedby $LastChangedBy: $
* @version $Revision: $
* @package Garp
* @subpackage Auth
* @lastmodified $Date: $
*/
class Garp_Auth_Adapter_Vimeo extends Garp_Auth_Adapter_Abstract {
/**... | true |
47f2d16eca8e705e0620418ae2aea168982d470b | PHP | CLOUGH/The-Students-Portal | /application/models/news.php | UTF-8 | 396 | 2.734375 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
class News extends Eloquent{
public static $table = 'news';
public function s_updated_at()
{
$string_dates = array("JAN", "FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC");
$new_date = preg_split('/[- :]/',substr($this->updated_at, 0, 9));
$new_date[2] = $string_dates[intval($new_d... | true |
5c79c6c704e5eedd6b37b74dbe41b6d097910883 | PHP | Oluwafemikorede/gbedu | /cms/app/Helpers/Upload.php | UTF-8 | 6,798 | 3.15625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Helpers;
//Version 1.0
//Last edited by Oluwafemi Korede
class upload
{
public static $name;
public static $width;
public static $filename;
public static $images;
public static $success;
public static $_ext;
public static $filesize;
public static $multiple_file;
//Set a default random nam... | true |
17f2b7e7662d88d14f0c0fba35732f8e2b5477e9 | PHP | iramirezc/my-hacker-rank-solutions | /algorithms/warmup/diagonal-difference/diagonal-difference.php | UTF-8 | 465 | 3.53125 | 4 | [] | no_license | <?php
$_fp = fopen("php://stdin", "r");
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
$n = (int)fgets($_fp);
$matrix = array();
for ($i=0;$i<$n;$i++){
array_push($matrix, explode(" ", fgets($_fp), $n));
}
$d1 = $d2 = 0;
for ($x=0; $x<$n; $x++){
for ($y=0; $y<$n; $y++) {
if ($... | true |
91e45a77f0b62eb0e45c9a1d061b7cbafe6e1b2b | PHP | Nomilol/php-exercise | /array/exercice8.php | UTF-8 | 203 | 3.109375 | 3 | [] | no_license | <?php
$mois = array('Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', 'Décembre');
for ($i=0; $i <sizeof($mois) ; $i++) {
echo $mois[$i];
}; | true |
eaf56cb65c7620f02a6a0efeb48c84e7c5b383ee | PHP | tacoberu/fluent-php | /libs/Intl/NumberIntl.php | UTF-8 | 1,572 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) since 2004 Martin Takáč
* @author Martin Takáč <martin@takac.name>
*/
namespace Taco\FluentIntl;
/**
* https://www.projectfluent.org/fluent/guide/functions.html
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
* https://tc39.es/ecma4... | true |
0ccb673d35397f884ef661046f3e9b277f32dacf | PHP | kumaomao/auth-token | /src/helper.php | UTF-8 | 1,291 | 2.890625 | 3 | [] | no_license | <?php
if (!function_exists('getRandStr')) {
/**
* 产生数字与字母混合随机字符串
* @param int $len 数值长度,默认6位
* @return string
*/
function getRandStr($len = 6)
{
$chars = [
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',... | true |
0726382e0bacfe809a24ebb1661f6f6492e0272e | PHP | rifqirizaldi07/Test-Technical-Bootcamp-DumbWays.id | /Soal_5.php | UTF-8 | 386 | 2.734375 | 3 | [] | no_license | <?php
$jumlahManusia = 6;
function jabatTangan($jumlahManusia){
$count_Handshake = 0;
for($i = 0; $i < $jumlahManusia; $i++){
for($j = 1; $j < $jumlahManusia; $j++){
$count_Handshake += 1;
}
}
return $count_H... | true |
16eb3014d681ca67f73c0d756060a024bf21eeac | PHP | RobThree/TwoFactorAuth | /lib/Providers/Qr/BaconQrCodeProvider.php | UTF-8 | 4,610 | 2.984375 | 3 | [
"MIT",
"CC0-1.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | <?php
declare(strict_types=1);
namespace RobThree\Auth\Providers\Qr;
use BaconQrCode\Renderer\Color\Rgb;
use BaconQrCode\Renderer\Image\EpsImageBackEnd;
use BaconQrCode\Renderer\Image\ImageBackEndInterface;
use BaconQrCode\Renderer\Image\ImagickImageBackEnd;
use BaconQrCode\Renderer\Image\SvgImageBackEnd;
use BaconQ... | true |
04c331ead60ee288c975bcc82af3842a6130c78c | PHP | zhanghaidi/yun_shop | /app/console/Commands/WriteFrame.php | UTF-8 | 2,356 | 2.90625 | 3 | [] | no_license | <?php
namespace app\console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\SplFileInfo;
class WriteFrame extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'write:fra... | true |
83e2e4ee23899ec3dd1af4342e2e491882903712 | PHP | hubzero/standards | /Php/Sniffs/WhiteSpace/DisallowBlankLinesWithSpacesSniff.php | UTF-8 | 1,242 | 3.0625 | 3 | [] | no_license | <?php
/**
* Php_Sniffs_WhiteSpace_DisallowBlankLinesWithSpacesSniff
*
* No blank lines allowed that contain any form of indentation
*
* @category PHP
* @package standards
* @author Sam Wilson <samwilson@purdue.edu>
*/
class Php_Sniffs_WhiteSpace_DisallowBlankLinesWithSpacesSniff implements PHP_CodeSniffer... | true |
be3f7d460fe3cabf396edcf8d0ebede12d263951 | PHP | damir-bubanovic/PHP-CodeBook | /BASIC - DATE & TIME - basic steps.php | UTF-8 | 861 | 3.140625 | 3 | [] | no_license | <?php
/*
1. Treat time internally as Coordinated Universal Time (abbreviated UTC and also known as GMT,Greenwich Mean Time)
2. Treat time not as an array of different values for month, day, year, minute, second, etc.,
but as seconds elapsed since the Unix epoch: midnight on January 1, 1970 (UTC, of course)
m... | true |
d1c62df79537c7b0aad33024690b50b00c472aaa | PHP | ViktorSel/laravel-arangodb | /src/Eloquent/Concerns/IsAranguentModel.php | UTF-8 | 1,480 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace LaravelFreelancerNL\Aranguent\Eloquent\Concerns;
use Illuminate\Support\Str;
use LaravelFreelancerNL\Aranguent\Eloquent\Builder;
use LaravelFreelancerNL\Aranguent\Query\Builder as QueryBuilder;
trait IsAranguentModel
{
/**
* @override
* Create a new Eloquent query builder for the model.... | true |
edc1ae4cee6ae6fe9b172b5c8324d1778adcd04c | PHP | rahulyhg/fileprofit-client | /app/services/PaginatorService.php | UTF-8 | 6,654 | 2.59375 | 3 | [] | no_license | <?php namespace App\Services;
use App\Models\Game;
use App\Models\Taxonomy;
use GuzzleHttp\Client;
use Slim\Container;
use Symfony\Component\Config\Definition\Exception\Exception;
class PaginatorService extends Service
{
private $categoryAlias;
private $itemsPerPage;
private $maxPaginationElem... | true |
64b7b75d2f1c81dee1859cb481609f9b871d1c2b | PHP | kjcx/ckp_game | /Application/Models/Excel/Favour.php | UTF-8 | 1,058 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: dongkai
* Date: 2018/4/19
* Time: 下午2:05
*/
namespace App\Models\Excel;
use App\Models\Model;
use think\Db;
/**
* 好感度
* Class Npc
* @package App\Models\Excel
*/
class Favour extends Model
{
public $table = 'ckzc.Excel_Favour';
public function insert($arr)
... | true |
f6a04ab27f5283990959e976cee1f0128baa8b17 | PHP | MDrollette/easypost-php | /lib/EasyPost/Shipment.php | UTF-8 | 1,970 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
class EasyPost_Shipment extends EasyPost_Resource {
public static function constructFrom($values, $class=null, $apiKey=null) {
$class = get_class();
return self::constructFrom($values, $class, $apiKey);
}
public static function retrieve($id, $apiKey=null) {
$class = get_class();
return sel... | true |
60f98cdf218df56ea692067d51d53e29e196af00 | PHP | ValentinHO/LaravelPermissionsRolesREST | /database/seeds/RolesAnPermissionSeeder.php | UTF-8 | 2,830 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Role;
use Spatie\Permission\Models\Permission;
class RolesAnPermissionSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
app()['cache']->forget('spatie.permission.c... | true |
17cab01be13f1ce9acce6f593c2b778519a7a3e6 | PHP | carredamien/burger.github.io | /admin/view.php | UTF-8 | 3,196 | 2.65625 | 3 | [] | no_license | <?php
require './Database.php';
if(!empty($_GET['id']))
{
$id = checkInput($_GET['id']);
}
$db =Database::connect();
$statement = $db->prepare('SELECT items.id, items.name,items.description, items.price,items.image, categories.name AS category FROM items LEFT JOIN categories ON items.category = categories.id... | true |
2235d7996b517ffc24dcc8b145bc7982c60ce834 | PHP | hannenz/haus-st-jakobus | /phpincludes/courses/courses_parser.php | UTF-8 | 4,107 | 2.75 | 3 | [] | no_license | <?php
namespace Scope;
class ProjectParser extends \Contentomat\Parser {
protected $images = array();
protected $imagesProcessed = array();
protected $currentImageNr = 1;
protected $templateContainedImage = false;
public function __construct() {
parent::__construct();
$this->debug = new \Contentomat\D... | true |
39ea412e790add67001dc98deddcc96b9612b8b0 | PHP | coooola/Confrontations | /confrontation/confrontation.php | UTF-8 | 1,688 | 2.75 | 3 | [] | no_license | <?php
include 'connexionBase.php';
class Confrontation {
private $numConfrontation ;
private $nomConfrontation;
private $dateConfrontation;
//constructeur
public function __construct ($numConfrontation,$nomConfrontation,$dateConfrontation)
{
$this->numConfrontation=$numConfrontation;
$this->nomConfrontatio... | true |
498cf0a16a5913b6eb1ce779c04b7e46903750eb | PHP | phpstan/phpstan-src | /tests/PHPStan/Analyser/data/bug-6566-types.php | UTF-8 | 1,129 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php // lint >= 8.0
namespace Bug6566Types;
use function PHPStan\Testing\assertType;
class A {
public string $name;
}
class B {
public string $name;
}
class C {
}
/**
* @template T of A|B|C
*/
abstract class HelloWorld
{
public function sayHelloBug(): void
{
$object = $this->getObject();
assertType('T... | true |
23f8a4935273a630e2425d8154dc449c3f09baa6 | PHP | ahmedalzeer/ecommerce | /register.php | UTF-8 | 3,936 | 2.6875 | 3 | [] | no_license | <?php
session_start();
$pagetitle = 'Regiter Page';
if (isset($_SESSION['user']))
{
header('location:index1.php');
}
include 'init.php';
if (isset($_SERVER['REQUEST_METHOD']) == 'POST')
{
if (isset($_POST['user'])&&isset($_POST['pass']))
{
$user = filter_var($_PO... | true |
50a6afd8550c33950c81d83ce1c3199e61ed32ad | PHP | fabiomigliorini/MGspa | /old/mg-laravel/app/Models/ChequeRepasseCheque.php | UTF-8 | 2,258 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
/**
* Campos
* @property bigint $codchequerepassecheque NOT NULL DEFAULT nextval('tblchequerepassecheque_codchequerepassecheque_seq'::regclass)
* @property bigint $codcheque NOT NULL
* @property big... | true |
433dc6cdba860e6de1da82978b04f3e7aca01bf7 | PHP | frozenblood07/inter | /src/Utility/ResponseUtility.php | UTF-8 | 761 | 2.875 | 3 | [] | no_license | <?php
namespace App\Utility;
class ResponseUtility
{
/**
* @param $data
* @return array
*/
public static function successResponse($data = array()) : array
{
return array('status' => true, 'data' => $data);
}
/**
* @param $message
* @return array
*/
publi... | true |
e85f5923c0ba52fa839bd93d285e6408e4b190c2 | PHP | htmlacademy-yii/55546-task-force-1 | /frontend/models/UserSpecialization.php | UTF-8 | 1,272 | 2.765625 | 3 | [] | permissive | <?php
namespace app\models;
use common\models\User;
use yii\db\ActiveRecord;
/**
* Класс для работы с моделью специализаций пользователя
*
* Class UserSpecialization
*
* @package app\models
*/
class UserSpecialization extends ActiveRecord
{
/**
* Получение имени таблицы модели
*
* @return st... | true |
5926c594b87a46a69c14c4014c86788b058947ea | PHP | milkcreation/presstify-transaction | /Template/ExportListTable/Actions.php | UTF-8 | 1,226 | 2.640625 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace tiFy\Plugins\Transaction\Template\ExportListTable;
use tiFy\Support\DateTime;
use tiFy\Plugins\Parser\Driver\CsvWriter;
use tiFy\Plugins\Transaction\Template\ExportListTable\Contracts\Actions as ActionsContract;
use tiFy\Template\Templates\ListTable\Actions as BaseActions;
cl... | true |
500f3cb7bce163cae2a1cd9e50c1fc7c5b785c2f | PHP | mydesignivan/Bottino | /application/views/front/products_view.php | UTF-8 | 832 | 2.5625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<div class="contents contents-width">
<h1 class="title"><?=$info['categorie_name']?></h1>
<p><?=$info['categorie_content']?></p>
<br />
<?php
foreach( $info['listProducts'] as $row ){
?>
<div class="trow">
<?php
$product... | true |
4c26f87c7c512fd2a0f201ba0325acbeaff26ea8 | PHP | kirillantv/yii2-wishmaker | /models/Wishmaker.php | UTF-8 | 2,225 | 2.65625 | 3 | [] | no_license | <?php
/**
* This file is part of Yii2-Wismaker project
* (c) kirillantv <http://github.com/kirillantv/>
*
* For more information read README and LICENSE file
*/
namespace kirillantv\wishmaker\models;
use Yii;
use yii\web\NotFoundHttpException;
class Wishmaker extends \yii\base\Model
{
const OR_LIKE = 'or li... | true |
9e1197246a1765f868b349d0a61f8b9d7a9e2c28 | PHP | avtehnik/alarm | /src/AVtehik/AlarmBundle/Command/ExecutorCommand.php | UTF-8 | 1,201 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: vitaliy
* Date: 7/18/15
* Time: 10:13 PM
*/
namespace AVtehik\AlarmBundle\Command;
use AVtehik\AlarmBundle\Services\AlarmManager;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOp... | true |
0551c678d9dd3d5510e009bfd8c95e28753e9f77 | PHP | webfactorybulgaria/Comments | /src/Repositories/FacebookComment.php | UTF-8 | 1,169 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace TypiCMS\Modules\Comments\Repositories;
use Illuminate\Database\Eloquent\Model;
use TypiCMS\Modules\Core\Shells\Repositories\RepositoriesAbstract;
use Navigator;
class FacebookComment extends RepositoriesAbstract implements CommentInterface
{
public function __construct(Model $model)
{
... | true |
9c38223317cc724f5d9fe7812f7f5c94abb29c01 | PHP | traviskuhl/warhol | /lib/warhol/cli/update.php | UTF-8 | 585 | 2.765625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
namespace warhol\cli;
use \warhol;
class update extends cmd {
public static $opts = array(
""
);
public function process() {
// root
$this->run($this->getCommand(0));
}
public function run($root=false) {
// get our root
$this->getConfig($root);
// read the files
foreach ($this->ma... | true |
897d1841dcdc83b8f0ec1e8af32f805205959db7 | PHP | liaoshengping/dnmp | /www/demo/index.php | UTF-8 | 540 | 2.828125 | 3 | [] | no_license | <?php
echo 'demo ';
$redis = new Redis();
$redis->connect('redis', 6379); //连接Redis
$redis->set( "testKey" , "连接redis成功"); //设置测试key
echo $redis->get('testKey').PHP_EOL;
$dbms='mysql'; //数据库类型
$host='mysql'; //数据库主机名
$dbName='mysql'; //使用的数据库
$user='root'; //数据库连接用户名
$pass='root'; //对应的密码
$dsn... | true |
3c1f7cb530cda0ace764f4edfc3e4a02f71f14d9 | PHP | mehmetsen80/OyventWeb | /class/Subject.class.php | UTF-8 | 2,238 | 2.734375 | 3 | [] | no_license | <?php
require_once($_SERVER['DOCUMENT_ROOT']."/db/DbConnection.php");
class Subject{
public $pkSubjectID = NULL;
public $fkAlbumID = NULL;
public $title = NULL;
public $postdate = NULL;
public $privacy = NULL;
function __construct($pkSubjectID=NULL){
if(isset($pkSubjectID)){
$this->pkSubjectID = $pk... | true |
af739b40bc3a71f775d669b19ecec8eb3d378fbd | PHP | mmilidoni/cryptaxes | /Transaction.php | UTF-8 | 1,193 | 3.46875 | 3 | [] | no_license | <?php
class Transaction {
public $quantity = 0;
private $balance = 0;
public $price = 0;
public $operation = "in";
public $datetime;
private $gain = 0;
function __construct($quantity, $price, $operation, $datetime) {
$this->quantity = $quantity;
$this->price = $price;
... | true |
efb84b3c2f57a8f3af6ffcda1d5caced79d04f70 | PHP | marcelomesquita/mm-role | /models/ForgetForm.php | UTF-8 | 2,217 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\base\Model;
use yii\helpers\Url;
use yii\helpers\Html;
/**
* ForgetForm is the model behind the login form.
*
* @property User|null $user This property is read-only.
*
*/
class ForgetForm extends Model
{
public $email;
private $_user = false;
/**
* @return arr... | true |
ab73115cdacad12212a0f07239003f8c7c3d41cd | PHP | matheus-miranda39/innout | /src/models/WorkingHours.php | UTF-8 | 277 | 2.515625 | 3 | [] | no_license | <?php
class WorkingHours extends Model {
protected static $tableName = 'working_hours';
protected static $coluns = [
'id',
'user_id',
'work_date',
'time1',
'time2',
'time3',
'time4',
'worked_time'
];
} | true |
b3b83002b83365ec8102f070e4d22e90fde2289f | PHP | elvenite/advanced-webform | /utils/helpers.php | UTF-8 | 451 | 3.03125 | 3 | [] | no_license | <?php
if (!function_exists('return_bytes')){
/**
* Converts ini parameters like upload_max_filesize to bytes.
* @param string $size_str
* @return int
*/
function return_bytes ($size_str)
{
switch (substr ($size_str, -1))
{
case 'M': case 'm': return (int)$size_str * 1048576;
case 'K': case 'k': re... | true |
5c49f669e70fe87c32268af622a023f441d6e93b | PHP | evaldobarbosa/sanitizer | /example/example4.php | UTF-8 | 1,022 | 2.671875 | 3 | [] | no_license | <?php
require "autoloader.php";
use Sanitize\Sanitizer;
$str = chr(15) . chr(20) . 'ABCdefGh"I"%$^~Ç&' . chr(215) . chr(220);
$s = Sanitizer::add('string', 'string');
echo "\n=== String ===\n";
echo "Origin: \t\t", $str, "\n";
echo "Encode Amp: \t\t", $s->encodeAmp()->sanitize( $str ), "\n";
echo "Sanitize String: ... | true |
8edb25f51be83d32b463f90dbb3541600447daad | PHP | hqy543/student | /student/1/login_post.php | UTF-8 | 1,170 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/7/11 0011
* Time: 23:14
*/
header("content-type:text/html;charset=utf-8");
if(isset ($_POST['submit'])){
//防止注入,去掉' " \ # % or
function clearCharacter($value){
$value=str_replace("'", "", $value);
$value=str_replace('"',... | true |
05771f65bd75aad179dfeb0d33bca9be46aef639 | PHP | ahnaf-asif/ahnafasif-api | /database/seeders/PortfolioSeeder.php | UTF-8 | 713 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Faker\Generator as Faker;
use App\Models\Portfolio;
class PortfolioSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run(Faker $faker)
{
for($i = 1; $i <= 150;$i++){
... | true |
c4a2ad4a8598955191a9e34625d669359e8b6722 | PHP | efellemedia/DigitalOceanV2 | /spec/DigitalOceanV2/Adapter/BuzzAdapterSpec.php | UTF-8 | 5,948 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace spec\DigitalOceanV2\Adapter;
use DigitalOceanV2\Exception\HttpException;
class BuzzAdapterSpec extends \PhpSpec\ObjectBehavior
{
/**
* @param \Buzz\Browser $browser
* @param \Buzz\Middleware\MiddlewareInterface $middleware
*/
function let($browser, $middleware)
{
$b... | true |
fbf508ebbee546e9306a6c34eb1d015cb62d9626 | PHP | yuya-takeyama/functional_programming_in_php | /iterator/FunctionalTest.php | UTF-8 | 2,443 | 2.734375 | 3 | [] | no_license | <?php
require_once __DIR__ . '/Functional.php';
use Yuyat\Functional\WithIterator as F;
class TestCase extends \PHPUnit_Framework_TestCase
{
public function test_range()
{
$this->assertIterator([1, 2, 3, 4, 5], F\range(1, 5));
$this->assertIterator([1, 3, 5, 7, 9], F\range(1, 10, 2));
}
... | true |
f0ef32916fb29063baf5713fbdea17fe10275e65 | PHP | gpedic/ulogger | /src/uLogger/Logger.php | UTF-8 | 6,696 | 3.25 | 3 | [] | no_license | <?php
namespace uLogger;
use uLogger\Writer\uLoggerWriter as Writer;
class Logger {
private $writers = array();
private $logLevel;
private $timeFormat;
/**
* Severity levels defined in RFC 5424
*/
const EMERGENCY = 0;
const ALERT = 1;
const CRITICAL = 2;
const ERROR = 3;
... | true |
4b03f7e95b1fd775d1d3c9e5e52ebd3215613eab | PHP | FastFoodd/FastFoodd | /controlador/validardatoslogin/validar.php | UTF-8 | 1,499 | 2.5625 | 3 | [] | no_license | <?php
include '../../controlador/conexion.php';
class validar{
public static function validaruser($username,$pass){
$conection= new conection;
$conection=$conection->get_conection();
$sql=("SELECT *FROM usuarios where usuario= :adminname AND
contra= :adminpass AND tipo= :admintipo")... | true |
3a100922794b08a66ef16272092f7ab890daf0f4 | PHP | ch1986/techpump | /src/Entity/Partner.php | UTF-8 | 2,128 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\PartnerRepository")
*/
class Partner
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=2... | true |
94e676741c9972263fcd39a229c1621323517868 | PHP | vadim-ivlev/pravo | /www/src/JuristBundle/Services/Pagination.php | UTF-8 | 13,752 | 2.71875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace JuristBundle\Services;
use Symfony\Component\DependencyInjection\ContainerInterface;
use JuristBundle\Controller\ApiController;
/**
* Pagination
*/
class Pagination
{
/**
* @var ContainerInterface
*/
protected $container;
/**
* @param ContainerInterface $serviceContainer
... | true |
7a368a8123ae6064112ac0b31589f74808c20eed | PHP | sicet7/rpi-school-project | /src/app/Interfaces/FinderFactoryInterface.php | UTF-8 | 282 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Interfaces;
use Symfony\Component\Finder\Finder;
/**
* Interface FinderFactoryInterface
* @package App\Interfaces
*/
interface FinderFactoryInterface
{
/**
* @return Finder
*/
public function create(): Finder;
}
| true |
25f0d4f0cb2bd83ea3d64594dc213e3f0426753f | PHP | initiativesolutions/secrets-manager | /src/Command/Rotation.php | UTF-8 | 590 | 2.96875 | 3 | [] | no_license | <?php
namespace SecretsManager\Command;
use SecretsManager\SecretsEngine\Rotate;
class Rotation implements CommandInterface
{
private CommandLine $cli;
public function __construct(CommandLine $cli)
{
$this->cli = $cli;
}
public function run(): void
{
$files = (new Rotate())... | true |
e19c53ad248883087a63a6e545a0a708dc25cb24 | PHP | BABUIN200/framework | /controllers/HelloWorldController.php | UTF-8 | 1,031 | 3.015625 | 3 | [] | no_license | <?php
class HelloWorldController
{
/**
* Action name
* @var string
*/
public $name = 'helloworld';
/**
* Hello Action
* @return Response
*/
public function helloAction() {
return new Response($this->render('template', [
'title' => 'Hello page',
... | true |
e6af71b6a5804cfedfb438cd17b139d3c555403e | PHP | lic121436/test2 | /PDO/pdo_test.php | UTF-8 | 779 | 3.09375 | 3 | [] | no_license | <?php
header("content-type:text/html;charset=utf-8");
// 通过PDO连接数据库
$pdoStartTime = microtime(true);
for($i = 1; $i < 100; $i++){
$pdo = new PDO('mysql:host=localhost;dbname=imooc', 'root', 'root');
}
$pdoETime = microtime(true);
$res = $pdoETime - $pdoStartTime;
// 通过mysqli连接数据库
$mysqliStartTime = microtime(true)... | true |
f1931a4ae1de7f5b664e990cad5300ddc1b4bac1 | PHP | anvius/goop | /src/Config/Config.php | UTF-8 | 679 | 3.109375 | 3 | [] | no_license | <?php
namespace Config;
class Config
{
protected $config_file = '';
protected $values = array();
public function __construct($config_file='')
{
if($config_file != '') {
$this->loadFile($config_file);
}
... | true |
9a947954faa399ec89d48f522c1779074dfe10bc | PHP | OVyazovoy/news | /modules/admin/topics.php | UTF-8 | 2,460 | 2.625 | 3 | [] | no_license | <?php
if(isset($_SESSION['user']) && $_SESSION['user']['admin_status'] == true ){
class Topics{
static function includedb(){
$mysqli = new mysqli(Core::$db_local,Core::$db_login,Core::$db_pass,Core::$db_name);
$mysqli->set_charset('utf8');
/* проверка подключения */
... | true |
64684f1831c9d27c0c6b15e2a5790b9a4cd12170 | PHP | hartomic/multilanguage-buddyPress-with-polylang | /class-manager.php | UTF-8 | 2,171 | 2.859375 | 3 | [] | no_license | <?php
/**
* Class BPPL_Manager
*
* @since 1.0.0
*
* This class manages the objects which have to be started for plugin functionality
*/
if( ! defined( 'ABSPATH' ) ) {
exit;
}
class BPPL_Manager{
/**
* Plugin object holder
*
* @since 1.0.0
*
* @var BPPL_Loader
*/
private $plugin = null;
/**
*... | true |
ac64405316b6538ddc312a010e31fc9e1071f1de | PHP | SolBegAgent/SolbegLaravelVueValidation | /src/Converter/BetweenRule.php | UTF-8 | 1,196 | 2.6875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
namespace Solbeg\VueValidation\Converter;
/**
* Class BetweenRule
*
* @author Alexey Sejnov <alexey.sejnov@solbeg.com>
*/
class BetweenRule extends AbstractSizeRule
{
/**
* @inheritdoc
*/
protected function generateFileVueRules()
{
$params = $this->requireLaravelParams(2);
... | true |
a517f4c0bd354c453ea27c4dd27a6e2ce99b0dd2 | PHP | denisfelic/php-pdo | /tests/testInsertMySQL.php | UTF-8 | 979 | 2.90625 | 3 | [] | no_license | <?php
use Alura\Pdo\Domain\Model\Student;
use Alura\Pdo\Domain\Repository\StudentRepository;
use Alura\Pdo\Infrastructure\Persistence\CreateConnection;
use Alura\Pdo\Infrastructure\Repository\PdoStudentRepository;
require_once __DIR__ . '/../vendor/autoload.php';
$sqliteConnection = CreateConnection::sqlite();
$mysq... | true |
5797e213ba855cc5b53c53b22456a3b8b1b95319 | PHP | vasilyrosa/exemplosOOP | /capitulo2/person_destruct.php | UTF-8 | 627 | 3.703125 | 4 | [] | no_license | <?php
/* o método destruct() é chamado sempre que um objeto Person é removido da memória
isso acontecerá se você chamar a função unset() com com o objeto Person, veremos o método
__destruct() */
class Person
{
private $name;
private $age;
private $id;
function __contruct( $name, $age)
{
$this->name = $name;
... | true |
4ea8469c9e1282ba34e9a0d992f084282a910148 | PHP | rakibhoossain/bangladesh-national-university-cse-syllabus | /admin/ajax.php | UTF-8 | 5,973 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
// Getting Resource , Books and Course list request
if (isset($_POST['select']) || isset($_POST['semester'])) {
$table = $_POST['select'];
$sem = $_POST['semester'];
$names = array();
$selector = array();
if ($sem == 0 || $table == '') exit(0);
include "../init/connection.php";
$sq... | true |
901aae9f98829c922b60a733e5f555454618b044 | PHP | Ranushka/recruiting | /recrutment/application/Assets/Bstrahija/Assets/Group.php | UTF-8 | 4,145 | 2.96875 | 3 | [] | no_license | <?php namespace Bstrahija\Assets;
class Group {
/**
* Illuminate application instance.
*
* @var Illuminate\Foundation\Application $app
*/
protected $app;
/**
* Name of the assets group
*
* @var string
*/
public $name;
/**
* Assets type for this group
*
* @var string
*/
public $type;
... | true |
cbb34459cc742eb1ef2a1f2abc2e57af8a3e25db | PHP | visto9259/SAQService | /src/Types/SyncGetSuccursalesType.php | UTF-8 | 375 | 2.578125 | 3 | [] | no_license | <?php
namespace SAQService\Types;
class SyncGetSuccursalesType
{
/**
* @var SyncGetSuccursalesDataAreaType $DataArea
* @access public
*/
public $DataArea = null;
/**
* @param SyncGetSuccursalesDataAreaType $DataArea
* @access public
*/
public function __construct($DataA... | true |