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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
179f802736c1d68f334935f4e5d865d17cbf4089 | PHP | kodeine/laravel-meta | /tests/Casts/UserState/DefaultState.php | UTF-8 | 347 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Kodeine\Metable\Tests\Casts\UserState;
class DefaultState extends State
{
public $description;
/** @noinspection PhpMissingParentConstructorInspection */
public function __construct() {
$this->description = $this->description();
}
public function description(): string {
return 'This is a ... | true |
5cc30a804668391d91a9cb8e86c62a6012462bde | PHP | vldnik84/stud_framework | /src/Http/Request/Request.php | UTF-8 | 4,486 | 3.046875 | 3 | [] | no_license | <?php
namespace Mindk\Framework\Http\Request;
/**
* Class Request
*
* @package Mindk\Http\Request
*/
class Request
{
/**
* @var array Http headers
*/
public $headers = null;
/**
* @var array Raw Request data storage cache
*/
private $raw_data = null;
/**
* Reques... | true |
02063f97e1e79478b1a8084393cbd889fc40141a | PHP | jcgdjob/SyliusSmashPromotionPlugin | /src/Entity/Smash.php | UTF-8 | 2,285 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace BitBag\SyliusSmashPromotionPlugin\Entity;
use Sylius\Component\Core\Model\CustomerInterface;
use Sylius\Component\Core\Model\PromotionCouponInterface;
use Sylius\Component\Resource\Model\TimestampableTrait;
class Smash implements SmashInterface
{
use TimestampableTrait;
... | true |
c0e7bf8257fd31723817e9eab8982de230286f9d | PHP | MonsieurNiark/ENI-Projet_symfony | /src/Entity/Sites.php | UTF-8 | 2,018 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\SitesRepository")
*/
class Sites
{
/**
* @var int
*
* @ORM\Column(name="no_site", type="integer", nullable=false)
* @ORM\Id
* ... | true |
8763eeea1cfd3b2c0034a2acfb4038383ccf2c4d | PHP | tiagomapmarques/lurk | /tests/base/AdminTestCase.php | UTF-8 | 1,320 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
use App\Models\Administrator;
/**
* Base class for admin tests
*/
abstract class AdminTestCase extends TestCase {
/**
* The admin prefix for the application.
*
* @var string
*/
protected $adminPrefix = 'admin';
/**
* Administrator created in the database to be impersonated.
*
* @var \App\Mod... | true |
611b187dc988a38cba1e335049791d433e01c80c | PHP | PieterDeNorre/Books | /php/mailform.php | UTF-8 | 2,154 | 2.5625 | 3 | [] | no_license | <?php
// CONTROLE EMPTYNESS
if (!isset($_POST['name']) || !isset($_POST['street']) || !isset($_POST['zipcode']) || !isset($_POST['city']) || !isset($_POST['country']) || !isset($_POST['ammount']) || !isset($_POST['email'])) {
echo 'U heeft niet alle velden ingevuld!';
exit;
}
// DB CONNECTION
$dbhost="... | true |
2dffe67bfc8bb3bd89f882b223736b742f138696 | PHP | saibhaskardevatha/iitg-tt | /timetable/admin/helpers/junior_lab.php | UTF-8 | 1,057 | 2.796875 | 3 | [] | no_license | <?php
$id = $_POST["id"];
$name = $_POST["name"];
$venue = $_POST["venue"];
$day = $_POST["lab_day"];
$time_old = $_POST["time"];
$time_explode = explode('|', $time_old);
$time1 = $time_explode[0];
$time2 = $time_explode[1];
$event_id = $_POST['event_id'];
include("../../helpers... | true |
ea47d7b004b128fce933546cc74bcd2364ccb460 | PHP | DHasib/Delivery-Management-System-Back-End-Using-Laravel | /app/Traits/ApiResponser.php | UTF-8 | 1,476 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Traits;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
trait ApiResponser
{
// If Requested response return success then get the responce with data and return them into a private function
private function successResponse($data, $message = null, $code = 200)
{
... | true |
a6459b12996a78895d96e85610f7524c12748028 | PHP | dmheisel/Learning-PHP | /Basics/advancedArrays.php | UTF-8 | 483 | 3.96875 | 4 | [] | no_license | <?php
$odd_numbers = [1,3,5,7,9];
$even_numbers = [2,4,6,8,10];
$all_numbers = array_merge($odd_numbers, $even_numbers);
print_r($all_numbers);
// this won't work!
// $newArray = sort($all_numbers);
// print_r($newArray);
//instead, do it like this! the array is mutated.
sort($all_numbers);
prin... | true |
657d9b3e1365de12c70f7c5d683e274a9a02ad80 | PHP | hz86/hzfw | /framework/base/Encoding.php | UTF-8 | 2,820 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace hzfw\base;
use hzfw\core\BaseObject;
/**
* 编码类
* Class Encoding
* @package hzfw\base
*/
class Encoding extends BaseObject
{
/**
* html编码
* @param string $content
* @param string $encoding
* @param bool $doubleEncode
* @return string
*/
... | true |
adbe5e976f75faf84f602053d0c9c74e94e22f10 | PHP | Begin-org/risecodeAdm | /model/Professor.php | UTF-8 | 1,260 | 3.0625 | 3 | [] | no_license | <?php
class Professor{
private $idProfessor;
private $nome;
private $rg;
private $foto;
private $usuario; //objeto
private $turmas; //lista
function getIdProfessor(){
return $this->idProfessor;
}
function... | true |
1d7f62333231615acbb6dff22b645d8357efd682 | PHP | ashishbindra2/php | /signup/signup.php | UTF-8 | 3,169 | 3.140625 | 3 | [] | no_license | <?php
/**
*
*/
class Signup
{
protected $id;
protected $fname;
protected $lname;
protected $email;
protected $mobile;
protected $hobby;
protected $dob;
protected $gender;
protected $status;
private $tableName = 'signup';
private $dbConn;
function setId($id) { $this->id = $id; }
function ge... | true |
20d308d06b1203c25e7207ad3f13e910524deb4c | PHP | liujunfengyujunyao/yii2 | /components/auth/LoginableInterface.php | UTF-8 | 687 | 2.90625 | 3 | [] | no_license | <?php
namespace app\components\auth;
/**
* 登陆生成token, 再次请求刷新token过期时间相关的方法. 各种可登陆模型包括医生, 辅医, 家长, 管理员等都需要实现此接口
* @author whui
* @date 2019-11-22
*/
interface LoginableInterface
{
/**
* 产生一个token,token将被缓存起来用于标示当前登陆用户
*/
public function generateToken();
/**
* 将产生的token缓存起来
*/
public function cacheToken(... | true |
0a0c0498f5a2a304a77a31305c7eec709fd33909 | PHP | faisalGhozzi/ProjetWeb | /OmarTrabelsi/Miniwalla/entites/service.php | UTF-8 | 704 | 2.921875 | 3 | [] | no_license | <?PHP
class Service{
private $service_id;
private $service_type;
private $service_numero;
function __construct($service_id,$service_type,$service_numero){
$this->service_id=$service_id;
$this->service_type=$service_type;
$this->service_numero=$service_numero;
}
function getservice_id(){
return $this... | true |
4cc21f74068062664dac1f193760b2504ec0c0b2 | PHP | scharmory/sistemadevendas | /dao/DaoVenda.class.php | UTF-8 | 3,289 | 2.703125 | 3 | [] | no_license | <?php
//include_once("model/Venda.class.php");
include_once("includes/Conexao.class.php");
class DaoVenda {
public function listarVendas () {
$sql = "SELECT tv.id_venda, tp.nome as produto, tv.quantidade, tv.desconto, tv.valor_total, tv.valor_final, tc.nome as cliente FROM tb_venda tv INNER JOIN tb_cliente ... | true |
bd5b3c9f115b37084381d5f9ffc3f94b4b8f2ca5 | PHP | sellastica/catalog-supplier | /src/Entity/CatalogSupplier/Entity/CatalogSupplierRelations.php | UTF-8 | 994 | 2.5625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
namespace Sellastica\CatalogSupplier\Entity;
class CatalogSupplierRelations implements \Sellastica\Entity\Relation\IEntityRelations
{
/** @var CatalogSupplier */
private $catalogSupplier;
/** @var \Sellastica\Entity\EntityManager */
private $em;
/**
* @param CatalogSupplier $catalogSupplier
* @param \... | true |
b48095e54c44c7ec4c7b018fd2701c4651003523 | PHP | a19860101/gjun_sunday_php | /pdo/update.php | UTF-8 | 586 | 2.828125 | 3 | [] | no_license | <?php
date_default_timezone_set("Asia/Taipei");
try {
include("pdo.php");
$name = $_POST["name"];
$email = $_POST["email"];
$edu = $_POST["edu"];
$gender = $_POST["gender"];
$skills = implode(",",$_POST["skills"]);
$updated_at = date("Y-m-d H:i:s");
$id = $_POST["id"];
$sql = "UPDATE stude... | true |
c7a3157b35fc02223d5f9d9497c7f92514dfaeca | PHP | BackupTheBerlios/unisched-svn | /unisched/lib/funcs.php | ISO-8859-1 | 4,792 | 2.65625 | 3 | [] | no_license | <?php
/**
@mainpage University Scheduling System (master data)
@version 0.1
@author Ivonne Seibt, Stephan Hilbrandt, Jan Walther
@date 25-07-2008
@brief source code documentation
@defgroup PHP Package PHP functions
@brief server-side functions for date calculations and databse operations
*/
if($_... | true |
4a7817f8b1d272e2f28b7f0bc2c27ff56128c5ee | PHP | micti/VHMIS-Framework | /Vhmis/I18n/DateTime/DateRepeat/Week.php | UTF-8 | 3,257 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Vhmis Framework
*
* @link http://github.com/micti/VHMIS-Framework for git source repository
* @copyright Le Nhat Anh (http://lenhatanh.com)
* @license http://opensource.org/licenses/MIT MIT License
*/
namespace Vhmis\I18n\DateTime\DateRepeat;
/**
* Caculation repeated dates by week
*/
class Week ... | true |
1f732c172ddfad850c3a9bc7eb89f91711cbbd28 | PHP | hugoliegeard/WF3-Guadeloupe | /11-ActunewsPoo/src/Model/Twig/TwigExtension.php | UTF-8 | 645 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Model\Twig;
use App\Model\Container\Container;
use App\Model\Kernel\KernelEventInterface;
use Twig\Environment;
class TwigExtension implements KernelEventInterface
{
private $container;
public function __construct()
{
# Récupération du Container
$this->container = ... | true |
b97caaaf5376f39891b983d02939236012f08205 | PHP | quantk/afw_v1 | /src/Controller/DefaultController.php | UTF-8 | 852 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: quantick
* Date: 18.01.18
*/
namespace App\Controller;
use App\Model\User;
use Artifly\Core\Component\ORM\EntityManager;
use Artifly\Core\Http\Controller;
use Monolog\Logger;
/**
* Class DefaultController
*
* @package App\Controller
*/
class DefaultController extends... | true |
63209525d6e697a72d99522aaed393822f286ac6 | PHP | askmhs/php-classic-blog | /src/Test/Integration/Infrastructure/Persistence/Doctrine/CommentRepositoryTest.php | UTF-8 | 3,057 | 2.546875 | 3 | [] | no_license | <?php
namespace Test\Integration\Infrastructure\Persistence\Doctrine;
use Domain\Commenter;
class CommentRepositoryTest extends RepositoryTestBase
{
protected $fixture;
protected $comment;
public function setUp()
{
parent::setUp();
$this->fixture = $this->loadFixture('Test\\Fixtures\\Co... | true |
ea1bb6dead349cfa67619cbd3961e173bcd7ac87 | PHP | gambrogi-snappler/Utils | /Bundle/WidgetsBundle/DataSource/ArrayDataSource.php | UTF-8 | 982 | 2.859375 | 3 | [] | no_license | <?php
namespace Snappminds\Utils\Bundle\WidgetsBundle\DataSource;
class ArrayDataSource implements IDataSource
{
private $arrayData;
private $criteria = array();
public function __construct(array $data)
{
$this->arrayData = $data;
}
public function getData($page = 1, $rowsPerPage = n... | true |
0f72b2f26c99af00be1f45ae5ff7512de9a169ab | PHP | benmayer/snippets | /countdown/timestamp.php | UTF-8 | 1,549 | 3.1875 | 3 | [] | no_license | <?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header('Content-Type: text/javascript; charset=UTF-8');
#set date to count down to. Both 24 or 12h formats work
$endDate = strtotime("September 01, 2014 12:00 am");
#get time from server
$nowTime = time();
#figure out how much time is left
$remaini... | true |
84c91b77acccbbb34bc6828c507de11ec18caf5d | PHP | 3DFace/ipv4 | /tests/dface/ipv4/IpSubnetTest.php | UTF-8 | 3,738 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/* author: Ponomarev Denis <ponomarev@gmail.com> */
namespace dface\ipv4;
use PHPUnit\Framework\TestCase;
class IpSubnetTest extends TestCase {
public function testFromShortString() : void
{
$test = ['1.1.1.1/32', '127.0.0.0/8', '10.0.0.0/16', '194.50.85.0/24', '192.168.0.0/24', '0.0.0.0/0'];
... | true |
9b9b7bf66530e2b915f12e214e5dd24e4b795309 | PHP | YaroslavKrivoy/news | /app/Http/Controllers/API/CategoryController.php | UTF-8 | 3,070 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Category;
use Illuminate\Support\Facades\Validator;
class CategoryController extends Controller
{
/**
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routi... | true |
00eb39534a3d64e75fcec93e2ccb06b75b542082 | PHP | Touxu/Client_Leger | /EBoutique/Modele/etape.class.php | UTF-8 | 918 | 3.53125 | 4 | [] | no_license | <?php
class Etape
{
private $NumEtape;
private $Libelle;
public function __construct($leNum, $leLib)
{
$this->NumEtape= $leNum;
$this->Libelle= $leLib;
}
function __destruct() {
}
public function __set($attribut, $valeur) {
switch ($attribut) {
cas... | true |
3fad1369fbee492e4a35c240c9029db883fa229c | PHP | arkinzoodsma/forum | /build_classes.php | UTF-8 | 2,003 | 2.6875 | 3 | [] | no_license | <?php
class build_classes
{
public function buildForum()
{
$json = (new curl_request())->curlPost(['name' => 'onnodig'], "http://172.16.3.11/build_forum.php");
$array = json_decode($json, true);
$fora = array(count($array));
for ($i = 0; $i < count($array); $i++) {
... | true |
fccc572205d6ba03588400e8b2a245317834d2e7 | PHP | sachin-hadfadkar/sports | /app/Http/Controllers/Api/SportsController.php | UTF-8 | 11,261 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use App\Models\Team;
use App\Models\Player;
use Throwable;
class SportsController extends Controller
{
/**
* Display list of all teams
*
* @return \... | true |
f73e099bf77548160bcaae438d83a6d90269a454 | PHP | Amstutz/php-formlets | /example.php | UTF-8 | 2,011 | 2.59375 | 3 | [
"MIT"
] | permissive | <html>
<head>
</head>
<body>
<?php
require_once("tests/autoloader.php");
use Lechimp\Formlets\Formlets as F;
$br = F::text("<br />");
$int_input = F::text_input("10")
->satisfies(F::fun("is_numeric"), "No integer!")
->map(F::fun("intval", 1))
;
$all_inputs = F::formlet(
F::inject(F::co... | true |
94e98b2fd85c8acadcdeee5cb1f33048ce832407 | PHP | LassNafar/iss | /models/ModelMain.php | UTF-8 | 189 | 2.546875 | 3 | [] | no_license | <?php
namespace models;
use core\Model;
class ModelMain extends Model
{
/**
* @return date
**/
public function getData()
{
return "27.11.14";
}
}
| true |
2a679b7ee1737f15369e682282ad5ff60bce795f | PHP | ssrazgonov/slada48_cms | /frontend/models/Custom.php | UTF-8 | 650 | 2.625 | 3 | [] | permissive | <?php
namespace frontend\models;
use yii\base\Model;
/**
* simple test model for form
*/
class Custom extends Model
{
public $weight;
public $text;
public $comment;
public $datetime;
public $payment;
/**
* {@inheritdoc}
*/
public function rules()
{
return [
... | true |
f48f072ebfdcbdcced0db123c113969bb98fca37 | PHP | sjaakp/yii2-spatial | /SpatialHelper.php | UTF-8 | 15,398 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* MIT licence
* Version 1.1.0
* Sjaak Priester, Amsterdam 21-06-2014 ... 02-04-2019.
*
* ActiveRecord with spatial attributes in Yii 2.0 framework
*
* @link https://github.com/sjaakp/yii2-spatial
*/
namespace sjaakp\spatial;
use yii\helpers\Json;
/**
* Class SpatialHelper
* @package sjaakp\spatia... | true |
3bf7d6b147a85359702348e00b58a76da247f203 | PHP | rishabhjain0/Mini-Project-Online-Shopping-Website- | /actionCart.php | UTF-8 | 4,414 | 2.53125 | 3 | [] | no_license | <?php
include 'Include/config.php';
include 'session.php';
if(!isset($_SESSION))
{session_start();}
if(isset($_POST['action']))
{
$pname = $_POST['pname'];
$pbrand = $_POST['pbrand'];
$pprice = $_POST['pprice'];
$pimage = $_POST['pimage'];
$pcode = $... | true |
01da1252bdd4fb7312f48397f0f6c70303e17994 | PHP | lawoole/swoole | /src/Swoole/Client.php | UTF-8 | 5,293 | 3.109375 | 3 | [] | no_license | <?php
namespace Swoole;
/**
* 客户端
*/
class Client
{
/**
* 数据处理方式:发送或接收带外数据
*/
const MSG_OOB = 1;
/**
* 数据处理方式:窥看外来消息
*/
const MSG_PEEK = 2;
/**
* 数据处理方式:仅本操作非阻塞
*/
const MSG_DONTWAIT = 3;
/**
* 数据处理方式:等待所有数据
*/
const MSG_WAITALL = 4;
/**... | true |
ebde8eb2ee77d27cdb72a5271f5934b084463b93 | PHP | Seana36/DIFYM | /Not currently used files/results_TDEE.php | UTF-8 | 488 | 2.578125 | 3 | [] | no_license | <?php
session_start();
$weight = $_POST['weight'];
$height = $_POST['height'];
$age = $_POST['age'];
$activityLevel = intval($_POST['activityLevel']) ;
/*if( isset($_POST['activityLevel'] )) {
$activityLevel = intval($_POST['activityLevel']);
}else {
$activityLevel = 1;
}*/
echo $activityLevel;
$REE = 66 + (... | true |
3d725206564b1cc7b13843810a25d5c074fbf307 | PHP | jermerf/phpnotes | /Basics/arraysandobjects.php | UTF-8 | 1,109 | 4.0625 | 4 | [] | no_license | <?php
// Two types of arrays: INDEXED, ASSOCIATIVE
// Creating an INDEXED array
$myArr = array("Milk", "Bread", "Cheese", 42, true);
var_dump($myArr);
echo "<br>The first thing on the list is $myArr[0]";
echo "<br>But here's the full list:<ul>";
foreach ($myArr as $v) {
echo "<li>$v</li>";
}
echo "</ul>";
$myAss... | true |
5e88b43b24141f13762d363b34179571047a10af | PHP | chr-peters/Kniffel | /webcontent/login.php | UTF-8 | 1,796 | 2.78125 | 3 | [] | no_license | <?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
// include the necessary files
require('lib/Database.class.php');
require('lib/requests.php');
require('lib/tokens.php');
// check if it is a POST request (see specifications for scores)
if (!strcasecmp($_SERVER['REQUES... | true |
7a780f43effae99ef6bab7cb50eeafb41139fb41 | PHP | bazo/php-orientdb | /src/OrientDB/Protocols/Binary/Operations/DbOpen.php | UTF-8 | 2,097 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace OrientDB\Protocols\Binary\Operations;
class DbOpen extends AbstractOperation
{
/**
* @var int The op code.
*/
public $opCode = 3;
/**
* @var string the name of the client library.
*/
public $clientName = "OrientDB PHP";
/**
* @var string the client versio... | true |
dee8b1b489535a4d6a2cf713b42bd419bd7d4428 | PHP | bretlinne/Biblian | /dev/v0.3/server/paging.php | UTF-8 | 2,969 | 2.578125 | 3 | [] | no_license | <?php
/*-----------------------------------------------------------------------------
// Project: BIBLIAN
// File: paging.php
// Dir: /server/paging.php
// Desc: Functions for creating pagination of data output from Biblian
// INCLUDES: NONE
// INVOCATIONS: index.php
// ... | true |
92893c057c2f4d0578419dbaf0edc57c84d0ff89 | PHP | matthewdimatteo/ctrex | /php/rating-stars.php | UTF-8 | 1,121 | 2.8125 | 3 | [] | no_license | <?php
/*
php/rating-stars.php
By Matthew DiMatteo, Children's Technology Review
This file outputs a 5-Star graphic dynamically reflecting the rating of a review
It is included in the file 'php/rating.php'
*/
$starFloat = $score/20;
$starInts = floor($starFloat);
$starPiece = round(10 * ($starFloat - $starInts));
$emp... | true |
eae853955a30e8131af4aaaf707dbefcfc0fcc71 | PHP | akononykhin/trustcare | /application/modules/portal/controllers/SignController.php | UTF-8 | 4,572 | 2.53125 | 3 | [] | no_license | <?php
/**
*
* Alexey Kononykhin
* alexey.kononykhin@gmail.com
*
*/
class Portal_SignController extends ZendX_Controller_Action
{
/**
* This controller is for login/logout so it's not necessary to check either user is authenticated or not
*
* @return bool
*/
public fun... | true |
246b4d3aa172bd2446547099efd7687496df8265 | PHP | jack1201yii2/menu-digital-1 | /app/Restaurant.php | UTF-8 | 521 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\FoodType;
use App\RestaurantUser;
use Illuminate\Database\Eloquent\Model;
class Restaurant extends Model
{
protected $fillable = [
'id',
'restaurant_name',
'rfc'
];
public function branchOffices()
{
return $this->hasMany(BranchOffice::class);
}... | true |
7e891bf7d9486df580507f103a6ce61d438770cc | PHP | SalFay/Student-Portal | /admin/semester.php | UTF-8 | 1,454 | 2.625 | 3 | [] | no_license | <?php require __DIR__ . '/header.php' ?>
<?php
$db = new Database();
$department = (int)cleanString($_GET['d']);
$stmt = '
SELECT * FROM departments WHERE department_id = ?
';
$db->query($stmt, [$department]);
$dep = $db->fetchObject();
?>
<div class="panel panel-primary">
<div class="panel-heading">
<d... | true |
6687554f186fde94e591a51c88dd832421fc2565 | PHP | xiebruce/PicUploader | /vendor/aliyuncs/oss-sdk-php/tests/OSS/Tests/PutSetDeleteResultTest.php | UTF-8 | 1,922 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace OSS\Tests;
use OSS\Core\OssException;
use OSS\Http\ResponseCore;
use OSS\Result\PutSetDeleteResult;
class ResultTest extends \PHPUnit\Framework\TestCase
{
public function testNullResponse()
{
$response = null;
try {
new PutSetDeleteResult($response);
$... | true |
478a61d6f09cd603f23facbb2ef123b7b90cb35a | PHP | rafiq02/blog | /home.php | UTF-8 | 541 | 2.546875 | 3 | [] | no_license | <?php require_once 'header.php'; ?>
<pre>
<?php
$mg='1';
if($_SESSION==NULL) {
header("Location: sign_in.php?msg=$mg&msg2=$mg2");
}
$sql=mysqli_query( $conn,"SELECT * FROM post");
$posts=mysqli_fetch_all ($sql, MYSQLI_ASSOC);
foreach ($posts as $var ) {
$p=$var['post_id'];
print_r($var);
e... | true |
cd45254ee504086bf63af9ba4468cecba04f9d4b | PHP | messagebird/messagebird-magento | /lib/MessageBird/Client.php | UTF-8 | 3,061 | 2.71875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace MessageBird;
/**
* Thomas Kerkhof @ Notive, 25-Feb-2015:
* Autoloader for unregistered functions within this namespace.
* Include once is executed twice for windows and unix system compatibility
*/
spl_autoload_register(
function ($class_name)
{
// error_log('loading in '.__NAMESPA... | true |
601cf6f4c330c7dd6d48c7b3fdc52a747f5fbc07 | PHP | lester-ccs/classified | /database/seeds/AreaTableSeederFromCSV.php | UTF-8 | 1,029 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use League\Csv\Reader;
use App\Area;
class AreaTableSeederFromCSV extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$csv = Reader::createFromPath('database/files/countries.csv');
$csv->setDel... | true |
5b215e982186a624fe5dcd7828b7ffcd74862bfc | PHP | abterphp/website | /src/Events/Listeners/AuthInitializer.php | UTF-8 | 669 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace AbterPhp\Website\Events\Listeners;
use AbterPhp\Framework\Events\AuthReady;
use AbterPhp\Website\Authorization\PageCategoryProvider as AuthProvider;
class AuthInitializer
{
/** @var AuthProvider */
protected $authProvider;
/**
* AuthInitializer constructor.... | true |
67cb4bbf63e5570dc62c480ba53e75088592107c | PHP | anklimsk/internal-ldap-based-phonebook | /app/Plugin/Tools/Controller/MyController.php | UTF-8 | 581 | 2.5625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
App::uses('ShimController', 'Shim.Controller');
/**
* DRY Controller stuff
*/
class MyController extends ShimController {
/**
* Fix for asset compress to not run into fatal error loops
*
* @param CakeRequest|null $request
* @param CakeResponse|null $response
*/
public function __construct($request... | true |
9ba86e7cc0ed24c99942e3681877eef80bed194f | PHP | PetitB/Videotheques-Series | /functions.php | UTF-8 | 6,737 | 3.1875 | 3 | [] | no_license | <?php
/**
* Récupère le contenu d'un fichier Json et le retourne.
* @param $filePath String
* @return $dataJson Object
*/
function getContentJson($filePath){
$jsonFile = file_get_contents($filePath);
$dataJson = json_decode($jsonFile, true);
return $dataJson;
}
/**
* Ecrit dans le fichier Json la liste de... | true |
70aae08feb06783727dd5ead22c4c16c85ada60b | PHP | rapisarda/php-editor | /src/Node/DocBlockNode.php | UTF-8 | 1,340 | 3.25 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace PhpEditor\Node;
class DocBlockNode
{
private $statements = [];
/**
* @return array<string|DocNode|AnnotationNode>
*/
public function getStatements(): array
{
return $this->statements;
}
/**
* @param array $statements
*/
... | true |
5d234f806024cb909c92f9db4cb52fd14ecbcede | PHP | z4nr34l/coyote | /app/Services/Notification/DatabaseChannel.php | UTF-8 | 650 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Coyote\Services\Notification;
class DatabaseChannel
{
/**
* Send the given notification.
*
* @param \Coyote\User $user
* @param Notification $notification
* @return void
*/
public function send($user, Notification $notification)
{
$data = $notifica... | true |
7c063512f96923fa8a2e11ecaf9317c8cdd9590e | PHP | BackupTheBerlios/tip | /pear/HTTP/Session2/Container/TIP.php | UTF-8 | 2,183 | 2.796875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
require_once 'HTTP/Session2/Container.php';
/**
* TIP container for session data
*
* Saves the session data (only for logged in users) in the TIP_User module.
*
* @author Nicola Fontana <ntd@users.sourceforge.net>
* @package HTTP_Session2
*/
class HTTP_Session2_Container_TIP extends HTTP_Session2_Contai... | true |
98b279c30fe8fa990c2e2153164cc51525893c28 | PHP | Terimor/eu-data-aggregator | /src/SupplierFacade/DataEu/Bridge/Common/DataEuDatasetResponseBridge.php | UTF-8 | 1,641 | 2.5625 | 3 | [] | no_license | <?php
namespace App\SupplierFacade\DataEu\Bridge\Common;
use App\Entity\Dataset;
use App\Supplier\DataEu\Common\DataEuDataset;
use App\SupplierFacade\Exception\UnnecessaryDistributionCoreSupplierException;
use Psr\Log\LoggerInterface;
class DataEuDatasetResponseBridge
{
private DataEuDistributionResponseBridge... | true |
6b44a63ff029d72b4a70f078f5fb05220c4c2feb | PHP | rritoch/vwp-1 | /libraries/vwp/net/dre/translators/soap.php | UTF-8 | 3,548 | 2.546875 | 3 | [] | no_license | <?php
/**
* Virtual Web Platform - SOAP Translator
*
* This file provides the base class for soap translators
*
* @package VWP
* @subpackage Libraries.Networking.DRE
* @author Ralph Ritoch <rritoch@gmail.com>
* @copyright (c) Ralph Ritoch - All Rights Reserved
* @link http://www.vnetpublishing.com VNetPu... | true |
a1fb6c15c1278292f4acbae200ab7893943162dc | PHP | MichalKot89/Majsteria | /application/controllers/contact.php | UTF-8 | 3,492 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class Contact
* This controller is used to
*/
class Contact extends Controller
{
/**
* Construct this object by extending the basic Controller class
*/
function __construct()
{
parent::__construct();
}
/**
* This method controls what happens when you move to ... | true |
0b80ab4a3294775fa4e6f28ac219876378434601 | PHP | zagovorichev/archivarius | /src/Contract/Entity/SettingsInterface.php | UTF-8 | 278 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Contract\Entity;
interface SettingsInterface
{
public function isProjects(): bool;
public function isUsers(): bool;
public function setProjects(bool $state): void;
public function setUsers(bool $state): void;
}
| true |
fdd853e39ecaef2fa55b170523e2030328341225 | PHP | noelslevin/sassenach-cms | /backend/config/users.php | UTF-8 | 4,967 | 3.0625 | 3 | [] | no_license | <?php
$message = NULL;
if (isset($_POST['submit'])) { // Handle the form.
// Check for a first name.
if (empty($_POST['first_name'])) {
$firstname = FALSE;
$message .= '<p>A first name must be specified.</p>';
}
else {
$firstname = trim($_POST['first_name']);
}
// Check for a last name.
if (empty(... | true |
e37e814599fdaf068555b705ef27efdd30f07495 | PHP | helfer/strix | /php/ibo_classes/class_question.php | UTF-8 | 13,328 | 3.109375 | 3 | [] | no_license | <?php
class question_conventional_MC{
var $id=false;
var $position=false;
var $name=false;
var $points=false;
var $type_specific_info=false;
var $solution=array();
var $exam_id=false;
var $type_id=1;
var $skipped=false;
var $prop_right;
var $prop_mostfreq_wrong;
var $mostfreq_wrong;
... | true |
3d79777954e8a14fed6bf224191b20cd52cee473 | PHP | bluelifeleer/SDK | /Tanx/Tanx.php | UTF-8 | 614 | 2.609375 | 3 | [] | no_license | <?php
namespace SDK\Tanx;
/**
* |-----------------------------------------------------------------------------
* | Tanx Class
* |-----------------------------------------------------------------------------
* | Author bluelife
* | Email thebulelife@outlook.com
* | Date 2016-12-16
* |------------------... | true |
f85963aef60e413e069a0a84df753fd8ddcf2a88 | PHP | jiujiezongheti/cms | /includes/Parser.class.php | UTF-8 | 2,926 | 2.90625 | 3 | [] | no_license | <?php
//模板解析类
class Parser{
private $_tpl;
//构造方法
public function __construct($_tplfile){
if(!$this->_tpl = file_get_contents($_tplfile)){
exit('error:模板文件读取错误');
}
}
//对外公共方法
public function compile($_parfile){
//解析模板内容
$this->_parvar();
$this->_parif();
$this->_par_common();
$this->_parforeach(... | true |
d301671726af00e0fe6e5aeec76317a46315d937 | PHP | cha63506/WRweb | /katalog/entities/dayEntity.php | UTF-8 | 2,033 | 2.8125 | 3 | [] | no_license |
<?php
include("../../globalVariables.php");
class DayEntity
{
public $ID = " ";
public $day = " ";
public $headline = " ";
public $description = " ";
public $groupoffer_id = " ";
//Contrtuctor
public function __construct($day, $headline, $description, $groupoffer_i... | true |
801643b9184e84f29815c9e59ebcd6b7fbc1681e | PHP | Nyandams/piscine | /application/models/EditeurContact/EditeurContactFactory.php | UTF-8 | 649 | 2.640625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class EditeurContactFactory extends CI_Model
{
public function __construct() {
parent::__construct();
$this->load->model('Editeur/EditeurFactory');
$this->load->model('Contact/ContactFactory');
$this->load->... | true |
69cf2221d555ebea83b19a9381f4a11b3ae7227b | PHP | N1ghteyes/apicore | /src/apicore/interfaces/loggingInterface.php | UTF-8 | 447 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace n1ghteyes\apicore\interfaces;
interface loggingInterface
{
public function addMethod($method);
public function addRequestURL($method);
public function addRequestArgs($method);
public function addRequestEndpoint($method);
public function setRequestTime($time);
public function s... | true |
0249e79a83ec57ea9e80a38263b2cbb852fbedd0 | PHP | Natsumag/CakePHP_ecsite | /config/Seeds/AdminUsersSeed.php | UTF-8 | 1,752 | 2.609375 | 3 | [] | no_license | <?php
use Cake\Auth\DefaultPasswordHasher;
use Migrations\AbstractSeed;
/**
* AdminUsers seed.
*/
class AdminUsersSeed extends AbstractSeed
{
/**
* Run Method.
*
* Write your database seeder using this method.
*
* More information on writing seeds is available here:
* https://book.... | true |
cfde8891b7bf184bba79ebe37d203d122319f41a | PHP | emanijaz/Nuces-Circle | /nuces/model/postStatus_model.php | UTF-8 | 528 | 2.515625 | 3 | [] | no_license | <?php
// defined('BASEPATH') OR exit('No direct script access allowed');
require_once("DataAccessHelper.php");
if(!isset($_SESSION))
{
session_start();
}
class postStatus_model
{
public static function postStatus($post_text)
{
$email = $_SESSION['email'] ;
$dbhandle=DataAccessHelper:... | true |
bbdbeb9d3ea4e50fa38bd86bf36ed834264abdd2 | PHP | Sylvie54/siteweb | /src/Controller/Admin/AdminPropertyController.php | UTF-8 | 6,220 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Controller\Admin;
// composants response et request
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
// utiliser les annotations pour les routes
use Symfony\Component\Routing\Annotation\Route;
// classe mère "controller"
use Symfony\Bundle\FrameworkBund... | true |
6c519a3c106b0aae53c449b8549e883e33515ee2 | PHP | ofca/moss-storage | /Moss/Storage/Builder/BuilderInterface.php | UTF-8 | 687 | 2.9375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Moss\Storage\Builder;
interface BuilderInterface
{
/**
* Sets table name
*
* @param string $table
*
* @return $this
*/
public function table($table);
/**
* Sets operation for builder
*
* @param string $operation
*
* @return $this
... | true |
1908ae4e68ae0a95a354129d24425f10b4e39066 | PHP | migratetoflarum/fake-data | /src/Commands/FakeCommand.php | UTF-8 | 2,577 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace MigrateToFlarum\FakeData\Commands;
use Exception;
use Flarum\Foundation\ValidationException;
use Illuminate\Console\Command;
use Illuminate\Support\Arr;
use MigrateToFlarum\FakeData\SeedConfiguration;
use MigrateToFlarum\FakeData\Seeder;
class FakeCommand extends Command
{
protected $signature = ... | true |
a89f36328a495f4993d2cc4ebb91e8dd56a35d8c | PHP | CollectorsQuest/collectorsquest.svn | /lib/model/CollectibleOfferPeer.php | UTF-8 | 1,610 | 2.59375 | 3 | [] | no_license | <?php
/**
* Skeleton subclass for performing query and update operations on the 'collectible_offer' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
* @pa... | true |
d0265af0f01bb6e4a9f4eb7cda6b511226e86b74 | PHP | NivRemy/PHP_MVC | /view/displayTravels.php | UTF-8 | 842 | 2.515625 | 3 | [] | no_license | <?php
ob_start();
if(!is_null($message)){
echo '<div class="container"><div class = "alert alert-success" role="alert" >' . $message . '</div></div>';
}
foreach($travels as $travel){
?>
<div class="container">
<div class="jumbotron">
<h2>
<?= utf8_encode($travel['title']);?>
</h2>
<?php if(!empty($tra... | true |
777eb29430e2db94d24595a082623b130be85870 | PHP | chipette/EatIt_mod3 | /dist/admin/crud/plat/create_query.php | UTF-8 | 1,242 | 2.75 | 3 | [] | no_license | <?php
require_once __DIR__ . "/../../security.php";
require_once __DIR__ . "/../../../model/database.php";
$nom = $_POST["nom"];
$description = $_POST["description"];
$prix = $_POST["prix"];
$image = $_FILES["image"]["name"]; //on veur récupérer le nom du fichier uploadé, et il est uploadé sous forme d'une tableau don... | true |
1e513c85e5de19b146d97cbc1d8110d03e66cd4b | PHP | dragosh635/laravel-path-essentials | /app/Http/Controllers/BookingController.php | UTF-8 | 4,581 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Jobs\ProcessBookingJob;
use App\Models\Booking;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class BookingController extends Controller {
/**
* BookingController constructor.
* Only authenticated user are allow to visit the routes from t... | true |
93bab6c3bd31ef12e96ec59e02c5567c8bfc4b63 | PHP | lemonvine/yii2-adminlte | /JpGraph/Util/GanttConstraint.php | UTF-8 | 767 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* JPGraph v4.0.3
*/
namespace lemon\JpGraph\Util;
/**
* @class GanttConstraint
* // Just a structure to store all the values for a constraint
*/
class GanttConstraint
{
public $iConstrainRow;
public $iConstrainType;
public $iConstrainColor;
public $iConstrainArrowSize;
public $iConstrainArrowType... | true |
7199d1fee4684423e596ca7d65cce65e2cc5de0a | PHP | klivinout/pfe | /database/migrations/2016_07_09_144332_create_tables.php | UTF-8 | 2,164 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTables extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//create table "sujets"
Schema::create('sujets', function (Blueprint... | true |
b05bd749f6e4a36fbb8026acbaff3d568f1135f5 | PHP | mickrip/fwoot-core | /src/Fw/Fwouter.php | UTF-8 | 4,700 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Fw;
class Fwouter
{
static $error = "";
var $routes = array();
static $debug = array();
static function db($txt)
{
self::$debug[] = $txt;
}
static function show_db()
{
echo "<div style='background:#eee; margin:10px; padding:10px'>";
foreach (self::$debug as $row) ... | true |
bae0920c2f6093c048172957bb902c0058cd7dd1 | PHP | krisdarryn/model-generator | /source/Controllers/ControllerBase.php | UTF-8 | 8,287 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Generator\Controllers;
use Generator\Models\SchemaUtility;
class ControllerBase {
/**
* The Request object passed to each matched route
*
* @type Request
*/
protected $request;
/**
* The Response object passed to each matched route
*
... | true |
1944e4cbbdd0a507ddf3792c109ec010e802b7d6 | PHP | vetermanve/verse_storage | /src/Verse/Storage/StorageProfiler.php | UTF-8 | 1,802 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Verse\Storage;
class StorageProfiler
{
const START_TIME = 'start';
const FINISH_TIME = 'finish';
const FULL_TIME = 'time';
const METHOD = 'method';
const CALLER = 'caller';
const META = 'meta';
private $timers = [];
private $timerIdSeq = ... | true |
c71043517fd9b2f08c4e43aac594e165e589a903 | PHP | Aliencoder-75/shopify | /order.php | UTF-8 | 1,002 | 2.515625 | 3 | [] | no_license | <?php
$con = new mysqli("localhost", "root", "", "shopify");
if ($con->connect_error) {
die("Connection failed: " . $con->connect_error);
}
if(isset($_POST['submit'])){
$uname = $_POST['uname'];
$email = $_POST['email'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_POS... | true |
8b99507f811bb6476ffdb248939141d60ea0d05c | PHP | anbotero/Gherkin | /src/Behat/Gherkin/Keywords/ArrayKeywords.php | UTF-8 | 2,506 | 2.875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Behat\Gherkin\Keywords;
/*
* This file is part of the Behat Gherkin.
* (c) 2011 Konstantin Kudryashov <ever.zet@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Array initializable keywords holder... | true |
181926f8ddaebb782e35589bc38b6f412841da2e | PHP | bbene/provider-exchange-network-client | /src/Soap/Objects/Market.php | UTF-8 | 1,418 | 2.9375 | 3 | [] | no_license | <?php
namespace ProviderExchangeNetwork\Soap\Objects;
class Market
{
/**
* @var string $BrochureUrl
*/
protected $BrochureUrl = null;
/**
* @var string $Description
*/
protected $Description = null;
/**
* @var string $VideoUrl
*/
protected $VideoUrl = null;
... | true |
cfda5a7e13d0f570fdc7d56516a0919c032562e9 | PHP | alegarcia27/INFO638 | /randomartwork.php | UTF-8 | 628 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
include_once ("header.php");
#constructed query
$query = 'SELECT * FROM creators NATURAL JOIN artwork NATURAL JOIN museum NATURAL JOIN location ORDER BY RAND()LIMIT 1';
#sent to db
$result=$conn->query($query);
if(!$result) die ($conn->error);
#print out to see
while ($row=$result->fetch_assoc()) {
#print to se... | true |
dc0f3084a1416ea601fd2e8e6aaddb915f1b4c44 | PHP | olgerti/transaction | /tests/Unit/CustomerModelTest.php | UTF-8 | 1,081 | 2.78125 | 3 | [] | no_license | <?php
namespace Tests\Unit;
use App\Models\Customer;
use App\Services\CurrencyWebservice;
use Tests\TestCase;
class CustomerModelTest extends TestCase
{
/** @test */
public function it_returns_formatted_transactions_for_given_customer()
{
$this->container->set(CurrencyWebservice::class, $this->ge... | true |
68aae6c2fc37d52270bccce554bf4fa326d46d27 | PHP | penzin/algorithms-practice | /tests/setCoverProblemTest.php | UTF-8 | 712 | 2.78125 | 3 | [] | no_license | <?php
namespace Penzin\AlgorithmsPractice;
use PHPUnit\Framework\TestCase;
class setCoverProblemTest extends TestCase
{
/**
* @var array
*/
private $statesToCover = ['mt', 'wa', 'or', 'id', 'nv', 'ut', 'ca', 'az'];
/**
* @var array
*/
private $stations = [
'kOne' => ['id'... | true |
927d9eb3a4ea742fe8747512e2fdb42f3a582c7d | PHP | rizafr/easy | /adminweb/application/controllers/uploads/images.php | UTF-8 | 4,669 | 2.609375 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Images extends IO_Controller {
private $image_path, $image_dir, $content_path, $content_dir;
public function __construct()
{
parent::__construct();
$this->image_path = $this->path . 'uploads/images/';
$this->image_dir = $this-... | true |
2000f60f9483219a8145e324b116d50698bd3a91 | PHP | rkeet/zf-doctrine-form | /src/Filter/ToFloat.php | UTF-8 | 377 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Keet\Form\Filter;
use Zend\Filter\AbstractFilter;
class ToFloat extends AbstractFilter
{
/**
* @param mixed $value
*
* @return float
*/
public function filter($value) : float
{
$float = $value;
if ($value) {
$float = str_replace(',', '.', $... | true |
68676cb8623aec7f0090373efa8a333c9eb882ee | PHP | acerus/WordPressify | /www/wp-content/plugins/import-meetup-events/includes/class-import-meetup-events-tec.php | UTF-8 | 11,938 | 2.71875 | 3 | [
"GPL-2.0-only",
"GPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later"
] | permissive | <?php
/**
* Class for Import Events into The Events Calendar
*
* @link http://xylusthemes.com/
* @since 1.0.0
*
* @package Import_Meetup_Events
* @subpackage Import_Meetup_Events/includes
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
class Import_Meetup_Events_T... | true |
a98a13d4db2d8636f5961c2abf565b5cf2e52535 | PHP | leifos-gmbh/CronStatusMonitor | /classes/class.ilCronStatusMonitorSettings.php | UTF-8 | 2,651 | 2.640625 | 3 | [] | no_license | <?php
/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If ... | true |
ff1d855db4819d0a1d8c9805dc04b84fd1652f37 | PHP | PHPfamo/OBJECT-ORIENTED-PHP | /10_1_function_construct.php | UTF-8 | 974 | 3.96875 | 4 | [] | no_license | <?php
class Person {
//Each person has their own unique description, we are placing those here as properties
public $name, $last_name, $gender, $hair;
/* We are creating contructor here guys, most common programming practice so pay attention on this section and try to practice this as much as you can. So const... | true |
3fee4e14cbfa278ad569c709f490a108ae8d7c8e | PHP | ozitag/wordpress-starter | /src/public/wp-content/themes/app/Core/Ajax/ServerErrorResponse.php | UTF-8 | 577 | 2.84375 | 3 | [] | no_license | <?php
namespace Core\Ajax;
class ServerErrorResponse extends Response
{
private string $error;
private ?array $data;
public function __construct(string $error, ?array $data = null)
{
$this->error = $error;
$this->data = $data;
}
public function getStatusCode(): int
{
... | true |
3adb48a5e11d159d70878ae5ae0e52c561273b2e | PHP | javier2233/film_api | /src/FilmApi/Domain/Repository/ActorRepository.php | UTF-8 | 488 | 2.640625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: javier
* Date: 23/03/2019
* Time: 1:41 PM
*/
namespace FilmApi\Domain\Repository;
use FilmApi\Domain\Actor;
interface ActorRepository
{
public function save(Actor $actor):void;
public function delete(int $id):void;
public function up... | true |
a3c83352b18c1ec417d773381452fc89638b3a83 | PHP | fkojic/Laravel | /database/seeds/KategorijeTableSeeder.php | UTF-8 | 866 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Kategorije;
class KategorijeTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Kategorije::create([
'ime' => 'Audi',
]);
Kategorije::cre... | true |
016317c0b82a3ed2c0f56bf3ea39f795a894ef65 | PHP | JRJman/app | /app/php/agenda.php | UTF-8 | 9,726 | 2.8125 | 3 | [] | no_license | <?php
$month = date('n');
$year = date('Y');
$method = 'days';
if(!empty($_POST['month'])){
$month = $_POST['month'];
}
if(!empty($_POST['year'])){
$year = $_POST['year'];
}
if(!empty($_POST['method'])){
$method = $_POST['method'];
}
switc... | true |
05cb5deffbcad78b6941bcc3baf48e24e638bf11 | PHP | gjrdiesel/destinybattle | /app/Bungie/Bungie.php | UTF-8 | 2,882 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Bungie;
use GuzzleHttp\Client;
class Bungie
{
public $guzzle;
public $membershipType = 1;
public $destinyMembershipId = 0;
public function __construct(Client $guzzle)
{
$this->guzzle = $guzzle;
}
/**
* Search for a player
*
* @param $member... | true |
f325ba7e085567f7700bf3bb6d181212324265e3 | PHP | ch11ka/Mora | /en/power/pro-users.php | UTF-8 | 903 | 2.671875 | 3 | [] | no_license | <?php
$date= date("Y-m-d");
// output headers so that the file is downloaded rather than displayed
$filename = "Pro_users_" . date('Y-m-d') . ".csv";
header('Content-Type: text/csv; charset=utf-8');
header("Content-Disposition: attachment; filename=\"$filename\"");
// create a file pointer connected to the output s... | true |
eef0dabecf91b123ec8a6ce5ef9898e5cb965caf | PHP | successdt/angular-generator | /app/Console/Commands/Angular.php | UTF-8 | 4,323 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Hottab\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Foundation\Inspiring;
class Angular extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'angular:list {name}';
/**
* The console c... | true |
8515aba7779c2a9e23034edcee339ea88ae21e3f | PHP | zhuitech/boot-laravel | /src/Setting/SettingInterface.php | UTF-8 | 423 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace ZhuiTech\BootLaravel\Setting;
/**
* Interface SettingInterface
* @package iBrand\Component\Setting\Repositories
*/
interface SettingInterface
{
/**
* @param array $settings
* @return mixed
*/
public function setSetting(array $settings);
/**
* @param $key
* @return mixed
*/
public f... | true |
45b6dcebbf895d326ab35dc5bd2041273edbf2e0 | PHP | davidway/tp | /app/test/service/TestOneByOneService.php | UTF-8 | 1,760 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\admin\service;
use app\admin\model\User;
class TestOneByOneService{
public $user;
public function __construct(User $user)
{
$this->user = $user;
}
public function get()
{
//关联查询
$user = $this->user->find(1);
print_r($user->car);
ec... | true |
1f1cd3463afcf73d41fc31bd7b5f2417f59dca31 | PHP | juIienSIO/MonTPSI6 | /ex1.php | UTF-8 | 531 | 3.4375 | 3 | [] | no_license | <!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
$tab = a... | true |