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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a8f62c24c71526f7d67257ba8817b07a04e93dc6 | PHP | JustsoSoftware/JustTexts | /TextInterface.php | UTF-8 | 2,070 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Definition of TextInterface
*
* @copyright 2014-today Justso GmbH
* @author j.schirrmacher@justso.de
* @package justso\justtexts\model
*/
namespace justso\justtexts;
use justso\justapi\SystemEnvironmentInterface;
interface TextInterface
{
/**
* Initializes a text page.
*
... | true |
cd0ca5f22fdb538ef8d2f85918952e9b84f7f22d | PHP | KevinCoworks/schema-org | /SchemaOrg/Mapping/Type/LiveBlogPosting.php | UTF-8 | 2,051 | 2.96875 | 3 | [] | no_license | <?php
namespace SecIT\SchemaOrg\Mapping\Type;
use SecIT\SchemaOrg\Mapping\Property;
/**
* Class LiveBlogPosting.
*/
class LiveBlogPosting {
/**
* @var Property\CoverageEndTime
*/
private $coverageEndTime;
/**
* @var Property\CoverageStartTime
*/
private $coverageStartTime;
/**
*/
private $id;
... | true |
030b682d2768577e9b61d0855698646e46758b18 | PHP | xtiurti/web-service-lavanderia-encoder | /encoder/network/route.php | UTF-8 | 2,525 | 3.046875 | 3 | [] | no_license | <?php
class Route {
static $routes = array();
static $current;
static $controller;
static $action;
static function init() {
init('route');
static::set_current();
}
private static function set_current() {
static::$current = '/' . str_replace(Url::$application, '', ... | true |
bc858ec986245829d612efa0d930ffc8911a3086 | PHP | Sirumachinery/payum-siru | /tests/PriceHelperTest.php | UTF-8 | 1,265 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Siru\PayumSiru\Tests;
use PHPUnit\Framework\TestCase;
use Siru\PayumSiru\PriceHelper;
/**
* @covers \Siru\PayumSiru\PriceHelper
*/
class PriceHelperTest extends TestCase
{
/**
* @test
* @dataProvider pricesProvider
*/
public function formatsPrice(int... | true |
6a9e771591d3d085519efb1f3404725c7844e8b9 | PHP | brandonsavage/masterclass-phpworld | /src/Routing/Router.php | UTF-8 | 1,069 | 2.9375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
namespace Masterclass\Routing;
use Masterclass\Request\Request;
class Router
{
protected $request;
protected $routes = [];
public function __construct(Request $request, $routes)
{
$this->request = $request;
$this->routes = $routes;
}
public function determineController... | true |
e94cb64bb0a231f8bbf338974cb97dcbe32606c2 | PHP | hamzaze/Calculator | /src/Calculator/StringCalc/Symbols/Concrete/Functions/GetRandMaxFunction.php | UTF-8 | 751 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
namespace Calculator\StringCalc\Symbols\Concrete\Functions;
use Calculator\StringCalc\Exceptions\NumberOfArgumentsException;
use Calculator\StringCalc\Symbols\AbstractFunction;
/**
* PHP getrandmax() function aka return largest
* possible random value. Expects one parameter.
* @see http://php.net/manual/en/... | true |
79a28dc8100a6c97f7ed9c1190c62ab5f53a24f0 | PHP | diego1982chile/CTDC_DIBUJA | /Modelo/Strip.php | UTF-8 | 3,878 | 3.015625 | 3 | [] | no_license | <?php
include_once 'Modelo/Dibuja.php';
include_once 'Modelo/Pieza.php';
/**
* Description of Strip
* Tira para Strip Packing
* @author Alvaro
*/
class Strip {
private $w;
private $h;
private $op;
private $z;
private $piezas;
private $nPiezas;
private $layout;
private $di;
privat... | true |
4afc04620b2c06e8288e51bc372996b995b2d402 | PHP | LinJie-Guo/simple | /framework/libraries/Upload.class.php | UTF-8 | 1,710 | 2.96875 | 3 | [] | no_license | <?php
/**
* 文件上传类,实现单文件上传
*/
class Upload{
protected $_img_max;
protected $_img_path;
protected $_img_dir;
protected $_img__prefix;
protected $_img_postfix;
//初始化文件信息
public function __construct(){
$this->_img_max=2000000; //图片最大2M
$this->_img_path='./'; //图片子目录位置
$this->_img_dir=date('Ym... | true |
796b5f1355674bf848ce802a23b69183761bc7f6 | PHP | georgeCherry02/Componentised-Website | /inc/components/Navbar.php | UTF-8 | 4,909 | 3.046875 | 3 | [] | no_license | <?php
class NavBar implements Component {
private $_website_structure;
private $_containing_page;
public function __construct($structure, $containing_page) {
$this->_website_structure = $structure;
$this->_containing_page = $containing_page;
}
publi... | true |
34efd05f66484f904db22c5f1daf10851465ba98 | PHP | HeMarco/progetti | /Php/conta.php | UTF-8 | 870 | 2.9375 | 3 | [] | no_license | <?php
//estensione dei file da scaricare
$estensione = '.zip';
//directory con i file di testo
$counterdir = 'count/';
//controllo che nell'url ci sia il nome del file da scaricare
if (isset($_GET['name'])) {
$nomefile = htmlentities($_GET['name']);
//se il file richiesto esiste avviene il do... | true |
253d66f703cee56155d155b1d3cbcc7e53473863 | PHP | chrisRidgers/grim-server | /src/Infrastructure/ServerProxiesEvents/EventsMatchingServer.php | UTF-8 | 1,115 | 2.59375 | 3 | [] | no_license | <?php
namespace Ridgers\Grim\Infrastructure\ServerProxiesEvents;
use Ridgers\Grim\Domain\Server;
use Ridgers\Grim\Domain\Event;
use PHPUnit\Framework\TestCase;
use Ridgers\Grim\Domain\Client;
class EventsMatchingServer extends TestCase implements Server
{
private $server;
public function __construct($server)... | true |
b50ca9d58ee102e301db67e8f14ad1092a9c999d | PHP | devrebeleza/php-blog | /scripts/generar-url-secreta.php | UTF-8 | 1,645 | 2.546875 | 3 | [] | no_license | <?php
include_once 'app/conexion.inc.php';
include_once 'app/config.inc.php';
include_once 'model/usuario.inc.php';
include_once 'model/repositorioUsuario.inc.php';
include_once 'model/recuperacionClave.inc.php';
include_once 'model/repositorioRecuperacionClave.inc.php';
include_once ... | true |
05d0c774182ca40c0654abc6d4c5d101d3e80518 | PHP | horvathi/php-cmis-client | /src/PrincipalInterface.php | UTF-8 | 668 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Dkd\PhpCmis;
/*
* This file is part of php-cmis-client.
*
* (c) Sascha Egerer <sascha.egerer@dkd.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Dkd\PhpCmis\Data\ExtensionDataInterface;
/**
* ACE Princip... | true |
a2fe1fa5a71634bf3ae895891eb672e76a049f70 | PHP | MeidyAl08/UTS-MEIDY-ALFARAZI-LUBIS | /category_tampil.php | UTF-8 | 618 | 2.515625 | 3 | [] | no_license |
<h2>DATA KATEGORI</h2>
<?php
require_once "app/category.php";
$cat = new App\Category();
$rows = $cat->tampil();
?>
<table>
<tr>
<th>NO</th>
<th>NAMA</th>
<th>KETERANGAN</th>
<th>EDIT</th>
</tr>
<?php $no=0; foreach ($rows as $row) { $no++;?>
<tr>
<td><?php echo $row['cat_id']; ?></td>
<td><?p... | true |
001242a1d9d033092107968cbe39ad7e0f489df2 | PHP | fernandod1/Lottery-numbers-scraper | /lottery.php | UTF-8 | 4,350 | 2.5625 | 3 | [
"MIT"
] | permissive | <?
/*
Copyright (c) 2020 Fernando
Url: https://github.com/fernandod1/
License: MIT
*/
// Configure your mysql database connection details:
$mysqlserverhost = "";
$database_name = "";
$username_mysql = "";
$password_mysql = "";
// --------------------- Do not modify under this line --------------------------- //
f... | true |
052c096c845ccab78ac51f0881950a13f5604363 | PHP | j2cey/GestockDSI | /app/Console/Commands/ArticleSetEtat.php | UTF-8 | 1,750 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Article;
use App\EtatArticle;
class ArticleSetEtat extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'article:setetat';
/**
* The console ... | true |
ce8007ff43061bb442b5b4d23e04dd1dcf6ecbe2 | PHP | tangmaoguo/weibo | /app/Models/User.php | UTF-8 | 2,862 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class User extends Authenticatable
{
use Notifiable;
/**
* The attrib... | true |
622eff4860ecbbc22341cb4c057fe24e07156df2 | PHP | mtShaikh/stbm | /application/models/Familydetail_model.php | UTF-8 | 1,871 | 2.65625 | 3 | [] | no_license | <?php
class Familydetail_model extends CI_Model
{
function __construct()
{
parent::__construct();
}
/*
* Get familydetail by ID
*/
function get_familydetail($ID)
{
return $this->db->get_where('FamilyDetails',array('Person_ID'=>$ID))->row_array();
... | true |
26f103e51300ca618b0fae212250b57de50e401d | PHP | jianzhong/opg-lpa-pdf | /tests/Opg/Lpa/Pdf/Service/Lp3Test.php | UTF-8 | 7,079 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace OpgTest\Lpa\Pdf\Service;
use Opg\Lpa\Pdf\Config\Config;
use Opg\Lpa\DataModel\Lpa\Document\Document;
use Opg\Lpa\Pdf\Service\Forms\Lp3;
use Opg\Lpa\DataModel\Lpa\Document\Attorneys\Human;
class Lp3Test extends BaseClass
{
public function test()
{
// create PDF, then extract f... | true |
b0263b33459ef12ec96d5ae94c8fbb70ab65fc91 | PHP | melquizedecm/TopicosAvanzados20A | /Victoria Solís/Proyecto/Proyecto/crud_2020/bd/crud.php | UTF-8 | 2,067 | 2.609375 | 3 | [] | no_license | <?php
include_once '../bd/conexion.php';
$objeto = new Conexion();
$conexion = $objeto->Conectar();
// Recepción de los datos enviados mediante POST desde el JS
$nombre = (isset($_POST['nombre'])) ? $_POST['nombre'] : '';
$facebook = (isset($_POST['facebook'])) ? $_POST['facebook'] : '';
$n_cel = (isset($_POST['n_... | true |
2fa00d552ce9362d22787ae25b89653a93302f59 | PHP | Hadouweb/devphp | /d09/ex03/insert.php | UTF-8 | 286 | 2.90625 | 3 | [] | no_license | <?php
if (file_exists('list.csv') && isset($_POST['id']) && isset($_POST['text']))
{
$str = $_POST['id'] . ";" . $_POST['text'] . PHP_EOL;
if (@file_put_contents('list.csv', $str, FILE_APPEND) === FALSE)
die("Error: impossible d'ecrire dans le fichier");
}
else
die("Error");
?>
| true |
a323d1e6879eea233b8417b99ec8e42c66b2352e | PHP | thegreated/adthorityJobOrderSystem | /database/migrations/2020_01_08_161515_create_images_list_table.php | UTF-8 | 808 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateImagesListTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('images_list'... | true |
1feb78f306c54477fea720a10695ab07aa045b85 | PHP | Char11e/casc | /src/Erorus/CASC/VersionConfig/HTTP.php | UTF-8 | 1,207 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Erorus\CASC\VersionConfig;
use Erorus\CASC\HTTP as CASCHTTP;
use Erorus\CASC\VersionConfig;
class HTTP extends VersionConfig {
private const HTTP_HOST = 'http://us.patch.battle.net:1119/';
/**
* Returns the content of a version config file at the given path, either from cache or by fet... | true |
b5e3cdc20cd4a4242820abbf0ae44c2f3c1a60db | PHP | Restaulogy/Project-Restaulogy | /class/hm_allergy.class.php | ISO-8859-2 | 5,143 | 2.515625 | 3 | [] | no_license | <?php
/**********************************************************************
hm_allergy.class.php
Generated by STRUCTY 2012.12.06 10:42:54.
Copyright 2011 Structy, Frdric Aebi. All rights reserved.
**********************************************************************/
define("HM_ALLERGY", "hm_allergy");
class hm_... | true |
4c01de1e3364a6b428cbeff6d5f8f7e44373f47b | PHP | ezaho/10-PHP_POO | /POO_exo1bis.php | UTF-8 | 914 | 3.125 | 3 | [] | no_license | <?php
class Html{
private $_fichiers_css="<link rel=" ;
private $_balises_meta="meta ...";
private $_images="<img src=...>";
private $_liens="<a href=..>";
private $_fichiers_JS="<script>...</script>";
function __construct(){
}
public function fichiercss(){
return $this->_fichi... | true |
7b8306b9d09fbfafb00d93ea7868efe264aa9d53 | PHP | jgux/jgux | /backend/models/ArticleCategory.php | UTF-8 | 1,138 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "article_category".
*
* @property integer $id
* @property string $name
* @property string $intro
* @property integer $status
* @property integer $sort
* @property integer $is_help
*/
class ArticleCategory extends \yii\db\Active... | true |
c479c44c1d2d856615cd9216374561d5fa8ac812 | PHP | wahc1983/blog | /app/models/blog.php | UTF-8 | 756 | 2.71875 | 3 | [] | no_license | <?php
if ( class_exists( 'DbAdapter' ) && !class_exists( 'Blog' ) ) {
/**
* Blog
**/
class Blog extends DbAdapter {
protected static $tableName = 'blogs';
/**
* comments
**/
public static function comments( $blog ) {
require( 'app/models/comment.php' );... | true |
770efbd25b4effd1facd9014c4b2aab47ff70f19 | PHP | millelc/kuchikomi | /_demo_v1/web/xml/traderlist.php | UTF-8 | 2,880 | 2.78125 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
// Pour avoir la liste des abonnements d'une personne
// OU pour avoir la liste des kuchikomi d'un commerçant.
if (isset($_GET['aid']))
{
// On veut les abonnements d'un utilisateur.
header ("Content-Type:text/xml");
echo '<?xml version="1.0" encoding="UTF-8"?><liste>';
include_once('../../clas... | true |
338d7c8e1095785830f86a065c0166ee06471817 | PHP | shopware/SwagMigrationAssistant | /Migration/EnvironmentInformation.php | UTF-8 | 2,703 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace SwagMigrationAssistant\Migration;
use Shopware\Core\Framework\Struct\Struct;
class EnvironmentInformati... | true |
705a772b73a1e31b45234974288af4bac15872d1 | PHP | sichrif/projeCtPhPdSi21 | /Classes/order.class.php | UTF-8 | 552 | 3.078125 | 3 | [] | no_license | <?php
class Order{
private $conn;
private $db;
public function __construct(){
$db = new DataBase();
$this->conn = $db->connectDB();
}
public function addOrders(){
try{
$req='DELETE FROM cart... | true |
c82ec31d5fc857f8412059dd257007bbc422922b | PHP | NdrKng/builder | /scripts/functions.php | UTF-8 | 921 | 2.796875 | 3 | [] | no_license | <?php
function pageNumber()
{
$pageNumber = 1;
if(!isset($_SESSION['form']))
{
$pageNumber = 1;
}
else
{
while(array_key_exists('page'. $pageNumber, $_SESSION['form']['pages']))
{
$pageNumber = $pageNumber +1;
}
}
return $pageNumber;
}
function sectionNumber()
{
$sectionNumber = 1;
if(!isset... | true |
dac7401f0c05cf15d5ed58cd3c2dfb373ca1bf2c | PHP | HT-K/ohjic-ojt | /exercise/board/application/models/board_model.php | UTF-8 | 3,604 | 2.84375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: ohjic
* Date: 2016-06-16
* Time: 오후 1:26
*/
class Board_model extends CI_Model
{
function __construct() { // 생성자다, 초기화와 관련된 함수다.
parent::__construct();
}
public function listAll()
{
/* board 테이블에서 게시글들을 얻어와보자 */
return $this->db->qu... | true |
53b47cc10613ee5e72e62c2b7480377b16a9c92c | PHP | firraandriani/quiz_2_PWEBA | /db.php | UTF-8 | 6,019 | 3 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "quiz_2";
try {
$db_connect = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
$db_connect -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "SELECT * FROM tabel_mahasiswa";
$result = ... | true |
216e9064a65a2a1a69ddbf4d43df19c21169e9e0 | PHP | leandromascarenhaspaes/PHP | /aula12cev/03valor.php | UTF-8 | 734 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aula PHP</title>
<link rel="stylesheet" href="_css/estilo.css">
</head>
<body>
<div>
<?php... | true |
36300b72f6d68e49d1ee323e47a2ba896a44c024 | PHP | jfeilhauer/Animachat | /models/ajaxDownload.php | UTF-8 | 1,017 | 2.609375 | 3 | [] | no_license | <?php
// soubor pro komunikaci javascriptu se serverem
class ajaxDownload
{
private $export = '';
//
public function __construct($user1,$user2,$pocet){
$pole = $this->ctiZpravy($user1, $user2,$pocet);
$tag = "";
for ($i=0;$i<count($pole);$i++){
for($... | true |
41a6948fba2734eba4b7c63e2d510c7fe4991338 | PHP | rsiu01/e15 | /p3/database/seeds/DevicesTableSeeder.php | UTF-8 | 570 | 2.703125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Device;
class DevicesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
for ($i = 1; $i < 30; $i++) {
$Device = new Device();
$Device->slug = $i;
... | true |
08333f4e5b6de85d60eb9a7237e0bb74c8d4e97f | PHP | Slame1121/fruits_opencart | /catalog/model/design/menu.php | UTF-8 | 375 | 2.546875 | 3 | [] | no_license | <?php
class ModelDesignMenu extends Model {
public function getMenuItems($tag){
$lang = $this->config->get('config_language_id');
$query = $this->db->query("SELECT mi.*
FROM `" . DB_PREFIX . "menu_items` as mi
INNER JOIN `" . DB_PREFIX . "menu` as m ON mi.menu_id = m.id
WHERE m.tag = '" . $tag."' and ... | true |
a890dc20c175ce8aeca5d3736d436813a5452d72 | PHP | siriscac/apigee_md_drupal | /templates/monetization/devconnect-monetization-catalogs-and-plans-list.tpl.php | UTF-8 | 1,534 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @file
* Displays Packagaes and Purchased plans.
*
* Available vars:
* $was_plan_purchased - Indicates if the user is landing here right
* after purchasing a Plan.
* $packages - An array of available packages for the user to purchase Plan(s)
* $purchased_plans - Array of associative key/va... | true |
fbbb479bca3b3d033e0ee6f6bfd5cf8c94ff8d2c | PHP | cosnics/cosnics | /src/Chamilo/Core/Reporting/Viewer/Rendition/Block/BlockRenditionImplementation.php | UTF-8 | 2,466 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Chamilo\Core\Reporting\Viewer\Rendition\Block;
use Chamilo\Core\Reporting\ReportingBlock;
use Chamilo\Core\Reporting\Viewer\Rendition\Block\Implementation\AbstractBlockRenditionImplementation;
use Chamilo\Core\Reporting\Viewer\Rendition\Block\Implementation\DummyBlockRenditionImplementation;
use Chamil... | true |
137634dab8f08eb176d1c95e5cfdda33e79204b8 | PHP | GiveToken/GiftBox | /src/Tests/Api/AuthTest.php | UTF-8 | 2,486 | 2.671875 | 3 | [] | no_license | <?php
namespace Sizzle\Tests\Api;
use Sizzle\Bacon\Database\User;
/**
* This class tests API authentication
*
* ./vendor/bin/phpunit --bootstrap src/Tests/autoload.php src/Tests/Api/AuthTest
*/
class AuthTest
extends \PHPUnit_Framework_TestCase
{
protected $testURL;
protected $email;
protected $apiKey... | true |
5f6b7fbc74d0ad703afe2fa6b9653e09ecf7e989 | PHP | abeatrice/lizmasters.com | /app/Post.php | UTF-8 | 624 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
public $guarded = [];
public function path()
{
return "/posts/{$this->id}";
}
public function scopePublished($query)
{
return $query->where('published', true);
}
public function ... | true |
414522ef4cd58046f3e4d1871e44a54a1db6fef2 | PHP | myiek/swopr.ca | /admin/options/pods.php | UTF-8 | 5,549 | 2.515625 | 3 | [
"MIT"
] | permissive | <?
include_once("../../PeoplePods.php");
$POD = new PeoplePod(array('lockdown'=>'adminUser','authSecret'=>@$_COOKIE['pp_auth']));
error_reporting(1);
$htaccessPath = realpath("../../../");
// find all the PODS that are installed on this server.
// each POD has a settings.php that calls $POD->registerPOD wi... | true |
5664c3495da672aaa20046e955676b6456275bdb | PHP | jmaloles/payme | /database/migrations/2017_09_11_165724_create_table_commissary.php | UTF-8 | 2,591 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTableCommissary extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('commissary_i... | true |
25a0b3e30150423eedca76c1973cb3c518048d33 | PHP | zarveyy/laravel_project | /app/Http/Controllers/CommentController.php | UTF-8 | 2,084 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Controllers\Auth;
use App\Models\Board;
use App\Models\Comment;
use App\Models\Task;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class CommentController extends Controller
{
/**
* Display a listing of the resource.
*... | true |
9f3eb4c617b51c3afcd96f60f17e541230d70690 | PHP | origindesign/origin-drop-8 | /web/modules/custom/includer/src/Controller/LiftsTrailsController.php | UTF-8 | 1,559 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @file
* Contains \Drupal\includer\Controller\LiftsTrailsController
*/
namespace Drupal\includer\Controller;
/**
* The specific class to gather includes and pass to template
*
*/
class LiftsTrailsController extends ContentController {
public function getIncludes () {
$this->result[... | true |
9f05ae9b2fc2dad6e69de876fb533f6b767ccde7 | PHP | sokoyaphilip/computer-based | /projects/index.php | UTF-8 | 18,278 | 2.578125 | 3 | [] | no_license | <?php
//require && instantiate
require '../core/init.php';
$validate = new Validate();
$user = new User();
$db = new DB();
if($user->isLoggedIn()) {
Redirect::to('home.php');
}
if( Input::get('login') ) {
$validation = $validate->check($_POST, array(
'username' => array('required' => true... | true |
0cc5a36bb6e428bd6b6ced4672ed4dfab2416a25 | PHP | nikita2206/stcp-php | /src/Client.php | UTF-8 | 7,423 | 2.578125 | 3 | [] | no_license | <?php
namespace Stcp;
use Amp\Failure;
use Amp\Socket\Client as SocketClient;
use Amp\Success;
use Stcp\Authentication\AuthenticationInterface;
use Stcp\Event\Event;
class Client
{
const VERSION = 1;
const S_BYTE = 1;
const S_U8 = 1;
const S_U16 = 2;
const S_U64 = 8;
const FRAME_HEY = 0... | true |
b3bb30b380b490c5c281d924edd0c0b9a53e0e47 | PHP | aleksmitov/MongoFilesystem | /src/MongoFilesystem/Renderer/HTMLFolderRenderer.php | UTF-8 | 1,370 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright (c) 2014 Alexander Mitov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | true |
8ba5fd263aa85b5495747095a57cd7d82f088902 | PHP | konstantinkhundadze/test | /view/helper/HeadMeta.php | UTF-8 | 923 | 2.90625 | 3 | [] | no_license | <?php
namespace base\view\helper;
class HeadMeta extends AbstractHelper {
public $title = '';
/**
* Meta tags store
* @var array
*/
protected static $_items = array();
protected function _render()
{
$this->_content .= implode(static::$_separator, static::$_items);
... | true |
b66b52e473605fb87825eaf587284ef2d29e9ba3 | PHP | yeahno/lef | /Lef/ControllerAbstract.php | UTF-8 | 1,142 | 2.671875 | 3 | [] | no_license | <?php
/**
* ============================================================================
* 控制器抽象类
* ----------------------------------------------------------------------------
* This is NOT a freeware, use is subject to license terms
* ------------------------------------------------------------------------... | true |
ec8f11d3b0226f6add94239c0332879aec55cce3 | PHP | amolocaleb/kattis | /Symmetric Order.php | UTF-8 | 1,000 | 3.421875 | 3 | [] | no_license | <?php
$set = 1;
do {
fscanf(STDIN, "%d", $numberOfNames);
if ($numberOfNames == 0) {
break;
}
else {
$names = [];
while ($numberOfNames > 0) {
fscanf(STDIN, "%s", $name);
array_push($names, $name);
$numberOfNames--;
}
... | true |
78a060174bd88992cfe1c1764423718472fa4b03 | PHP | LBHackney-IT/DoS-api-gateway | /source/app/Jobs/Data/ApiErrorJob.php | UTF-8 | 1,901 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Jobs\Data;
use App\Cache\RedisCache;
use App\Jobs\Job;
use Illuminate\Support\Facades\Log;
use Laravel\Lumen\Application;
use Rapide\LaravelQueueKafka\Queue\Jobs\KafkaJob;
class ApiErrorJob extends Job
{
/**
* Laravel application container.
*
* @var \Laravel\Lumen\Application
... | true |
de4c77512f0e73ec6264729d472d700683588845 | PHP | bestgator/main_wardi | /app/Models/Currency.php | UTF-8 | 457 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Session ;
class Currency extends Model
{
protected $fillable = ['name', 'sign', 'value'];
public $timestamps = false;
public function nameLang(){
$lang = Session::get('language') ;
if($lang == '2'){
return ... | true |
48af53956067e9c43860c1457c2db425ad74949e | PHP | Dishkan/Data-Structures-Algorithms-in-PHP | /Linked List/singly_linked_list/linkedlist.php | UTF-8 | 3,335 | 3.953125 | 4 | [] | no_license | <?php
//node structure
class Node {
public $data;
public $next;
}
class LinkedList {
public $head;
public function __construct(){
$this->head = null;
}
//Add new element at the end of the list
public function push_back($newElement) {
$newNode = new Node();
$newNode->data = $newElement;
... | true |
2600c1164afe0410d92f81abdb17722bcc7d62d3 | PHP | camportiz/sf2workshop | /src/Framework/Events/ProvidesEvents.php | UTF-8 | 433 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Framework\Events;
use Symfony\Component\EventDispatcher\EventDispatcher;
trait ProvidesEvents
{
/** @var EventDispatcher */
protected $dispatcher;
public function setDispatcher(EventDispatcher $dispatcher)
{
$this->dispatcher = $dispatcher;
}
public function addListe... | true |
5ad71a407b26af64ed1e6295f50fc1a9df2151a6 | PHP | stefanseltmann77/spass | /spass_dbhandle_mysql.php | UTF-8 | 16,599 | 2.765625 | 3 | [] | no_license | <?php
namespace spass\database;
require('spass_dbhandle.php');
use spass\database\SPAppDbHandle;
use \mysqli;
use ArrayObject;
use ReflectionMethod;
/**
* High-Level Wrapper for communication with Mysql-Servers.
* @author Stefan Seltmann
*/
class SPAppDbHandleMySQL extends SPAppDbHandle{
/**
* @param s... | true |
5c3d908d34eef6c0d1195fd0e5d3d3ac7be337a8 | PHP | definitely246/sleeve.phar | /src/lib/templates/model/app/models/__Entity__.php | UTF-8 | 829 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
class {{Entity}} extends Eloquent
{
/**
* List of attributes for a {{entity}}
*
* @var array
*/
protected $fillable = [
{% for attribute in attributes %}
'{{attribute.name_unmodified}}',
{% endfor %}
];
{% for relationship in belongsTo %}
/**
* A {{entity}} belongsTo a {{relationship.Name}}
*/... | true |
3f109310647173d089930609de4647a00d101adc | PHP | milkcreation/deprecated-presstify-core | /presstify/core/Control/TextRemaining/TextRemaining.php | UTF-8 | 5,796 | 2.609375 | 3 | [] | no_license | <?php
/**
* @name TextRemaining
* @desc Controleur d'affichage de champ de saisie de texte avec limitation
* @see http://www.w3schools.com/tags/tag_textarea.asp -> attributs possibles pour le selecteur textarea
* @see http://www.w3schools.com/jsref/dom_obj_text.asp -> attributs possibles pour le selecteur input
* ... | true |
b451048f6f5fccd6f89ceb23323e5ccada98dab8 | PHP | ombr/MultiAuth-Examples-Doctrine | /Models/Provider.php | UTF-8 | 1,049 | 2.890625 | 3 | [] | no_license | <?php
namespace Models;
/**
* @Entity
*/
class Provider{
/**
* The id for all the entities.
* @Id
* @Column(type="integer")
* @generatedValue
*/
private $id;
/**
* @Column(type="string")
*/
private $providerId;
/**
* @Column(type="string")
*/
private $userId;
/**
... | true |
3159495c340d3ff0e888540c371a49a820413e08 | PHP | guillaumemonet/Rad | /src/Rad/Error/Http/HttpException.php | UTF-8 | 1,031 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
* @author Guillaume Monet
* @link https://github.com/guillaumemonet/Rad
* @package Rad
*/
namespace Rad\Error\Http;
use Rad\Error\RadException;
use Rad\Http\StatusCode;
class HttpException extends RadException {
... | true |
bda79ada494df9c6ac7d761b736d5cebb2a611fa | PHP | pabloUlloa/tests | /app/libs/Model.php | UTF-8 | 736 | 3.046875 | 3 | [] | no_license | <?php
/*
*---------------------------------------------------------------
* CLASE DE MODELOS GENÉRICOS
*---------------------------------------------------------------
*/
/**
* Clase Model
*
* Es la base de los Modelos MVC.
*
* @author Pablo Ulloa
*/
class Model{
function __construct(){
global $app;
... | true |
2f1211cf2df8bd62ee84fabed9e626ef68c2f1ea | PHP | hartl3y94/leetcode-php | /src/leetcode/BestTimeToBuyAndSellStockII.php | UTF-8 | 1,685 | 3.734375 | 4 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace leetcode;
class BestTimeToBuyAndSellStockII
{
public static function maxProfit(array $prices): int
{
$n = count($prices);
if ($n <= 0) {
return 0;
}
$dp = array_fill(0, $n, array_fill(0, $n, [0, 0]));
foreach ($price... | true |
965c57fa6d0149eeea629524804987986d2c68ab | PHP | hendaryie/test | /laravel-skeleton/app/Console/Commands/ServiceInterfaceCommand.php | UTF-8 | 846 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
class ServiceInterfaceCommand extends BaseRepositoryCommand
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'repo:service-interface';
/**
* The name and signature of the console command.
*
* @var string
... | true |
090b1775151bd2417625a255115b124315ac0f5c | PHP | dlabas/DlcDiagramm | /src/DlcDiagramm/Diagramm/Dependency/DependencyInterface.php | UTF-8 | 886 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace DlcDiagramm\Diagramm\Dependency;
use DlcDiagramm\Diagramm\Node\NodeInterface;
interface DependencyInterface
{
/**
* Returns the unique identifier of this dependency
*
* @return string
*/
public function getIdentifier();
/**
* Set from node
*
* @para... | true |
5bf2afaf79a7317e946b751f8eeb0451e048ae00 | PHP | anordan/IDM-6630-sp18-nordan-ashley | /wk2-final/code/index.php | UTF-8 | 2,467 | 2.8125 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Top 5 Movie's</title>
<link rel="stylesheet" href="css/main.css">
<!-- TEST -->
</head>
<body>
<?php
// define all five arrays
$movie1 = array(
'title' => 'Sabrina',
'imdbURL' => 'http://www.imdb.com/title/tt0047437/',
'year' =... | true |
6bc694830df51b7772f4c1ec1f11ed24f1c6c5f1 | PHP | alexz202/screenwordsapi | /lib/ConfigFileMgr.class.php | UTF-8 | 1,246 | 2.78125 | 3 | [] | no_license | <?php
/**
* ACL 统一处理类
*
* @author jensenzhang
*/
class ConfigFileMgr {
private $actionConfig;
private $isEncrypt = 0;
public function __construct() {
$this->actionConfig = require ALL_ACTION_INFO;
}
public function GetActionInfo( $action ){
if( $this->actionExist( $acti... | true |
64d1752d006db95054f29ac1823d33d580f2f013 | PHP | daxingyou/a20200615-2 | /打码赚钱游戏试玩平台赚钱源码/打码赚钱游戏试玩平台赚钱源码/protected/models/Membank.php | UTF-8 | 1,639 | 2.953125 | 3 | [] | no_license | <?php
/*
* 银行管理模型
* model()创建一个模型对象
* tableName()返回当前数据表的名字
* CActiveRecord 是活跃记录,好多成熟框架都有此技术
* 元宝
*/
class Membank extends CActiveRecord {
public $account2;
/*
* 返回当前模型对象的静态方法
*/
public static function model($className = __CLASS__) {
return parent::model($className);
}
... | true |
e57aeab1fa42f1fa39f89442b0354768e1646f52 | PHP | kekotorre/dissol | /app/User.php | UTF-8 | 1,054 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Notifications\MyResetPassword;
use App\Pedido;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
... | true |
be13218bada2db0cf42e1dd0289fd82b5bc4de39 | PHP | emillevic/PCD2 | /routes/routes.php | UTF-8 | 4,925 | 2.546875 | 3 | [] | no_license | <?php
require_once("../model/Membro.class.php");
require_once("../model/Advertencia.class.php");
require_once("../controller/MembersController.class.php");
require_once("../controller/AdvertenciasController.class.php");
session_start();
if(isset($_POST["loginAttempt"])){
$login = $_POS... | true |
e8960e9918749bdcd15c3d96c72dac26db98ad49 | PHP | izinis/sistema-gerencial-estagio | /classes/model/domain/Empresa.class.php | UTF-8 | 651 | 3.328125 | 3 | [] | no_license | <?php
class Empresa {
private $id;
private $nome;
private $cnpj;
public function __construct($id, $nome, $cnpj) {
$this->id = $id;
$this->nome = $nome;
$this->cnpj = $cnpj;
}
public function getId() {
return $this->id;
}
public function getNome() {
... | true |
328f9372868394b89102ed4da4bc23c31c655ef0 | PHP | CoderMahabub/CPIMS | /InsertPhp/parts_information.php | UTF-8 | 1,058 | 2.578125 | 3 | [] | no_license | <?php
$db_host="localhost";
$db_name="car_parts_management_system";
$db_user="root";
$db_pass="";
$con = new MySQLi($db_host, $db_user, $db_pass, $db_name);
//print_r($_POST);
$parts_code = $_POST['parts_code'];
$parts_purpose = $_POST['parts_purpose'];
$current_parts_quantity = $_POST['current_parts_quantity'];
$par... | true |
fb30b76342fc4f9057af0f0bc5842331d07b54df | PHP | phalcon/ide-stubs | /src/Support/Helper/Str/Friendly.php | UTF-8 | 1,261 | 2.90625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <team@phalcon.io>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Phalcon\Support\Helper\Str;
use Phalcon\Support\Helper\Exception;
/**
* Ch... | true |
e19bff93df87d5c310031d0a73f7633b79c99e16 | PHP | joomla-extensions/Joomla-Cloud-Storage-APIs | /tests/unit/amazons3/operations/buckets/JAmazons3OperationsBucketsDeleteTest.php | UTF-8 | 3,995 | 2.609375 | 3 | [] | no_license | <?php
/**
* @package Joomla.UnitTest
* @subpackage Amazons3
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
use Joomla\Registry\Registry;
/**
* Test class for JAmazons3OperationsBucketsDe... | true |
761405fc9700d7891b1484f77fbb12c0abb5d60c | PHP | soft-eng-practicum/SimpleQ | /SimpleQ/PHP/PHPUnit/tests/ItemsTableTest.php | UTF-8 | 3,205 | 3.15625 | 3 | [] | no_license | <?php
//Generic DB testing
namespace TDD\Test;
require dirname( dirname(__FILE__) ) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
use PHPUnit\Framework\TestCase;
use TDD\ItemsTable;
use \PDO;
class ItemsTableTest extends TestCase {
// Method to set up a PDO connection
public function se... | true |
9c1cac76a08a6b9c2e4c0a06bb04f61a6f22ef70 | PHP | dalsaniaankur/laravel-6-custom-structure-for-backend | /app/Classes/Helpers/Classes/Helper.php | UTF-8 | 829 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Classes\Helpers\Classes;
use App\Classes\Models\AdminConfiguration\AdminConfiguration;
use App\Classes\Helpers\HelperCommon;
class Helper extends HelperCommon
{
protected $status_with_all_option = ['-1' => 'Status',
'1' => 'Active',
... | true |
18e5b5e1efb754f74138bf16b3acdc74617284bf | PHP | tahq69/competition-manager | /app/Message.php | UTF-8 | 2,586 | 2.65625 | 3 | [] | no_license | <?php namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Class Message
*
* @package App
*/
class Message extends Model
{
use HasAuditTrait;
const TYPES = [
self::USER_MESSAGE,
self::TEAM_INVITATION,
self::TEAM_MEMBER_... | true |
97f9247fb4814800407d2d0a227d596460266928 | PHP | siper92/clippings-invoice-command | /src/Model/Currency.php | UTF-8 | 739 | 3.421875 | 3 | [] | no_license | <?php
namespace App\Model;
use InvalidArgumentException;
class Currency
{
private $code;
private $rate;
public function __construct(string $code, float $rate)
{
if (strlen($code) != 3) {
throw new InvalidArgumentException("Invalid currency code: {$code}");
}
if (... | true |
6f73f644d365219e2f6eacd7f93185952fefe4f1 | PHP | ahmadhamedd/y | /database/seeds/PostTableSeeder.php | UTF-8 | 589 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
class PostTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker=Faker::create();
for($i=0;$i<20;$i++)
{
DB::table('posts')->insert([
... | true |
12f9a92bd6a93b7881630b5edccbafe7b9eeb80e | PHP | arietimmerman/laravel-authchain | /src/Object/AuthenticableTrait.php | UTF-8 | 1,058 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace ArieTimmerman\Laravel\AuthChain\Object;
use ArieTimmerman\Laravel\AuthChain\Exceptions\AuthFailedException;
trait AuthenticableTrait
{
/**
* Get the password for the user.
*
* @return string
*/
public function getAuthPassword()
{
throw new AuthFailedExcept... | true |
43f40c80ecd4df52d582fa7c612cb0715fba3ba1 | PHP | angujo/elocrud | /src/Laravel/ConsoleCommands.php | UTF-8 | 3,105 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created for elocrud.
* User: Angujo Barrack
* Date: 2019-05-25
* Time: 12:42 PM
*/
namespace Angujo\Elocrud\Laravel;
use Angujo\Elocrud\Config;
use Angujo\Elocrud\Models\Model;
use Illuminate\Console\Command;
use Illuminate\Database\Connection;
use Illuminate\Support\Facades\DB;
use Throwable;
clas... | true |
68b8f8f775cd6f0075d8d9c1c008ffadad97fc18 | PHP | thomass/wbkrnl-framework | /framework/routing/RegexRoute.php | UTF-8 | 413 | 2.984375 | 3 | [] | no_license | <?php
class RegexRoute extends Route
{
/**
* @var string
*/
public $pattern;
/**
* @return bool True on success, otherwise false
*/
public function attempt($query)
{
if (preg_match_all($this->pattern, $query, $matches)) {
$args = [];
foreach ($this->actionArgs as $arg => $key) {
$args[$arg] = ... | true |
ddd3049f62c11b829385cc0477792d6b577c4168 | PHP | amone4/framework | /app/libraries/Renderer.php | UTF-8 | 1,850 | 2.546875 | 3 | [] | no_license | <?php
defined('_INDEX_EXEC') or die('Restricted access');
class Renderer {
public static function render($response) {
if (Request::isApiRequest())
Renderer::renderJSON($response);
else
Renderer::renderHTML($response);
}
private static function renderJSON($response) {
header('Content-type: application/... | true |
6c0b11875fc640e12cf44a33063402ca00d944ac | PHP | ashishmchawla/portfolio | /connect.php | UTF-8 | 493 | 2.890625 | 3 | [] | no_license | <?php
//Sets database connection information
$databaseServer="localhost" ;
$databaseUsername="root" ;
$databasePassword='chawla29#$' ;
$databaseName="mysite" ;
try {
$connect = new PDO("mysql:host=$databaseServer;dbname=$databaseName;charset=utf8", $databaseUsername, $databasePassword);
$connect->setAttrib... | true |
4947c7164fb2319a12e09cb463b263e6f0b95cd7 | PHP | JoePEel/portfolio | /careersPage/includes/database/editBlogPost.php | UTF-8 | 438 | 2.71875 | 3 | [] | no_license | <?php
include("db.php");
if(isset($_POST)){
$title = $_POST["blogTitle"];
$content = $_POST["blogContent"];
$id = $_POST["blogId"];
$stmt = $db->prepare("UPDATE blog SET blog_title = :title, blog_content = :content WHERE blog_id = :id");
$stmt->bindParam(":title", $title);
$stmt->bindPar... | true |
13bebfaee87f82089a51d7ec19fde0940c4b8441 | PHP | antonioribeiro/tic-tac-toe | /app/Services/Traits/Winnable.php | UTF-8 | 4,469 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Traits;
trait Winnable
{
/**
* Get column result for.
*
* @param string $playerUnit
* @return bool
*/
public function getColumnResultFor(string $playerUnit = 'O'): bool
{
return $this->winByColumn($playerUnit) !== false ?:
$this->wi... | true |
1d6f7096386b82994464bf109091a745bacf559d | PHP | thorbon/trapp | /library/My/Forms/AddWorker.php | UTF-8 | 8,689 | 2.5625 | 3 | [] | no_license | <?php
/**
* My_Forms_AddWorker extends Zend_Dojo_Form
*
* My_Forms_AddWorker class is used to display the form elements
* required to add a new worker or edit an existing worker
*
* Example usage:
* $form = new My_Forms_AddWorker();
* $form = new My_Forms_AddWorker($values);
*
* @package Zend_Dojo_Form
* @author Ri... | true |
4aa085effd4645b352af296e9ed6144cf5e8836f | PHP | ingdacastillop/koldown-hexagonal | /src/Infrastructure/Contracts/IModel.php | UTF-8 | 2,013 | 2.59375 | 3 | [] | no_license | <?php
namespace Koldown\Hexagonal\Infrastructure\Contracts;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
interface IModel {
// Métodos de la interfaz IModel
/**
*
* @param array $data
*/
public function register(array $data);
/**
* ... | true |
7d5cd4ef3f78d81a8a5fdd67fb5ba4db00090187 | PHP | bworkman1/Network4Rentals | /application/controllers/affiliates/form_submissions.php | UTF-8 | 2,529 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Form_submissions extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->init();
}
private function init()
{
$title = ucwords(str_replace('-', ' ', end($this->uri->segme... | true |
c621eabd2663c9b8b44f0c312f16e298cedd5a6b | PHP | Arslanoov/messenger-api | /app/src/Messenger/Model/Author/AuthorRepositoryInterface.php | UTF-8 | 283 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Messenger\Model\Author;
use Messenger\Exception\AuthorNotFound;
interface AuthorRepositoryInterface
{
/**
* @param Id $id
* @return Author
* @throws AuthorNotFound
*/
public function getById(Id $id): Author;
}
| true |
a69b53757be1137668d49d5b49cecc779d095109 | PHP | cuisine-wp/chef-sections | /Classes/Columns/ColumnBuilder.php | UTF-8 | 3,625 | 3.046875 | 3 | [] | no_license | <?php
namespace ChefSections\Columns;
use ChefSections\Helpers\Column as ColumnHelper;
class ColumnBuilder {
/*=============================================================*/
/** Make functions */
/*=============================================================*/
/**... | true |
3ec5fccc62e1dbd648e9ae18c7c40c92ed3a8480 | PHP | nuriaRZ/entornoServidor | /Practica_Arrays/ejercicio9.php | UTF-8 | 506 | 2.640625 | 3 | [] | no_license | <?php
$estadios["barcelona"]= "camp nou";
$estadios["real madrid"]= "santiago bernabeu";
$estadios["valencia"]= "mestalla";
$estadios["real sociedad"]= "anoeta";
echo "<table border=1px>";
foreach ($estadios as $indice => $value) {
echo "<tr>";
echo "<td>".$indice."</td>";
echo "<td>".$value."</td>";... | true |
00742bc44a7388adb669a51df12a554163fd3f13 | PHP | ccadars/jeuxDeRoles | /src/AppBundle/Controller/PlayersController.php | UTF-8 | 1,005 | 2.5625 | 3 | [] | no_license | <?php
/*
* 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.
*/
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle... | true |
b23bfd5ad51c60f64409b756e47cdcc62d92cec9 | PHP | Drikser/tennisbetfriends | /fr-fr/connexion.php | UTF-8 | 3,499 | 2.53125 | 3 | [] | no_license | <?php
session_start(); // On démarre la session AVANT toute chose
?>
<!DOCTYPE html>
<html>
<?php require("../commun/header.php"); ?>
<body>
<!-- L'en-tête -->
<?php include("entete.php"); ?>
<div id="conteneur">
<!-- Le menu -->
<?php include("menu.php"); ?>
<!--... | true |
496c5e5bdc82b377248eb1b227835abf4cc9cf53 | PHP | icubix/BM | /application/libraries/union.php | UTF-8 | 1,482 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Union extends Organization {
protected function findField($field) {
#converts name field so it's found in union's orginization
if ($field == 'union_name') {
$field = 'organization_name';
}
#... | true |
205fbdfc7267791572011efebe3f44994e85d03c | PHP | Sideswipe47/ProjectTotesLab | /app/ShoppingCart.php | UTF-8 | 1,850 | 2.59375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class ShoppingCart extends Model
{
// Fillables Property
protected $fillable = ['user_id', 'delivery_service_id', 'delivery_option_id', 'promotion_id', 'card_number', 'address', 'note'];
// Shopping Cart belongs to a User
public funct... | true |
b60cf0f20bb9c15da133cd731ef308d6b8436822 | PHP | yossale/coop | /source/application/models/Coop/Supplies.php | UTF-8 | 797 | 2.5625 | 3 | [
"MIT"
] | permissive | <?
class Coop_Supplies extends Awsome_DbTable
{
public function __construct()
{
parent::__construct();
$this->tableName = "supplies";
$this->editableColumns = array("product_id", "supply_date", "supply_amount");
$this->primaryColumn = "supply_id";
$this->deleteColumn = "supply_deleted";
$this->... | true |
e8bf5547cc8140834a723de90355aa905b11c347 | PHP | mazahir-hussain/mvc_practice | /baseController.php | UTF-8 | 610 | 2.796875 | 3 | [] | no_license | <?php
include_once('baseModel.php');
//include_once('view.php');
class BaseController
{
private $model;
/**
* construcrs a new BaseModel
*/
public function __construct()
{
$this->model = new BaseModel;
}
/**
* decides which page to visit based on input
* @return either list of people or ... | true |
0ab2b1a901ac708cbea0464827bdd189a9127581 | PHP | robert589/justbate | /common/entity/NotificationEntity.php | UTF-8 | 3,438 | 2.75 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\entity;
use common\components\DateTimeFormatter;
use Yii;
use yii\data\ArrayDataProvider;
class NotificationEntity implements Entity{
const ACTOR_SEPARATOR = "%,%";
private $is_read;
private $url_template;
private $text_template;
private $text_template_two_people;
... | true |
e1ae00e362f66f94460df70cd8d205a4b12e0145 | PHP | dmytro-khara/tdd-sandbox | /src/Model/Investor.php | UTF-8 | 1,330 | 3.1875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: dmytro.khara
* Date: 2018-02-26
* Time: 14:52
*/
require_once __DIR__ . "/Model.php";
class Investor extends Model
{
private $name;
private $walletValue = 0;
public function __construct($name)
{
$this->name = $name;
}
... | true |
f09464f965abf88e8c0b4db57aca2b58e94acd11 | PHP | Muktaranibiswas/calculator | /problem_set_01/max_min_03.php | UTF-8 | 927 | 4.0625 | 4 | [
"MIT"
] | permissive | <?php
if(isset($_POST['submit'])){
$a=(int)$_POST['number1'];
$b=(int)$_POST['number2'];
$c="<br />";
echo "<b>Output: </b>".$c;
if($a>$b)
echo $a." is bigger than ".$b.$c;
elseif ($a<$b)
echo $a." is smaller than ".$b.$c;
else
echo $a." is equal to ".$b;
exit();... | true |