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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1202532b8674795ec3bf8fa79343a789029b44f9 | PHP | zolotov491/yii2_example | /modules/admin/models/LanguageProficiency.php | UTF-8 | 1,382 | 2.625 | 3 | [] | no_license | <?php
namespace app\modules\admin\models;
use app\models\LanguageProfile;
use Yii;
/**
* This is the model class for table "language_proficiency".
*
* @property integer $id
* @property string $name_ru
* @property string $name_us
*
* @property LanguageProfile[] $languageProfiles
*/
class Langu... | true |
0ecdcfc2fe7da1dc84dca8b68086b17846aa03e0 | PHP | carl-alberto/WP-REST-Starter | /src/Core/Response/LinkAwareDataAccess.php | UTF-8 | 1,431 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php # -*- coding: utf-8 -*-
namespace Inpsyde\WPRESTStarter\Core\Response;
use Inpsyde\WPRESTStarter\Common\Response\DataAccess;
use WP_REST_Response;
/**
* Response data access implementation aware of links.
*
* @package Inpsyde\WPRESTStarter\Core\Response
* @since 2.0.0
*/
final class LinkAwareDataAccess ... | true |
bbd3423625c9de931ef3dbc34080858ea87fbf7f | PHP | mustafakarali/micro | /micro/db/Query.php | UTF-8 | 6,906 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php /** MicroQuery */
namespace Micro\db;
use Micro\base\Registry;
/**
* Query class file.
*
* @author Oleg Lunegov <testuser@mail.linpax.org>
* @link https://github.com/lugnsk/micro
* @copyright Copyright © 2013 Oleg Lunegov
* @license /LICENSE
* @package micro
* @subpackage db
* @version 1.0
* @si... | true |
61b02b30606bf35d937baf224aecf369e0a52181 | PHP | aditiV28/MyPrograms | /Security and Performance/For Aksh/sqlinject.php | UTF-8 | 1,183 | 2.734375 | 3 | [] | no_license | <?php
$uname = $_POST['name'];
$pass = $_POST['pass'];
//echo $uname ." ".$pass;
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "users";
$conn = new mysqli($servername,$username,$password,$dbname);
if($conn->connect_error){
die("Connection Failed.".$conn->connect_error);
}... | true |
95cc4781ec03599c61ae295c3c18629a46156717 | PHP | Technos-2016/Technos-2408 | /js/functions.php | UTF-8 | 3,740 | 3.15625 | 3 | [] | no_license | <?php
function getYearList($ytype, $yearname, $sel = '')
{
$start = ($ytype == 'NP') ? 2000 : 1944;
$end = ($ytype == 'NP') ? 2089 : 2033;
echo '<select class="form-control" name="' . $yearname . '" id="' . $yearname . '">';
for ($year = $start; $year <= $end; $year++)
{
echo '<option';
... | true |
d0af617259d493319d59e340c698aff5ba69ec3b | PHP | thedaian/br | /admin/viewlogs.php | UTF-8 | 4,049 | 2.53125 | 3 | [] | no_license | <?php
if(isset($_REQUEST['style'])) {
$style=$_REQUEST['style']; //registar globals is OFF, gets style
} else { $style=""; }
if(isset($_REQUEST['sort'])) {
$sort=$_REQUEST['sort']; //registar globals is OFF, gets sort
} else { $sort=""; }
if(isset($_REQUEST['start'])) {
$start=$_REQUEST['start']; //registar globals... | true |
4fa1750228b1f7ee2417782565a8b078b40f4ec5 | PHP | abasss/EasyManager | /core/modules/syslog/mod_syslog_file.php | UTF-8 | 4,702 | 2.71875 | 3 | [] | no_license | <?php
require_once DOL_DOCUMENT_ROOT.'/core/modules/syslog/logHandler.php';
/**
* Class to manage logging to a file
*/
class mod_syslog_file extends LogHandler implements LogHandlerInterface
{
public $code = 'file';
public $lastTime = 0;
/**
* Return name of logger
*
* @return string Name of logg... | true |
6d5f8d92f392860bc8ab71b436717b1a0c697fd5 | PHP | olliebennett/student-spreadsheet-codeigniter | /application/controllers/purchases.php | UTF-8 | 33,934 | 2.53125 | 3 | [] | no_license | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Purchases extends CI_Controller {
// Constructor
function __construct() {
parent::__construct();
// Get user details
$this->load->model('users_model');
$this->user = $this->users_model->getUser();
$this->housemate... | true |
d8e4f9cffcc3900eb77165c6b3666a5565770609 | PHP | uLow/genesis_php | /spec/Genesis/API/Request/NonFinancial/KYC/Call/CreateSpec.php | UTF-8 | 2,087 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace spec\Genesis\API\Request\NonFinancial\KYC\Call;
use Genesis\API\Request\NonFinancial\KYC\Call\Create;
use Genesis\Exceptions\ErrorParameter;
use PhpSpec\ObjectBehavior;
class CreateSpec extends ObjectBehavior
{
public function it_is_initializable()
{
$this->shouldHaveType(Create::clas... | true |
d05854cc0ed5d0575ce708965d36cae618d5149a | PHP | abdouStn/chemical-molecules | /src/ChemicalsBundle/Entity/Element.php | UTF-8 | 3,096 | 2.71875 | 3 | [] | no_license | <?php
namespace ChemicalsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Mapping\ClassMetadata;
//use Symfony\Component\Validator\Constraints as Assert;
/**
* Element from periodic table.
*
* @ORM\Table(name="chemicals_element")
* @ORM\Entity(repositoryClass="ChemicalsBundle\Repos... | true |
2d7c0373e8553afa3ef06b8194c8baae03c1ea7b | PHP | IBMS-Network/IBMS-Network | /classes/clsEmail.php | UTF-8 | 2,320 | 2.625 | 3 | [] | no_license | <?php
namespace classes;
use classes\core\clsCommon;
class clsEmail {
static private $instance = NULL;
public static function getInstance() {
if (self::$instance == NULL) {
self::$instance = new clsEmail();
}
return self::$instance;
}
public fun... | true |
a3a822a7b6c3a73d94fcbe460ce6c2d7e8cc9440 | PHP | hitomi4vv/aizu-online-judge | /introduction/ITP1_7_C-Spreadsheet.php | UTF-8 | 314 | 3.28125 | 3 | [] | no_license | <?php
list($r, $c) = explode(' ', trim(fgets(STDIN)));
$sum = array_fill(0, $c, 0);
for($i = 0; $i < $r; $i++) {
$line = trim(fgets(STDIN));
$arr = explode(' ', $line);
echo $line.' '.array_sum($arr).PHP_EOL;
foreach($arr as $j => $v) $sum[$j] += $v;
}
echo implode(' ', $sum).' '.array_sum($sum).PHP_EOL;
| true |
8a4f54322021c9fb8f47f5adb8d8551ef1e97a36 | PHP | MickDarkstar/jwt-REST-API | /includes/repositories/Base.repository.php | UTF-8 | 342 | 2.75 | 3 | [] | no_license | <?php
require_once('././DbPDO.php');
/**
* Base class for repositories
*
* @author Mikael Fehrm <micke@tempory.org>
* Version 2.0
*/
class BaseRepository
{
protected static $dbHandle;
public function __construct(PDO $pdo = null)
{
if ($pdo == null)
$this::$dbHandle = dbPDO::getInstance();
else... | true |
53b0e74c54b7c2e6758663925a071c177bdd61a6 | PHP | deltamc/MonsterCMS | /Modules/Widgets/Class/WidgetAbstract.php | UTF-8 | 4,954 | 2.65625 | 3 | [] | no_license | <?php namespace Monstercms\Modules\Widgets;
use Monstercms\Lib;
use Monstercms\Core;
abstract class WidgetAbstract
{
/**
* Экземпляр контроллера модуля Widget
* @var ControllerAbstract
*/
protected $widgets;
/**
* @var \Monstercms\Lib\DataBase
*/
protected $db;
/**
*... | true |
2c6efbf668e60d2a32c3f16f36cac9d9a32f1d74 | PHP | simplon-thomasn/exoHotels | /src/Domain/Hotel.php | UTF-8 | 949 | 3.078125 | 3 | [] | no_license | <?php
namespace exoHotels\Domain;
class Hotel
{
/**
* Hotel id.
*
* @var integer
*/
private $id;
/**
* Hotel name.
*
* @var string
*/
private $name;
/**
* Hotel address.
*
* @var string
*/
private $address;
/**
* Hotel cla... | true |
b2cd5bc16dae7b4d3bfccbe0caeb4a398ef0d598 | PHP | rohandalvi/dataQuality | /Sensor/Data.php | UTF-8 | 5,121 | 2.90625 | 3 | [] | no_license | <?php
include_once 'Accelerometer.php';
/*
* The MIT License
*
* Copyright 2014 rohandalvi.
*
* 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 lim... | true |
2bf904f2afc6f01f70879e0aae04e70a4ccd51b1 | PHP | jian0078/news-back-end | /news.php | UTF-8 | 702 | 2.859375 | 3 | [] | no_license | <?php
class news{
public function defaultMethod(){
$this->getMethod();
}
public function addMethod(){
echo "This is news class add method";
}
public function deleteMethod(){
echo "This is news class delete method";
}
public function updateMethod(){
echo "This is news class upda... | true |
d8ca21b7013909a5329106b439241830e380644d | PHP | psuhas/YMD | /Menu/Menu.php | UTF-8 | 3,279 | 2.609375 | 3 | [] | no_license | <?php
namespace YMD\Menu;
use \User;
use \Auth;
use \Module;
use \Log;
class Menu {
private $user;
public function __construct(User $user)
{
$this->user = $user;
}//__construct
public function getMenu()
{
//$data = $this->user->with('roles','roles.modules')->find(Auth::user(... | true |
04a45d899ea676f0e2cbc1fded819ab709d64312 | PHP | froilanenriquez3/Project2 | /broggi/app/Clases/Utilitat.php | UTF-8 | 1,339 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Clases;
use PhpParser\Builder\Class_;
class Utilitat
{
public static function errorMessage($exception)
{
if (!empty($exception->errorInfo[1])) {
switch ($exception->errorInfo[1]) {
case 1048:
$message = "No s'ha pogut actualitzar. Siusplau ompli tots els... | true |
fb5390cfa6f98aecbc6d06d4797a858a3ed7f040 | PHP | max-farver/Rumble-Ruckus | /rumbleRuckusLogin/app/Http/Controllers/RegistrationController.php | UTF-8 | 1,157 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use App\Mail\Welcome;
class RegistrationController extends Controller
{
//
public function __construct()
{
$this->middleware('guest');
}
public function create()
{
return view('registration.create... | true |
2ec11bb9ed5ca9e7fa26fc1a21649186c4a3a2a8 | PHP | yslproject/yslproject | /beans/ShopCar.php | UTF-8 | 359 | 3.140625 | 3 | [] | no_license | <?php
class ShopCar
{
public $userID;
public $goodID;
public $color;
public $count;
public $price;
function __construct($userID, $goodID, $color, $count, $price)
{
$this->userID = $userID;
$this->goodID = $goodID;
$this->color = $color;
$this->count = $count;... | true |
c67e9c1e9a971f8a75e8f0f2422ed0cfd65ac93b | PHP | ra66yte/exampleCrm | /system/ajax/addSite.php | UTF-8 | 5,730 | 2.53125 | 3 | [] | no_license | <?php
include_once '../core/begin.php';
if (isset($_GET['action']) and $_GET['action'] == 'submit' and $_SERVER['REQUEST_METHOD'] == 'POST') {
$success = $error = null;
$name = isset($_POST['name']) ? protection($_POST['name'], 'base') : null;
$url = isset($_POST['url']) ? protection($_POST['url'], 'ba... | true |
b91beeae2191294d1ba38a9ce71fdaa8ebe76993 | PHP | jjbier/cqrs-ddd-example | /applications/api/src/Infrastructure/Controller/ApiController.php | UTF-8 | 1,300 | 2.65625 | 3 | [] | no_license | <?php
namespace CodelyTv\Api\Infrastructure\Controller;
use CodelyTv\Api\Infrastructure\Exception\ApiExceptionsHttpStatusCodeMapping;
use CodelyTv\Infrastructure\Bus\Command\Command;
use CodelyTv\Infrastructure\Bus\Command\CommandBus;
use CodelyTv\Infrastructure\Bus\Query\Oracle;
use CodelyTv\Infrastructure\Bus\Query... | true |
472cd41ef3d5377136b408ddad0dcafd83ff989b | PHP | farhankapadia/WDLPracs | /Q25.php | UTF-8 | 229 | 2.671875 | 3 | [] | no_license | <?php
session_start();
if (isset($_SESSION['counter'])) {
$_SESSION['counter'] = $_SESSION['counter'] + 1;
} else {
$_SESSION['counter'] = 1;
}
echo "Page Views Count On This Session:" . $_SESSION['counter'];
?>
| true |
8d44d57ef8411302df5e8c25aae145e2f5a449da | PHP | rjsanchez23/Login-Register-Refactor-Practica | /src/ConsoleRegisterController.php | UTF-8 | 1,092 | 2.5625 | 3 | [] | no_license | <?php
require_once __DIR__.'/../vendor/autoload.php';
$sql_config = include(__DIR__ . '/../config/db_params.php');
$login_config = include(__DIR__ . '/../config/login_params.php');
use src\classes\exceptions\InvalidRequestMethodException;
use src\classes\storage\MysqlUserStorage;
use src\classes\UserRegisterUseCase;
... | true |
e33bf1ee78bbb92a6f6ac50b72e556c5bd65f2bc | PHP | razenjazzy/golpo | /chat/application/helpers/ecommerce_helper.php | UTF-8 | 12,064 | 2.640625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
if ( ! function_exists('mec_display_price'))
{
function mec_display_price($original_price=0, $sell_price=0, $currency_icon = '$',$retun_type='1',$currency_position='left',$decimal_point=0,$thousand_comma='0') //$retun_type=1 means price ... | true |
43093350ef7e6260adb153c80c87e1bb54e654b2 | PHP | scottx611x/csci-e71-term-project | /app-context/database/seeds/KeywordsTableSeeder.php | UTF-8 | 485 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Keyword;
class KeywordsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$keywords = ['new', 'internal', 'expensive', 'second hand', 'antique', 'electronic', 'furniture'];
fo... | true |
5ca4c3894e48855544f6f09e41a109322066232c | PHP | phacility/phabricator | /src/applications/drydock/storage/DrydockCommand.php | UTF-8 | 2,061 | 2.546875 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
final class DrydockCommand
extends DrydockDAO
implements PhabricatorPolicyInterface {
const COMMAND_RELEASE = 'release';
const COMMAND_RECLAIM = 'reclaim';
protected $authorPHID;
protected $targetPHID;
protected $command;
protected $isConsumed;
protected $properties = array();
private $com... | true |
632d0b51e0a250d2e9a8e864a35cb042076d774f | PHP | gogolinsky/backend | /modules/admin/controllers/EquipmentController.php | UTF-8 | 4,859 | 2.515625 | 3 | [] | no_license | <?php
namespace app\modules\admin\controllers;
use app\modules\admin\models\Services;
use Yii;
use app\modules\admin\models\Equipment;
use app\modules\admin\models\EquipmentSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\web\UploadedFile;
/**
* EquipmentControl... | true |
1ad126cb1f082eab57f5151973d7cfd23a377456 | PHP | maxyengine/jsFileManager | /src/server/src7.2/Http/Value/HttpMessage.php | UTF-8 | 4,073 | 3.078125 | 3 | [] | no_license | <?php
namespace Nrg\Http\Value;
/**
* Trait HttpMessage.
*
* HTTP message implementation.
*/
trait HttpMessage
{
/**
* HTTP protocol version.
*
* @var string
*/
private $protocolVersion = '1.1';
/**
* HTTP headers.
*
* @var array
*/
private $headers = [];
... | true |
c31029867e911d41926e5d9c139f3815ce873256 | PHP | drdplusinfo/attack-skeleton | /src/ArmamentsUsabilityMessages.php | UTF-8 | 3,507 | 3 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace DrdPlus\AttackSkeleton;
use Granam\Strict\Object\StrictObject;
class ArmamentsUsabilityMessages extends StrictObject
{
private array $messagesAbout = [];
private \DrdPlus\AttackSkeleton\PossibleArmaments $possibleArmaments;
public function __construct(PossibleArm... | true |
a00dd390f5a549fa0c3a6e78dec5bf50495048bd | PHP | 2br-dev/esayan_site | /modules/shop/model/discounts/abstractdiscount.inc.php | UTF-8 | 4,188 | 3.046875 | 3 | [] | no_license | <?php
/**
* ReadyScript (http://readyscript.ru)
*
* @copyright Copyright (c) ReadyScript lab. (http://readyscript.ru)
* @license http://readyscript.ru/licenseAgreement/
*/ declare (strict_types=1);
namespace Shop\Model\Discounts;
abstract class AbstractDiscount
{
const UNIT_PERCENT = 'percent'; // скидка в процен... | true |
a103952ac8a7707a1e3226398a608acb1bab8300 | PHP | svaj/wp-cli | /src/php/wp-cli/commands/internals/core.php | UTF-8 | 3,625 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
WP_CLI::addCommand('core', 'CoreCommand');
/**
* Implement core command
*
* @package wp-cli
* @subpackage commands/internals
*/
class CoreCommand extends WP_CLI_Command {
/**
* Display the WordPress version.
*/
public function version( $args = array(), $assoc_args = array() ) {
global $wp_version,... | true |
018f3b8089f75c354ed00fb14760becc7b7e044a | PHP | camilo86/TrakInBeta | /app/Meeting.php | UTF-8 | 756 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use DateTime;
class Meeting extends Model
{
protected $table = 'meetings';
protected $fillable = array('name', 'user_id', 'description', 'starting_date', 'ending_date');
public function getStartingDate()
{
return \Carbon\Carbon::createFro... | true |
d4b7b22ef00fc9c31a1bbe90e1d3609700136f53 | PHP | cothema/nlp-elements | /tests/Validator/Vowel.phpt | UTF-8 | 708 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Cothema\NLP\Test\Elements\Validator;
use Cothema\NLP\Elements\Validator\Vowel as Tested;
use Tester\Assert;
require_once __DIR__ . '/../bootstrap.php';
class Vowel extends \Tester\TestCase {
public function testValid() {
$valid = [
'a', 'E', 'i', 'o', 'U', 'Ě'
];
... | true |
e089c5e11a0013f3d9a48ab7e0dbfc564d8417ab | PHP | Phuyal-Limited/cordava-app | /phoneshop/app/controllers/ArticleController.php | UTF-8 | 6,089 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
class ArticleController extends BaseController{
public function postStore(){
$phones = Input::get('article');
foreach ($phones as $eachPhone) {
$validator = Validator::make($eachPhone,array(
'article_name' => 'required',
'manufacturer' => 'required',
'model' => 'required',
'im... | true |
a9e14ecfde9122d42e31f964c67beea7e73207bd | PHP | gmonseur/drupal-scan-version | /helpers/Debug.php | UTF-8 | 3,199 | 3 | 3 | [] | no_license | <?php
// ------------------------------------------------------------------------
/**
* Debug Helpers
*/
// ------------------------------------------------------------------------
/**
* Trace
*
* Retourne un print_r formaté
*
* @param array $array
*/
if (!function_exists('trace')) {
function trace($va... | true |
bd2d183caef304efbfcb15feb0307ffda9955dff | PHP | Magiwuan/SAS | /persona/Clases/clase_examen.php | UTF-8 | 5,081 | 2.703125 | 3 | [] | no_license | <?php
include_once("clase_mysql.php");
// Clase cargo hereda a clase CModeloDatos para conectar BD MYSql
class examen extends conectaBDMy{
private $idExamen;
private $tipoExamen;
private $descripcion;
// Metodo Constructor de la clase
public function examen(){
parent::conectaBDMy(); ... | true |
fb6636afd55d5db5e6279d56a9ab9885560fa24f | PHP | SamilAlp/flowerpower | /signup.php | UTF-8 | 3,550 | 2.859375 | 3 | [] | no_license | <?php
include 'classdatabase.php';
//var_dump($_POST);
if(isset($_POST['submit'])){
// instance van je database class
$fieldnames = array("voornaam", "achternaam","email", "geboortedatum", "username", "password");
$error = false;
foreach ($fieldnames as $fieldname) {
if (empty($_POST[$fieldname])) {
... | true |
178b7f30b80a3d2e591edf14d9cb6366495ad2b6 | PHP | shuymn-sandbox/study-php | /dotinstall/05.php | UTF-8 | 363 | 2.890625 | 3 | [] | no_license | <?php
// 定数
define("MY_EMAIL", "mail@example.com"); // 変数名は慣習的に大文字
echo MY_EMAIL;
// MY_EMAIL = "hoge"; これはエラー
// 自動的に定義される定数
var_dump(__LINE__); // このコードがあるのは何行目か
var_dump(__FILE__); // このファイルの名前は
var_dump(__DIR__); // このファイルはどこにあるか
| true |
09bf0b3f4b087d52bb6dcc7c236ea453fb2fa7c1 | PHP | m1g/php-basics | /class_constructor.php | UTF-8 | 296 | 3.21875 | 3 | [] | no_license | <?php
class Car {
// properties
var $wheels = 4;
var $hood = 1;
var $engine = 1;
var $doors = 4;
function __construct() {
$this -> wheels = 10; // $this is referencing the object and used within the class
}
}
$bmw = new Car();
$truck = new Car();
$semi = new Car();
?>
| true |
812887f2dce91490514cdd79ef880621e0846c6d | PHP | monsalvema/PSEPayment2 | /application/config/DbConnection.php | UTF-8 | 960 | 3.09375 | 3 | [] | no_license | <?php
/**
* Class DbConnection
*
* Clase para la conexión a la base de datos
*
* @author Jhonatan Alexis Monsalve Marín
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version 1.0
*/
class DbConnection
{
/**
* @var PDO
*/
static protected $_connection = null... | true |
edcad33b5612ea7b8cc7e203a04ee509dfb34ddf | PHP | Sheena-Marie/padua-test | /partials/table.php | UTF-8 | 1,580 | 3.453125 | 3 | [] | no_license | <?php
$handle = fopen($_FILES['filename']['tmp_name'], "r");
// Original example of this code had this as false, but as the question said that the CSVs would alwasy be correct, I've switched this to true to give the table a header.
$header = true;
// Creating a Header for the table.
if($header) {
$csvconten... | true |
cd612b1df7d62a0da823f3dbff6d7d5f066ad1fd | PHP | samleybrize/bugzorcist | /src/Bugzorcist/VarDump/Ncurses/NcursesHelp.php | UTF-8 | 11,825 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Bugzorcist.
*
* (c) Stephen Berquet <stephen.berquet@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Bugzorcist\VarDump\Ncurses;
use Bugzorcist\VarDump\VarDumpNcurses;
/**
*... | true |
1d0aa9d74f750a30340702c9e41337f7c5ea2b7a | PHP | cordoval/chamilo_phpperu | /common/extensions/video_conferencing_manager/php/video_conferencing_object_display.class.php | UTF-8 | 2,274 | 2.78125 | 3 | [] | no_license | <?php
namespace common\extensions\video_conferencing_manager;
use common\libraries\Utilities;
use common\libraries\Translation;
use common\libraries\DatetimeUtilities;
use common\libraries\PropertiesTable;
use common\libraries\Theme;
abstract class VideoConferencingObjectDisplay
{
/**
* @var VideoConfere... | true |
7bb369ef654b8427de571172cdb47c7750d56a6e | PHP | lixinleslee/weibo | /Application/Home/Model/FriendModel.class.php | UTF-8 | 6,026 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/7/30 0030
* Time: 17:00
*/
namespace Home\Model;
use Think\Model;
class FriendModel extends Model {
/**
* 查询待添加好友总数,全user表查询
* @return mixed
*/
public function getFriendCount(){
$sid = session('use... | true |
60bc7cb88deaba754f30367dc6f1ee161fff6174 | PHP | wbits/mastermind | /src/MasterMind.php | UTF-8 | 458 | 3.1875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Dojo;
final class MasterMind
{
private $secret;
private function __construct(Code $secret)
{
$this->secret = $secret;
}
public static function startGameWithSecret(string ...$colors): MasterMind
{
return new self(new Code(...$colors)... | true |
a8ef08f200d3f01ed0918853ba406b327a0a338f | PHP | WeareJH/m2-module-import | /src/Flag/PagingManager.php | UTF-8 | 1,027 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Jh\Import\Flag;
use Magento\Framework\FlagManager;
class PagingManager
{
private const PAGING_FLAG = 'import-page';
private ?string $flagSuffix;
private FlagManager $flagManager;
public function __construct(
FlagManager $flagManager,
?string... | true |
8d4c4c5e9c9b58865ad5374518b24617db4abbf0 | PHP | sujal2048/crossword | /code/src/Crossword/Features/Constructor/ConstructorFactory.php | UTF-8 | 1,069 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Crossword\Features\Constructor;
use App\Crossword\Features\Constructor\Figured\FiguredConstructor;
use App\Crossword\Features\Constructor\Normal\AttemptWordFinder;
use App\Crossword\Features\Constructor\Normal\NormalConstructor;
use App\Crossword\Features\Constructor\Scan... | true |
18f3d5f88c8145e401868438817d8df6863a52f6 | PHP | leirags/CI4-PDO-Firebird | /Firebird/Connection.php | UTF-8 | 15,812 | 2.546875 | 3 | [] | no_license | <?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014-2019 British Columbia Institute of Technology
* Copyright (c) 2019-2020 CodeIgniter Foundation
*
* Permission is hereby granted, free of charge,... | true |
d8413d1f7bfd33ac213789234ee061dc60437003 | PHP | rjha/website | /lib/com/indigloo/wb/mysql/WbConnection.php | UTF-8 | 1,660 | 2.71875 | 3 | [] | no_license | <?php
namespace com\indigloo\wb\mysql {
use \com\indigloo\Logger as Logger;
use \com\indigloo\Configuration as Config ;
use \com\indigloo\wb\Constants as AppConstants;
class WbConnection {
static private $instance = NULL;
private $mysqli ;
private function __constr... | true |
adf12d80a4d44a2b788a8d4662e6177f3a80111e | PHP | johncuervo24/EjPHP | /bodega2.0/Interface/ManejadorBaseDeDatosInterface.php | UTF-8 | 159 | 2.515625 | 3 | [] | no_license | <?php
interface ManejadorBaseDeDatosInterface {
public function conectar();
public function desconectar();
public function traerDatos(Sql $sql);
} | true |
d5e4b7f3c95b41a8c582c2d7c05fa66a3afb8a30 | PHP | decimalcc/slotegrator-test-php | /src/Core/Dal/DbType/AbstractEnum.php | UTF-8 | 2,996 | 3.03125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Src\Core\Dal\DbType;
use Doctrine\DBAL\Platforms\AbstractPlatform;
/**
* Class AbstractEnum
* @package Src\Core\Dal\DbType
*/
class AbstractEnum extends AbstractDbType implements EnumDbTypeInterface
{
/**
* @see https://dev.mysql.com/doc/refman/5.6/en/enum.html#en... | true |
5348f4eda2be801f6c8f2e7e762812fe5b8a1099 | PHP | AndersonYesidParra/Ejercicios_php_sena | /Ejercicio6.php | UTF-8 | 142 | 3.359375 | 3 | [] | no_license | <?php
//Realizar la tabla de multiplicar del 5
for($i=1; $i<=10; $i++){
$total = $i * 5;
echo $i. " * 5 = ". $total. "<br>";
}
?> | true |
13e53d05b7244c1b370486170df251eb38fb4e46 | PHP | D0pa/my_cinema | /Model/bdd.php | UTF-8 | 675 | 2.671875 | 3 | [] | no_license | <?php
class bdd
{
public function __construct($db_name = "epitech_tp", $db_host = "localhost", $db_user = "root", $db_pass = "root")
{
$this->db_name = $db_name;
$this->db_host = $db_host;
$this->db_user = $db_user;
$this->db_pass = $db_pass;
... | true |
6a4afcf5b8cec83ac5ec3d515bb6f2d238d4c4d1 | PHP | tchevalleraud/open-network-tools-old | /openConfig/Interfaces/Unit/Family/inet/Address/vrrpGroup.php | UTF-8 | 380 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace OpenNetworkTools\OpenConfig\Interfaces\Unit\Family\Inet\Address;
class vrrpGroup {
private $acceptData;
private $virtualAddress;
public function __construct(){
}
public function addVirtualAddress($address){
$this->virtualAddress... | true |
3dccfa2eb7230e2060d7bb20c78447eafef6441f | PHP | syedsaadh/curely-backend | /app/Http/Controllers/Admin/PatientsController.php | UTF-8 | 6,112 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\Patients;
use App\Models\Response;
use App\Models\PatientsMedicalHistory;
use Illuminate\Database\QueryException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class PatientsController extends Con... | true |
db74fda16282552930986c2081866c4c68e2758a | PHP | Tomoaki-Banno/local | /15i/.svn/pristine/56/56fd90339d6feb1ae6b9071c26b647472d702cef.svn-base | UTF-8 | 4,252 | 2.578125 | 3 | [] | no_license | <?php
class Master_Equip_Model extends Base_ModelBase
{
var $csvUpdateMode = false;
protected function _getKeyColumn()
{
return 'equip_id';
}
protected function _setDefault(&$param, $entryMode)
{
global $gen_db;
// 上書きモードの処理 (csv & excel)
if ($this->csvUpdate... | true |
3d3f58f830a9b2e70756f2bb9fa8a86990f7ebda | PHP | KorvinM/felipe | /content/async-await.php | UTF-8 | 14,757 | 2.9375 | 3 | [] | no_license | <?php //async-await.php
?>
<article id="async-await">
<header>
<h1>Async-await</h1>
</header>
<div class="article-content" style="">
<p style="">Often in web development, we need to handle asynchronous actions— actions we can wait on while moving on to other tasks. We make requests to networks, databases... | true |
866ed59ebbf158a575a635946c8a77b3ed79126e | PHP | KIMEUIJOON/workspace | /web/application/models/newsletter_model.php | UTF-8 | 2,716 | 2.734375 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Newsletter_Model extends MY_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
}
/*
* 追加
*/
public function add($shop_id, $name, $email, $token)
{
$data = array( 'shop_id' => (int)$s... | true |
4e614cd07ae714bc34dce7ad028c763078d30764 | PHP | merbauraya/teratai | /models/FoodCategory.php | UTF-8 | 962 | 2.625 | 3 | [] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "food_category".
*
* @property int $categoryId
* @property string $categoryName
*
* @property Food[] $foods
*/
class FoodCategory extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableNam... | true |
1e9c7d0569706d4362c7bcfec0669690ad2bf003 | PHP | droplister/digirare.com | /app/Http/Controllers/TelegramController.php | UTF-8 | 2,567 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Telegram\Bot\Api;
use ChatbaseAPI\Chatbase;
class TelegramController extends Controller
{
/**
* Telegram
*
* @var \Telegram\Bot\Api
*/
protected $telegram;
/**
* BotController constructor.
*
* @param \Telegram\Bot\Api $telegra... | true |
1009b61ea5f17dd459ff0aa2c9686064ec644750 | PHP | LeVuThanhAn/thanhan | /28-8-2019/bt5.php | UTF-8 | 1,084 | 2.5625 | 3 | [] | no_license | <?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body style="display: flex;">
<div>
<?php include '../Chung/menuleft.php'; ?>
</div>
<div>
<?php if (isset($_SESSION["user"])) {
echo "<h2>xin chào bạn ".$_SESSION["user"]."</h2>";
include '../Chung/checkrole.php'; echo "|";
in... | true |
2726c4ce3798fbdd18c76e009f3ba498dbcc885b | PHP | vovchello/mvc | /Core/Session.php | UTF-8 | 839 | 3.09375 | 3 | [] | no_license | <?php
namespace Core;
class Session
{
/**
* @var
*/
private static $instance;
/**
* Session constructor.
*/
private function __construct()
{
//
}
/**
*
*/
private function __clone()
{
//
}
/**
* @return Session
*/
... | true |
ab25b52c7b90a4d2309ff20ab5b6360281fb74a9 | PHP | giovanyrosales/urbano | /app/Http/Controllers/ExpedienteController.php | UTF-8 | 4,787 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Estado;
use Illuminate\Http\Request;
use App\Expediente;
use App\Procesos;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\DB;
use Carbon\Carbon;
class ExpedienteController extends Controller
{
// vista index
public function index(){
... | true |
06ffbc2f0f8165dac45e976b44ef364eb6a02772 | PHP | aquamme/php-sdk | /src/lib/Actors/Generators/ExistingOnly.php | UTF-8 | 1,702 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Dapr\Actors\Generators;
use Dapr\Actors\IActor;
use DI\DependencyException;
use DI\FactoryInterface;
use DI\NotFoundException;
use JetBrains\PhpStorm\Pure;
use LogicException;
use Nette\PhpGenerator\Method;
use Psr\Container\ContainerInterface;
/**
* Class ExistingOnly
*
* Only allows existing pro... | true |
b20782d3af199257727de94249afdfbb1aa44751 | PHP | wannyin/CS2300 | /project3/detail.php | UTF-8 | 2,393 | 2.59375 | 3 | [] | no_license | <?php include('script/header.php'); ?>
<div class = "container">
<div class = "row content"></div>
<?php
require_once 'script/config.php';
$mysqli = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if ($mysqli->errno) {
print($mysqli->error);
exit();
}
echo "<div class = 'row ... | true |
650ba633fcfd9f50aad7e83d95331cdc8d90576a | PHP | Tastai44/Social_media | /Backend/database.php | UTF-8 | 9,539 | 2.765625 | 3 | [] | no_license | <?php
$host = 'localhost';
$user = 'Tastai';
$password = '253741Thai';
$database = 'Social_medaia';
$conn = new mysqli(
$host,
$user,
$password
);
if($conn->connect_error){
die("Connection error: " . $conn->connect_error);
}
//// DAT... | true |
ad41e4c84a61a650ee77b6e51329f3f378e37044 | PHP | ilhaaam/pw-web | /app/Http/Middleware/SetLanguage.php | UTF-8 | 825 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Auth;
class SetLanguage
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public fun... | true |
239f85c8190e1d0e3f4684f5487cb1c82f4003d4 | PHP | zaccaria-ziani/Runtrack2 | /Jour03/job03/index.php | UTF-8 | 323 | 3.109375 | 3 | [] | no_license | <?php
$str = "I'm sorry Dave I'm afraid I can't
do that";
$voyelles = array ("a", "e", "i", "o", "u", "y", "A", "E", "I", "O", "U", "Y");
$i = 0 ;
while ( $i <=41 )
{$l = 0;
while ($l <=11){
if($voyelles[$l]==$str[$i])
{
echo $str[$i];
}
$l = $l+1;
}
$i = $i + 1 ;
}
... | true |
6667dc6eed88bae9952c7f2a23657c225c335860 | PHP | Zioq/Perfume_Warehouse_Status_Bar | /inc/Diptyque.class.php | UTF-8 | 159 | 2.6875 | 3 | [] | no_license | <?php
class Diptyque extends Perfume {
private $_type = "Dip tyque";
function getType():string {
return $this->type = $_type;
}
}
?> | true |
e04398020ce22b47be6c24e3757c32c43f8f5bad | PHP | tectronics/mlm-markedd | /spherus_framework/spanel/classes/DBGenerator.php | UTF-8 | 986 | 3 | 3 | [] | no_license | <?php
/**
* Strored procedures generator
*/
class DBGenerator
{
public $engine;
/**
* Class conctructor
*
*/
function __construct()
{
global $object;
$driver = $object->config->db_config_default[driver];
include_once(SPANEL.SEPARATOR."classes".SEPARATOR.$driver."Gener... | true |
1581f3a0813f20bf1f06128e0b5d3f1e6df75517 | PHP | cbolk/aikikaimilano-website | /admin/class.aikidoka.php | UTF-8 | 19,883 | 2.734375 | 3 | [] | no_license | <?php
class aikidoka {
var $id;
var $firstname;
var $lastname;
var $rank;
var $yudansha;
var $beginner;
var $youngster;
var $exams = array();
var $lastexam;
var $hoursfromexam;
var $enrolled;
var $active;
function get($dbconn, $aid){
$query = "SELECT * from aikidoka where id="... | true |
ce73d0ea163fc88de02381ccbd569d5313f43aed | PHP | muzik-online/esafe-php-sdk | /src/Foundation/Validation.php | UTF-8 | 516 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Muzik\EsafeSdk\Foundation;
use Muzik\EsafeSdk\Exceptions\HandlerException;
trait Validation
{
protected function validate()
{
if (!isset($this->parameters['ChkValue'])) {
throw new HandlerException('Missing "ChkValue" parameter from response.');
}
if ($thi... | true |
96c01084f7aa9ae9ae5eb94cd65bf110e509e2f9 | PHP | vdganapathy/Contactms | /app/Controller/MarkController.php | UTF-8 | 1,187 | 2.515625 | 3 | [] | no_license | <?php
class MarkController extends AppController
{
public function index()
{
$this -> autoRender = false;
$jsonasso = json_decode($_POST["jsondata"], true);
print_r($jsonasso);
echo 'first='.$jsonasso[0];
$servername = "localhost";
$username = "root";
$passwor... | true |
3e979d2606aa8f9cb8aac9b992aab2f5447ba648 | PHP | andrew-svirin/sweetmebliv.com.ua | /src/backend/form-handler.php | UTF-8 | 3,179 | 2.734375 | 3 | [] | no_license | <?php
try {
setupEnv();
processForms($_POST);
} catch (Exception $exception) {
writeLog($exception->getMessage());
}
/**
* @throws Exception
*/
function setupEnv()
{
$envPath = '../../.env';
if (!is_file($envPath)) {
throw new Exception('Not found .env file.');
}
... | true |
bcbfbcff1502dda5e1598e27b4c8f2e67fa33e69 | PHP | digitalbiblesociety/dbp | /app/Models/Country/CountryLanguage.php | UTF-8 | 1,837 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Country;
use Illuminate\Database\Eloquent\Model;
use App\Models\Language\Language;
/**
* App\Models\Country\CountryLanguage
*
* @OA\Schema (
* type="object",
* description="Country Language",
* title="Country Language",
* @OA\Xml(name="CountryLanguage")
* )
*
* @p... | true |
219d67500c2e1132a2e4fb586a76f23c820dd524 | PHP | andresusanto/pplforbandung | /10ukm/testarea/tesmysql.php | UTF-8 | 607 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
$con=mysqli_connect("localhost","root","","ruserba");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
// Create database
$sql = "CREATE TABLE user
(
username CHAR(50),
PRIMARY KEY(username),
nama CHAR(50),
nohp CHAR(50),
alamat CHAR(50),
p... | true |
beb799c991814f1784c594ec6808b9a79ad2bcfa | PHP | qrooel/arscreo | /protected/models/Page.php | UTF-8 | 4,317 | 2.71875 | 3 | [] | no_license | <?php
/**
* This is the model class for table "pages".
*
* The followings are the available columns in table 'pages':
* @property integer $id
* @property string $header
* @property string $content
* @property string $seo_title
* @property string $seo_keywords
* @property string $seo_description
* @property s... | true |
f075ae722e6a28fea0e84f269a1d0c1e5c704ecc | PHP | kakapa/goforex | /app/Http/Middleware/Profile.php | UTF-8 | 1,156 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use App\Notification;
use Closure;
use Auth;
use Session;
class Profile
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure ... | true |
cf4d1d867116cba9eaec4caac04e911db37e02ca | PHP | mariosimao/notion-sdk-php | /src/Databases/Properties/RichTextProperty.php | UTF-8 | 1,066 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Notion\Databases\Properties;
/**
* @psalm-type RichTextJson = array{
* id: string,
* name: string,
* type: "rich_text",
* rich_text: array<empty, empty>,
* }
*
* @psalm-immutable
*/
class RichTextProperty implements PropertyInterface
{
private function __construct(
... | true |
b1eb3c426931f8b99807122b648cfda1f9316ac1 | PHP | MaartenGDev/FastHttp | /app/Core/Http/Templating/View.php | UTF-8 | 965 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Core\Http\Templating;
use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;
use Twig_Environment;
use Twig_Loader_Filesystem;
class View
{
protected $template;
protected $parameters;
public function __construct($template,$parameters = array()){
$this->... | true |
cbc2900cdcdfea9f4a24b8ff7f2e09fdfe2fd567 | PHP | Unudus/Validator | /testing/index.php | UTF-8 | 4,284 | 2.84375 | 3 | [] | no_license | <?php
require_once __DIR__.'/../vendor/autoload.php'; // assumes 'vendor/' is parallel to the test folder.
use Unudus\Validator\Validators\ValidateEmail;
use Unudus\Validator\Validators\ValidateStringLength;
use Unudus\Validator\Validators\ValidateURL;
use Unudus\Validator\Validators\ValidateCountryCode;
... | true |
40e4ca9379601d96bd3ca268cbaac3a0ce35f3a7 | PHP | ellocode/customcertificates | /classes/certificate_info.php | UTF-8 | 2,093 | 2.65625 | 3 | [] | no_license | <?php
// Standard GPL and phpdocs
namespace block_customcertificates;
use moodle_url;
use context_system;
use DateTime;
class certificate_info
{
var $id;
public $front_image;
public $verse_image;
public $issue_date;
var $print;
public function __construct($certificateid, $print)
{
... | true |
1f8c919b3486eab408a44ee39ba67da4b236cb66 | PHP | Bilge/Steam-250-promo | /src/SteamApp/PrimaryTagChooser.php | UTF-8 | 844 | 2.796875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace ScriptFUSION\Steam250\SiteGenerator\SteamApp;
use ScriptFUSION\StaticClass;
/**
* Chooses the primary tag from a list of tags based on tag order and a blacklist.
*/
final class PrimaryTagChooser
{
use StaticClass;
private const BLACKLIST = [
'Early Access',... | true |
807d877e588273a3fa0ad6a934606e3eab85866e | PHP | nychka/php-template-validator | /task.php | UTF-8 | 1,614 | 2.859375 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
use Epam\Rules;
use Epam\Validator;
/**
* Create validation component that will be able to validate:
* - associative arrays
* - std objects
* - objects (you can use https://github.com/symfony/property-access to access properties by calling getters)
*
* While developing, pleas... | true |
8dbccde5f7241cf408795e8a3d85b43ee9993791 | PHP | Cristu39/daw.m07.uf4.VideoClub | /app/Http/Controllers/APICatalogController.php | UTF-8 | 3,237 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Movie;
class APICatalogController extends Controller {
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index() {
return response()->json(Movie::all());
... | true |
d1a0138933a1179c46154ce292b34fa02ad16c9a | PHP | austrianalex/CPLAGrader | /application/models/UserTests.php | UTF-8 | 2,176 | 2.90625 | 3 | [] | no_license | <?php
class Application_Model_UserTests
{
protected $_user_id;
protected $_test1;
protected $_test2;
protected $_retake1;
protected $_retake2;
public function __construct(array $options=null)
{
if (is_array($options))
{
$this->setOptions($options);
}
... | true |
1a4c2f6cab83809fb264d520610aee48a37ed7ab | PHP | loophp/collection | /tests/static-analysis/reject.php | UTF-8 | 2,224 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
include __DIR__ . '/../../vendor/autoload.php';
use loophp\collection\Collection;
use loophp\collection\Contract\Collection as CollectionInterface;
/**
* @psalm-param CollectionInterface<int<0, 2>, 1|2|3> $collection
*
* @phpstan-param CollectionInterface<int, int> $collection
*/
... | true |
3aa7185cbdbc969625f9502414a8d31941cb7ecf | PHP | Arma24/namespace | /contoh2.php | UTF-8 | 294 | 3.125 | 3 | [] | no_license | <?php
namespace Lama;
class Vario{
public function index()
{
return 'Vario Lama';
}
}
namespace Baru;
class Vario
{
public function index()
{
return 'Vario Baru';
}
}
$lama = new \Lama\Vario;
echo $lama->index();
echo '<br>';
$baru = new \Baru\Vario;
echo $baru->index();
?> | true |
13d5ffd0b5206a8110fcaf0cac6c1e1aaad366e1 | PHP | cqingt/jingpai | /question/model/message.class.php | UTF-8 | 7,920 | 2.703125 | 3 | [] | no_license | <?php
!defined('IN_ASK2') && exit('Access Denied');
class messagemodel {
var $db;
var $base;
function messagemodel(&$base) {
$this->base = $base;
$this->db = $base->db;
}
/* 读取一条消息内容 */
function get($id) {
$message = $this->db->fetch_first('SELECT * FROM ' . DB_TABL... | true |
811dad08b0f7b0598790df9ead628202863d2b47 | PHP | Ivanzgj/HealthCare_PHP | /FileReceiver.php | UTF-8 | 1,962 | 3.046875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Ivan
* Date: 2016/4/23
* Time: 14:14
*/
class FileReceiver {
/**
* 接收文件
* @param $fileName string 上传的文件名
* @param $location string 保存位置文件夹路径
* @param $rename string 保存文件名,默认为null,表示不重命名
* @param $cover boolean 若相同名字的文件存在时是否覆盖原文件,默认为true
* ... | true |
9c0a5b784c61c555ccab4f960f935ced141ffdc9 | PHP | hellseyfer/RegistrationForm-with-realTime-validations | /application/models/User_model.php | UTF-8 | 1,002 | 2.828125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class User_model extends CI_Model {
// get username from database
public function getUsername($username)
{
// find the username matched with the input
$this->db->where('username' , $username);
$query = $this->db->get('users');
// ch... | true |
e7204c7fbe771abbd15f06fc9cbd49e871bf4c30 | PHP | logisp/server | /app/Http/Middleware/Auth.php | UTF-8 | 1,499 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use JWT;
use Auth as AuthService;
use Closure;
use App\Domain\Facades\Users;
use App\Domain\Facades\Admins;
class Auth
{
public function handle($request, Closure $next, $system = null, $role = null)
{
$token = request()->header('authorization');
$payload = JWT::decode($toke... | true |
a9a4b1d16595ec8a5d0c9973760bc891165dfc12 | PHP | yanhuixie/yii2-file-kit | /src/events/StorageEvent.php | UTF-8 | 570 | 2.578125 | 3 | [] | no_license | <?php
namespace trntv\filekit\events;
use yii\base\Event;
/**
* Class StorageEvent
* @package trntv\filekit\events
* @author Eugene Terentev <eugene@terentev.net>
*/
class StorageEvent extends Event
{
/**
* @var \League\Flysystem\FilesystemInterface
*/
public $filesystem;
/**
* @var st... | true |
9b6cdf0165ca7824f0b270af3dcd0bd4c0afec67 | PHP | stevenwat/BusinessAnalysisTool | /inventoryAnaylsis.php | UTF-8 | 5,333 | 2.609375 | 3 | [] | no_license | <?php
try{
//grabInventoryTotals
$inventoryDataPoints = array();
$inventoryData = array();
$database = new Database();
$db = $database->getConnection();
$inventory_totals = new InventoryTotals($db);
$stmt_inventory_totals = $inventory_totals->grabInventoryTotals();
while ($row = $stmt_inventor... | true |
8dce3581d8a79f0e19545049231c51e2513d8cca | PHP | bylickilabs/opg-core-public-domain-model | /src/Opg/Core/Model/Entity/Document/Decorators/HasAssetLog.php | UTF-8 | 782 | 2.53125 | 3 | [
"LicenseRef-scancode-public-domain"
] | permissive | <?php
namespace Opg\Core\Model\Entity\Document\Decorators;
use Doctrine\Common\Collections\ArrayCollection;
use Opg\Core\Model\Entity\LineItem\LineItem;
interface HasAssetLog
{
/**
* @return ArrayCollection
*/
public function getAssets();
/**
* @param LineItem $lineItem
* @return HasA... | true |
a9eac4f6f2fcf6e77605a3d8a4ce112ffbb17c98 | PHP | Ch0wW/xiii-weblist | /web/include/gsQuery.php | UTF-8 | 13,503 | 2.71875 | 3 | [] | no_license | <?php
/*
* gsQuery - Querys game servers
* Copyright (c) 2002-2004 Jeremias Reith <jr@terragate.net>
* http://www.gsquery.org
*
* This file is part of the gsQuery library.
*
* The gsQuery library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public... | true |
9dfcdc4708f3b8af4feebb270bacb3e24a66c28b | PHP | jacobcyl/laravel-messenger | /src/Events/PushNotification.php | UTF-8 | 1,201 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Jacobcyl\Messenger\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Support\Facades\Log;
/**
* Class PushNotification
* @package App\Events
*/
class PushNotification extends Event implements ShouldBroadcast
{... | true |
7601158d41813cb02ae8b7a1a0e510a3cc737cc8 | PHP | danielnegoita/code-sample | /Application/Vehicle/Command/VehicleCommand.php | UTF-8 | 1,273 | 3.015625 | 3 | [] | no_license | <?php
namespace Fleet\Application\Vehicle\Command;
abstract class VehicleCommand
{
private string $tenantId;
private string $make;
private string $model;
private ?string $registrationPlate;
private ?string $manufacturedAt;
private ?string $type;
public function __construct(
s... | true |