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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
7c6230820b9f073514720d95ff34a9847192e4c9 | PHP | daniel-iwaniec/acme | /application/source/Collection/Products.php | UTF-8 | 585 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Acme\Collection;
use Acme\Entity\Product;
use ArrayIterator;
use IteratorAggregate;
/**
* @implements IteratorAggregate<int, Product>
*/
final class Products implements IteratorAggregate
{
/** @var array<int, Product> */
private array $collection = [];
public ... | true |
e3f39bc95b251c6c8411cf56fe106854c5505799 | PHP | nour-diaa/leafplayer | /backend/app/LeafPlayer/Controllers/Api/AuthApiController.php | UTF-8 | 3,335 | 2.625 | 3 | [] | no_license | <?php
namespace App\LeafPlayer\Controllers\Api;
use App\LeafPlayer\Exceptions\Auth\NoPermissionException;
use \Illuminate\Http\Request;
use \Illuminate\Http\JsonResponse;
use App\LeafPlayer\Controllers\AuthController;
/**
* This controller is the layer between the API and the AuthController.
*
* Class ArtistApiCo... | true |
e70af28c6f6d736ada5de78dc8cd8a52051c5940 | PHP | mem-memov/cybelang | /src/Cybelang/SpaceGraph/SpaceNodesInGraph.php | UTF-8 | 1,203 | 2.59375 | 3 | [] | no_license | <?php
namespace MemMemov\Cybelang\SpaceGraph;
interface SpaceNodesInGraph
{
public function createNode(string $spaceName, array $toIds, array $fromIds): SpaceNode;
/**
* @param string $spaceName
* @param int[] $ids
* @return SpaceNode
* @throws ForbidMultipleCommonNodes
*/
pu... | true |
43e1d95e241b8a6a089442b54c494edcb3883e7f | PHP | tlytkine/Project-Apple- | /public_html/view_degree_requirements.php | UTF-8 | 1,601 | 2.6875 | 3 | [] | no_license | <?php
$allowed_user_types = array(
"STUDENT"
);
include 'header.php';
include 'db-connect.php';
$id = $_SESSION["id"];
?>
<html>
<head><title>View Degree Requirements</title></head>
<link rel="stylesheet" href="style.css">
<body><h1>Degree Requirements</h1>
<?php
$degreenamequery = "SELECT degreename FROM... | true |
4052cdf2299d8a645170e147a98bb1840d0aa153 | PHP | salahuddinrony/PHP-OOP | /Std class/index.php | UTF-8 | 158 | 2.828125 | 3 | [] | no_license | <?php
//StdClass (We can instansiate or use a class without defining it.)
$obj = new stdClass();
$obj->setPassword = '12345';
echo $obj->setPassword; | true |
db1dcb93aafb0c3e654ed5e885e3f8a683f8a311 | PHP | mikehoward/YASiteKit--Yet-Another-Site-Kit- | /yasitekit_data/page_structure/product_menu.php | UTF-8 | 3,872 | 2.71875 | 3 | [] | no_license | <?php
/*
#doc-start
h1. product_menu.php - Product Menu Navigation
Created by on 2010-03-25.
bq. Copyright Mike Howard and Clove Technologies, Inc, 2008-2010.
All Rights Reserved.
h2. ProductMenu Object
$product_menu = new ProductMenu(dbaccess, array(option => value, ...));
Where:
* dbaccess - is a DBAccess o... | true |
6977da0a622c218eb38e195d7c7b1d4c894eac3e | PHP | duncanodhis/laravel-banking-app | /database/seeds/TransactionsTableSeeder.php | UTF-8 | 995 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class TransactionsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('transactions')->insert([
'description' => 'Customer 1',
'deposit' => 2000,
... | true |
60de37992976dc784bc008fc647f17bfd03ddcaa | PHP | peachpiecompiler/peachpie | /tests/classes/iterators_004.php | UTF-8 | 688 | 3.90625 | 4 | [
"Apache-2.0"
] | permissive | <?php
namespace classes\iterators_004;
echo "1st try\n";
class c1 {}
$obj = new c1();
foreach($obj as $w) {
echo "object:$w\n";
}
echo "2nd try\n";
class c2 {
public $max = 3;
public $num = 0;
function current() {
echo __METHOD__ . "\n";
return $this->num;
}
function next() {
echo __METHOD__ . "\n";... | true |
f9f875da4549e9c8afa9d933126b3838ad703cde | PHP | TanguyGiton/GalaESIEA2016 | /php/process.php | UTF-8 | 1,151 | 2.78125 | 3 | [] | no_license | <?php
include('config.php');
/*
* The config file contain :
* $email_a
* $email_cc
* $email_cci
* $subject
*/
$name = $_POST['name1'];
$email = $_POST['email1'];
$destination = $email_a;
$message = nl2br(htmlentities($_POST['message1']));
$email = filter_var($email, FILTER_SANITIZE_EMAIL);
if (filter_var($email... | true |
dc61ebdc90a64d25ad6ebcc1e85475905f927169 | PHP | chas-academy/u05-car-rental-Babryz | /src/core/config.php | UTF-8 | 620 | 3.140625 | 3 | [] | no_license | <?php
namespace Main\src\core;
// Class for getting info from the app.json file.
class Config {
private $map;
public function __construct() {
// Gets the data from that file.
$json = file_get_contents("config/app.json");
// Decodes data from tha... | true |
e1cc039a3f499633ec21374fa672129770a1e2dc | PHP | ReenExeCubeTime/CodewarsPHP | /tests/RomanNumeralsEncoderTest.php | UTF-8 | 574 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace ReenExe\CodewarsPHP\Tests;
use PHPUnit\Framework\TestCase;
use ReenExe\CodewarsPHP\RomanNumeralsEncoder;
class RomanNumeralsEncoderTest extends TestCase
{
public function test_static_operations()
{
$encoder = new RomanNumeralsEncoder();
$this->assertEquals('M', $encoder->encod... | true |
9efa69bf6410d61cf649252b13edbb6789a1fca8 | PHP | marcoscodnet/codnet_mvc | /codnet_ui_components/components/grid/model/GridFilterModel.Class.php | UTF-8 | 4,323 | 2.84375 | 3 | [] | no_license | <?php
/**
* Representa filtro para la grilla
*
* @author Bernardo Iribarne (bernardo.iribarne@codnet.com.ar)
* @since 14-12-2011
*
*/
class GridFilterModel{
private $ds_id;
private $ds_name;
private $ds_label;
private $ds_field;
private $ds_sqlField;
private $oFormat;
private $bl_hidden;
private $ds_... | true |
450005c70b0f35d351723db0e1ed3aca96574d03 | PHP | nickwest/EloquentForms | /src/FormObserver.php | UTF-8 | 1,096 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Nickwest\EloquentForms;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Event;
class FormObserver
{
/**
* Fire the namespaced form event.
*
* @param string $event
* @param \Illuminate\Database\Eloquent\Model $model
* @return mixed
*/
pr... | true |
4fe85f529e7e3582eef5d326ed49da81945bbd7f | PHP | geoffroyvilain/PHP-PARTIE3 | /phpp3e2/index.php | UTF-8 | 946 | 4 | 4 | [] | no_license | <?php
// on initialise les variables
$numberA = 0;
$numberB = rand(1, 101); // on initialise la variable avec un nombre entre 1 inclus et 101 non inclus
?>
<!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8" />
<title>PHP - PARTIE3 - EXO2</title>
</head>
<body>
<h1>PHP - PARTIE3 - ... | true |
15391b7566c868308bde90ff4049d165f382adb6 | PHP | bassamtiano/pnj_digital | /app/models/KaryawanAbsensi.php | UTF-8 | 356 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
class KaryawanAbsensi extends Eloquent {
protected $table = 'tbl_karyawan_absensi';
protected $guarded = array('id_karyawan_absensi');
public static function ubah_karyawan_absensi($id_karyawan_absensi, $status) {
return KaryawanAbsensi::where('id_karyawan_absensi', '=', $id_karyawan_absensi)->update... | true |
44b6e2fde8fccd7003dd0a4d48a01f2cf5744df7 | PHP | mongodb/mongo-php-driver | /tests/bson/bson-encode-004.phpt | UTF-8 | 4,352 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | --TEST--
BSON encoding: Object Document Mapper
--FILE--
<?php
require_once __DIR__ . '/../utils/basic.inc';
require_once __DIR__ . "/../utils/classes.inc";
$hannes = new Person("Hannes", 42);
$sunnyvale = new Address(94086, "USA");
$kopavogur = new Address(200, "Iceland");
$hannes->addAddress($sunnyvale);
$hannes->ad... | true |
51278366ca4d769c0c9623e05e2a7d86c6e40544 | PHP | merrywhether/osu-web-dev | /PHP-1/src/loopback.php | UTF-8 | 346 | 2.53125 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
header('Content-type: application/json');
$parameters = null;
if (count($_POST)) {
$parameters = $_POST;
} elseif (count($_GET)) {
$parameters = $_GET;
}
$arr = array("Type" => $_SERVER["REQUEST_METHOD"],
"parameters" => $parameters);
e... | true |
81a7f2f7e9a67a98269d194921829d567c9411ce | PHP | bactv/study.edu | /frontend/components/EventProcess.php | UTF-8 | 3,467 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: bactv
* Date: 05/06/2017
* Time: 10:09 CH
*/
namespace frontend\components;
use frontend\models\Event;
use frontend\models\Student;
use Yii;
class EventProcess
{
public static function user_register_gift_promotion($user_id)
{
$event = Event::find()->where(... | true |
040b56ab4ae68c73c151fee0bc020f59f553180c | PHP | sujata-patne/icon_api | /v3/Models/Tune.php | UTF-8 | 4,387 | 2.640625 | 3 | [] | no_license | <?php
use VOP\Utils\PdoUtils;
require_once(APP."Utils/PdoUtils.php");
require_once(APP."Models/BaseModel.php");
require_once(APP."Daos/TuneDao.php");
require_once(APP."Models/Message.php");
class Tune extends BaseModel {
public $UserName;
public $Operator;
public $CelebrityName;
public $cf_id;
public funct... | true |
08dd02853470a8982486547a2f80d681f4a28a55 | PHP | a07fgchen/DesinPattern | /Turnips.php | UTF-8 | 578 | 2.703125 | 3 | [] | no_license | <?php
ini_set('display_errors', '1');
error_reporting(E_ALL);
use PHPUnit\Framework\TestCase;
/**
* Class Turnips
*/
final class Turnips
{
/**
* @var Turnips
*/
protected static $turnips;
private function __construct()
{
}
private function __clone()
{
... | true |
8f1f2ffbab476af62c81f3c331c41a55e577004c | PHP | tangent-tech/citizen-website | /sg/cms/web/class/acl.class.php | UTF-8 | 5,018 | 2.640625 | 3 | [] | no_license | <?php
// Please do NOT think this as an OOP object, I just use the class to group the related functions...
// mysqli: DONE
// magic_quote OFF: DONE
if (!defined('IN_CMS'))
die("huh?");
class acl {
public function __construct() {
die('Do not create me. I am not an object!');
}
public static function AclBarrier(... | true |
07639a828b933caeef15463cf88b6d46a867ec5e | PHP | cc361623688/apple-pay | /src/ApplePay.php | UTF-8 | 6,197 | 2.828125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @link http://chenkby.com
* @copyright Copyright (c) 2018 ChenGuanQun
* @license http://opensource.org/licenses/BSD-3-Clause
*/
namespace chenkby\applepay;
/**
* 苹果内购
* 错误码
* 21000 App Store不能读取你提供的JSON对象
* 21002 receipt-data域的数据有问题
* 21003 receipt无法通过验证
* 21004 提供的shared secret不匹配你账号中的shared sec... | true |
38970ba427a7ae130b7944b2be4c7c9a8c5e861c | PHP | RossCasey/ProjectEuler | /Problems/Problem-3/Main.php | UTF-8 | 366 | 3.25 | 3 | [] | no_license | <?php
require_once "../../vendor/autoload.php";
use Libraries\Math;
$numberToFactorise = 600851475143;
$candidate = intval(ceil(sqrt($numberToFactorise)));
$found = false;
while( ! $found) {
if(($numberToFactorise % $candidate === 0) && (Math::isPrime($candidate))) {
$found = true;
} else {
... | true |
9acfbc4613424aafd3ef81a739478ba1f1aca02c | PHP | pacificcasinohotel/pointsystem | /app/models/Playerbets.php | UTF-8 | 581 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
class Playerbets extends Eloquent {
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'player_bets';
protected $fillable = array(
'account_id',
'added_by',
'bet',
'points_conversation',
'points_converted'
);
protected $guarded = array('id');
public $ti... | true |
38c4ac783f674de974537ab2c6580d5c801280c2 | PHP | jackdiff/web_test_api | /src/Framework/Service/Validate/Validator.php | UTF-8 | 711 | 2.5625 | 3 | [] | no_license | <?php
namespace Framework\Service\Validate;
use Framework\AppConstants;
use Framework\Provider\LoggerServiceProvider;
/**
*/
class Validator {
protected $success;
protected $error_code;
protected $error_message;
//---------------------------------
public function __construct($success_flg, $err_cod... | true |
354bc462c4e7d96ee5a0be4e102a289d2e30e51b | PHP | sean-mullen/m-lightbox | /mlightbox.php | UTF-8 | 2,857 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/*
Plugin Name: M:Lightbox
Plugin URI: http://www.mullen.net.au/
Description: An unobstrusive image lightbox that requires no configuration.
Version: 1.0.0
Author: Sean Mullen <sean@mullen.net.au>
Author URI: http://www.mullen.net.au/
License: MIT
*/
/*
* The MIT License
*
* Copyright 2014 Sean Mullen <sean@... | true |
e9733fec652dbf3b0e509bee382740dd7239b3bb | PHP | Dheia/oc-minifyme-plugin | /Plugin.php | UTF-8 | 3,014 | 2.671875 | 3 | [] | no_license | <?php namespace Uit\MinifyMe;
use Cms\Classes\Theme;
use Illuminate\Support\Facades\Storage;
use MatthiasMullie\Minify;
use System\Classes\PluginBase;
class Plugin extends PluginBase
{
public function registerComponents()
{
}
public function registerSettings()
{
}
public function regist... | true |
c6b6bec286ef0e49d1788e138dc9561b454c28ca | PHP | shouc/corbfuzz | /php/ext/bz2/tests/bug71263.phpt | UTF-8 | 1,641 | 2.953125 | 3 | [
"MIT",
"GD",
"BSD-3-Clause",
"BSD-4-Clause-UC",
"ISC",
"IJG",
"Zlib",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-other-permissive",
"TCL",
"BSD-2-Clause",
"OLDAP-2.8",
"PHP-3.01"
] | permissive | --TEST--
Bug #71263: fread() does not detects decoding errors from filter bzip2.decompress
--SKIPIF--
<?php if (!extension_loaded("bz2")) print "skip bz2 extension not loaded"; ?>
--FILE--
<?php
// Should notices be generated?
function test($case) {
$plain = "The quick brown fox jumps over the lazy dog.";
$fn = "bu... | true |
7e6b4d3e62daec41df713696892ebfb33e1ce676 | PHP | pd0225/IT202-450 | /public_html/Milestone3_Project/search.php | UTF-8 | 1,790 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
include("header.php");
?>
<h2>Search</h2>
<?php
$search = "";
if(isset($_POST["search"])){
$search = $_POST["search"];
}
?>
<form method="POST">
<input type="text" name="search" placeholder="Search for account"
value="<?php echo $search;?>"/>
<input type="submit" value="Search"/>
</form>
<?... | true |
9bcac7f180ba65818d66f2a5fd5bd8ef8aa8df06 | PHP | mydevdan313/lab3 | /vieworders_4.php | UTF-8 | 1,941 | 3.125 | 3 | [] | no_license | <?php
require('header.inc');
?>
<h1>Автозапчасти от Боба</h1>
<h2>Заказы клиентов</h2>
<?php
//Считывание всего файла
//Каждый заказ становится элементом массива
$orders= file("orders_4.txt");
// Подсчет количества заказов, хранящихся в массиве
$number_of_orders = count($orders);
echo "$number... | true |
bca93df49b368de6e1e87ad803f7ff45db3141f1 | PHP | PHProger-themus/design-patterns | /Composite/classes/Task.php | UTF-8 | 408 | 3.453125 | 3 | [] | no_license | <?php
namespace composite\classes;
use composite\interfaces\Component;
class Task implements Component
{
private string $text;
public function __construct(string $text)
{
$this->text = $text;
}
public function getStructure()
{
return $this->text;
}
public function ... | true |
0b58f59d07ad750bb5991858965c757bdb43d6dd | PHP | echuquillanquiy/medicalhedialhys | /app/Http/Controllers/Administrador/PatientController.php | UTF-8 | 4,409 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Administrador;
use Illuminate\Http\Request;
use App\Patient;
use Carbon\carbon;
use App\Http\Controllers\Controller;
class PatientController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public ... | true |
0289abf93468a8d078446942f306bcc45e1b456b | PHP | rajkumar1206/wta-programs | /lab8/grade.php | UTF-8 | 793 | 3.390625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Grade</title>
<style>
h3 {
color: green;
}
</style>
</head>
<body>
<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$marks = $_POST["marks"];
$grade = "";
if($marks >=90)
$grade = "S";
elseif($marks >=75)
$grade = "A";
... | true |
8052819fb31e47eeb52a47821fe4633e820e4817 | PHP | GifinoThoriq/Ihkeya-PHP | /functions.php | UTF-8 | 4,767 | 2.796875 | 3 | [] | no_license | <?php
// koneksi ke database
$conn = mysqli_connect("localhost","root", "", "ihkeyaphp");
function query($query){
global $conn;
$result = mysqli_query($conn, $query);
//cek berhasil atau tidak
if(!$result){
echo mysqli_error($result);
}
$rows = [];
... | true |
53b08009fa6e7660858851b176dc50fb5e2acd01 | PHP | CivilianSergeant/marketplace-asianlancers | /app/custom-library/PayPal/Auth/PPSignatureCredential.php | UTF-8 | 1,598 | 3.046875 | 3 | [] | no_license | <?php
/*namespace PayPal\Auth;
use PayPal\Exception\PPMissingCredentialException;*/
/**
* API signature (3-token) based credentials
*/
class PPSignatureCredential extends IPPCredential {
/**
* API username
* @var string
*/
protected $userName;
/**
* API password
* @var string
*/
protected $password;... | true |
4d38ae51598ca3f501cfeec61002947be1c2619e | PHP | marcosfreitas/controle-estoque | /src/App/Mvc/Controller/Cliente.php | ISO-8859-1 | 2,678 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Mvc\Controller;
/**
* Controller dos clientes
* --
*/
class Cliente extends Controller {
private $c_id;
private $c_nome;
private $c_email;
private $c_telefone;
public function __contruct() {
parent::__contruct();
}
// mtodos para definirem as variveis
public function listar() {
... | true |
aa3ea1c7a9c281bee1291b0081f91d2b28b45d4c | PHP | Anthobask/Taurus | /controlleurs/identification.php | UTF-8 | 1,874 | 2.671875 | 3 | [] | no_license | <?php
//recupère l'URL d'avant
if (isset($_SERVER['HTTP_REFERER']))
$url_origine = $_SERVER['HTTP_REFERER'];
else
$url_origine = PATH;
//gestion de l'identification
if (isset($_POST['validerIdentification'])) {
if (isset($_POST['login']) && isset($_POST['password'])) {
//$con = Propel::getConnecti... | true |
ef9bf77c068bf13e058824fbde7b2bb5eb84b8d5 | PHP | alfarid0056/tugas | /pkl2.php | UTF-8 | 5,405 | 2.765625 | 3 | [] | no_license | <?php
// Check for the path elements
// Turn off error reporting
error_reporting(0);
// Report runtime errors
error_reporting(E_ERROR | E_WARNING | E_PARSE);
// Report all errors
error_reporting(E_ALL);
// Same as error_reporting(E_ALL);
ini_set("error_reporting", E_ALL);
// Report all errors except E_NOTICE
... | true |
4ad06baeffb53509bcf7f14283615ec1b2513948 | PHP | im286er/zan | /Zan/Library/View.php | UTF-8 | 1,609 | 2.640625 | 3 | [] | no_license | <?php
/* *************************************************************************
* File Name: View.php
* Author: wushuiyong
* mail: wushuiyong@huamanshu.com
* Created Time: Sun 09 Nov 2014 02:53:48 PM
* ************************************************************************/
namespace Zan\Library;
class View {... | true |
93cfcec111d76e777fbff1ac3f29d1c0b6fe126d | PHP | Davronjuraev/dayside | /config/config.php | UTF-8 | 601 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_HOST', 'localhost');
define('DB_NAME', 'task');
define ('DIRSEP', DIRECTORY_SEPARATOR);
define('LOGIN', 'admin' );
define('PASS', '123' );
try {
$dbObject = new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PA... | true |
0d54247444ba3cb097f999205268bc7f8a5c44ef | PHP | 21TORR/feature-flags-bundle | /src/Features/FeatureFlags.php | UTF-8 | 1,260 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Torr\FeatureFlags\Features;
use Symfony\Contracts\Cache\CacheInterface;
use Torr\FeatureFlags\Features\Loader\FeaturesFileLoader;
/**
* @final
*/
class FeatureFlags
{
private const CACHE_KEY = "21torr.feature-flags";
/** @var array<string,bool>|null */
private ?array $f... | true |
bb25a9f83c27e31065dec6e1fe302994421df64d | PHP | sudiptochoudhury/php-api-client-forge | /src/support/forge/api/Traits/Import/DefaultFilters.php | UTF-8 | 2,431 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace SudiptoChoudhury\Support\Forge\Api\Traits\Import;
trait DefaultFilters
{
/**
* @param $default
* @param $details
*
* @return array
*/
public function filterDocMDLayoutTitle($default, $details)
{
$md = ['## ' . $details['data']['title']];
$md[] = "... | true |
14161c19aeaecfce45f6639952b2050413ddb241 | PHP | mdonath/hit-site-creator | /src/test/java/nl/scouting/hit/sitecreator/input/module/soap/soap_class.php | UTF-8 | 6,990 | 2.65625 | 3 | [] | no_license | <?php
/**
* Change this setting to prevent problems when a new WSDL is released.
*/
ini_set('soap.wsdl_cache_enabled', '0');
/**
* Soapclient implementation for use with Scouts Online.
*/
class SolSoapClient extends SoapClient {
... | true |
bbd8332a3ebeb304b0e16091dc1d17c50fad43aa | PHP | curlycarla2004/Jeu-Cartes | /class/CarteTriche.php | UTF-8 | 2,014 | 3.53125 | 4 | [] | no_license | <?php
require_once 'CarteInterface.php';
/**
* La carte triche ne peut être qu'un As!
*
*/
class CarteTriche implements CarteInterface
{
//Enseigne d'une carte (Pique, Coeur, Trèfle ou Carreau).
private $_enseigne;
//La couleur dépend de l'enseigne.
private $_couleur;
//de 1 à 10 ou valet, dame, roi.
... | true |
cd261647eaa25928e6c42bfb633cb9a2501c0b75 | PHP | sebastianGR429/proyecto | /modelo/daos/DAOTipo_cliente.php | UTF-8 | 1,650 | 2.578125 | 3 | [] | no_license | <?php
include_once($_SERVER['DOCUMENT_ROOT'] . '/proyecto/controlador/db.php');
include_once($_SERVER['DOCUMENT_ROOT'] . '/proyecto/modelo/entidades/Paquete.php');
//include_once($_SERVER['DOCUMENT_ROOT'].'/proyecto/controlador/EnviarCorreo.php');
class DAOTipo_cliente extends DB
{
private $con;
public funct... | true |
ba6407256cb86ab588c7ab0cdaf6501535d26ab0 | PHP | nvmphuong/coccoc-test | /sources/api/app/Crawlers/Interfaces/Spider/Builder.php | UTF-8 | 263 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Crawlers\Interfaces\Spider;
use App\Crawlers\Interfaces\CrawlerMapper;
/**
* Created by PhpStorm.
* User: Phuong Nguyen
* Date: 14/10/2019
* Time: 12:48 PM
*/
interface Builder{
function build(string $url, string $content):CrawlerMapper;
} | true |
f7ab99c84164eb6422116d861a1a92d143680497 | PHP | forging2012/php100 | /c03/3_2.php | GB18030 | 1,058 | 3.765625 | 4 | [] | no_license | <!-------------------------------------------ļ 3_2.php-------------------------------->
<?php
/*************************ñ************************************/
$student = array(
array("С",19,""),
array("С",18,""),
array("С",19,""),
array("СԷ",20,""),
array("С",20,""),
array("С",20,""),
array("С",18,"")
);
echo "ʹ... | true |
0d24088fe1d8386a1e7b19a68ad533572d9cd913 | PHP | Yassine-Fellous/runtrack2 | /jour07/job03/index.php | UTF-8 | 583 | 2.875 | 3 | [] | no_license | <?php
session_start();
if (isset($_POST["reset"])) {
session_destroy();
$_SESSION["prenoms"] = null;
} else {
$_SESSION["prenoms"][] = $_POST["prenom"];
foreach ($_SESSION["prenoms"] as $_SESSION["prenom"]) {
if (isset($_POST["prenom"])) {
echo $_SESSION['prenom']."<br>";
... | true |
b512d6d9e4e8eb872f62faf7eb98cdafa4ddc7ef | PHP | Yar-ua/stud_framework | /src/Middleware/Auth.php | UTF-8 | 1,141 | 2.828125 | 3 | [] | no_license | <?php
namespace Mindk\Framework\Middleware;
use Mindk\Framework\Auth\AuthService;
use Mindk\Framework\Http\Request\Request;
use Mindk\Framework\Models\UserModel;
use Optimus\Onion\LayerInterface;
/**
* Class Auth Route Middleware
* @package Mindk\Framework\Middleware
*/
class Auth implements LayerInterface
{
... | true |
087ee679dc413a092b4069b0578f36b6205ab4da | PHP | zabaala/curso-php-poo | /objeto7.php | UTF-8 | 576 | 2.703125 | 3 | [] | no_license | <?php
require_once 'vendor/autoload.php';
use App\Classes\Orcamento;
use App\Classes\Produto;
use App\Classes\Servico;
$orcamento = new Orcamento();
$orcamento->adicionar(new Produto('Maquina de Café', 10, 299), 1);
$orcamento->adicionar(new Produto('Barbeador Elétrico', 10, 170), 1);
$orcamento->adicionar(new Produ... | true |
95b3526bb83e544d8d8e7d42ac260458357d4b01 | PHP | kukuzhang/yii2-easyApi | /backend/lib/behaviors/RbacControl.php | UTF-8 | 3,183 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\lib\behaviors;
use Yii;
use yii\di\Instance;
use yii\base\ActionFilter;
use yii\base\InvalidConfigException;
use yii\web\ForbiddenHttpException;
use backend\lib\components\User;
/**
*
* @author Yong
*
*/
class RbacControl extends ActionFilter
{
/**
* @var array $r... | true |
453684b9baf55a6761b99785739d907e034867d9 | PHP | FranckFA67/humanitR | /mvc/models/Users.class.php | UTF-8 | 1,791 | 3.03125 | 3 | [] | no_license | <?php
class Users
{
private $id;
private $password;
private $name;
private $nickname;
private $telephone;
private $adresse;
private $password;
private $email;
private $user;// new UserManager(?) -> $db
private $db;// $db -> obligatoire pour accéder au manager
public function __construct($db)// <-- const... | true |
61bf50affa3d8d0b7976d5e5e370951cc4a035e5 | PHP | MALKAKER/car2go_full | /car2go_05_03/Car2Go_server/secondApp/getDistance.php | UTF-8 | 2,968 | 2.96875 | 3 | [] | no_license | <?php>
/**
*
* Author: CodexWorld
* Function Name: getDistance()
* $addressFrom => From address.
* $addressTo => To address.
* $unit => Unit type.
*
**/
require 'DB_Manage.php';
function getDistance($addressFrom, $addressTo, $unit){
//Change address format
$formattedAddrFrom = str_replace(' ','+',$addr... | true |
36e9ad54bcc96424ad65ad62c5ff23dd45e0aa6f | PHP | VictorSebben/LPW | /test2.php | UTF-8 | 207 | 3.921875 | 4 | [] | no_license | <?php
$a = 2;
$b = "5 patos";
/* Converterá o 5 para número e realizará a soma, resultando 7 */
$c = $a + $b;
/* Ponto: operador de concatenação */
$d = $a . $b;
echo $c;
echo '<p>' . $d . '</p>';
?> | true |
6a9e3d32213befc858610f6f283743c960a830bb | PHP | phamngocson1988/core | /common/models/GameImage.php | UTF-8 | 665 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
use yii\db\ActiveRecord;
use common\models\Image;
/**
* Game model
*
* @property integer $id
* @property integer $game_id
* @property integer $image_id
*/
class GameImage extends ActiveRecord
{
public static function tableName()
{
return '{{%game_image}}';
... | true |
9e280ff378fb5308ba36960488ceb88bcca097aa | PHP | JanithGan/EasyIntern | /App/lib/helpers/page_helpers.php | UTF-8 | 1,618 | 2.640625 | 3 | [] | no_license | <?php
function dangerCard($error)
{
$html='';
/*
$html = <<< EOT
<div class="card border-danger mb-3 " style="width:auto" id="waring">
<!-- <div class="card-header">Warning</div> -->
<div class="card-body text-danger">
<h5 class="card-title">Warning</h5>
EOT;
foreach($error as $er)... | true |
185548249d2aa89df3d72d3421699964fac5967c | PHP | gobelait/ProjetPHP | /model/ProduitDAO.test.php | UTF-8 | 442 | 2.625 | 3 | [] | no_license | <?php
require_once('Produit.classe.php');
require_once('ProduitDAO.class.php');
// Récupération des données de configuration
$config = parse_ini_file('../config/config.ini');
// Création de l'instance DAO
$magasin = new ProduitDAO($config['dataPathLocalAntoine']);
$m = $magasin->getTousLesProduits();
var_dump($m);
... | true |
ad68ae7cd192162167443c3a93f9d258d24a0179 | PHP | AffonsoGiesel/Parketin | /IApl-2019-1-Pk/AS04/controllers/UsageController.php | UTF-8 | 3,706 | 2.765625 | 3 | [] | no_license | <?php
class UsageController {
function __construct() {
}
function listAll() {
validateRequestType('GET');
$result["edit"] = LANG_TEXT['THEME_BTN_EDIT'];
$result["delete"] = LANG_TEXT['THEME_BTN_DELETE'];
$result["page"] = LANG... | true |
ef7573d4cc57c03e1108662c4d3f51086ba25574 | PHP | pasha-bolokhov-cs/comp140 | /lab7/php/submit.php | UTF-8 | 3,991 | 2.796875 | 3 | [] | no_license | <?php
date_default_timezone_set('America/Vancouver');
/* Get JSON data */
$jsonData = file_get_contents("php://input");
$data = json_decode($jsonData);
$firstname = $data->firstname;
$lastname = $data->lastname;
$phone = $data->phone;
$credit = $data->credit;
$expirym = $data->expirym;
$expiryy = $data->expiryy;
$ser... | true |
a510109171bbef61d96733669a4cfabaf58961b6 | PHP | fooloneself/coupon | /common/lib/Service.php | UTF-8 | 964 | 2.875 | 3 | [] | permissive | <?php
namespace common\lib;
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/7/6 0006
* Time: 下午 4:48
*/
class Service{
/**
* 服务实例
* @var array
*/
private static $__instances=[];
/**
* @var null|Error
*/
private static $__err;
/**
* 设置错误信息
* @... | true |
c68c47327d74209cc09413c68b753aff79c8b794 | PHP | caiohsj/galeria | /application/models/Messages_model.php | UTF-8 | 1,122 | 2.625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Messages_model extends CI_Model
{
function __construct()
{
//Carregando o banco de dados
$this->load->database();
}
//Select da tabela messages
public function get_messages($data = array())
{
if(empty($data))
{
$query = $this->db->get("tb_messages");
return $query->result_array();
... | true |
e3099fd480658f395178f381859607df56f2eb26 | PHP | niel/li3b_users_pdo | /models/Asset.php | UTF-8 | 2,066 | 2.59375 | 3 | [] | no_license | <?php
namespace li3b_users\models;
use lithium\util\Validator;
use lithium\util\Inflector as Inflector;
use \MongoDate;
class Asset extends \lithium\data\Model {
// Use the gridfs in MongoDB
protected $_meta = array(
'source' => 'fs.files',
'connection' => 'li3b_mongodb'
);
// I get appended to with the plu... | true |
b4becce3a2d9fefe8168724c066326205a93e5d5 | PHP | andreas-glaser/php-helpers | /src/HtmlHelper.php | UTF-8 | 6,517 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace AndreasGlaser\Helpers;
use AndreasGlaser\Helpers\Exceptions\UnexpectedTypeException;
use AndreasGlaser\Helpers\Html\AttributesHelper;
class HtmlHelper
{
public static function chars(string $value, bool $double_encode = true): string
{
return htmlspecialchars($value, ENT_QUOTES, 'UTF-8... | true |
fe8663c744d41f799f98c39a46a932a55916877f | PHP | rcrowe/GUMP | /gump.class.php | UTF-8 | 12,937 | 3.09375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* GUMP - A fast, extensible PHP input validation class
*
* @author Sean Nieuwoudt (http://twitter.com/SeanNieuwoudt)
* @copyright Copyright (c) 2011 Wixel.net
* @link http://github.com/Wixel/GUMP
* @version 0.5
*/
class GUMP
{
// ** ------------------------- Validation Helpers ---------------... | true |
0de77ccc6079b0721026cc08d3c74d8d4e210a1c | PHP | Shakir73/frank | /api/FrankApi.php | UTF-8 | 4,152 | 2.609375 | 3 | [] | no_license | <?php
class FrankApi
{
public function __construct()
{
}
// AWS
private $baseUrl = 'https://frank.hitechprime.io/api/v1/';
// Local
// private $baseUrl = 'http://localhost:3008/api/v1/';
// Heroku
// private $baseUrl = 'https://p-post.herokuapp.com/api/v1/';
// private $baseUrl = ... | true |
bed360e8d0cc96b11133128ebce13660d87f9744 | PHP | rcmonitor/pms_parser_subscriber | /adaptors/FootNote.php | UTF-8 | 254 | 2.578125 | 3 | [] | no_license | <?php
/**
* User: //@by_rcmonitor@//
* Date: 03.03.2015
* Time: 23:41
*/
namespace adaptors;
class FootNote {
public static function remove($strOrigin){
$regExp = '/(\w+)(?:\s*\[.+\])/';
return preg_replace($regExp, '$1', $strOrigin);
}
} | true |
84f1d3d498cff4773cfc833baaa8b1a98582c88c | PHP | anaskhafegui/framework | /tests/FileSystemTest.php | UTF-8 | 6,644 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace tests;
use Core\FileSystem\FileSystem;
use PHPUnit\Framework\TestCase;
class FileSystemTest extends TestCase
{
public function setUp()
{
$this->file = FileSystem::instance();
$this->tempDir = __DIR__.'/tmp';
$this->file->makeDirectory($this->tempDir, 0777, true, true);... | true |
8f969383c38e5f367a69235e670c09fa9af7764e | PHP | mikaelpopowicz/PPE-old | /www/Library/Models/MatiereManager_PDO.class.php | UTF-8 | 1,553 | 2.875 | 3 | [] | no_license | <?php
namespace Library\Models;
use \Library\Entities\Matiere;
class MatiereManager_PDO extends MatiereManager
{
public function getUnique($id)
{
$requete = $this->dao->prepare('SELECT id_m AS id, libelle, icon
FROM matiere
WHERE id_m = :id');
$requete->bindValue(':id', $id, \PDO::PARAM_INT);
$requete... | true |
b0f5728df033ddc5e72f224704f91a62c2806764 | PHP | jsonpeng/Gol | /app/Models/UserZichangLog.php | UTF-8 | 1,157 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class UserZichangLog
* @package App\Models
* @version November 24, 2018, 7:37 pm CST
*
* @property integer user_id
* @property float change
* @property string status
* @property string number
* @property s... | true |
e5ee91f65951f8e35d31144d895d8981dccef6f7 | PHP | Iqbal2016/core-php | /factory/new.php | UTF-8 | 2,529 | 2.6875 | 3 | [] | no_license | <?php
@session_start();
if(!isset($_SESSION['username'])){
header("Location: index.php");
}
if(isset($_POST['submit'])){
include('db.php');
$name = addslashes($_POST['name']);
$fname = addslashes($_POST['fname']);
$mname = addslashes($_POST['mname']);
$gender = $_POST['gender'];
$blood = $_POST['bloo... | true |
b28cf7c493c785ba3b92a445943436d83dc7df9f | PHP | sitkoru/yandex-direct-api | /src/services/campaigns/models/strategies/CpmBannerCampaignNetworkStrategy.php | UTF-8 | 3,689 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace directapi\services\campaigns\models\strategies;
use directapi\components\constraints as DirectApiAssert;
use directapi\components\interfaces\ICallbackValidation;
use directapi\components\Model;
use directapi\services\campaigns\enum\CpmBannerCampaignNetworkStrategyTypeEnum;
use Symfony\Component\Valid... | true |
1b1467b260fb0749f52ebfdc7d17be61902db7ce | PHP | BillyHodgson/Veterinaria | /baseDatos/citaConsultas.php | UTF-8 | 1,510 | 2.703125 | 3 | [] | no_license | <?php
require_once 'conexion.php';
function buscarCitaIDDB($id){
$sql = "SELECT * FROM CITAS WHERE ID =$id";
$resultado = mysqli_query($GLOBALS['conexion'], $sql);
$cita = mysqli_fetch_assoc($resultado);
return $cita;
}
function registrarCita($id, $nombreDueno, $nombreMascota,$raza,$e... | true |
776f80436fbba867cca2da74cc58386f3dbcddb9 | PHP | josAlba/packlink | /src/Packlink.php | UTF-8 | 1,961 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace packlink;
use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
class Packlink
{
private string $apiKey;
private Client $client;
public function __construct(string $apiKey)
{
$this->apiKey = $apiKey;
$this->client = new Client();
}
/... | true |
2c0d70621c70e3c98c858a130c1f3395fa33fbff | PHP | whytekieran/PHP-Database-Hit-Counter | /Connect.php | UTF-8 | 839 | 2.859375 | 3 | [] | no_license | <?php
$errMsg = 'Could not connect to database'.'<br/>';
$sqlHost = 'localhost';
$sqlUser = 'root';
$sqlPass = '';
$database = 'mydatabase';
//mysql_connect($sqlHost, $sqlUser, $sqlPass) || die($errMsg); //Example of connecting to server. The @ symbol will remove any
//mysql_select_db($database); //default... | true |
e61f621d4fc25daca015ac096c8dde74ac3c15e0 | PHP | adriansokolowski/SimpleCaptcha | /Captcha.php | UTF-8 | 695 | 2.65625 | 3 | [] | no_license | <?php
namespace libs\Captcha;
class Captcha
{
public function get($length)
{
$text = '123456789ABCDEF';
$text = substr(str_shuffle($text), 0, $length);
$_SESSION['captcha'] = $text;
$image = imagecreatefromjpeg(dirname(__FILE__) . '/captcha/captcha.jpg');
if(rand(1, 2)... | true |
a187735491cc8304fafba84785bb6fdb79629ee1 | PHP | Trustev/phpclientapi | /Trustev/Settings.php | UTF-8 | 555 | 2.546875 | 3 | [] | no_license | <?php
namespace Trustev;
/*
* The Trustev Settings.
*/
interface Settings
{
/**
* API Username ---- REQUIRED ----
* @var string
*/
const Username = '';
/**
* API Password ---- REQUIRED ----
* @var string
*/
const Password = '';
/**
* API Secret ---- REQUIRED ----
* @var string
*/
const Secre... | true |
ffe4aa5bd89a0ce1bceabb337973d53f6e585921 | PHP | Qianud/rolbike | /core/lib/drive/log/file.php | UTF-8 | 624 | 2.75 | 3 | [] | no_license | <?php
namespace core\lib\drive\log;
use core\lib\conf;
//文件的形式储存
class file
{
public $path; //日志储存的位置
public function __construct()
{
$paths=conf::get('OPTION','log');
$this->path=$paths['PATH'];
}
public function log($message,$file = 'log')
{
/*
*
*确定文件存储的位置是否正确否则重新建立
*写入日志
*/
$data=date(... | true |
e588cb22aae1aca50e295f8240e9b9461ec89a0e | PHP | petemcfarlane/which-mo | /controllers/basecontroller.php | UTF-8 | 325 | 2.625 | 3 | [] | no_license | <?php
namespace Controllers;
class BaseController {
// function __construct(\Models\User $user) {
// $this->user = $user;
// }
// public function createUser() {
// var_dump($_REQUEST);
// }
public $db;
function __construct() {
$mongoClient = new \MongoClient();
$this->db = $mongoClient->movember;... | true |
ef7930be45e2f5df5b1695af2d95c23c45f84ebd | PHP | JamiePan/Foodalchemist-iteration123 | /Charity Functions/RegisterCharity.php | UTF-8 | 9,474 | 2.875 | 3 | [] | no_license | <?php
// initializing variables
$username = "";
$charityname ="";
$errors = array();
$successes = array();
// connect to the database
$db = mysqli_connect("aws-wordpress-db.cde44m6xn6zq.us-west-2.rds.amazonaws.com","admin","foodalchemist", "bitnami_wordpress");
// automatic complete "business name"
$array = array()... | true |
16f2abd89b5b85243b27b97a629bac3bcf94209e | PHP | daniel-meyer/memo | /library/Smarty/plugins/function.thumb.php | UTF-8 | 3,991 | 2.703125 | 3 | [] | no_license | <?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* Smarty plugin
*
* Type: modifier<br>
* Name: nl2br<br>
* Date: Feb 26, 2003
* Purpose: convert \r\n, \r or \n to <<br>>
* Input:<br>
* - contents = contents to replace
* - preceed_test = if true, inclu... | true |
05634b808deb45ae4bd1eb56d5e256c619e396a1 | PHP | siddharth171996/Online-Grocery-Store | /In-Gro/includes/logdemo.php | UTF-8 | 1,935 | 2.53125 | 3 | [] | no_license | <?php
session_start();
//if(!empty($_SESSION["shopping_cart"]))
/*if($_SESSION['userid']==0)
{
$_SESSION = array();
session_destroy();
header("location: ../index.php?cart=temp");
exit;
}
else*/
///
if (isset($_SESSION['userId']) && isset($_SESSION["shopping_cart"])) {
require 'dbh.inc.php';
f... | true |
849096777af281f4527e31ad99c8eca31ebef729 | PHP | drm/Mystique | /src/Mystique/Common/Token/TokenStream.php | UTF-8 | 6,803 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Mystique\Common\Token;
use Iterator;
use ArrayAccess;
use Countable;
use OutOfBoundsException;
use UnexpectedValueException;
use LogicException;
class TokenStream implements Iterator, Countable
{
public $filename = '(unknown)';
protected $ignoreTypes = array();
protected $ptr;
f... | true |
850fdf509773c7f9a465f8249f8fce7b01699659 | PHP | orf53975/yii2-telegram-login | /Login.php | UTF-8 | 1,455 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: msmse
* Date: 08/02/2018
* Time: 11:59 PM
*/
namespace mdisepehr\telegram;
use yii\web\ForbiddenHttpException;
class Login
{
public $bot_username;
public $token;
function __construct($bot_username,$token){
$this->bot_username=$bot_username;
... | true |
f97c7d7b6513d261419de1f63c0d0224679bfef6 | PHP | mamazu/Schulverwaltung | /webdev/php/Modules/MarkSystem/TestRun.php | UTF-8 | 4,320 | 2.890625 | 3 | [] | no_license | <?php
namespace MarkManager;
include_once __DIR__ . '/../Database/DatabaseObject.php';
use tools\Database\DatabaseObject;
class TestRun extends DatabaseObject
{
protected $testId, $studentId, $dateTaken, $mark;
private $tasks, $test = null;
private $points = [];
public function __construct($runId = n... | true |
d49d29ad04ee994d46935f4d6219cded48cc25f4 | PHP | timurbakarov/english-school | /src/Domain/Education/StudentGroup/PricePerHour.php | UTF-8 | 927 | 3.296875 | 3 | [] | no_license | <?php
namespace Domain\Education\StudentGroup;
use Domain\Exception\InvalidArgumentException;
class PricePerHour
{
/**
* @var int
*/
private $value;
/**
* PricePerHour constructor.
* @param int $value
* @throws InvalidArgumentException
*/
public function __construct(int... | true |
f93deca9ecce8c716dd78b7dc76870e9d1c90d6f | PHP | htmlacademy-yii/949947-task-force-1 | /frontend/models/LoginForm.php | UTF-8 | 1,422 | 2.984375 | 3 | [] | no_license | <?php
namespace frontend\models;
use yii\base\Model;
/**
* Класс формы авторизации пользователя
*
* Class LoginForm
* @package frontend\models
*/
class LoginForm extends Model
{
public $email;
public $password;
/**
* @return array
*/
public function rules()
{
return [
... | true |
bbb43c7b182b08c6ad984733ee5b8fcab911e072 | PHP | patoui/deployer | /src/LaravelDeployer.php | UTF-8 | 3,445 | 2.953125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Deployer;
use Exception;
class LaravelDeployer extends Deployer
{
private $project_directory;
private $php_version;
private $package_manager;
private $web_server;
private $should_compile_assets = false;
public function __construct(
CommandInt... | true |
a4483138dab86580b9495db11fc9160726fb0602 | PHP | dbojdo/soap-api | /tests/Input/VoidInputNormaliserTest.php | UTF-8 | 548 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* VoidInputNormaliserTest.php
*
* @author dbojdo - Daniel Bojdo <daniel@bojdo.eu>
* Created on 12 16, 2015, 11:52
*
*/
namespace Webit\SoapApi\Tests\Input;
use Webit\SoapApi\Input\VoidInputNormaliser;
use Webit\SoapApi\Tests\AbstractTestCase;
class VoidInputNormaliserTest extends AbstractTestCase
{
... | true |
ef4ab4fce125a92a3e8459e8546487aafaba68e0 | PHP | samizdam/pet-tracking | /src/Samizdam/PetTracking/Device.php | UTF-8 | 872 | 2.640625 | 3 | [] | no_license | <?php
namespace Samizdam\PetTracking;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* Class Device
* @package Samizdam\PetTracking
* @ORM\Entity()
*/
class Device
{
/**
* @ORM\Id()
* @ORM\Column(type="string")
*
*/
private $id;
/**
* @... | true |
cd310423df5c8a8071e2b1577173a799af0c523d | PHP | FabricioMadaio/ProgettoApp | /inventory/inventoryNew.php | UTF-8 | 2,121 | 2.796875 | 3 | [] | no_license | <?php
/*INVENTORY RETRIEVE*/
/*load dbConn*/
include '../php/config.php';
include '../php/DBConnection.php';
include '../php/sessionControl.php';
include '../php/inputUtils.php';
$dbconn = new DBConnection();
$inventoryErr = "";
$username = $_SESSION["username"];
$userid = $_SESSION["userid"];
... | true |
27c74dbd7af65d16ab637656524989a8588d1ad7 | PHP | manniR/freiestheater | /public/content/plugins/ideenlandkarte/ideenlandkarte_admin.php | UTF-8 | 5,746 | 2.65625 | 3 | [] | no_license | <?php
require_once 'pagination.class.php';
global $wpdb;
$items = $wpdb->get_var('SELECT COUNT(*) FROM wp_ideenlandkarte ');
//$items = mysql_num_rows(mysql_query("SELECT * FROM wp_table;")); // number of total rows in the database
if($items > 0) {
$p = new pagination;
$p->items($items);
$p->limit(15); // Lim... | true |
b006e7620e83735202cd93896e0269ce20731462 | PHP | Oxigen2/PiqpoNick20130126 | /Website/piqpo/php/TagTransformSetValue.php | UTF-8 | 718 | 2.859375 | 3 | [] | no_license | <?php
// Just sets the value of a tag
class TagTransformSetValue extends TagTransform
{
function __construct($tagName, $value, $mandatory)
{
$this->_tagName = $tagName;
$this->_value = $value;
$this->_mandatory = $mandatory;
}
function doTransform($existingTags)
{
$newTags = array( $this->_tagName... | true |
2f57e77475d238568e4102e689cbeb7151064520 | PHP | Tsorik/My_Cinema | /recherche_film.php | UTF-8 | 2,443 | 2.921875 | 3 | [] | no_license | <?php
try
{
$bdd = new PDO('mysql:host=localhost;dbname=cinema;charset=utf8', 'root', 'azerty');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
$name = $_POST['nom_film'];
$genre = $_POST['id_genres'];
$distrib = $_POST['id_distrib'];
?>
<?php
... | true |
599b65bffe33f97275a85fdcb8e0a6843620c0d0 | PHP | DaleCausier/disasterapp | /php/about.php | UTF-8 | 880 | 2.640625 | 3 | [] | no_license | <?php
include ("functions.php");
$UserID = $_POST['userID'];
$AccessToken = $_POST['accesstoken'];
$isLoggedIn = IsUserLoggedIn($UserID, $AccessToken);
//if the IsUserLoggedIn method returns true the content can be shown, otherwise the user is not logged in.
if ($isLoggedIn > 0)
{
?>
<!-- container for the ab... | true |
fd68b2fd2b617d077f6e291154e1acd9a4f29418 | PHP | sspitzenreiter/Lifetime-Projects | /SpitzRepository/Lifetime To-Do Task/Programming/Projects/Web/htdocs/makanan_api/get_all_products.php | UTF-8 | 731 | 2.609375 | 3 | [] | no_license | <?php
$response = array();
require_once __DIR__ . '/DbConnect.php';
$db = new DB_CONNECT();
$result = mysql_query("SELECT * FROM products") or die(mysql_error());
if(mysql_num_rows($result) > 0){
$response["products"] = array();
while($row = mysql_fetch_array($result)){
$product = array();
$product["pid"] ... | true |
ce0cb2a5331ca3aca96ab42f9d391c4d611c8822 | PHP | Ultralesc/Chat_for_Matematika | /modules/editChanels.tpl.php | UTF-8 | 1,332 | 2.71875 | 3 | [] | no_license | <div id="forerror">
<?php
if (isset($err))
echo $err;
?>
</div>
<div >
<p>Сушествуюшие каналы:</p>
<?php
$result =$db->query("SELECT * FROM chanels "); //выборка всех каналов
while($row = mysqli_fetch_assoc($result)) {
echo '<form action="/editChanels" method="post" enctype="multipart/form... | true |
acff64be02e197b0e42e65973aac25c80e074ecb | PHP | Ziadov37/Contact | /classes/Contact.class.php | UTF-8 | 2,856 | 2.8125 | 3 | [] | no_license | <?php
include_once('../Model/database.php');
class Contact extends db
{
public function getContact()
{
$sql = "SELECT * FROM `contact`";
$stmt = $this->connect()->prepare($sql);
$stmt->execute();
while ($result = $stmt->fetchAll()) {
return $result;
}
}
... | true |
98ea48bc3567955dd1ad652d270e254db571af46 | PHP | hypeJunction/Elgg3-hypeCapabilities | /classes/hypeJunction/Capabilities/Role.php | UTF-8 | 5,704 | 2.671875 | 3 | [] | no_license | <?php
namespace hypeJunction\Capabilities;
use ElggEntity;
use ElggUser;
final class Role implements RoleInterface {
const CREATE = 'create';
const READ = 'read';
const UPDATE = 'update';
const DELETE = 'delete';
const ADMINISTER = 'administer';
const ACTION = 'action';
const ROUTE = 'route';
const ALLOW =... | true |
bfba41c35aa9b9b0e046ff40ca803698aa28c04c | PHP | vikontrimaite/php-intro | /1-intro/null/index.php | UTF-8 | 647 | 3.15625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>if it's NULL</title>
</head>
<body>
<?php
// $name = NULL;
// $lastname = 'Kukaitis';
... | true |
52df83aaf35eb59caee8d0a5b1ed4f3ded045042 | PHP | judasventuras/gifGrabber | /src/app/gifGrabber.php | UTF-8 | 620 | 3.1875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace GifGrabber;
class GifGrabber
{
/** @var array<int,Strategy> */
private static $strategies = [];
public static function addStrategy(Strategy $strategy): void
{
self::$strategies[] = $strategy;
}
public static function grab(Gif $gif): void
{
Utility::log('... | true |