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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3bd9179c9d5d06c207ba3f53c7cb113aad9ceb5d | PHP | Voziv/house | /app/Enum/Permission.php | UTF-8 | 423 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Enum;
final class Permission
{
const CREATE_ANY = 'create';
const READ_ANY = 'read';
const UPDATE_ANY = 'update';
const DELETE_ANY = 'delete';
const SENSOR_READING_READ = 'sensor_reading:read';
const SENSOR_READING_WRITE = 'sensor_reading:write';
public function __con... | true |
7a1903a2dd9e4def59f98c0d2696d29cb5d40094 | PHP | dsacheti/emailmkt | /src/EmailMkt/Application/Action/Teste2PageAction.php | UTF-8 | 1,266 | 2.8125 | 3 | [] | no_license | <?php
namespace EmailMkt\Application\Action;
use EmailMkt\Domain\Entity\Customer;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Zend\Diactoros\Response\HtmlResponse;
use Zend\Expressive\Template;
use EmailMkt\Domain\Persistence\CustomerRepositoryInterface;
class Teste2Page... | true |
cbef1b11861c0c13ee1c653a70e0f38325810511 | PHP | PhuongNgan2103/the_house_rental_project | /app/Http/Controllers/AuthController.php | UTF-8 | 2,425 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\LoginUserRequest;
use App\Http\Requests\RegisterUserRequest;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Session;
use Laravel\Socialite\Facades\Socialite;
class AuthController... | true |
74214adbc65976d519082983c4e1fbff6a7ce1c8 | PHP | Tosini13/tournament | /php/structures.php | UTF-8 | 16,673 | 3.265625 | 3 | [] | no_license | <?php
// --------------------------------------------------------------------
// >>>>>>>>>>>>>>>>>>>>>>>>>>>TOURNAMENT<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
// --------------------------------------------------------------------
class Tournament {
private $id;
private $name;
private $host;
private $sponsor;... | true |
fe90b29019c11df41a3f7451668b3337a20f5532 | PHP | NRaudseps/codelex-19-09-MD | /arithmetic-operators/ex5.php | UTF-8 | 647 | 4.25 | 4 | [] | no_license | <?php declare(strict_types=1);
echo "I'm thinking of a number between 1-100. Try to guess it." . "\n";
$num = (int) readline();//Input from user
function guessNumber (int $num):string {
$pc = rand(1,100);//Random number the computer generates
//Guess is too high
if($num > $pc){
return 'Sorry, you ... | true |
2c2a51d7efd25ba711aae5ebcad3b882202a9fca | PHP | ElijahCuff/PHP-Crypto | /Cryto.php | UTF-8 | 1,866 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
// --------------------
// PHP Crypto
// --------------------
// input payload
$payload = "bkhgghvghvvhuvhgyyhh";
// set scripts hidden password
// This password is secured will only be used in conjunction with a secure random byte salt.
$password = "Password";
// start ms consumption timer
timer(true);
// ... | true |
2de5df85dcd04e377268420491b2def7aa64dfad | PHP | pipihaa/tp5_layui_vue | /tp5/application/admin/Utils/FormatArrayUtils.class.php | UTF-8 | 4,221 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: daweicc
* Date: 2018/3/7
* Time: 11:50
*/
namespace Common\Utils;
class FormatArrayUtils
{
/**
* 数组键名转换为指定字段值
* @param array $data
* @param string $key
* @param string $val
* @return array
*/
public static function changeKey($data=ar... | true |
f2bd87b5e560663f2c84cc0cb7febd983d51813d | PHP | thinkgem/openwan | /lib/qeephp-2.1/tests/include/bddtest_common.php | UTF-8 | 1,024 | 2.96875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* 用于 BDD 测试的公共文件
*/
require_once 'PHPUnit/Extensions/Story/TestCase.php';
/**
* PHPUnit_Extensions_Story_Runner 使用 PHP 5.3 的闭包来改善 BDD 代码的书写
*
* 在继承类中,不再需要实现 runGiven()、runWhen() 和 runThen() 方法。
*/
abstract class PHPUnit_Extensions_Story_Runner extends PHPUnit_Extensions_Story_TestCase
{
protecte... | true |
05acdae4d4ecfb7114709f8a6ec2aa0c834ade53 | PHP | vda789/projecthaina | /database/migrations/2021_09_29_160235_create_turmas.php | UTF-8 | 784 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTurmas extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('turmas', function (Bl... | true |
9207d8d15a22c2d93b6db2bca2658c99e882e43c | PHP | Matrix-aas/nstu-tracker | /app/Services/Repositories/IProfessorDisciplineRepository.php | UTF-8 | 414 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Services\Repositories;
interface IProfessorDisciplineRepository
{
public function attachDiscipline(int $professorId, int $disciplineId): bool;
public function attachProfessor(int $disciplineId, int $professorId): bool;
public function detachDiscipline(int $professorId, int $disciplin... | true |
5040af1e6b2a935f6ba6c569c2ea4616be08dd59 | PHP | opgginc/php-riotapi-request | /src/RequestMethod/Match/MatchesByAccount.php | UTF-8 | 2,136 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: kargnas
* Date: 2017-06-26
* Time: 03:41
*/
namespace RiotQuest\RequestMethod\Match;
use DateTime;
use RiotQuest\Constant\EndPoint;
use RiotQuest\Constant\Platform;
use RiotQuest\Dto\Match\MatchlistDto;
use RiotQuest\RequestMethod\Request;
use RiotQuest\Re... | true |
58352c9d738693b2dc0ace5b42a051dfeba26e1f | PHP | dukejib/teatimekc | /app/Mail/InviteNewMemberMail.php | UTF-8 | 854 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Support\Facades\Log;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class InviteNewMemberMail extends Mailable
{
use Queueable, SerializesModels;
public $regToken;
/**... | true |
41746f5dbc0867d6abae83becc9309637c91c41e | PHP | sashkomatviychuk/framework | /components/composer/kuria/console/src/Command/CommandInput.php | UTF-8 | 2,547 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Kuria\Console\Command;
use Kuria\Console\Input\Input;
use Kuria\Console\Input\InputInterface;
/**
* Command input class
*
* Represents subset of input containing data
* specific to given Command instance.
*
* @author ShiraNai7 <shira.cz>
*/
class CommandInput extends Input
{
/**
* Con... | true |
58a333ef77ad94e78ecbd537b3c8e8a68bf949d2 | PHP | Faria-kaniz/Admin-template | /app/Http/Controllers/HomeController.php | UTF-8 | 1,508 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Session;
class HomeController extends Controller
{
public function submt(){
return view('welcome');
}
public function addcour()
{
return view('Student.add');
}... | true |
2263411625fffad9c9d3b66c7df1743cbcf56056 | PHP | ar2labs/wiring | /src/Http/Controller/AbstractViewController.php | UTF-8 | 417 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace Wiring\Http\Controller;
use Wiring\Interfaces\ViewStrategyInterface;
abstract class AbstractViewController extends AbstractController
{
/**
* Get a view renderer.
*
* @return ViewStrategyInterface
* @throws \Exception
*/
public function view... | true |
025c4c3987a6431ab9d0f80debfebbefa5dbe61d | PHP | KatterinaM/example-of-work | /Models/Sessions.php | UTF-8 | 590 | 2.765625 | 3 | [] | no_license | <?php
namespace Models;
use Core\Model;
class Sessions extends Model{
protected static $instance;
public static function instance(){
if(self::$instance == null){
self::$instance = new self();
}
return self::$instance;
}
public function __construct(){
parent::__construct();
$this->table = 'sess... | true |
12d89b2e118f54cbb41b85be3f6b42caa1b4e5f0 | PHP | iannazzi/craiglorious | /app/Models/Tenant/Role.php | UTF-8 | 6,829 | 2.625 | 3 | [] | no_license | <?php namespace App\Models\Tenant;
use App\Models\BaseModel;
use App\Models\Craiglorious\System;
class Role extends BaseModel
{
protected $guarded = ['id'];
//there are two views
//one is the allowed view for the user
//one is the list of permissions for a view
public function isAdmin()
{
... | true |
06cca9cc86e6e89be651e1f2183d9b23a0c4909c | PHP | fangzesheng/algorithm | /src/Subject/lengthOfLastWord.php | UTF-8 | 904 | 3.765625 | 4 | [] | no_license | <?php
/**
*最后一个单词的长度
*
* @author fzs
* @version 1.0 版本号
*/
namespace Algorithm\Subject;
class lengthOfLastWord
{
/**
* 最后一个单词的长度算法
*
* @access public
* @param string $s 目标值
* @return int
*/
public function achieve($s)
{
if (empty($s)) return 0;
$c... | true |
4c7f2f158bac001aaf7d44a2155d99f1e5ffb35e | PHP | tejas1508/Expense-analyzer | /userFunctionalityPages/viewTrendings.php | UTF-8 | 870 | 2.75 | 3 | [] | no_license | <?php
session_start();
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "ip-project";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: ".$conn->connect_error);
... | true |
84edcdabffc20934e9b198a2ed3e8f365d9d862b | PHP | panos323/testing | /loginRegister/register.php | UTF-8 | 5,829 | 2.59375 | 3 | [] | no_license | <?php include_once "../includes/header.php";?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
require_once "../functions/db.php";
require_once "../functions/functions.php";
$firstName = htmlspecialchars(trim($_POST["registerName"])) ?? "";
$lastName = htmlspecialchars(trim($_PO... | true |
2885d9dc112048b447395c4d2180e3bed922644d | PHP | ambermiao/manage | /inc/class/class_platform.php | UTF-8 | 521 | 2.59375 | 3 | [] | no_license | <?php
class class_platform{
public static function getList(){ //
global $db;
$colname = coderDBConf::$col_platform;
$sql = "select {$colname['name']} as name,{$colname['id']} as value
from ".coderDBConf::$platform."
ORDER BY `{$colname['id']}` DESC";
r... | true |
f7395dafeaf12030e441ce17a0a722c0e43de1d9 | PHP | octalmage/wib | /php-7.3.0/ext/standard/tests/array/array_map_001.phpt | UTF-8 | 299 | 3.203125 | 3 | [
"BSD-4-Clause-UC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"TCL",
"ISC",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"blessing",
"MIT"
] | permissive | --TEST--
array_map() and exceptions in the callback
--FILE--
<?php
$a = array(1,2,3);
function foo() {
throw new exception(1);
}
try {
array_map("foo", $a, array(2,3));
} catch (Exception $e) {
var_dump("exception caught!");
}
echo "Done\n";
?>
--EXPECT--
string(17) "exception caught!"
Done
| true |
1b9f52eda9baa733600c9bdab7663b574f0102ec | PHP | joelvanpatten/Jtf-Library | /Jtf/BigInt.php | UTF-8 | 4,599 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @category Jtf
*
* @package Jtf_BigInt
*
* @copyright Copyright (C) 2011 Joseph Fallon <joseph.t.fallon@gmail.com>
* All rights reserved.
*
* @license REDISTRIBUTION AND USE IN SOURCE AND BINARY FORMS, WITH OR
* WITHOUT MODIFICATION, IS NOT PERMITTED WITHOUT EX... | true |
6c545fa88b71e53bd5283f16d80d87c538098881 | PHP | kishorhase/magento2-extended-product-repository | /Model/CachedProductRepository.php | UTF-8 | 2,136 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace SnowIO\ExtendedProductRepository\Model;
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\Api\Filter;
use Magento\Framework\Api\Search\FilterGroup;
use Magento\Framework\Api\SearchCriteria;
use Magento\Framework\Exception\LocalizedE... | true |
b61e6c141da0c82f80c1bf0522a0880e756b267f | PHP | mdoutreluingne/APIDeuxiemeSituation | /tesapi/src/Operation/RecupReservationHandler.php | UTF-8 | 456 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Operation;
use Doctrine\Persistence\ManagerRegistry;
class RecupReservationHandler
{
protected $em;
/**
* RecupReservationHandler constructor.
* @param ManagerRegistry $em
*/
public function __construct(ManagerRegistry $em)
{
$this->em = $... | true |
8fa1b442ab28843385fcabf92eb1415365457845 | PHP | maxprofs-llcio/hal-agent | /tests/src/MemoryLogger.php | UTF-8 | 1,477 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @copyright (c) 2016 Quicken Loans Inc.
*
* For full license information, please view the LICENSE distributed with this source code.
*/
namespace Hal\Agent\Testing;
use ArrayAccess;
use Psr\Log\AbstractLogger;
/**
* A simple logger that stores logs in memory for later analyzation.
*
* Mostly useful... | true |
759dd4f21f8e83be591fd98b7d0dc1b011a6a01f | PHP | palepoivre/swaterland | /src/SwaterLand/QualiteBundle/Entity/Qualite.php | UTF-8 | 995 | 2.515625 | 3 | [] | no_license | <?php
namespace SwaterLand\QualiteBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Qualite
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="SwaterLand\QualiteBundle\Entity\QualiteRepository")
*/
class Qualite
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
... | true |
6a2fe40fa7a5cfed01ebdca7004cd39a730df79d | PHP | reidarsets/Web_Sprints | /Sprint07/t07/index.php | UTF-8 | 1,414 | 2.984375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Data to XML</title>
<style>
table {
border: 1px double gray;
width: 100%;
}
table td {
border: 1px double black;
}
</style>
</head>
<body>... | true |
deed77f00f8589c06a0659885e970c7a4828f2e2 | PHP | j00ml4/joomla-svn-clone | /development/branches/update/libraries/joomla/tasks/taskset.php | UTF-8 | 3,757 | 2.671875 | 3 | [] | no_license | <?php
jimport('joomla.tasks.task');
/**
* A set of tasks
* @since 1.6
*/
class JTaskSet extends JTable {
protected $tasksetid;
protected $tasksetname;
protected $extension_id;
protected $execution_page;
protected $landing_page;
protected $_startTime;
/** Time to run */
protected $run_time;
/** Maximum tim... | true |
3e196662377a77f5c4cbd699ee5e94a64b8d37bd | PHP | farhan0581/dashboard | /dash.php | UTF-8 | 2,893 | 2.890625 | 3 | [] | no_license | <?php
//php substr(string,start,length);
require_once('database.php');
//this function is to skip any character you want from the csv enteries...
function check_appro($str)
{
for ($i=0; $i<strlen($str); $i++){
if ($str[$i]=="`"){
$str[$i]='';
}
}
return $str;
}
//to read ... | true |
894d9110ad44ad4bc49058e6c4fc6419c6060676 | PHP | WBPierre/Veg-N-Bio | /src/LanguageController.php | UTF-8 | 2,129 | 3 | 3 | [
"MIT"
] | permissive | <?php
/*
* Class LanguageController
* Permet de définir la langue utilisé par l'utilisateur, de charger la traduction correspondante, et de la modifier
*/
class LanguageController{
/*
* Récupère les traductions selon la langue
*
* @param $lang
* @return PHP object
*/
private function getFil... | true |
762dec20e959bb4e2e5d86ac8c7a66bbd299164a | PHP | Phil-Thibeault/exercice-10 | /front-page.php | UTF-8 | 1,341 | 2.640625 | 3 | [] | no_license | <?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WordPress
* @subpackage Twenty_Nineteen
* @since 1.0.0
*/
get_header();
?>
//////////FRONT_PAGE.PHP TEST/////////////
<section id="primary" class="cont... | true |
d7a3e33e9584652e9ee300bd901fe6911e868323 | PHP | keeprich/php-pagination-coding | /index.php | UTF-8 | 2,680 | 3 | 3 | [] | no_license | <?php
include_once'dbConnection.php';
// PAGINATION CODING START
if(isset($_GET['page'])){
$page = $_GET['page'];
}else{
$page = 1;
}
// number of pages wishing to display on the browser
$num_per_page = 01;
$start_form = ($page -1) * 01;
// PAGINATION CODING ENDS
// QUERY FOR PAGINATION IN PHP
$query = "SE... | true |
ba9639806f28e2368e0f67936ca834ca914e5b6f | PHP | usmanessaadi/spot | /app/Event.php | UTF-8 | 442 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
class Event extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'title', 'description', 'price', 'duration', 'date', 'featured'
];
public f... | true |
87d272aaad10f563b83f3e69a6b26cc77ac53437 | PHP | SuzanneSoy/2010-moteur-site-simple | /__cms__/code/modules/site/site-index.php | UTF-8 | 2,632 | 2.640625 | 3 | [] | no_license | <?php
class SiteIndex {
public static function action($chemin, $action, $paramètres) {
if (isset($paramètres["nom_site"])) {
Stockage::set_prop($chemin, "nom_site", $paramètres["nom_site"]);
}
if (isset($paramètres["prochain_evenement"])) {
Stockage::set_prop($chemin, "prochain_evenement", $paramètres[... | true |
742f9c2330c5ed26bab8568582c33ad003c315a3 | PHP | marcelofuchs/slim_microservices | /Application/Administracao/Http/Actions/Empresas/EmpresaCreate.php | UTF-8 | 878 | 2.65625 | 3 | [] | no_license | <?php
namespace Application\Administracao\Http\Actions\Empresas;
use Application\Administracao\Contracts\Commands\Empresas\EmpresaCreateInterface;
use Domain\Abstractions\AbstractAction;
use Psr\Http\Message\ResponseInterface as Response;
use Slim\Http\Request;
/**
* Action Create
*/
class EmpresaCreate extends Ab... | true |
406affa139fabdd6db4ed846c364a5ee5d887431 | PHP | gitdestroy/adminLT | /src/org/fmt/controller/SessionController.php | UTF-8 | 2,902 | 2.65625 | 3 | [] | no_license | <?php
namespace org\fmt\controller;
use Exception;
use NeoPHP\web\http\Response;
use NeoPHP\web\WebController;
use org\fmt\manager\UsersManager;
use org\fmt\view\ForgetfulnessPasswordView;
use stdClass;
/**
* @route (path="session")
*/
class SessionController extends WebController
{
/**
* @routeAction (me... | true |
2ca0dce0358d55c14b4c01b01041c324f933c146 | PHP | isamukhtarov/symfony_project | /src/Ria/Bundle/PostBundle/Messenger/Message/PostUpdated.php | UTF-8 | 555 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Ria\Bundle\PostBundle\Messenger\Message;
use Ria\Bundle\PostBundle\Dto\PlainPostDto;
class PostUpdated
{
public function __construct(
private int $postId,
private int $userId,
private PlainPostDto $plainPostDto,
){}
public function getPos... | true |
2d454c9bf5df25654d58eaba2cbb3940fd3f3c40 | PHP | rgattermann/course-alura-tdd-php | /tests/LeilaoTest.php | UTF-8 | 2,728 | 2.890625 | 3 | [] | no_license | <?php
namespace App\tests;
use App\Leilao;
use App\Lance;
use App\Usuario;
use PHPUnit\Framework\TestCase;
class LeilaoTest extends TestCase
{
public function testDeveReceberUmLance()
{
$leilao = new Leilao("Macbook Pro 15");
$this->assertEquals(0, count($leilao->getLances()));
$leila... | true |
7c0f5434fb11b9c16eae3772059e937a37a4b7b2 | PHP | ProfoundFerret/Fish | /fish/libs/CacheControl.php | UTF-8 | 696 | 2.84375 | 3 | [] | no_license | <?
class CacheControl
{
static function fileLocation($file)
{
$file = 'fish/cache/' . $file;
return $file;
}
static function cacheUpToDate($file)
{
$cache = self::fileLocation($file);
$fileTime = filemtime($file);
if (file_exists($cache))
{
$cacheTime = filemtime($cache);
} else {
$cacheTime... | true |
8f21f22e39fa9e7937b7a4a3d3f44909e99b22e1 | PHP | killbus/jd-kepler | /kepler/src/Api/Goods/JdKeplerXuanPinSkuPromotionBatch.php | UTF-8 | 741 | 2.828125 | 3 | [] | no_license | <?php
/**
* 批量获取sku推广信息
* User: smallsea
* Date: 2018/8/17
* Time: 17:43
*/
namespace Jd\Kepler\Api\Goods;
use Jd\Kepler\KeplerBase;
class JdKeplerXuanPinSkuPromotionBatch extends KeplerBase
{
/**
* 批量获取sku推广信息
* @var int|int[]
*/
protected $skuIds;
/**
* @return int|int[]
... | true |
ad5d60888d92d5c7c0f59ec59ba3026a0978f984 | PHP | kenichi0126/laravel_clean_arch | /packages/Smart2/src/Application/Validation/ParameterValidator.php | UTF-8 | 1,404 | 3.203125 | 3 | [] | no_license | <?php
namespace Smart2\Application\Validation;
class ParameterValidator
{
/**
* バイト数チェック.
*
* 半角1バイト、全角2バイトで計算し、
* 指定した値を超過している場合はエラーとする。
*
* @param $attribute
* @param $value
* @param $parameters
* @return bool
*/
public function validateStrLenOver($attribute... | true |
9e858db733efd988f04ba344e8c5f4a91292b93d | PHP | imacuchc/PHP-y-MySQL | /test.php | UTF-8 | 165 | 2.6875 | 3 | [] | no_license | <html>
<head>
<title>Prueba PHP</title>
</head>
<body>
<p>Esto es una linea HTML<P>
<?php
echo "Esto es una linea PHP";
phpinfo();
?>
</body>
</html> | true |
1fb6cb4237fad582007660aa7e14d60b0342e49d | PHP | sydboys/extension-point-api | /src/Cloud/Extension/Param/Dto/CheckinSelectPrizeDTO.php | UTF-8 | 738 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Com\Youzan\Cloud\Extension\Param\Dto;
/**
* {}
* @author Baymax
* @create 2021-06-28 23:33:49.0
*/
class CheckinSelectPrizeDTO implements \JsonSerializable {
/**
* 选出的奖品id列表
* @var array
*/
private $selectedPrizeConfigId;
/**
* @return array
*/
public... | true |
3ebd3980582dafda32d62742f33ba46d9270236d | PHP | ncsuwebdev/otframework | /library/Ot/Auth/Adapter/Wrap.php | UTF-8 | 4,690 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
*
* This license is also available via the world-wide-web at
* http://itdapps.ncsu.edu/bsd.txt
*
* If you did not receive a copy of the license and are unable to
* obtain it ... | true |
6f554419e8a6bb7234fc8f0b59ed161c28959a2f | PHP | aKolsi/AjaxNotificationGoMyCode | /src/AppBundle/Entity/Ville.php | UTF-8 | 1,272 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Kolsi Ahmed
* Date: 08/07/2017
* Time: 09:49
*/
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="ville")
*/
class Ville
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\Ge... | true |
ccd39cb84ffcd6904792a0f2536bdf3746fb69b6 | PHP | Seifyuuu/Laravel | /8) CRUD/exoCreateStore1/app/Http/Controllers/PokemonController.php | UTF-8 | 634 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Pokemon;
use Illuminate\Http\Request;
class PokemonController extends Controller
{
public function index(){
$data = Pokemon::all();
return view("welcome", compact("data"));
}
public function create(){
return view("boom");
}... | true |
40b075ee4a2e158519bd7056e61f0941404bb0c9 | PHP | QinShangQs/training | /training/Apps/Admin/Repository/BaseRepository.class.php | UTF-8 | 863 | 2.890625 | 3 | [] | no_license | <?php
namespace Admin\Repository;
class BaseRepository {
/**
* 产品经理
* @var unknown
*/
const PRO_PRODUCT = 1;
/**
* UI讲师
* @var unknown
*/
const PRO_UI = 2;
public static function getProfileName($profile_id){
switch ($profile_id){
case 1:
return "产品经理";... | true |
cd609b35b4d81713f39623fbb4380d4a9e4d116c | PHP | jeevangnanam/Mihinlanka | /app/controllers/survey_questions_controller.php | UTF-8 | 5,915 | 2.578125 | 3 | [] | no_license | <?php
class SurveyQuestionsController extends AppController {
var $name = 'SurveyQuestions';
var $scaffold;
function take() {
$this->banner ="one";
$this->set('surveyUserName',$this->Session->read('survey_user_name'));
if(!$this->Session->check('survey_user_id')){
$this->... | true |
67287260fedd220b70a64f2475f4e8f6ef343fec | PHP | iggyvolz/class-properties-conditions | /tests/GreaterThanTest.php | UTF-8 | 931 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace iggyvolz\ClassProperties\tests;
use PHPUnit\Framework\TestCase;
use iggyvolz\ClassProperties\Conditions\GreaterThan;
use iggyvolz\ClassProperties\Conditions\ConditionException;
class GreaterThanTest extends TestCase
{
public function testGreaterThan():void
{
$this->assertTrue(true);
... | true |
fc4be03c704a99a74cc988e88d2c1f1a9d5aee43 | PHP | busyphp/busyphp | /src/app/admin/model/system/file/SystemFile.php | UTF-8 | 7,805 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace BusyPHP\app\admin\model\system\file;
use BusyPHP\App;
use BusyPHP\exception\VerifyException;
use BusyPHP\exception\SQLException;
use BusyPHP\helper\file\File;
use BusyPHP\model;
use BusyPHP\helper\util\Transform;
/**
* 文件管理模型
* @author busy^life <busy.life@qq.com>
* @copyright 2015 - 2017 busy^lif... | true |
f8b2e9bb2a8983aed905849ea5683d9c2cfe5631 | PHP | mehta-shreyas/Birthday-Reminder | /findContact.php | UTF-8 | 3,408 | 2.578125 | 3 | [] | no_license | <?php
session_start();
$nameresult="";
$noneFoundError="";
if ($_SERVER['REQUEST_METHOD'] == "POST" && strlen($_POST['contactname']) > 0)
{
require("load_user_db.php");
$contact = trim($_POST['contactname']);
$user=$_SESSION['user'];
$query = "SELECT * FROM $user WHERE Name='$contact'";
//$query ... | true |
8c812f0e227e6a0c8f4a6a5093619b44354c4d31 | PHP | Olataiwo/gradecalculator | /includes/functions.php | UTF-8 | 1,901 | 2.78125 | 3 | [] | no_license | <?php
function displayErrors($arr, $name) {
$result = "";
if(isset($arr[$name])) {
$result = '<span class="err">'. $arr[$name]. '</span>';
}
return $result;
}
function doRegistration($dbconn, $input) {
# prepared statement
$stmt = $dbconn->prepare("INSERT INTO user(first_name, last_name, email, passwo... | true |
b90ada649dd525f05f5d5afed01e0cf4263fab0b | PHP | silinternational/simplesamlphp-module-silauth | /src/system/System.php | UTF-8 | 2,672 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Sil\SilAuth\system;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
use Sil\SilAuth\auth\IdBroker;
use Sil\SilAuth\config\ConfigManager;
use Sil\SilAuth\models\FailedLoginIpAddress;
use \SimpleSAML\Configuration;
use Throwable;
class System
{
protected $logger;
/**
* Constructor.
... | true |
1b3c8ceac7d8dd449339cca8ae2091603796bcf0 | PHP | andrewgilmartin/mws_signup | /lib/EventParser.php | UTF-8 | 8,762 | 3 | 3 | [] | no_license | <?php
class EventParser {
private $lexer;
private $keyToData = array();
function __construct( $tokens, $contacts ) {
$this->lexer = new Lexer($tokens);
foreach ( $contacts as $contact ) {
$this->put($contact->getId(),$contact);
$this->put($contact->getName(),$contact);
}
}
static function fromScri... | true |
055f36946c853f9dda506b902bf632f572fbb6d3 | PHP | StanciuDragosIoan/symfony_code | /stellar_development/notes.php | UTF-8 | 11,366 | 2.734375 | 3 | [] | no_license | <?
/*
App structure:
'public' is the document root for all public assets
index.php is the front controller (entry point for the app)
'config' holds configuration files
'src' contains the source code
Some cmds used:
composer require server
./bin/conso... | true |
9e5147ba2e0e47aa2f3679afe0de6bc444e84248 | PHP | LuizDoPc/quansquie | /CONTROLE/Caracteristica/RetornaAllCaracteristica.php | UTF-8 | 337 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Luiz
* Date: 07/01/2018
* Time: 20:42
*/
require_once '../../MODELO/Caracteristica.php';
$carac = new Caracteristica();
$res = $carac->findAll();
for($i=0; $i<count($res); $i++){
echo '<option value="'.$res[$i]->idCaracteristica.'">'.$res[$i]->Nome.... | true |
d3f43f508c08c22f570283201a5178426468d1f4 | PHP | thunder-spb/blog | /Services/Gate/My/Controller/MainController.php | UTF-8 | 526 | 2.625 | 3 | [] | no_license | <?php
namespace My\Controller;
use My\Engine\Request;
use My\Engine\Response;
use My\Engine\Storage;
use My\Engine\Session;
class MainController {
/**
* @var Response
*/
public $response;
/**
* @var Request
*/
public $request;
/**
* @var Session
*/
public $ses... | true |
ea2631b13b80fb5d20d9fd2b1cea20a4f065b401 | PHP | vbodv/oxideshop_ce | /tests/Unit/Core/Database/Adapter/Doctrine/DatabaseTest.php | UTF-8 | 6,088 | 2.703125 | 3 | [] | no_license | <?php
/**
* This file is part of OXID eShop Community Edition.
*
* OXID eShop Community Edition is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any ... | true |
12364b6870508ae6ddeae8df3a0e9b487b3f8bc0 | PHP | wp-plugins/wanderfly | /functions.php | UTF-8 | 1,683 | 2.53125 | 3 | [] | no_license | <?php
/*
Function: wf_widget();
Variables,
- locationID: Integer which is the ID of the destination,
*/
function wf_template_widget($retData=false) {
global $post;
$error = 'Error while adding the widget, please report to <a href="http://blog.wanderfly.com/wordpress-plugin/">http://blog.wanderfly.com... | true |
8f45e120410b19812f4d3202fd5cee2866577b53 | PHP | netflo300/FSF | /class/node.class.php | UTF-8 | 843 | 2.953125 | 3 | [] | no_license | <?php
class Node {
private $value;
private $listOfNode;
public function __construct( $value) {
$this->value = $value;
$listOfNode = array();
}
public function addChildNode($node) {
$this->listOfNode[$node->value] = $node;
}
public function explore(&$listSaw) {
global $db;
$db->query("SELECT id_st... | true |
a4659123fc1478e1901e9c7ae1703189dfbf5ace | PHP | timurmametev/slim-rest-api | /app/Support/NotAllowedHandler.php | UTF-8 | 1,594 | 2.75 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Support;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Slim\Interfaces\ErrorHandlerInterface;
use Slim\Routing\RouteContext;
use Throwable;
class NotAllowedHandler implements ErrorH... | true |
44b2ef4e2c08027c35727e6ce29beda381ae5d6b | PHP | djdarkblazer/cswd_rms | /scheme/helpers/language_helper.php | UTF-8 | 2,365 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
defined('PREVENT_DIRECT_ACCESS') OR exit('No direct script access allowed');
/**
* ------------------------------------------------------------------
* LavaLust - an opensource lightweight PHP MVC Framework
* ------------------------------------------------------------------
*
* MIT License
*
* Copyright ... | true |
a8cc473b77378da38f71da2d1e251fce866cfb3f | PHP | creyes-dev/curso-fullstack | /3_AJAX/23_evaluacion/includes/obtener_propiedades.php | UTF-8 | 1,033 | 2.71875 | 3 | [] | no_license |
<?php
include('configuracion.php');
$selectSql = "SELECT id, barrio, calle_altura, descripcion, ";
$selectSql.= " descripcion_corta, valor, entre_calles";
$selectSql.= " FROM propiedad";
if(isset($_REQUEST['prop'])){
if($_REQUEST['prop'] != "0"){
$selectSql.= " WHERE i... | true |
7b9ed1bcc261e7c121c25275c5a87053c8ed5d93 | PHP | coffbr01/PHP-Email | /email.php | UTF-8 | 11,235 | 3.046875 | 3 | [] | no_license | <?php
include "mimetype.php";
/*
Usage
=====
set $this->to
set $this->subject
set $this->message (with html tags)
set $this->from (Optional)
set $this->cc (this can be an array or a variable) (Optional)
set $this->bcc (this can be an array or a variable) (Optional)
set $this->reply... | true |
99cdae9b342c71ec405b1f513fe4097cd25241c4 | PHP | klerik86elvin/lio | /app/Http/Controllers/API/DepartmentController.php | UTF-8 | 2,488 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\API;
use App\Department;
use App\Http\Controllers\Controller;
use App\Http\Requests\DepartmentRequest;
use Illuminate\Http\Request;
class DepartmentController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
... | true |
5457562a24fa9deea2e188f423a242afa4d22a74 | PHP | Y-B-Preethishchandra/RFID-Attendance-System | /MARKATTENDANCE/code.php | UTF-8 | 1,794 | 2.71875 | 3 | [] | no_license | <?php
$comPort = "/dev/ttyACM0"; //The com port address. This is a debian address
$msg = '';
include 'php_serial.class.php';
if(isset($_POST["Recieve"])){
$flag=0;
$serial = new phpSerial;
$serial->deviceSet($comPort);
$serial->confBaudRate(9600);
$serial->confParity("none");
$serial->confCharacterLength(8);
$serial-... | true |
6e2899783305379d0471a1bbb9e209dfaf95b083 | PHP | brunofalcaodev/nidavellir-cube | /src/helpers.php | UTF-8 | 251 | 3.09375 | 3 | [] | no_license | <?php
if (! function_exists('array_to_string')) {
function array_to_string($array)
{
$result = '';
foreach ($array as $key => $value) {
$result .= $key.':'.$value."\r\n";
}
return $result;
}
}
| true |
600db9744346547efa31d7bbe53b1956e3fbf0dc | PHP | muranodesign/Hospital | /beans/GrauInstrucao.php | UTF-8 | 804 | 2.515625 | 3 | [] | no_license |
<?php
/*
*
* -------------------------------------------------------
* CLASSNAME: GrauInstrucao
* GENERATION DATE: 11.06.2015
* FOR MYSQL TABLE: grau_instrucao
* FOR MYSQL DB: hcb_criancas
* -------------------------------------------------------
* CODE GENERATED BY:
* @MURANO DESIGN
* -------... | true |
4c7cf32d8089f84a3402939a835a6523efd7e666 | PHP | girish979/CodingChallenges | /001_Calculate_Process_Running_Time/index.php | UTF-8 | 1,175 | 2.765625 | 3 | [] | no_license | <?php
require __DIR__ . '/StateUtils.class.php';
require __DIR__ . '/SomeObject.class.php';
// Feel free to test your code here - we'll have our own tester to run the code
// you wrote in the StateUtils class.
// ===== THE TEST CASES =====
// TEST CASE 13
$startDate = null;
$stopDate = date("U", strtoti... | true |
47496c826cd5290f055d2767609b403ca938572b | PHP | 1-Touch/midrubPost | /application/base/classes/plans/usage.php | UTF-8 | 1,647 | 3.046875 | 3 | [] | no_license | <?php
/**
* Usage Class
*
* This file loads the Usage Class with properties used to display plan's usage
*
* @author Scrisoft
* @package Midrub
* @since 0.0.8.0
*/
// Define the page namespace
namespace MidrubBase\Classes\Plans;
// Constants
defined('BASEPATH') OR exit('No direct script access allowed');
/*
... | true |
52a7e473f729f96631890bfbc7837a85c4f371a2 | PHP | syakirali/Registrasi-Slim- | /app/controllers/AuthController.php | UTF-8 | 2,570 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controllers;
use Slim\Container;
use App\User;
class AuthController
{
protected $container;
protected $view;
public static $user;
public function __construct(Container $container) {
$this->container = $container;
$this->view = $this->container->get('view');
... | true |
a186f4c9e81211fa82983c12dc250b2f66cc87b1 | PHP | Astrarel/php_injectionSQL | /tests/InjectionTest.php | UTF-8 | 1,449 | 2.84375 | 3 | [] | no_license | <?php
// Pour exécuter le test, il faut rentrer dans le terminal la commande suivante : ./vendor/bin/phpunit
class InjectionTest extends \PHPUnit\Framework\TestCase {
public function test_unNomUnique_trouverUtilisateur_devraitRetournerLeLclient()
{
$bdd = new Model\Bdd.php();
$Nomuser = new ... | true |
8a85710b015b6f5211ab981a5ac03f19ccc8326c | PHP | fikrirasyid/parchment | /content-hentry-separator.php | UTF-8 | 1,727 | 2.515625 | 3 | [] | no_license | <?php
// Update the date in given condition
if( isset( $GLOBALS['wp_query'] ) && is_sticky() ){
$GLOBALS['wp_query']->has_sticky = true;
}
if( isset( $GLOBALS['wp_query'] ) && !is_sticky() ){
// Define date index
if( !isset( $GLOBALS['wp_query']->parchment_date ) ){
$date_index = 0;
} else {
$d... | true |
69ad8276d5a29893f553fc610b63e2817cf7a8d1 | PHP | NANAADDO/Teknasyon-PHP-Challenge | /app/Helpers/Backend/Report.php | UTF-8 | 645 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Helpers\Backend;
use Illuminate\Support\Facades\DB;
class Report {
protected static $country_table = 'country_c';
public static function get_country_admin_level($countryID){
$resp = DB::table(self::$country_table)->select('admin_level')->where('id',$countryID)->first();
... | true |
875c224c93256a5d201db3719bc99295816e8650 | PHP | phpCedu/micro-service-framework | /src/MSF/Response/HTTPResponse.php | UTF-8 | 756 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace MSF\Response;
class HTTPResponse extends \MSF\Response {
// associative
public $headers = array();
// The idea is that we can add annotations, but not all transports have a way of supporting them, maybe?
// We were going to encode some data in HTTP headers, so an HTTPTransport would ta... | true |
94706aac9384d58439438234b08feae981d0784a | PHP | Mario-Cipriano/hw2 | /app/Http/Controllers/LoginController.php | UTF-8 | 790 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Routing\Controller;
use App\Models\User;
class LoginController extends Controller{
public function login(){
if(session("user_id")!==null){
return redirect("home");
}
else {
return view("login");
}
}
public function checkLogin(){
$request=request();
$hash_pas... | true |
f94e9773328525a3d62371a5a2dc14dbd4496c54 | PHP | flyyi/fend | /tests/fend/Db/sqlBuilderTest.php | UTF-8 | 25,186 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types = 1);
namespace App\Test\Fend\Db;
use Fend\Read;
use Fend\Write;
use http\Exception\RuntimeException;
use PHPUnit\Framework\TestCase;
class moduleTest extends TestCase
{
private $_table = 'users';
private $_db = 'fend_test';
public function testDateQueryCondition()
{
... | true |
3bc95550f8015d46f84211c0ecf4aa6aa4a06428 | PHP | ipetrovbg/homeworks | /php-if/task5.php | UTF-8 | 1,087 | 3.078125 | 3 | [] | no_license |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Задача 5 - Точка в окръжност или извън окръжност</title>
</head>
<body>
<?php
if(!empty($_GET['sub'])){
$centerx = 0;
$centery = 0;
$radius = 2;
$coordinatex = $_GET['x'];
$coordinatey = $_GET['y'];
$sqrt = sqrt(($centerx - $... | true |
052f414166dc7bb8a3e33806862fabf0f0d43778 | PHP | phptek/cwp | /code/pagetypes/DatedUpdateHolder.php | UTF-8 | 15,501 | 2.75 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class DatedUpdateHolder extends Page {
// Meant as an abstract base class.
private static $hide_ancestor = 'DatedUpdateHolder';
private static $update_name = 'Updates';
private static $update_class = 'DatedUpdatePage';
private static $singular_name = 'Dated Update Holder';
private static $plural_name ... | true |
c4eb5a80fd913ab69ea9f5aa67dbc550be5c2bcd | PHP | andzub/vavto | /backend/api/article/get/article_get.php | UTF-8 | 1,527 | 2.578125 | 3 | [] | no_license | <?php
$article_get = article_get::getInstance();
class article_get {
protected static $_instance;
private function __clone() {}
private function __wakeup() {}
private function __construct() {}
public static function getInstance() {
if (self:... | true |
d7a5c0ff32763ae945bbe54bba266550de1f8c4f | PHP | Night75/webmixin-2014 | /src/Night/DisplayBundle/Model/Model/Image.php | UTF-8 | 1,610 | 2.609375 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Night\DisplayBundle\Model\Model;
use Doctrine\ORM\Mapping as ORM;
/**
* Image
*/
class Image
{
const DATA_TYPE_SVG = 'svg';
/**
* @var integer
*/
protected $id;
/**
* @var string
*/
protected $title;
/**
* @var string
*/
protected $path;... | true |
9a72acc2340fe5cf6f5db3478a2451229686dd8f | PHP | rads-io/php7-mapnik | /docs/prototypes/Mapnik/AggRenderer.php | UTF-8 | 563 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Mapnik;
/**
* @package Mapnik
* @see https://github.com/mapnik/mapnik/blob/master/include/mapnik/agg_renderer.hpp C++ agg_renderer include
* @see https://github.com/mapnik/mapnik/wiki/MapnikRenderers Mapnik renderers documentation
*/
class AggRenderer
{
/**
* AggRenderer constructor.
... | true |
75f1b23d4b939dd1b15822c1c93ea873ae9287e0 | PHP | chuchujie/sockets | /src/Core/Routing/SocketRoute.php | UTF-8 | 6,903 | 2.6875 | 3 | [] | no_license | <?php
// Created by dealloc. All rights reserved.
namespace Experus\Sockets\Core\Routing;
use Experus\Sockets\Core\Middlewares\MiddlewareDispatcher;
use Experus\Sockets\Core\Middlewares\Pipeline;
use Experus\Sockets\Core\Server\SocketRequest;
use Experus\Sockets\Exceptions\InvalidActionException;
use Illuminate\Contr... | true |
95a95933d69faad655f0f9793a606bd4a4ebc99d | PHP | some-random-username/student-list | /src/classes/Template.php | UTF-8 | 393 | 2.796875 | 3 | [] | no_license | <?php
namespace src\classes;
class Template
{
public function __construct() {
}
public function render($file, $params = []) {
$path = '../src/views/';
$file = $path . $file . '.php';
if(file_exists($file)) {
include('../src/views/header.php');
include($... | true |
7f812588c9db9ec7d353b2e18a2274a3b6d1a458 | PHP | ifrolikov/tsn | /components/managers/PasswordManager.php | UTF-8 | 656 | 3.15625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\components\managers;
/**
* Class PasswordManager
* @package app\components\managers
*/
class PasswordManager
{
/** @var string */
private $password;
/**
* @return string
*/
public function encrypt(): string
{
return md5(md5($this->password));
}
/*... | true |
9a49f9edee8d02269fde24961289aeb4eea65fdc | PHP | foresitegroup/Belardi | /admin/schedule.php | UTF-8 | 2,286 | 2.5625 | 3 | [] | no_license | <?php
include "login.php";
$PageTitle = "Schedule";
include "header.php";
?>
<div class="content-width schedule">
<div class="one-half">
<h3>Add Event</h3><br>
<form action="schedule-db.php?a=add" method="POST">
<div>
<input type="text" name="round" placeholder="Round"><br>
<br>
... | true |
7f7db570e38b3e7ce8cbbe1888fc87cdb1fc62a8 | PHP | MrHanFeng/code | /Post_邮政订阅系统/book/Model/AuthModel.class.php | UTF-8 | 1,226 | 2.796875 | 3 | [] | no_license | <?php
namespace Model;
use Think\Model;
//权限模型
class AuthModel extends Model{
// 添加权限方法
function addAuth($auth){
// $auth里面存在四个信息还缺少两个关键信息:auth_path 和 auth_level;
// ① insert 生成一个新纪录
// ② update把auth_path 和 auth_level更新进去;
$new_id = $this ->add($auth);//返回新纪录和主键id值
// path的值分为两种情况
// 全路径:父级全路径与本身id的... | true |
2132842f96bba80ceb19af9c4526d73d6e2567a8 | PHP | maxlutzfl/LayoutsComponentsGuide | /config/document-functions.php | UTF-8 | 2,047 | 2.84375 | 3 | [] | no_license | <?php
/**
*
*/
DEFINE('APP_DIRECTORY', dirname(__DIR__) . '/');
DEFINE('DEBUG', true);
/**
* Debug mode
*/
if ( DEBUG === true ) {
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
}
/**
* Functions
*/
function get_components_navigation_items() {
// Loop throug... | true |
5905e6df6fd4c381494d73a59559dac9a62e4db1 | PHP | FrankM1/layerwp-plugin | /core/widgets/modules/base.php | UTF-8 | 8,635 | 3.078125 | 3 | [] | no_license | <?php /**
* Layers Widget Class
*
* This file is used to register the base layers widget Class
*
* @package Layers
* @since Layers 1.0.0
*/
if( !class_exists( 'Layers_Widget' ) ) {
class Layers_Widget extends WP_Widget {
/**
* Check option with isset() and echo it out if it exists, if it does not exist, ... | true |
21ef0976d7c17faea7028591c602e22d197f05be | PHP | medic911/stage-app | /src/App.php | UTF-8 | 2,590 | 2.9375 | 3 | [] | no_license | <?php
namespace StageApp;
use StageApp\Exceptions\NotAllowedResponseException;
use StageApp\Http\Request;
use StageApp\Interfaces\ErrorHandlerInterface;
use StageApp\Traits\Singleton;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Session;
use Throwable;
class App
{
u... | true |
ebda0589ffa5ddba9ca647c91a18f17fa89cb0eb | PHP | vivait/TenantBundle | /src/Vivait/TenantBundle/Locator/CookieLocator.php | UTF-8 | 2,195 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Vivait\TenantBundle\Locator;
use Symfony\Component\HttpFoundation\Request;
use Vivait\TenantBundle\Registry\TenantRegistry;
class CookieLocator implements TenantLocator
{
/**
* @var Request
*/
private $request;
/**
* @var string
*/
private $cookieName;
/**
... | true |
da890807e07027ba942ee50249964d3b7e3d9d6c | PHP | Reunion90/WebPhim_CI | /application/models/Genres_model.php | UTF-8 | 803 | 2.578125 | 3 | [] | no_license | <?php
class Genres_model extends MY_Model
{
function __construct()
{
parent::__construct();
}
public function getGenres()
{
return $this->db->where("status", 1)->order_by("name")->get("genres")->result();
}
public function getGen... | true |
212a3657a91146e4e2cae3933282bdf77055787d | PHP | bit2samal/Bit | /Core/Bootstrap.php | UTF-8 | 4,592 | 2.84375 | 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 Core;
/**
* Description of Bootstrap
*
* @author anil
*/
class Bootstrap
{
private static $instance;
pr... | true |
e469dd7a4ac74be44d427d097b1745c52d330c93 | PHP | Kumarjio/accAdda | /login.php | UTF-8 | 1,295 | 2.515625 | 3 | [] | no_license | <?php
include_once('admin/config/config.php');
$user = trim($_POST['user']);
$pass = trim($_POST['pass']);
if(!empty($user) && !empty($pass))
{
$user = $con->real_escape_string($user);
$pass = $con->real_escape_string($pass);
$md5 = md5($pass);
$query = $con->query("select * from user_master where usernam... | true |
4fb9f8a9a43f079b06acd7f7d831b8de0adfb626 | PHP | mokamoto12/oop-practice | /tests/Domain/Model/Product/ProductTest.php | UTF-8 | 759 | 2.703125 | 3 | [] | no_license | <?php
namespace Mokamoto12\OopPractice\Domain\Model\Product;
use PHPUnit\Framework\TestCase;
/**
* Class ProductTest
* @package Mokamoto12\OopPractice\Domain\Model\Product
*/
class ProductTest extends TestCase
{
/**
* @var Product
*/
public $product;
public function setUp()
{
$t... | true |
af7a0d00822c1f0b615761298cb0c91932ed206c | PHP | asuslx/f-project | /App/Request.php | UTF-8 | 3,262 | 2.875 | 3 | [] | no_license | <?php
/**
* Author: asuslx (asuslx@gmail.com)
* Date: 4/26/12
*/
class F_App_Request {
private $_host;
private $_path;
private $_sourceData;
public function __construct() {
$this->setSource('get', $_GET);
$this->setSource('post', $_POST);
$this->setSource('request', $_REQ... | true |
4e65c81f9e8ab1f8164c05c2d6b477ada87dcdb5 | PHP | balfour-group/laravel-query-filters | /src/Filters/FilterInterface.php | UTF-8 | 455 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Balfour\LaravelQueryFilters\Filters;
interface FilterInterface
{
/**
* @return string
*/
public function getKey();
/**
* @return mixed
*/
public function getDefaultValue();
/**
* @param array $params
* @return mixed
*/
public function getVal... | true |
7416a19f56be5d829c3cc010c0296d14ed9bc25b | PHP | LilianaIvonne/calificacionesLisg | /MVC/modelo/coordinadores_modelo.php | UTF-8 | 642 | 2.84375 | 3 | [] | no_license | <?php
class coordinadores_modelo {
private $db;
private $coordinadores;
public function __construct(){
require_once("../modelo/Conectar.php");
$this->db=Conectar::conexion();
$this->coordinadores=array();
}
public function get_coordinadores(){
if($... | true |
aa9307fbb623109bfb86abf14661d84e9a2ec0bc | PHP | DEVSENSE/Parsers | /Source/UnitTests/TestData/samples/test9.phpt | UTF-8 | 643 | 3.65625 | 4 | [
"Apache-2.0"
] | permissive | <?php
$juices = array("apple", "orange", "koolaid1" => "purple");
echo "He drank some $juices[0] juice.".PHP_EOL;
echo "He drank some $juices[1] juice.".PHP_EOL;
echo "He drank some $juices[koolaid1] juice.".PHP_EOL;
class people {
public $john = "John Smith";
public $jane = "Jane Smith";
public $robert =... | true |