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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
32f2b9a8763da83027133cc739ca167a6d0b33dd | PHP | SlobodanLazic/Common_project | /dal/dal_classes/db_connection.php | UTF-8 | 1,266 | 2.625 | 3 | [] | no_license | <?php
require_once($_SERVER["DOCUMENT_ROOT"] . "/Common_project/dal/util.php");
class DBConn
{
private static $conn;
private static function setConnection()
{
self::$conn = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
}
private static function closeConnection()
{
self::$conn->close();... | true |
46ff56f3d2bc1cc7e62c0b1c66ff7969d8f54ef6 | PHP | Yoshi-/ScriptDB | /application/models/Versions.php | UTF-8 | 1,303 | 2.515625 | 3 | [] | no_license | <?php
class Application_Model_Versions
{
function versionExists($scriptID, $versionNumber) {
$db = Zend_Registry::get('db');
$query = $db->select()->from('scriptversions', 'count(*)')
->where('scriptID = ?',$scriptID)
->where('ver... | true |
c0de5f4b89f509447e3469a4bd8e6423caf37e29 | PHP | aarongmx/wsl | /app/Http/Controllers/ContainerController.php | UTF-8 | 1,755 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Container;
use Illuminate\Http\Request;
class ContainerController extends ApiController
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return Container::paginate();
... | true |
a522c4f59b19e50f24d71e09d1926e2c91b2430b | PHP | AlejandroCG719/ERP | /classes/Modulo.php | UTF-8 | 2,409 | 2.84375 | 3 | [] | no_license | <?php
class Modulo{
private $id_modulo;
private $id_supermodulo;
private $liga;
private $nombre;
private $prefijo;
private $orden;
private $descripcion;
private $imagen;
private $hits;
//get
public function getId() {
return $this->id_modulo;
}
public function getIdSuperModul... | true |
7b5cfdef3b4dd14e0760a33134f6c91ffae9c734 | PHP | Hiten-chan/print | /src/login.php | UTF-8 | 3,364 | 2.53125 | 3 | [] | no_license | <?php session_start(); ?>
<?php require_once("includes/connection.php"); ?>
<?php
if (isset($_SESSION["session_username"])) {
$username = '';
$username = $_SESSION['session_username'];
$q_base = mysqli_query($link, "SELECT * FROM users WHERE username = '" . $username . "'");
$tag = mysqli_fetch_assoc($... | true |
72ba553eaced2bd9edfb202cf907abd8277515a0 | PHP | NarinderSingh-1/AbroadMentor | /app/Http/Controllers/VisaController.php | UTF-8 | 5,949 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Visa;
use App\Organisation;
use App\Country;
use App\Exam;
use Validator;
class VisaController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
... | true |
5527cea545c92094232b020f62764c7096c24954 | PHP | marcguyer/assembly-callback | /src/Transaction.php | UTF-8 | 610 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Assembly\Callback;
use PromisePay\PromisePay;
/**
* Transaction callback type
*/
class Transaction extends Callback
{
/**
* Get the same object from the API
*
* @throws \RuntimeException if the PromisePay sdk is unavailable
* @return stdClass
*/
protected function ... | true |
0a31fcd258b89811e4614427e5938a1e178160dc | PHP | AlinaSp/artclay | /Clay/php/form_processing.php | UTF-8 | 3,169 | 2.8125 | 3 | [] | no_license | <?php
$name = htmlspecialchars($_POST["name"]);
$email = htmlspecialchars($_POST["email"]);
$tel = htmlspecialchars($_POST["tel"]);
$myemail = "maksym.chvorda@gotoinc.co";
$name = check_input($_POST["name"], "Please enter your name!");
$tel = check_input($_POST["tel"], "Please enter your phone number!");
$email = ch... | true |
b7a8cab7a622d83ae59fce71e049a09ca9f06065 | PHP | FelipeIzquierdo/histoweb | /database/migrations/2015_03_19_163511_create_availabilities_table.php | UTF-8 | 836 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAvailabilitiesTable extends Migration {
public function up()
{
Schema::create('availabilities', function(Blueprint $table)
{
$table->increments('id');
$table->integer('group_id');
... | true |
9ec9b0cda942aa3262223b3de61d745e65b0ab9c | PHP | qwerti91/skeleton | /Libs/Core/Database/Database.php | UTF-8 | 195 | 2.609375 | 3 | [] | no_license | <?php
namespace Core\Database;
class Database extends \MySQLi {
public function __construct() {
parent::__construct(DB_HOST, DB_USER, DB_PASS, DB_NAME);
parent::set_charset('utf8');
}
} | true |
37f688b596d4a41ed030a081740f8acf5cebf71e | PHP | dev-sampsonorson/near-admin-plugin | /Inc/Core/BaseRepository.php | UTF-8 | 1,122 | 2.6875 | 3 | [] | no_license | <?php
/**
* @package Near Foundation Admin Plugin
*/
abstract class BaseRepository {
public const STATES_TABLE_NAME = 'near_states';
public const DONATION_TABLE_NAME = 'near_donation';
public const VOLUNTEER_TABLE_NAME = 'near_volunteer';
public const SCHOLARSHIP_TAB... | true |
8f53bfd8a65e4ed210e30e6745a2f4e5ff90b512 | PHP | aedart/athenaeum | /packages/Contracts/src/Support/Properties/Strings/DirectoryAware.php | UTF-8 | 1,194 | 3.109375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Aedart\Contracts\Support\Properties\Strings;
/**
* Directory Aware
*
* Component is aware of string "directory"
*
* @author Alin Eugen Deac <aedart@gmail.com>
* @package Aedart\Contracts\Support\Properties\Strings
*/
interface DirectoryAware
{
/**
* Set directory
*
* @param s... | true |
c52da056e37eafb011b1426ca9336981a5a5c416 | PHP | omidmm/om-module-admin | /models/Widgets.php | UTF-8 | 1,502 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace omidmm\admin\models;
use Yii;
/**
* This is the model class for table "progsoft_widgets_block".
*
* @property integer $widget_id
* @property string $name
* @property string $class
* @property string $width
* @property string $height
* @property integer $item_id
* @property string $render
*/... | true |
58761591832b78961e4835b13c5f3e34429df56a | PHP | rutkoski/simplify-domain | /lib/Simplify/Domain/AttributeMapper.php | UTF-8 | 3,306 | 2.75 | 3 | [] | no_license | <?php
/**
* SimplifyPHP Framework
*
* This file is part of SimplifyPHP Framework.
*
* SimplifyPHP Framework is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at yo... | true |
90c1865c4777754ccb9123bfb826fc2fbf78ef5d | PHP | Geek2017/3AB-AWS | /public/action.php | UTF-8 | 1,937 | 2.625 | 3 | [] | no_license | <?php
if(isset($_POST["action"])){
// if($_POST["action"] == "fetch"){
// $folder = array_filter(glob('*'), 'is_dir');
// $output = '
// <table class="table table-boarded table-striped">
// <tr>
// <th>Folder Name</th>
// <th>Total File</th>
/... | true |
7fc602082188ed1a06d22a87e9ffb8fa9686081a | PHP | PlanBCode/hypha | /hypha.php | UTF-8 | 23,977 | 2.5625 | 3 | [] | no_license | <?php
// HYPHA
// hypha is a simple and user friendly cms with wiki and mailinglist functionality
// it makes use of php5, javascript and xml and is distributed as a monolithic php script
// the project homepage is www.hypha.net
//
// INSTALL
// 1. add your superuser login name and password here:
$username = ''... | true |
1f9b8a8031b0ea6b3ad5f122541a20ff6a09b113 | PHP | akukoder/mykad | /src/Cleaner.php | UTF-8 | 385 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace AkuKoder\MyKad;
class Cleaner
{
/**
* Clean-up the input and remove unnecessary characters
*
* @param string $input
* @return string
*/
public function clean(string $input): string
{
$input = trim($input);
$input = str_replace('-', '', $input);
... | true |
ad20b15fb79fa4505bfde6877e7083d46167a2d4 | PHP | faithkmog/PHP-with-MVC- | /Models/updateStaffModel.php | UTF-8 | 1,080 | 3 | 3 | [] | no_license | <?php
class UpdateStaff {
public $lName;
public $fName;
public $email;
public $staff_id;
public function __construct($lName, $fName,$email,$staff_id)
{
$this->lName = $lName;
$this->fName = $fName;
$this->email = $email;
$this->staff_id = $staf... | true |
b3027f6f0ca3355d426b3171f552b1e6d471edee | PHP | vidya9028/PHPPrograms | /DataStructurePrograms/Util.php | UTF-8 | 10,063 | 4.03125 | 4 | [] | no_license | <?php
include "Stack.php";
include "Queue.php";
include "StackLinkedList.php";
class Util{
/**
* Taking Integer value as User Input
* Validating Integer value
*/
public static function user_integerInput(){
fscanf(STDIN,"%d\n",$number);
if(filter_var($number,FILTER_VALIDATE_INT)){... | true |
5cc9d580218b7800d66e88e62310e75047912db9 | PHP | phug-php/phug | /src/Phug/Formatter/Formatter/AbstractElement.php | UTF-8 | 1,466 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace Phug\Formatter;
use Phug\Ast\Node;
use Phug\Ast\NodeInterface;
use Phug\Parser\NodeInterface as ParserNode;
abstract class AbstractElement extends Node implements ElementInterface
{
/**
* @var ParserNode
*/
private $originNode;
/**
* AbstractElement constructor.
*
... | true |
ccba83ae3ffe0b360d4ce1193af2d3583110cd95 | PHP | mac2000/checker | /google/grab.php | UTF-8 | 1,520 | 2.65625 | 3 | [] | no_license | <?php
require_once 'inc.php';
$start = microtime(true);
$xpath_query = file_get_contents('xpath.txt');
$ua = get_random_user_agent();
$cookie = get_cookie_file();
$keyword = 'residency personal statement writing services';
$country = 'countryUS';
$language = 'lang_en';
$max_pages = 10;
$minutes_to_sleep_on_captcha ... | true |
4976eb7a40680c3b7e507892121f4b1b497555ba | PHP | DevFactoryCH/macros | /src/macros.php | UTF-8 | 21,338 | 2.5625 | 3 | [] | no_license | <?php
/**
* MACROS
*/
/**
*--------------------------------------------------------------------------
* Handles the input for a single text field
*--------------------------------------------------------------------------
*
*/
Form::macro('itemText', function ($name, $label, $value = null, $errors = null, $ext... | true |
11c2be13c12c84a056c81c737daa1ea6670614b9 | PHP | perrin4869/dotcore | /components/DotCoreAdminMessage/DotCoreAdminMessageRecord.php | UTF-8 | 1,342 | 2.796875 | 3 | [] | no_license | <?php
/**
* DotCoreAdminMessageRecord
*
* @author perrin
*/
class DotCoreAdminMessageRecord extends DotCoreDataRecord {
/**
* Constructor for Admin Message
*
* @param DotCoreDAL $dal
*/
public function __construct(DotCoreDAL $dal) {
parent::__construct($dal);
}
/*
*
* Accessors:
*
*/
/*... | true |
a3cde587654bc05fbbc037d8e333cfb44fa83eb4 | PHP | MichaelMagomedov/structure | /src/Impl/StructureImpl.php | UTF-8 | 2,847 | 2.53125 | 3 | [] | no_license | <?php
namespace Structure\Impl;
use Structure\Impl\Module\Initer\PolicyIniter;
use Structure\Contract\Module\Module;
use \Structure\Contract\Structure;
use Structure\Impl\Module\Defer\DeferObservable;
use Structure\Impl\Module\Initer\ConfigsIniter;
use Structure\Impl\Module\Initer\LanguagesIniter;
use Structure\Impl\... | true |
1e58e3e02a46b4f423040ee38dafc6147ebbb98d | PHP | crazyppl/codility | /MinAvgTwoSlice.php | UTF-8 | 2,106 | 3.078125 | 3 | [] | no_license | /*
A non-empty array A consisting of N integers is given. A pair of integers (P, Q), such that 0 ≤ P < Q < N, is called a slice of array A (notice that the slice contains at least two elements). The average of a slice (P, Q) is the sum of A[P] + A[P + 1] + ... + A[Q] divided by the length of the slice. To be precise, ... | true |
bb3cf86573871e463eeb9244278bb737ed3a96f9 | PHP | me98h/inventaire | /models/Materiel.php | UTF-8 | 1,205 | 3.109375 | 3 | [] | no_license | <?php
class Materiel {
private $no_mat;
private $nom_materiel;
private $image;
private $categorie;
public function __construct($no_mat)
{
$this->no_mat = $no_mat;
}
/**
* @return mixed
*/
public function getNomMateriel()
{
return $this->nom_materiel;
}
/**
... | true |
7d8ee301a4b91797e081621a0b849fa37627e560 | PHP | Isandre47/wildblog | /src/Model/Comment.php | UTF-8 | 1,633 | 2.953125 | 3 | [] | no_license | <?php
namespace Model;
class Comment
{
protected $id;
protected $date;
protected $content;
protected $user_id;
protected $article_id;
protected $signale;
/**
* @return mixed
*/
public function getSignale()
{
return $this->signale;
}
/**
* @param mi... | true |
f5ed28a1edd53e952846a9797cadda7c82cbc360 | PHP | d8paul/yuga-framework | /src/Yuga/Mailables/Native/YugaMailer-old.php | UTF-8 | 3,009 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Mahad Tech Solutions
*/
namespace Yuga\Mailables\Native;
use Yuga\Mailables\Mailable;
class YugaMailerOld extends Mailable
{
private $from;
private $template;
private $subject;
private $recipients = [];
private $recipientsMany = [];
private $cc = [];
pri... | true |
3a667d2c91fa56cbd9eb295ac9ded1f017439d5a | PHP | Tortipouss/2021-MSC-IoT-Alex-Gallucci | /src/api/src/modele.php | UTF-8 | 792 | 3.125 | 3 | [] | no_license | <?php
/*
* Retourn l'id du message dans la BD en
* fournissant le numéro de séquence de celui-ci
*/
function getIdMessBySeqNum($seqMess){
// Requête qui sera executée par la suite
$sql = "SELECT pk_msg FROM tb_message WHERE seqNum_msg = :seqMess";
try {
// Création de l'objet de la BD
... | true |
9574d327dc8ccc8794cecbc7be95ce817c26153d | PHP | centreon/centreon | /centreon/www/class/centreonCommand.class.php | UTF-8 | 18,365 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2005-2015 Centreon
* Centreon is developped by : Julien Mathis and Romain Le Merlus under
* GPL Licence 2.0.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation ; eithe... | true |
b5fdebd55e737e3c88437cb8d74d62150610c412 | PHP | CPNV-PedroPINTO/ProjetWeb_Annonces | /Sotish/model/JSONConnector.php | UTF-8 | 1,042 | 2.890625 | 3 | [] | no_license | <?php
/**
* @file JSONConnector.php
* @brief This controller is designed to manage database accesses and transactions
* @author Created by Pascal.BENZONANA
* @author Updated by Nicolas.GLASSEY 13-APR-2020
* @author Updated by Nicolas.GLASSEY 29-JAN-2021
* @version 29-JAN-21
*/
/**
* @brief... | true |
f59ddbe6796184126a395ecebfbba1bac0b7266e | PHP | mattd548/freehreasy | /benefitsForEmps.php | UTF-8 | 1,283 | 2.53125 | 3 | [] | no_license | <?php
session_start();
include_once "db.php";
if(!$_SESSION['email']) {
header("Location:index.php");
exit();
}
$benefitType = $_POST['benefitType'];
if($benefitType == "Insurance"){
$query = "SELECT * FROM benefits WHERE type = 'Insurance' ORDER BY name ASC";
}
... | true |
beb493103731e43f566c69040ed3f67608c43b28 | PHP | wastrilith2k/crawls | /includes/db.inc.php | UTF-8 | 1,037 | 3.28125 | 3 | [] | no_license | <?php
// Create connection
$con=mysqli_connect("localhost","***","***","crawls");
// Set encoding
mysqli_set_charset($con,'utf8');
// Check connection
if (mysqli_connect_errno($con)){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
exit();
}
/*
* Just run a query. Return the result
*
*/
function... | true |
8a98c616fe6854f572fc4671631f6ed796a6d1c2 | PHP | hcparkdist/hcparkdist.github.io | /contact_form/book_process.php | UTF-8 | 1,449 | 2.78125 | 3 | [] | no_license | <?php
include dirname(dirname(__FILE__)).'/mail.php';
error_reporting (E_ALL ^ E_NOTICE);
$post = (!empty($_POST)) ? true : false;
if($post) {
//Mail Validate
function ValidateEmail($value) {
$regex = '/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i'... | true |
c5980e638ac58eafdc62a04849a7a0a0264e2034 | PHP | referid/HackMIT-php | /index.php | UTF-8 | 4,995 | 2.5625 | 3 | [] | no_license | <?php
echo <<<_END
<html>
<head>
<link href="layout/css/core.css" rel="stylesheet" type="text/css" />
<link href="layout/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="layout/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link rel="shortcut ico... | true |
0954d11349953476f620a3a7d353a2c2614cb6e2 | PHP | tayduivn/massapokupok | /app/Entity/BaseEntity.php | UTF-8 | 896 | 2.984375 | 3 | [] | no_license | <?php
/**
* Базовый контрол сущностей
*
*/
abstract class BaseEntity extends Entity
{
public $primaryKey = "id";
public function __construct()
{
if(!$this->entityTable)
$this->entityTable = strtolower(get_class($this));
}
const ENTITY_STATUS_NOTACTIVE = 0;
const ENTITY_STATUS_ACTIVE = 1;
const ENTIT... | true |
8f7832462039004a901b809b84e058726885dea7 | PHP | MarcosACLima/projetoTimes | /model/pessoa.php | UTF-8 | 139 | 2.640625 | 3 | [] | no_license | <?php
abstract class Pessoa {
protected $id;
protected $nome;
protected $salario;
}
?> | true |
0e184cbc4caceb0a65d38dfc90dc9a888a2196c3 | PHP | angyvolin/phpinspectionsea | /php/control-flow/unused-constructor-dependencies.php | UTF-8 | 537 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
class classUpd
{
private $p1;
private $p2;
private $p3;
protected $p4;
public $p5;
public function __construct($p1, $p2, $p3)
{
$this->p1 = $p1;
$this->p2 = $p2;
$this->p3 = ++$this->p3 + $p3; //<- reported twice
$this->p4 = 1;
$this->p5 = 1;... | true |
c9016ec035e26ad792534381c32a9f2f224f1748 | PHP | Nogrod/ebay-sdk-php | /src/Trading/RemoveFromWatchListRequestType.php | UTF-8 | 9,968 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Nogrod\eBaySDK\Trading;
use Nogrod\XMLClientRuntime\Func;
/**
* Class representing RemoveFromWatchListRequestType
*
* The call enables a user to remove one or more items from their Watch List. A user can view the items that they are currently watching by calling <b>GetMyeBayBuying</b>.
* <br/><b... | true |
19b8d1eb9fb76a1cae819cb55c8e8c83140e8061 | PHP | Benedicte-B/PHP | /Partie1/Exercice1/index.php | UTF-8 | 1,556 | 3.328125 | 3 | [] | no_license | <?php
$object = 'Ceci est un objet';
$message = 'Ceci est un message';
$fontColor = 'toto';
$nameCompetence = 'HTML';
$valueCompetence = 70;
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" cont... | true |
e699db1baf49e8a1593c3441c6bcabf6d5f85fb1 | PHP | nicolagaldiolo/PhpMaster | /24/serialization.php | UTF-8 | 1,619 | 3.140625 | 3 | [] | no_license | <?php
// La serializzazione è il processo di trasformare tutto ciò che è possibile memorizzare in una variabile o un oggetto PHP
// in un bytestream che può essere memorizzato in un database o trasferito tramite un URL da una pagina all'altra.
// Senza questo processo, è difficile memorizzare o passare l'intero cont... | true |
1a181a9b4f17e304cd424216a1691ea4a9dbdd90 | PHP | Fengly/PHP-Learning | /PHP/Learning--学习ppt以及源码/源代码/MR/源码/05/5-22/index.php | GB18030 | 216 | 3.015625 | 3 | [] | no_license | <?php
$array = array ("asp", "php", "javascript", "html");
end($array); //ָָĩβ
$result1 = prev($array);
echo $result1;
echo "<br />";
$result2 = prev($array);
echo $result2;
?>
| true |
6014f4a936d74e5c98eef427f7b66c212f242d49 | PHP | yuncopy/students | /app/Console/Bin/ProcessDemo.php | UTF-8 | 5,403 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace App\Console;
/**
* Description of Process
*
* @author Administrator
*/
class Process {
public $mpid = 0;
pub... | true |
a39fd07997748f02dc420f19d4f459e6ead05e78 | PHP | allen0817/basic | /component/Compute.php | UTF-8 | 766 | 2.984375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Allen
* Date: 2017/11/22
* Time: 23:10
*/
namespace app\component;
class Compute
{
//二分法查找数组中的某个元素(升序数组)
function branchSearch($array,$k,$low = 0, $high = 0){
if(count($array) != 0 && $high == 0){
$high = count($array);
}
if(... | true |
b59274164ee1bd68cb03c66ea60ec43f00046538 | PHP | Tapklik/tapklik-api | /app/Transformers/GeographyTransformer.php | UTF-8 | 862 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Transformers;
use App\Geography;
use League\Fractal\TransformerAbstract;
/**
* Class CampaignTransformer
*
* @package \app\Transformers
*/
class GeographyTransformer extends TransformerAbstract
{
/**
* @param \App\Geography $geography
*
* @return array
*/
public fu... | true |
07cb1193153e240d9b174d7762108c363b10f3ed | PHP | ibnuhalimm/laravel-tripay | /src/Exceptions/CallbackException.php | UTF-8 | 368 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Ibnuhalimm\LaravelTripay\Exceptions;
use Exception;
class CallbackException extends Exception
{
public static function invalidSignature()
{
return new static('Invalid callback signature');
}
public static function invalidCallbackEvent()
{
return new static('Invali... | true |
739dbf24783b3b4c51cba5f1d47565378ed37341 | PHP | denichodev/siapaka-api | /database/seeds/SupplierTableSeeder.php | UTF-8 | 954 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Supplier;
class SupplierTableSeeder extends Seeder
{
private $data = [
[
'id' => 1,
'name' => 'Kimia Farma',
'address' => 'Jl. Sehat Selalu',
'phone_no' => '0274-487272'
],
[
'id' => 2... | true |
7aa4f34e24531d9f290e3c44313410dcfb794075 | PHP | vantu1997/quan-li-sinhvien | /web_qlsv-master/timlop.php | UTF-8 | 1,739 | 2.53125 | 3 | [] | no_license | <html>
<head>
<title>Tìm kiếm danh sách lớp </title>
</head>
<body>
<br/>
<form action="user.php?url=timlop.php" method="post">
<br/>
Nhập mã lớp hoặc tên lớp : <input type="text" name="timkiem" />
<input type="submit" name="ok" value="search" />
</fo... | true |
88858094b5f204494810608accbb183125e9089e | PHP | bixev/light-orm | /src/Bixev/ORM/API.php | UTF-8 | 10,136 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Bixev\ORM;
class API
{
use \Bixev\LightLogger\LoggerTrait;
/**
* local cache
*
* @var array
*/
static protected $_repositories = [];
/**
* pseudo-singleton factory
*
* @param string $className
* @param \Bixev\LightLogger\LoggerInterface $logger... | true |
4d3ccda89295a1fbbd4df4e344097832dde55979 | PHP | yatashiva/onedigs | /application/Room.php | UTF-8 | 2,866 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* Generated by CRUDigniter v3.2
* www.crudigniter.com
*/
class Room extends CI_Controller{
function __construct()
{
parent::__construct();
$this->load->model('Room_model');
}
/*
* Listing of rooms
*/
function index()
{
$data['rooms'] = $this->R... | true |
4839bcf8344179bb127348922ab7c3651a13b856 | PHP | TanTran999/GIS | /buildjson.php | UTF-8 | 4,544 | 2.953125 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "gis";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$list_toanha = array();
//------------------------------------------------------... | true |
476e9414d832aac1797c5062b4e720eb2f7cc53d | PHP | javareact/jiaofei100 | /src/Tools/AES.php | UTF-8 | 1,094 | 3.25 | 3 | [
"MIT"
] | permissive | <?php
namespace JavaReact\LFApi\Tools;
/**
* Class AES
* @package JavaReact\LFApi\Tools
*/
class AES
{
/**
* 加密
* @param string $string 要加密的字符
* @param string $key key16位
* @param string $iv iv16位
* @param string $method 加密算法
* @return string
*/
public static function enc... | true |
1d07afa9fced389ebf31737500fa86305e8cc52c | PHP | mahmoud-hassan-abdelhamid/crawler | /index.php | UTF-8 | 4,117 | 2.625 | 3 | [] | no_license | <?php
require("simple_html_dom.php");
ini_set('max_execution_time', 300);
$init_page = 1;
$init_url = 'http://www.homegate.ch/mieten/immobilien/kanton-zuerich/trefferliste?ep=';
$url = $init_url . $init_page;
$html = file_get_html($url);
/*
I have sliced the task to parts 1.a , 1.b , 1.c , 2.a , 2.b
just uncomment ... | true |
ffe88e8d78eb8f6ffd7759d6bff24241baf69ac5 | PHP | hsemix/yuga-framework | /src/Yuga/Database/Console/MakeMigrationDownCommand.php | UTF-8 | 1,148 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Yuga\Database\Console;
use Yuga\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Yuga\Database\Migration\MigrationServiceProvider;
class MakeMigrationDownCommand extends Command
{
protected $name = 'migration:down';
/**
* The console command descripti... | true |
e9166ba4c12b20133b90730f78a9f020b6585244 | PHP | sortex/ansilog | /src/Kohana/classes/HTML.php | UTF-8 | 856 | 2.890625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Overriding Kohana's HTML for media uri
*/
class HTML extends Kohana_HTML {
/**
* Creates a script link.
*
* @see Kohana_HTML::script
*/
public static function script($file, array $attributes = NULL, $protocol = NULL, $index = FALSE)
{
// Adding the cache buster prefix. See kohana-media modu... | true |
13caa5f18b54dffcdda9eedfdb4f6db2721b53e4 | PHP | fabiogelbcke/piscinePHPd06 | /ex00/Color.class.php | UTF-8 | 2,269 | 3.640625 | 4 | [] | no_license | <?php
class Color {
public $red;
public $green;
public $blue;
public static $verbose = False;
function __construct(array $kwargs){
if (isset($kwargs['rgb']))
{
$rgb = intval($kwargs['rgb']);
$this->red = $rgb>>16;
$this->... | true |
90fa0f601823e72a7bd495e08e6a1e287e79737f | PHP | m-nel/peach | /src/Query/Request/Criteria/QueryType.php | UTF-8 | 2,396 | 2.703125 | 3 | [] | no_license | <?php namespace Mnel\Peach\Query\Request\Criteria;
class QueryType
{
/**
* No special behavior activated.
* This is the default type.
*/
const STANDARD = 'STANDARD';
/**
* Queries all transactions which match the given
* query parameters and which are active
* transactions of... | true |
ad11739187e5fe9c396703c4f9100336f004b748 | PHP | venkatrajendran/modern-times | /app/libraries/class.pdf.builder.php | UTF-8 | 2,317 | 2.859375 | 3 | [] | no_license | <?php
class PdfBuilder {
public $tcpdf = array();
public $doc_details = array();
public function __construct($doc_details = array()){
//require_once('app/libraries/TCPDF/tcpdf.php');
$this->doc_details = $doc_details;
// create new PDF document
$this->tcpdf = new \TCPDF('P', 'mm', 'A4',... | true |
b930b24f2caf8173bc8af5eeef202f4cf7dd4007 | PHP | hehe24h/php | /3.php | UTF-8 | 1,928 | 2.765625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Toán tử và biểu </title>
<!-- Bootstrap CSS -->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap... | true |
5efb7c7ac07e4ed3b975357db07a1d5822a4dd8c | PHP | college-portal/college-portal | /app/Http/Controllers/Api/IntentTypeController.php | UTF-8 | 2,374 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Services\IntentTypeService;
use App\Filters\IntentTypeFilters;
use App\Http\Requests\IntentTypeRequest;
/**
* @resource Intent Types
*
* For Endpoints handling Intent Types, which represent a group of intents
*/
class IntentTypeContro... | true |
fc7e1b5c15a53bb20b08c01b8ea8e3b26a7c38f7 | PHP | chipslays/telegram-bot-api | /src/Modules/Localization.php | UTF-8 | 2,401 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Telegram\Modules;
use Telegram\Bot;
class Localization
{
private static $data = [];
private static $language;
private static $default;
/**
* @param string $language
* @param string $default
* @return void
*/
public static function load(string $language, strin... | true |
f942990fd07fde4511df3f3e34864bcc394e08b5 | PHP | vthuruthimattathil/Giros | /compositions/deleteGet.php | UTF-8 | 1,523 | 2.5625 | 3 | [] | no_license | <?php
include_once("../session.php");
$giros=$_SESSION['GIROS'];
$untis=$_POST['untis'];
$giros->sqlConnect();
$query="SELECT NODEVOIR,DATE_FORMAT(DATED,'%e/%c/%Y') AS DATEDF,SALLE,BRANCHE,DATE_FORMAT(DATEC,'%e/%c/%Y') AS DATECF,DATE_FORMAT(DATEI,'%e/%c/%Y') AS DATEIF,NOME,PRENOME,CODE FROM DEVOIR LEFT JOIN D... | true |
27d416ca1f08af8728dbee8a69404d37e66e87a2 | PHP | sksusha8853/cs257_Project | /Hospital-Management-Project-main/HMS/adminlogin.php | UTF-8 | 2,329 | 2.65625 | 3 | [] | no_license | <?php
session_start();
include("include/connection.php");
if (isset($_POST['login'])){
$username= $_POST['username'];
$password=$_POST['password'];
$error =array();
if(empty($username)){
$error['admin']="Enter Username";
}
else if(empty($password)){
$error['admin']... | true |
f7d7a2eafe7ead5a5a3d05149d49d260c6732ed5 | PHP | TomMcFarlane97/php-generics | /src/Collections/ProductList.php | UTF-8 | 726 | 3.0625 | 3 | [] | no_license | <?php
namespace App\Collections;
use App\Interfaces\Collection;
/**
* Class ProductList
* @package App\Entity\AbstractEntity
* @implements Collection<\App\Entity\Product>
* @template T of \App\Entity\Product
*/
class ProductList implements Collection
{
/** @var array<int, T> */
private array $list;
... | true |
06892a964548ced9678959b2433fe67f04e96349 | PHP | khena/mplr-bot | /run.php | UTF-8 | 1,543 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
$aConfig = parse_ini_file("/run/secrets/config.ini", true);
require "vendor/autoload.php";
use Abraham\TwitterOAuth\TwitterOAuth;
$sQuery = "SELECT fm.fm_id, fm.fm_text FROM f_full_messages fm WHERE fm.fm_valid = 1 AND fm.fm_delivred IS NULL ORDER BY rand() LIMIT 1";
$sUpdate = "UPDATE f_full_messages fm SET ... | true |
7d81f6bc397145ae78c0d885277ad254f04db4d3 | PHP | karlosmc/phpLogin | /index_2.php | UTF-8 | 1,190 | 2.515625 | 3 | [] | no_license | <?php
include_once("modulos/sessions.php");
$sess=new Sessions();
$sess->init();
$user1= isset($_SESSION['alias']) ? $_SESSION['alias']:null;
if ($user1 ==''){
header('Location: index.php');
}
else {
include_once("modulos/Enrutador.php");
include_once("modulos/Con... | true |
7c2d200f1a075804d260219bfdebf08407cea546 | PHP | LukaszPodlipski/internships | /backend/Models/Company.php | UTF-8 | 1,847 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Internships\Models;
use JsonSerializable;
class Company implements JsonSerializable
{
protected int $id;
protected string $name;
protected Address $address;
protected FilterData $filterData;
protected string $website;
protected string $email;
prot... | true |
28db4f9c99adbc7e36816f6b6a14df4cf09d2dac | PHP | scottpreston/archive | /phpframework-book/ch12/try-catch.php | UTF-8 | 124 | 2.84375 | 3 | [] | no_license | <?
$test = array();
try {
if ($test[2]=="foo") {
echo 'test';
}
} catch (Exception $e) {
die($e->getMessage());
}
| true |
27ff55a0ab4328adb61c8eb295a1335900bf9bbc | PHP | xp-forge/wrappers | /src/main/php/lang/types/Double.class.php | UTF-8 | 480 | 3.625 | 4 | [
"BSD-3-Clause"
] | permissive | <?php namespace lang\types;
final class Double extends Num {
/**
* Creates a new double (±5.0 x 10^324 to ±1.7 x 10^308)
*
* @param string|double|int $initial
*/
public function __construct($initial) {
$this->wrapped= (double)$initial;
}
/**
* Rounds the number with the given precision
... | true |
dd107c6ff1a49335c351729e04d9a3bf02051975 | PHP | hashstudio/Mindy_Orm | /Tests/Cases/Orm/Basic/DataIteratorTest.php | UTF-8 | 4,978 | 2.859375 | 3 | [
"BSD-2-Clause-Views"
] | permissive | <?php
/**
*
*
* All rights reserved.
*
* @author Falaleev Maxim
* @email max@studio107.ru
* @version 1.0
* @company Studio107
* @site http://studio107.ru
* @date 18/07/14.07.2014 17:10
*/
namespace Tests\Orm;
use ArrayAccess;
use ArrayIterator;
use IteratorAggregate;
use Mindy\Tests\DatabaseTestCase;
use M... | true |
22e64820069f78b8ef525171505c9053edf22541 | PHP | bakasajoshua/Blowplast-Migration | /app/Imports/ChartOfAccountsSheetImport.php | UTF-8 | 633 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Imports;
use App\ChartOfAccounts;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class ChartOfAccountsSheetImport implements ToModel, WithHeadingRow
{
/**
* @param Collection $collection
*/
public function model(array $row)
{
// dd(... | true |
bd860a85a9810fa1fd5ee206c78cd9a98429ff7e | PHP | alexiraptor/adopteunprof | /back-adopteunprof/app/Http/Controllers/AnnoncesController.php | UTF-8 | 2,651 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use App\Http\Resources\AnnoncesResource;
use App\Models\Annonces;
/**
* @group Annonce management
* @authenticated
* APIs for managing Annonces
*/
class AnnoncesController extends Controller
{
/**
... | true |
6ed498a2052d19be2301a0ee601f8b2b9d1e6e47 | PHP | varloc2000/rats-records | /vendor_rats/varloc/framework/Varloc/Framework/Database/Connector.php | UTF-8 | 1,484 | 3.03125 | 3 | [] | no_license | <?php
namespace Varloc\Framework\Database;
class Connector
{
static private $PDODsn = 'mysql:host=%s;dbname=%s;charset=utf8';
static private $DBName = 'database_name';
static private $DBUsername = 'root';
static private $DBPassword = 'password';
static private $DBHostName = 'localhost... | true |
7d6b530f86861795bbfeec1389fd780eb66f2f54 | PHP | beiyuiu/resource | /SERVER/SERVER_day06_ALL/SERVER_day06/8_logic_shortcut.php | UTF-8 | 341 | 3.515625 | 4 | [] | no_license | <?php
/*
价格打折:创建变量保存商品总价格:如果总金额>=100元,则享受八折。输出实际应收金额
*/
$price = 100;
//$price<100 || $price=$price*0.8;
//true || 不会执行 =>true
//false || 必须执行
$price>=100 && $price=$price*0.8;
//true && 必须执行
//false && 不会执行 => false
echo $price; | true |
a57d5d287659d07cfac42ea093834b5f861344d5 | PHP | Juli3p/PHP-PT7 | /Exo7/index.php | UTF-8 | 2,868 | 2.796875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<titl... | true |
0131e2f1f9152ce44c6f05d9d98e80d250bdcbf6 | PHP | UMaine-ASAP/secchi-disk | /take_test.php | UTF-8 | 17,230 | 2.71875 | 3 | [] | no_license | <?php
include_once("libraries.php");
/*
Creator: Jacob Landry
Date(last updated): 7/11/07
Description: take_test page for secchi site
Documentation:
-- Process Login
-recieves TestID($CurrentTestID) and TestTID($TestTID) from login page
-- Current Test?
-returns to login page if no test($CurrentTestID) pr... | true |
1274d300f3574de731d75fb0f1c722469c37801a | PHP | ivanhoe011/srp | /lib/managers/CalendarDayManager.php | UTF-8 | 12,580 | 2.8125 | 3 | [] | no_license | <?php
/**
* ##$BRAND_NAME$##
*
* ##$DESCRIPTION$##
*
* @category Project
* @package Project_Controllers
* @copyright ##$COPYRIGHT$##
* @author ##$AUTHOR$##, $LastChangedBy$
* @version ##$VERSION$##, SVN: $Id$
*/
require_once "Zend/Json/Decoder.php";
require_once "application/models/catalogs/Dep... | true |
2cda9244f80024bcda562735dbe5dc71b5ff015e | PHP | rialtotenders/saas | /plugins/perevorot/blog/updates/builder_table_create_perevorot_blog_posts.php | UTF-8 | 689 | 2.578125 | 3 | [] | no_license | <?php namespace Perevorot\Blog\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableCreatePerevorotBlogPosts extends Migration
{
public function up()
{
Schema::create('perevorot_blog_posts', function($table)
{
$table->engine = 'InnoDB';
$t... | true |
6526dc4dfd0ad7b222b8979da632808da41094aa | PHP | skeggib/cdi13 | /src/CDI13/DatabaseBundle/Controller/Database.php | UTF-8 | 6,061 | 3 | 3 | [] | no_license | <?php
namespace CDI13\DatabaseBundle\Controller;
/**
*
*/
class Database
{
/* --- ATTRIBUTS --- */
private $db;
/* --- CONSTRUCTOR / DESCTRUCTOR --- */
public function __construct() {
$this->db = pg_connect("host=localhost dbname='cdi13' user='cdi13' password='cdi13database'");
}
public function __de... | true |
50e824c06dbe722e140ff5925a042fffd4f5a1fe | PHP | ProklUng/twig.extensions.bundle | /Services/Assets.php | UTF-8 | 5,453 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Prokl\TwigExtensionsPackBundle\Services;
use Exception;
use InvalidArgumentException;
use RuntimeException;
/**
* Class Assets
* @package Prokl\TwigExtensionsPackBundle\Services
*
* Хелпер для работы с манифест-файлом Вебпака.
*
* @since 08.11.2020 Получение entrypoints.
*/
class Assets
{
... | true |
d6f915e84b4cc667accd6a4f18cb39c1cf40eeaa | PHP | JackNoire/QnA_Web_Application | /add_question.php | UTF-8 | 809 | 2.546875 | 3 | [] | no_license | <?php
session_start();
if(empty($_POST["question"])) {
echo "问题不能为空!";
die;
}
$conn = new mysqli("localhost", "user", "VEk8qg", "QnADB");
if($conn->connect_error) {
die("连接失败:" . mysqli_connect_error());
}
$conn->set_charset("utf8");
$sql = "SELECT max(qid)+1 FROM question";
$stmt = $conn->prepare($sql);
$stmt->exec... | true |
19efa83b9daf65e6aca06e54eb7f27646acfda8d | PHP | EnriqueSaavedra/sistemaClientesMIP | /clases/utilidad/PHPLogger.php | UTF-8 | 5,969 | 2.578125 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of PHPLogger
*
* @author enriq
*/
class PHPLogger {
//put your code here
const RUTA_ERROR_LO... | true |
dd42c2964c59916a2debb44003d617ff023890e4 | PHP | benoitdavidfr/gexplor | /servreg/wmslayer.inc.php | UTF-8 | 12,637 | 2.546875 | 3 | [] | no_license | <?php
/*PhpDoc:
name: wmslayer.inc.php
title: wmslayer.inc.php - définition de la classe pour exploiter les capacités d'une couche WMS
classes:
doc: |
journal: |
28/3/2017 :
gestion d'un paramètre éventuel de la requête dans WmsLayer::showWmsLayers()
18-19/3/2017 :
Remplacement de WmsLayer::avail... | true |
513335d9d7ab2cb473442b4d24150499f1bbc891 | PHP | Carlson-Jonathan/RocketCityRebels | /scripts/admin/addSponsor.php | UTF-8 | 1,378 | 2.671875 | 3 | [] | no_license | <?php
/*****************************************************************************
* addSponsors
* Author:
* Jonathan Carlson
* Decription:
* This script adds a sponsor to the 'sponsors' tables in the database.
* Used in A-more (administrative 'more' page).
*****************************************************... | true |
e524a546b3b2e265126c2aa039a746bd0a6561fe | PHP | hjinjsj/leetcode-php | /10.php | UTF-8 | 4,005 | 3.359375 | 3 | [] | no_license | <?php
//给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。
//
//'.' 匹配任意单个字符
//'*' 匹配零个或多个前面的那一个元素
//所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。
//
//说明:
//
//s 可能为空,且只包含从 a-z 的小写字母。
//p 可能为空,且只包含从 a-z 的小写字母,以及字符 . 和 *。
//示例 1:
//
//输入:
//s = "aa"
//p = "a"
//输出: false
//解释: "a" 无法匹配 "aa" 整个字符串。
//示例 2:
//
//输入:
//s = "aa"
//p = "a*... | true |
277bc66a30d2a8bc9850ad66ba15a7d7e0fb5148 | PHP | tauanmarcel/PHP-SistemaDeSenhas | /painel.php | UTF-8 | 1,188 | 2.625 | 3 | [] | no_license | <?php
require_once "config/app.php";
require_once "includes/functions.php";
require_once "controllers/PainelController.php";
$painel = new PainelController(_HOST_, _PORT_);
if(isset($_REQUEST['start'])){
$response = $painel->get();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Painel de Chamad... | true |
08a545d741a62799a7cc20d5f21322cc9eec437b | PHP | selecton/framesel | /Sel/View/Helper/ShortenText.php | UTF-8 | 493 | 2.859375 | 3 | [] | no_license | <?php
namespace Sel\View\Helper;
use Sel\View\HelperAbstract;
/**
* ShortenTekst
*
* @author Szymon Wygnański
* @license http://creativecommons.org/licenses/by/3.0/pl/
*/
class ShortenText extends HelperAbstract
{
public function direct($text, $length)
{
if( $length >= \strlen($text) )
... | true |
45393f8c7651ee2fd6114438cc50011c616c52b9 | PHP | pranshi112/Goods-Locator | /forgot_password.php | UTF-8 | 692 | 2.546875 | 3 | [] | no_license | <?php
session_start();
$db = mysqli_connect("localhost", "root", "", "first_db");
//$_SESSION['id'] = 1;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<?php
echo "Enter your Email Address";
?>
<... | true |
7863cb4024465b0892dd2b704c69eb67c95de857 | PHP | RokZabukovec/studentManagement | /core/init.php | UTF-8 | 1,992 | 2.625 | 3 | [] | no_license | <?php
ini_set('display_errors', 'on');
error_reporting(E_ALL);
/*
* This file is required on every page and it
* containes all of the classes, functions and
* configuration information needed.
*/
session_start();
date_default_timezone_set( 'Europe/Ljubljana');
/*
* Global configuration array with the set... | true |
e5629b8c0091cb88eefaeee238365413c437d6d6 | PHP | TokyStam/auximad2 | /application/models/Classe/langue.php | UTF-8 | 490 | 3.421875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class langue{
private $idLangue;
private $langue;
/*Constructor*/
public function __construct($idLangue,$langue){
$this->setIdLangue($idLangue);
$this->setLangue($langue);
}
/*Getters*/
public function getIdLangue(){
return $this->idLangue;
}
public function getLangue(){
return $this->lan... | true |
fcc82f761ddcbcc24e197216f3684329c5398c15 | PHP | glena/PHP-JS | /src/Transpilers/PostIncExpressionTranspiler.php | UTF-8 | 580 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Glena\PhpJs\Transpilers;
use PhpParser\Node\Expr\PostInc;
use Glena\PhpJs\Buffer;
use Glena\PhpJs\Scope;
class PostIncExpressionTranspiler {
public function process(PostInc $statement, Buffer $buffer, Scope $scope) {
$transpiler = TranspilerFactory::build(get_class($statement->var));
$tr... | true |
67359d8a40c4456d70abd378c923dbeb0906ecf4 | PHP | zhandos38/portal | /app/Models/Group.php | UTF-8 | 2,022 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Group
* @package App\Models
* @version February 27, 2020, 9:35 am UTC
*
* @property string department_id
* @property string title
* @property string language_id
* @property string education_id
* @pro... | true |
10a0337a80b06e9e2101a34e0b61515d190475d1 | PHP | richb999git/takeaway | /app/Services/OpeningTimes.php | UTF-8 | 996 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Services;
class OpeningTimes
{
public static function OpeningTimes() {
date_default_timezone_set("Europe/London");
$current_time = date("h:i a");
$opening = "05:00 pm";
$closing = "11:30 pm";
$last_delivery = "10:30 pm";
$last_collection = "11:... | true |
33f199e288222194af68b9300385462f7df9abd9 | PHP | kryptamine/searcher | /app/Controller/BaseController.php | UTF-8 | 820 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Requests\BaseRequest;
use Valitron\Validator;
/**
* Class BaseController
* @package App\Controller
*/
class BaseController
{
/**
* @var Validator
*/
protected $validator;
public function __construct()
{
$this->validator = new Validator();
... | true |
279ab839d89e466dd056fec6038b23428a80c3cc | PHP | taherm/nashkw | /app/Http/Middleware/ApiLocalization.php | UTF-8 | 748 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Foundation\Application;
class ApiLocalization
{
public $app;
/**
* Localization constructor.
*
* @param \Illuminate\Foundation\Application $app
*/
public function __construct(Application $app)
{
$this->app =... | true |
a989365e5f50c489adb1154265b56db32394d418 | PHP | Laralum/Settings | /src/Settings.php | UTF-8 | 1,223 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Laralum.
*
* (c) Erik Campobadal <soc@erik.cat>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Laralum\Settings;
use Illuminate\Support\Facades\Facade;
/**
* This is the settings faca... | true |
ecca88287d876d12b31d088ed4fc65fcba7b8740 | PHP | fanshan/validation | /src/Rule/AbstractValidationRule.php | UTF-8 | 832 | 2.890625 | 3 | [] | no_license | <?php
namespace ObjectivePHP\Validation\Rule;
use ObjectivePHP\Notification\Stack;
/**
* Class AbstractValidationRule
*
* @package ObjectivePHP\Validation\Rule
*/
abstract class AbstractValidationRule implements ValidationRuleInterface
{
/**
* @var Stack
*/
protected $notifications;
/**
... | true |
c4c7585b094024204c61c854e2b79f35a10690b3 | PHP | Teo27/Interflow | /Backend/getResults.php | UTF-8 | 650 | 2.6875 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = null;
$db = "internship";
$conn = mysqli_connect($servername, $username, $password, $db);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$return_array = array();
$query = "SELECT *
FROM internship.marke... | true |
10fcbf0ab9a2c2e3cf450828dc2f2f3d23601a3c | PHP | TBG-FR/IUT_PHP_PicturesProject | /project_site/classes/Picture.php | UTF-8 | 5,937 | 2.859375 | 3 | [] | no_license | <?php
//require_once('conf.bdd.php');
/**
* Class Picture
* {DESCRIPTION}
*/
class Picture
{
/* ----- ----- ----- Attributes ----- ----- ----- */
/**
* @var int store the id
*/
private $id;
/**
* @var string the picture file name
*/
private $name... | true |
4aca744b0a419cd8c020530d857ea87307a4296d | PHP | wangtun/chandao | /module/story/ext/model/batchupdate.php | UTF-8 | 6,838 | 2.671875 | 3 | [] | no_license | <?php
/**
* Batch update stories.
*
* @access public
* @return array.
*/
public function batchUpdate()
{
/* Init vars. */
$stories = array();
$allChanges = array();
$now = helper::now();
$data = fixer::input('post')->get();
$storyIDList = $this->post->storyIDList ? $this... | true |