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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
cab4ec2fcb10793a140f6a7ca718c6c8e764be45 | PHP | Marcelo1975/simple-webservice | /models/tarefas.php | UTF-8 | 840 | 2.921875 | 3 | [] | no_license | <?php
class Tarefas extends model {
public function listar() {
$array = array();
$sql = "SELECT * FROM tarefas";
$sql = $this->db->query($sql);
if($sql->rowCount() > 0) {
$array = $sql->fetchAll();
}
return $array;
}
public function addTarefa($titulo) {
$sql = "INSERT INTO tarefas (titulo) VALUE... | true |
8e2fa8c04a25bcf9978d3747c8ca616f706af4ec | PHP | quiquemon/InflaRun | /module/Application/src/Application/Model/Controller/Cuenta/Pagos/PagoPayPal.php | UTF-8 | 3,958 | 2.75 | 3 | [] | no_license | <?php
namespace Application\Model\Controller\Cuenta\Pagos;
/**
* Esta clase permite realizar los pagos de tarjeta con
* el proveedor PayPal por medio de su servicio Web REST.
* La versión de su API utilizada en esta clase es
* <br>
* La documentación de la API se encuentra en esta página:
* http://payp... | true |
249e5cdfee2382e4bee62c8e51530dc4a3768a6d | PHP | VincentDercourt/ma-petite-entreprise | /app/model/Roles.php | UTF-8 | 1,447 | 3 | 3 | [] | no_license | <?php
require_once ROOT . '/src/Model.php';
class Roles extends Model
{
/**
* @param string $nameEn
* @param string $nameFr
* @return PDOStatement|false
*/
public function addRole(string $nameEn, string $nameFr)
{
return $this->executeRequest(
"INSERT INTO role SET ... | true |
d759293ecccd1338549135d98ab0a6980ab112f3 | PHP | grafiaware/testervscviceni | /Tester/0/__Factory/__TabbedFactory.php | UTF-8 | 4,677 | 2.65625 | 3 | [] | no_license | <?php
namespace Tester\Tabbed\Factory;
use Tester_Tabbed_Controller_Page_Parameters_PageParameters;
use \Tester_Tabbed_TesterovyController;
/**
* Obsahuje metodu create, kde je provedeno vytvoření
* a nastavení Controleru vicestrankoveho formulare (pojmenovali jsme ho tabbed).
* Presunuto do ContainerConfigurat... | true |
d2136b4742011aa7289ddd4616bc39d6c4d1dfc3 | PHP | mavzii/iwrecaptchaservice | /src/Http/Middleware/InvisibleRecaptcha.php | UTF-8 | 1,491 | 2.703125 | 3 | [] | no_license | <?php
namespace IwPackages\RecaptchaService\Http\Middleware;
use Closure;
use IwPackages\RecaptchaService\InvisibleRecaptcha as InvisibleCaptcha;
class InvisibleRecaptcha
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @retur... | true |
19db09824bb9b1ef08eaca162a8e95ada1d65378 | PHP | svycka/sv-images | /src/Router/ImageRoute.php | UTF-8 | 3,563 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace SvImages\Router;
use SvImages\Exception\RuntimeException;
use SvImages\Exception\TransformerNotFoundException;
use SvImages\Exception\UnexpectedValueException;
use SvImages\Parser\Result;
use SvImages\Parser\UriParser;
use Zend\Mvc\Router\Http\RouteInterface;
use Zend\Stdlib\RequestInterface as Reques... | true |
3a2dd5b9f8ed2fae537e46e2763c4af287be0651 | PHP | agbeterseer/mactching-app | /app/StaffList.php | UTF-8 | 1,021 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use DB;
class StaffList extends Model
{
protected $table = 'staff_lists';
protected $fillable = [
'pfn',
'staff_id',
'staff_name',
'date_of_birth',
'date_of_first_appt',
'rank_sgl',
'gross',
... | true |
a3ae715ab0710237cc4dfb4977d7852457728d74 | PHP | 5-js/hackathon | /web/database/seeds/TasksTableSeeder.php | UTF-8 | 643 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
use App\Task;
class TasksTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
foreach(range(1,50) as $index)
{
Task::create($this->data($index... | true |
ce0c9f50ac3649639c3247e6dd1b27e1a642811e | PHP | Payum/Payum | /src/Payum/Core/Request/GetCurrency.php | UTF-8 | 521 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Payum\Core\Request;
class GetCurrency
{
/**
* @var string
*/
public $code;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $alpha3;
/**
* @var int
*/
public $numeric;
/**
* @var int
*/
public $... | true |
6810a40753c9de63399040d04b95c3e458bf7264 | PHP | silentiumtempus/REST-example | /src/Repository/TeamRepository.php | UTF-8 | 859 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Repository;
use App\Entity\LeagueEntity;
use Doctrine\ORM\EntityRepository;
/**
* Class TeamRepository
* @package App\Repository
*/
class TeamRepository extends EntityRepository
{
/**
* @param LeagueEntity $league
* @param int $page
* @param int $tea... | true |
fe2f62177d13fd8dbd3924fad08a49c7848d5190 | PHP | hytcdinghaoyu/blast_swoft | /vendor/limingxinleo/swoft-aop-cacheable/src/Collector/ListenerCollector.php | UTF-8 | 1,242 | 2.703125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Swoft Entity Cache
*
* @author limx <limingxin@swoft.org>
* @link https://github.com/limingxinleo/swoft-aop-cacheable
*/
namespace Swoftx\Aop\Cacheable\Collector;
use Swoft\Bean\CollectorInterface;
use Swoftx\Aop\Cacheable\Annotation\Listener;
class ListenerCollector implements CollectorInterfa... | true |
54e898cedc9a91447d28aa5f2a71c64724982a80 | PHP | King-Success/hrMicroservice | /app/Repositories/PaycheckSummary/PaycheckSummaryContract.php | UTF-8 | 294 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Repositories\PaycheckSummary;
interface PaycheckSummaryContract
{
public function getInstance();
public function findById($paycheckSummaryId);
public function findByPayrollId($payrollId);
public function findByPayrollEmployeeId($payrollId, $employeeId);
}
| true |
a6018f736841f87f9de6a3b9dbc2eeded91adc9a | PHP | Mateus2106/Exercicios-PHP | /Tarefa2/Endereco.php | UTF-8 | 906 | 3.1875 | 3 | [] | no_license | <?php
class Endereco {
private $rua;
private $bairro;
private $cidade;
private $estado;
private $cep;
private $complemento;
public function setRua($rua){
$this->rua=$rua;
}
public function setBairro($bairro){
$this->bairro=$bairro;
}
public function setCidade($cidade){
$this->cidade=$ci... | true |
1feb302b052ba0a409e964661b971ad724beb0ef | PHP | Web2Net/kyivpass | /kernel/template.class.php | UTF-8 | 1,086 | 2.671875 | 3 | [] | no_license | <?php
class Tpl
{
var $template_dir = 'tpl';
var $ct_data = array();
function assign($d_name,$data)
{
$this->ct_data[$d_name]=$data;
}
function display($tpl){
if($_REQUEST!=NULL){
foreach ($_REQUEST as $key=>$val){
$str="$".$key."=\"".$val."\";";
eval($str);}}
if($_SESSION... | true |
ff01c0f870415fb9ca0ec890c3f20b1853abf4ab | PHP | mohan0482/phpbyedwin | /demo/form_validate.php | UTF-8 | 787 | 2.734375 | 3 | [] | no_license | <?php
// user super global for importing
if(isset($_POST['submit'])) {
$nameList = ['mohan','dp','channa','ashok','sharath','gani','manja','gudu','godse','mallya','kaddi','kulla','santa'];
$min = 5;
$max = 10;
$userName = $_POST['un'];
$password = $_POST['pass'];
if(strlen($userName) < $min) ... | true |
4f7cd166e99b2f95634436c60c3107cdf278a5e5 | PHP | orrstam/Twittersch | /functions/login.php | UTF-8 | 3,411 | 2.765625 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
require 'db_connection.php';
//Här börjar inloggningsdelen
function doesUserExist($user) {
$link = connection();
$query = "SELECT * FROM users WHERE mail='$user'";
$result = mysqli_query($link, $query);
$numRows = mysqli_num_rows($result);
$curre... | true |
61a73ed390bba8c9a409b8ae287272ac213e539d | PHP | yangzhuosg/home | /protected/migrations/archive/m130417_031212_translate_countries.php | UTF-8 | 805 | 2.59375 | 3 | [] | no_license | <?php
class m130417_031212_translate_countries extends CDbMigration
{
public function up()
{
// Создаем поле для английского названия стран
$this->addColumn('country', 'eng_name', 'VARCHAR(128) NOT NULL DEFAULT "" after name');
$countries = Country::model()->findAll();
foreach ($countries as $c) {
$tra... | true |
fba1588637ae9d3f95406a04902d7b68c31fd705 | PHP | YusufAchmadZ/Pemrograman-Web-2 | /UTS.php | UTF-8 | 2,487 | 2.59375 | 3 | [] | no_license | <html>
<head>
</head>
<body>
<h2>Data Pemantauan Covid-19</h2>
<form action="" method="post">
<table>
<tr>
<td><label>Nama Operator</label></td>
<td><input type="text" name="nama" value="<?=isset($_POST['nama']) ? $_POST['nama']: ''?>"/></td>
</tr>
<tr>
<td><label>NIM</label></td>
<td><inpu... | true |
c429388889f58afb3d181297da0e4af798793b5a | PHP | ep85/SimpleJavascriptMessenger | /code/getUser.php | UTF-8 | 700 | 2.6875 | 3 | [] | no_license | <?php
$username="ep85";
$password="p4Ywq0KjV";
$dbname="ep85";
$servername="sql.njit.edu";
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$user= $_POST['ID'];
$classes=[];
$sql = "SELECT * FROM... | true |
bd18395261a74b7fec6671515e3892a06b13ec98 | PHP | FSU-BR-ISYS489-201501/BR-Team1 | /JCI/includes/RandString.php | UTF-8 | 916 | 2.921875 | 3 | [] | no_license | <?php
/*********************************************************************************************
* Original Author: Shane Workman
* Date of origination: 04/12/2016
*
* Page created for use in the JCI Project.
* Project work is done as part of a Capstone class ISYS489: Ferris State University.
* Purpose... | true |
ae93eda99215ddb1600046ee9d07a553da168ea0 | PHP | he426100/solana-php-hyperf | /src/Program.php | UTF-8 | 365 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace He426100\SolanaPhpSdk;
class Program
{
/**
* @var SolanaRpcClient
*/
protected SolanaRpcClient $client;
public function __construct(SolanaRpcClient $client)
{
$this->client = $client;
}
public function __call($method, $params = [])
{
return $this... | true |
8c6ed2a0b8e862c78fc9d74951983e5a0d52a894 | PHP | kumc-bmi/redcap-hook-registry | /hooks.php | UTF-8 | 6,910 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
// The absolute path to the root directory of the REDCap installation.
define('REDCAP_ROOT', realpath(dirname(__FILE__).'/../').'/');
// The absolute path to the hook registry configuration file.
define('HOOKS_CONFIG', REDCAP_ROOT.'hooks/hooks.ini');
/**
* An object for storing REDCapHookRegistry configuration... | true |
e26d2aced73adcdb033e7fc5abd2877ba95cca26 | PHP | cjspiece/ambergroup | /public_html/attempts/index.php | UTF-8 | 903 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: brad
* Date: 2/8/15
* Time: 3:41 PM
*/
include_once("attempt.php");
include_once("attemptcontroller.php");
include_once("../../templates/tabletemplate.php");
session_start();
//The id of the review to update
$id = null;
if ( !empty($_GET['quiz_id'])) {
$id = $_RE... | true |
08bc3a268a52d3afd62e1a76df68be62d524b0b1 | PHP | Vivius/MyPhpFramework | /App/Core/App.php | UTF-8 | 633 | 3.203125 | 3 | [] | no_license | <?php
/**
* Classe façade de l'application.
*/
namespace App\Core;
class App
{
/**
* Permet de créer un objet avec l'IOC Container.
* @param $dataType
* @return null|object
*/
public static function make($dataType) {
return Container::getInstance()->make($dataType);
}
/... | true |
66f5de5a698681b6dcfa84860f49638a9ec33bad | PHP | MaddocksL/REST-Test | /read.php | UTF-8 | 788 | 2.921875 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json");
// includes for database and objects
include_once 'config/dbh.php';
include_once 'objects/user.php';
//create Database and User object
$dbh = new DBH();
$db = $dbh->connect();
//init new object
$user = new User($db);
//query d... | true |
d193654a72a945f92f2ad1acc96b2944494cb503 | PHP | feliperosareis/locadora_veiculos | /application/libraries/mem.php | UTF-8 | 2,157 | 3.25 | 3 | [] | no_license | <?php
/**
* Classe para abstração de Memcache e Memcached. Interface simples para trabalhar com
* ambas.
*
* @author Felipe Rosa
*/
class mem {
private $memcache = null;
public function __construct() {
if ($this->isEnabled()) {
if ($this->eOrEd() == 'memcache')
$thi... | true |
768eeeb717c7f5f1e9333d4e7efba1fcf4975789 | PHP | rimelek/ybb | /functions.php | UTF-8 | 3,152 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Rimelek\YBB;
/**
* BB Code interpreter for youtube videos
*
* @param string $text Text that contains bb codes
* @param array $defaultOptions Array of options to override the defaults.
* If you leave it empty the defaults are:
* <ul>
* <li><strong>nocookie</stro... | true |
84d3b6ead1982d78fe0d3691e088782d70d39896 | PHP | Psaproxy/demo | /core/BooksCatalog/Author/Actions/ListAllNames.php | UTF-8 | 487 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Core\BooksCatalog\Author\Actions;
use Core\BooksCatalog\Author\IDataProvider;
use Core\BooksCatalog\Author\DTO\NameDTO;
class ListAllNames
{
private IDataProvider $dataProvider;
public function __construct(IDataProvider $dataProvider)
{
$this->dataProvid... | true |
6f0c5af758e09700b5c7e6a42683c75a22cb7b69 | PHP | Tuhki/TP_webApp_bdd | /webApp_gestion_visualisation_commandes.php | UTF-8 | 4,111 | 2.828125 | 3 | [] | no_license | <?php
//On inclut la page avec le menu, pour qu'elle ne disparaisse pas à l'affichage des données
include 'webApp_page_utilisateur.html';
/* RECUEIL DU FORMULAIRE DE RECHERCHES ET AFFICHAGE DES RESULTATS*/
//Connexion à la base de donnée
Try
{
$bdd = new PDO('mysql:host=localhost;dbname=facture_prof',... | true |
f336e18d5080e3e97679edb4f7a1641fde8b3bdc | PHP | JoaopedroSassi/PHP_Zero_Maestria-HC | /14-PHP_WEB/258. input_varios/index.php | UTF-8 | 1,032 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
if (isset($_POST['ingredientes'])) {
$ingredientes = $_POST['ingredientes'];
print_r($ingredientes);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-sca... | true |
5407f6e79164ae3f677cfa0e0ea53777ee2a8202 | PHP | as-segaf/predis-demo | /hash.php | UTF-8 | 805 | 2.984375 | 3 | [] | no_license | <?php
require_once('../../vendor/autoload.php');
use Predis\Client;
$redis = new Client();
$redis->hset('user:100', 'name', 'bambang');
$redis->hset('user:100', 'age', 14);
$redis->hset('user:100', 'email' , 'bambang@gmail.com');
print_r($redis->hgetall('user:100'));
echo $redis->hget('user:100', 'name') . "\n";
ec... | true |
9a2990d7733f18831f9db8265acc45ed28e22919 | PHP | Ehsan-1711/mot | /moti.php | UTF-8 | 834 | 2.59375 | 3 | [] | no_license | <?php
require_once 'config.php';
// connect to database
$con = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if(mysqli_connect_errno()){
echo "Couldn't connecto to DATABASE : " . mysqli_connect_error() . "<br>";
return;
}
$Food =$_GET['food'];
echo $Food;
if(!isset($_GET['food'])){
$content = mys... | true |
c1e30a740a5f8bb4518115573a6b488b8757ae38 | PHP | MiragePresent/location-bot | /app/Models/Region.php | UTF-8 | 1,107 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Model Region
*
* @author Davyd Holovii <mirage.present@gmail.com>
* @since 12.06.2019
*
* @property int $id
* @property string $name
*
* @property-read City[] $cities
* @property-read Church[] $churches
*/
class ... | true |
fd3122081851321df091491348e7a57085de72a5 | PHP | jgwill/lampyno | /www/wp-content/themes/materialis/customizer/kirki/includes/field/class-kirki-field-editor.php | UTF-8 | 2,353 | 2.78125 | 3 | [
"MIT",
"GPL-2.0-or-later",
"GPL-2.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-other-copyleft",
"GPL-1.0-or-later",
"LGPL-2.0-or-later",
"GPL-3.0-or-later",
"GPL-3.0-only",
"LGPL-2.1-or-later",
"OFL-1.1",
"Apache-2.0",
"CC0-1.0"
] | permissive | <?php
/**
* Override field methods
*
* @package Kirki
* @subpackage Controls
* @copyright Copyright (c) 2016, Aristeides Stathopoulos
* @license http://opensource.org/licenses/https://opensource.org/licenses/MIT
* @since 2.2.7
*/
if ( ! class_exists( 'Kirki_Field_Editor' ) ) {
/**
* Field ... | true |
013b3aab61c2297760c18d8a5f92294749e96bb6 | PHP | goldstar0415/Staging | /backend/app/Listeners/AddReview.php | UTF-8 | 990 | 2.625 | 3 | [] | no_license | <?php
namespace App\Listeners;
use App\AlbumPhoto;
use App\Events\OnComment;
use App\SpotPhoto;
use App\User;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
/**
* Class AddReview
* Listener create review from comment
* @package App\Listeners
*/
class AddReview implements Sho... | true |
e35a881e4f55452728b331fa8b23e2047a8b5d43 | PHP | thestump5/TaskManager | /Model/Database/PDO.class.php | UTF-8 | 1,942 | 2.9375 | 3 | [] | no_license | <?php
namespace Database;
/**
* Description of PDO
* @author stump
*/
//TODO: Exception to check error;
trait PDO
{
protected $pdo;
protected $statement;
public function connect()
{
$this -> pdo = new \PDO(
"mysql:host=127.0.0.1 ;dbname=mydb;",
... | true |
bc193d219abf8ace1b6ec7a54b2375b1b4a2e110 | PHP | maciulex/Ulanopoli | /scripts/register.php | UTF-8 | 2,177 | 2.625 | 3 | [] | no_license | <?php
session_start();
if (isset($_SESSION['logged'])) {
header("Location: ../gamesList.php");
exit();
}
$nick = trim($_POST['nick']);
$passcode = trim($_POST['passcode']);
$passcode2 = trim($_POST['passcode2']);
$mail = trim($_POST['email']);
unset($_POST['nick'],$_POST['passcode'],$_POST['passco... | true |
83aeaf2c7da795ac16cc46bb495a705bd0125d0d | PHP | tesis/instagramFetcher | /tests/LibraryTest.php | UTF-8 | 1,690 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Tesis\Socials\Instagram\Library;
class LibraryTest extends PHPUnit_Framework_TestCase {
public $library;
public $searchParams;
public $lat;
public $lng;
public $tag;
public function setUp()
{
parent::setUp();
$this->lat = '51.507350';
$this->lng = '-0.127... | true |
d573ec4d6e4a30131d424963a8ad81e6c1457164 | PHP | ddt-nishiwaki/ddtflowers | /php/flower_flamework/ddtflower/session/SessinHandlerFactory.php | UTF-8 | 227 | 2.546875 | 3 | [] | no_license | <?php
namespace session;
class SessinHandlerFactory {
static public function createUserHandler() {
return new UserSessionHandler();
}
static public function createAdminHandler() {
return new AdminSessionHandler();
}
} | true |
cbd46acbd327208efc786d90897df659345dfd36 | PHP | tom3197111/localhost_MALL_BACKEND | /app/Http/Controllers/Admin/IndexController.php | UTF-8 | 3,595 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Service\IndexService;
use Illuminate\Support\Facades\Crypt;
use Illuminate\Support\Facades\Validator;
class IndexController extends CommonController
{
protected $IndexService;
public function __construct()
{
$th... | true |
0ad09485169e26b38863b39ad39c52390069bda6 | PHP | freedom5566/codewars | /8kyu/puzzles/games智力遊戲/AreaofSquare/php/test/aosTest.php | UTF-8 | 1,309 | 3.25 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
require "./a.php";
class AreaOfASquareTest extends TestCase {
protected function randomize($array) {
// Array Shuffling
// Code Snippet reproduced and edited from PHPTester (https://github.com/DonaldKellett/PHPTester) with permission
if (!is_array($array)) throw new ... | true |
ca8d7e40e17f89216a1a1fc654fc8a4f5378a13e | PHP | trixtur/PhpUnitTesting | /container.class.php | UTF-8 | 1,608 | 3.796875 | 4 | [
"MIT"
] | permissive | <?php
/*
* Author: Benjamin Payne (trixtur@gmail.com)
* Date Modified: 6/14/2017
*
* Class: Container
* Purpose: Represent a simple container-style class with the ability to
* accept a value as well as store the result of a computation.
*/
class container {
private $_value, $_result;
/*
* Cons... | true |
3e30f03b027afbd6cf29442e2509e03be06a6d6c | PHP | CloudCityNG/food | /app/Lunch/Timekeeper.php | UTF-8 | 1,987 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php namespace HNG\Lunch;
use Carbon\Carbon;
class Timekeeper {
/**
* @var Carbon
*/
protected $carbon;
/**
* Timekeeper constructor.
*
* @param Carbon|null $carbon
*/
public function __construct(Carbon $carbon = null)
{
$this->carbon = $carbon ? $carbon : ... | true |
e3c409dc3dc4243863a86b9ff0ceacf951f71b77 | PHP | kdgyimah/alpha | /app/lib/Base.php | UTF-8 | 2,896 | 2.671875 | 3 | [] | no_license | <?php
/*
* this is the base controller
* this loads the model and views
*/
namespace App\Lib;
use App\Models as Model;
class Base
{
public $twig;
public function __construct()
{
$loader = new \Twig\Loader\FilesystemLoader(__ROOT__ . '/app/views');
$this->twig = new \Twig\En... | true |
5767f370e1e2ea08cf7a7f7e2a8b59383141a273 | PHP | AkashAryal/learningLar | /app/MessageCF.php | UTF-8 | 559 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
//if you create this file with artisan: php artisan make:model MessageCF -m
//then you dont need to do anything as eveything will be properly linked
class MessageCF extends Model
{
//To set table associated with this model:
//protected $table = 'mys... | true |
a665c0300265322f05c92f2369b5cd226ab56359 | PHP | Stopka/Header | /src/Stopka/Assetor/Collector/AssetCollectionFactory.php | UTF-8 | 509 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Stopka\Assetor\Collector;
use Nette\SmartObject;
/**
* Creates asset collection from config array
*
* @author Štěpán Škorpil
* @license MIT
*/
class AssetCollectionFactory {
use SmartObject;
/**
* @param array $config
* @return AssetCollection
*/
public function creat... | true |
26a7f23f597da070edeb72e5de331c72c00ccbff | PHP | raefYoussef/Proj2 | /Proj1/Code/PHP/RmIndividualApptForms.php | UTF-8 | 3,162 | 2.671875 | 3 | [] | no_license | <html>
<head>
<link type="text/css" rel="stylesheet" href="CSS/RmIndividualApptForms.css" />
<title>Remove Appointments Input</title>
</head>
<body>
<div id="wrapper">
<div id="body">
<div id="center">
<form action="RemoveIndvAppts.php" method="post" name="form" >
<?php
$isAdvisor = $_POST... | true |
ce226bd63a696259837915beb7c869ac410dca19 | PHP | Dje6/as-co-ma | /app/Controller/racine/NewsletterController.php | UTF-8 | 1,659 | 2.640625 | 3 | [] | no_license | <?php
namespace Controller\racine;
use \Controller\CustomController;
use \model\AssocModel;
use \model\MairieModel;
use \model\AbonnesModel;
class NewsletterController extends CustomController
{
//affiche au public les information de l'association , uniquement si elle est actif
public function home($orga,$slug)
... | true |
f73150f9fb203199da749e506236374843b7abb6 | PHP | alxgeoaln/phpTutorial | /functions.php | UTF-8 | 437 | 3.453125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Georgian Alin
* Date: 19.05.2017
* Time: 16:21
*/
function simpleFunction(){
echo 'Hello!';
}
//simpleFunction();
function sayHello($name){
echo "Hello $name<br>";
}
//sayHello('Joe');
function addNumbers ($num1, $num2) {
return $num1 + $num2;
}
echo addNu... | true |
863bbc9fb8a41a5a888503c0b2f1da7cd08a76db | PHP | gabrielfileo/thesis | /database/migrations/2016_12_28_092548_create_trainee_history_table.php | UTF-8 | 1,175 | 2.59375 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTraineeHistoryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('trainee_exam_history', function (Blueprint $table... | true |
0da83f5734116fb0f0093f23ce19b86ebd711570 | PHP | hason/puli | /src/Repository/ResourceRepositoryInterface.php | UTF-8 | 3,181 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Puli package.
*
* (c) Bernhard Schussek <bschussek@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Puli\Repository;
use Puli\Resource\Collection\ResourceCollectionInterfac... | true |
755edc80fb37f7e2d2b9a422c5ae9370db390e98 | PHP | viniciusthiengo/push-message-serie-web | /package/apl/AplUser.php | UTF-8 | 24,551 | 2.546875 | 3 | [] | no_license | <?php
/*@include_once('conf/conf.php');
@include_once('../../conf/conf.php');
require_once(__PATH__.'/autoload.php');*/
use Endroid\Gcm\Client;
//use Gcm\Xmpp\Daemon;
//use Gcm\Message;
class AplUser {
public function __construct(){}
public function __destruct(){}
static public function sav... | true |
f6f20739319eed4aac6050f2f3e503c103c09428 | PHP | banksbestrates/BankFx | /news/wp-content/plugins/wp-all-import-pro/libraries/XmlImportTemplateScanner.php | UTF-8 | 11,969 | 2.96875 | 3 | [
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* @author Olexandr Zanichkovsky <olexandr.zanichkovsky@zophiatech.com>
* @package General
*/
require_once dirname(__FILE__) . '/XmlImportToken.php';
require_once dirname(__FILE__) . '/XmlImportException.php';
/**
* Used to scan string into a list of tokens
*/
final class XmlImportTemplateScanner
{
/*... | true |
d7bf5c7105c441b283743b43f60d41fa11424632 | PHP | SilentLittleCat/OFS | /database/migrations/2017_08_14_151820_create_coupons_table.php | UTF-8 | 1,438 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCouponsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('coupons', funct... | true |
b6e33f2216ab366f71b1e8b9edc2875bc140d4a3 | PHP | fidding/xunyixia | /database/migrations/2014_12_14_024533_create_users_table.php | UTF-8 | 1,213 | 2.59375 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->bigincrements('id');
$table->... | true |
15034d91355da555d873b40e083245512b67bd6a | PHP | Sergey96/LightFramework | /engine/core/user/User.php | UTF-8 | 4,048 | 2.625 | 3 | [] | no_license | <?php
namespace engine\core\user;
use engine\base\models\ActiveRecord;
use engine\WebApp;
use engine\core\exceptions as Exceptions;
use engine\components\AccessManager;
use common\User\SearchModels\UsersSearchModel;
class User extends ActiveRecord
{
public $id;
public $name;
public $role;
public $cre... | true |
d101760dd48430eb71331802815cccdcd27966ec | PHP | videosambo/SankoForum | /forum/connect.php | UTF-8 | 3,909 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
//Asetukset
include "config.php";
$server = getValue("sqlServer");
$username = getValue("sqlUsername");
$password = getValue("sqlPassword");
$database = "USE ".getValue("sqlDatabase");
//Yhdistetään databaseen
$conn = new mysqli($server, $username, $password);
if ($conn->connect_error) {
//Epäonnistui
echo '<... | true |
e20d31923d3cec495d3d4701fd43e8eead69f3a6 | PHP | vinjaiindia/ACQINv4.2 | /app/Model/Road.php | UTF-8 | 247 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Model;
use App\Model\Vehicle;
abstract class Road
{
abstract public function get_range($range);
abstract public function get_garage_distance();
abstract public function get_speed_limit(Vehicle $vehicle);
} | true |
5299481a5eb5ab856589af3bb1ea9a5bb0bcdc10 | PHP | PaymentSuite/paymentsuite | /src/PaymentSuite/RedsysBundle/Services/RedsysManager.php | UTF-8 | 6,004 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the PaymentSuite package.
*
* Copyright (c) 2013-2016 Marc Morera
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Feel free to edit as you please, and have fun.
*
* @author Marc Morera <yuhu@mmo... | true |
99788c5c389de9afefe44429634e0d7e1e7938fe | PHP | remotelyliving/php-test-http-server | /src/ResponseWrapper.php | UTF-8 | 2,517 | 2.8125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace RemotelyLiving\PHPTestHttpServer;
use Psr\Http\Message\ResponseInterface;
class ResponseWrapper implements \Serializable
{
private int $statusCode = 200;
private $reasonPhrase = 'OK';
private array $headers = [];
private string $body = '';
p... | true |
4f28f0cf9a44b09c61368e2e15a64c336f3f91a1 | PHP | embashgit/Enhanced-airline-system | /zip.php | UTF-8 | 960 | 2.515625 | 3 | [] | no_license | if(empty($_POST) === false) {
$required_fields = array('flight_name', 'leaving_from', 'going_to', 'depart_date', 'depart_time', 'arrival_time','fare');
foreach($_POST as $key=>$value) {
if (empty($value) && in_array($key, $required_fields) === true) {
$errors[] = 'Fields marked with an asterisk are required'... | true |
8791bcdd81593ff6a145eee0d5bf6b1b8f9fb217 | PHP | slymnkbdyi/Php | /function2.php | UTF-8 | 236 | 3.125 | 3 | [] | no_license | <html>
<head>
<title>ilk </title>
</head>
<body>
<?php
function birlestir($a,$b,$c)
{
echo $a."<br>",$b."<br>",$c."<br>";
}
$x="ahmet";
$y="ali";
$z="kabadayi";
birlestir($x,$y,$z);
?>
</body>
</html> | true |
5e1f8fdf218efa3695fbd4191ca4199d2dd0ea22 | PHP | php-casbin/php-casbin | /src/Log/Logger/DefaultLogger.php | UTF-8 | 1,994 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Casbin\Log\Logger;
use Casbin\Log\Logger;
/**
* Class DefaultLogger.
*
* @author techlee@qq.com
*/
class DefaultLogger implements Logger
{
/**
* DefaultLogger is the implementation for a Logger using golang log.
*
* @var bool
*/
public $enable... | true |
3eacefef8b10a351de41997e78815b05e4a643a5 | PHP | bzick/fenom-extra | /tests/Fenom/Assets/PackerTest.php | UTF-8 | 698 | 2.53125 | 3 | [] | no_license | <?php
namespace Fenom\Assets;
use Fenom\Assets\Packer;
class PackerTest extends \PHPUnit_Framework_TestCase {
public function testMinify() {
$t = microtime(1);
// $packed = Packer::minify(file_get_contents($file = FENOM_RES_DIR.'/jquery.js'), true);
$packed = Packer::minify(file_get_con... | true |
3d0167ed896c9175dacf5c7383007cd767d3ab07 | PHP | irtyamine/terminal | /src/Capability/Screen.php | UTF-8 | 2,908 | 2.921875 | 3 | [] | no_license | <?php
namespace Terminal\Capability;
/**
* Screen features
*/
trait Screen
{
public function canClearScreen(): bool
{
return $this->configuration->has('clear_screen');
}
public function clearScreen(): void
{
if (!$this->canClearScreen()) {
throw new \RuntimeException... | true |
8f0524a1de3d5b70cef30f344b9a0e7e4e57e121 | PHP | Crashingberries/laminas-diactoros | /test/RelativeStreamTest.php | UTF-8 | 7,102 | 2.546875 | 3 | [] | permissive | <?php
declare(strict_types=1);
namespace LaminasTest\Diactoros;
use Laminas\Diactoros\RelativeStream;
use Laminas\Diactoros\Stream;
use PHPUnit\Framework\TestCase;
use RuntimeException;
use const SEEK_SET;
/**
* @covers \Laminas\Diactoros\RelativeStream
*/
class RelativeStreamTest extends TestCase
{
public f... | true |
4fef3092687c3f5924b86785df9d602937898046 | PHP | remi-san/twitter | /src/Object/TwitterPlace.php | UTF-8 | 358 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Twitter\Object;
use Twitter\TwitterSerializable;
class TwitterPlace implements TwitterSerializable
{
/**
* Constructor.
*/
public function __construct()
{
}
/**
* Static constructor.
*
* @return TwitterPlace
*/
public static function create()
... | true |
61bf9706240a29367bf3b432e60cd98723089abd | PHP | webextra-solutions/outdoor07 | /app/Controller/Component/FonctionsComponent.php | UTF-8 | 1,182 | 3 | 3 | [] | no_license | <?php
class FonctionsComponent extends Component {
function copierDossier ($dir2copy,$dir_paste,$chmod) {
// On vérifie si $dir2copy est un dossier
if (is_dir($dir2copy)) {
// Si oui, on l'ouvre
if ($dh = opendir($dir2copy)) {
// On liste les dos... | true |
5522071cda127d317347b73916383bd26221de4f | PHP | ahmedashrafdev/rc_server | /app/Http/Controllers/admin/BranchController.php | UTF-8 | 1,750 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\admin;
use App\Branch;
use App\Http\Controllers\Controller;
use App\QueryFilters\globals\SearchName;
use Illuminate\Http\Request;
use Illuminate\Pipeline\Pipeline;
class BranchController extends Controller
{
public function get(Request $request)
{
//check if page ... | true |
3e6df58b6c5d85aaf3a894d2c5430e0ce4553500 | PHP | MatthewKov/Book-Review-Site | /profile.php | UTF-8 | 8,731 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html>
<!-- Contributions by Louisa Evola and Matthew Kovalenko-->
<?php
session_start();
if(!isset($_SESSION['user'])) {
header('Location: login.php');
}
require('db_connect.php');
function addBookToList($list, $title, $author, $user) {
if(bookExists($title, $author, $user, $list)) {
if($list ==... | true |
4d6110f73579c4dd6c7be68d0cef9ff50c8f381b | PHP | adipata/jain | /lu/pata/jain/KeyTool.php | UTF-8 | 11,137 | 2.625 | 3 | [] | no_license | <?php
namespace lu\pata\jain;
use phpseclib\Crypt\RSA;
use Exception;
class KeyTool
{
public function load($alg,$type,$kdata){
switch ($alg){
case "rsa":
return $this->loadRSAKey($type,$kdata);
case "aes":
if(strlen($kdata)!=16 && strlen($kdata)!=... | true |
25d11136f8095653e718ccadd9d2891777643bbe | PHP | Skullmaster-Master-Of-Skulls/shopping-cart-backup | /determineCheckboxes.php | UTF-8 | 1,284 | 2.84375 | 3 | [] | no_license | <?php
// Written by Hudson T.
// Determines which checkboxes should be checked after sorting has occured
$teaChecked = false;
$herbalChecked = false;
$blackChecked = false;
$greenChecked = false;
$oolongChecked = false;
$whiteChecked = false;
$icedChecked = false;
$coffeeChecked = false;
/... | true |
df3a30b909182f29555ecadb4bdc7dc7f9cd8cb5 | PHP | GOAPL-1993/nkust-0908homework | /test03/index.php | UTF-8 | 2,921 | 2.859375 | 3 | [] | no_license | <?php
require "../includes/config.php"; //比較重要一定要出現就用require, 此相較於includes指令
require "../includes/utils.php";
session_start();
//先從Session中取出user_type
//以備後續確認瀏覽者的身份別
$user_type = $_SESSION["user_type"];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
body {
font-family: 微軟正黑體;
}
</... | true |
071f48408c091e5eb319a37d9a45853b7639ec16 | PHP | DegenerateZan/DPHP-Driver | /src/Listeners.php | UTF-8 | 1,243 | 3.375 | 3 | [
"MIT"
] | permissive | <?php
namespace DPHPDriver;
use Discord\Discord;
use Discord\WebSockets\Event;
/**
* A Events Listener closures Manager
*/
class Listeners
{
/**
* @var array $listeners An array that holds the assigned event listener closures.
*/
private array $listeners = [];
/**
* Execute the assi... | true |
68a76976f8fab63c0ff8c4dbb6f2cf22652e13a7 | PHP | hkgunawan/idgaiaworld | /app/Console/Commands/DropTables.php | UTF-8 | 982 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Support\Facades\Schema;
use Illuminate\Console\Command;
class DropTables extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'drop:tables';
/**
* The console comman... | true |
9758b6688a2310d13bd0aa29f5c0f04eb4a58278 | PHP | fjd/joobsbox-php | /Joobsbox/Model/Users.php | UTF-8 | 2,305 | 2.75 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Users Model definition
*
*
* @author Valentin Bora <contact@valentinbora.com>
* @version 1.0
* @category Joobsbox
* @package Joobsbox_Model
* @copyright Copyright (c) 2009 Joobsbox. (http://www.joobsbox.com)
* @license http://www.joobsbox.com/joobsbox-php-license
*/
/**
* @category Joobsbo... | true |
b05b9726dd091d6dcdd840ea80d8aba848db42b3 | PHP | lmammino/e-foundation | /src/Address/Model/ZoneMemberProvince.php | UTF-8 | 671 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace LMammino\EFoundation\Address\Model;
/**
* Class ZoneMemberProvince
*
* @package LMammino\EFoundation\Address\Model
*/
class ZoneMemberProvince extends ZoneMember
{
/**
* @var ProvinceInterface $province
*/
protected $province;
/**
* Get province
*
* @return Pr... | true |
524d93632c9a4475f6f14320d60c9a6f639b738e | PHP | GodLesZ/depdoc | /src/Command/ValidateCommand.php | UTF-8 | 2,098 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace DepDoc\Command;
use DepDoc\Parser\MarkdownParser;
use DepDoc\Parser\ParserInterface;
use DepDoc\Validator\PackageValidator;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ValidateCommand extends BaseCommand
{
... | true |
867c8c2583ceb688c98e74c8a7b60705e7228563 | PHP | Namide/Flea | /system/helpers/system/DataUtil.php | UTF-8 | 4,546 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/*
* The MIT License
*
* Copyright 2014 Damien Doussaud (namide.com).
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rig... | true |
c4b269012db26448aa383d4e035d9b9b4284480e | PHP | ridwanpandi/lumen-quotes | /app/User.php | UTF-8 | 938 | 2.65625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Auth\Authenticatable;
use Laravel\Lumen\Auth\Authorizable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
class User extends Model implemen... | true |
3c2531094877f88b9d639dd658cb651389308a64 | PHP | zozep/PHP.Projects | /procedural/score_and_grade/score_and_grade.php | UTF-8 | 1,203 | 4.28125 | 4 | [] | no_license | <?php
/*
Use a rand() function to generate a random number between 50-100.
Store the value returned from the above random function to a variable called $score
Display the following grade depending on the score:
Score below 70: display the score in h1 tag and display in h2 tag their grade: D
Score between 70-80: display... | true |
6218b029fa674839a032329d650e1d30be7bf9b1 | PHP | henrymaninnen/EE18-ar3 | /db/db-conn.php | UTF-8 | 871 | 2.9375 | 3 | [] | no_license | <?php
/*
* PHP version 7
* @category Lånekalkylator
* @author Henry Cantwell <henry.cantwell@elev.ga.ntig.se>
* @license PHP CC
*/
$user = "henry";
$db = "henry";
$host = "localhost";
$pass = "VugD6x4rsYTBQYwK";
$pass = "Uh60PwnOivbp9mx5";
//logga in på mysql-servern och välj databas
$conn = new mysqli($ho... | true |
3327994f4b962cb9ce67734ade7fab9a2110df3e | PHP | fykosak/fksdb | /app/Components/Controls/Navigation/PresenterBuilder.php | UTF-8 | 2,167 | 2.71875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace FKSDB\Components\Controls\Navigation;
use FKSDB\Models\Exceptions\BadTypeException;
use FKSDB\Modules\Core\BasePresenter;
use Nette\Application\BadRequestException;
use Nette\Application\IPresenter;
use Nette\Application\IPresenterFactory;
use Nette\Application\UI\Presenter;
... | true |
0c09b6391a2d89a548d476b4f37ddcd507f27972 | PHP | AntonioPerezRivera/SWECA | /portaladmin.php | UTF-8 | 1,077 | 2.671875 | 3 | [] | no_license | <!DOCTYPE=html>
<html>
<head>
<title> Portal del administrador </title>
</head>
<body>
<center>
Elija un estudio: <br/>
<?php
$conexion = mysql_connect("localhost","root","root")
or die("Imposible conectar con nuestro servidor");
mysql_select_db("mydb")
or die("No se pudo conectar con la BD");
$se... | true |
e972fa2a78ee05112530e9ec1888d11b5d0a2872 | PHP | triest/laravel_backup_databse | /database/migrations/2020_08_16_092827_create_tables_table.php | UTF-8 | 1,094 | 2.640625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTablesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
... | true |
18cdd7173e9762533ebabdbe85b0ca4c77c061fb | PHP | poethrenoff/nikolaos | /htdocs/include/valid.php | UTF-8 | 913 | 2.890625 | 3 | [] | no_license | <?php
class valid
{
public static function int( $content )
{
return preg_match( '/^\-?\+?\d+$/', $content );
}
public static function float( $content )
{
return preg_match( '/^\-?\+?\d+[\.,]?\d*$/', $content );
}
public static function date( $content )
{
return preg_match( '/^(\d{2})\.(\d{2})\.(\d{4})... | true |
fbfb2a12e2eac0bfed157f3db6d9a4bca21dc83f | PHP | elinoretenorio/php-headless-crud-for-classic-car-scale-models-db | /src/Products/ProductsRepository.php | UTF-8 | 3,766 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ClassicCarScaleModels\Products;
use ClassicCarScaleModels\Database\IDatabase;
use ClassicCarScaleModels\Database\DatabaseException;
class ProductsRepository implements IProductsRepository
{
private IDatabase $db;
public function __construct(IDatabase $db)
{
... | true |
595730cb30c44551cc2b8b463f6b7942238491fe | PHP | quinncomendant/nexmo-client | /src/Service/Account/Balance.php | UTF-8 | 952 | 2.734375 | 3 | [] | no_license | <?php
namespace Nexmo\Service\Account;
use Nexmo\Exception;
use Nexmo\Service\Service;
/**
* Retrieve current account balance
*
* @author Carson Full <carsonfull@gmail.com>
*/
class Balance extends Service
{
/**
* @inheritdoc
*/
public function getRateLimit()
{
// Max number of requ... | true |
2f85fffa197ed6104ba614b34a05871402b38afe | PHP | vhnh/geocode | /src/Contracts/Address.php | UTF-8 | 199 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Vhnh\Geocode\Contracts;
interface Address
{
public function streetAddress();
public function city();
public function postCode();
public function country();
}
| true |
f35bb55061bf5c9072bb0c7377f4a5913832b0ab | PHP | lost1987/omni | /inner/gms/model/matchHistory_M.class.php | UTF-8 | 2,267 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: shameless
* Date: 14/11/25
* Time: 上午10:20
*/
namespace gms\model;
use core\AdminModel;
use utils\Date;
class MatchHistory_M extends AdminModel
{
private static $_instance = null;
private $_condition = '';
... | true |
a0b700683c7727d5a38a6952c50f0b4482a499ca | PHP | lbadmin/vendo-sdk-php | /src/S2S/Request/UpdatePaymentMethod.php | UTF-8 | 1,397 | 2.515625 | 3 | [] | no_license | <?php
namespace VendoSdk\S2S\Request;
use VendoSdk\Exception;
use VendoSdk\S2S\Request\Details\PaymentDetails;
use VendoSdk\S2S\Request\Details\SubscriptionSchedule;
class UpdatePaymentMethod extends SubscriptionBase implements \JsonSerializable
{
/** @var PaymentDetails */
protected $paymentDetails = null;
... | true |
606f23b282e41b5d86c2744ec42a71df89bc828b | PHP | wongjiahau/web-app-basic-mock-lab-test | /task2/index.php | UTF-8 | 533 | 3.046875 | 3 | [] | no_license | <html>
<body>
<h1>Open file in PHP</h1>
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$file = fopen('./file.txt', 'r');
echo "<table border='1'>";
echo "<tr><th>Name</th><th>Email</th><th>Gender</th></tr>";
while(!feof($file)) {
$fields = explode(';', fgets($file)... | true |
3ebc8e02428c51556b546be6a5d8d4c1474749c7 | PHP | MarkVilludo/nba-api | /src/Params/Stats/PlayerIdListParam.php | UTF-8 | 484 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace JasonRoman\NbaApi\Params\Stats;
class PlayerIdListParam extends AbstractStatsParam
{
/**
* Convert an array of player ids to a comma-separated list.
*
* {@inheritdoc}
*/
public static function getStringValue($value): string
{
if (!is_array($value)) {
... | true |
a0f2231f8d87a1ae52a4e00b7a70250da0a3d254 | PHP | DanielMarcosPires/logica | /main.php | UTF-8 | 419 | 3.078125 | 3 | [] | no_license | <?php
$arr = [];
for($i = 0; $i < 6; $i++){
$arr[$i] = rand(1,6);
while(inArrayCustom($i,$arr[$i],$arr)){
$arr[$i] = rand(1,6);
}
}
print_r($arr);
function inArrayCustom($indice,$valor,$arr){
for($i = 0; $i < count($arr); $i++){
if($arr[$i] == $valor && $i != $indice)... | true |
2b8a8c7ab7d406f999b198456825baff3b2eebe3 | PHP | okaruto/space | /src/Translation/AvailableLocales.php | UTF-8 | 2,694 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Okaruto\Space\Translation;
/**
* Class AvailableLocales
*/
final class AvailableLocales
{
/** @var string */
private $path;
/** @var int */
private $pathLength;
/** @var string */
private $fallback;
/** @var ?array */
private $availableLo... | true |
c978d6f316e4913622aab275385562e2784a08be | PHP | PrestaShop/PrestaShop-1.4 | /modules/kiala/classes/KialaPoint.php | UTF-8 | 2,204 | 2.53125 | 3 | [] | no_license | <?php
/* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a c... | true |
725a6cd15d9d2ab51f16260e03690abb3fa64265 | PHP | RealSaleem/Habber | /app/Helpers/ApiHelper.php | UTF-8 | 1,253 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Helpers;
use App\Currency;
use App\User;
use Session;
class ApiHelper {
public static function apiResult($status,$code,$message,$data = null) {
if($data) {
return response()->json(['data' => $data,'status' => $status, 'code' => $code, 'message' => $message ]);
}
... | true |
9d6d4b50ad1818f5371616e73cca376a6e4913ff | PHP | stiff-github/modern-teh-web | /callback.php | UTF-8 | 1,290 | 2.546875 | 3 | [] | no_license | <?
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Expires: " . date("r"));
/*echo "<h1>", date("H:i:s"), "</h1>";*/
function filter($value){
return htmlspecialchars($value);
}
//Если поступили данные..
if( isset($_POST['name'],$_POST['phone'])){
$name = trim( ht... | true |
986c3694e66b2c2dbc3504009e26d3856a201b62 | PHP | Abumeragan/TesteStudiorama | /model/DAO/ProdutoDAO.php | UTF-8 | 3,138 | 3.078125 | 3 | [] | no_license | <?php
class ProdutoDAO {
private $con;
public function __construct(){
require_once('Database.php');
$this->con = Database::getInstancia();
}
public function create($produto) {
$sql = $this->con->prepare("INSERT INTO produto(nome, descricao... | true |
4c3decf5b2e60fc45a9ce6a84da7f4ff54a7958d | PHP | CodeIgniter-Chinese/CodeIgniter4 | /user_guide_src/source/helpers/number_helper/009.php | UTF-8 | 147 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
echo number_to_roman(23); // Returns XXIII
echo number_to_roman(324); // Returns CCCXXIV
echo number_to_roman(2534); // Returns MMDXXXIV
| true |