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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0f86238f72c61cfc55b88015ad28b3859dc55df4 | PHP | shallowones/ug-company | /local/libs/UW/Modules/Notify/Specifications/SpecificationFactory.php | UTF-8 | 2,479 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: agr
* Date: 16.02.2017
* Time: 15:58
*/
namespace UW\Modules\Notify\Specifications;
use UW\Logger;
/**
* Статичная фабрика для создания спецификаций
*
* Class SpecificationFactory
* @package UW\Modules\Notify\Specifications
*/
class SpecificationFactory
{
/**
... | true |
c97fdb6e8d7ee554ca6c7448b4d022df64e6aaf4 | PHP | drdplusinfo/tables | /src/Activities/CatchQualitiesTable.php | UTF-8 | 2,181 | 2.875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace DrdPlus\Tables\Activities;
use DrdPlus\Codes\FoodTypeCode;
use DrdPlus\Tables\Partials\AbstractFileTable;
use Granam\Integer\IntegerInterface;
/**
* See PPH page 132 right column, @link https://pph.drdplus.info/#tabulka_ulovku
*/
class CatchQualitiesTable extends Abstract... | true |
778c1d501fd3a4966db7388981804e946ebf1eef | PHP | TonisOrmisson/lime-response-quality | /QualityResult.php | UTF-8 | 700 | 3.65625 | 4 | [] | no_license | <?php
class QualityResult
{
private float $quality = 1.0;
private int $items = 0;
/**
* @return float
*/
public function getQuality(): float
{
return $this->quality;
}
/**
* @param float $quality
*/
public function setQuality(float $quality): void
{
... | true |
cadcfdc90e02cff889253848f0632db6d42c0a1a | PHP | Sampavi-Shanthakumar/Class-Room-Management-System | /projectSchool/updateTeacherDetailsCode.php | UTF-8 | 1,778 | 2.5625 | 3 | [] | no_license |
<?php
include 'config.php';
session_start();
$time = $_SERVER['REQUEST_TIME'];
$timeout_duration = 30*60;
if (isset($_SESSION['LAST_ACTIVITY']) &&
($time - $_SESSION['LAST_ACTIVITY']) > $timeout_duration) {
session_unset();
session_destroy();
session_start();
}
$_SESSION['LAST_ACTIVITY'] = $time;
if(iss... | true |
376da6c2bb6a7c2bad1c7d3aa79f1dee7299cedd | PHP | CR0NYM3X/PING-ICMP-ECHO-PHP | /ping.php | UTF-8 | 5,694 | 2.9375 | 3 | [] | no_license | <?php
#ejemplos de socket option :
#http://php.net/manual/es/function.socket-set-option.php
#http://php.net/manual/es/function.socket-get-option.php
//display_errors ('On'); ini_set ('error_reporting', 'E_ALL');
#opcion #1 ping
function ping($host)
{
$package = "\x08\x00\x19\x2f\x00\x00\x00\x00\x70\x69\x6e\x... | true |
9c46ea1062c8626188beb189ff9a5eba7e98137a | PHP | RobertShippey/IBD-Events | /IBDE-plugin/helper-functions.php | UTF-8 | 3,784 | 3.3125 | 3 | [] | no_license | <?php
/**
* Misc Helper Functions
*/
/**
* Takes an angle in degrees and returns text descriptions of that angle.
*
* @param float $angle The angle to be described in degrees (may be positive or negative).
* @param int $division Optional. Tumber of cardinal points to be used. Default = 8.
* @return array A... | true |
5c0632ce6bfe0c1d0d21b86991c74fbd5f0a08a5 | PHP | IDCI-Consulting/StepBundle | /Path/PathInterface.php | UTF-8 | 1,389 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author: Thomas Prelot <tprelot@gmail.com>
* @license: MIT
*/
namespace IDCI\Bundle\StepBundle\Path;
use IDCI\Bundle\StepBundle\Navigation\NavigatorInterface;
use IDCI\Bundle\StepBundle\Path\Type\PathTypeInterface;
use IDCI\Bundle\StepBundle\Step\StepInterface;
interface PathInterface
{
/**
... | true |
51305328092fe5e49e816eb0514cf7ef91b35209 | PHP | mrfoh/projectloud | /app/Data/Repositories/Categories.php | UTF-8 | 944 | 2.84375 | 3 | [] | no_license | <?php namespace Bps\Data\Repositories;
use Prettus\Repository\Eloquent\BaseRepository;
class Categories extends BaseRepository {
/**
* Specify Model class name
*
* @return string
*/
function model()
{
return "Bps\\Data\\Models\\Category";
}
/**
* Speci... | true |
77335acd4bcf9a2fcb5b8ddb7f052d89bdf770e7 | PHP | jeromealbrecht/Phppart1-5 | /PartieIV/Exo4/Exercice4.php | UTF-8 | 636 | 4.5 | 4 | [] | no_license | <?php
// Faire une fonction qui prend en paramètre deux nombres. La fonction doit retourner :
// Le premier nombre est plus grand si le premier nombre est plus grand que le deuxième
// Le premier nombre est plus petit si le premier nombre est plus petit que le deuxième
// Les deux nombres sont identiques si les deu... | true |
8876fcadce1a4c2905a2fb6f3f62b04621f2c737 | PHP | UFOP-CSI477/2018-01-atividades-daniellaPaiva | /Atividade08/controller/AlunosController.php | UTF-8 | 1,158 | 2.5625 | 3 | [] | no_license | <?php
namespace Controller;
use PDO;
use Model\Aluno;
class AlunosController {
public function listar() {
// Acesso ao Modelo
$aluno = new Aluno();
// Manipular dados
$lista = $aluno->all();
// Invocar a View
include './view/alunos/content_list.php';
}
// Exibir o formulario para ... | true |
d7ab726cb3d7cd3e1ed2d0f7709d09e36f59cbcb | PHP | viveksh09876/bop-updated | /app/View/Helper/ImgHelper.php | UTF-8 | 3,637 | 2.6875 | 3 | [] | no_license | <?php
/**
* Project : IMG180
* Author : Mukesh Soni
* Creation Date : Dec 20, 2013
* Description : An image helper to help populating image
* Task : Resize,Crop,
* File Dependancy : root .htaccess, resize.php
*
*/
// .htaccess settings
//# Added By Mukesh Soni For Image Resizer
// RewriteCond %{REQUEST_FILENAME}... | true |
f1675a0c56a7d52494497c7bb88a0c3853cd76e0 | PHP | juan-camacho/grupo2_eCommerce | /php/forms/form.php | UTF-8 | 1,655 | 3.234375 | 3 | [] | no_license | <?php
// Helpers de formularios, si estuviéramos usando objetos, ésta sería una clase
// abstracta.
$errors = [];
// Devuelve el valor de un campo o un string vacío
function old($field, $default = '') {
return $_REQUEST[$field] ?? $default;
}
// Compara ambos valores y devuelve el string 'selected' en caso de que s... | true |
eb34fb9e14f495ed57c22bc768875cf14eb7649a | PHP | fordeco34/mindkeeper | /service/persistence/UserDAO.php | UTF-8 | 234 | 2.828125 | 3 | [] | no_license | <?php
class UserDAO
{
public function UserDAO() {
}
public function getByEmail($email){
$user = new User();
$user->setName("Isan");
$user->setEmail("I@I.com");
$user->setPassword("Teresina");
return $user;
}
} | true |
f85c346e48c01c1d97da0b079bf2135c755ee75f | PHP | ngschaider/wireguard-manager | /classes/Response.php | UTF-8 | 486 | 3.296875 | 3 | [] | no_license | <?php
class Response {
public $headers = [];
public $content = "";
public function setHeader($name, $value) {
$this->headers[$name] = $value;
}
public function getHeader($name) {
return isset($this->headers[$name]) ? $this->headers[$name] : null;
}
public ... | true |
9973c73afde0cff40d17fd872cb9a276c3179aa5 | PHP | vanxuanty95/instagram | /service/generate.php | UTF-8 | 649 | 3.03125 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
use mikehaertl\wkhtmlto\Image;
function generateImage($url)
{
// You can pass a filename, a HTML string, an URL or an options array to the constructor
var_dump($url);
$image = new Image($url);
$image->saveAs('/save/page.png');
// ... or send to client for inl... | true |
01698bb9f1df644b13cae08183c1bf6f9899c01d | PHP | papulovskiy/backend-trial | /assignment1/include.php | UTF-8 | 3,419 | 3.390625 | 3 | [] | no_license | <?php
// Helpers
///////////////////////////////////////////////
/**
* Safely output plain text in HTML.
*
* @param string $value Plain text
* @param bool $doubleEncode Double encode the input
* @return string Safe HTML string
*/
function safe($value, $doubleEncode = true)
{
return htmlspecialch... | true |
524dfeae345d2d980314673f37d8a412b5d4512a | PHP | Radanovn/Weband | /OOP/PokemonTrainer/pokemon.php | UTF-8 | 3,861 | 3.34375 | 3 | [] | no_license | <?php
class Trainer
{
public $name;
public $number;
public $badges;
public $pokemons = [];
public function __construct(string $name, int $badges = 0)
{
$this->name = $name;
$this->badges = $badges;
}
public function getName(): string
{
return... | true |
5db969cf272a187b7e4e790f9791f138493b8be1 | PHP | AlnPir/FitnessCenter | /app/src/Entity/BankTransfer.php | UTF-8 | 1,849 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\BankTransferRepository")
*/
class BankTransfer
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string"... | true |
fb4b08683a3fc4aeec0ff4d8751600175bedcd44 | PHP | Vicfou-dev/Valkyria | /src/Application.php | UTF-8 | 3,274 | 2.625 | 3 | [] | no_license | <?php
namespace Valkyria;
use \Valkyria\Helper\ListArray;
Class Application{
protected $basePath;
protected $config;
protected $storagePath;
protected $namespace;
protected $instances;
protected static $instance;
public $router;
public function __construct(Array $config = array... | true |
4c73d5b00a039a767b1c6b77e16d83ef314fad85 | PHP | adedayomatt/protonhacker | /resources/mato/lib/php/mail/mailer.php | UTF-8 | 1,997 | 2.859375 | 3 | [] | no_license | <?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer-6.0.5/src/Exception.php';
require 'PHPMailer-6.0.5/src/PHPMailer.php';
require 'PHPMailer-6.0.5/src/SMTP.php';
class EMAIL{
private $mailer;
private $client;
private $subject;
private $body;
function __construct... | true |
a3911c17f9bda5cee92712ba787f7d3825ce166a | PHP | PMPacks/FarmingIslandServerOld | /plugins/RankColor/src/NgLamVN/RankColor/RankColor.php | UTF-8 | 2,462 | 2.515625 | 3 | [] | no_license | <?php
namespace NgLamVN\RankColor;
use pocketmine\Player;
use pocketmine\plugin\PluginBase;
use _64FF00\PureChat\PureChat;
use _64FF00\PurePerms\PurePerms;
use NgLamVN\RankColor\EventListener;
class RankColor extends PluginBase
{
public $pc, $pp;
public function getPC(): ?PureChat
{
return $th... | true |
1dc4a4951d44c84fec8292c0ce8cafc051d780af | PHP | ramsey/conventional-commits | /src/ConventionalCommits/Console/Command/ConfigCommand.php | UTF-8 | 2,759 | 2.796875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* This file is part of ramsey/conventional-commits
*
* ramsey/conventional-commits is open source software: you can distribute it
* and/or modify it under the terms of the MIT License (the "License"). You may
* not use this file except in compliance with the License.
*
* Unless required by applicable ... | true |
fd62eecf75346dcf0dbe6d8083c4b18cdedd967e | PHP | bramanian/cvs | /admin/app/models/Pesan.php | UTF-8 | 2,091 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use LaravelBook\Ardent\Ardent;
class Pesan extends Ardent {
protected $fillable = ['nama','email','kontak','pesan'];
protected $table="pesan";
public static $rules = array(
'nama'=>'required|min:5|alpha_num',
'email' => 'required|email',
'kontak'=>'required|numeric|min:3',
'pesan'=>'required... | true |
66a47862ccd3e13969e118e5afb3c48bf3295e6b | PHP | and85620/R-Cube_MRBS | /session/session_php.inc | UTF-8 | 5,820 | 2.53125 | 3 | [] | no_license | <?php
namespace MRBS;
use MRBS\Form\Form;
/*****************************************************************************\
* *
* File name session_php.inc *
* ... | true |
443dfcaaaaf44f13814e34c67f4897fab96cd26b | PHP | jotlabs/php5-jotcontent | /tests/JotContent/Entities/TagsTest.php | UTF-8 | 1,287 | 2.640625 | 3 | [] | no_license | <?php
use JotContent\Testing\UnitTestUtils;
use JotContent\Entities\Tags;
class TagsTest extends PHPUnit_Framework_TestCase {
protected $tags;
public function setUp() {
$dataSource = UnitTestUtils::getDatasource('videos');
$this->tags = Tags::getInstance();
$this->tags->setDataSource(... | true |
6a9fff100c7d9e646fb3ccd2316da09e2c931486 | PHP | bingcool/swoolefy | /Test/Process/AmqpProcess/AmqpConsumerFanout1.php | UTF-8 | 3,803 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Test\Process\AmqpProcess;
use Common\Library\Amqp\AmqpFanoutQueue;
use Swoolefy\Core\Application;
use Swoolefy\Core\Process\AbstractProcess;
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Exchange\AMQPExchangeType;
// fanout exchange 下,消费者需要指定queue
class AmqpConsumerFanout1 extends Abs... | true |
44f05d6a19ebff62020358ed015133ed92a7375b | PHP | SemicolonStruggles/ProjectYadu | /app/Http/Requests/GetChartDateRangeRequest.php | UTF-8 | 1,104 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Carbon\Carbon;
use Illuminate\Foundation\Http\FormRequest;
class GetChartDateRangeRequest extends FormRequest
{
public function authorize()
{
return true;
}
protected function prepareForValidation()
{
//If invalid data parameters are supplie... | true |
a03fb93d9177b86eaeb6adbfe9df4a0b88e8bc2f | PHP | n1tk/some_projects | /task_assign_app/registration_result.php | UTF-8 | 4,535 | 2.53125 | 3 | [] | no_license | <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Submission Results</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="container">
<header>TaskList</header>
<?php include "menu.php"; ?>
<div class="content">
<secti... | true |
6937ec4627930d11f528e0692d293e396cea3b1d | PHP | segurasystems/phpunit-clever-and-smart | /src/PHPUnit/Runner/CleverAndSmart/Storage/Sqlite3Storage.php | UTF-8 | 6,394 | 2.53125 | 3 | [] | no_license | <?php
namespace PHPUnit\Runner\CleverAndSmart\Storage;
use Closure;
use PHPUnit\Runner\CleverAndSmart\Exception\StorageException;
use PHPUnit\Framework\TestCase as TestCase;
use PHPUnit\Runner\CleverAndSmart\Run;
use Exception;
use SQLite3;
class Sqlite3Storage implements StorageInterface
{
const SCHEMA_VERSION =... | true |
9dc026f6a69cfb31f60cff8b32f081321c129a6b | PHP | alfredortega/nblife2 | /nblife/inc/Security.php | UTF-8 | 947 | 3.203125 | 3 | [] | no_license | <?php
/**
*Secure class performs the required security functions
*for the application. It does encyrption, decryption, hashing
*and password checking.
*
*/
class Secure {
public $salt = "R2{=7f%AY{zQ0GEAD?]1_651!,a@N`Y-{A?gYq-vh~Ds+|?6hk!|L:Nh|7%_ePa(";
public $key = "D6T#k]gZjeM?Jy!s";
public function Encr... | true |
ebca93d93ae0ca0441fc167b853e2136f2a4d37b | PHP | ateliee/plantuml-parser | /src/PlantUMLParser/Structure/PUMLNote.php | UTF-8 | 368 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ateliee\PlantUMLParser\Structure;
use Ateliee\PlantUMLParser\PUMLElement;
/**
* カーディナリティ
*
* @todo end noteに対応
*/
class PUMLNote extends PUMLElement
{
public function str($current_indent, $indent)
{
return $this->getOutputComment($current_indent). $current_indent. sprintf('note %s... | true |
453e5fcc1c78077b97a10a2788e30756f230be69 | PHP | HanFez/hiyik-manage-system | /app/IekModel/Version1_0/SearchWord.php | UTF-8 | 1,621 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
//
// +------------------------------------------------------------------------+
// | PHP Version 5 |
// +------------------------------------------------------------------------+
// | Copyright (c) All rights reserved. ... | true |
ef69a0d9eb342f2d4f84bb799fa141bb4274aa3c | PHP | leetaehee/dealings | /class/EventClass.php | UTF-8 | 6,974 | 2.59375 | 3 | [] | no_license | <?php
/**
* 이벤트 클래스
*/
class EventClass
{
/** @var string|null $db 는 데이터베이션 커넥션 객체를 할당하기 전에 초기화 함*/
private $db = null;
/**
* 데이터베이스 커넥션을 생성하는 함수
*
* @param object $db 데이터베이스 커넥션
*
* @return void
*/
public function __construct($db)
{
$this->db = $db;
}
/**
... | true |
0b2e5e6d3d033eda8e266fa3bb4f50847e5e5ce6 | PHP | Andrew-Mackay/laravel-vue-spa-blog | /app/Http/Controllers/BlogPostController.php | UTF-8 | 7,708 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\BlogPost;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Validator;
use JD\Cloudder\Facades\Cloudder;
class BlogPostController extends Controller
{
const CLOUDINARY_UPLOAD_FOLDER = "k_blog/";
... | true |
29235c685fe846afe3a7b9715ab8b62b08457043 | PHP | tomfriedhof/activelampexam | /src/Entity/Shortend.php | UTF-8 | 1,594 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\ShortendRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ShortendRepository::class)
*/
class Shortend
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Col... | true |
850226a094ca82ccb5622607f17f54aed0b46dbf | PHP | tim-hogan/glidingops | /orgs/1/accountrules.php | UTF-8 | 9,051 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
function removecomma($str)
{
$str2 = str_replace(","," ",$str);
return $str2;
}
function CalcTowRetrieve($org,$towplane,$duration)
{
$chrg=-1.0;
$con_params = require('./config/database.php'); $con_params = $con_params['gliding'];
$con=mysqli_connect($con_params['hostname'],$con_params['username'... | true |
1c9dddc9a5b8a319b4a509d455558e5e3ec7cd02 | PHP | iPowar/sms-gateway | /src/Core/SmsGatewayStatusHandler.php | UTF-8 | 759 | 2.734375 | 3 | [] | no_license | <?php
namespace SmsGateway\Core;
use SmsGateway\Exception\SmsGatewayException;
use SmsGateway\Message\Message;
/**
* @author Mikhail Kudryashov <kudryashov@fortfs.com>
*/
class SmsGatewayStatusHandler
{
use HandlerTrait;
/**
* @var array
*/
private $config;
/**
* @param array $con... | true |
bb2c9e07dee3c938190083604907601bd1edc4cf | PHP | akagerard/plasmalife | /model/Ciudad.php | UTF-8 | 953 | 2.9375 | 3 | [] | no_license | <?php
//Incluímos inicialmente la conexión a la base de datos
require "../config/conexion.php";
class Ciudad
{
public function __construct()
{
}
public function insertar($ciudad)
{
$sql = "INSERT INTO tb_ciudad (ciudad) VALUES('$ciudad')";
return ejecutarConsulta($sql);
}
... | true |
10bd409730c4600a77f11c933839f80ec1a21c43 | PHP | Hank-wood/sinoci | /scripts/serve.php | UTF-8 | 700 | 2.546875 | 3 | [] | no_license | <?php
// 应用根目录
$root = dirname(__DIR__);
// 生成缓存目录
file_exists($root . '/storage/cache') OR mkdir($root . '/storage/cache');
// 获取访问路径
$_SERVER['PATH_INFO'] = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
// 转义字符
$_SERVER['PATH_INFO'] = urldecode($_SERVER['PATH_INFO']);
// 排除根目录与 index.php 开头
if ($_SERVER['PAT... | true |
378afb3509d4627647ce8b7a440bfbaf9071c494 | PHP | jaggy/slim-boilerplate | /app/Application.php | UTF-8 | 2,661 | 2.8125 | 3 | [] | no_license | <?php
namespace App;
use Closure;
use Slim\App as Slim;
use Dotenv\Dotenv;
class Application
{
/**
* Router instance.
*
* @var Slim
*/
private $router;
/**
* Instance of the application.
*
* @var Application
*/
private static $instance;
/**
* Create ... | true |
dfcb9f9a4838d7ddf9b97ab4c2e1ee127b93229f | PHP | r041367/leet-code-practice-php | /code/tests/Easy/MergeTwoSortedListsTest.php | UTF-8 | 1,976 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Easy;
use PHPUnit\Framework\TestCase;
use R041367\LeetCodePracticePhp\Easy\ListNode;
use R041367\LeetCodePracticePhp\Easy\MergeTwoSortedLists;
class MergeTwoSortedListsTest extends TestCase
{
/**
* @dataProvider dataProvider
* @param array $l1
* @param array $l2
* @p... | true |
446cdc7e1a9f51837023e5a3af9164b9bdf0d51c | PHP | franjhg/dwes13-github | /U2P03-PHP-Control de flujo/ecf-factorial.php | UTF-8 | 516 | 2.859375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
</head>
<body>
<?php
if(!isset($_POST['Enviar'])){
?>
<form action="ecf-factorial.php" method="post">
Numero: <input type="number" name="numero">
<input type="submit" name="Enviar">
</form>
<?php
}else {
... | true |
46595b5377f3ee877f76af138299f7e4e4adfd51 | PHP | tigron/tiny-invoice | /lib/model/Mobile.php | UTF-8 | 1,724 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Mobile class
*
* @author Christophe Gosiau <christophe@tigron.be>
* @author David Vandemaele <david@tigron.be>
*/
use \Skeleton\Database\Database;
class Mobile {
use \Skeleton\Object\Model;
use \Skeleton\Object\Get;
use \Skeleton\Object\Save;
use \Skeleton\Object\Delete;
use \Skeleton\Pager\Page... | true |
bdc3223ac65c0d30c2bd135d85294af7ecac772f | PHP | Acaeris/lol-parser | /src/Commands/VersionUpdateCommand.php | UTF-8 | 4,013 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Commands;
use App\Services\FetchServiceInterface;
use App\Services\StoreServiceInterface;
use Exception;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\Inpu... | true |
e7cb7f9633ae8ac1a6d94f547c3aee045bb8d316 | PHP | slashequip/sumy | /tests/Unit/PowerOfTest.php | UTF-8 | 306 | 3.421875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
it('can power of a number', function () {
$sumy = newSumy(10)
->pow(2);
expect($sumy->get())
->toBe(100.0);
});
it('can chain power of a number', function () {
$sumy = newSumy(4)
->pow(4)
->pow(2);
expect($sumy->get())
->toBe(65536.0);
});
| true |
78095e36474033d762ac64d15796ec45b54381ab | PHP | reinvanoyen/oak | /src/Migration/Logger/ConsoleMigrationLogger.php | UTF-8 | 908 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Oak\Migration\Logger;
use Oak\Contracts\Console\OutputInterface;
use Oak\Contracts\Migration\MigrationLoggerInterface;
use Oak\Contracts\Migration\RevisionInterface;
class ConsoleMigrationLogger implements MigrationLoggerInterface
{
/**
* @var OutputInterface $output
*/
private $out... | true |
0850108a147578d1e4edb95bfccdbb1db9a7a0b5 | PHP | dannymaes/learning-php | /6.mysql/profile.php | UTF-8 | 2,470 | 2.6875 | 3 | [] | no_license | <?php
include_once 'connection.php';
include_once 'header.php';
$conn = openConnection();
$name = $_GET['username'];
$sql = "SELECT * FROM hopper_2 WHERE username = '$name'";
$result = $conn->query($sql);
// check if user is same in database
?>
<div class="profile">
<?php
... | true |
a95fcbddf7b99ba2d0c506aa6f854b812006f39f | PHP | RichardCoffee/custom-post-type | /functions.php | UTF-8 | 5,357 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
function tcc_plugin_class_loader( $class ) {
if ( substr( $class, 0, 4 ) === 'TCC_' ) {
$load = str_replace( '_', '/', substr( $class, ( strpos( $class, '_' ) + 1 ) ) );
$file = TCC_PLUGIN_DIR . "/classes/{$load}.php";
if ( is_readable( $file ) ) include $file;
}
}
spl_autoload_register( 'tcc_plugin_clas... | true |
72ecf5e2b9daa61f6e70aed157b659a32fe51e5f | PHP | Polinicles/Wirvonhier | /www/src/Wirvonhier/Application/Service/Place/CreatePlaceRequest.php | UTF-8 | 1,443 | 3.015625 | 3 | [] | no_license | <?php
namespace Wirvonhier\Application\Service\Place;
use Wirvonhier\Domain\Helper\Assert;
class CreatePlaceRequest
{
private $type;
private $latitude;
private $longitude;
/**
* CreatePlaceRequest constructor.
* @param $type
* @param $latitude
* @param $longitude
*/
publ... | true |
d8d47365b0ff4e8fc42439478a069a4f2091c8ec | PHP | wxzuan/wxzuan | /common/models/Pic.php | UTF-8 | 1,445 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "web_pic".
*
* @property integer $id
* @property integer $user_id
* @property integer $pic_type
* @property string $pic_s_img
* @property string $pic_m_img
* @property string $pic_b_img
* @property integer $pic_addtime
* @prope... | true |
b17f5a568c7880fb71f30d50fcc2e70768f90faa | PHP | motoyasu-yamada/spicycurry-for-goo | /scgoos/src/scm_test.php | UTF-8 | 774 | 2.671875 | 3 | [] | no_license | <?php
require_once 'scm_log.php';
assert_options (ASSERT_ACTIVE, 1);
assert_options (ASSERT_WARNING, 1);
assert_options (ASSERT_QUIET_EVAL,1);
assert_options (ASSERT_CALLBACK, 'scm_test_assert_handler');
/**
* 期待する値かどうかチェックする
*/
function assertEquals($e,$v)
{
if ($e === $v) {
return;
}
ec... | true |
b8f67d24d5e82da8594d75836610b7a9f8e0752e | PHP | korowai/framework | /packages/contextlib/src/Korowai/Lib/Context/FactoryContextMethods.php | UTF-8 | 913 | 2.75 | 3 | [] | no_license | <?php
/**
* @file src/Korowai/Lib/Context/FactoryContextMethods.php
*
* This file is part of the Korowai package
*
* @author Paweł Tomulik <ptomulik@meil.pw.edu.pl>
* @package korowai\contextlib
* @license Distributed under MIT license.
*/
declare(strict_types=1);
namespace Korowai\Lib\Context;
/**
* Method... | true |
29c32046ec61d38fc99df0d3c4a227feb9f74ff4 | PHP | Lightsider/test-system | /backend/admin/app/TempTesting.php | UTF-8 | 1,721 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Docker\API\Model\ContainersCreatePostBody;
use Docker\Docker;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property int $id_user
* @property int $id_test
* @property int $id_current_quest
* @property string $quest_arr
* @property string $skip_quest_arr
* @propert... | true |
87a86eb848b8a4f7da505926c46c62347761084e | PHP | BrunoBeltreGuzman/apis-php | /services/notes/delete.php | UTF-8 | 581 | 2.625 | 3 | [] | no_license | <?php
$urlApisNotes = realpath(dirname(__FILE__) . '/../../apis/api-notes/notes.php');
require_once $urlApisNotes;
class Delete
{
function __construct()
{
}
public function delete()
{
if (isset($_POST["id"])) {
//get text id to delete (POST)
... | true |
3c90074ad47ef59ff597511cb332fe62d95d5af7 | PHP | jurawebdeveloper/gas | /classes/daos/ItemEstoqueDAO.php | UTF-8 | 1,731 | 2.578125 | 3 | [] | no_license | <?php
require_once 'Model.php';
class ItemEstoqueDAO extends Model{
function __construct(){
parent::__construct();
$this->class = 'ItemEstoque';
$this->table = 'itemestoque';
}
public function insereItemEstoque(ItemEstoque $itemEstoque){
$valores = "
null,
'{$itemEstoque->getDataEntrada()}',
'{$ite... | true |
5fe95930cdc6f9165451df5feaea976da550ed6c | PHP | jsonpeng/partTimeJobInfoPlatform | /app/Repositories/WechatReplyRepository.php | UTF-8 | 8,015 | 2.625 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\WechatReply;
/**
* Reply Repository.
*/
class WechatReplyRepository
{
use WechatBaseRepository;
/**
* model.
*
* @var App\Models\Reply
*/
private $model;
/**
* eventRepository.
*
* @var App\Repositories\EventRepos... | true |
e10bee0690b7f726d87592025209bb951642a8bd | PHP | sivarajankumar/classroom-presenter | /Incognito/students/scripts/delete_course.php | UTF-8 | 847 | 2.765625 | 3 | [] | no_license | <?php
include '../../db_credentials.php';
// This php file will delete a course from a student's course list
// given a uid for the student and a cid for the course
// Check if we are given a uid and a cid
if (isset($_POST['uid']) && isset($_POST['cid'])) {
// Connect to the database
//$username = "schwer... | true |
19b2697051628148ded06ae10bcd74722bb6f997 | PHP | secytunlp/centros_mvc | /classes/com/centros/view/gridModel/model/GridCVValueFormat.Class.php | UTF-8 | 1,352 | 2.53125 | 3 | [] | no_license | <?php
/**
* Formato para renderizar los archivos en las grillas
*
* @author Marcos
* @since 20-10-2016
*
*/
class GridCVValueFormat extends GridValueFormat {
public function __construct() {
parent::__construct();
}
public function format($value, $item=null) {
$oManagerIntegrante = ManagerFactory::getI... | true |
722e6eb9bd1a1d0233c3134254512066d83fbb21 | PHP | best-brands/bol-com-retailer-api | /src/Models/CreateReplenishmentLine.php | UTF-8 | 609 | 2.640625 | 3 | [] | no_license | <?php
namespace HarmSmits\BolComClient\Models;
/**
* @method null|string getEan()
* @method self setEan(string $ean)
* @method null|int getQuantity()
*/
final class CreateReplenishmentLine extends AModel
{
/**
* The EAN number associated with this product.
* @var string
*/
protected string ... | true |
2fec312aa6a1345cb67dd155b60b8cdd4b8bdfc9 | PHP | linyumo/20180705 | /jm20170601/mainf.php | UTF-8 | 7,332 | 2.671875 | 3 | [] | no_license | <?php
//檢查 cookie 中的 passed 變數是否等於 TRUE
$passed = $_COOKIE["passed"];
/* 如果 cookie 中的 passed 變數不等於 TRUE
表示尚未登入網站,將使用者導向首頁 index.html */
if ($passed != "TRUE")
{
header("location:index.html");
exit();
}
?>
<!doctype html>
<html>
<head>
<title>會員管理</title>
<meta c... | true |
0eb43e08ec2e7af6c9eb818681333d553afa21dd | PHP | samjaved/ShopAPI | /src/Entity/Product.php | UTF-8 | 2,213 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: User
* Date: 23/10/2018
* Time: 12:56 AM
*/
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\OneToMany;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Val... | true |
637d70f73e830529586df3e32925c6b8440d7863 | PHP | ColinHill/PHP | /AssignmentOne/dbConn.php | UTF-8 | 286 | 2.84375 | 3 | [] | no_license | <?php
function getConnection(){
$dbConn = mysqli_connect("localhost","root","inet2005","employees");
if (!$dbConn){
die('Could not connect to the Employees Database: ' . mysqli_error($dbConn));
}
return $dbConn;
}//end getConnection() | true |
abd9f40e9125646ee68d57981c04ee1b57499ce3 | PHP | mairitsaal/php_alused | /Vormid/tellimine.php | UTF-8 | 626 | 2.96875 | 3 | [] | no_license | <?php
//ECHO <PRE>;
//print_r($_GET);
//lisab vormist saadud andmed muutujasse
$toode1 = $_GET['t1'];
echo 'Toode 1: '.$toode1.'tk';
//lisab vormist saadud andmed muutujasse
//$toode2 = $_GET['t2'];
//echo 'Toode 2: '.$toode2.'tk';
//$toode3 = $_GET['t3'];
//echo 'Toode 3: '.$toode3.'tk';
function silindriRuumala($... | true |
543dc63815090dc10c5ddbca32a8ced2c7abbd49 | PHP | Valorix/doctissimo | /src/Service/Database.php | UTF-8 | 1,187 | 3.21875 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Entity\Article;
class Database
{
/**
* @var \PDO
*/
private $PDO;
public function __construct(string $dbURL, string $user, string $pass = null)
{
$this->PDO = new \PDO($dbURL, $user, $pass);
}
public function createArticle(Article &$art... | true |
2f39643facf8a91a8a3d5466d12c6ef471172744 | PHP | Gabriel018/ProjectRoboKernel | /Robokerneel/admin/restrito-cadastrar.php | UTF-8 | 1,589 | 2.6875 | 3 | [] | no_license | <?php
// para mostrar os erros (padrão)
ini_set('display_errors', 1);
ini_set('log_errors', 1);
error_reporting(E_ALL);
try{
if($_SERVER['REQUEST_METHOD'] != 'POST')
header("Location: form-restrito.php");
// Variáveis ligando ao formulário
$nome = $_POST['nome'];
if($nome=="") thro... | true |
083422cefae1c6a71fa92e89137d443678e97770 | PHP | gxchain/des-sdk-php | /src/GXChain/Common/Utils.php | UTF-8 | 2,671 | 2.8125 | 3 | [] | no_license | <?php
namespace GXChain\Common;
class Utils
{
public static function getRandCode()
{
$charts = "123456789";
$max = strlen($charts) - 1;
$noncestr = "";
for($i = 0; $i < 15; $i++)
{
$noncestr .= $charts[mt_rand(0, $max)];
}
return $noncestr;
... | true |
c4b25cfb3983cb32438a5de6720cd0d309f2f5fa | PHP | ludo11/miniblog | /connection.php | UTF-8 | 736 | 3.0625 | 3 | [] | no_license | <?php
class db {
//
protected static $instance = NULL ;
//constructeur vide pour s'en servir
public function __construct(){
}
private function __clone() {
}
public static function getInstance(){
//on verifie si l'instance existe sinon on la ... | true |
3c86a34604562729f8ec26434518525cca2fbd95 | PHP | LRP-sgravel/wp-browser | /src/tad/WPBrowser/Filesystem/Filesystem.php | UTF-8 | 765 | 2.796875 | 3 | [] | no_license | <?php
namespace tad\WPBrowser\Filesystem;
class Filesystem extends \Symfony\Component\Filesystem\Filesystem
{
public function requireOnce($file)
{
require_once $file;
}
public function getUserHome()
{
// on Windows the POSIX library is not implemented so use environment variables... | true |
91da7eedd9f282fec70e6d39d9d6f0cce0d9f238 | PHP | KastroWalker/sistema_de_biblioteca | /src/pages/books/index.php | UTF-8 | 1,813 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
require_once '../header/index.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/src/controllers/Book.php';
$book = new Book();
$response = $book->getAll();
?>
<div class="d-flex justify-content-between">
<h1 class="h2">Livros</h1>
<a href="./create.php" class="btn btn-primary">Adicionar Livro</a>
</div>
... | true |
0c218062d4e506b90bcad70aa08e7832448a4a02 | PHP | clue-labs/niseredis | /src/Niseredis/Database/Key/HashKey.php | UTF-8 | 3,699 | 3.03125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* This file is part of the Niseredis package.
*
* (c) Daniele Alessandri <suppakilla@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Niseredis\Database\Key;
use UnexpectedValueException;
class Hash... | true |
4a094f1799dafe2c5f764b0ae332d80d0729ca7f | PHP | thatdixie/thatdixie.com | /musicbrainz/include/model/Editor_collection_typeModel.php | UTF-8 | 5,341 | 2.875 | 3 | [] | no_license | <?php
require_once "MusicbrainzDB.php";
require "Editor_collection_type.php";
/********************************************************************
* Editor_collection_typeModel inherits MusicbrainzDB and provides functions to
* map Editor_collection_type class to musicbrainz.
*
* @author megan
* @version 1... | true |
8a2a869a07689783a7c849da65c81c85a36d5ee9 | PHP | alifahfathonah/eChetaks | /function/validate.php | UTF-8 | 2,484 | 2.96875 | 3 | [
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | <?php
function validateUsername(&$errors, $field_list, $field_name)
{
$pattern = "/^[a-zA-Z'-]+$/"; // format nama (alfabet)
if (!isset($field_list[$field_name]) || empty($field_list[$field_name]))
$errors[$field_name] = 'kolom harus diisi';
else if (!preg_match($pattern, $field_list[$field_name]))
$erro... | true |
823823d0e2ed2d359f63fc9cf7d51beeb3352fd0 | PHP | Syltaen/syltaen | /Controllers/AdminPreviewController.php | UTF-8 | 4,450 | 2.84375 | 3 | [] | no_license | <?php
namespace Syltaen;
class AdminPreviewController extends Controller
{
/**
* Create a new instance of the controller
*/
public function __construct()
{
parent::__construct();
static::addScript();
}
// ==================================================================... | true |
7a3b06747b37b19536698325f1e640b7f8fd707d | PHP | lucasmarques4linux/501-PHP-Porto-Velho | /aula02/static/caneta.php | UTF-8 | 542 | 3.609375 | 4 | [] | no_license | <?php
class Caneta
{
public $cor;
public static $ponta = 0.5;
public function __construct(string $cor)
{
$this->cor = $cor;
}
public function verPonta()
{
return self::$ponta;
}
public function alterarPonta(float $novaPonta)
{
self::$ponta = $novaPonta;
}
}
$red = new Caneta('vermelha');
$blue = ... | true |
25e60079e275f5d313b54d2cc019483ad78fbe38 | PHP | kotuk/stalker-portal-4.9.x | /server/lib/storage.class.php | UTF-8 | 2,654 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
//namespace Stalker\Lib;
class Storage
{
private $storage;
private $max_failures;
private $stat_period;
public function __construct($init_info = array()){
if (empty($init_info)){
return;
}
if (!empty($init_info['id'])){
$this->storage = $this->... | true |
8962c75524ca6de0d05690218baf2b9ed6541ee1 | PHP | Renrhaf/valerie-fahrner | /core/actions/Editform.action.php | UTF-8 | 1,883 | 2.6875 | 3 | [] | no_license | <?php
namespace Action;
if(!defined('_G_INCLUDED')) die('WTF are you trying to do ?!');
/**
* Affichage du formulaire de modification d'un objet
*
* Nécessite de passer en GET :
* - un moyen d'identifier l'objet de manière unique (clé primaire ou unique)
*
* Pour plus d'informations sur le passage en GET de c... | true |
cfc00dce0b902d4317f1134f1d3f9c60892358fa | PHP | vkosmos/php2-hw5.local | /templates/admin/add.php | UTF-8 | 2,491 | 2.90625 | 3 | [] | no_license | <?php
/**
* @var \App\View $this
*/
?>
<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="/templates/css/style.css">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta ... | true |
b2097fa60cb03a5592f90c316ff5144d95390a45 | PHP | clydeortega14/Schoogo_v2 | /app/Http/Controllers/RequestFilesController.php | UTF-8 | 5,273 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\RequestFile;
use App\Service\FileManager;
use App\PaperSize;
use App\PrintType;
use DB;
class RequestFilesController extends Controller
{
public function __construct()
{
$this->fileManager = new FileManager;
}
/**
... | true |
992ac2abc87de7d70c670b460b0576d76a586ace | PHP | andrewrbe/rest-bookmarks | /public_html/index.php | UTF-8 | 3,159 | 2.65625 | 3 | [] | no_license | <?php
use Symfony\Component\HttpFoundation\Request;
$loader = require_once __DIR__ . '/../vendor/autoload.php';
$loader->add('Models', __DIR__ . '/../app/');
$app = new Silex\Application();
if (getenv('APPLICATION_ENV') == 'development') {
$app['debug'] = true;
}
$app->register(new Silex\Provider\DoctrineServ... | true |
8b2ac3733ef197978ce44f8351d795ae71c83eb2 | PHP | opera-project/OperaMediaBundle | /MediaManager/Source.php | UTF-8 | 4,229 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Opera\MediaBundle\MediaManager;
use Gaufrette\Filesystem;
use Opera\MediaBundle\Repository\FolderRepository;
use Opera\MediaBundle\Repository\mediaRepository;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Opera\MediaBundle\Entity\Folder;
use Opera\MediaBundle\Entity\Media;
use Pagerfanta... | true |
17a5bfa38b7d7895fddbf392629f0276f3c388c6 | PHP | gauthier/states | /src/Command/Writer/AbstractWriter.php | UTF-8 | 2,136 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
/**
* States.
*
* LICENSE
*
* This source file is subject to the MIT license and the version 3 of the GPL3
* license that are bundled with this package in the folder licences
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* t... | true |
105494d59299b16966169a63807ebd5b23ad9dcd | PHP | chrix98/phpMyStuff | /application/classes/controller/log.php | UTF-8 | 11,400 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Filename: log.php
* Filetype: class/controller/model/view/
* Date: $Date: $
* @author: $Author: $
* Revision: $Rev: $
* SVN URL: $Url: $
* @author Chris Petermann chris@petermannlive.com
* @purpose display the log file of the current day for debugging purpose.
* @param boolean truncat... | true |
0b5a55f9aa915185149ebdb819ba8c302785c1bb | PHP | dreamansese/camelphp | /CamelPHP/Core/Controller.php | UTF-8 | 2,333 | 2.65625 | 3 | [] | no_license | <?php
/**
* CamelPHP [A journey always starts with the first step]
*
* CamelPHP is an open source framework for PHP
*
* @author dreamans<dreamans@163.com>
* @copyright Copyright (C) 2012 camelphp.com All rights reserved.
* @license http://www.apache.org/licenses/LICENSE-2.0.txt
*/
//---------------------... | true |
65c87ffa31dfc7c7ca16359c55684dad4874eac2 | PHP | ckiw/osmltir-admin | /EventManager.php | UTF-8 | 2,071 | 2.71875 | 3 | [] | no_license | <?php
session_start();
try {
// Nouvel objet de base SQLite
$bdd = new PDO('sqlite:bdd.sqlite');
// Quelques options
$bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
if ($_GET['action'] == 'select') {
$query = $bdd->query('SELECT e.id, date, title, url, color, backgroundColo... | true |
0b6b434aed29d73e1eccbbfeb1092592f9f92364 | PHP | bigbigxu/bee | /object/Arr.php | UTF-8 | 848 | 3.078125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: VigoXu
* Date: 2016/9/18
* Time: 15:52
*/
namespace bee\object;
class Arr
{
protected $arr;
public function __construct($arr)
{
$this->arr = $arr;
}
public static function g($arr)
{
return new static($arr);
}... | true |
dd003fa8c4fd77bdd886f6a72b183600b971ff24 | PHP | d1am0nd/hiphop101 | /tests/Browser/Pages/Artist.php | UTF-8 | 1,399 | 2.796875 | 3 | [] | no_license | <?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
use Laravel\Dusk\Page as BasePage;
use App\Models\Artists\{
Artist as ArtistModel,
ArtistArticle,
};
use Tests\Browser\Components\ArticleList;
class Artist extends BasePage
{
private $artist;
public function __construct(ArtistModel $ar... | true |
986d62fc7e4da65cc5a51121985746bce92438ae | PHP | HTeker/Projectregistratie-Laravel | /app/controllers/ClassroomsController.php | UTF-8 | 3,055 | 2.71875 | 3 | [] | no_license | <?php
class ClassroomsController extends \BaseController {
public function __construct()
{
$this->beforeFilter('auth');
}
/**
* Display a listing of the resource.
* GET /classrooms
*
* @return Response
*/
public function index()
{
return View::make('classrooms.index')
->with('class... | true |
bebf411fe277a890d49f89975976ca02ff1eb64a | PHP | adrian-enspired/nexcess-cli | /src/Command/InputCommand.php | UTF-8 | 6,139 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package Nexcess-CLI
* @license https://opensource.org/licenses/MIT
* @copyright 2018 Nexcess.net, LLC
*/
declare(strict_types = 1);
namespace Nexcess\Sdk\Cli\Command;
use Nexcess\Sdk\Util\Util;
use Nexcess\Sdk\Cli\ {
Command\Command,
Command\CommandException
};
use Symfony\Component\Console\ {... | true |
6bb08245fe2e763865330bab0951b3baae0ec982 | PHP | CesarAugst/lojaSimples-php-mysql | /register/server.php | UTF-8 | 1,164 | 2.6875 | 3 | [] | no_license | <?php
session_start();
include './index.php';
$nome_digitado = $_POST['nome'] ?? 'Desconhecido';
$usuario_digitado = $_POST['usuario'] ?? '';
$senha_digitado = $_POST['senha'] ?? '';
$email_digitado = $_POST['email'] ?? '';
if($usuario_digitado == '' || $senha_digitado == ''){
echo "Informações importantes faltand... | true |
0c468da7a69c618bdf6203dfc9cd24c898bb49eb | PHP | RedTiger81/StormGames | /Core/src/StormGames/SGCore/mission/Mission.php | UTF-8 | 2,826 | 2.71875 | 3 | [] | no_license | <?php
/**
* Copyright (C) StormGames, Inc - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Eren Ahmet Akyol <ahmederen123@gmail.com>, July 2019
*/
declare(strict_types=1);
namespace StormGames\SGCore\mission;
use pock... | true |
3fb5d9fa3bad8cd839fb1e555fa2f366aa3b6204 | PHP | beyondye/ENPHP | /application/system/library/Html.php | UTF-8 | 4,847 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace system\library;
class Html
{
/**
* 无闭合标签,需要自行添加
*/
const NO_END_TAGS = ['br', 'img', 'hr', 'input'];
/**
* 特定处理的标签
*/
const SPECIAL_TAGS = ['select', 'input'];
/**
* 生成单个标签
*
* @param array $param
* @example
* $param=[
* 'nam... | true |
79df747cae4b5107ccdfc8b142347875b1c1b6f6 | PHP | d0dic/myapps | /framework/models/BaseModel.php | UTF-8 | 1,795 | 2.96875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: milos
* Date: 15-Sep-16
* Time: 5:59 PM
*/
namespace app\models;
use app\assets\Database;
/**
* Class BaseModel
* @package app\models
*/
abstract class BaseModel
{
/**
* @var Database $db_con
*/
private $db_conn;
/**
* BaseModel constructo... | true |
a88ef77d550362e1153af456212ed5d1fb105c4f | PHP | jkulak/hhbd-website | /app/application/models/Song/Container.php | UTF-8 | 1,524 | 2.703125 | 3 | [] | no_license | <?php
/**
* Song
*
* @author Kuba
* @version $Id$
* @copyright __MyCompanyName__, 12 November, 2010
* @package default
**/
class Model_Song_Container
{
public $lyrics = '';
function __construct($params, $full = false)
{
$this->id = $params['song_id'];
$this->title = $params['title'];
... | true |
83f3b2335b6b70483ceda15ddfb6472b059f6ebf | PHP | quekaihua/StudyTest | /PHP_Core_Technology_And_Best_Practice/1/magic.php | UTF-8 | 400 | 3.0625 | 3 | [] | no_license | <?php
class Account{
private $user = 1;
private $pwd = 2;
public function set($name,$value){
echo "Setting $name to $value\r\n";
$this->$name = $value;
}
public function get($name){
if(!isset($this->$name)){
echo "未设置";
$this->$name = "正在为您设置值";
}
return $this->$name;
}
}
$a = new Account();
// ... | true |
09868a274476b92f88370687b1c0ebeee40a6811 | PHP | Dominus77/yii2-podium | /src/models/UserSearch.php | UTF-8 | 1,755 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace bizley\podium\models;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
/**
* UserSearch model
*
* @author Paweł Bizley Brzozowski <pawel@positive.codes>
* @since 0.1
*/
class UserSearch extends User
{
/**
* @inheritdoc
*/
public function rules()
... | true |
59a8c9705abe874c42f23a3b84ef3e8e3ef969c6 | PHP | Firefolio/legacy | /application/controllers/Login.php | UTF-8 | 2,842 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Login extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load_assets();
}
public function index()
{
session_start();
// Only show the login form if the user hasn't been authenticated alre... | true |
4a53bbf874ac4d8073e431b578df57cedce1f164 | PHP | berliozd/algolia-test | /src/App.php | UTF-8 | 3,932 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: didierberlioz
* Date: 14/10/2017
* Time: 15:09
*/
namespace AlgoliaTest;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use Symfony\Component\Yaml\Parser;
class App
{
private $controller;
private $action;
private $config;
private $routeConfig;
... | true |
c84255483f759ba3ac15b5e3eeb8e3d13b9b25e5 | PHP | furaoing/edusoho | /src/AppBundle/Extensions/DataTag/PopularCourseSetsDataTag.php | UTF-8 | 1,722 | 2.640625 | 3 | [] | no_license | <?php
namespace AppBundle\Extensions\DataTag;
class PopularCourseSetsDataTag extends CourseBaseDataTag implements DataTag
{
/**
* 获取最热门课程列表.
*
* 可传入的参数:
* categoryId 可选 分类ID
* type 必须:(热门课程类型)
* hitNum 按照点击数
* recommended 按照推荐时间
* Rating 按照... | true |
082247b0928d4acc2c59f2eb76a417bb4c300e3d | PHP | Telahnus/campaign-mapping | /process.php | UTF-8 | 773 | 2.625 | 3 | [] | no_license | <?php
// process.php
// for use in map.php site
if($_POST) {
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
$txt = "John Doe\n";
fwrite($myfile, $txt);
$txt = "Jane Doe\n";
fwrite($myfile, $txt);
fclose($myfile);
}
$dom = new DOMDocument("1.0");
$node = $dom->createElement("markers");
$p... | true |
afa027fdf3d7ed950d5bbbb7cc80f3e02776b61c | PHP | omvs9861/Simple-Calendar | /src/sharecalendar.php | UTF-8 | 573 | 2.609375 | 3 | [] | no_license | <?php
ini_set("session.cookie_httponly", 1);
session_start();
// Make sure session variables are et
if(isset($_SESSION["register_username"]))
{
echo json_encode(array(
"success" => true,
"username" => $_SESSION["register_username"]
));
}
elseif(isset($_SESSION["login_uname"]))
... | true |