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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
74069db69a4826cfd8c7f3ee6b28e22d888556f9 | PHP | admistress216/framework_20181213 | /cls/anker/Config.php | UTF-8 | 1,399 | 2.875 | 3 | [] | no_license | <?php
namespace app\cls\anker;
class Config
{
private static $configPath = APP_ROOT."/config/";
private static $config;
/**
* 注册配置文件
* @param $configFileName string 配置文件名称
* @param string $reName string 重定向
*/
public static function load($configFileName, $reName = '')
{
i... | true |
f1ccf94e93df93b2968594699a2337af1696c79b | PHP | Aikrof/Merehead | /app/Http/Controllers/UserController.php | UTF-8 | 1,993 | 2.796875 | 3 | [] | no_license | <?php
/**
* @link https://github.com/Aikrof
* @package App\Http\Controllers
* @author Denys <AikrofStark@gmail.com>
*/
declare(strict_types = 1);
namespace App\Http\Controllers;
use App\Entities\UserEntity;
use App\Entities\BookEntity;
use App\Repositories\Interfaces\BookRepositoryInterface;
use App\Repositories... | true |
5345ec6b698cb7876eb4411eb8cb717bdb31d3ce | PHP | Indigerd/yii2-scenarios | /src/scenarios/validation/collection/ValidatorCollection.php | UTF-8 | 982 | 2.828125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace indigerd\scenarios\validation\collection;
use indigerd\scenarios\validation\validator\ValidatorInterface;
class ValidatorCollection
{
protected $validators = [];
protected $messages = [];
public function __construct(ValidatorInterface ...$validators)
{
... | true |
d6266f91b10e030ebf66fe40019c7e6cbb70bd8b | PHP | Jakub-Fajkus/ipp2 | /diagram/test.php | UTF-8 | 2,610 | 2.78125 | 3 | [] | no_license | <?php
$dir = '.';
$refDir = $dir.'/ref-out';
$referentialCodeFiles = getAllFiles($refDir, '!!!');
var_dump($referentialCodeFiles);
$referentialOutFiles = getAllFiles($refDir, 'out');
var_dump($referentialOutFiles);
$countOfTests = 0;
$failed = 0;
foreach ($referentialCodeFiles as $index => $refCodeFile) {
$tes... | true |
57d109d8fc23d47b029e5feb33ffceef98c88b56 | PHP | Lucasmdrum/loja-virtual-php | /public/bootstrap/bootstrap.php | UTF-8 | 1,523 | 2.59375 | 3 | [] | no_license | <?php
use App\Classes\AddFunctionsTwig;
use App\Classes\Bind;
use App\Classes\CarrinhosAbandonados;
use App\Classes\FunctionsTwig;
use App\Classes\Parameters;
use App\Classes\RetornaEstoque;
use App\Classes\Session;
use App\Classes\Template;
Session::start();
date_default_timezone_set('America/Sao_Paulo');
// Inicia... | true |
b2a8e43e7cd1e4fd33ddbf3e5a40f594e5a2211d | PHP | neoform/PHP-Neoform | /Neoform/Web/Lib.php | UTF-8 | 11,579 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Neoform\Web;
use Neoform;
class Lib {
/**
* @var resource Curl handle - for reuse between connections (to avoid exhausting the PHP resource pool)
*/
private static $curl;
/**
* @return resource
*/
private static functio... | true |
d49638224b62731be8badeb96857055043fca3e5 | PHP | zjdellal/Tp2_php | /application/models/SalleXml.php | UTF-8 | 2,796 | 2.890625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Zachary
* Date: 2018-04-30
* Time: 22:39
*/
class SalleXml extends CI_Model
{
private $domDoc;
public function __construct()
{
parent::__construct();
$this->domDoc = new DOMDocument('1.0', 'utf-8');
// load le fichier Message xml via le fichier constants qui co... | true |
6f179c449ba8b673b680c8d7e633cc54c8cddcdb | PHP | luigif/WsdlToPhp | /samples/jmdata-movieapp/Get/EAN/JmDataMovieAppTypeGetMovieDetailsFromEAN.php | UTF-8 | 1,360 | 2.625 | 3 | [] | no_license | <?php
/**
* Class file for JmDataMovieAppTypeGetMovieDetailsFromEAN
* @date 10/07/2012
*/
/**
* Class JmDataMovieAppTypeGetMovieDetailsFromEAN
* @date 10/07/2012
*/
class JmDataMovieAppTypeGetMovieDetailsFromEAN extends JmDataMovieAppWsdlClass
{
/**
* The APIKEY
* Meta informations :
* - minOccurs : 0
*... | true |
c23edb0525e3021d4ede4c2a0f326c7912454489 | PHP | mrjeanjean/psr-14-implementation | /src/ListenerProvider.php | UTF-8 | 970 | 3.09375 | 3 | [] | no_license | <?php
namespace Moveo\EventDispatcher;
use Psr\EventDispatcher\ListenerProviderInterface;
/**
* Listener Provider which stores all listeners
*/
class ListenerProvider implements ListenerProviderInterface
{
/**
* @var array<array> $listeners
*/
private array $listeners = [];
/**
* @param... | true |
93eb13df986fdffe3060dbf54409927ecb689453 | PHP | codedsultan/SmartAccountant | /app/Repositories/CompanyRepository.php | UTF-8 | 922 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\Company;
use App\Repositories\BaseRepository;
/**
* Class CompanyRepository
* @package App\Repositories
* @version July 8, 2020, 8:43 am UTC
*/
class CompanyRepository extends BaseRepository
{
/**
* @var array
*/
protected $fieldSearchable = [
... | true |
8cbff28f0fc3224a099d863e102334b834fa9098 | PHP | proficioplus/presence | /exemples/TbsWsHelper.php | UTF-8 | 2,834 | 2.703125 | 3 | [] | no_license | <?php
include("SOAP/Client.php");
$TbsWsProtocol = 'http';
$TbsWsDomaine = 'www.bfcinfo.eu';
$TbsWsPort = '9000';
$TbsWsTimeout = 200;
$TbsWsDebug = false;
/**
* Classe d'aide aux utilisation des services web TBS
* @author Hassane SLAOUI
* @version 1.0
* @since TBS Framework 1.0
*/
class TbsWsHelper {
// Le pro... | true |
33b9db39c760314ea76dcbb51e32ad1e4f383dfd | PHP | SergioMadness/integration-hub-common | /src/Interfaces/EventData.php | UTF-8 | 1,987 | 2.859375 | 3 | [] | no_license | <?php namespace professionalweb\IntegrationHub\IntegrationHubCommon\Interfaces;
use professionalweb\IntegrationHub\IntegrationHubCommon\Interfaces\Models\Model;
/**
* Interface for object has data
* @package professionalweb\IntegrationHub\IntegrationHubCommon\Interfaces
*/
interface EventData extends Model
{
p... | true |
b8f3fa254159ad3bee81ecfb237dbb7998dac172 | PHP | zccbj/muke2 | /IMooc/FemaleUserStrategy.php | UTF-8 | 158 | 2.5625 | 3 | [] | no_license | <?php
namespace IMooc;
class FemaleUserStrategy implements UserStrategy{
function showAd(){
echo 'nvnvnv';
}
function showCategory(){
echo 'girl';
}
} | true |
caee3579bb1fbe97e661fcdbf9d51d86c7d3b1fb | PHP | jyggen/address | /tests/IPv4Test.php | UTF-8 | 8,489 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Boo\Address\Test;
use Boo\Address\AddressInterface;
use Boo\Address\IPv4;
class IPv4Test extends \PHPUnit_Framework_TestCase
{
/**
* @expectedException Boo\Address\Exception\InvalidAddressException
*/
public function testInvalidAddressThrowsException()
{
new IPv4('A.B.C.D... | true |
46df8f4885015e7431860d5f56d2e42f751c8cb7 | PHP | martinthenext/snya.li | /protected/commands/SitemapCommand.php | UTF-8 | 4,469 | 2.53125 | 3 | [] | no_license | <?php
/**
* Создает сайтмап для всего сайта
*/
class SitemapCommand extends CConsoleCommand
{
private $_sitemapDirectory;
public function beforeAction($action, $params)
{
$this->_sitemapDirectory = "/var/www/snya.li/www/sitemaps/";
$_SERVER = array(
'HTTP_HOS... | true |
6e5d7d238459879db21e06bb49babd409b95f55f | PHP | mailliw17/kartap-internal-app-backend | /app/Http/Controllers/API/TestimonyController.php | UTF-8 | 2,649 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Http\Requests\TestimonyRequest;
use App\Model\Testimony;
use Illuminate\Http\Request;
class TestimonyController extends Controller
{
public function index(Request $request)
{
// ambil berdasarkan parameter
... | true |
48a92590398533b106fb0932f85dce3d07d71204 | PHP | JaniellyAraujo/sigpex | /implementacao/tests/evento/protected/models/Categories.php | UTF-8 | 1,892 | 2.671875 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* This is the model class for table "categories".
*
* The followings are the available columns in table 'categories':
* @property integer $Id
* @property string $Name
* @property string $MainPhotoPath
* @property string $Timestamp
*
* The followings are the available model relations:
* @property Ev... | true |
23f2579b0718832967f9b03fa751f42586dce19b | PHP | efimi/padernew | /app/Match.php | UTF-8 | 2,677 | 2.78125 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Location;
use App\User;
class Match extends Model
{
//
public function user()
{
return $this->belongsTo(User::class, 'user_id');
}
public function location()
{
return $this->belongsTo(Location::class, 'loca... | true |
bafadbfe5b5460777e55a4e8df0f2529e12c0dd9 | PHP | Acesmndr/Density_Index | /config/ratio.class.php | UTF-8 | 2,422 | 3.03125 | 3 | [] | no_license | <?php
class ratio
{
public $db;
public $conn;
public $connected = FALSE;
public $district;
public $geo_area;
public $agri_land;
public $pop_density;
public function __construct($district){
$this->district = $district;
... | true |
ff102abad91f6af4e91b8f585eb5328bb64416bf | PHP | BookStackApp/BookStack | /app/References/ModelResolvers/PagePermalinkModelResolver.php | UTF-8 | 601 | 2.6875 | 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 BookStack\References\ModelResolvers;
use BookStack\App\Model;
use BookStack\Entities\Models\Page;
class PagePermalinkModelResolver implements CrossLinkModelResolver
{
public function resolve(string $link): ?Model
{
$pattern = '/^' . preg_quote(url('/link'), '/') . '\/(\d+)/';
... | true |
6c99af3fb0bad9dd4db05108450d788e6415cbfb | PHP | mofolade/filmforumet | /src/DB/AuthClass.php | UTF-8 | 5,026 | 2.78125 | 3 | [] | no_license | <?php
require_once(dirname(__FILE__).'/classMySQL.php');
class AuthClass extends MySQL{
private $table_name = "users";
public function __construct(){
parent::__construct();
}
/**
* Login the user based on login and password parameters
* @return boolean
*/
public functio... | true |
1103f96860ea29fd52fb2fa894c593c89d28b40d | PHP | ammarfaizi2/api.teainside.org | /public/corona/CoronaStatistic.php | UTF-8 | 1,103 | 2.953125 | 3 | [] | no_license | <?php
namespace CoronaStatistic;
if (!defined("CORONA_STATS_STORAGE")) {
exit("CORONA_STATS_STORAGE is not defined!\n");
}
use CoronaStatistic\Scrapers\Worldometers;
/**
* @author Ammar Faizi <ammarfaizi2@gmail.com> https://www.facebook.com/ammarfaizi2
* @license MIT
* @version 0.0.1
*/
final class CoronaStat... | true |
7e75dd0bf2125c2afd41412fc9ef5b7604726f4e | PHP | uriXD/PanelControl | /PanelControl1/Contenido/ArchivosActualizar/ArchivosGuardar/prueba.php | UTF-8 | 1,073 | 2.875 | 3 | [] | no_license | <?php
include("../conexion/conexion.php");
$idcategoria = $_POST["IdCategoria1"];
$opcion = $_POST["opcion"];
$informacion = [];
if ($opcion == "agregar") {
$nombre = $_POST["NombreCategoria"];
}
switch ($opcion) {
case 'agregar':
agregar($nombre,$conexion);
break;
case 'eliminar':
elimin... | true |
9cad418af46b4b6673461ed21278fa8cb65208bf | PHP | FeyNyX/php-code-test | /src/DTO/BookListRequestDTO.php | UTF-8 | 1,780 | 3.109375 | 3 | [] | no_license | <?php
namespace BookSellerApiHandler\DTO;
/**
* Class BookListRequestDTO
*/
class BookListRequestDTO
{
/**
* @var string|null
*/
private $author;
/**
* @var string|null
*/
private $publisher;
/**
* @var int|null
*/
private $yearPublished;
/**
* @var ... | true |
f0168d9b4e3ed553f64d259a795b386f0863c545 | PHP | mcroitor/SOAPPHP | /PingPongService/index.php | UTF-8 | 248 | 2.546875 | 3 | [] | no_license | <?php
$wsdl = "./pingpong.wsdl";
if (isset($_GET["wsdl"])) {
echo file_get_contents($wsdl);
exit();
}
function PingPong() {
return "pong";
}
$service = new SoapServer($wsdl);
$service->addFunction("PingPong");
$service->handle();
| true |
978fef14a3f0afd31e1cb9abe551b13a055264af | PHP | pcabreus/test-ecommerce | /src/Domain/Model/Currency.php | UTF-8 | 1,175 | 3.421875 | 3 | [] | no_license | <?php
namespace App\Domain\Model;
class Currency
{
public const CURRENCY = [
'EUR' => 'EUR',
'USD' => 'USD',
'CAD' => 'CAD',
'CHF' => 'CHF',
'GBP' => 'GBP',
];
private function __construct(string $currency)
{
if (!self::isValid($currency)) {
... | true |
0dcf307dd158aed01e1eb8d6c33abc96831d840f | PHP | cherylnielsen/Physics-In-Motion-Website | /private/db_controller/QuoteController.php | UTF-8 | 5,415 | 3.234375 | 3 | [
"MIT"
] | permissive | <?php
class QuoteController extends DatabaseController {
public function __construct() {}
//Quote ($quote_id, $author, $quote_text, $month_posted, $year_posted)
protected function getData($db_result, $db_connection)
{
$dataArray = array();
if($db_result)
{
while ($row = mysqli_fetch_array($db_re... | true |
c59d1c6d2a904d51d007dd5c0569b5d1040dd1c6 | PHP | professoralessandro/clockmed | /Classes/Controller/DAOMensagem.php | UTF-8 | 2,497 | 3 | 3 | [] | no_license | <?php include_once("../../Conexao/Conexao.php"); ?>
<?php include_once("../Model/Mensagem.php"); ?>
<?php
class DAOMensagem {
//Propriedades
private $conexao;
//Construtor
public function __construct($conexao) {
$this->conexao = $conexao;
//$this->conexao = new Conexao();
}
... | true |
6ddccdcaa59615a1fd7ab93af589a30a8b75c3f2 | PHP | caleeli/xsd2php | /src/ProcessMaker/Bpmn/Diagram/PlaneType.php | UTF-8 | 1,530 | 2.90625 | 3 | [] | no_license | <?php
namespace ProcessMaker\Bpmn\Diagram;
/**
* Class representing PlaneType
*
*
* XSD Type: Plane
*/
class PlaneType extends NodeType
{
/**
* @property \ProcessMaker\Bpmn\Diagram\DiagramElement[] $diagramElement
*/
private $diagramElement = null;
/**
* Adds as diagramElement
*... | true |
b03973c71db066491712bbfd8dc709faa4444195 | PHP | geecoo/code | /php/ipc/ftok_func.php | UTF-8 | 304 | 2.796875 | 3 | [] | no_license | <?php
function ftoks($pathname, $proj_id) {
$st = @stat($pathname);
if (!$st) {
return -1;
}
$key = sprintf("%u", (($st['ino'] & 0xffff) | (($st['dev'] & 0xff) << 16) | (($proj_id & 0xff) << 24)));
return $key;
}
echo ftoks(__FILE__, 'm');
echo "\n";
echo ftok(__FILE__, 'm');
| true |
d35af602362e806a566cee6930836d20736ecae5 | PHP | ad3n/server-library | /src/Scope/ScopePolicyInterface.php | UTF-8 | 746 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2016 Spomky-Labs
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace OAuth2\Scope;
use OAuth2\Client\ClientInterface;
interface ScopePolicyInterface
{
/**
* @re... | true |
c02e4c5a21a88e496d2384a5ef1d213455d2cbdb | PHP | jelmalem/Piscine-PHP | /d01/ex12/search_it!.php | UTF-8 | 238 | 2.65625 | 3 | [] | no_license | #!/usr/bin/php
<?PHP
if ($argc < 2)
return;
$arg = $argv[1];
$res = false;
$i = 2;
while ($i < $argc)
{
$tmp = explode(":", $argv[$i]);
if (!strcmp($arg, $tmp[0]))
$res = $tmp[1];
$i++;
}
if ($res)
echo $res."\n";
?>
| true |
e499b9e8dd06886955f288f15ce961dca3cb34e5 | PHP | appkr/db-lock-poc | /app/Support/Logging/PrettyLogFormatter.php | UTF-8 | 461 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Support\Logging;
use Monolog\Formatter\LineFormatter;
class PrettyLogFormatter extends LineFormatter
{
/**
* {@inheritdoc}
*/
protected function toJson($data, $ignoreErrors = false)
{
$json = json_encode($data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_... | true |
3c115edf8858e7a3e6e473fa525374f1a838faf4 | PHP | AmpedRadio/alexa-streaming-php | /src/Directives/AudioPlayerClearQueueDirective.php | UTF-8 | 1,541 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace AmpedRadio\AlexaStreamingPHP\Directives;
use AmpedRadio\AlexaStreamingPHP\Interfaces\AudioPlayerDirectiveInterface;
/**
* AudioPlayerClearQueueDirective.
*
* Clears the audio playback queue. You can set this directive to clear the queue without stopping
* the currently playing stream, or clear th... | true |
47fff9c36d7f5cda4eb536f1a1a1230011b67233 | PHP | vora1993/mcroy | /module/Application/src/Application/Entity/UserInterface.php | UTF-8 | 829 | 2.59375 | 3 | [] | no_license | <?php
namespace Application\Entity;
interface UserInterface
{
public function getId();
public function getRoleId();
public function getUsername();
public function getEmail();
public function getFirstName();
public function getLastName();
public function getDisplayName();
public function... | true |
045f59036de0d3fa0a65d4f2a968778982c408d6 | PHP | gringa/moysklad-sdk | /src/Actions/GetEntity.php | UTF-8 | 1,217 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace MoySkladSDK\Actions;
use Exception;
use MoySkladSDK\ApiClient;
use MoySkladSDK\Client\EntityClientBase;
use MoySkladSDK\Entity\MetaEntity;
use MoySkladSDK\Param\QueryParam;
use MoySkladSDK\RequestPreparer;
/**
* Trait GetEntity
* Получение сущности
* @package MoySkladSDK\Actions
* @author gringa ... | true |
51f6cb1753c4b6cd48504b777ece008bba30a2f1 | PHP | timiTao/grpc | /packages/PHP/Server/src/Calculator.php | UTF-8 | 858 | 2.84375 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace TimiTao\GRPC\Server;
use Spiral\GRPC\ContextInterface;
use TimiTao\GRPC\Contract\AddReply;
use TimiTao\GRPC\Contract\AddRequest;
use TimiTao\GRPC\Contract\CalculatorInterface;
use TimiTao\GRPC\Contract\SubtractReply;
use TimiTao\GRPC\Contract\SubtractRequest;
class Calcula... | true |
b3ef78e1db6a8d0a649d6fc1da975298dd65e11c | PHP | MGPGTempGroup/back-end | /database/migrations/2018_12_21_130930_create_industry_updates_table.php | UTF-8 | 1,001 | 2.609375 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIndustryUpdatesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('industr... | true |
86d7d8c4a943a153e6ba2bf48e8ad8c88c31c7b0 | PHP | jesus0073/PruebaGdoce | /src/Controller/mainController.php | UTF-8 | 1,481 | 3.09375 | 3 | [] | no_license | <?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class mainController extends AbstractController
{
/**
* @Route("/", name="main")
*/
public function index(... | true |
a1a2114398f5a772a12aa73817528581e9211fb9 | PHP | dzulfikar68/SIKTA | /application/models/JModel/Model/Table/Support.php | UTF-8 | 20,898 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Model\Table;
use \Model\Core;
use \Model\Callback;
abstract class Support{
protected $tableName = "";
protected $select = array();
protected $coulomn = array();
protected $dataTable = null;
protected function Config($tableName = "", $select = array(), $coulomn = array()){
$th... | true |
b060c7ad6c9650960ebbb52d2c98562df8194046 | PHP | Virtuvia/PHPGit | /src/PHPGit/Command/ShowCommand.php | UTF-8 | 2,161 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
namespace PHPGit\Command;
use PHPGit\Command;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* Show various types of objects - `git show`
*
* @author Kazuyuki Hayashi
*/
class ShowCommand extends Command
{
/**
* Shows one or more objects (blobs, trees, tags and commits)
*
* ... | true |
484464cfeed20d07cc669b51c03b37f53ea0c8c9 | PHP | Foodtalkin/foodtalk_app_backend | /commands/NotificationCommand.php | UTF-8 | 6,930 | 2.71875 | 3 | [] | no_license | <?php
class NotificationCommand extends CConsoleCommand
{
public function init()
{
parent::init();
Yii::app()->attachEventHandler('onError',array($this,'handleError'));
Yii::app()->attachEventHandler('onException',array($this,'handleError'));
}
public function handleError(CEvent $event)
{
if ($event ... | true |
32b5168cad7f59b11b83cb7bce7e381dea47edff | PHP | nowelium/Hermit | /src/Hermit/resultset/HermitIteratorMultiResultSet.php | UTF-8 | 892 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @author nowelium
*/
class HermitIteratorMultiResultSet implements Iterator {
private $statement;
private $index = 0;
private $hasNext = false;
public function __construct(HermitStatement $stmt){
$this->statement = $stmt;
}
public function __destruct(){
$this->state... | true |
37ad79be417204f40025545f5a8d0bf0a77ad2a3 | PHP | aweapi/openapi-elements | /src/Objects/Paths.php | UTF-8 | 1,297 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Aweapi\Openapi\Objects;
use Aweapi\Openapi\Extensions;
use Aweapi\Openapi\ValueObject;
final class Paths extends ValueObject
{
use Properties\OptionalExtensions;
private $paths = [];
public function __construct(
iterable $paths,
Extensions $exte... | true |
0de702173aa231e79661ffcd25fd7cc4e1761827 | PHP | foxfoxfox123/calctest | /src/Operator/OperatorInterface.php | UTF-8 | 182 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Operator;
interface OperatorInterface
{
public function getOperator();
public function getPriority();
public function apply ($left, $right);
} | true |
677cb820d6fa51f10b125dc2e7b8d1396462dcbf | PHP | devlabs91/generic-ota-hotel-api-service | /src/StructType/LoyalPrograms.php | UTF-8 | 3,584 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Devlabs91\GenericOtaHotelApiService\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for LoyalPrograms StructType
* Meta informations extracted from the WSDL
* - documentation: Collection of LoyalPrograms.
* @subpackage Structs
*/
class LoyalPrograms extends Abs... | true |
b59a3e971cb970694f6151e8f8f32acedea16e3c | PHP | handsomegyr/models | /lib/App/Common/Models/Base/BaseTrait.php | UTF-8 | 1,064 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Common\Models\Base;
trait BaseTrait
{
/**
* 根据ID获取信息
*
* @param string $id
* @return array
*/
public function getInfoById($id)
{
$query = array(
'_id' => $id
);
$info = $this->findOne($query);
return $info... | true |
e102d4bcefd35496d9fa986893b674d072c13b61 | PHP | markpackham/PHP2020Revise | /randomNumbers.php | UTF-8 | 145 | 3.3125 | 3 | [] | no_license | <?php
// rand() generates a number between 0 and 2147483647 by default
echo getrandmax();
echo " ";
$min = 1;
$max = 10;
echo rand($min, $max);
| true |
d4a29b7a0a36f2909348c4274e2aa80e6df1f00e | PHP | 24hdutinfo/backoffice_24h_dut | /src/app24/middleware/TeamValidator.php | UTF-8 | 3,644 | 2.75 | 3 | [] | no_license | <?php
/**
* File: TeamValidator.php
* Creation Date: 26/01/2018
* description:
*
* @author: canals
*/
namespace app24\middleware;
use Respect\Validation\Validator as v;
/**
* Class TeamValidator
* @package app24\middleware
*/
class TeamValidator {
public static function checkTeamData() {
ret... | true |
46e46a0e2a4e14ca35ae73a4eb6dc2c35457088e | PHP | jonny2027/MinigolfVR | /Assets/Virtualex/PhP - Online files/CreateUser.php | UTF-8 | 597 | 2.734375 | 3 | [] | no_license | <?php
$servername = "";
$username = "";
$password = "";
$dbname = "";
$user = $_POST["user"];
$pass = $_POST["pass"];
$email = $_POST["email"];
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->con... | true |
fb07b947e773fdb2fb2985e1bda7cc42451781e1 | PHP | techart/tao | /lib/CMS/Fields/Types/Wiki.php | UTF-8 | 573 | 2.515625 | 3 | [] | no_license | <?php
/**
* @package CMS\Fields\Types\Wiki
*/
Core::load('CMS.Fields.Types.HTML', 'CMS.Redactor');
class CMS_Fields_Types_Wiki extends CMS_Fields_Types_HTML implements Core_ModuleInterface
{
protected $default_editor = 'epic';
protected $fallback_editor = 'textarea';
protected function get_editor($name, $data... | true |
04dcf711c57a369f5340a6300d8848b304c22f6a | PHP | piripasa/takeaway-homework-assignment | /app/Services/Reader/JsonFileReader.php | UTF-8 | 535 | 3.015625 | 3 | [] | no_license | <?php
namespace App\Services\Reader;
class JsonFileReader extends Reader
{
/**
* FileReader constructor.
* @param string $filePath
* @throws \Exception
*/
function __construct(string $filePath)
{
parent::__construct($filePath);
}
public function read()
{
$d... | true |
c8b80f6f4e2ac9ead695e0058355eef4cc3a76d2 | PHP | OSEvohe/OC-P5-Blog | /src/Controller/AdminController/ProfilController.php | UTF-8 | 4,691 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Controller\AdminController;
use Core\Controller;
use Entity\Profile;
use Entity\SocialNetwork;
use Models\ProfileManager;
use Models\SocialNetworkManager;
use Services\FileUploader;
class ProfilController extends Controller
{
const FORM_CV_INPUT = 'Cv';
const FORM_PHOTO_INPUT = 'Photo';
... | true |
297494506b507a55fd302a0bbdbe513468ef6ed9 | PHP | eloyll/facturacion | /src/Files/Sesiones/GestionSesion.php | UTF-8 | 753 | 2.703125 | 3 | [] | no_license | <?php
namespace Files\Sesiones;
class GestionSesion {
public function setKey($key,$valor) {
$_SESSION[$key] = $valor;
}
public function existeKey($key) {
return array_key_exists($key,$_SESSION);
}
public function getKey($key){
if($this->existeKey($key)){
... | true |
ee98d3a87b23a100d2e3edcef7abee4d4f5438ee | PHP | rizwanahmedziai/wp-university | /page.php | UTF-8 | 2,750 | 2.578125 | 3 | [] | no_license | <?php get_header() ?>
<?php
while(have_posts()) {
the_post(); ?>
<div class="page-banner">
<div class="page-banner__bg-image" style="background-image: url(<?php echo get_theme_file_uri('images/ocean.jpg') ?>);"></div>
<div class="page-banner__content container container--narrow">
<h1 class="page-bann... | true |
03f408aea7d82fd4b37a5e7010a94335fc35e3fb | PHP | jenniferberg/bank_of_earth | /views/index.php | UTF-8 | 1,690 | 2.53125 | 3 | [] | no_license | <?php require_once('../controllers/initialize.php'); ?>
<?php
if(!isset($userEmail) || empty($userEmail)){
header("Location: ../controllers/login.php");
exit;
}
//Instantiate new BankAccount object
$account = new BankAccount();
$accountInfo = $account->select_by_id_type($person['id']);
//Number of accounts
$lengt... | true |
c05260c85f19499d920f6562197e126da5c80005 | PHP | fabiomolinar/evolme | /database/factories/ModelFactory.php | UTF-8 | 1,896 | 2.609375 | 3 | [] | no_license | <?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding yo... | true |
0440b7bae5524838f9788528b6948212dd0fffe4 | PHP | robkerr1992/phpunit-katas | /tests/BowlingGameTest.php | UTF-8 | 1,249 | 2.984375 | 3 | [] | no_license | <?php
use App\BowlingGame;
use \PHPUnit\Framework\TestCase;
class BowlingGameTest extends TestCase
{
/** @test */
public function it_scores_a_gutter_games_as_0()
{
$game = new BowlingGame();
foreach (range(1,20) as $roll) {
$game->roll(0);
}
$this->assertSame... | true |
facbbbf05f0ed8d13070facc28934c99d153c165 | PHP | ArturYaroslavtsev/HomeWork | /Lessons2/FB.php | UTF-8 | 545 | 3.453125 | 3 | [] | no_license | <?php
echo "Enter you first number ... \n";
$handle = fopen ("php://stdin","r");
$f = fgets($handle); // $f- сокрашение слова "fizz"
echo "Enter you second number ... \n";
$b = fgets($handle); // $b- сокрашение слова "buzz"
echo "Enter you last number ... \n";
$fb = fgets($handle); // $fb- сокрашение слова "fizzbuz... | true |
68ff77f13262197b39fb0e7690e5eb3b46606b77 | PHP | hivebanks/hivebanks | /src/plugin/translate.php | UTF-8 | 2,556 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ahino
* Date: 2018/9/18
* Time: 下午2:49
*/
set_time_limit(0);
//读取properties文件
$n = 0;
$data = file('index.properties');
foreach ($data as $k => $v){
$dbMatched = preg_match("/=/",$v,$matches);
if($matches){
$count_equal = preg_match("/==/",$v,$matches);
... | true |
e0bc18c9927813b521fea3a0db422afe8a792746 | PHP | mnaudry/draganddrop | /classes/Util.php | UTF-8 | 2,710 | 3.046875 | 3 | [] | no_license | <?php
namespace app;
use App\Db;
class Util {
public static function printError($message,$code = NULL){
$error_message = "<strong>Erreur !</strong> $message";
if($code){
$error_message.="</br>";
$error_message.="<strong>Erreur Code : </stron... | true |
8c34a423fa45f949dc49f6486bd78b2a4dc56d2b | PHP | developerrizki/klinik_madani | /libraries/classes/blackcat/view/form/class.FormFactory.php | UTF-8 | 3,525 | 2.765625 | 3 | [] | no_license | <?php
/**
* BlackCat PHP 5 Framework
*
* Last updated: June 16, 2010, 11:48 PM
*
* @package form
* @author Lorensius W. L. T <lorenz@londatiga.net>
* @version 1.0
* @copyright Copyright (c) 2005-2010 Lorensius W. L. T
*/
/**
* Loader class
*/
require_once CLASS_DIR . '/blackcat/system/class.Loade... | true |
a956db87eb4fad41af169727cd05f715cbb57d47 | PHP | anbucipl0521/mis | /app/Http/Controllers/ChildcategoryController.php | UTF-8 | 4,144 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\CreateChildcategoryRequest;
use App\Http\Requests\UpdateChildcategoryRequest;
use App\Repositories\ChildcategoryRepository;
use App\Http\Controllers\AppBaseController;
use Illuminate\Http\Request;
use Flash;
use Response;
use App\Models\Parentcategory;
clas... | true |
35bea201077379f8bff5246b12d7da8ca4bad053 | PHP | moomot/cms | /application/models/model_admin.php | UTF-8 | 1,931 | 2.828125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: kiko
* Date: 1/12/16
* Time: 6:33 PM
*/
class Model_Admin extends Model
{
/**
* Save site settings to table "settings"
* @param $data
* @throws CustomException
*/
function save_settings($data)
{
try {
$sql = "UPDATE setti... | true |
55170de1e804393ac56dae4ade6d4f68d3632bad | PHP | BethanyWorld/KoofaDesign | /content/wp-content/plugins/iphorm-form-builder/includes/iPhorm/Element/Multi.php | UTF-8 | 2,594 | 3.0625 | 3 | [
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"GPL-2.0-or-later",
"Apache-2.0"
] | permissive | <?php
/**
* iPhorm_Element_Multi
*
* Abstract class representing elements with options (select, radio and checkbox)
*
* @package iPhorm
* @subpackage Element
* @copyright Copyright (c) 2009-2011 ThemeCatcher (http://www.themecatcher.net)
*/
abstract class iPhorm_Element_Multi extends iPhorm_Element
{
/**
... | true |
f90b3db8f548b086aa95f6451b3d8a92b45ace67 | PHP | codemistake/nightclub | /src/app/Module/Nightclub/Vo/BodyAction/HandVo.php | UTF-8 | 3,053 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Module\Nightclub\Vo\BodyAction;
use SimpleDto\SimpleDto;
/**
* Class HandVo
* @package App\Module\Nightclub\Vo\BodyAction
*/
class HandVo extends SimpleDto
{
private const LEFT_HAND_DEFAULT_STATE = [
' ',
'/ ',
' ',
];
private const LEFT_HAND_NEAR... | true |
f25973292b80e68db9154a3ee2b084f249215f08 | PHP | kendoctor/KndRadBundle | /Security/Voter/AbstractVoter.php | UTF-8 | 5,361 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: kendoctor
* Date: 15/11/7
* Time: 上午11:14
*/
namespace Knd\Bundle\RadBundle\Security\Voter;
use Knd\Bundle\RadBundle\DependencyInjection\ContainerIdGenerator;
use Knd\Bundle\RadBundle\Security\OwnerInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenI... | true |
888292fa81d9c25832a1b0bea4678e6c87a261a4 | PHP | Im1nvisible/learn_php | /lesson 15.php | UTF-8 | 1,907 | 3.265625 | 3 | [] | no_license | <?php error_reporting(-1);
header('Content-Type: text/html; charset=utf-8');
/*
http://php.net/manual/ru/ref.strings.php
http://php.net/manual/ru/ref.mbstring.php
mixed str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] )
mixed str_ireplace ( mixed $search , mixed $replace , mixed $subje... | true |
bf7ce7d83dc8ccea6a835253ba9c9eee8245d988 | PHP | ekreative/apps-server | /src/Form/Model/BuildSearchForm.php | UTF-8 | 361 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Form\Model;
class BuildSearchForm
{
/**
* @var string
*/
private $type;
/**
* @return string|null
*/
public function getType()
{
return $this->type;
}
/**
* @param string|null $type
*/
public function setType(?string $type)
... | true |
60da8dca810e6065da638adde98546c6cbf72524 | PHP | beleneglorion/Typo3Installer | /src/TypoInstaller/Typo3Manager.php | UTF-8 | 1,499 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace TypoInstaller;
class Typo3Manager {
protected $data;
protected $branches = array();
public function __construct(){
$this->data = json_decode(file_get_contents('http://get.typo3.org/json'));
}
public function getBranche... | true |
11e338afc5e34d22d6517939c35d9ab94c72fbc3 | PHP | darkalchemy/slim-vue-app | /dev/Helpers/TwigExtensions/CsrfExtension.php | UTF-8 | 673 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers\TwigExtensions;
use Slim\Views\Twig;
use Twig_Extension;
use Twig_SimpleFunction;
class CsrfExtension extends Twig_Extension {
protected $view;
public function __construct(Twig $view){
$this->view = $view;
}
public function getFunctions()
{
return [
... | true |
15b49e7fab1e013665fd0bf47e4d4b7ef6e4fdc1 | PHP | fazland/api-platform-bundle | /src/Decoder/Exception/InvalidJSONException.php | UTF-8 | 530 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Fazland\ApiPlatformBundle\Decoder\Exception;
class InvalidJSONException extends \RuntimeException
{
private string $invalidJson;
public function __construct(string $invalidJson, string $error)
{
parent::__construct("Cannot decode JSON: $error");
$... | true |
55270658ec88a96a8f776923eb6b91b322876518 | PHP | alexr007/php2016ideas | /models/_nu/UserTags.php | UTF-8 | 1,942 | 2.71875 | 3 | [] | no_license | <?php
class UserTags extends Tag {
public static function tagsCount($id = null)
{
$user_id = $id ? $id : Yii::app()->user->id;
$count = (int)self::model()->dbConnection->createCommand()
->select('COUNT(*)')
->from('tags')
->where('tg_user = :user',
[':user'=>$... | true |
3361afa6a40f51ec4f0ce196c0d3c7e7c9b3f04c | PHP | davenate90/CarRental-API | /src/Testing/testToken.php | UTF-8 | 1,753 | 2.8125 | 3 | [] | no_license | <?php
namespace Scholarship\Testing;
use Scholarship\Controllers\TokensController;
use Scholarship\Models\Token;
use Scholarship\Http\Methods;
use Scholarship\Utilities\Testing;
use \PHPUnit\Framework\TestCase;
class TokenTest extends TestCase {
public function testPostAsStudent()
{
$token = $this->... | true |
6a2ad08bd89b5fc375c1db6d0e8abe89bffd3574 | PHP | Rammslise/Exercices-PHP-partie-6 | /Exercice2/index.php | UTF-8 | 699 | 3.328125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8" />
<title>Les paramètres d'URL, exercice 2</title>
</head>
<!-- Faire une page index.php. Tester sur cette page que le paramètre age existe,
et si c'est le cas l'afficher sinon le signaler : index.php?lastname=Nemar... | true |
23cc0901b36f697a114e6c74e96999b1fdcd3b02 | PHP | bertchen2015/php-form-test | /form.php | UTF-8 | 261 | 2.53125 | 3 | [] | no_license | <?php
if(isset($_GET["FirstName"])){//show data
echo $_GET["FistName"];
}else{//show form
echo
'
<form>
<form action = "">
<p>First Name <input type = "text" name = "FirstName /></p>
<p><input type = "submit" /></p>
</form>
';
}
?>
| true |
fea633eecfeb890747b43beac7f5ff54eb596b6d | PHP | oismail95/CRUD-University-Web-App | /updateData.php | UTF-8 | 3,426 | 2.890625 | 3 | [] | no_license | <?php
$dbhost = "localhost";
$dbuser = "root";
$dbpassword = "";
$dbname = "university";
$conn = mysqli_connect($dbhost, $dbuser, $dbpassword, $dbname);
if (!$conn) {
die('Could not connect: ' . mysqli_connect_error());
}
//Here is where the table number is retrieved.
$mn = $_POST['pass_table'];
//He... | true |
ac5098620b8f21692e63fb8763573a8a57dd0097 | PHP | ghaninia/Lora | /app/Rules/UserNameRule.php | UTF-8 | 363 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
class UserNameRule implements Rule
{
public function __construct()
{
}
public function passes($attribute, $value)
{
return preg_match('/^[A-Za-z0-9_]+$/', $value) ;
}
public function message()
{
re... | true |
62db447df5edac55e111e03baa6c68c230aeaa9d | PHP | Stolz/php-stubs | /res/php/lzf/functions/lzf-decompress.php | UTF-8 | 193 | 2.53125 | 3 | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | <?php
/**
* LZF decompression
*
* @phpstub
*
* @param string $data
*
* @return string Returns the decompressed data or false if an error occurred.
*/
function lzf_decompress($data)
{
} | true |
52a4a2451e512c765e905c1e056779bc26264ff8 | PHP | Thibault-Renouat/devLearning-php-PDO | /server/TPs/register/dashboard.php | UTF-8 | 1,378 | 2.765625 | 3 | [] | no_license | <?php
//phpinfo();
echo '<pre>';
var_dump($_POST);
echo '</pre><br>';
echo '<pre>';
var_dump($_FILES);
echo '</pre>';
/*error_reporting(E_ALL); // or E_STRICT
ini_set("display_errors",1);*/
// Testons si le fichier a bien été envoyé et s'il n'y a pas d'erreur
if (isset($_FILES['myAvatar']) and $_FILES['myAvatar']['... | true |
78c14f421e3fbd54b5f216bb5a369fc23d09d467 | PHP | mikailmiko/ares-habbo-backend | /app/database/migrations/20201116215041_ares_forum_threads.php | UTF-8 | 892 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
/**
* Class AresForumThreads
*/
final class AresForumThreads extends AbstractMigration
{
public function change(): void
{
$table = $this->table('ares_forum_threads');
$table->addColumn('topic_id', 'integer', ['limit' => 11... | true |
39dfdb1896a6fb5f5d7316405331d3a6e34a0ac4 | PHP | de1vin/RouteCalculator | /src/GeocoderInterface.php | UTF-8 | 287 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace de1vin\RouteCalculator;
use de1vin\RouteCalculator\Coordinates\Coordinate;
interface GeocoderInterface
{
/**
* @param string $address
* @return Coordinate
*/
public function coordinate(string $address): Coordinate;
}
| true |
3fd880907f76b274b6b6dcbb35f6e64f1eb811c1 | PHP | RikhartBekkevold/VuEditor | /server/saveForm.php | UTF-8 | 1,659 | 2.71875 | 3 | [] | no_license |
<?php
// header("Access-Control-Allow-Origin: *");
// // "Access-Control-Allow-Origin" : "*",
// header("Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS");
// header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
// echo 'da';
// $data = json_... | true |
2597783fb9da0863b437928ef29119d29cc70283 | PHP | datto/phpunit-entropy | /tests/Entropy/BaseListenerTest.php | UTF-8 | 10,069 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Datto\PHPUnit\Entropy\Tests;
use \PHPUnit\Framework\TestCase as TestCase;
use \Datto\PHPUnit\Entropy\BaseListener as Listener;
/**
* @coversDefaultClass \Datto\PHPUnit\Entropy\BaseListener
*/
class BaseListenerTest extends TestCase
{
/**
* @covers ::hasErrored
* @covers ::setHasError... | true |
793fd87b0a3966d2399ba84b0f919155dac45946 | PHP | roeltz/pipa-base | /src/Pipa/Registry/Entry.php | UTF-8 | 1,512 | 3.15625 | 3 | [] | no_license | <?php
namespace Pipa\Registry;
use LogicException;
class Entry {
const FLAG_CONSTRUCTOR = 1;
const FLAG_SINGLETON = 2;
const FLAG_COLLECTION = 4;
const FLAG_LOCKED = 8;
protected $flags;
protected $initialized = false;
protected $singleton;
protected $value;
function __construct($value = null, $flags =... | true |
42a84f85fed5ad1adc1eda05a0ca4d648d34cb6f | PHP | trojen/calendar | /index.php | UTF-8 | 3,402 | 2.6875 | 3 | [] | no_license | <?php
include_once 'config/config.php';
include 'core/calendar.php';
require 'files/dialog.php';
$dateComponents = getdate();
$monthName = $dateComponents['month'];
$dateArray = $dateComponents['mday'];
$currYear = $dateComponents['year'];
//For all Months in Specific Year
$calenda = new Cal... | true |
950be8487ab91c00fc8506b344e9c4e3a3bbd1c5 | PHP | BIMSYS/BIMSYS-V1 | /app/Http/Controllers/UserController.php | UTF-8 | 12,586 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\User;
use App\Models\Student;
use App\Models\Teacher;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Hash;
class UserController extends Controller
{
public function profile_index()
... | true |
ec81b39f92d01c349fa9d25a5ff8b42c142785f9 | PHP | eterv/arakny | /app/Libraries/Error.php | UTF-8 | 1,523 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php namespace Arakny\Libraries;
/**
* Error Library Class
* 오류 관련 라이브러리 클래스
*
* @author Lucas Choi <eterv@naver.com>
* @link http://arakny.com
* @package Arakny
*/
class Error
{
protected $errors = [];
protected $lastErrorMessage = '';
protected $lastErrorData = [];
public function _... | true |
9845901f0b1534a1460b922bc700f839ca7ec18a | PHP | tanvirhossain33/MikOShop | /app/Http/Controllers/CartController.php | UTF-8 | 1,051 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Product;
use Cart;
class CartController extends Controller
{
public function index(Request $request){
$productId = $request->productId;
$productById = Product::find($productId);
Cart::add([
'id' => $pro... | true |
602b58e54a608c10356b1822a3079c3aab9e469b | PHP | kawaikiwii/test | /backoffice/api/toolbox/wcm.XML.php | UTF-8 | 7,628 | 3.125 | 3 | [] | no_license | <?php
/**
* Project: WCM
* File: wcm.XML.php
*
* @copyright (c)2008 Nstein Technologies
* @version 4.x
*
*/
/**
* This class provides static static function to facilitate
* XML, XSL and XPATH manipulation
*/
class wcmXML
{
/**
* Encode a string to be xml compliant ()replace <, >, '... | true |
21a6169c357799cfcf26cbb688080466daf3631e | PHP | eaides/api-rest-laravel | /app/Http/Controllers/Section/SectionController.php | UTF-8 | 3,098 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Section;
use App\Http\Controllers\ApiController;
use App\Transformers\SectionTransformer;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use App\Section;
class SectionController extends ApiController
{
public function __construct()
{
$this->... | true |
22ed3329f7797c46740d8671e88b20cd721314b2 | PHP | markmontymark/patterns | /php/src/Creational/AbstractFactory/HonoluluConcreteSoupFactory.php | UTF-8 | 426 | 2.921875 | 3 | [] | no_license | <?
#//HonoluluConcreteSoupFactory.java - One of Two concrete factories extending the abstract factory
require_once 'AbstractSoupFactory.php';
class HonoluluConcreteSoupFactory extends AbstractSoupFactory
{
function __construct()
{
$this->factoryLocation = "Honolulu";
}
function makeClamChowder()
{
retur... | true |
d515bbf106d8b610221ffca38b6354f1826b621c | PHP | sirlollodod/projectumsg | /UMessagePHP/classes/User.php | UTF-8 | 959 | 2.859375 | 3 | [] | no_license | <?php
class User{
private $prefix, $num, $email, $sessid, $gcmid;
function __construct($prefix, $num, $email, $sessid, $gcmid){
$this->prefix = $prefix;
$this->num = $num;
$this->email = $email;
$this->sessid = $sessid;
$this->gcmid = $gcmid;
}
public function getPrefix()
{
re... | true |
5dc66d58973a76c720c6b76be2cbbe229b5b6fab | PHP | IcaroRib/AlepeDigital | /alepedigital/v3/projeto/scripts/followProject.php | UTF-8 | 935 | 2.625 | 3 | [] | no_license | <?php
include_once("../../common/tools/_tools.php");
$retorno = array();
$retorno["success"] = false;
$retorno["type"] = "0";
$retorno["message"] = "";
if (!empty($_POST)) {
// if (user_logged()) {
$id_projeto = $_POST["id"]; // id da postagem
$type = $_POST["type"];
// $id_usuario = $_SESSION["user_i... | true |
bbb92e063e4219be8acb6f9f9dfe4e3dda00a47e | PHP | HazeForum/hCMS | /application/Cryptography/Decrypt.php | UTF-8 | 863 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Cryptography;
class Decrypt
{
private const DATA = CONFIG_GLOBAL['Cryptography'];
public $cipher;
private $method = 'aes-256-cbc';
public function aes($cipher = '')
{
if (empty($cipher))
$cipher = $this->cipher;
$mix = base64_decode($cipher);
... | true |
8906828226bb515d933118dcb4936753ba53bb56 | PHP | guxiangming/phpDataStructure | /stack.php | UTF-8 | 772 | 3.40625 | 3 | [] | no_license | <?php
// 简单的顺序栈
class stack{
private $_stack=[];
private $_size=0;
public function __construct($size=10)
{
$this->_size=$size;
}
public function pop(){
if(count($this->_stack)==0){
return false;
}
return array_pop($this->_stack);
}
public func... | true |
06ac32a8990f23dcd0cc7eab7974049355be84dc | PHP | OurSociety/OurSociety---Free-Local-Campaign-Platform | /src/Authentication/Authenticator/FormAuthenticator.php | UTF-8 | 1,152 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace OurSociety\Authentication\Authenticator;
use Authentication\Authenticator\AuthenticatorInterface;
use Authentication\Authenticator\ResultInterface;
use Authentication\Identifier\IdentifierCollection;
use OurSociety\Authentication\Identifier\PasswordIdentifier;
use Psr\Http\Mes... | true |
469afdb12183515a6c219f610a938e2412c9c43d | PHP | barak-framework/barak | /lib/core/Application.php | UTF-8 | 1,494 | 2.625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
class Application {
private static $_configutaion = NULL;
public static $options = [
// application kernel options overwrite
// Çekirdek uygulama ayarları zaten varsayılan olarak değerleri yüklüdür.
// Eğer üzerine yazmak isteniyorsa config/application.php içerisinde set fonksiyonunda belirtilmelidi... | true |
ed33ef17e74817b7191bc933fa4d169f3ed62bbf | PHP | simphotonics/utils | /src/StringUtils.php | UTF-8 | 3,083 | 3.6875 | 4 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Simphotonics\Utils;
/**
* @author D Reschner <d.reschner@simphotonics.com>
* @copyright 2015 Simphotonics
* Description: Utility functions for string manipulation.
*/
class StringUtils
{
const OMIT_EMPTY_LINES = 0;
const KEEP_EMPTY_LINES = 1;
/**
* C... | true |
24b05a598cee02dcdddce486c45a7499f5b9fc41 | PHP | Ilesanmisamuel/Unix-Tutorial-Site | /process.php | UTF-8 | 2,406 | 2.6875 | 3 | [] | no_license | <?php
$path = './';
$page = 'Quiz';
#include $path. 'assets/inc/header.php';
require $path.'../../../dbConnect.inc';
?>
<?php session_start(); ?>
<?php ?>
<?php
$totalScore = 0;
// $username = $_SESSION['username'];
if(!isset($_SESSION['username'])){
$_SESSION['username'] = "";
... | true |