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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
333415a4ae30efb145cf12b8e1a5edd027627b51 | PHP | do-aki/php-phroonga | /src/Result/HashResult.php | UTF-8 | 677 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace dooaki\Phroonga\Result;
use dooaki\Phroonga\GroongaResult;
use dooaki\Phroonga\Table;
use dooaki\Phroonga\Column;
class HashResult extends GroongaResult implements \IteratorAggregate
{
private $properies = [];
public function __get($name)
{
if (isset($this->properies[$name])) {
... | true |
1de1d4ebdb1fc63430ef51c268cff51bc03c8e38 | PHP | Sergejw/Weather | /Query.php | UTF-8 | 8,270 | 2.9375 | 3 | [] | no_license | <?php
class Query {
/** @var null Instance of this object. */
private static $instance = NULL;
/** @var string Base url of query. */
private static $BASE_URL = "http://api.openweathermap.org/data/2.5/weather?q=";
/** @var string Key for query. */
private static $KEY = "";
/** @var stri... | true |
71e4957fc60f10e2767b4e4423fc9be28971ea0c | PHP | k4rtik/Campus-Radio | /code/cr/functions/html/ul_list.php | UTF-8 | 668 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
function ul_list()
{
static $_defaults = array(
'values' => array()
, 'contents' => NULL
, 'allowed' => array('Common','compact','type')
);
static $_simple = array('values');
$p = func_get_args();
$p = parse_arguments($p, $_simple, $_defaults);
$attlist = get_attlist($p);
$output = "<ul $attlist>\n... | true |
cb23686729d492e8f7d6b53719a907db5b39c96d | PHP | census-instrumentation/opencensus-php | /ext/tests/context_span_id.phpt | UTF-8 | 765 | 2.828125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | --TEST--
OpenCensus Trace: Trace Context from provided spanId
--FILE--
<?php
opencensus_trace_set_context("traceid", '12345678');
opencensus_trace_begin('foo', ['spanId' => 'abcd1234']);
$context = opencensus_trace_context();
opencensus_trace_finish();
echo "Context trace id: " . $context->traceId() . PHP_EOL;
echo "C... | true |
7ae9baeca2480eb48eacfe3eee8dfb279fbf5734 | PHP | leyteris/flowg | /Core/Lib/Com/ImageResize.class.php | UTF-8 | 3,604 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* 图片缩放和裁剪类
*/
class ImageResize
{
//源图象
var $_img;
//图片类型
var $_imagetype;
//实际宽度
var $_width;
//实际高度
var $_height;
//载入图片
function load($img_name, $img_type=''){
if(!empty($img_type)) $this->_imagetype = $img_type;
else $this->_imagetype = $this->get_type($img_name);
switch ($this->_imag... | true |
ddf71aef8eb2b2d6055bfda1deb7f5f21875915a | PHP | LiuweiGHub/myRepository | /phpBase/Closure.php | UTF-8 | 1,232 | 4.25 | 4 | [
"BSD-3-Clause"
] | permissive | <?php
//匿名函数
$anonyFunc = function ($name) {
return 'Hello '.$name;
};
echo $anonyFunc("Join");
echo "\n";
echo $anonyFunc->__invoke("Josh");
echo "\n";
//闭包
//例子一:在函数里定义一个匿名函数,并调用它
function printStr() {
$func = function($str){
echo $str;
}; //;结束符非常关键
$func('hello world, I am Chinese');
}
prin... | true |
4c1cf2252681719d196907b17aaa06033ea2fd93 | PHP | boxalino/plugin-magento2 | /Lib/P13n/Hit.php | UTF-8 | 4,904 | 2.6875 | 3 | [] | no_license | <?php
namespace com\boxalino\p13n\api\thrift;
use Thrift\Type\TType;
use Thrift\Exception\TProtocolException;
class Hit {
static $_TSPEC;
/**
* @var array
*/
public $values = null;
/**
* @var double
*/
public $score = null;
/**
* @var string
*/
public $scenarioId = null;
public fun... | true |
56be66a8a599eec9a95ebff3792d1da594bd42f2 | PHP | coderpick/php-algorithms-implementation | /InsertionSort/InsertionSortView.php | UTF-8 | 91 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
require "InsertionSort.php";
$array = [3, 2, 1];
var_dump(insertionSort($array)); | true |
e13f61f8ee767a53c92be7bba7c86361a65936ba | PHP | NiharRan/discount | /application/controllers/Role.php | UTF-8 | 6,342 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Role extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->helper('url');
$this->load->library('tank_auth');
$this->load->library('permission');
$this->load->library('custom');
$this->load->model(... | true |
622a4d90f4fcc63e352963514ab016b9a1349ccf | PHP | IramML/BookStore | /server/models/categoriesModel.php | UTF-8 | 1,673 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
class categoriesModel extends Model{
function __construct(){
parent::__construct();
}
function getAllCategories(){
$items = [];
try {
$query = $this->db->connect()->query("SELECT id, name FROM book_category WHERE is_archived = '0'");
$items = $query->fet... | true |
58a77ebf2d71da883f374c75109e4a7cd3a64797 | PHP | iruimeng/walle-web | /components/Git.php | UTF-8 | 7,502 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/* *****************************************************************
* @Author: wushuiyong
* @Created Time : 日 8/ 2 10:43:15 2015
*
* @File Name: command/Git.php
* @Description:
* *****************************************************************/
namespace app\components;
use app\models\Project;
use app\m... | true |
50fbd85a3bc881491ce7128437accee4ddc869b3 | PHP | toun0u/CaamhroApi | /app/modules/catalogue/include/class_cata_group.php | UTF-8 | 1,771 | 2.53125 | 3 | [] | no_license | <?php
include_once DIMS_APP_PATH."modules/system/class_group.php";
class cata_group extends group{
public function getIdAdr(){
$return = 0;
if (!$this->isNew()){
include_once DIMS_APP_PATH."modules/catalogue/include/class_group_livraison.php";
$sel = "SELECT *
FROM ".cata_gr_liv::TABLE_NAME."
W... | true |
459c000fb8bb12a215fefe07eb58a6102d5aa195 | PHP | naczynski/plugin-kg | /kg-users/cocpit/user-table/kg-cocpit-users-table-type.php | UTF-8 | 1,187 | 2.5625 | 3 | [] | no_license | <?php
/**
* Adde type to user table
*/
class KG_Cocpit_Users_Table_Type {
public function __construct() {
add_filter("manage_users_custom_column", array($this, 'add_edit_column'), 10, 3);
add_filter("manage_users_columns", array($this, "add_edit_column_content"), 17 );
}
public function add_... | true |
80a5e9df75af8cd660c35b74de47ae83d4779320 | PHP | sebwert/studip-opencast-plugin | /classes/OCRestClient/SeriesClient.php | ISO-8859-3 | 5,083 | 2.6875 | 3 | [] | no_license | <?php
require_once "OCRestClient.php";
require_once $this->trails_root.'/models/OCModel.php';
require_once $this->trails_root.'/models/OCSeriesModel.php';
class SeriesClient extends OCRestClient
{
function __construct() {
if ($config = parent::getConfig('series')) {
... | true |
402b3bda48a2b3a60db94a65a142e71c4f3eef4c | PHP | drashevskyi/symfony-PublicHolidayInfo | /src/Service/HolidaysService.php | UTF-8 | 5,240 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Service;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Contracts\Translation\TranslatorInterface;
use App\Entity\Holiday;
class HolidaysService
{
/**
* @var HttpClientInter... | true |
2f4b69db4491d965bc12d01c17d4a132b6fe153a | PHP | CrastLin/laravel-annotation | /src/Annotation/NodeInterface.php | UTF-8 | 2,518 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Crastlin\LaravelAnnotation\Annotation;
/**
* Interface NodeInterface
* @package Crastlin\LaravelAnnotation\Annotation
* @author crastlin@163.com
* @date 2022-03-15
* @node (name=应用名称, parent=父节点, menu=0/1, auth=0/1/2, order=0, params=xx=yy&cc=ss, icon=xxx, remark=xxx, actions=defaultPage,xxx,yyy... | true |
8dc0d11fc0bbdda3380ec56a22cb120838b4ec47 | PHP | Indomian/KS-CMS | /modules/main/libs/db/sqlite3i.php | UTF-8 | 13,682 | 2.65625 | 3 | [] | no_license | <?php
/**
* \file sqlite3.php
* Интерфейс базы данных SQLite 3
* Файл проекта CMS-local.
*
* Создан 03.12.2008
*
* \author blade39 <blade39@kolosstudio.ru>
* \version 1.0
* \todo
*/
/*Обязательно вставляем во все файлы для защиты от взлома*/
if( !defined('KS_ENGINE') ) {die("Hacking attempt!");}
include_... | true |
9327feba84417663b73bc3df323c7a1abee95c7a | PHP | Devak03/Disney | /php/controllo_login.php | UTF-8 | 1,442 | 2.671875 | 3 | [] | no_license | <?php
if($_SERVER["REQUEST_METHOD"]=="POST")
{
if(isset($_POST["username"]) && isset($_POST["password"]))
{
$username_inserito = $_POST["username"];
$password_inserito = $_POST["password"];
$check = false;
$file='dati.... | true |
6298b48763babdbf0a2e88d153d6ffe680d57fa9 | PHP | jamesmoss/flywheel | /test/JamesMoss/Flywheel/RepositoryTest.php | UTF-8 | 5,208 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace JamesMoss\Flywheel;
use \JamesMoss\Flywheel\TestBase;
class RespositoryTest extends TestBase
{
/** @var Repository $repo */
private $repo;
protected function setUp()
{
parent::setUp();
if (!is_dir('/tmp/flywheel')) {
mkdir('/tmp/flywheel');
... | true |
41014d7ab62c4cf8bc3c63320dfd3a3b1d360921 | PHP | BookStackApp/BookStack | /tests/Helpers/PermissionsProvider.php | UTF-8 | 4,905 | 2.71875 | 3 | [
"LGPL-2.1-only",
"BSD-3-Clause",
"LGPL-3.0-only",
"LGPL-2.0-or-later",
"Apache-2.0",
"BSD-2-Clause",
"MIT"
] | permissive | <?php
namespace Tests\Helpers;
use BookStack\Entities\Models\Entity;
use BookStack\Permissions\Models\EntityPermission;
use BookStack\Permissions\Models\RolePermission;
use BookStack\Users\Models\Role;
use BookStack\Users\Models\User;
class PermissionsProvider
{
protected UserRoleProvider $userRoleProvider;
... | true |
4ce3668d4f42c711a83848fe638b475677b2c5bc | PHP | webtech-coding/php-paginator | /resources/database/items.php | UTF-8 | 585 | 2.796875 | 3 | [] | no_license | <?php
include('connection.php');
class Products extends Connection{
private $sql;
public function __construct(){
}
public function get_Items($limit,$offset){
$sql="SELECT * FROM products LIMIT {$limit} OFFSET {$offset}";
$prepare=self::$PDO->prepare($sql);
$stm=$prepare-... | true |
ecb33858e25405cea2d295df3369825a5b73e82b | PHP | pazoler/PHP-rep | /lesson5 - include, require/page.php | UTF-8 | 1,120 | 3.09375 | 3 | [] | no_license | <?php
//подключение рнр файлов в текущий файл
//require - если файл не найдется, то выдаст ошику и не будет выполнен скрипт в дальнейшем
// require "имя_файла";
// require_once "name_file";
// //Если файл необязательный:
// //выполнение
// include "имя_файла";
// include_once "name_file";
require_once "data.php";
$boo... | true |
ac068be47aca62b24c5f30cc7f502f08780a9ffa | PHP | nielssp/jivoo | /src/Routing/Request.php | UTF-8 | 12,870 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
// Jivoo
// Copyright (c) 2015 Niels Sonnich Poulsen (http://nielssp.dk)
// Licensed under the MIT license.
// See the LICENSE file or http://opensource.org/licenses/MIT for more information.
namespace Jivoo\Routing;
use Jivoo\Core\Utilities;
use Jivoo\InvalidPropertyException;
use Jivoo\AccessControl\Random;
us... | true |
e3ed11ae510bf01507df05518cbfa737a0845aff | PHP | adzpire/yii2-cmmsinventory | /models/InvtType.php | UTF-8 | 1,232 | 2.546875 | 3 | [] | no_license | <?php
namespace backend\modules\inventory\models;
use Yii;
use yii\helpers\ArrayHelper;
/**
* This is the model class for table "invt_type".
*
* @property integer $id
* @property string $invt_tname
* @property string $invt_tdetail
*
* @property InvtMain[] $invtMains
*/
class InvtType extends \yii\db\ActiveRec... | true |
26c03db5474c616d38c68b81e8aac7b0e19f548a | PHP | katherto/WEB128 | /Practice/Table Generate/tablegen.php | UTF-8 | 2,336 | 3.109375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Table Generation</title>
</head>
<body>
<?php
$tableData = array(
array('Month' => 'JAN', 'Sales' => 3453, 'Quotes' => 1313, 'Visitors' => 393),
array('Month' => 'FEB', 'Sales' => 183... | true |
99f1ee496e7463f23038df0a6dd4a13e978d5c2f | PHP | 5l1v3r1/laravel-mailcaoch-4.5.0 | /src/Domain/Shared/Support/License/License.php | UTF-8 | 2,528 | 2.515625 | 3 | [] | no_license | <?php
namespace Spatie\Mailcoach\Domain\Shared\Support\License;
use Carbon\Carbon;
use Carbon\CarbonInterval;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Str;
use Symfony\Component\Process\ExecutableFinder;
use Symfony\Component\Process\Process;
use Throwable;
cl... | true |
d26c76e6b188b8ac00a97ea07b968257707918df | PHP | tarasMatskovich/galanix | /components/View.php | UTF-8 | 668 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Components;
class View
{
public static function viewExist(string $viewName)
{
return file_exists(ROOT . DIRECTORY_SEPARATOR . "views" . DIRECTORY_SEPARATOR . $viewName . ".php");
}
public static function render(string $viewName, array $args = []) {
if (!static::vi... | true |
0a8a82d35d47a94214f6541d06eb77814e181aa4 | PHP | BenRutlandWeb/atomic | /app/Providers/ShortcodeServiceProvider.php | UTF-8 | 451 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Providers;
use Atomic\Support\ServiceProvider;
class ShortcodeServiceProvider extends ServiceProvider
{
/**
* The shortcodes
*
* @var array
*/
public $singletons = [];
/**
* Boot the shortcodes
*
* @return void
*/
public function boot(): vo... | true |
2909169d6677a8eea09d401a4db8348816305034 | PHP | jorgematheus/learning_php | /models/Group.php | UTF-8 | 3,589 | 2.796875 | 3 | [] | no_license | <?php
class Group extends Model {
private $idUser;
private $dataContent;
public function __construct() {
parent::__construct();
self::getUserId();
}
public function getUserId() {
$u = new Users();
$u->setLoggedUser();
$this->idUser = $u->getId();
}
... | true |
e7e804be62e7363dc147bd06aa440a13fef29295 | PHP | tickleman/MinecraftPhpAPI | /samples/realdistantcommands.php | UTF-8 | 526 | 2.5625 | 3 | [] | no_license | <?php
$command = $_POST["command"] ? $_POST["command"] : "say Hello World";
$formitems = <<<EOT
<input name="command" value="$command">
EOT;
include "connectform.php";
if ($_POST) {
echo "<H3>SEND COMMAND $_POST[command]<H3>";
$GLOBALS["MinecraftAPIConfig"]["path"] = "../api";
include_once "MinecraftAPI.... | true |
d79c6ca8b21bfa412b8e6edbe62cf0cc93bc598b | PHP | tidal/behat-console | /src/Context/ContextClass/ClassResolver.php | UTF-8 | 1,333 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the behat-console package.
* (c) 2017 Timo Michna <timomichna/yahoo.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tidal\Behat\ConsoleExtension\Context\ContextClass;
use Behat\Behat... | true |
9c8d3ca79a8c08374f9197c121a2d3b250319276 | PHP | ehuamaniquispe/cs313-php | /web/week5/newScripture.php | UTF-8 | 1,010 | 2.65625 | 3 | [] | no_license | <?php
require_once 'connection.php';
require_once 'model.php';
require_once 'functions.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="scriptureList.php" meth... | true |
7213e934b0a06e5526da2b5ac372ac5fecd5c8e1 | PHP | florentfli/site_gestion_bibliotheque_MYSQL_2017 | /Auteur_add.php | UTF-8 | 2,292 | 3.09375 | 3 | [] | no_license | <?php
// connexion à la base de données :
// création d'une instance d'un objet PDO de nom $bdd
include("connexion_bdd.php");
// traitement :
// test si on soumet un formulaire ou pas
// test si il y a des paramètres dans L’URL
// en fonction des tests, exécution de requête(s) SQL
// en fonction des tests et des résult... | true |
4920778150f99ae17b5226ecee4782619d0495ea | PHP | hahrens/shipment-tracker | /src/Utils/AdditionalDetails.php | UTF-8 | 1,057 | 3.078125 | 3 | [] | no_license | <?php
namespace Sauladam\ShipmentTracker\Utils;
trait AdditionalDetails
{
/**
* @var array
*/
protected $additional = [];
/**
* Add additional information.
*
* @param $key
* @param $data
*
* @return $this
*/
public function addAdditionalDetails($key, $dat... | true |
ef709d9467bb4398b07a0f007fc79e6a52a0c287 | PHP | caleeli/xsd2php | /src/ProcessMaker/Bpmn/Model/TCatchEventType.php | UTF-8 | 6,798 | 2.578125 | 3 | [] | no_license | <?php
namespace ProcessMaker\Bpmn\Model;
/**
* Class representing TCatchEventType
*
*
* XSD Type: tCatchEvent
*/
class TCatchEventType extends TEventType
{
/**
* @property boolean $parallelMultiple
*/
private $parallelMultiple = null;
/**
* @property \ProcessMaker\Bpmn\Model\DataOutp... | true |
d9edd360ac891400003a43ee7eb20c9aed1dc22b | PHP | cca2014/demo | /php/hello/mysql3.php | UTF-8 | 1,709 | 3.03125 | 3 | [] | no_license | <html>
<!-- Examples from W3Shools: http://www.w3schools.com/php/default.asp -->
<?php
// Create Connection
$con=mysqli_connect("127.1.250.1","cca2014","","c9");
// Check Connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
... | true |
689012a8c444486431c4e963be6fc09908b7dc8b | PHP | muhammadshahidraficp/Symfony | /src/Controller/LuckyController.php | UTF-8 | 3,743 | 2.5625 | 3 | [] | no_license | <?php
// src/Controller/LuckyController.php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use App\Entity\UserRegister;
use Symfony\C... | true |
033f65e15d2566d347ef12b56c90c2269b8c9cc4 | PHP | covex-nn/PHP_CodeBrowser | /src/CLI/Application.php | UTF-8 | 1,744 | 2.953125 | 3 | [] | no_license | <?php
use Symfony\Component\Console\Application as AbstractApplication;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\ArrayInput;
class CbCliApplication extends AbstractApplic... | true |
d87d6205646eccd294a59a3778690e4a5dcb9f59 | PHP | varunsridharan/action-apigen | /apigen/vendor/michelf/php-markdown/test/unit/MarkdownExtraTest.php | UTF-8 | 1,379 | 3 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
class MarkdownExtraTest extends \PHPUnit\Framework\TestCase
{
public function testSetupOfPredefinedAttributes()
{
$obj = new \Michelf\MarkdownExtra();
// Allows custom expansions of arreviations to their full version with the abbr tag
$obj->predef_abbr = array(
'foo' => 'foobar-test',
);
$result ... | true |
4cd11f945c34273ffe35bbeb3b91ad18012408f9 | PHP | spspasov/laravel-api | /app/Address.php | UTF-8 | 1,354 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Address extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'addresses';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected... | true |
c9cc2c31c0445dd7c23394c7b1a33a4ce5fbdb63 | PHP | kjhnns/PaVeR | /lib/live/controller/worker/Bikes.class.php | UTF-8 | 645 | 3.03125 | 3 | [] | no_license | <?php
/**
* Bike controller
* @author joh
*
*/
class Bikes {
/**
* get all bikes
* @return Ambigous <Ambigous, multitype:, Bike>
*/
static function all() {
$db = new Db();
$db->saveQry("SELECT `ID` FROM `#_bikes`");
while($r = $db->fetch_assoc()) $res[] = Bike::load($r['ID']);
return $res;
}
/**... | true |
f9f674840c58fc52ca6e2cb38336b64b513cb4a0 | PHP | a020792s/Pars_test | /src/curl.php | UTF-8 | 3,784 | 2.671875 | 3 | [] | no_license | <?php
namespace CARiD\Parser;
class curl
{
private $ch;
private $host;
private static
$instance = null;
public static function getInstance($host)
{
if (null === self::$instance) {
self::$instance = new self($host);
}
return self::$instance;
}
... | true |
7eebdc8f04cddc34e56f41042f762affa2c55c61 | PHP | SIU-Toba/framework | /php/nucleo/lib/toba_parser_ayuda.php | ISO-8859-1 | 4,242 | 2.921875 | 3 | [] | no_license | <?php
/**
* Parser de links tipo wiki en una ayuda o descripcin
* @package Varios
*/
class toba_parser_ayuda
{
protected static $tags = array('wiki', 'wiki_toba', 'api', 'api_js', 'link', 'url', 'test');
/**
* Determina si una cadena es texto plano o contiene algun formato a parsear y convertir
* @todo Ver ... | true |
d5d7fb8114b710956b32300f85e4dfe2b4187ee9 | PHP | fsr/eseeva | /keyControlPanel.php | UTF-8 | 13,227 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
//============================================================================
// Name : keyControlPanel.php
// Author : Patrick Reipschläger
// Version : 1.0
// Date : 08-2013
// Description : Control panel for managing key codes. The not so quick
// but dirty approach. At so... | true |
9f5a85cb012822ad6ecde1d77d1cbf924d9d1ac7 | PHP | martinfeeley/SSWD_Assignment | /testimonial_db.php | UTF-8 | 1,099 | 2.546875 | 3 | [] | no_license | <?php
#header("Access-Control-Allow-Origin: *");
session_start();
$_SESSION['is_admin'] = 1;
if(!$_SESSION['is_admin']){
header('Location: index.php');
exit();
}
else {
include '../config/connect.php';
if($_SERVER['REQUEST_METHOD'] === 'GET'){
$sql = "SELECT * FROM testimonial WHERE approved = 0";
$resul... | true |
d2b015fdef5adcf4f810b354e09150fbb6b95c51 | PHP | cbl/blade-style | /src/Contracts/CssMinifier.php | UTF-8 | 178 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace BladeStyle\Contracts;
interface CssMinifier
{
/**
* Minify css string.
*
* @return string
*/
public function minify(string $css);
}
| true |
5cb5877ad9d3448bca9ad452b2f326177f58450a | PHP | yuriyar76/black_mist | /app_1c.updates/templates/bootstrap/template.php | WINDOWS-1251 | 3,740 | 2.546875 | 3 | [] | no_license | <?
if (count($arResult["ERRORS"]) > 0) echo '
<p class="red">'.implode('</br>',$arResult["ERRORS"]).'</p>';
if (count($arResult["MESSAGE"]) > 0) echo '
<p class="green">'.implode('</br>',$arResult["MESSAGE"]).'</p>';
switch ($arParams['MODE'])
{
case 'detail':
$page = $APPLICATION->GetCurPageParam("file_id=".$a... | true |
ff7237ca561c8cf4750d9111b9fcf062f57b0074 | PHP | VovichUA/testArtstep | /form_send_comment/src/Models/MyDB.php | UTF-8 | 1,021 | 3.0625 | 3 | [] | no_license | <?php
namespace Models;
class MyDB
{
/** @var \PDO */
private $db;
public function __construct()
{
$this->db = new \PDO('sqlite:/' . __DIR__ . '/../db/mysqlitedb.db');
$this->initTable();
}
public function initTable()
{
$query = 'CREATE TABLE IF NOT EXISTS `comment... | true |
2b0c27c7ae75defcdba61191b4a150855a2c4b5f | PHP | mjaschen/fb_http | /src/HA/Entities/Smartswitch.php | UTF-8 | 1,780 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: arp
* Date: 06.10.2017
* Time: 12:44
*/
namespace fb_http\HA\Entities;
/**
* Class Smartswitch
* @package fb_http\HA\Entities
*
* @property bool $state
* @property string $mode
* @property bool $lock
* @property bool $deviceLock
*/
class Smartswitch implements \Js... | true |
7e42c8c54418a5054bf16bf33c7c841986d69c56 | PHP | nosuchagency/allmaps-api | /app/Http/Requests/TemplateRequest.php | UTF-8 | 2,073 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Models\Template;
use App\Rules\RequiredIdRule;
use Illuminate\Foundation\Http\FormRequest;
class TemplateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()... | true |
f2d02ced7574412c4366dd87d817570398a7839f | PHP | Opentribes/Game | /src/Repository/UserRepository.php | UTF-8 | 195 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace OpenTribes\Core\Repository;
use OpenTribes\Core\Entity\User;
interface UserRepository
{
public function findByUsername(string $username): User;
}
| true |
b4f8fb840d59496d3b989873633a72e5c43147dd | PHP | Alysete/PHP | /Homework page/Homework 2/homework2.3/form2pt3.php | UTF-8 | 2,915 | 2.71875 | 3 | [] | no_license | <!DOCTYPE>
<html>
<head>
<title>MatchGame</title>
<link rel="stylesheet" type="text/css" href="css2.3.css">
<link href='http://fonts.googleapis.com/css?family=News+Cycle|Bentham' rel='stylesheet' type='text/css'>
</head>
<body>
<h1 class="headder">Last Resort</h1> <!--I try to be funny-->
<d... | true |
393d9e7df3c504fd8177e4e8b0043365d432ef2b | PHP | tiexinliu/pzfresh | /service/IAdvertServiceimpl.php | UTF-8 | 784 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\service;
use app\models\Advert;
use yii\base\Object;
/**
*广告业务逻辑实现
*实现广告业务逻辑接口
*
*/
class IAdvertServiceimpl extends Object implements IAdvertService
{
public function __construct()
{
parent::__construct();
}
public function getAdvertList($ad_position = '')
{
... | true |
22368ce00e6cfeaef2c0246bfd82d1898a856a4d | PHP | camuthig/php-graphql-client-generator | /src/Client/CustomScalar.php | UTF-8 | 690 | 3.171875 | 3 | [] | no_license | <?php
namespace GraphQl\Client;
abstract class CustomScalar implements CustomScalarInterface
{
/**
* @var mixed
*/
protected $value;
public function __construct($value)
{
$this->value = $this->parse($value);
}
public function get()
{
return $this->value;
}
... | true |
d8713d3c11dba42b99d6c60b7cf1cee3125dca53 | PHP | passerellesnumeriques/SDB-0.1-prototype | /www/component/data_model/data_model.inc | UTF-8 | 767 | 2.75 | 3 | [] | no_license | <?php
class data_model extends Component {
protected function is_page_allowed($path) {
// TODO
return false;
}
protected function is_service_allowed($path) {
// access to model already contains security checks
return true;
}
public function generate_field_type($col) {
if ($col instanceof \datamodel\... | true |
5402f6ba31e380d313ad78553b342a5a1656ac78 | PHP | albert925/inmoprov | /registro/reg_users.php | UTF-8 | 2,955 | 2.65625 | 3 | [] | no_license | <?php
include '../config.php';
$a=segcon($conexion,$_POST['a']);//nombres
$b=segcon($conexion,$_POST['b']);//apellidos
$c=segcon($conexion,$_POST['c']);//correo
$d=segcon($conexion,$_POST['d']);//telefono
$nombreComp=$a." ".$b;
$hoy=date("Y-m-d");
function rand_code($chars,$long)
{
$code="";
for ($x=0; $x ... | true |
e7e53a84221871e922681dc69732e6568e5af445 | PHP | denn-acrymoore/demo-ci4-db-libraries-helpers | /app/Views/helpers/v_urlHelper.php | UTF-8 | 2,991 | 2.625 | 3 | [
"MIT"
] | permissive | <?= $this->extend('layout/v_template'); ?>
<?= $this->section('content'); ?>
<div class="container">
<!-- TITLE -->
<div class="row">
<div class="col text-center">
<h1>URL Helper</h1>
</div>
</div>
<br>
<!-- SITE_URL() -->
<div class="row">
<div class="col">
<h3>site_url()</h3>
... | true |
638663e8824e6a74661b3e9494569623b54fc5b5 | PHP | keethus/systemprogramming | /lametric/nordpool/index.php | UTF-8 | 1,583 | 2.828125 | 3 | [] | no_license | <?php
// Database information.
$serverName ='127.0.0.1';
$userName = 'dbman';
$pass = 'XXXXXXXXXXXXX';
$db_name = 'karlis_barbars';
try {
// Connect to database
$conn = new mysqli($serverName, $userName, $pass, $db_name);
$jsondata = json_decode(file_get_contents('http://lax.lv/nordpool.json'), t... | true |
74ae76e0f2cfb395c87bab9da80127fce60f28da | PHP | Rajib007kamrul/movietheme | /inc/custom-meta.php | UTF-8 | 1,358 | 2.546875 | 3 | [] | no_license | <?php
add_action( 'add_meta_boxes', 'custom_meta_post' );
function custom_meta_post() {
add_meta_box(
'custom_meta_post', // Unique ID
'Custom Post Meta Title', // Box title
'custom_post_meta_callback', // Content callback, must be of type callable
[ 'post' ]... | true |
cea251f26d4908f75d2275740812bc1ba1c076be | PHP | Eyadhamza/programmermap | /app/Orchid/Layouts/CareerListLayout.php | UTF-8 | 1,167 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Orchid\Layouts;
use Orchid\Screen\Actions\Link;
use Orchid\Screen\Layouts\Table;
use Orchid\Screen\TD;
class CareerListLayout extends Table
{
/**
* Data source.
*
* The name of the key to fetch it from the query.
* The results of which will be elements of the table.
*... | true |
ced6b3813410d869f3826006faa2b19ec69085a9 | PHP | kfeniks/stajka | /migrations/m170527_212000_create_news_table.php | UTF-8 | 795 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `news`.
*/
class m170527_212000_create_news_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('news', [
'id' => $this->primaryKey(),
'title' => $this->string(1... | true |
cf6e530c357e829112a616884cf556b084fc7c20 | PHP | jiaoyugang/pay | /payGateway/vendor/swoft/swoole-ide-helper/src/namespace/Http/Response.php | UTF-8 | 2,601 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Swoole\Http;
/**
* @since 4.3.3
*/
class Response
{
public $fd;
public $header;
public $cookie;
public $trailer;
/**
* @return mixed
*/
public function initHeader(){}
/**
* @param $name [required]
* @param $value [optional]
... | true |
baa6fec1f72c3e2f04d265d2e2488963ccd26c9e | PHP | goetas/webservices | /tests/goetas/webservices/tests/AbstractXmlTest.php | UTF-8 | 3,163 | 2.65625 | 3 | [] | no_license | <?php
namespace goetas\webservices\tests;
abstract class AbstractXmlTest extends \PHPUnit_Framework_TestCase
{
public function assertEqualXML(\DOMElement $expectedElement, \DOMElement $actualElement, $message = '')
{
self::assertEquals(
$expectedElement->localName,
$actu... | true |
9c2f866ee22cd0170ec22b96f280fffdd8b873e2 | PHP | eziagorchee/SCA-PROJECT | /home/dashboard.php | UTF-8 | 1,327 | 2.71875 | 3 | [] | no_license | <?php
session_start();
include "../db/con.php";
if(!isset($_SESSION['user_id'])){
header("Location: ../index.php");
}
echo "You are Welcome ".$_SESSION['first_name'];
echo '<p>Want to add any course? <a href="../courses/add_course.php"> Add Courses Here </a></p>';
$user_id = $_SESSION['user_id'];
$stmt=$conn->prepa... | true |
2d3c9707ca3014e09f192f2da5afa6aca8a46580 | PHP | EmiliaE41181250/kelompok1_tif_d | /OrenzLaundry/application/controllers/Example.php | UTF-8 | 2,428 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') or exit('No direct script access allowed');
class Example extends CI_Controller
{
/**
* Send to a single device
*/
public function sendNotification()
{
$token = 'ckDSF-9gS-iTetSXzo4rmo:APA91bHqwzbivYmi4tRypw-dczF24ij6gwceKTxykXu_RPk2QwydTdnrxxUBVMv-t6-h52-_pZif9F... | true |
231de031736034a376a7b956b8a2c654e837ba90 | PHP | rg-/bootclean | /template-parts/wpbc_tokko/property-single/rooms.php | UTF-8 | 624 | 2.59375 | 3 | [] | no_license | <?php
$property = $args;
/*
1 - Servicios
2 - Ambientes
3 - Adicionales
*/
$tags = $property->get_field('tags');
$rooms = $property->get_tags_by_type(2);
if(!empty($rooms)){
?>
<div class="ui-property-content-row ui-rooms-row">
<h3 class="section-subtitle md mb-4">Ambientes</h3>
<div c... | true |
55d9bce6d71c8dffa26f53023168007429837020 | PHP | zjjzjw/web_fangquan | /fangquan/app-mobi/app/Src/Forms/Account/CheckThirdPartyForm.php | UTF-8 | 2,220 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Mobi\Src\Forms\Account;
use App\Mobi\Src\Forms\Form;
use App\Service\FqUser\CheckTokenService;
use App\Src\Exception\LoginException;
use App\Src\FqUser\Domain\Model\CheckThirdPartyEntity;
use Illuminate\Support\MessageBag;
class CheckThirdPartyForm extends Form
{
public $check_third_party_sp... | true |
8c2bbe8feabd8a5a143dfbe28edac0dbd24a57f0 | PHP | CPS5950G1/sitecode | /admin_search_mentor_handle.php | UTF-8 | 2,938 | 2.609375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<?php
$hostname = "imc.kean.edu";
$username = "wangqian";
$password = "1023275";
$dbname = "2017F_wangqian";
$con=mysqli_connect($hostname, $username,$password,$dbname);
if(isset($_POST['submit'])){
$keywords = $_POST['keywords'];
if($keywords == '*'){
$query =... | true |
24814a2d751fe00bd8e933a179700e14da726a2a | PHP | haringsrob/commerce_invoice | /src/InvoiceBaseInterface.php | UTF-8 | 433 | 2.546875 | 3 | [] | no_license | <?php
namespace Drupal\commerce_invoice;
/**
* Class InvoiceInterface.
*
* @package Drupal\commerce_invoice
*/
interface InvoiceBaseInterface {
/**
* Gets the invoice number.
*
* @return int
* The raw invoice number.
*/
public function getInvoiceNumber();
/**
* Gets the invoice timesta... | true |
27ab306d266b64b4f73675c23091cc02a12dc383 | PHP | MCKasman/archives | /Programming_References/MySQL/inserting_updating_data.php | UTF-8 | 1,103 | 3.25 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "id6799686_mckasman";
$password = "Kasman";
$database = "id6799686_mysql_test";
// create connection
$conn = mysqli_connect($servername, $username, $password, $database);
// check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
//$quer... | true |
3e493958df2881abaf583e6ca4efba42f5264a0f | PHP | pamo18/dbwebb-htmlphp | /kmom06/me6/admin/update-process.php | UTF-8 | 1,181 | 3.0625 | 3 | [] | no_license | <?php
if (isset($_POST['update']) && !empty($_POST['Position'])) {
$position = $_POST['Position'];
$title = $_POST['Title'];
$year = $_POST['Year'];
$oscars = $_POST['Oscars'];
$rating = $_POST['Rating'];
$params = [$title, $year, $oscars, $rating, $position];
$db = connectToDatabase($DBm... | true |
306235f8bb9fc5318bf841b262186d1580660902 | PHP | jeanrantunes/nas | /database/migrations/2017_10_28_171826_create_patients_table.php | UTF-8 | 1,204 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePatientsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('patients', fun... | true |
d87cfe037bf1070974cf6f6a03afc53f345c6887 | PHP | tico087/sdk-php-notazz | /src/Multiverse/Notazz/DSL/DocumentBuilder.php | UTF-8 | 1,503 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Multiverse\Notazz\DSL;
use Multiverse\Notazz\NFSe\Document as NFSeDocument;
use Multiverse\Notazz\NFe\Document as NFeDocument;
use Multiverse\Notazz\DSL\Tools\Formatter;
use Multiverse\Notazz\DSL\Exceptions\MethodNotFoundException;
class DocumentBuilder
{
protected $document;
protected $docu... | true |
4dc8771d0d4fac74e317847f3c57ff61dea1211e | PHP | tectronics/platinum-primalinea-andre | /platinum/fwk/classes/util/GeradorSenha.class.php | UTF-8 | 1,155 | 3.6875 | 4 | [] | no_license | <?php
class GeradorSenha {
// criando e abrindo a função
public static function gerarSenha($tipo="L N L N N L ") {
// o explode retira os espaços presentes entre as letras (L) e números (N)
$tipo = explode(" ", $tipo);
// Criação de um padrão de letras e números (no meu caso, usei letras maiúsculas
... | true |
9710619063d2d2250526b76d8a83b549a0fb67e1 | PHP | florienzh4x/Soal-Tipe-C | /soal2.php | UTF-8 | 357 | 2.890625 | 3 | [] | no_license | <title>Soal Nomor 2</title>
<?php
function isPasswordValid($password){
return strlen($password) >= 8 && !preg_match('/[A-Z]/', $password) && preg_match('/[0-9]/', $password) && !preg_match('/[[:punct:]]/', $password);
}
$pass = 'hasanal123';
if(isPasswordValid($pass)){
echo $pass." => Password Valid";
} else {
ech... | true |
bc8a764d72bf2b8355f9e5a22622f86435cfbcf1 | PHP | utsavkoju/outlook | /app/Helpers/utils_helper.php | UTF-8 | 1,127 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
class utils_helper {
public static function twodim_to_keyval($data) {
if (is_array($data) && sizeof($data) > 0) {
$dataNew = array();
foreach ($data as $key => $value) {
$valTmp = array();
foreach ($value as $val) {
... | true |
2a90b2b99c02db66c024754332db225a6a922e85 | PHP | VijitCoder/Kira | /src/validation/validators/Limits.php | UTF-8 | 5,733 | 2.796875 | 3 | [] | no_license | <?php
namespace kira\validation\validators;
use kira\core\App;
use kira\exceptions\FormException;
/**
* Проверка значения на соблюдение заданных пределов. Для числел - диапазон значений, для строк - длина строки.
*
* Настройки валидатора:
* <pre>
* $options = [
* 'min' => number,
* 'max' => num... | true |
27eb7985f6e5f4b6a70a4d95e872afccd89e80bb | PHP | Rebilly/rebilly-php | /src/Entities/RulesEngine/Condition.php | UTF-8 | 5,719 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This source file is proprietary and part of Rebilly.
*
* (c) Rebilly SRL
* Rebilly Ltd.
* Rebilly Inc.
*
* @see https://www.rebilly.com
*/
namespace Rebilly\Entities\RulesEngine;
use DomainException;
use Rebilly\Rest\Resource;
/**
* Class Condition.
*/
class Condition extends Resource
{... | true |
f4b160f16a04a8fe30aa5a4ef80972d16c91de5d | PHP | belmyhen/Hello_world | /jgg/demo_jsonp.php | UTF-8 | 1,660 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JSONP 实例</title>
<script src="https://cdn.static.runoob.com/libs/jquery/1.8.3/jquery.js"></script>
</head>
<body>
<p>JSONP</p>
<div id="divCustomers"></div>
<p>jQuery JSONP</p>
<div id="divCustomers2"></div>
<script type="text/javascript">
function callbackFu... | true |
37e5e46a60473d223231e0ed36c3fbc6edb35e54 | PHP | amcosta/design-patterns | /src/ChainOfResponsibility/Descontos/DescontoTemplate.php | UTF-8 | 743 | 3.015625 | 3 | [] | no_license | <?php
namespace DesignPatterns\ChainOfResponsibility\Descontos;
use DesignPatterns\Model\Orcamento;
abstract class DescontoTemplate implements DescontoInterface
{
/**
* @var DescontoInterface
*/
private $desconto;
final public function obterDesconto(Orcamento $orcamento)
{
if ($thi... | true |
fd7d85496d15b146d28421a111c6f90549012f13 | PHP | dcsdev/EweTube | /ajax/subscribe.php | UTF-8 | 944 | 2.734375 | 3 | [] | no_license | <?php
require_once("../includes/config.php");
require_once("../includes/classes/DataAccess.php");
require_once("../includes/classes/User.php");
if (!isset($_POST["subscribingFrom"]) || !isset($_POST["subscribingTo"]) ) {
return;
}
$userTo = $_POST["subscribingTo"];
$userFrom = $_POST["subscribingFrom"];
... | true |
63e4ac8a796429f45812812abb91bcbd6a9606dc | PHP | culjo/singteractive-web | /register.php | UTF-8 | 2,432 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by Lekan Olad.
* User: Singtractive
* Date: 12/30/2015
* Time: 9:05 PM
*/
include 'include/db_tables.php';
spl_autoload_register(function($class_name){
require 'classes/' . strtolower($class_name) . '_class.php';
});
$usersOb = new Users();
// json response array
$respo... | true |
9e4bd6cb05c0165ee2935fc5c20635c78db43caa | PHP | skkarthik-dev/rayan-world-cart | /platform/plugins/marketplace/src/Models/Revenue.php | UTF-8 | 1,159 | 2.53125 | 3 | [] | no_license | <?php
namespace Botble\Marketplace\Models;
use Botble\Base\Models\BaseModel;
use Botble\Ecommerce\Models\Currency;
use Botble\Ecommerce\Models\Customer;
use Botble\Ecommerce\Models\Order;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Revenue extends BaseModel
{
/**
* The database table used by... | true |
a9a6c91704fb5ca4007021dc5fcaf610e7a1df87 | PHP | LafeLabs/lafelabs.github.io | /oldlafelabsdotorg/deck/recubeify/index2cube.php | UTF-8 | 1,307 | 3 | 3 | [
"MIT"
] | permissive | <?php
/*
takes index.html and makes a cube.txt file
*/
$indexhtml = file_get_contents('index.html');//get the local index.html
$cubetxt = "";
for ($index = 0; $index < 1024; $index++) {
$pagename = "page0".decoct(ord($inputstring[$index]));
if
if(strlen("<" . $pagename . ">") > 1){
$foo = explod... | true |
61525d50823c393608b51d6c72ae2805c40ecb21 | PHP | shellawk/nyumba_ready | /static/api/login.php | UTF-8 | 781 | 2.578125 | 3 | [] | no_license | <?php
include_once(realpath(dirname(__DIR__)) . '/classes/User.php');
$user = new User();
$user -> email = isset($_POST['email']) ? $_POST['email'] : die(http_response_code(403));
$user -> password = isset($_POST['password']) ? $_POST['password'] : die(http_response_code(403));
//check user ex... | true |
a3f51367f98e77e79e7cf879755d82b65192c301 | PHP | lans8097/mvc-old | /vendor/Core/Traits/RegistryTrait.php | UTF-8 | 1,240 | 2.9375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: lance
* Date: 19.08.2017
* Time: 13:25
*/
namespace Core\Traits;
trait RegistryTrait
{
/**
* @var array
*/
protected static $array =[];
/**
* @var array in lock kay array
*/
protected static $lock =[];
/**
* @param $key
... | true |
ebcf600d90b03781b011588fe20baf253734ce38 | PHP | E-Projects/estonian-personal-code | /src/PersonalCodeInterface.php | UTF-8 | 186 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace EProjects\EstonianPersonalCode;
interface PersonalCodeInterface
{
/**
* Returns personal code
*
* @return int
*/
public function getId();
}
| true |
8b15e5cb5fd65d3fac81a68807324f0b408a0573 | PHP | jhs851/hyungseok | /app/Http/Requests/AvatarRequest.php | UTF-8 | 1,863 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\{Facades\Storage, Str};
use Intervention\Image\Facades\Image;
class AvatarRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
... | true |
53cf24cb0c787a22b5e13ac12e16766c7bc669d6 | PHP | pythias/leetcode | /algorithms/php/1004_longestOnes.php | UTF-8 | 1,617 | 3.46875 | 3 | [] | no_license | <?php
class Solution {
/**
* @param Integer[] $A
* @param Integer $K
* @return Integer
*/
function longestOnes($A, $K) {
return $K == 0 ? $this->_zero($A) : $this->_positive($A, $K);
}
private function _zero($nums) {
$count = 0;
$max = 0;
foreach ($nu... | true |
00558253c7d6064f221fc71e1a0f7c314b5e72be | PHP | krafkod/php-webservices | /src/BaseWebService.php | UTF-8 | 2,279 | 3 | 3 | [] | no_license | <?php
namespace KrafKod\WebServices;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Exception\RequestException;
abstract class BaseWebService
{
const GET = 'GET';
const POST = 'POST';
const PUT = 'PUT';
const PATCH = 'PATCH';
const DELETE = 'DELETE';
const HEA... | true |
6db734574da9cfd4f55675448f30bb2c41828394 | PHP | gitter-badger/framework-18 | /src/Viserio/Middleware/Tests/Fixture/FakeContainerMiddleware.php | UTF-8 | 1,292 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Viserio\Middleware\Tests\Fixture;
use Interop\Container\ContainerInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Viserio\Contracts\Middleware\Frame as FrameContract;
use Viserio\Contracts\Middleware\Middleware as MiddlewareContract;
class FakeContain... | true |
f0f7d38ea74b78565075791ccc1ee55c82e0150b | PHP | core-plus/core | /app/AtMessage/MessageInterface.php | UTF-8 | 348 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Core\AtMessage;
use Core\Models\User as UserModel;
interface MessageInterface
{
/**
* Send at message.
* @param \Core\Models\User $sender
* @param \Core\Models\User $user
* @param mixed $resource
* @return void
*/
public function send(UserModel $sender, UserModel... | true |
755d30c95e3da7db451f08e43bd368120359d56a | PHP | HelalAhmedSuleiman/MenovaSite | /plugins/pages/src/Controllers/PagesController.php | UTF-8 | 6,081 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Dot\Pages\Controllers;
use Action;
use Illuminate\Support\Facades\Auth;
use Dot\Pages\Models\Page;
use Dot\Platform\Controller;
use Redirect;
use Request;
use View;
/*
* Class PagesController
* @package Dot\Pages\Controllers
*/
class PagesController extends Controller
{
/*
* View payload... | true |
0b8ae72085eb9a6237be6803b86986c6e830e42b | PHP | wp-cli/wp-cli | /php/WP_CLI/Bootstrap/DefineProtectedCommands.php | UTF-8 | 1,255 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace WP_CLI\Bootstrap;
/**
* Class DefineProtectedCommands.
*
* Define the commands that are "protected", meaning that they shouldn't be able
* to break due to extension code.
*
* @package WP_CLI\Bootstrap
*/
final class DefineProtectedCommands implements BootstrapStep {
/**
* Process this singl... | true |
a911b9078b3a50caeb5a185491f1cbeff04aaf04 | PHP | amandabsaibes/project2WebCode | /dispDaily.php | UTF-8 | 1,184 | 3.03125 | 3 | [] | no_license | <!-- /****************************************************
** File: Proj2DispDaily.php
** Project: Project 2
**
** This file displays information about the current
** time. Information presented includes the total count
** for the current day, hour, and week. Other information
** is the busiest and slowest times for... | true |
d395329ed844fb339367b5ad1f2f65c5c8fbde39 | PHP | GePapp/laravel-vue-subdomain-SPA-eshop | /sundance-berlin/app/Http/Controllers/API/OrderController.php | UTF-8 | 2,239 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Order;
class OrderController extends Controller
{
public function storeOrder(Request $request)
{
$request->validate([
'name' => 'required',
'street' => 're... | true |
010a3286c7468b333c2bb5595bc5a79e571be2fb | PHP | RomeraGomezJorge/district-entry-and-exit-of-vehicles-control | /src/Backoffice/ModelOfVehicle/Application/Update/ModelOfVehicleUpdater.php | UTF-8 | 2,414 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Backoffice\ModelOfVehicle\Application\Update;
use App\Backoffice\ModelOfVehicle\Application\Find\ModelOfVehicleFinder;
use App\Backoffice\ModelOfVehicle\Domain\ModelOfVehicleRepository;
use App\Backoffice\ModelOfVehicle\Domain\UniqueModelOfVehicleDescriptionSpecification;
use App\Backoffice... | true |
6c8b359a2dcba98296174ba6ac0c914d432853c7 | PHP | rcristi/wpmovielibrary | /admin/editors/class-posts.php | UTF-8 | 1,321 | 2.6875 | 3 | [] | no_license | <?php
/**
* Define the Posts Editor class.
*
* @link https://wpmovielibrary.com
* @since 3.0.0
*
* @package wpMovieLibrary
*/
namespace wpmoly\admin\editors;
/**
* Provide a tool to manage custom terms.
*
* @since 3.0.0
* @package wpMovieLibrary
*
* @author Charlie Merland <charlie@caercam.org>
*/
class... | true |
ba2e8174959c8cc60d3524de5b7a90013b020dc5 | PHP | GermainJonathan/projet_city | /Site/models/histoire.php | UTF-8 | 2,205 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
class histoire
{
private $_codeHistoire;
private $_codePays;
private $_codeQuartier;
private $_quartier;
private $_titre;
private $_image;
private $_commentaire;
/**
* histoire constructor.
* @param $codeHistoire
* @param $codePays
* @param $codeQuartier
... | true |
b5b4871f305aaebb1e725c7d8e34524339b50846 | PHP | tananutpractisebackenddev/tblogger2 | /TBlogger2/src/MrMe/Database/MySql/MySqlCommand.php | UTF-8 | 5,348 | 2.84375 | 3 | [] | no_license | <?php
namespace MrMe\Database\MySql;
use Exception;
use MrMe\Util\Util as Util;
use MrMe\Util\StringFunc as StringFunc;
class MySqlCommand
{
private $clause_ = false;
private $sql_clause_ = "";
private $sql = "";
public $params;
public $connection;
public $logger;
public function __construct($... | true |