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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
932c24f333a736e97d02856f76f7e228e15d3065 | PHP | allenwakeup/workflower | /src/Workflow/ItemInterface.php | UTF-8 | 1,244 | 2.59375 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/*
* Copyright (c) Atsuhiro Kubo <kubo@iteman.jp> and contributors,
* All rights reserved.
*
* This file is part of Workflower.
*
* This program and the accompanying materials are made available under
* the terms of the BSD 2-Clause License which accompanies this
* distribution, and is available at http:/... | true |
f02fef8bce5ec54ef722f5d883f417002792cb09 | PHP | CodeExpertsLearning/laravel-mastery-eventos | /app/Models/Event.php | UTF-8 | 2,374 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Spatie\Sluggable\HasSlug;
use Spatie\Sluggable\SlugOptions;
class Event extends Model
{
use HasFactory, HasSlug;
protected $fillable = ['title', 'description', 'body', 'slug', 'st... | true |
fa3d7ff238227bbf9c5b7f9ad98e9f068683ddf4 | PHP | 1blankz7/php-structure-check | /src/Type/EnumType.php | UTF-8 | 892 | 2.984375 | 3 | [] | no_license | <?php
namespace Cubicl\StructureCheck\Type;
use Cubicl\StructureCheck\Result;
use Cubicl\StructureCheck\ResultInterface;
class EnumType implements TypeInterface
{
/**
* @var array
*/
private $values = [];
/**
* @var string
*/
private static $errorMessage = 'The value %s is not in... | true |
cfcfe703060f4f8d556badfa62d078cdc26bda2f | PHP | elcash/mageunit-satellite | /generate_flat_xml.php | UTF-8 | 2,555 | 3.125 | 3 | [] | no_license | <?php
header("Content-type: text/xml");
$opts = getopt('t:c:o:w:h');
foreach (array_keys($opts) as $opt) {
switch ($opt) {
case 'h':
fwrite(STDOUT,
$_SERVER['PHP_SELF'] . ": Generate xml seed file for use with phpunit.\n
Takes explicit table name and 1 or more ex... | true |
6b56468cfec4aba7bf1103f22a113247a19d8468 | PHP | faisalmalik932/school | /app/Vos/HumanResourceVOS/AddEntitlementVO.php | UTF-8 | 3,882 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: PHP Developer
* Date: 10/2/2017
* Time: 3:33 PM
*/
namespace App\Vos\HumanResourceVOS;
use App\Vos\BaseVO;
class AddEntitlementVO extends BaseVO
{
protected $entitlementId;
protected $employeeId;
protected $departmentId;
protected $branchId;
pro... | true |
2c51a05d6ef0c86c0b20d292d7bbcac8cccb0098 | PHP | Atipik/Hoa-WebSocket-Bundle | /WebSocket/Server.php | UTF-8 | 671 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Atipik\Hoa\WebSocketBundle\WebSocket;
use Atipik\Hoa\WebSocketBundle\Log\Logger;
use Hoa\Websocket\Server as HoaWebSocketServer;
/**
* Server
*/
class Server extends HoaWebSocketServer
{
protected $logger;
/**
* Returns current logger
*
* @return Atipik/Hoa/WebSocketBundle/L... | true |
b41431b9e6ba6d74c96752184627ad0339396b74 | PHP | mrserg161/keep-a-changelog | /src/Version/ReadyLatestChangelogEvent.php | UTF-8 | 2,416 | 2.65625 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
* @see https://github.com/phly/keep-a-changelog for the canonical source repository
*/
declare(strict_types=1);
namespace Phly\KeepAChangelog\Version;
use Phly\KeepAChangelog\Common\AbstractEvent;
use Phly\KeepAChangelog\Common\ChangelogEntryAwareEventInterface;
use Phly\KeepAChangelog\Common\Chan... | true |
bfbc6d3143ecabddc5a8f9cddd1e755490affd1a | PHP | logue/LukiWiki-core | /src/LukiWiki/Rules/Alignment.php | UTF-8 | 1,913 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* 位置決めクラス.
*
* @author Logue <logue@hotmail.co.jp>
* @copyright 2018 Logue
* @license MIT
*/
namespace Logue\LukiWiki\Rules;
class Alignment
{
/**
* ブロック型.
*
* @param string $align
*
* @return string
*/
public static function block(string $align)
{
... | true |
476de07d462be72d2d9932722e0402518b7ef274 | PHP | saralavanchy/BeerChargeClient | /Model/Client.php | UTF-8 | 569 | 2.953125 | 3 | [] | no_license | <?php namespace Model;
class Client extends Person {
private $id_person;
private $account;
public function __construct ($name, $surname, $dni, $address, $phone, $account = null) {
parent::__construct($name, $surname, $dni, $address, $phone);
$this->setAccount($account);
}
public function setId($v... | true |
2e893405bb8c71c2f7820460b8534f423ead79cb | PHP | Bludova/basics_of_php | /test.php | UTF-8 | 3,796 | 2.9375 | 3 | [] | no_license | <?php
$nomTest = ($_GET);
foreach($nomTest as $number => $k) {
}
$filelist = glob("*.json");
$search = array_search($k, $filelist);
if($search === false ){
http_response_code(404);
exit();
}
$json = file_get_contents(__DIR__ ."/$k");
$data = json_decode($json, true);
$issues_1 = $data["question_1"];
$... | true |
644679d7df7a3fe4d608551a482815a24740cdd4 | PHP | rezatrue/api | /objects/orderitem.php | UTF-8 | 2,629 | 3.140625 | 3 | [] | no_license | <?php
class Orderitem{
// database connection and table name
private $conn;
private $table_name = "tbl_orderitems";
// object properties
public $orderID;
public $userSerialNo;
public $itemSerialNo;
public $itemName;
public $itemQuantity;
public $itemPrice;
// constructor with $db as database connec... | true |
61fdd2e56456138f514b0ba8c6157ec0d859eb31 | PHP | praxigento/composer_plugin_templates | /src/Main.php | UTF-8 | 6,201 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) 2014, Praxigento
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
* - Redistributions of source code must retain the above copyright notice, this list of conditions... | true |
f04d9691a81f00500b6b314b18fdef0015d52b4f | PHP | das-alex/testBeeJee | /views/View.php | UTF-8 | 539 | 2.859375 | 3 | [] | no_license | <?php
class View {
function getTemplate($template, $params = array()) {
extract($params);
ob_start();
include ROOT."/views/".ucfirst($template)."View.php";
return ob_get_clean();
}
function combineTemplates($template, $params = array()) {
$content = $this->getTempla... | true |
c722909f6aa51741bd8e22d9b9477c41ed39af43 | PHP | neodyymi/Tsoha-Bootstrap | /app/controllers/player_controller.php | UTF-8 | 5,308 | 2.78125 | 3 | [] | no_license | <?php
class PlayerController extends BaseController{
/**
* Displays login page.
*/
public static function login() {
View::make('player/login.html');
}
/**
* Checks inputted login information and, if successful, creates a session for logged in user.
*/
public static function handle_login() {
... | true |
e364fa4faef8d6363c9429024f55e00a6b98231f | PHP | Anilkumarnaidu007/PriceCalculator | /src/PriceCalculator.php | UTF-8 | 1,239 | 3.25 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace MarcelStrahl\PriceCalculator;
use MarcelStrahl\PriceCalculator\Helpers\Entity\Price;
/**
* @author Marcel Strahl <info@marcel-strahl.de>
*/
class PriceCalculator implements PriceCalculatorInterface
{
/**
* {@inheritdoc}
*/
public function addPrice(Price ... | true |
a4c18c989d85d190f61afcb417a00d8eb6ac6922 | PHP | dburgnerjr/lunch-and-learn-php | /tests/AlliterationTest.php | UTF-8 | 691 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace ChadicusTest;
use Chadicus\Alliteration;
/**
* Unit tests for the Alliteration class
*
* @coversDefaultClass Alliteration
*/
final class AlliterationTest extends \PHPUnit_Framework_TestCase
{
/**
* Verify basic behavior of getPhrase()
*
* @test
* @covers ::getPhrase
*... | true |
f7467a12278d123b1c7c2e67c45f07b8e859650e | PHP | AimeeGao/CMS | /17.5.21/login.php | UTF-8 | 2,018 | 2.90625 | 3 | [] | no_license | <?php
include 'D:/Workspace/PHP/blog/config/auth.php'; // 包含配置文件
session_start(); // 使用session存储登陆的用户信息
if(isset($_POST['user']) && isset($_POST['passwd'])){ // 判断用户的输入
$user = $_POST['user'];
$passwd = $_POST['passwd'];
$passwd = md5($passwd); // 对密码使用md5加密
if($user != $AUTH['user'] || $passwd != $AUTH['... | true |
9ad29584af2328563933c812d275de22085cdee6 | PHP | Kicky13/paradigma | /api2/application/controllers/c_emailstock.php | UTF-8 | 2,623 | 2.53125 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class c_emailstock extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->library('session');
$this->load->helper('form');
}
public function index() {
$this->load->helper('... | true |
c7ad6bcef8490092516a0ddccc902347274ac5fc | PHP | cordis-dev/sulu | /src/Sulu/Component/Content/Mapper/ContentMapperInterface.php | UTF-8 | 5,599 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Sulu CMS.
*
* (c) MASSIVE ART WebServices GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Sulu\Component\Content\Mapper;
use Sulu\Component\Content\BreadcrumbItemInterface;
use Sulu\Component\C... | true |
d176ebfd18c4fd1da15e834bba5865ee2bf0f5c0 | PHP | concretecms/concretecms | /concrete/src/Updater/Migrations/Migrations/Version20141024000000.php | UTF-8 | 1,473 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Concrete\Core\Updater\Migrations\Migrations;
use Concrete\Core\Updater\Migrations\AbstractMigration;
use Concrete\Core\Updater\Migrations\RepeatableMigrationInterface;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Table;
use Exception;
class Version20141024000000 extends AbstractMigration... | true |
f3d6c3b88324a78441bfd8db4de4815979ec0c5a | PHP | Cancerbois-Studios/hab_backend | /utility_classes/sqlCommands.php | UTF-8 | 4,608 | 3.0625 | 3 | [] | no_license | <?php
require_once('sqlConnection.php');
require_once("exitWithCode.php");
class SqlCommands {
private $sqlConnection;
private $con;
private $sqlStatements;
function __construct() {
$this->sqlConnection = new SqlConnection();
$this->con = $this->sqlConnection->getDbConnection();
... | true |
a4380d217e87a7c29de19be7fb04f69b4c094b92 | PHP | kcherman799/dokait201mas | /Testadmin/dataenroll.php | UTF-8 | 2,962 | 2.59375 | 3 | [] | no_license | <?php
// Скрипт для посмотра списка заявок от абитурентов
session_start(); // Устанавлеваем сессии для текувщей формы
require_once("Myfunctions.php"); // Подключаем наши функции
if(isset($_SESSION['User']['id']) && $_SESSION['User']["role"] == "Admin")
{ // Если сессия открыта для данного пользователя
echo("... | true |
488ea488a574563355837e70a1b52936407a5423 | PHP | alapaches/le-bazar | /src/Entity/Lieu.php | UTF-8 | 2,014 | 2.625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\LieuRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=LieuRepository::class)
*/
class Lieu
{
/**
* @ORM\Id
* @ORM\GeneratedValue
... | true |
aa96b0750a0f29943905a64db38aabffd001e8b5 | PHP | teamSiteTarafe/NewVersionTara | /app/Http/Controllers/AuthAdmin/LoginAdminController.php | UTF-8 | 1,148 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\AuthAdmin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\models\Admin;
class LoginAdminController extends Controller
{
public function index()
{
return View('superAdmin.login');
}
public function login()
{
$validate... | true |
e6139211cb3b7a0d5ba9c999de05d38dbdab2fb8 | PHP | hassabdo/laravel-api-response-builder | /tests/tests/Builder/FactoryTest.php | UTF-8 | 1,176 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace MarcinOrlowski\ResponseBuilder\Tests;
/**
* Laravel API Response Builder
*
* @package MarcinOrlowski\ResponseBuilder
*
* @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
* @copyright 2016-2021 Marcin Orlowski
* @license http://www.opensource.org/licenses/mit-license.php MIT
* @... | true |
54ee7ed351d1e2495cca7b89ab70535baf37c4ef | PHP | alma31/php-rpgmgchg | /Vegetable.php | UTF-8 | 638 | 3.09375 | 3 | [] | no_license | <?php
require_once 'Product.php';
class Vegetable extends Product{
private $productorName;
private $harvestedAt;
private $date;
function __construct($id,$name,$price,$productorName,$harvestedAt){
parent::__construct($id,$name,$price);
$this->productorName = $productorName;
$this->harvestedAt = $harveste... | true |
9d266221c6dbc95c05b715a13068d61c288fe15c | PHP | shugo-sako/PHP3-4_18_20 | /php2haifu/php02/update.php | UTF-8 | 1,792 | 2.8125 | 3 | [] | no_license | <?php
require_once("funcs.php");
//1. POSTデータ取得
$artist = $_POST["artist"];
$title = $_POST['title'];
$recommend = $_POST['recommend'];
$URL = $_POST['URL'];
$id = $_POST['id'];
//2. DB接続します
//*** function化する! *****************
// try {
// $db_name = "gs_db3"; //データベース名
// $db_id = "root"; //アカウ... | true |
2cc596a08f641120ed3b8d4c939578ebda43c7fc | PHP | CetinaLuka/kinoIS | /php/registracija.php | UTF-8 | 1,160 | 2.546875 | 3 | [] | no_license | <?php
session_start();
$host="127.0.0.1";
$port=3306;
$socket="";
$user="luka";
$password="kinoIS";
$dbname="kinois";
$con = new mysqli($host, $user, $password, $dbname, $port, $socket)
or die ('Could not connect to the database server' . mysqli_connect_error());
if(isset($_POST["uporabniskoIme"]) && isset($_POST["ges... | true |
9da0f1bffb3651191cb6cc5df638adfb59542cd8 | PHP | qige96/gdufsimis | /application/common/model/User.php | UTF-8 | 696 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\common\model;
use think\Model;
class User extends Model
{
public function getUserInfoByStuId($stu_id)
{
return $this->where('stu_id', $stu_id)->find();
}
public function getUserPassword($user_id){
return $this->where('stu_id', $user_id)
->field('password')
->find();
}
public ... | true |
34b06a091b521ad4872bcab9d60d607c5f652367 | PHP | semelyanov86/terminals | /app/Policies/PayerPolicy.php | UTF-8 | 2,277 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Policies;
use App\Payer;
use App\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class PayerPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any payers.
*
* @param \App\User $user
* @return mixed
*/
public function viewAny... | true |
1096e268578d41a3dcb432f6b7f60d6056e252b8 | PHP | JT-Seven/Projet-Phone-Market | /Model/CreateMark.php | UTF-8 | 679 | 2.734375 | 3 | [] | no_license | <?php
/*
insertmark => ajoute une marqque dans la base de donnée
invalidMark => verifie si la marque rentrer n'existe pas
*/
include('Model/ConnectDataBase.php');
function insertMark()
{
$pdo = connectDB();
$requete2 = $pdo->prepare("INSERT INTO MARK (IDMARK, NAME) VALUES ('',:MARK )");
$requete2->bindPar... | true |
2c32c832eb0b3f9523c4321c0ace250380be125c | PHP | minhazmiraz/rest-php | /lib/Category.php | UTF-8 | 1,532 | 3.109375 | 3 | [] | no_license | <?php
class Category extends Database {
private $db;
public function __construct(){
$this->db = new Database;
}
public function read(){
$query = "SELECT c.id, c.name FROM categories c ORDER BY c.name ASC";
$this->db->query($query);
return $this->db->resultSet(... | true |
59fba541a02913dc241e1894c093081780d9fdf3 | PHP | phpffcms/ffcms-templex | /example/block/body.php | UTF-8 | 5,130 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/** @var Ffcms\Templex\Template\Template $this */
$this->layout('layout', ['title' => 'Test page title']);
class FakeForm extends \Ffcms\Templex\Helper\Html\Form\Model
{
public $name;
public $gender = 0; // 0/1/2
public $about;
public $pass = 'SecUrEPwD';
public $hobys = [1];
public $to... | true |
bd432c9ca0e373e2834f646c90c1e8a5936819ae | PHP | kahlan/kahlan | /src/Code/Code.php | UTF-8 | 2,239 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace Kahlan\Code;
use Throwable;
use Exception;
use InvalidArgumentException;
class Code
{
/**
* Executes a callable until a timeout is reached or the callable returns `true`.
*
* @param Callable $callable The callable to execute.
* @param integer $timeout The timeout value.
... | true |
8b554b9099854ddf99d7ddf0f4ac78bcc6718f0d | PHP | WynterJones/wp-plr-archive | /affiliatepressx/inc/callback.php | UTF-8 | 2,267 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
// Update Home
add_action('wp_ajax_affiliatepressx_create', 'affiliatepressx_create_callback');
function affiliatepressx_create_callback() {
// WP DB Include
global $wpdb;
$table_db_name = $wpdb->prefix . "affiliatepressx";
// Save DB Info - Name & Created Date
$wpdb->insert($table_db_name,
array(
... | true |
cb04343afa21054fc7f02bc450c6b1439d7548f4 | PHP | shov/laravel-registry | /src/Registry/Helpers/PairManagerSupportTrait.php | UTF-8 | 1,722 | 2.96875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php declare(strict_types=1);
namespace Shov\Registry\Helpers;
use Shov\Registry\Contracts\LoaderInterface;
use Shov\Registry\Contracts\SaverInterface;
use Shov\Registry\Exceptions\LockedException;
/**
* Help to manage pairs
*
* Required:
* @property $pairs
* @property $immutablePairs
* @property SaverInterfa... | true |
0272da60756f85b63112e42eb33e40c1810585af | PHP | gitter-badger/image-upload | /migrations/2016_01_11_000000_create_flagrow_images_table.php | UTF-8 | 1,584 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php namespace Flagrow\ImageUpload\Migration;
/*
* This file is part of image-upload.
*
* (c) Flagrow
*
* For the full copyright and license information, please view the license.md
* file that was distributed with this source code.
*/
use Flarum\Database\AbstractMigration;
use Illuminate\Database\Schema\Blueprint;
... | true |
e6821bbafd95818034fc5b6e1034460e1e7fadf2 | PHP | jedi-academy/dgpt4711lab05 | /vendor/kint-php/kint/src/Object/Representation/Source.php | UTF-8 | 1,391 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
class Kint_Object_Representation_Source extends Kint_Object_Representation
{
public $name = 'source';
public $label = 'Source';
public $hints = array('source');
public $source = array();
public $filename = null;
public $line = 0;
public function __construct($filename, $line, $padding... | true |
5c1878b9f4b55d10cc4f6615ca222fdc8581a255 | PHP | Moverr/tmis | /models/_finder.php | UTF-8 | 8,329 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* This class searches for data on the system.
*
* @author Al Zziwa <azziwa@gmail.com>
* @version 1.1.0
* @copyright TMIS
* @created 01/08/2015
*/
class _finder extends CI_Model
{
# Load a list of search items
function load_list($instructions)
{
$data = $instructions;
$list = array();
# Get t... | true |
b02d5a9d62f5165f4ae8ed7098b0a70fc04221ca | PHP | greenrivers/magento-module-webp | /Plugin/CustomerData/AbstractItem.php | UTF-8 | 896 | 2.53125 | 3 | [] | no_license | <?php
/**
* @author Greenrivers Team
* @copyright Copyright (c) 2021 Greenrivers
* @package Greenrivers_Webp
*/
namespace Greenrivers\Webp\Plugin\CustomerData;
use Magento\Checkout\CustomerData\AbstractItem as Subject;
use Greenrivers\Webp\Helper\Image;
class AbstractItem
{
/** @var Image */
private $ima... | true |
2d428469e731d8abaef9fe2a46a769e585888802 | PHP | xDeda/buildlibrary | /getname.php | UTF-8 | 1,067 | 2.71875 | 3 | [
"WTFPL"
] | permissive | <?php
// GET NAME
$name = $_GET['name'];
echo "<div class=\"table\">";
$sql = "SELECT * FROM posts WHERE name = '$name'";
$result = $link->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
echo "<div class=\"cell\"><span><a href=\"./?mapcode=$row[mapcode]\"><span class=\"mapcode\">@$... | true |
c16a7d8672eb31c12492e2353b66cd7f5914ed05 | PHP | michaelbonds/laravel-db2 | /src/Connectors/IBMConnector.php | UTF-8 | 2,273 | 2.546875 | 3 | [] | no_license | <?php
namespace MichaelB\Database\DB2\Connectors;
use Illuminate\Database\Connectors\Connector;
use Illuminate\Database\Connectors\ConnectorInterface;
use PDO;
class IBMConnector extends Connector implements ConnectorInterface
{
public function connect(array $config)
{
$dsn = $this->getDsn($config);... | true |
c9751cb444ca646444d9bd41236748d49e6453e6 | PHP | haitt55/minh_brother | /app/Models/BlogCategory.php | UTF-8 | 2,971 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Intervention\Image\Facades\Image;
class BlogCategory extends Authenticatable
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name',
'slug',
... | true |
6dd93e915c162825380f2a31e955b28a5ce21b66 | PHP | BGoldwax/ConUShop | /app/Classes/IdentityMap.php | UTF-8 | 1,318 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Classes;
class IdentityMap {
private $map;
function _construct() {
$this->map = array();
}
function add($objectClass, $object) {
if (isset($this->map[$objectClass])) {
array_push($this->map[$objectClass], $object);
} else {
$this->... | true |
34e4a0be7ef872fecb3615b72ce170714f12e9c7 | PHP | nouse4aname14/android-test-api | /app/Company/Interfaces/User/UserRepositoryInterface.php | UTF-8 | 255 | 2.734375 | 3 | [] | no_license | <?php
namespace Company\Interfaces\User;
/**
* Interface UserRepositoryInterface
* @package Company\Interfaces\User
*/
interface UserRepositoryInterface
{
/**
* @param $userId
* @return mixed
*/
public function find($userId);
}
| true |
f0613b848084ae301b234ea208b35707e57079d3 | PHP | Piwigo/GrumPluginClasses | /classes/GPCCategorySelector.class.inc.php | UTF-8 | 11,643 | 2.84375 | 3 | [] | no_license | <?php
/**
* -----------------------------------------------------------------------------
* class name : GPCCategorySelector
* class version : 1.0.1
* plugin version : 3.3.3
* date : 2010-10-20
* -----------------------------------------------------------------------------
* author: grum at piwigo... | true |
376c5ecf71bd3f4ac3f556899d4d3eef73d48c43 | PHP | cordoval/chamilo_phpperu | /application/gradebook/php/lib/tables/gradebook_publication_table/default_gradebook_publication_table_cell_renderer.class.php | UTF-8 | 1,197 | 2.890625 | 3 | [] | no_license | <?php
namespace application\gradebook;
use common\libraries\WebApplication;
use common\libraries\ObjectTableCellRenderer;
use repository\ContentObject;
use common\libraries\Utilities;
require_once WebApplication :: get_application_class_lib_path('gradebook') . 'format.class.php';
class DefaultGradebookPu... | true |
323a767e28983a904c3bcb7969cb9450a257093d | PHP | HackThursday/Eventeiro | /src/HackThursday/Handler/FacebookHandler.php | UTF-8 | 3,614 | 2.8125 | 3 | [] | no_license | <?php
namespace HackThursday\Handler;
use HackThursday\Entity\FacebookUser;
class FacebookHandler
{
private $cookiePath;
private $user;
public function __construct($cookiePath)
{
$this->cookiePath = $cookiePath;
}
public function login($username, $password)
{
$this->user ... | true |
07e484e1f6f478dc95af3bf7a6eb53101d36e793 | PHP | JEsidio/operand-is-cool-projects-2017 | /public/phpOO.php | UTF-8 | 1,238 | 3.390625 | 3 | [] | no_license | <?php
class Usuario
{
protected $id;
protected $nome;
protected $email;
public function setId($id)
{
$this->id = $id;
}
public function setNome($nome)
{
$this->nome = $nome;
}
public function setEmail($email)
{
$this->email = $email;
}
public fu... | true |
ae1c49e8644a30f005f099669ab656b9aa480abb | PHP | Muhammadkamranlive/PHP-LABS-NTU | /lab11/AddressBook.php | UTF-8 | 1,916 | 3.453125 | 3 | [
"MIT"
] | permissive | <?php
class AddressBook
{
protected $FristName;
protected $LatName;
protected $DOB;
protected $address;
protected $CellNumber;
function __construct($FirstName,$LastName,$DOB,$address,$CellNumber){
$this->FristName=$FirstName;
$this->LatName=$LastName;
$this->DOB=$DOB;
$th... | true |
dad8d6d10ac712cfb7caf8241d9b2417275f38de | PHP | surfstationcc/index | /rss.php | UTF-8 | 2,156 | 2.921875 | 3 | [] | no_license | <?php
//取得するRSSのURL
$rss = array('http://blog.surfstation.co/feed', 'http://scrap.surfstation.co/rss', 'http://twittergoodrss.herokuapp.com/68356123416599783907/surfstationco', 'http://rss.stagram.tk/feed.php?id=143365&username=surfstation&rss');
//2番目は1つのRSSから読み込む件数、3番目は実際に表示する件数
rssReader($rss, 10, 10);
func... | true |
b5f4629fb1a34eb9e682857c84aab207ee07ba82 | PHP | yandifitriyanto/Monitoring-Air | /monitoring-air-php/app/Firebase/Firebase.php | UTF-8 | 545 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Firebase;
class Firebase
{
protected $firebase;
public function __construct()
{
$this->firebase = new \Geckob\Firebase\Firebase(
storage_path('app/google_credentials.json')
);
}
public function setPath($path)
{
$this->firebase->setPath(... | true |
f7218fff35836058f114f573e2cf0e60e0a1554c | PHP | sagar-dudhat/php-crud | /all.php | UTF-8 | 679 | 3.046875 | 3 | [] | no_license | <?php
$conn = new mysqli("localhost", "root", "");
if($conn->connect_error){
die("Connnection Failed.<br>" . "Error : " . $conn->$connect_error);
}
$sql = "CREATE DATABASE scl";
if ($conn->query($sql) === TRUE) {
echo "Database created<br>";
}
else{
echo "Database Failed<br>" . "Error : " . $conn->error;
}
$sql = ... | true |
6d226bc4567a8d2a7182615b5980e7a93076ab99 | PHP | F71Tecnologia/f71sanperes | /teste_cleber.php | UTF-8 | 1,450 | 3.078125 | 3 | [] | no_license | <?php
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
include "conn.php";
$result01 = mysql_query("SELECT * FROM rh_clt WHERE sexo = 'F' AND id_regiao = 4");
$result02 = mysql_query("SELECT... | true |
a44381d9c52d3cfe61e11f09989a2e8cff0e8558 | PHP | happyinfancy/happyinfancy.github.io | /new/station_create.php | UTF-8 | 2,122 | 2.625 | 3 | [] | no_license | <?php
include('header.php');
if (isset($_POST['save'])) {
$station_name = $_POST['station_name'];
$station_address = $_POST['station_address'];
if (empty($station_name)) {
echo "<div class='alert alert-danger'>Please fill form correctly</div>";
} else {
$stationQ = "INSERT INTO stations ... | true |
4588107aece8ac5ee5aa249b8fd9256f813f5119 | PHP | HorseLuke/AlibabaSDK | /src/AlibabaSDK/Integrate/FileRequestLogger.php | UTF-8 | 3,583 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace AlibabaSDK\Integrate;
use AlibabaSDK\Base\CurlRequestLoggerInterface;
use AlibabaSDK\Base\ConfigTrait;
use AlibabaSDK\Base\Response;
/**
* 文件记录器
* @author Administrator
*
*/
class FileRequestLogger implements CurlRequestLoggerInterface{
use ConfigTrait;
protected ... | true |
d84768c1c101ea12870f25e58f20089ea3bb9f1f | PHP | mkowalik92/CS490 | /Beta/api/submitGrades.php | UTF-8 | 1,125 | 2.53125 | 3 | [] | no_license | <?php
session_start();
require_once "../../../mysqli_connection.php";
header('Content-type:application/json;charset=utf-8');
if($_SERVER['REQUEST_METHOD'] == 'POST'){
if($_SESSION['user'] != NULL && $_SESSION['user']['user']['isInstructor']){
$data = json_decode(file_get_contents("php://input"), t... | true |
fef0f38434009699dd2ccbc94fa67fd86b244e8b | PHP | gregdavispsu/DCF-Website-Code-Repo | /wp-content/themes/Builder-Everett/lib/builder-core/lib/special-utilities/fix-builder_add_scripts-in-child-theme.php | UTF-8 | 2,252 | 2.640625 | 3 | [] | no_license | <?php
/*
This special utility fixes child themes that define the builder_add_scripts function. Since this is provided in Builder 3.0, this conflict must be resolved. This utility fixes this by updating the child theme files to use 'builder_child_theme_add_scripts' instead.
Written by Chris Jean for iThemes.com
Versio... | true |
198de92e2bcd60b14eb6e2aca289d7f4c92e7d63 | PHP | Neznajki/codeception-test-engine | /src/Implementations/TestContainer.php | UTF-8 | 2,156 | 2.546875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Tests\Neznajka\Codeception\Engine\Implementations;
use Dyninno\DependencyInjection\AutoWiredContainer;
use Dyninno\DependencyInjection\Exceptions\AbstractDependencyInjectionException;
/**
* Class TestCotnainer
* @package JsonRpcServiceTests
*/
class TestContainer extends A... | true |
701ab26fe05bf87c92fb8e67213a648ce9bb2c44 | PHP | elbucho/alert | /tests/AlertTraitTest.php | UTF-8 | 3,380 | 2.78125 | 3 | [] | no_license | <?php
namespace Elbucho\Alert\Tests;
use Elbucho\Alert\AlertTrait;
use Monolog\Logger;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Output\OutputInterface;
class AlertTraitTest extends TestCase
{
use AlertTrait;
/**
* Last Logger message
*
* @access protected
* @var ... | true |
a765f88bae25ad0ee000ce55be239efc7c27aeb5 | PHP | vipontes/covid-scraping-api | /app/api/municipio_covid.php | UTF-8 | 13,560 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @brief Funções da API de acesso a tabela cidades
* @file municipio_covid.php
* @author Vinicius Pontes
*/
/**
* @brief
*/
$app->get("/brasil/lista/cidades", function ($request, $response) {
require_once ('db/dbconnect.php');
try {
$query = "SELECT m.municipio_id, m.nome, e.estado_sig... | true |
a93f6c92864c4e202ecb58652dcc69314b1b66b7 | PHP | pedrorualves/greve-transportes-perigosos | /job.php | UTF-8 | 1,526 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: tomahock
* Date: 16/04/2019
* Time: 20:00
*/
echo 'Start......';
$ch = curl_init();
/**
* Set the URL of the page or file to download.
*/
curl_setopt($ch, CURLOPT_URL,
'https://docs.google.com/spreadsheets/u/1/d/1WD3ojeEd-ll2T-xCXMda5UJrQhVxX6TgvEbEtkqL2J4/export?for... | true |
6fc12740fdb57904a189cdbf5a4ec8c158c4dbcc | PHP | hlhill/MongoTools | /MongoDB.php | UTF-8 | 16,021 | 2.765625 | 3 | [] | no_license | <?php
/**
* mongoDB php7兼容库文件
* author <xu_hao@loongyjoy.com>
* time 2018-09-07
*/
use MongoDB\BSON\ObjectId;
use MongoDB\Driver\BulkWrite;
use MongoDB\Driver\Command;
use MongoDB\Driver\Manager;
use MongoDB\Driver\Query;
use MongoDB\Driver\ReadPreference;
use MongoDB\Driver\WriteConcern;
/**
* Cla... | true |
13d4e9022975012b518874b89241c76ac2f158f3 | PHP | grandbora/youngbasketballer-Core | /Model/Event/Game/Abstract.php | UTF-8 | 4,935 | 2.703125 | 3 | [] | no_license | <?php
/**
* Class for YBCore Model Game Abstract.
*/
class YBCore_Model_Event_Game_Abstract extends YBCore_Model_Event_Abstract
{
/**
* id of the user
*
* @var int
*/
private $_id;
/**
* id of the homeTeam
*
* @var int
*/
private $_homeTeamI... | true |
9fb050a3539a1d330653897033ecb6fd2ab712b9 | PHP | howellkit3/ERP_system_codemore_inc_Laravel_2015 | /app/Plugin/HumanResource/View/Salaries/xls/yearly_salary_reports.ctp | UTF-8 | 1,445 | 2.640625 | 3 | [] | no_license | <?php
$this->PhpExcel->createWorksheet()
->setDefaultFont('Calibri', 10);
$objTpl = PHPExcel_IOFactory::load("./img/salaries/yearly_salary.xls");
$counter = 5;
$objTpl->setActiveSheetIndex(0)
->setCellValue('A2','Yearly Salary Report: '. $year )->getStyle('A3:AK3')->getFont()->setBold... | true |
bc9a8ed96b11c633bf49e5c2cfa76d9aa39bb3ea | PHP | lutov/empeiria | /app/Http/Controllers/GroupController.php | UTF-8 | 1,390 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\References\Group;
use Illuminate\Http\Request;
class GroupController extends Controller
{
private $slug = 'groups';
private $model = Group::class;
/**
* GroupController constructor.
*/
public function __construct()
{
$this->... | true |
45a04b962d031e25d80523d7a58fd0a4dbde7447 | PHP | Yehoodi/yehoodi3 | /library/DatabaseObject/UserMeta.php | UTF-8 | 4,197 | 2.890625 | 3 | [] | no_license | <?php
class DatabaseObject_UserMeta
{
public $postCount = null;
public $avatar = null;
public $joinedDate = null;
public $online = null;
public $hometown = null;
public $role = null;
public $signature = null;
/**
* Takes a user object a... | true |
09e0b3d22672c6e23b6371ebd33dfbe35f6b4985 | PHP | YevhenArtiukh/onboarding | /src/Entity/Onboardings/UseCase/SendEmailOnboarding/Command.php | UTF-8 | 796 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Smile
* Date: 2020-05-27
* Time: 13:42
*/
namespace App\Entity\Onboardings\UseCase\SendEmailOnboarding;
use App\Entity\Onboardings\Onboarding;
class Command
{
private $onboarding;
private $responder;
public function __construct(
Onboarding $onboardi... | true |
778698ddac49b6ec5a69f600f71b2a996dcfa40f | PHP | dsge/sturdy-palm-tree | /src/OrderableItemUnitInterface.php | UTF-8 | 1,625 | 2.75 | 3 | [] | no_license | <?php
namespace Clapp\Shop\Contracts;
/**
* egy megvásárolható elem a kosár egy rekordjában
*
* ezt extendelik a termékek, de kosárba rakni csak akkor lehet, ha OrderableItem-be rakjuk előbb az OrderableItemUnit-ot
*/
interface OrderableItemUnitInterface{
/**
* egy megjeleníthető név (nyelvesítve)
*... | true |
0783a11114e85e06e030475c1378ba320e5d3e8b | PHP | Shirtcity/symfony | /src/Elcodi/Component/StateTransitionMachine/Entity/StateLine.php | UTF-8 | 2,062 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Elcodi package.
*
* Copyright (c) 2014-2016 Elcodi Networks S.L.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Feel free to edit as you please, and have fun.
*
* @author Marc Morera <yuhu@... | true |
26a7bc0dae1b92b3103a030e41fe2eaeafc7e15a | PHP | danrichards/laravel-user-tagging | /src/Contracts/TaggingUtility.php | UTF-8 | 3,560 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Dan\Tagging\Contracts;
/**
* Interface of utility functions to help with various tagging functionality.
*
* @author Dan Richards <danrichardsri@gmail.com>
* @author Rob Conner <rtconner+gh@gmail.com>
*
* Copyright (C) 2015 Robert Conner
*/
interface TaggingUtility
{
/**
* Slug from a string... | true |
14d56fbb819f4bdfa14da2056f9c735396c4c02d | PHP | basab01/chhayapath | /core/class/class.validation.php | UTF-8 | 1,075 | 2.59375 | 3 | [] | no_license | <?php
class Validation extends DB_connect {
public function __construct ( $dbo = NULL )
{
parent::__construct( $dbo );
}
public function inputCheck ( $data = NULL )
{
$data = trim ( $data );
$data = stripslashes ( $data );
$data = htmlspecialchars ( $data, ENT_QUOTES );
$data = mysqli_re... | true |
1d558cc584c03324701b449d6914e0a601f8c322 | PHP | kasuta96/janote | /app/Http/Controllers/Post/PostController.php | UTF-8 | 2,307 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Post;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Models\Post;
use Illuminate\Support\Facades\Auth;
use App\Classes\General;
class PostController extends Controller
{
//
public function showPosts(Request $re... | true |
92dfc2b50bf7bebbae979ef99dcdc3eafe39c3b4 | PHP | Aramayis12/diplom | /php/DB/tables/CommentTable.php | UTF-8 | 2,485 | 2.859375 | 3 | [] | no_license | <?php
if (interface_exists('ConstructDB')) {
class CommentTable implements ConstructDB {
private static $tableName = 'comments_table';
private static $tableFields = array(
'id' => 'id',
'name' => 'name',
'email' => 'email',
'message' => 'message',
... | true |
774f11429854b6ae4edf76b272ebf3532f58aef8 | PHP | TheLightful/moony | /index.php | UTF-8 | 4,100 | 2.734375 | 3 | [] | no_license | <?php
// function __autoload($classname) {
// $filename = "./". $classname .".class.php";
// }
include_once('Moon.class.php');
$m = new Moon();
// var_dump($m);
// echo $m->age;
// die();
// include_once("MoonStatic.class.php");
// $luna = new MoonStatic();
// list($MoonPhase, $MoonAge... | true |
f8b54ce0d33269b263f9debea35f3cad0794d3ab | PHP | ramonsimon/Scrumteamoverzicht | /groepen_functies.php | UTF-8 | 5,386 | 2.828125 | 3 | [] | no_license | <?php
// Incudes db
require_once('dbConnection.php');
require_once('api_url.php');
class Groep{
private $database = [];
// Db connection
public function __construct(){
$this->database = new DbConnection();
}
// Deletes a user
public function groepVerwijderen($id, $jwt) {
// $stmt2 = $this->datab... | true |
4bf7d307d24ad33e0426049b419f8432a3e2c803 | PHP | shaunxcode/Voltron | /Model/Type/DateTime.php | UTF-8 | 1,896 | 2.953125 | 3 | [] | no_license | <?php
namespace Voltron\Model\Type;
class DateTime extends Base
{
private $format;
public static $parts = array(
'year' => 'Y',
'years' => 'Y',
'month' => 'm',
'months' => 'm',
'day' => 'd',
'days' => 'd',
'hour' => 'H',
'hours' => 'H',
'minute' => 'i',
'minutes' => 'i',
'second' => 's',
... | true |
33e4a97553bb3cb164ca96df0699160fde6d088e | PHP | swaterisaac/7-1-2021_DBDv7 | /app/Http/Controllers/CourseController.php | UTF-8 | 2,976 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Course;
class CourseController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$course = Course::all();
... | true |
437ae9139c52b3660c87e9b88aab34f77d6d2a35 | PHP | lucaslioli/regis-system | /app/Models/Document.php | UTF-8 | 2,034 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Document extends Model
{
use HasFactory;
protected $fillable = ['doc_id', 'file_name', 'file_type', 'text_file'];
// Possible file types: txt, pdf
// Possible document_qu... | true |
eea00f2071da9367fa2e9df49637826fda99dab4 | PHP | horitaku1124/php-converter | /php-codes/cache_control_connecter.php | UTF-8 | 5,651 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
//require_once (LIB_PATH.'class/stopwatch.php');
class cache_control_connecter{
var $using_this = false;
var $sqli;
var $use_db_class;
var $dsn;
public $lastIsCache = false;
private $ddl = "create table cache_control (sql_md5 varchar(32), serialized_ary varchar(10000), sql_len int, limit_by int, t... | true |
7c61a2a7c194891bec210650774891927c485f51 | PHP | karthikhacker/cms | /admin/insert_page.php | UTF-8 | 1,780 | 2.625 | 3 | [] | no_license | <?php
include('db.php');
if(isset($_POST['create'])){
$cat_id = $_POST['cat_id'];
$post_title = $_POST['post_title'];
$post_image = $_FILES['post_image']['name'];
$post_image_tmp = $_FILES['post_image']['tmp_name'];
$post_content = $_POST['post_content'];
$post_date = date("y-m-d");
move_uplo... | true |
d1aeeb28624323eb6106e21bd5713d0478649bdd | PHP | magicmayk/premiumgoldco | /functions/functions.php | UTF-8 | 10,186 | 2.515625 | 3 | [] | no_license |
<?php
$db = mysqli_connect("localhost","root","","ecom_store");
/// IP address code starts /////
function getRealUserIp(){
switch(true){
case (!empty($_SERVER['HTTP_X_REAL_IP'])) : return $_SERVER['HTTP_X_REAL_IP'];
case (!empty($_SERVER['HTTP_CLIENT_IP'])) : return $_SERVER['HTTP_CLIENT_IP'];
... | true |
2cce4d6d8755f942f356f31b493bc6648cd49d86 | PHP | JohnBrinkman97/CSE330repo | /CSE330/module2/indAssignment/calc.php | UTF-8 | 741 | 3.515625 | 4 | [] | no_license | <?php
$num1 = $_GET["num1"];
$num2 = $_GET["num2"];
$sum = $num1 + $num2;
$product = $num1 * $num2;
$difference = $num1 - $num2;
$quotient = $num1/$num2;
if($num1 == ""){
$num1 = 0;
}
if($num2 == ""){
$num2 = 0;
}
if(isset($_GET['calculation'])){
$calculation= $_GET['calculation'];
} else {
$calculation = "Pick a... | true |
0c461d5b1269cc34d6c83fafaae374c1048d1c4d | PHP | musichopin/TutsPlus_30-Days-to-Learn-jQuery | /lesson-25 - PHP-and-jQuery-Part-1/index.php | UTF-8 | 797 | 2.78125 | 3 | [] | no_license | <?php
// ***controller olarak düşünülebilir***
require 'functions.php';
connect(); // connect to our db
// if ( isXHR() && isset($_POST['q']) ) {
// echo json_encode( get_actors_by_last_name( $_POST['q'] ) );
// return;
// }
// ***if element with a name/key of q is available/set in POST global array then query the... | true |
4fff164fd700f0a782e3eb8df74d47a749da89a8 | PHP | haskinsm/ProjectsInVisualStudioCode | /group10PHPMySQL/MainBookingPage.php | UTF-8 | 16,782 | 3.078125 | 3 | [] | no_license | <!--
Purpose of Script: Users should only be broought here once they have selceted dates in the PickBookingDetails.php page. The avaialable qty with respect to their dates will be shown here
Written by: Michael H
last updated: Michael 01/03/21, Michael 02/03/21
Form partially complete; Has ... | true |
8e624f1edeaf079175fbbe8099f4250b2a988111 | PHP | teodorivanov943/MartialArtsNews | /admin_news_add.php | UTF-8 | 2,653 | 2.78125 | 3 | [] | no_license | <?php
include 'bootstrap.php';
include 'classes/News.php';
$categoriesSQL = "SELECT * FROM news_categories";
$categories = Model::runQuery($categoriesSQL, array());
$categoriesIds = array_map(function ($data) {
return (int)$data['id'];
}, $categories);
$errors = array();
if (isset($_POST['submit'])) {
$ds =... | true |
7e26f61833757800d39ee2883c4fa1b107bae478 | PHP | ericmann/sessionz | /php/Handler.php | UTF-8 | 1,663 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Handler Interface
*
* Define the contract to which all handlers must subscribe.
*
* @package Sessionz
* @since 1.0.0
*/
namespace EAMann\Sessionz;
interface Handler {
/**
* Delete a session from storage by ID.
*
* @param string $id ID of the session to remove
* @param cal... | true |
03361738e969b5b202fff6896a824b5606d61150 | PHP | yoh91asakura/ProjetDevTournoi | /nathan terrain/terrain.class.php | UTF-8 | 2,512 | 2.90625 | 3 | [] | no_license | <?php
class Terrain{
private $id;// tableau id des terrains
private $dispo;//tableau nombre de terrain disponible
private $nbTerrain;//nombre total de terrain
private $horaire;//tableau heure a laquelle le teraain est occupe. taleau
private $heure;
private $message;
private $nbEquipe;
private $tabEquipe;
... | true |
aac9f8b700cd58f6e766c6a30a0b4f55d962ffa1 | PHP | DaveLiddament/sarb | /src/Domain/ResultsParser/AnalysisResultsBuilder.php | UTF-8 | 483 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace DaveLiddament\StaticAnalysisResultsBaseliner\Domain\ResultsParser;
class AnalysisResultsBuilder
{
/**
* @var AnalysisResult[]
*/
private $analysisResults = [];
public function addAnalysisResult(AnalysisResult $analysisResult): void
{
$this->... | true |
c8954ee4c1e5d42fa6822ac74582cf9307c96605 | PHP | Raven3419/SmartDataAdmin | /module/SmartQuestions/src/SmartQuestions/Service/ResultsService.php | UTF-8 | 6,271 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/* vim: set expandtab tabstop=4 shiftwidth=4 */
/*
* SmartQuestions
*
* PHP version 5.5
*
* @category Zend
* @package SmartQuestions
* @subpackage Service
* @author Raven Sampson <rsampson@thesmartdata.com>
* @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause
* @version GIT... | true |
810436f04abb044dfd6325f12a6cd507973bdff3 | PHP | PlatformTwo/CS130 | /BruinSociety/PHLibrary.php | UTF-8 | 7,533 | 3.21875 | 3 | [] | no_license | <?php
/**
* @author Andrew Lin
* @version 1.0
* The functions in this file are part of our PHLibrary, or our Post Handling Library.
* The functions currently included are PrintSocietyPosts, getSocID, getQuery, and curQtr.
* More specific documentation is available below.
* While some of these functions call on... | true |
f85439226a66cc6a45802aaf58209ce68bb6d431 | PHP | s-nakajima/MyShell | /unitTest/Plugin/CreateModel4Get.php | UTF-8 | 753 | 2.609375 | 3 | [] | no_license | <?php
/**
* Modelのテストファイル生成クラス
*
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
*/
/**
* Modelのテストファイル生成クラス
*/
Class CreateModel4Get extends CreateModel4 {
/**
* Model::getXxxx()のテストコード生成
*
* @param array $param メソッドデータ配列
* @return void
*/
public function createTest($param) {
if ($this->isW... | true |
920877d796b413902b520f26e3ea0bd68f4657d5 | PHP | Yeah-Alex/Proyecto-Flor-Feliz | /Proyecto Flor Feliz/web/Floreria/php/iniciarSesion.php | UTF-8 | 2,152 | 2.890625 | 3 | [] | no_license | <?php
include '../php/conexionBD.php';
$nombre = $contrasena = $ok ="";
/*------------------------
SE COMPRUEBA QUE LOS DATOS NO ESTEN VACIOS Y SE HAYA UTILIZADO EL METODO POST
------------------------*/
if ($_POST['Nombre']!="" && $_POST['Contrasena']!="" && $_SERVER["REQUEST_METHOD"] == "POST") {
$n... | true |
92897a2ea18825d0a8c1b32ed8f6005ac48c8c66 | PHP | Nursultankalibayev/shop-12 | /app/Helpers/Helper.php | UTF-8 | 3,047 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Helpers;
use App\Models\Category;
use App\Models\Product;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Storage;
class Helper{
public static function getTranslatedSlugRu($text)
{
$cyr2lat_replacements = array (
"А" => "a","Ә" => "a", "Б" => "b","В"... | true |
63ec1150394161311106114f64aad3ddaeeabb62 | PHP | venkateshkamath/php_files | /demo/sql/db.php | UTF-8 | 276 | 2.53125 | 3 | [] | no_license | <?php
$connection = mysqli_connect('localhost','root','root','loginapp');// the arguments are the servername, username, password, and also the DatabseName
if(!$connection){
die("Database connection failed"); // It is a function to throw errors
}
?> | true |
9bafc5f29c38589c93147fc0de2c7ca07e92905d | PHP | rkashapov2015/yii2-customlogger | /models/LogFactory.php | UTF-8 | 850 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: rinat
* Date: 25.07.17
* Time: 10:06
*/
namespace rkashapov2015\customlogger\models;
class LogFactory
{
const TYPE_CURL = 1;
const TYPE_DB = 2;
public $type;
public $url;
function __construct($type = LogFactory::TYPE_DB, $url = '')
{
$thi... | true |
976daed70dcfb33eedbdae9966250036981576ab | PHP | FurahaSolutions/FurahaSMS-Backend | /packages/okotieno/laravel-elearning/src/Requests/TopicOnlineAssessmentUpdateRequest.php | UTF-8 | 1,191 | 2.59375 | 3 | [] | no_license | <?php
namespace Okotieno\ELearning\Requests;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Foundation\Http\FormRequest;
class TopicOnlineAssessmentUpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public functio... | true |
4232173a597d9ab5f82fc1ba9f0d26358fc8dfb1 | PHP | netzonjoelui/test-backend-app | /tests/lib/Olap/Cube/DatawareTest.php | UTF-8 | 15,382 | 2.671875 | 3 | [] | no_license | <?php
/**
* This unit test specifically focusses on the datawarehouse cube implementation.
*
* Adhock cubes or non-cube-specific olap functions should not be tested here.
*/
//require_once 'PHPUnit/Autoload.php';
// ANT Includes
require_once(dirname(__FILE__).'/../../../../lib/AntConfig.php');
require_onc... | true |
60ff9d75956120cc6b8a0ee7ec298efee6071555 | PHP | Tohin666/php1-2 | /lesson4/engine/files.php | UTF-8 | 3,265 | 3.140625 | 3 | [] | no_license | <?php
/**
* Функция загружает изображение и создает его уменьшенную копию.
* @param string $uploadDir - Путь к директории с изображениями.
* @param string $attributeName - Имя атрибута загружаемого изображения.
*/
function uploadFile($uploadDir, $attributeName = 'file') {
// Проверяем, есть ли файл с таким атри... | true |
f9d4a87a7b4b93467a8a48e133708bd8e83a8eb0 | PHP | enepomnyaschih/jwsdk | /php/Process.php | UTF-8 | 2,948 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/*
MIT License
Copyright (c) 2020 Egor Nepomnyaschih
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, mo... | true |