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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
62937d0bb932aa56a8e1dc597feb3038b9d09599 | PHP | kvanland/csci310TeamP | /src/backEnd/GetStatus.php | UTF-8 | 280 | 2.734375 | 3 | [] | no_license | <?php
include "WordCloud.php";
session_start();
$wc = $_SESSION["wordCloud"];
echo StatusDriver::getStatus($wc);
class StatusDriver{
public static function getStatus($wordCloud){
if(is_object($wordCloud))
return $wordCloud->parseNextArticle();
}
} | true |
9ab2e8c38b1be09c7ae0fa6cc832da065171c8be | PHP | Draeius/rhun-php | /src/Util/YAML/YamlSkinLoader.php | UTF-8 | 1,202 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Util\YAML;
use Exception;
use Symfony\Component\Config\Loader\FileLoader;
use Symfony\Component\Yaml\Yaml;
/**
*
*
* @author Draeius
*/
class YamlSkinLoader extends FileLoader {
/**
*
* @param type $resource
* @param type $type
* @return array
*/
public fun... | true |
f3c41c1e8bc23d8c2cc38badbb8c0b63d2e1192c | PHP | Red-Teapot/bbyaworld.com | /src/backend/services/clans_cells/update.php | UTF-8 | 3,829 | 2.5625 | 3 | [
"MIT",
"CC-BY-3.0"
] | permissive | <?php
require __DIR__ . '/../../../../vendor/autoload.php';
$settings = require(__DIR__ . '/../../../../config/clans_cells/config.php');
$log = new Monolog\Logger($settings['logger']['name']);
$log->pushProcessor(new Monolog\Processor\UidProcessor());
$log->pushHandler(new Monolog\Handler\RotatingFileHandler($settin... | true |
0e03c5d73ea8db07166ebd24ce4b9d9b13d3064e | PHP | AshikaJahir/student_mgmt_system | /app/Http/Controllers/Student/ClassData/ClassDetailController.php | UTF-8 | 4,299 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Student\ClassData;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class ClassDetailController extends Controller
{
public $rollno;
public $std;
public $classTeacher;
public $noOfSubjects;
public $studentid;
//Declaring the table to... | true |
f06e03e28363eb3e1c195cb99904ffebc0554128 | PHP | rethinkphp/typedphp | /src/DocGenerator.php | UTF-8 | 5,486 | 2.828125 | 3 | [] | no_license | <?php
namespace rethink\typedphp;
use ReflectionClass;
use InvalidArgumentException;
use phpDocumentor\Reflection\DocBlockFactory;
use phpDocumentor\Reflection\DocBlock;
/**
* Class DocGenerator
*
* @package rethink\typedphp;
*/
class DocGenerator
{
protected $apiClasses = [];
/**
* @var TypeParser
... | true |
079e0428e725ec7988646294e065342e40b75271 | PHP | decanus/Ganked | /GankedLibrary/src/Generators/ImageUriGenerator.php | UTF-8 | 2,155 | 2.609375 | 3 | [] | no_license | <?php
/**
* Copyright (c) Ganked 2015
* All rights reserved.
*/
namespace Ganked\Library\Generators
{
class ImageUriGenerator
{
/**
* @param string $championId
*
* @return string
*/
public function createChampionIconUri($championId)
{
... | true |
dc28ac777dedbd66ecf62cf282dc06ad3ea80625 | PHP | hwebz/php-learning | /simple-cms/admin/user.php | UTF-8 | 738 | 3.109375 | 3 | [] | no_license | <?php
class User {
public function login($username, $password) {
global $pdo;
$query = $pdo->prepare("SELECT * FROM users WHERE user_name = ? AND user_password = ?");
$query->bindValue(1, $username);
$query->bindValue(2, $password);
$query->exec... | true |
e7bc0b56974504bec65a3d0d550f086e8f18d7c1 | PHP | clarkeash/swig | /src/Status.php | UTF-8 | 1,547 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Clarkeash\Swig;
use GuzzleHttp\Psr7\Response;
/**
* Class Status
*
* @package \Clarkeash\Swig
*/
class Status
{
/**
* @var \GuzzleHttp\Psr7\Response
*/
protected $response;
/**
* Assert constructor.
*
* @param \GuzzleHttp\Psr7\Response $response
*/
p... | true |
ea3a16ed72e3e73d4dab15c4dc24a29158e3da66 | PHP | mvenkat777/server-api | /se/CollabBoard/Handlers/Commands/InviteUserToCollabCommandHandler.php | UTF-8 | 3,615 | 2.84375 | 3 | [] | no_license | <?php
namespace Platform\CollabBoard\Handlers\Commands;
use Platform\App\Commanding\CommandHandler;
use Platform\CollabBoard\Repositories\Contracts\CollabInviteRepository;
use Platform\App\Exceptions\SeException;
use Platform\Customer\Repositories\Contracts\CustomerRepository;
use Platform\CollabBoard\Mailer\CollabMa... | true |
0f9e333c5d14a8778305f9ac28629e45fb168bcf | PHP | DarkGhostHunter/Fluid | /tests/FluidFillableTest.php | UTF-8 | 2,452 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests;
use DarkGhostHunter\Fluid\Exceptions\InvalidAttributeException;
use DarkGhostHunter\Fluid\FluidFillable;
use PHPUnit\Framework\TestCase;
class FluidFillableTest extends TestCase
{
public function testConstruct()
{
$fluid = new class extends FluidFillable {
protecte... | true |
974b149dd7bab43f1a3e6af360f8b20898b13f81 | PHP | gary246112/uwu | /edit-users.php | UTF-8 | 2,525 | 2.53125 | 3 | [] | no_license | <?php
if(isset($_REQUEST['editId']) and $_REQUEST['editId']!=""){
$row = $db->getAllRecords('users','*',' AND id="'.$_REQUEST['editId'].'"');
}
if(isset($_REQUEST['submit']) and $_REQUEST['submit']!=""){
extract($_REQUEST);
if($username==""){
header('location:'... | true |
a19bc7191f7419ceba3003ff0254f1efb8138a58 | PHP | codememory1/geo | /Interfaces/CountryInterface.php | UTF-8 | 1,211 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace Codememory\Components\GEO\Interfaces;
/**
* Interface CountryInterface
*
* @package Codememory\Components\GEO\Interfaces
*
* @author Codememory
*/
interface CountryInterface
{
/**
* =>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>=>
* Returns the name of the country in a sp... | true |
06da8239d6075d5bb4c11f747c9214a7673de66c | PHP | aslmobile/backend | /models/LuggageType.php | UTF-8 | 2,282 | 2.546875 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
use yii\behaviors\TimestampBehavior;
use yii\helpers\ArrayHelper;
use app\components\MultilingualBehavior;
use app\components\MultilingualQuery;
/**
* This is the model class for table "luggage_type".
*
* @property integer $id
* @property string $title
* @property integer $cr... | true |
7e0c297c14d862cd40ca748a7d38bf37866562a3 | PHP | Demmyart/web-crawler | /backend/src/Service/GrabResultService.php | UTF-8 | 644 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Dto\GrabResultDto;
use App\Entity\GrabResult;
use Psr\Log\LoggerInterface;
class GrabResultService
{
/**
* @var LoggerInterface
*/
private $logger;
public function __construct(LoggerInterface $logger)
{
$this->logger = $logger;
}
public... | true |
48e80089a9a4bfad0f0320e7ed6f75c19c25146e | PHP | ilri/ngombeplanner-android | /web/php/visualizations/modules/mod_get_milk_data.php | UTF-8 | 4,349 | 2.875 | 3 | [] | no_license | <?php
include '../../common/log.php';
include '../../common/database.php';
class MilkDataGetter{
private $TAG = "get_milk_data.php";
private $ROOT = "../../../";
private $settingsDir;
private $settings;
private $logHandler;
private $database;
private $jsonObject;
private $returnResult;
p... | true |
dd39b6a6e1c5943b7213c909e9fbfe52b48e681d | PHP | catchup-forks/PackageEws365 | /src/EnumType/EwsUserConfigurationPropertyType.php | UTF-8 | 1,760 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Ews\EnumType;
/**
* This class stands for UserConfigurationPropertyType EnumType
* @package Ews
* @subpackage Enumerations
* @author WsdlToPhp <contact@wsdltophp.com>
*/
class EwsUserConfigurationPropertyType
{
/**
* Constant for value 'Id'
* @return string 'Id'
*/
const VA... | true |
0f25e518309e98245c9d5362c4f233bc7582946d | PHP | GetResponse/sdk-php-client | /src/Operation/OperationResponse.php | UTF-8 | 1,000 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Getresponse\Sdk\Client\Operation;
use Getresponse\Sdk\Client\Exception\MalformedResponseDataException;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
/**
* Class OperationResponse
* @package Getresponse\Sdk\Client\Operation
*/
interface OperationResponse
{
/**
... | true |
04ff3b67dcf2c6092580c584c6a4750200a5a1f1 | PHP | auburus/FormValidation | /tests/ValidationTest.php | UTF-8 | 1,695 | 2.59375 | 3 | [] | no_license | <?php
namespace Auburus\FormValidation\Tests;
use PHPUnit\Framework\TestCase;
use Auburus\FormValidation\Tests\BasicForm;
class ValidationTest extends TestCase
{
public function testUnsetAttributesValidation()
{
$form = new BasicForm();
$this->assertFalse($form->isValid());
$errors =... | true |
f8372b03771bc645e071e7414ac2ce9b8c8a544b | PHP | sshyran/phoebe | /src/Plugin/AutoJoin/AutoJoinPlugin.php | UTF-8 | 1,496 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Phoebe\Plugin\AutoJoin;
use Phoebe\Event\Event;
use Phoebe\Plugin\PluginInterface;
use Phergie\Irc\Client\React\WriteStream;
class AutoJoinPlugin implements PluginInterface
{
/**
* @var AutoJoinList
*/
protected $list;
/**
* @var bool
*/
protected $autoTrigger;
... | true |
278969bcb0ff35c4bc1e89f97340c77bd0657023 | PHP | df-jonas/UniHelp | /app/Helpers/RandomHelper.php | UTF-8 | 562 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Jonas
* Date: 6/01/2018
* Time: 13:13
*/
namespace App\Helpers;
use App\File;
class RandomHelper
{
static public function generateString($length = 60)
{
return str_random($length);
}
static public function getRandomPublicId()
{
$lengt... | true |
1d0ffc2da0b99ce2b0bb99f704409dc9d6eb0990 | PHP | nnamnguyen/dotb_ims_new | /src/Console/Command/Elasticsearch/CleanupQueueCommand.php | UTF-8 | 1,719 | 2.53125 | 3 | [] | no_license | <?php
namespace Dotbcrm\Dotbcrm\Console\Command\Elasticsearch;
use Dotbcrm\Dotbcrm\Console\CommandRegistry\Mode\InstanceModeInterface;
use Dotbcrm\Dotbcrm\SearchEngine\SearchEngine;
use Dotbcrm\Dotbcrm\SearchEngine\Engine\Elastic;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\Inp... | true |
0da5f3bf8db12c4be8bbf854c94de1bbd99ff012 | PHP | juancarlosDH/php-2019-2 | /manana/DMPDO/clases/Autenticador.php | UTF-8 | 429 | 2.765625 | 3 | [] | no_license | <?php
session_start();
class Autenticador {
public function estaLogeadoElUsuario(): bool
{
return isset($_SESSION['email']);
}
public function logear(Usuario $usuario)
{
$_SESSION['id'] = $usuario->getId();
$_SESSION['email'] = $usuario->getEmail();
$_SESSION['avata... | true |
3469aa1bc6d1bdd1da95cb9f96cb50d219aa4b16 | PHP | PavelStoyan0v/News5 | /src/Controller/NewsletterController.php | UTF-8 | 1,274 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\NewsletterEntry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
use Psr\Log\LoggerInterface;
class NewsletterCo... | true |
d4ca8d5aa8981c87ca9f0a9d7b3d82b5411cf94e | PHP | cpoirier/damage-engine | /server/system/functions/coerce_type.php | UTF-8 | 1,640 | 2.828125 | 3 | [] | no_license | <?php
// Damage Engine Copyright 2012-2015 Massive Damage, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// U... | true |
9b4df90f1cd74739a111f6040e6206266b862c3b | PHP | AndreySemerenko/blog-info | /Core/DB.php | UTF-8 | 398 | 2.796875 | 3 | [] | no_license | <?php
namespace Core;
class DB
{
private static $db;
public static function Instance()
{
if(self::$db == null){
self::$db = self::get();
}
return self::$db;
}
private static function get(){
$db = new \PDO('mysql:host=localhost;dbname=news','... | true |
e5cfaae6fe23b38008420e7e5b60f2ca93b7bcd1 | PHP | jefflloyd66/PhpFunctionalProgramming | /tests/Com/Jblsoftware/Functions/functionsTest.php | UTF-8 | 769 | 3.328125 | 3 | [] | no_license | <?php
include_once '../../../../src/Com/Jblsoftware/Functions/functions.php';
use function Com\Jblsoftware\Functions\compose;
use function Com\Jblsoftware\Functions\flatten;
use function Com\Jblsoftware\Functions\head;
use function Com\Jblsoftware\Functions\println;
use function Com\Jblsoftware\Functions\tail;
use fu... | true |
34c59560c1a4ea672b9431a80d1e84544c569893 | PHP | brianhrowe/Digital_Foos | /webapp/getScores.php | UTF-8 | 9,489 | 2.8125 | 3 | [] | no_license | <?php
header('Content-Type: text/html; charset=UTF-8');
header('Cache-Control: no-cache');
header('Pragma: no-cache');
// config variables
//if(isss)
if(isset($_POST['match_id']))
{
$match_id = $_POST['match_id']; // time frame (seconds) to count active users
}
else if(isset($_GET['match_id']))
{
$m... | true |
9e16e3abb830e2e029e5a3b7ce06b95f299163d4 | PHP | limikael/wp-kpi-series | /inc/model/Series.php | UTF-8 | 1,017 | 2.984375 | 3 | [] | no_license | <?php
namespace kpiser;
class Series {
private static $seriesById=NULL;
private $conf;
public function __construct($conf) {
if (!$conf["id"])
throw new \Exception("Series doesn't have an id");
$this->conf=$conf;
}
public function getId() {
return $this->conf["id"];
}
public function getTitle() {
... | true |
3c58e410abdb806a8719de11547f6e726abc4bdd | PHP | Arpita1607067/webproject | /database.php | UTF-8 | 2,554 | 3.0625 | 3 | [] | no_license | <?php
// define variables and set to empty values
session_start();
$nameErr = $emailErr = $genderErr = $websiteErr = "";
$name = $email = $gender = $comment = $website = "";
if (empty($_POST["user"])== true) {
echo "<h1>Name is required!!!!<br></h1>";
} else {
$name = test_input($_POST["user"]... | true |
1e3c21e94c4ae11c7025c42e301ba78f92e3d0a3 | PHP | wp-plugins/comments-to-nabaztag | /lib/NabChor.class.php | UTF-8 | 1,600 | 3.140625 | 3 | [] | no_license | <?php
/**
* Help you construct a Nab Chorus
*
* @author Robert Curth
* @package NabPHP
* @license GNU General Public License v3
*/
class NabChor
{
private $chor;
/**
* Starts a choeographie
*
* @return $this
*/
public function __construct($slice_lenght)
{
$this->chor = $slice_lengh... | true |
983351a7c1c126ca6f7f0b20b315b05be88332fa | PHP | RemcoKroonen/opdrachtOOP2 | /pokemon.php | UTF-8 | 2,274 | 3.5 | 4 | [] | no_license | <?php
class pokemon {
public $name;
public $energytype;
public $weakness;
public $resistance;
public $attack;
public $hitpoints;
public function __construct($name, $energytype, $weakness, $resistance, $attack, $hitpoints){
$this->name = $name;
$this->energytype = $energytype;
$this->weakness = $weaknes... | true |
a29550e69b574db9152e6f2cd1df084b78312e50 | PHP | eneiasbrumjr/algochallenger | /backend/app/Http/Controllers/UserController.php | UTF-8 | 2,548 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
class UserController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
... | true |
3ce94634fde8d61a49a7e79faab8090e8fe064e2 | PHP | openstate/Politix | /pages/admin/party/php/.svn/text-base/indexPageBase.class.php.svn-base | UTF-8 | 3,019 | 2.703125 | 3 | [] | no_license | <?php
abstract class indexPageBase {
protected $data;
protected $dataLoaded = false;
protected $sortDefault = 'id';
protected $sortDirDefault = 'asc';
protected $sorting = array('col' => '', 'dir' => 'asc');
protected $sortKeys;
public function __construct() {
$this->sortKeys = ar... | true |
b6c7225b21df2005e3fc19430f04f7f62c4dbd66 | PHP | xiebruce/PicUploader | /vendor/sabre/http/lib/functions.php | UTF-8 | 11,910 | 3.078125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Sabre\HTTP;
use DateTime;
/**
* A collection of useful helpers for parsing or generating various HTTP
* headers.
*
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
/**
* Parses a ... | true |
909b860d851417c38b2cf45c7ada8dec75c89492 | PHP | WordPress/wordpress.org | /wordpress.org/public_html/wp-content/plugins/plugin-directory/zip/class-serve.php | UTF-8 | 7,340 | 2.890625 | 3 | [] | no_license | <?php
namespace WordPressdotorg\Plugin_Directory\Zip;
use Exception;
/**
* Serves a Zip file.
*
* This class is designed to be used outside of WordPress.
* That's why we use $wpdb and cache functions directly in some functions.
*
* @package WordPressdotorg\Plugin_Directory\Zip
*/
class Serve {
public functio... | true |
6f945ca1ba110d740f223f38fc344be9c87c5e2f | PHP | zedrdave/kanjibox | /classes/Session.php | UTF-8 | 20,673 | 2.59375 | 3 | [] | no_license | <?php
class Session
{
private $questionLoader;
private $sessionMode;
private $sessionLevel;
private $sessionWSizes;
private $sessionWGrades;
private $sessionWPoints;
private $curWave;
private $waveSize;
private $wavePoints;
private $waveGrade;
private $lastWaveScore = 0;
... | true |
41d2a348d176c43266b394958e08da97ef15d27e | PHP | piiskop/pstk | /Lilian Tikk/shiporder/OrderPersonView.php | UTF-8 | 1,022 | 2.90625 | 3 | [] | no_license | <?php
namespace shiporder;
/**
* This class describes the visual part of order persons.
*
* @namespace shiporder
*/
class OrderPersonView {
/**
* This function builds the list of order persons.
*
* @access public
* @param mixed $parameters['orderPersons']
* the list of order per... | true |
eefece440cb6bf704abd797b8d621a187616a541 | PHP | prokhorenko-vladyslav/LaurelMultiRoute | /src/app/Helpers/functions.php | UTF-8 | 1,569 | 2.640625 | 3 | [] | no_license | <?php
use Laurel\MultiRoute\App\Models\Path;
use Laurel\MultiRoute\MultiRoute;
if (!function_exists('homepage')) {
/**
* Helper for loading homepage
*
* @return Path|null
*/
function homepage(): ?Path
{
return MultiRoute::getHomepage();
}
}
if (!function_exists('pathForSlu... | true |
bbde124708e0c5ef4e313c88039c091b71476b45 | PHP | Payalsonal/The-most-beautiful-pizzas-in-the-world-website-php | /Model/UploadedPost.php | UTF-8 | 840 | 3.1875 | 3 | [] | no_license | <?php
class UploadedPost {
private $id;
private $source;
private $title;
private $description;
private $userID;
public function __construct(
string $source,
string $title,
string $description,
string $userID,
int $id = null
) {
$this->source = $source;
$t... | true |
db0b4b416e30c1789455f5fc4e72e103fcb04922 | PHP | euzin4/4_semestre | /prog2/trabalhos/php/cad_cliente.php | UTF-8 | 9,145 | 2.640625 | 3 | [] | no_license | <?php
include "includes/conexao.php";
if(isset($_GET['confirmar'])){
$nome = addslashes($_GET['nome']);
$email = addslashes($_GET['email']);
$endereco = addslashes($_GET['endereco']);
$bairro = $_GET['bairro'];
$perfil = $_GET['perfil'];
$empresa = isset($_GET['empresa']) ? $_GET['empresa'] : "N... | true |
8a44c2c98ba3d7266509cd127adb03554811206e | PHP | 5l1v3r1/desktop-provisioning-system | /src/html/laboratory.php | UTF-8 | 11,938 | 2.5625 | 3 | [] | no_license | <?php
require("includes/start_libvirt.php");
include "header.php";
$labid = $_GET['id'];
$userid = $_SESSION['username'];
$labs_info = $db->query('SELECT * FROM labs WHERE labid="'.$labid.'"');
foreach($labs_info as $lab_info)
{
$lab = $lab_info;
}
if(!isset ($lab['labid']))
{
exit("lab doesnt exist");
header("L... | true |
83b3ed5e3aed95e370873c821e47f0f8eaa45d3c | PHP | umbrellaitcom/Code-Boilerplates | /symfony/src/Builders/MenuItemBuilder.php | UTF-8 | 1,539 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Builders;
use App\Entity\MenuItem;
use App\Validator\AbstractValidator;
use App\System\AppHelper;
class MenuItemBuilder extends AbstractValidator
{
public const FIELD_NAME = 'name';
public const FIELD_PRICE = 'price';
public const FIELD_CATEGORY = '... | true |
d307af83d9ddcbc4df25b180a5a5f2abb536b6d9 | PHP | cdbrown1977/brightree | /src/Brightree/ApiMessageServices/Doctor.php | UTF-8 | 299 | 2.578125 | 3 | [] | no_license | <?php
namespace Brightree\ApiMessageServices;
use Brightree\CommonServices\Name;
use Brightree\ApiMessageServices\MedicalInfo;
class Doctor {
public $Name;
public $MedicalInfo;
public function __construct() {
$this->Name = new Name();
$this->MedicalInfo = new MedicalInfo();
}
}
| true |
3a464be5fc0204ba871983774eefe9c1511ee924 | PHP | reportshow/mingrui | /backend/models/MingruiLogin.php | UTF-8 | 1,234 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "mingrui_login".
*
* @property string $id
* @property string $uid
* @property string $logintime
*/
class MingruiLogin extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
... | true |
ba0ac2244a81dc7022b31416bef11000775ad341 | PHP | KwasiEzor/larablog | /app/Models/Post.php | UTF-8 | 1,023 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use App\Models\User;
use App\Models\Category;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Support\Str;
class Post extends Model
{
use HasFactory;
protected $guarded = [];
// Permet de d'associer directement lo... | true |
c903088ce804d637de01ba87fd16afd88cf7e268 | PHP | YukiKuramoto/TechBoostText | /Laravel_02/practice.php | UTF-8 | 824 | 3.875 | 4 | [] | no_license | <?php
$a = 3;
$b = 7;
echo $a + $b . "\n";
$integer = 10;
$string = "abc";
echo $string . "\n";
$new_integer = $integer + 10;
echo $new_integer . "\n";
$array = [2017, 2018, 2019, 2020];
echo $array[2] . "\n";
$array2 = ["spring", "summer", "autumn", "winter"];
echo $array2[1] . "\n";
$animals = [
"cat" => "猫",
... | true |
a7999b5be54ea727378c4af9474ef1d7a01a1824 | PHP | 50u50/killershop | /src/Api/Service/Catalog/ProductHydrator.php | UTF-8 | 1,323 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Api\Service\Catalog;
use App\Api\Entity\Catalog\Product;
use App\Api\Service\Catalog\Product\RequestHandler\SimpleProductHandlerProduct;
use App\Api\Service\MoneyService;
class ProductHydrator
{
/**
* @var MoneyService
*/
private $moneyService;
/**
* @var SimpleProductH... | true |
4955d017890a1ac587b106a9460a1345976f6116 | PHP | GianWeigert/TGI | /insert_scripts/insertFornecedorTable.php | UTF-8 | 1,964 | 2.546875 | 3 | [] | no_license | <?php
ini_set('default_charset','UTF-8');
$pdo = new PDO('mysql:host=127.0.0.1;dbname=gastos_parlamentares_db;charset=utf8', 'root', 'root');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// $xml = simplexml_load_file(__DIR__ . '/../Dados/Ano-2009.xml');
// $xml = simplexml_load_file(__DIR__ . '/..... | true |
931e4cdd08f8b44db254706f7857d9321d938511 | PHP | obelaw/framework | /src/Views/Layout/AuthLayout.php | UTF-8 | 596 | 2.546875 | 3 | [] | no_license | <?php
namespace Obelaw\Framework\Views\Layout;
use Illuminate\View\Component;
use Illuminate\View\View;
class AuthLayout extends Component
{
/**
* The alert message.
*
* @var string
*/
public $modules;
/**
* Create the component instance.
*
* @param string $type
... | true |
783dc05c2534a2921dbf726c386516dbe86e19f2 | PHP | ThangLuuQuoc/aboutme | /abus/ajaxContent.php | UTF-8 | 869 | 2.53125 | 3 | [] | no_license | <?php
require ("includes/secure.php");
require ("../includes/config.php");
require ("../includes/class/content.class.php");
$content = new Content();
if( isset ($_POST["cont_code"]) && (int) $_POST["cont_code"] > 0 && isset ($_POST["cont_order"]) && count ($_POST) == 2){
$cont_code = (int) $_POST["cont... | true |
9192cd80d6a98e5ed97c277684c2ab36d2b811e0 | PHP | Xayan/c3js-php | /src/Chart/ChartInterface.php | UTF-8 | 422 | 2.765625 | 3 | [] | no_license | <?php
namespace C3\Chart;
use C3\Enum\ZoomTypeEnum;
use JsonSerializable;
interface ChartInterface extends JsonSerializable
{
/**
* @return array
*/
public function getColumns(): array;
/**
* @return array
*/
public function getNames(): array;
/**
* @param ZoomTypeEnum ... | true |
068b48eb1f77a37c49de094184f77b104489b930 | PHP | ramadhanfebbry/Kalpa-tree | /core/app/User.php | UTF-8 | 2,202 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use Notifiable, SoftDeletes;
const DESTINATION_PATH = 'files/users';
const ROLE_USER = '0';
const ROLE_ME... | true |
be4732942587bac98906a09f354b92ea3ec902d9 | PHP | ajav00/-PHP-HTML-Materialize-SQL-JQuery-JS--Proyecto-Discos | /clases/Genero.php | UTF-8 | 858 | 3.15625 | 3 | [] | no_license | <?php
class Genero{
private $id_genero;
private $nombre_gen;
public function __construct($nombre_gen, $id_genero=null )
{
$this->id_genero= $id_genero;
$this->nombre_gen= $nombre_gen;
}
/**
* Get the value of id_genero
*/
... | true |
dbef5bbb2466a6b09d8902dfbf9f663dd4df8783 | PHP | rhertzog/tuleap | /plugins/ldap/bin/registerUser.php | UTF-8 | 2,159 | 2.875 | 3 | [] | no_license | <?php
require_once('pre.php');
require_once(dirname(__FILE__).'/../include/LDAP_UserManager.class.php');
require_once 'common/user/UserManager.class.php';
/**
* Extract parameters from user input
*
* This function reassamble user submitted values splited by PHP. PHP transform
* user input in an array, the cut is ... | true |
e1f1ba3c32332e28c365d49a8c524ad9bc279da8 | PHP | AgencyPMG/Queue | /src/Lifecycle/MappingLifecycle.php | UTF-8 | 3,123 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php declare(strict_types=1);
/**
* This file is part of PMG\Queue
*
* Copyright (c) PMG <https://www.pmg.com>
*
* For full copyright information see the LICENSE file distributed
* with this source code.
*
* @license http://opensource.org/licenses/Apache-2.0 Apache-2.0
*/
namespace PMG\Queue\Lifecycle;
... | true |
2c936e3e2d4d56daff0a301561bf438a2466d376 | PHP | maribelmarroquin/evalua0.1 | /app/Http/Controllers/AlumnoController.php | UTF-8 | 1,351 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Evalua\Http\Controllers;
use Evalua\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Redirect;
use Session;
class AlumnoController extends Controller {
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index() {
return view('Al... | true |
e8bf74fddbf5de66a85b3eaf9fd52a3b9b5344f3 | PHP | zhizhnevskiy/studyCourseOnline | /PHPStart/04/data.php | UTF-8 | 434 | 2.875 | 3 | [] | no_license | <?php
require_once "classes.php";
$con = mysqli_connect("127.0.0.1", "root", "root", "testsite");
mysqli_set_charset($con, "utf8");
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$books = [];
$query = "SELECT * FROM book;";
$result = mysqli_query($con, $query);
whi... | true |
d651138d7fd55882b3afbfa2c27e49e90e0b6779 | PHP | miklobit/opencaching-pl | /Utils/Database/XDb.php | UTF-8 | 4,717 | 3.265625 | 3 | [] | no_license | <?php
/**
* This class SHOULDN'T BE USED in any new implementations.
* This is wrapper on OcDb class created for fast replacement mysql_* functions
* without bigger integrations in the code.
*/
namespace Utils\Database;
use PDOStatement;
use PDOException;
class XDb extends OcDb {
/**
* This is replacem... | true |
e561bb7b99807e9d48d6f883e1dd216e589372ab | PHP | kouzze01/line-bot-exam-php-master | /reply_from_db.php | UTF-8 | 3,575 | 2.78125 | 3 | [] | no_license | <?php
// //
// DB Connection //
//echo $url." ".$server." ".$username." ".$password." ".$db;
//$conn = new mysqli($server, $username, $password, $db);
function startsWith($haystack, $needle)
{
$length = strlen($needle);
return (substr($haystack, 0, $length) === $needle);
}
function endsWith($haystack, $n... | true |
49fe9f6483fb8fedb3f616e740c0df9e3aa0f44d | PHP | jvaneg/openLeaderboard | /pages/userSearchResults.php | UTF-8 | 1,409 | 2.515625 | 3 | [] | no_license | <?php
$headerPath = $_SERVER['DOCUMENT_ROOT'];
$headerPath .= "/header/header.php";
include_once($headerPath);
?>
<?php
include_once($_SERVER['DOCUMENT_ROOT'] . "/dbfiles/dbFunctions.php");
?>
<!--<div class="result-title"> </div>-->
<section class="search-container">
<div class="search-wrapper"><h2>Result for <... | true |
345d33dd78a9300031c6bd132f0592e6a065fdf5 | PHP | hulin42/TCM | /plugins/clickthru-meta-handler.php | UTF-8 | 2,066 | 2.625 | 3 | [] | no_license | <?php
class Tw_Clickthru_Meta_Handler {
const SUPPORTS = 'clickthru-url';
const NONCE_NAME = 'clickthru-url-nonce';
const NONCE_VALUE = 'clickthru-url-nonce-action';
function initialize() {
add_action('add_meta_boxes', array(&$this, 'add_metabox'), 10, 2);
add_action('save_post', array(&$this, 'upd... | true |
9e9505c4c2e7a21ae2748034dc67593d2ecf96a8 | PHP | nickdavies791/concern-app | /app/Helpers/helper.php | UTF-8 | 672 | 2.53125 | 3 | [] | no_license | <?php
if (!function_exists('storage_folder_subfolder')) {
function storage_folder_subfolder($folderA, $folderB, $file) {
$path = storage_path('app/public/'.$folderA.'/'.$folderB.'/'.$file);
abort_unless(File::exists($path), 404);
return response()->make(File::get($path), 200)->header('Conte... | true |
44c89fd964e5ec194dd338cdb7a769988ba849d1 | PHP | bestit/PHP_CodeSniffer | /src/Standards/BestIt/Sniffs/VariableRegistrationTrait.php | UTF-8 | 412 | 2.625 | 3 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0",
"OSL-3.0"
] | permissive | <?php
declare(strict_types=1);
namespace BestIt\Sniffs;
use const T_VARIABLE;
/**
* Helps you with the registration of the var sniffs.
*
* @author blange <bjoern.lange@bestit-online.de>
* @package BestIt\Sniffs
*/
trait VariableRegistrationTrait
{
/**
* Sniffs for variables.
*
* @return arra... | true |
71e491f11f040bca3fd6d5e5e522dcd0049fe30e | PHP | jbalieux/senapi | /src/SenapiClass/ConsoleClass.php | UTF-8 | 791 | 2.75 | 3 | [] | no_license | <?php
namespace App\SenapiClass;
use Symfony\Component\Console\Helper\Helper;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Console\Formatter\OutputFormatter;
class ConsoleClass extends SymfonyStyle
{
public function section($message)
{
$this->newLine();
$this->write... | true |
d767d7f281b984b439fd65ef85460a79757d0d44 | PHP | sslab-gatech/autofz | /docker/benchmark/seeds/fuzzer-test-suite/php-fuzz-parser/try_catch_finally_004.phpt | UTF-8 | 553 | 3.28125 | 3 | [
"MIT"
] | permissive | <?php
function throw_exception($msg) {
throw new Exception($msg);
}
function foo (&$ex) {
try {
echo "1";
try {
echo "2";
throw_exception("try");
} catch (Exception $e) {
echo "3";
throw_exception("catch");
} finally {
echo "4";
throw_exce... | true |
aa231a2e47f7cf3b3dd3203ed804aa6d3702ed70 | PHP | iBotPeaches/php-binary-reader | /src/Type/Int8.php | UTF-8 | 1,288 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace PhpBinaryReader\Type;
use PhpBinaryReader\BinaryReader;
use PhpBinaryReader\BitMask;
class Int8 implements TypeInterface
{
public string $endian = 'C';
public function read(BinaryReader &$br, int $length = null): int
{
if (!$br->canReadBytes(1)) {
... | true |
8fe1ba019cf81ebe6e9a31f0f401f63ba38e40f0 | PHP | Gavrysh/koterov | /Chapter 20/ex08.php | UTF-8 | 350 | 2.8125 | 3 | [] | no_license | <?php ##Іменування карманів
$str = '2018-06-29';
$re = '#^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$#';
preg_match($re, $str, $matches) or die('Співпадіння не знайдено!');
echo 'День: '.$matches['day'].'<br>';
echo 'Місяць: '.$matches['month'].'<br>';
echo 'Рік: '.$matches['year'].'<br>'; | true |
a42cf7ee003e6532b7d44255ad676984d5f7ab56 | PHP | tianyayoucao/dbpedia | /wikiCompany/WikipageExtractor.php | UTF-8 | 1,037 | 2.875 | 3 | [] | no_license | <?php
/**
* For every DBpedia resource, this Extractor sets a Link to the corresponding
* Wikipedia page.
*
*/
class WikipageExtractor implements Extractor
{
const extractorID = "http://dbpedia.org/extractors/WikipageExtractor";
private $language;
public function getExtractorID() {
... | true |
e945f0a21008b1179f1e9bcd90ac854b7e4c8cd0 | PHP | juliengrima/bleau_S1_2016_jeuxdedames | /src/CmsBundle/Entity/Artiste.php~ | UTF-8 | 6,469 | 2.671875 | 3 | [] | no_license | <?php
namespace CmsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Artiste
*/
class Artiste
{
public $file;
protected function getUploadDir()
{
return 'uploads/imgcms';
}
protected function getUploadRootDir()
{
return __DIR__ . '/../../../web/' . $this->getUploa... | true |
9e76070251cbb22255bf317ec679d29e22156914 | PHP | ryanbekabe/parking-system | /database/migrations/2019_07_27_001508_create_parking_transactions_table.php | UTF-8 | 1,232 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateParkingTransactionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('par... | true |
0d5da1b5ffd5d3518114fe1cd6b8fa1c49eee099 | PHP | farashaidarp/quiz-3-im-laravel-juni-2020 | /app/Model/Article.php | UTF-8 | 1,163 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\Model;
class Article
{
public static function get_all() {
return DB::table('article')->get();
}
public static function find_by_id($id) {
return DB::table('article')->where('id', $id)->first();
... | true |
c92797251fa39cb1470866a75ba3ef074611445c | PHP | PieterScheffers/arrr | /src/Ar.php | UTF-8 | 9,462 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace pisc\Arrr;
use Closure;
use pisc\upperscore as u;
use pisc\Arrr\Sort;
use pisc\Arrr\Arrr;
class Ar
{
protected $attributes;
public function __construct($attributes)
{
$this->attributes = $attributes;
}
public static function instance($attributes)
{
return new Arrr($attributes);
}
publi... | true |
16370a725a92723b5716c8a79edde7bc02f64ebb | PHP | NickyRandles/Year-3-Major-Group-Project | /editPost.php | UTF-8 | 4,794 | 2.78125 | 3 | [] | no_license | <?php
error_reporting(E_ALL ^ E_WARNING);
include_once("include/header.php");
include_once("include/checkLoginStatus.php");
if($loggedIn != true){
header("location: http://localhost:8080/Project/");
exit();
}
if(isset($_GET["id"])){
$id = $_GET["id"];
}
else{
header("location: http://localhost:8080/Project/");
}... | true |
f141ca8664c51ece3836d9aa16258444d53a18c5 | PHP | dumistoklus/salon | /Orgup/Expansions/IndexOutputer.php | UTF-8 | 2,820 | 2.578125 | 3 | [] | no_license | <?php
namespace Orgup\Expansions;
use \Orgup\Application\Exception\Config\ConfigIsBreak;
use \Orgup\Application\Logger;
class IndexOutputer extends \Orgup\Application\Outputer {
private $template_engine;
private $Templator;
private $Data;
private $Ways;
protected $required_styles = array(
... | true |
a71efab4f098e0e9c1acf1f2a4bd4750a27dfbca | PHP | PracticeForProgramming/BIke-Rental-Revised | /bootstrap-datetimepicker-master/sample in bootstrap v3/uncheck form.php | UTF-8 | 1,727 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | <!DOCTYPE html>
<html>
<head>
<style>
table {
width: 100%;
border-collapse: collapse;
}
table, td, th {
border: 1px solid black;
padding: 5px;
}
th {text-align: left;}
table#t01 tr:nth-child(even) {
background-color: #eee;
}
table#t01 tr:nth-child(odd) {
background-color:#fff;
}
table#t01 th ... | true |
4b5f580a18e38f32de1b13b975f7873f4195955a | PHP | Xkeeper0/links-awakening-junk | /tiles2.php | UTF-8 | 762 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
$i = imagecreatetruecolor(256, 256);
$b = imagecolorallocate($i, 127, 0, 0);
$c = imagecolorallocate($i, 255, 255, 255);
for ($n = 0; $n < 256; $n++) {
$t = hexout($n);
$c = imagecolorallocate($i, $n / 1.5, $n / 1.5, 100 + $n / 2);
if ($n >= 0xf5) $c = imagecolorallocate($i, 128 + ($n - 0xf5) * 11, ($... | true |
41a469efa436b6b865861639e8f130286c598c59 | PHP | Level42/NotJaxbBundle | /Annotation/AnnotationLoader.php | UTF-8 | 8,727 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the NotJaxbBundle package
*
* (c) Level42 <level42.dev@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Level42\NotJaxbBundle\Annotation;
use Level42\NotJaxbBundle\Exceptions\Ma... | true |
dc693f696809361e381d0440e480b67e7927e5cc | PHP | TheBeigeProgrammer/Turing-Web | /Backup Folder (do not touch!)/Backup 1/btnclick.php | UTF-8 | 498 | 2.84375 | 3 | [
"MIT"
] | permissive | <html>
<head>
</head>
<body>
<h1>Test</h1>
<?php
try {
$code = $_GET["CodeData"];
echo $code;
$my_file = 'code.txt';
$handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file); //open file for writing ('w','r','a')...
fwrite($handle, $code);
$error = `C:\Python27\pytho... | true |
76548cff729ba9d0fc12b51a92a62b02790c6f9a | PHP | mshukurlu/its | /app/Repository/UserRepository.php | UTF-8 | 3,156 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repository;
use App\User;
use function foo\func;
use Illuminate\Http\Request;
/**
* Created by PhpStorm.
* User: Murad
* Date: 6/3/2019
* Time: 6:47 PM
*/
class UserRepository implements UserInterface
{
protected $userModel,$request,$start,$length,$draw,$ordering,$orderBy,$dir,$columns=[... | true |
e2ff8e382b04cbe58e2972047f3115817637a5bd | PHP | sysoleil/GillesArnaudProject | /src/Entity/Course.php | UTF-8 | 3,460 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\CourseRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CourseRepository::class)
*/
class Course
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(ty... | true |
a65b85e666a83d56604191247caf730eaa434422 | PHP | aaron5zavala/aaron | /Server/test.php | UTF-8 | 576 | 3.125 | 3 | [] | no_license | <?php
/*
* Test de manejo de datos en formato JSON con PHP
*/
$arreglo[0]['nombre'] = "Yanai";
$arreglo[0]['carrera'] = "ISW";
$arreglo[0]['materias'] = 6;
$arreglo[1]['nombre'] = "Hugo";
$arreglo[1]['carrera'] = "ISW";
$arreglo[1]['materias'] = 7;
//Codificar a JSON y mostrarlo en pantalla
header('Content-... | true |
287f2a050bd47d022841546cb09c2cf6bfbbfdab | PHP | yanwumo/DishDash | /cart.php | UTF-8 | 1,318 | 3 | 3 | [] | no_license | <?php
if (!isset($_GET['table']) || empty($_GET['table'])) {
exit();
}
$db = new PDO('sqlite:data.sqlite');
?>
<?php
if (isset($_GET['id']) && !empty($_GET['id'])) {
$stmt = $db->prepare("INSERT INTO orders (table_id, dish_id) VALUES (:table_id, :dish_id)");
$stmt->bindParam(":table_id", $_GET['table']);
... | true |
9251259622b97ad4da5e1453d4e4fc3d24764e13 | PHP | ElectricMaxxx/nlu-meets-php | /rasa_client/lib/Model/ParseResponse.php | UTF-8 | 3,239 | 2.90625 | 3 | [] | no_license | <?php
namespace RASA\NLU\Model;
use Webmozart\Assert\Assert;
/**
* @author Maximilian Berghoff <Maximilian.Berghoff@mayflower.de>
*/
class ParseResponse
{
/**
* @var Intent
*/
private $intent;
/**
* @var array|Entity[]
*/
private $entities;
/**
* @var array|Intent[]
... | true |
ff596c62f34e560f0ab4a20ac6e67d79b9882269 | PHP | mfrdm/yii2-seo | /models/SeoMetaSearch.php | UTF-8 | 1,485 | 2.515625 | 3 | [] | no_license | <?php
namespace linchpinstudios\seo\models;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use linchpinstudios\seo\models\SeoMeta;
/**
* SeoMetaSearch represents the model behind the search form about `linchpinstudios\seo\models\SeoMeta`.
*/
class SeoMetaSearch extends SeoMeta
{
/**
* ... | true |
edb7687fe88e0520b665b8492a1f3fbe9b1a8c36 | PHP | fredsted/primi | /tools/phpcb-benchmarks/if_vs_switch.php | UTF-8 | 1,733 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__ . "/../../vendor/autoload.php";
$bench = new \Smuuf\Phpcb\PhpBenchmark(new \Smuuf\Phpcb\ChaoticEngine);
const VALUES = [100, false, true, "ahoj", 0, "damn"];
function testA() {
$val = VALUES[array_rand(VALUES)];
if ($val === 100) {
$x = 1;
} elseif ($val === false) {
$x = 1;
} elseif ... | true |
78fb8f006377674679bb2fbf2e46dfb10415ab88 | PHP | nocriz/restler | /tests/Api/ClientTest.php | UTF-8 | 961 | 2.640625 | 3 | [] | no_license | <?php
use Api\Client;
use Api\AbstractTest as AbstractTest;
class ClientTest extends AbstractTest
{
public $instance;
public function assertPreConditions()
{
$this->assertTrue(
class_exists($class = 'Api\Client'),
'Class not found: '.$class
);
$thi... | true |
af0e10def9fc5a236276c19c2aa30d99adf49b5c | PHP | charisma-beads/charisma-beads | /module/Newsletter/src/Model/NewsletterModel.php | UTF-8 | 1,619 | 2.890625 | 3 | [] | no_license | <?php
namespace Newsletter\Model;
use Common\Model\Model;
use Common\Model\ModelInterface;
class NewsletterModel implements ModelInterface
{
use Model;
/**
* @var int
*/
protected $newsletterId;
/**
* @var string
*/
protected $name;
/**
* @var string
*/
... | true |
596c14ae6e44a949ee8fc4979a2147ddf17c6941 | PHP | BeSimple/BeSimpleI18nRoutingBundle | /src/Routing/RouteGenerator/FilteredLocaleGenerator.php | UTF-8 | 1,505 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace BeSimple\I18nRoutingBundle\Routing\RouteGenerator;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
/**
* A route generator to only allow a specified set of locales.
* Any locales that are not within the supported list will not be generated.
*/
class FilteredLocal... | true |
cd5ecc9a749bac291138a7a008613014cfd41bcd | PHP | manelpm10/php-value-objects | /src/Exception/Geography/LatitudeInvalidException.php | UTF-8 | 384 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace ValueObjects\Exception\Geography;
/**
* Class LatitudeInvalidException.
*/
final class LatitudeInvalidException extends \InvalidArgumentException
{
/**
* @param mixed $value
*/
public function __construct($value)
{
parent::__construct(sprintf('Invalid latitude value <%s... | true |
3191e9ebaa872e278d4dd00928d9362d0a99267e | PHP | deyvidwms/pysistem | /config/config.php | UTF-8 | 616 | 2.703125 | 3 | [] | no_license | <?php
/*
* Nome: config.php
*
* Pagina que faz conexao com o banco de dados.
*
* @author Deyvid
*
* */
$dsn = "mysql:dbname=deyviddev_pysistem;host=localhost";
$dbuser = "deyviddev_pysistem";
$dbpass = "Psystem@2021";
try {
$pdo = new PDO($dsn, $dbuser, ... | true |
7458e1979983bbae793f7d7e5c90aa3674cfed67 | PHP | sopheaknova/sgfecambodia | /includes/functions_widget.php | UTF-8 | 11,231 | 2.671875 | 3 | [] | no_license | <?php
// Register thumbnail sizes.
if ( function_exists('add_image_size') )
{
$sizes = get_option('jlao_cat_post_thumb_sizes');
if ( $sizes )
{
foreach ( $sizes as $id=>$size )
add_image_size( 'cat_post_thumb_size' . $id, $size[0], $size[1], true );
}
}
//Widget to show recently post only News category
clas... | true |
1f01a5c3f372e36f7e4b1c9f5fb3340f718f2c36 | PHP | sachitbatra/RoommateFinder | /Preferences - Experiment.php | UTF-8 | 4,049 | 2.71875 | 3 | [] | no_license | <?php
require 'Preferences-Connect.php';
session_start();
$email_id = 'placeholder'; //$_SESSION['email_id'];
$query = "SELECT id FROM users WHERE email = '$email_id'";
if ($query_run = mysql_query($query))
{
$query_num_rows = mysql_num_rows($query_run);
if ($quer... | true |
85a5b58b7f52d2dd0c70bbdc4c260f42075b0e37 | PHP | aymenouer/Project-spark | /produit_categories/views/admin php/views/modifiersortie.php | UTF-8 | 1,407 | 2.671875 | 3 | [
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | <HTML>
<head>
</head>
<body>
<?PHP
include "../entities/sortie.php";
include "../core/sortieC.php";
if (isset($_GET['id_sortie'])){
$sortieC=new sortieC();
$result=$sortieC->recuperersortie($_GET['id_sortie']);
foreach($result as $row){
$id_sortie=$row['id_sortie'];
$nom=$row['nom'];
$lieu=$row['lieu'];
$... | true |
762cf33efee9b7aa5785440ef1f51b66c540645b | PHP | sumbochao/qlbds | /app/Http/Responses/Backend/Street/EditResponse.php | UTF-8 | 705 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Responses\Backend\Street;
use Illuminate\Contracts\Support\Responsable;
class EditResponse implements Responsable
{
/**
* @var App\Models\Street\Street
*/
protected $streets;
/**
* @param App\Models\Street\Street $streets
*/
public function __construct($s... | true |
7812b93fb0d87c469d95339e5a99d37a07a4bfa8 | PHP | geantrfr/SiteWebEasyWeb | /NoteFrais.php | UTF-8 | 4,011 | 2.734375 | 3 | [] | no_license | <?php
session_start();
require_once 'Autoload/autoload.php';
include "Functions/VerificationConnexion.php";
$nomPage = basename(__FILE__, ".php"); //récup du nom de la page
$nomPage = strtoupper($nomPage); // Mise en Majuscule.
$noteFraisManager = new NoteDeFraisManager();
$listing = "";
$modification... | true |
927d96c7b778154e455c4874fe2541b5fb9a7cf0 | PHP | jrivera294/contabilidad | /app/models/Cuenta.php | UTF-8 | 1,166 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
class Cuenta extends Eloquent {
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'cuenta';
protected $fillable = array('nombre','tipo','descripcion');
protected $guarded = array('id');
public $errors;
public function Operacion(){
return $... | true |
364be5a9f6cf29eb7502e34fb599aef5841adb29 | PHP | jdecool/polyfill-easter | /src/easter.php | UTF-8 | 1,171 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
if (!function_exists('easter_date')) {
/**
* @see http://php.net/manual/en/function.easter-date.php
*
* Source from http://php.net/manual/en/function.easter-date.php#47249
*/
function easter_date($year = null)
{
// G is the Golden Number-1
// H is 23-Epact (modulo ... | true |
7f8e148a74677919433d32406453bee699df0c19 | PHP | nathansalter/genetic-algorithm | /test/ParametersTest.php | UTF-8 | 3,425 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace GeneticAlgorithm;
use PHPUnit\Framework\TestCase;
class ParametersTest extends TestCase
{
/**
* @var Parameters
*/
private $parameters;
protected function setUp(): void
{
$this->parameters = new Parameters();
}
public function testOrganismFactory()
{
... | true |
f05dea2fbcaa1e7f216d8b32ee3c201f56307f51 | PHP | quadrant26/php | /imooc/cookie_session/cookie06.php | UTF-8 | 480 | 3.203125 | 3 | [] | no_license | <?php
header("Content-type:text/html; charset=utf-8");
echo "session 使用".'<br />';
/*
*session的使用
* */
//1. 开启session
session_start();
//2. 对session 进行读写
$_SESSION['test'] = time();
var_dump( $_SESSION );
//1.
// session_start();
$_SESSION['ary'] = array('name' => 'jobs');
$_SESSION['obj'] = new stdClass();
v... | true |
0cf199d84a173abdd78f36c0569a4c228c311b65 | PHP | jodylane/LibraryLending | /includes/header.php | UTF-8 | 2,268 | 2.890625 | 3 | [] | no_license | <?php
/**
* User: Nathan Ekema
* Date: 11/5/2016
* Description: This file was created to be used as the header section
*/
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
$count = 0;
// retrieve cart content
if (isset($_SESSION['cart'])) {
$cart = $_SESSION['cart'];
if ($cart) {
$... | true |