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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
940c37fdf11dccd578e562bcda4b64125cc438cd | PHP | anpoltanov/pizza-backend-api | /src/Security/OrderVoter.php | UTF-8 | 2,318 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Security;
use App\Entity\Order;
use App\Entity\User;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* Class OrderVoter
* @package App\Security
*/
class OrderVoter extends Vote... | true |
af49e0b70f2a014444444d46944134ee6bd54b47 | PHP | jbaikge/framework-tests | /template/templates/test.html.php | UTF-8 | 106 | 3.046875 | 3 | [] | no_license | Value of $a: <?php echo $a; ?><br>
Value of $b: <?php echo $b; ?><br>
Value of $c: <?php echo $c; ?><br>
| true |
17226045a94e95872086371adf120b51336f6598 | PHP | kamolpop/servicecaller | /src/Serviceapp/Serviceapp/SRequest.php | UTF-8 | 1,737 | 2.734375 | 3 | [] | no_license | <?php
namespace Serviceapp\Serviceapp;
use Serviceapp\Serviceapp\CURL;
use Serviceapp\Serviceapp\ErrorResponse;
class SRequest {
private $err_code ;
private $err_no;
private $reqTime;
private $authTime;
private $raw;
public function __construct() {
}
public function send( $url , $method , $input = array() , ... | true |
0540381e3311fbe1f0fce1a967d0570a6e3b437f | PHP | liveink/Superglue | /sgAutoloader.class.php | UTF-8 | 2,933 | 2.65625 | 3 | [] | no_license | <?php
require(dirname(__FILE__) . '/sgFilteredDirectoryIterator.class.php');
class sgAutoloader
{
private static $instance;
private static $_paths = array();
private static $_exclusions = array();
private static $_cache = array();
private static $isCached = false;
public function __construct()
{
... | true |
5a0d7ddc13dc6efbf601e49c02e055f27d3bf3a3 | PHP | Noudea/PHP_Framework_MVC | /Core/Model.php | UTF-8 | 934 | 2.84375 | 3 | [] | no_license | <?php
Namespace Core;
use PDO;
use App\config;
use PDOException;
class Model
{
/**
* créer la connection a la base de donnée
*/
protected static function getDB()
{
static $db = null;
if($db === null)
{
try
{
$d... | true |
3fdad97ff4e13fa6e4ba957df872c5e691346172 | PHP | mostaphaelarfaoui/Gestion-des-produits-php-oop-mvc- | /controllers/CategorieController.php | UTF-8 | 2,308 | 2.625 | 3 | [] | no_license | <?php
class CategoriesController{
public function getAllCategories(){
$employes = Categorie::getAll();
return $employes;
}
public function getOnCategorie(){
if(isset($_POST['id'])){
$data = array(
'id'=>$_POST['id']
);
}
$empl... | true |
56cfd61a264ed1727206061e5f69d2843e32b7dd | PHP | rubyqorn/atomic-mailing | /core/Server/local/LocalConnection.php | UTF-8 | 1,104 | 3.046875 | 3 | [] | no_license | <?php
namespace Atomic\Core\Server\Local;
use Atomic\Core\Server\Interfaces\ConnectionSetter;
class LocalConnection implements ConnectionSetter
{
/**
* Local server settings
*
* @var array
*/
private $settings = [];
/**
* Command which will be execute
* in CLI
*
... | true |
ace09aae3b10fd5a71f0ba5f30f5161f7aa4a95f | PHP | AleksandrMishchaniuk/ads-app-laravel | /app/Models/User.php | UTF-8 | 1,070 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Entities\Interfaces\UserEntityInterface;
class User extends Authenticatable implements UserEntityInterface
{
const ATTR_ID = 'id';
const ATTR_USERNAME = 'username';
const ATTR_PASSWORD = 'password';
const ATTR... | true |
6b25b93619e9e8ddcd08b31c0ad23b73cc4383c7 | PHP | kostin-cn/ArtGallery | /common/entities/Colors.php | UTF-8 | 1,717 | 2.59375 | 3 | [] | no_license | <?php
namespace common\entities;
use Yii;
use \yii\db\ActiveRecord;
use backend\components\SortableBehavior;
/**
* This is the model class for table "{{%colors}}".
*
* @property int $id
* @property string $title_ru
* @property string $title_en
* @property int $sort
*
* @property ProductColors[] $productColor... | true |
519dcb46279e9ea92d3e9a6ab2ce63ccf2dbf940 | PHP | hurley1221/c9test | /quiz.php | UTF-8 | 762 | 3 | 3 | [] | no_license | <html>
<head>
<title>Quiz</title>
</head>
<body>
<h1>Quiz</h1>
<?php
$host = "127.0.0.1";
$user = "hurleym2";
$pass = "";
$db = "theta";
$connection = mysqli_connect($host, $user, $pass, $db);
if(!$connection) {
die("Connection Failed: " . mysqli_connect_errno());
}
$sql = "SELECT * FROM quiz";
$resul... | true |
113ed8716b4fd7160dae21d1a3ae07970d73c8a0 | PHP | t3mp0ralflux/CSC465 | /CoffeeSite/Coffee.php | UTF-8 | 3,933 | 2.59375 | 3 | [] | no_license | <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
require('includes/CoffeeModel.php');
if(isset($_POST['types'])){
$coffeeTables = CreateCoffeeTables($_POST['types']);
}else{
$coffeeTables = CreateCoffeeTables('%');
}
$content = CreateCoffeeDropdownList().$coffeeTables;
function CreateCoffe... | true |
49f7dbc2e1aab2feb43a96b008fcff3e390beb5e | PHP | BluRay/eduline | /apps/classroom/Common/common.php | UTF-8 | 15,079 | 2.734375 | 3 | [] | no_license | <?php
/**
* 根据专辑ID获取名称
*/
function getAlbumNameForID($vid) {
static $names = array();
if (!isset($names[$vid])) {
$names[$vid] = D('ZyAlbum')->where(array('id' => $vid))->getField('album_title');
}
return $names[$vid];
}
/**
* 根据课程ID获取名称
*/
function getVideoNameForID($vid) ... | true |
6ddd449fcf0f94db3512e1f13957327baeaaf099 | PHP | bidesh/chapi | /src/Service/JobValidator/PropertyValidator/JobName.php | UTF-8 | 1,089 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package: chapi
*
* @author: msiebeneicher
* @since: 2016-11-10
*
*/
namespace Chapi\Service\JobValidator\PropertyValidator;
use Chapi\Entity\Chronos\JobEntity;
use Chapi\Entity\JobEntityInterface;
use Chapi\Service\JobValidator\PropertyValidatorInterface;
class JobName extends AbstractProperty... | true |
b784b1f185dab1fa1c50451f38af6bf417ca2062 | PHP | Ryuno-Ki/Wicked-outer-World | /source/lib/technology.php | UTF-8 | 16,758 | 2.859375 | 3 | [] | no_license | <?php
/**
* Handles Technology.
*/
class Technology extends AccountSubclass {
const TYPE_STOCKAGE = 0; // Item stockage
const TYPE_STARSHIP = 1; // Starships
const TYPE_WEAPON = 2; // Weapons
const TYPE_AMMUNITION = 3; // Ammunition
const TYPE_MINING_MODULE = 4; // Equipment
const TYPE_CAPACI... | true |
7a53e45d37e04a2a5e9d2d2b1a94a71f7a6faab8 | PHP | rhythmk/phpunit-demo | /Test/demo2/MultipleDependenciesTest.php | UTF-8 | 617 | 2.53125 | 3 | [] | no_license | <?php
/**
* Date: 2019/8/17
* Time: 7:57
*/
namespace rhythmk\test\demo2;
use PHPUnit\Framework\TestCase;
/**
* Class MultipleDependenciesTest
* @package demo2
*
*
*/
class MultipleDependenciesTest extends TestCase
{
public function testFirst()
{
$this->assertTrue(true);
return "tes... | true |
b753e5c59392c89f4d1d9c6cf078d0b94560978a | PHP | NadaElnagar/chefaa_task | /app/Http/Controllers/PharmaciesProductsControllers.php | UTF-8 | 2,742 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Requests\PharmaciesProductsRequest;
use App\Http\Services\PharmaciesProductsServices;
use Illuminate\Support\Facades\Redirect;
class PharmaciesProductsControllers extends Controller
{
public function __construct()
{
$this->pharmacies = new Pharmac... | true |
c155974bea8da9d3a3d50501dc275732339aef67 | PHP | dizatech/pacman | /src/Console/Commands/BaseFacadeCommand.php | UTF-8 | 3,839 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Dizatech\Pacman\Console\Commands;
use Illuminate\Console\GeneratorCommand;
use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Exception\InvalidArgumentException;
use Illuminate\Support\Facades\File;
use Symfony\Component\Console\Input\InputOpti... | true |
fb7446e9fa099846102a2b9e6b154914a4de3920 | PHP | antiskov/redlab_test | /database/factories/WorkerFactory.php | UTF-8 | 769 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Factories;
use App\Models\Worker;
use Illuminate\Database\Eloquent\Factories\Factory;
class WorkerFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Worker::class;
/**
* Define the model's... | true |
1acd6632eed4173f0d05de0a764184de71d85186 | PHP | MCA-99/Ulver | /web/Ranking/index.php | UTF-8 | 1,138 | 3.0625 | 3 | [] | no_license | <?php
try {
$hostname = "172.17.0.1";
$dbname = "db";
$username = "admin";
$pw = "admin";
$pdo = new PDO ("mysql:host=$hostname;dbname=$dbname","$username","$pw");
} catch (PDOException $e) {
echo "Failed to get DB handle: " . $e->getMessage() . "\n";
... | true |
f4d38bec88a5addff8d0833458407c661f9e186b | PHP | fredclaymeyer/wpshout-js-cookie-demo | /wpshout-js-cookie-demo.php | UTF-8 | 1,612 | 2.625 | 3 | [] | no_license | <?php
/*
Plugin Name: WPShout JS Cookie Demo
Description: A demo of JS session cookies in a WordPress environment.
Author: WPShout
Author URI: http://wpshout.com
*/
/*
* Setting and retrieving cookie
*/
add_action( 'wp_enqueue_scripts', 'wpshout_cookie_scripts' );
function wpshout_cookie_scripts() {
wp_enqueue_script... | true |
194cb1cda620b73a4ce4f69016bb9f929eb92901 | PHP | dgierejkiewicz/design_patterns_php_examples | /Event/LogCallback.php | UTF-8 | 181 | 2.828125 | 3 | [] | no_license | <?php
namespace DesignPatterns\Event;
class LogCallback
{
public function __invoke($data)
{
echo 'Zarejestrowane dane' . PHP_EOL;
var_dump($data);
}
}
| true |
a067590b16fb271c05d3dbef3d4523697030911b | PHP | rjmchi/webcal | /calendar.php | UTF-8 | 2,193 | 2.9375 | 3 | [] | no_license | <?php
function DisplayCalendar($date)
{
include ("gconnect.php");
$month_num = $date["mon"];
$year = $date["year"];
$sql = "SELECT distinct month, day, year from calendar where month = $month_num and year = $year ORDER BY year, month, day";
$result = mysql_query($sql, $db) or die ("Invalid query");
$events = true;
... | true |
61b4a35be98638d56bcf7c7be4a6d10678018dfb | PHP | SprayDev/RealHunter | /database/migrations/2021_01_04_164915_create_hunting_seasons_table.php | UTF-8 | 883 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateHuntingSeasonsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('hunting_... | true |
5240a007935bd92a9be3f9ca66a4d0e9561c65a3 | PHP | lcalderon-cyberfuel/frameworks | /framework17/lib/db_sqlserver.inc.php | UTF-8 | 2,029 | 2.71875 | 3 | [] | no_license | <?php
// Conexión con la base de datos
if(!@mssql_connect(CONFIG_DATABASE_HOST.','.CONFIG_DATABASE_PORT,CONFIG_DATABASE_USER,CONFIG_DATABASE_PASS)){
echo $tag_error_inicio."No hay conexión con la base de datos: ".mssql_error().$tag_error_final;
exit;
}
// Seleccionando la base de datos
if(!@mssql_select_db... | true |
6d393be72be57b8d15319acacce4a1385ae8f888 | PHP | ymihaylov/php-task | /index.php | UTF-8 | 1,318 | 2.78125 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
use \LessQL\Database;
use App\Checkout;
use App\ProductPrice;
use App\ProductDiscount;
// -------- Pricing Rules Static
$pricingRules = [
'A' => new ProductPrice(50, [new ProductDiscount(3, 20), new ProductDiscount(10, 100)]),
'B' => new ProductPrice(30, new ProductDisc... | true |
1896c1939984e71c98b9de9f7b4935b4e446c501 | PHP | lezhnev74/demo-prooph-laravel | /app/Component/Account/Event/AccountCreated.php | UTF-8 | 492 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Components\Account\Events;
use App\Component\Foundation\MessageBus\SerializableMessage;
class AccountCreated extends SerializableMessage
{
public function __construct(int $id, string $email)
{
parent::__construct([
'id' => $id,
'email' => $email,
])... | true |
0833dfc107d714b2937d143462e2a1f4f333dcce | PHP | mmtou/cms | /IRS1.0_WebApplication/library/Streamwide/Media/Joiner/Cat.php | UTF-8 | 1,542 | 2.828125 | 3 | [] | no_license | <?php
/**
* StreamWIDE Framework
*
* $Rev: 2608 $
* $LastChangedDate: 2010-05-18 10:01:35 +0800 (Tue, 18 May 2010) $
* $LastChangedBy: kwu $
*
* @category Streamwide
* @package Streamwide_Media
* @subpackage Streamwide_Media_Joiner
* @copyright Copyright (c) 2010 Streamwide SAS
* @author Radu Gasle... | true |
9d62524c009a71ff63d1213b979ea086cb1ff46d | PHP | ltribolet/Lychee | /app/Models/SmartAlbums/PublicAlbum.php | UTF-8 | 1,227 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Models\SmartAlbums;
use App\Models\Photo;
use Illuminate\Database\Eloquent\Builder;
/**
* App\Models\SmartAlbums\PublicAlbum.
*
* @property \App\Models\User $owner
* @property \App\Models\Album $parent
* @property \Illuminate\Database\Eloquent\Collection|\App\Models... | true |
fb20eb6c62b90b55906be4bc9ad49baf914b545b | PHP | SamLex/SWCProspect | /src/SamLex/SWCProspect/Deposit.php | UTF-8 | 3,692 | 3.4375 | 3 | [] | no_license | <?php
/** Part of SWCProspect, contains Deposit class. */
namespace SamLex\SWCProspect;
use SamLex\SWCProspect\Database\DatabaseInteractor;
/** Data class that holds data on a deposit. */
class Deposit
{
/**
* The database ID of this deposit.
*
* @var int
*/
private $dbID;
/**
*... | true |
e437f1bc622dddd823c61efd34a7b8e1ab77a725 | PHP | MohamedTarek20/Emerald | /src/Repositories/Interfaces/RepositoryContractCrud.php | UTF-8 | 973 | 2.59375 | 3 | [] | no_license | <?php
namespace MElaraby\Emerald\Repositories\Interfaces;
interface RepositoryContractCrud
{
/**
* @param bool $pagination
* @param int $perPage
* @return mixed
*/
public function index(bool $pagination, int $perPage);
/**
* @param array $data
* @return mixed
*/
pub... | true |
b4f207fec68ae9232505f41bd0381948cbd4e278 | PHP | it4runz/PHP-Online-Fabrication | /dashbord/edit.php | UTF-8 | 2,946 | 2.59375 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION['email'])) {
header("location: ../");
}else if ($_SESSION['email'] != "admin@admin.com") {
header("location: ../");
}else{
include '../conn.php';
}
if (empty($_GET['id'])) {
header("location: update.php");
}
$id = $_GET['id'];
//$_SESSION['updated'] = false;
//check if p... | true |
a6336eb86f00ac9424cc2e9e1358fdaa83cabbb1 | PHP | Corin123555/CoreSpy | /app/GameSpy/Common/Utils/GSCallFormat.php | UTF-8 | 1,468 | 3.046875 | 3 | [] | no_license | <?php
namespace App\GameSpy\Common\Utils;
/**
* Class GSCallFormat
*
* This entire process is a mess and could be improved so much.
*
* @package App\GameSpy\Common\Utils
*/
class GSCallFormat {
/**
* @var string $call
*/
public $call;
/**
* @var array $data
*/
public $data;
public function par... | true |
9ea3ee518229eb3d7f2c1afef08d38cfc85c8b37 | PHP | LIU-D/phpdemo | /part7/example35/book.php | UTF-8 | 874 | 2.6875 | 3 | [] | no_license | <?php
header('content-type:text/html;charset=utf-8');
//数据库服务器类型MYSQL
$dbms='mysql';
//数据库服务器主机名、端口号、选择的数据库
$host='localhost';
$port='3306';
$dbname='php';
//设定字符集
$charset='utf8';
//用户名和密码
$user='root';
$pwd='741258o';
$dsn="$dbms:host=$host;port=$port;dbname=$dbname;charset=$charset";
//PDO连接数据库
try{
//连接数据库、选择数据库、设... | true |
636fa36dee5b54554e7788863551fb80eafc2326 | PHP | mohali9/lspsatpam | /database/migrations/2019_07_25_135617_create_penduduks_table.php | UTF-8 | 892 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePenduduksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('penduduks', f... | true |
840f7e8eaca2047540d99729296b4859084dbc93 | PHP | mrunali-d/ranium_test | /rtest/app/Controller/Component/NasaApisComponent.php | UTF-8 | 1,073 | 2.53125 | 3 | [] | no_license | <?php
App::uses('Component', 'Controller');
App::uses('HttpSocket', 'Network/Http');
define('SUCCESS', 'SUCCESS');
define('HEADER_TYPE', 'application/json');
define('GET_NEO_FEED', 'https://api.nasa.gov/neo/rest/v1/feed');
define('APP_KEY', 'DEMO_KEY');
class NasaApisComponent extends Component {
/*For get http o... | true |
bd2ec06c5dfcb37423bdf7f61d5f67403f700e1e | PHP | samius/tools | /src/Samius/Strings.php | UTF-8 | 4,582 | 3.40625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Samius;
class Strings
{
public const CHARS_LOWER = 1,
CHARS_UPPER = 2,
CHARS_NUMERIC = 4,
CHARS_SPECIAL = 8;
/**
* Generates random string with given lenght
* You can determine which characters the string is generated of with $type
... | true |
83b477e1339d979d99b8d4a80cb4816bf11c604e | PHP | frankdejonge/rector | /src/PhpParser/Node/NodeVisitor/NodeRemovingNodeVisitor.php | UTF-8 | 2,145 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Rector\PhpParser\Node\NodeVisitor;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Stmt;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitorAbstract;
use Rector\PhpParser\Node\NodeFactory;
use Rector\PhpParser\Node\Resolv... | true |
724c3c76a241748fdd970ae20f20bc7bd223d804 | PHP | AndreasGeorgopulos/gekko_test | /app/Models/Secret.php | UTF-8 | 1,205 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Secret extends Model
{
use HasFactory;
/**
* @param string $secretText
* @return string
*/
public static function generateHash(string $secret... | true |
d0c03793a406ee69c664f0f26b716a9ae5d862f7 | PHP | just4run/skill-up-study-just4run | /samples/basics.php | UTF-8 | 1,021 | 2.828125 | 3 | [] | no_license | <?php
//$test = 0;
//var_dump($test);
//
//$test_2 = 2;
//var_dump($test_2);
//
//$skillUpVariable = 'Hohoho';
//var_dump($skillUpVariable);
//
//$skillUpVariable = 'lalala';
//var_dump($skillUpVariable);
//
//$school = $skillUpVariable;
//var_dump($school);
//
//$testParent = 123;
//$testChild = &$testParent;
//var_d... | true |
8e1b0c890142367a885220a10720393ab2df3258 | PHP | AftabAlamGit/MovieProject | /api/movie/create.php | UTF-8 | 1,778 | 2.828125 | 3 | [] | no_license | <?php
// required headers
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-... | true |
d7ce3440d7f3ae6588c2adfe689e0b2d1b7b1892 | PHP | Javedkhansh/MyBlog56 | /app/Http/Controllers/BlogController.php | UTF-8 | 5,171 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Blog;
use App\Category;
use Session;
class BlogController extends Controller
{
public function __construct(){
// $this->middleware('author', ['only' => ['create','store','edit','update']]);
// $this->middleware('admin', ... | true |
9213e589952b31e5172a76e64f49db8a2b9a139b | PHP | dvsa/olcs-backend | /module/Api/src/Service/Document/Bookmark/Base/ImageBookmark.php | UTF-8 | 1,782 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Dvsa\Olcs\Api\Service\Document\Bookmark\Base;
use Dvsa\Olcs\Api\Service\Document\Bookmark\Interfaces\FileStoreAwareInterface;
use RuntimeException;
/**
* Image bookmark
*
* @author Nick Payne <nick.payne@valtech.co.uk>
*/
abstract class ImageBookmark extends DynamicBookmark implements FileStoreAw... | true |
560fc43dede0567781b6c8a3686fc1dbfdd54a90 | PHP | bschmithuysen/ClassManager | /example/example.php | UTF-8 | 1,164 | 2.515625 | 3 | [] | no_license | <?php
require_once('../src/autoload.php');
require_once('myClass.php');
require_once('dependencyClass.php');
use ClassManager\ArrayClassConfiguration;
use ClassManager\ClassContainer;
use ClassManager\ClassManager;
$classConfiguration = array(
'myClass' => array(
'className' => '\myClass',
... | true |
e0cf43177bb30a8401019d6cf93b664a2a315a6a | PHP | vanthanh638/kytucxa | /system/core/loader/LibraryLoader.php | UTF-8 | 419 | 2.5625 | 3 | [] | no_license | <?php
if ( ! defined('PATH_SYSTEM')) {
die ('Bad requested!');
}
class LibraryLoader
{
public function __construct()
{
}
public function load($library, $agrs = [])
{
if (empty($this->{$library})) {
$class = ucfirst($library) . 'Library';
require_once (PATH_SYST... | true |
5b9009bdd803c0a60fb12b626f60a6680aabe6e4 | PHP | domotique-s3/dbData | /src/DS3/Framework/Form/Validation/AssociativeArrayValidator.php | UTF-8 | 1,778 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace DS3\Framework\Form\Validation;
class AssociativeArrayValidator extends AbstractValidator
{
private static $message = 'This field should be an array';
private static $code = 'V00004';
/**
* @var ValidatorInterface[]
*/
private $keysValidators;
/**
* @var ValidatorIn... | true |
b57bab68c4eff56aea91fa52d2465c1bedf5c6e2 | PHP | Morebec/orkestra-messaging | /src/Routing/MessageHandlerProviderInterface.php | UTF-8 | 502 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Morebec\Orkestra\Messaging\Routing;
use Morebec\Orkestra\Messaging\MessageHandlerInterface;
/**
* Allows the Routing components of the {@link MessageBusInterface} to be able to
* to get an instance of a {@link MessageHandlerInterface}.
*/
interface MessageHandlerProviderInterface
{
/**
* ... | true |
6fcfd408ab286ef570b1cf9810e683b0520f1784 | PHP | JustDava/WebSite | /admin/edit_user.php | UTF-8 | 3,414 | 2.65625 | 3 | [] | no_license | <?php
session_start();
require '../vendor/connect.php';
if (empty($_SESSION['user']) || $_SESSION['user']['role']=='user')
{
header("Location: ../index.php");
}
?>
<?php require '../head.php'?>
<body>
<?php require '../content/header.php'?>
<?php require '../svg.php'?>
... | true |
853bab320523d2e1649bf720ef83c22ed9b6cee8 | PHP | tuguldur/darkhan-uul.hudulmur-halamj.gov.mn | /app/Http/Controllers/MailController.php | UTF-8 | 2,345 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
use Illuminate\Mail\Transport\MailgunTransport;
class MailController extends Controller {
//
public static function sendComplaintEmailToStaffMail($personName, $personEmail, $personPhone, $personMessage) ... | true |
7dcd81525875351b7094781af2dec55913b496c6 | PHP | aniliso/statistics-module | /Services/Statistics.php | UTF-8 | 10,758 | 2.5625 | 3 | [] | no_license | <?php namespace Modules\Statistics\Services;
use Carbon\Carbon;
use Illuminate\Support\Collection;
use Analytics;
use Spatie\Analytics\Period;
class Statistics
{
/**
* @var int
*/
private $period;
/**
* @var int
*/
private $limit;
/**
* @var static
*/
private $sta... | true |
088a671f544933d3009944b230f538c593288924 | PHP | Burgov/PredisWrapper | /src/Burgov/PredisWrapper/Type/AbstractType.php | UTF-8 | 1,441 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Burgov\PredisWrapper\Type;
use Burgov\PredisWrapper\Client;
class AbstractType
{
private $key;
private $client;
public function __construct(Client $client, $key)
{
$this->client = $client;
$this->key = $key;
}
/**
* Get the key name of the specified key... | true |
0d28c0bffd7dc0150f669315aed1477131729e45 | PHP | wojiuxiaoxiao/php-design | /Example/AbstractFactoryPractice.php | UTF-8 | 1,188 | 3.40625 | 3 | [
"MIT"
] | permissive | <?php
namespace CjwPhpDesign\example;
use CjwPhpDesign\Src\AbstractFactory\BigFactory;
use CjwPhpDesign\Src\AbstractFactory\SmallFactory;
class AbstractFactoryPractice
{
public function __construct()
{
echo '第一类别:生产一套大型号的商品<br>';
$bigFactory = new BigFactory();
echo '... | true |
fb1e3a7b95b7930429bce02deecc76ba15781ff6 | PHP | alexamiryan/stingle | /packages/Users/WebPushNotifications/Managers/WebPushNotificationsManager.class.php | UTF-8 | 4,077 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Minishlink\WebPush\WebPush;
use Minishlink\WebPush\Subscription;
class WebPushNotificationsManager extends DbAccessor{
const TBL_PUSH_NOTIFICATIONS = "push_notifications";
protected $config = null;
public function __construct($config, $instanceName = null) {
parent::__construct($instanceName);
$th... | true |
52895628db1fd13d4a5a9e8bbcbc39563860edc5 | PHP | usk3/FirstAssign | /user.php | UTF-8 | 1,293 | 2.625 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title> My First HomeWork page </title>
<!-- php class included -->
<?php include("class_person.php"); ?>
<!-- CSS sheet ... | true |
e32f39626c6f8d06b91e0f1ac972bfd4caa47947 | PHP | ever-c0de/examination-module | /src/Form/FormEver.php | UTF-8 | 8,567 | 2.65625 | 3 | [] | no_license | <?php
namespace Drupal\form_ever\Form;
use Drupal;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Implements the form that calculate quartals and YTD values.
*
* Its have functionality for adding more than 1 table and years to each table.
*/
class FormEver extends FormBase {
/**... | true |
dde0dd767d1b79a7a12f9f15774c796c7a06d72a | PHP | adilcse/laravelAPI | /app/Model/Catagory.php | UTF-8 | 347 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use DB;
/**
* Catagory model handle CURD on catagory table
*/
class Catagory extends Model
{
/**
* get all catagories sorted by name
*/
public static function getAllCatagory(){
$value=DB::table('catagories')->orderBy('name', 'asc')->get()... | true |
085cedc73435f44222fe1ddd39af170acd0d5f2a | PHP | carlxiao1991/composer-test | /src/Lily.php | UTF-8 | 172 | 2.65625 | 3 | [] | no_license | <?php
namespace car1991;
/**
* Description of Lily
*
* @author Administrator
*/
class Lily {
public function desc() {
echo "this is rose Lily";
}
}
| true |
a8dc89e66f6429d5bd1dac075cba2c2981afacd5 | PHP | ruibernardo/thunder | /framework/helpers/Url.php | UTF-8 | 990 | 2.796875 | 3 | [] | no_license | <?php
class Url {
public static function action($viewdata,$route,$params) {
$url = "/";
$route = trim($route, "/");
$routenodes = explode("/",$route);
$nodecount = sizeof($routenodes);
if($nodecount == 3)
$url.=$route;
... | true |
682a7c2cbef0349c57579eafd8dbede82591cd56 | PHP | princesagar/assignment | /lab6/sort.php | UTF-8 | 804 | 3.546875 | 4 | [] | no_license | <?php
echo "<h1>sorting</h1>";
$names = ['ramesh','shubham','sagun','alisha','bibek'];
sort($names);
foreach ($names as $name) {
echo $name.'<br>';
}
echo "<h1>rsorting</h1>";
rsort($names);
foreach ($names as $name) {
echo $name.'<br>';
}
echo "<h1>asorting</h1>";
$values = array("sagun" => "21","shubha... | true |
b5502157c34cc25ecf9bb7161b90e8ab65385f47 | PHP | marcoski/cp-press | /src/Commonhelp/App/Http/Session/Storage/Handler/WriteCheckSessionHandler.php | UTF-8 | 1,182 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Commonhelp\App\Http\Session\Storage\Handler;
class WriteCheckSessionHandler implements \SessionHandlerInterface{
/**
*
* @var \SessionHandlerInterface
*/
private $wrappedSessionHandler;
private $readSessions;
public function __construct(\SessionHandlerInterface $wrappedSessionHandler){... | true |
a6e3961c76625305add6cd4d02f4d1c7082450bd | PHP | talgat55/PHP-Laravel5.8-React-js-Kultura | /app/Http/Controllers/BannerController.php | UTF-8 | 1,775 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Banners;
class BannerController extends Controller
{
/**
* Show the list items
*
* @return \Illuminate\View\View
*/
public function index()
{
$items = Banners::paginate('50');
return view('banne... | true |
c8a10f1705fe2721861be3307adc3b68c2a45cfd | PHP | devprom-dev/sdk | /app/core/methods/ProcessEmbeddedWebMethod.php | UTF-8 | 5,641 | 2.53125 | 3 | [] | no_license | <?php
include_once "WebMethod.php";
class ProcessEmbeddedWebMethod extends WebMethod
{
function decode( $value ) {
return EnvironmentSettings::getBrowserPostUnicode() ? IteratorBase::utf8towin($value) : $value;
}
function execute_request()
{
$indexes = array();
for... | true |
2dbd1b946cde949e295f950b95d0c0d2a87dc776 | PHP | gonzalom/tmdb-app | /app/Http/Controllers/Tmdb/SearchController.php | UTF-8 | 1,058 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Tmdb;
use Response;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Tmdb\Api\Search;
class SearchController extends Controller
{
/**
* @var \Tmdb\Api\Search
*/
private $api;
/**
* Create a new controller instance.
*
* @... | true |
f354b7a9b5f446a1b717e36c0c9bc2e6888bf87c | PHP | cnwyt/UserAgentParser | /tests/WindowsUATest.php | UTF-8 | 2,957 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Cnwyt\UserAgentParser\Tests;
use Cnwyt\UserAgentParser\UserAgentParser;
use PHPUnit\Framework\TestCase;
final class WindowsUATest extends TestCase
{
protected $parser = null;
public function setUp()
{
$this->parser = new UserAgentParser();
}
public function testIndex()
... | true |
4ca8c8ecc31dd1da0a321759eb7114cf74379957 | PHP | hallboav/hex-arch | /src/Dominio/EleitorInterface.php | UTF-8 | 198 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Dominio;
interface EleitorInterface extends PessoaInterface
{
public function obterQuantidadeVotos(): int;
public function votar(CandidatoInterface $candidato): void;
} | true |
6d55fbb64a333cf1bc42cf909c8b6a144968e8ba | PHP | SergeyZaligin/testparse | /countries_list.php | UTF-8 | 1,015 | 2.5625 | 3 | [] | no_license | <?php
/**
* I. STAP load all countries in file (href and title)
*/
include_once('lib/Curl.php');
include_once('lib/simple_html_dom.php');
// Load page with wiki.conf
$c = Curl::app('https://www.yell.ru')->config_load('wiki.cnf');
// Get array data on data['headers'] and data['html']
// Array count... | true |
c4d59428d6fdc68d28fcc4d39a426a846e0adb5e | PHP | bob736/projetFin | /projet/Entity/Projet.php | UTF-8 | 2,576 | 3.171875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Traits\Entity;
class Projet
{
use Entity;
private ?array $users;
private ?int $id;
private ?string $name;
private ?string $link;
private ?array $channels;
private ?int $stat;
/**
* Projet constructor.
* @param array|null $users
* @... | true |
0e99a74e883af3b38ee747035568ff85a1d49911 | PHP | gsouf/UForm | /src/UForm/Validator/File/AbstractFileValidator.php | UTF-8 | 1,392 | 2.84375 | 3 | [] | no_license | <?php
/**
* @license see LICENSE
*/
namespace UForm\Validator\File;
use UForm\Exception;
use UForm\FileUpload;
use UForm\Form\Element\Primary\Input\File;
use UForm\InvalidArgumentException;
use UForm\Validation\ValidationItem;
use UForm\Validator;
/**
* Contains common logic for file validator and requires the el... | true |
02d100e7d322d54ffe074d99bdefffef01bb894b | PHP | bhavinjr/laravel-alots | /src/Alots.php | UTF-8 | 3,536 | 2.5625 | 3 | [] | no_license | <?php
namespace Bhavinjr\Alots;
use Bhavinjr\Alots\Errors;
class Alots extends Entity
{
public function simpleSms($receiver, $message_text, $template_id = null)
{
try {
$payload = [
'apirequest' => self::API_REQUEST_TEXT,
'mobile' => $receiver,
... | true |
339b95fd14b2742a667344e417f3e2fd01791ede | PHP | nataliandre/tennisSN | /model/friends/FriendsModel.php | UTF-8 | 5,814 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: andrijmoroz
* Date: 14.06.16
* Time: 19:23
*/
class FriendsModel extends Model
{
public $firstUser;
public $secondUser;
public $confirmedFriends;
public function __construct()
{
}
/**
* @param $data
*
*/
public function s... | true |
31727b6fe98b37fa2f4bfc3512b4f19186d4a662 | PHP | ekopba29/schoolmedia | /app/Http/Controllers/Admin/ManageProfilAdmin.php | UTF-8 | 1,109 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request;
class ManageProfilAdmin extends Controller
{
public function show(User $profileAdmin)
{
return view('admin.profileAdmin', ['user' => $profileAdmin]);
}
/**
... | true |
9049b9f9ce6b5c02cf26f8a2228a2b3c0c070937 | PHP | rudychartier/sortir-com | /src/Form/SortieType.php | UTF-8 | 2,609 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Form;
use App\Entity\Sorties;
use http\Env\Url;
use Symfony\Component\DomCrawler\Field\TextareaFormField;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extensio... | true |
e672228256499fe239dff1381541c2865563ab92 | PHP | tgilbers/advent-2015 | /advent24.php | UTF-8 | 990 | 2.984375 | 3 | [] | no_license | <?php
$input = file_get_contents("advent24_input.txt");
$inputArray = explode(PHP_EOL, $input);
$combinations = [];
//$targetWeight = array_sum($inputArray) / 3;
$targetWeight = array_sum($inputArray) / 4;
$bestDepth = 99;
var_dump($inputArray, $targetWeight);
function getCombos($combo, $arr)
{
global $bestDepth, $co... | true |
a484db775f9720414d0580d7e6649197e61f5cc0 | PHP | rodrigoprestesmachado/whiteboard | /propel/validator/BasicValidator.php | UTF-8 | 1,789 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* $Id: BasicValidator.php,v 1.1 2007/01/03 20:10:14 rpm Exp $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ... | true |
6f9306d497bd7c252b08ecc03feb2183af2d01b6 | PHP | metalagman/yii-age-column | /AgeColumn.php | UTF-8 | 1,184 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Alexey Samoylov <alexey.samoylov@gmail.com>
*/
class AgeColumn extends DateTimeColumn
{
public function init()
{
parent::init();
$this->headerHtmlOptions['style'] = 'text-align: center; width: 128px';
$this->htmlOptions['style'] = 'text-align: center';
}
... | true |
260efe0af0f0cf5231a9cc3fa2cc994d1453ff81 | PHP | nvgonzal/prueba-angular-backend | /database/seeds/ObjetosSeeder.php | UTF-8 | 468 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class ObjetosSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Faker\Factory::create('es_ES');
for ($i=0;$i<50;$i++){
$objeto = new \App\Objeto();
$ob... | true |
564588314775c568bf3bce0149a90a22d00845f7 | PHP | ngmautri/nhungttk | /module/Application/src/Application/Domain/Company/Collection/PostingPeriodCollection.php | UTF-8 | 574 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Application\Domain\Company\Collection;
use Application\Domain\Company\PostingPeriod\BasePostingPeriod;
use Application\Domain\Util\Collection\GenericCollection;
/**
*
* @author Nguyen Mau Tri - ngmautri@gmail.com
*
*/
class PostingPeriodCollection extends GenericCollection
{
pub... | true |
eba341a386c0c911f6f68aca524c6c132ba232f3 | PHP | profding-bh/php | /string.php | UTF-8 | 3,369 | 3.828125 | 4 | [] | no_license | <?php
$message = "PHP 程序";
echo "这是关于字符串的程序。"."<br>";
echo "这是一个关于双引号和\$的$message <br>";
$message2 = 'PHP 程序';
echo '这是关于字符串的程序。'."<br>";
echo '这是一个关于单引号的$message2 <br>';
$a = "使用字符串的连接符";
$b = "可以非常方便地连接字符串";
$c = $a.", ".$b;
echo $c;
echo "<br>";
$a= "ding";
$b = "欢迎{$a} 入住酒店."; # {} 连接字符串
echo $b;
//addsla... | true |
c596f8b1506ef3b4bafd69d2c2db6b9394e27eba | PHP | victorgousset/spotify | /api/api_info_artiste.php | UTF-8 | 1,799 | 2.953125 | 3 | [] | no_license | <?php
header('Access-Control-Allow-Origin: *');
require_once '../class_database/prepare_request.php';
// $_GET['InfoArtiste'] = ['name', []];
function InfoArtiste(array $info)
{
$manager_request = new prepare_request();
if (is_array($info) == false || (is_array($info) == true && count($info) < 2))
{
... | true |
c42e74ba1fe895560fb53fd1eac6e331995670de | PHP | MaxxOverDrive/Scrapers | /ScraperGUI/matches.php | UTF-8 | 1,904 | 2.796875 | 3 | [] | no_license | <?php
if(isset($_POST['images'])) {
if(preg_match_all('/<img[^\/>]\/>/', $result, $matches)) {
foreach($matches[1] as $match) {
echo $match;
}
}
else {
$final_result = "<h1 class='finalResults'>Their are no images to match</h1>";
}
}//END OF IF ISSET POST IMAGES
if(isset($_POST['tables'])) {... | true |
b5a69e104f94f41df94a27ca7680bcd9945589bf | PHP | KoryKozlowski/Laravel_Cookbook | /app/routes.php | UTF-8 | 4,103 | 2.59375 | 3 | [] | no_license | <?php
Route::get('/', function()
{
return View::make('hello');
});
Route::post('myform', array('before' => 'csrf', function()
{
$rules = array(
'email' => 'required | email | min:6',
'username' => 'required | min:6',
'password' => 'required',
'no_email' => 'honey_pot'
);
$messa... | true |
e2029ee8c724049db03f297c775be005c33b91d5 | PHP | RobinYzewyn/INT3_yzewynRobin | /src/dao/LayersOpdrachtenDAO.php | UTF-8 | 6,130 | 2.546875 | 3 | [] | no_license | <?php
require_once(__DIR__ . '/DAO.php');
class LayersOpdrachtenDAO extends DAO
{
public function selectById($id)
{
$sql = "SELECT * FROM `opdracht` WHERE `id` = :id";
$stmt = $this->pdo->prepare($sql);
$stmt->bindValue(':id', $id);
$stmt->execute();
return $stmt->fetch(PDO::FETCH_ASSOC);
}
... | true |
2aebf2a6a5bc112b687c68c0cde39a57f4237bcf | PHP | khoptynskyi/php-domain-parser | /tests/TLDConverterTest.php | UTF-8 | 2,625 | 2.6875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | <?php
/**
* PHP Domain Parser: Public Suffix List based URL parsing.
*
* @see http://github.com/jeremykendall/php-domain-parser for the canonical source repository
*
* @copyright Copyright (c) 2017 Jeremy Kendall (http://jeremykendall.net)
*
* For the full copyright and license information, please view the LICE... | true |
a9e833301d32237ec0c6904c496ab1f26f291424 | PHP | joeldseidel/Vibe | /ui/src/RoomAdapter.php | UTF-8 | 3,065 | 3.296875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App;
use Ratchet\ConnectionInterface;
/**
* Class RoomAdapter
* Abstracts away the implementation of a room object and provides helper methods for the handlers to interact with rooms
* @package App
*/
class RoomAdapter
{
//Array of open rooms
private $open_rooms;
/**
* Roo... | true |
635e27c714fc3628457b074cbbf0e6aa75a511db | PHP | web-T/php-framework | /app/lib/Interfaces/iApi.inc.php | UTF-8 | 763 | 2.765625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | <?php
/**
* Base API controller class
*
* Date: 15.02.15
* Time: 23:41
* @version 1.0
* @author goshi
* @package web-T[Interfaces]
*
* Changelog:
* 1.0 15.02.2015/goshi
*/
namespace webtFramework\Interfaces;
use webtFramework\Core\oPortal;
abstract class oApi extends oBase{
/**
* allowed metho... | true |
4ba088d759ada110dc75c5870c85500879aab299 | PHP | kozlovsv/yii2-crud | /helpers/DBHelper.php | UTF-8 | 1,180 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace kozlovsv\crud\helpers;
use Yii;
use yii\base\BaseObject;
class DBHelper extends BaseObject {
/**
* Пакетная вставка списка данных в таблицу
* @param array $data Набор данных. Массив строк. Ключи в строках полностью должны совпадать с наименованием полей таблицы БД.
* @param string ... | true |
895e006a1d9779ac4f8e59a22bfd37f4a0a7c411 | PHP | AdishRao/Web-Lab | /prog8b.php | UTF-8 | 1,664 | 3.40625 | 3 | [] | no_license | <?php header('Content-Type: text/plain');
$matrix1 = array(array(1,2), array(4,5));
$matrix2 = array(array(1,2), array(4,5));
echo "\n\n";
echo "The order of matrix A is:" .count($matrix1)."x".count($matrix1[0]);
echo "The order of matrix B is:" .count($matrix2)."x".count($matrix2[0]);
echo "\n";
$rowCount = count($m... | true |
ab9110d94779eb65fd4f8413159f170b88158980 | PHP | c9s/MiniPear | /vendor/pear/GetOptionKit/GetOptionKit.php | UTF-8 | 1,499 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the GetOptionKit package.
*
* (c) Yo-An Lin <cornelius.howl@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
*/
namespace GetOptionKit;
use GetOptionKit\OptionSpec;
use GetOptionKit\OptionS... | true |
fc621c6b50c635a3c5a8c6dc095a1032e07add9e | PHP | dareyesm/CRUDPHPyPDO | /modificar.php | UTF-8 | 965 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
//nos conectamos a la BD
require'class/database.php';
$objData = new Database();
$sth = $objData->prepare('SELECT * FROM datos WHERE idDato = :idDato');
$idDato = $_GET['id'];
$sth->bindParam(':idDato', $idDato);
$sth->execute();
$result = $sth->fetchAll();
//print_r($result);
?>
<!DOCTYPE html>
<html lang... | true |
f693ca4cd802f1b8a678bdcf1b5f52f6e778c294 | PHP | jerryjazzz/travelino | /app/models/Region.php | UTF-8 | 1,429 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
class Region extends Eloquent
{
public $table = 'expedia_ParentRegionList';
/**
* Возвращает перевод для имени региона.
*
*/
public function lang()
{
return $this->hasOne('RegionLang', 'RegionID', 'RegionID')->first();
}
/**
* Возвращает коорд... | true |
ed4817a6e0858ff8c0f5d683bc3ca6b11d4006ec | PHP | jmikola/mongo-php-library | /tests/Model/CallbackIteratorTest.php | UTF-8 | 2,374 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace MongoDB\Tests\Model;
use ArrayIterator;
use Generator;
use Iterator;
use IteratorAggregate;
use MongoDB\Model\CallbackIterator;
use MongoDB\Tests\TestCase;
use function iterator_to_array;
class CallbackIteratorTest extends TestCase
{
/** @dataProvider provideTests */
public function testIter... | true |
b638db9f9c8698453d309cab116c3689da69859d | PHP | LuanSilveiraSouza/avatar-game | /server/src/controllers/QuestionController.php | UTF-8 | 1,472 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
include_once '../src/models/Question.php';
include_once '../src/ports/HttpCode.php';
use App\Models\Question;
use App\Ports\HttpCode;
class QuestionController
{
static function getAll()
{
header(HttpCode::Http200);
$questions = Question::findAll();
... | true |
eb2c57c7a604a4f0e74d9ed4bbb8452ff0bf0dd5 | PHP | apeweb/cmf | /framework_BETA_2/time.php | UTF-8 | 807 | 2.578125 | 3 | [] | no_license | <?php
if (count(debug_backtrace()) == 0) {
header('Content-Type: text/plain; charset=UTF-8', TRUE, 403);
die("The page cannot be displayed.\r\nThe request has not been fulfilled because the server does not authorise access to this request externally.");
}
class Time {
static protected $_timezone = '';
static... | true |
f95450c026805554c092f3c8f7ec41427fbe6d69 | PHP | PhilipRead/DD_Project | /newItem.php | UTF-8 | 2,576 | 2.765625 | 3 | [] | no_license | <style type="text/css">
body {
background-color: black;
}
p {
text-align: center;
color: #B80000;
font-size: 500%;
margin-top: 250px;
}
.menu {
text-align: center;
}
.left {
width: 225px;
margin-right: 25px;
}
.right {
width: 225px;
margin-left: 25px;
}
form {
margin: 0px;
}
input[type=submit] {
width... | true |
8d9a0f9f660501a1d4ee6c2b62d274dd91c2ca83 | PHP | NsonguruaJohnson/Study-Pal | /dashboard.php | UTF-8 | 1,364 | 2.65625 | 3 | [] | no_license | <?php
// Initialize session
session_start();
// Check to see if the cookie is set, if not, redirect to login page
// if(isset($_COOKIE['userid']) || isset($_COOKIE['useremail'])){
// $user = true;
// // header('location: login.php');
// }
// Check if the user is logged in, if not then redirect the user... | true |
2fa678a28d7073f8bf80b6b26a2ff08e0b50b0ee | PHP | iddqdoom/bitrix-result-modifier | /local/modules/app.common/lib/component/componentfactoryinterface.php | UTF-8 | 229 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Common\Component;
interface ComponentFactoryInterface
{
public function create(string $component): ComponentInterface;
public function supports(string $component): bool;
}
| true |
69b0765a82fbc0aacf54a8256472bb85807902e6 | PHP | Bengaluru2016/team-19 | /Final Submission/home/User_UI/quiz/goliajax.php | UTF-8 | 2,739 | 2.578125 | 3 | [
"MIT"
] | permissive | <html>
<head>
<style>
#left {
line-height:30px;
background-color:#eeeeee;
width:500px;
float:left;
padding:5px;
}
#right {
width:500px;
float:right;
padding:10px;
}
</style>
</head>
<body>
<div id="left" name="leaderboard" class="col-sm-6">
<?php
$servername = "localhost";
... | true |
78ea34dab2a11a74876e8f4eb12412c95a1c2453 | PHP | gitcode-corp/forum | /module/Security/Model/Form/User/UserForm.php | UTF-8 | 451 | 2.546875 | 3 | [] | no_license | <?php
namespace Security\Model\Form\User;
class UserForm extends \Soft\AbstractForm
{
public function __construct(\Soft\AbstractValidator $validator)
{
$validator->setFormFields($this->getFields());
parent::__construct($validator);
}
public function getFields()
{
retur... | true |
1ab0cf56a3f96416145989e8e430ebac72bb8d3c | PHP | forever2077/php-helper | /src/Annotations/Handler/BeforeAfter.php | UTF-8 | 1,658 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Forever2077\PhpHelper\Annotations\Handler;
use Forever2077\PhpHelper\Annotations\Interface\Handler;
use ReflectionClass;
use ReflectionMethod;
use ReflectionException;
class BeforeAfter implements Handler
{
/**
* @param ReflectionClass $class
* @param object $annotationInstance
* @... | true |
1360b682967a37821e5843f527346d3b7f14b9f4 | PHP | Skyseek/GiveToWin | /library/Skyseek/Form/Decorator/UniformElements.php | UTF-8 | 7,820 | 2.53125 | 3 | [] | no_license | <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of th... | true |
c4a678d86eb92545350bd9fb3eedc42dfe05b722 | PHP | opensoft/OpensoftEZCWorkflow | /src/Opensoft/Workflow/Execution/Plugin/Listener.php | UTF-8 | 9,179 | 2.546875 | 3 | [] | no_license | <?php
/**
* File containing the Listener class.
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apa... | true |