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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4ca992ce6d18777bd5d9fc959138ac575c1860f4 | PHP | inabahtrg/KalturaServerCore | /plugins/content/caption/base/lib/model/enums/CaptionPermissionName.php | UTF-8 | 523 | 2.515625 | 3 | [] | no_license | <?php
/**
* @package plugins.caption
* @subpackage model.enum
*/
class CaptionPermissionName implements IKalturaPluginEnum, PermissionName
{
const IMPORT_REMOTE_CAPTION_FOR_INDEXING = 'IMPORT_REMOTE_CAPTION_FOR_INDEXING';
public static function getAdditionalValues()
{
return array
(
'IMPORT... | true |
ec9a77c4c409152b186374ca29d5693219319e59 | PHP | ramilloremipsum/alif_test | /app/Workplaces.php | UTF-8 | 1,488 | 2.546875 | 3 | [] | no_license | <?php
namespace App;
use App\Exceptions\BoxAlreadyExistsInWorkplace;
use App\Helpers\Amate;
use App\Http\Requests\CreateBoxesInWorkplaceRequest;
use Illuminate\Database\Eloquent\Model;
class Workplaces extends Model
{
protected $table = 'workplaces';
protected $fillable = ['title', 'description'];
pub... | true |
95fec7e4e500252bdda562dea713118896816cbd | PHP | wu-wu-wu/simile-widgets | /exhibit-mediawiki-extension/trunk/includes/BibtexExport_body.php | UTF-8 | 4,580 | 2.875 | 3 | [] | no_license | <?php
class BibtexExport extends SpecialPage
{
function BibtexExport() {
SpecialPage::SpecialPage("BibtexExport");
self::loadMessages();
}
function execute( $par ) {
global $wgOut;
include("Parse_Entries.php");
#Don't want to output standard Wiki stuff, just want blank page.
... | true |
f7f16109b79ab28a5ae09436233f01aa247e736c | PHP | udayasree25/test | /lib/controllers/PlayerListController.php | UTF-8 | 844 | 2.640625 | 3 | [] | no_license | <?php
namespace KrowdByz\controllers;
use \KrowdByz\models\Category;
use \KrowdByz\models\PlayerList;
class PlayerListController {
public static function start() {
if (!isset($_GET['category'])) {
exit;
}
$id = Category::selectIDFromCategory($_GET['category']);
//PlayerList::addPlaye... | true |
38e170fb253e6800642fd9d5c3fd790301a7f335 | PHP | hhhhuy/PHP-S5-BT-trien-khai-interface-Resizeable | /index.php | UTF-8 | 1,586 | 3.171875 | 3 | [] | no_license | <?php
include_once('Circle.php');
include_once('Cylinder.php');
include_once('Rectangle.php');
include_once('Square.php');
$circle = new Circle('Circle 01', 5);
echo 'Circle area before: ' . $circle->calculateArea() . '<br />';
echo 'Circle perimeter before: ' . $circle->calculatePerimeter() . '<br />';
$circle->resize... | true |
c5ae239a0dae76b7064a390e0aad49ed63954b01 | PHP | chrisMusikoyo/vaccinekenya | /admin.vaccine.com/admin/phpdata/add-meal-item.php | UTF-8 | 1,491 | 2.6875 | 3 | [] | no_license | <?php
include('../../dbconfig.php');
//checking if the value exists or not
if(isset($_GET['menu_item_name'])||
isset($_GET['sub_menu_item_id'])||
isset($_GET['menu_category_id'])||
isset($_GET['main_menu_sub_id'])||
isset($_GET['price'])||
isset($_GET['item_description'])||
isset($_GET['branch_id'])
){
//sav... | true |
4f2fef12b7fb70b3012aa5ebdc43371b99e95579 | PHP | odeg36/inder | /src/LogicBundle/Entity/Estrategia.php | UTF-8 | 15,968 | 2.59375 | 3 | [] | no_license | <?php
namespace LogicBundle\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* Estrategia
*
* @ORM\Table(name="estrategia")
* @ORM\Entity(repositoryClass="LogicBundle\Repository\EstrategiaRepository")... | true |
e15e3ff1bdcbcf4dca5740f517c9cf5d98d28c3c | PHP | interesting-repos-store/service-container-from-scratch | /app/Facades/Facade.php | UTF-8 | 1,089 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Facades;
use App\Container\Container;
use Mockery;
use Mockery\MockInterface;
abstract class Facade
{
protected static array $resolvedInstance;
abstract protected static function getFacadeAccessor();
public static function __callStatic($method, $args)
{
$name = static::g... | true |
f27a82f83db606c1826a728cb9e148865b6d2532 | PHP | marcelandmarcel/master-mandm | /database/migrations/2017_03_26_000000_create_wines_table.php | UTF-8 | 1,420 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWinesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::dropIfExists('wines');
... | true |
b1ff99efd529c9e7903aa629d6489023aa331e9e | PHP | lvinkim/mongo-odm | /tests/App/Entity/IsEntity.php | UTF-8 | 1,704 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: lvinkim
* Date: 2018/7/25
* Time: 4:36 PM
*/
namespace Lvinkim\MongoODM\Tests\App\Entity;
use Lvinkim\MongoODM\Annotations as ODM;
use MongoDB\BSON\ObjectId;
/**
* Class IsEntity
* @package Lvinkim\MongoODM\Tests\App\Entity
* @ODM\Entity
*/
class IsEntity
{
cons... | true |
122b0798930dd3e21a299f9ecf3e86022c995b74 | PHP | Matias-Bernal/gardien-web | /controles/ControlUsuario.php | UTF-8 | 505 | 2.90625 | 3 | [] | no_license | <?php
require_once ("ManipuladorPersistencia.php");
require_once ("persistencia/Usuario.php");
class ControlUsuario {
public function obtenerUsuarioPorId($id){
$mp=new ManipuladorPersistencia();
$result = $mp->obtenerObjetosPorFiltro("USUARIO","ID='".$id."'");
$obj=null;
if($result !== FALSE) {
... | true |
d9c2f4827ae443d3dd3ec0fb9a8dcfd70187a074 | PHP | abogado93/biblioteca | /proyecto/application/model/Pago.php | UTF-8 | 627 | 2.5625 | 3 | [] | no_license | <?php
class Pago{
public $id;
public $pago_fecha;
public $pago_multa;
public $pago_monto;
public $pago_prestamo_id;
public $pago_estado;
public function getId() {
return $this->id;
}
public function getPago_fecha() {
return $this->pago_fecha;
}
public function get... | true |
1da7f862afb9774940a497a9731e49627613a760 | PHP | my127/workspace | /src/Types/Confd/Confd.php | UTF-8 | 1,799 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace my127\Workspace\Types\Confd;
use my127\Workspace\Expression\Expression;
use my127\Workspace\Path\Path;
use my127\Workspace\Twig\Loader\Filesystem;
class Confd
{
/**
* @var Definition
*/
private $definition;
/**
* @var \Twig_Environment
*/
private $twig;
/**
... | true |
1915dd7833aa510315b90ae6523656838f81651a | PHP | Pikachoo/metrics | /src/metrics/myers.php | UTF-8 | 8,206 | 2.71875 | 3 | [] | no_license | <?
namespace rude;
require_once (getcwd() . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'etc' . DIRECTORY_SEPARATOR . 'lexer.php');
class myers
{
private $file_data;
private $file_count;
private $lexer;
private $ZG; // число уникальных операторов программы, включая символы-разделители, имена процедур ... | true |
10b9c08430d3368bc0408584b80096ae785a24f6 | PHP | Shofiul-Alam/magento-app | /src/vendor/magento/framework/Image/AdapterFactory.php | UTF-8 | 2,117 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"AFL-2.1",
"AFL-3.0",
"OSL-3.0",
"MIT"
] | permissive | <?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\Image;
class AdapterFactory
{
/**
* @var Adapter\ConfigInterface
*/
protected $config;
/**
* @var \Magento\Framework\ObjectManagerInterface
*/
protect... | true |
0d138994cfd736197a082c478ec70ae250290087 | PHP | alexkruts2/zhongyi | /app/Exceptions/NotFoundException.php | UTF-8 | 468 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Exceptions;
use Exception;
class NotFoundException extends Exception
{
public $response;
public $message;
public function __construct($response, $code = 404)
{
$this->response = $response;
$this->message = $response;
$this->code = $code;
}
publi... | true |
3f2477d6a21c221f0d07d723a3432dac1e7b9ec6 | PHP | emi-soft/emi | /base/Module.php | UTF-8 | 718 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by Maksim Skliarov.
* Project: emi-cms
* Company: Emi-Soft <emi.softdeveloper@gmail.com>
* Date: 03/09/2018
*/
namespace emi\base;
use yii\base\InvalidConfigException;
/**
* Class Module
* @package emi\base
*/
abstract class Module extends \yii\base\Module
{
/**
* @var
*/
... | true |
91fd348cf9cc3d07cdb3988a3fb526b329cf5a56 | PHP | PersonalizedTravelMonitor/Application | /app/ExternalAPIs/TrenordAPI.php | UTF-8 | 2,048 | 2.515625 | 3 | [] | no_license | <?php
namespace App\ExternalAPIs;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
use Carbon\Carbon;
use Exception;
class TrenordAPI
{
const BASE_URL='https://baas.trenord.it';
public static function search($from, $to,Carbon $date)
{
$url = self::BASE_URL . '/hafas';
$c... | true |
88d967bca738f7a7ebd08dde67e68486a7747514 | PHP | oliraug/marketify | /tests/Feature/CategoryUnitTest.php | UTF-8 | 6,098 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Feature;
use Tests\TestCase;
use App\Category;
use App\Olify\Marketify\Repositories\CarouselRepository;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Te... | true |
dbdb87d90b6a5a2ccf69ce80465c14af805f7f1b | PHP | guoyu07/service-demo-account | /app/support/common.php | UTF-8 | 1,297 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
// +----------------------------------------------------------------------
// | common.php [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016-2017 limingxinleo All rights reserved.
// +--------------------------------------------------... | true |
1cfc443acd9a27f30ddcc04cba0da42bbb5c2952 | PHP | Netien/ProjetSymfony | /src/PW/MainBundle/DataFixtures/ORM/LoadGroup.php | UTF-8 | 836 | 2.546875 | 3 | [] | no_license | <?php
namespace PW\MainBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use PW\MainBundle\Entity\Groupe;
class LoadGroup implements FixtureInterface
{
public function load(ObjectManager $manager)
{
// Liste des titres à ajouter
... | true |
3197dfcc18967a4dea2f3b8e25e59025c553783d | PHP | xiaonibakeji/manaphp | /ManaPHP/Task.php | UTF-8 | 637 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace ManaPHP;
use ManaPHP\Logger\LogCategorizable;
/**
* Class ManaPHP\Task
*
* @package task
*/
abstract class Task extends Component implements TaskInterface, LogCategorizable
{
public function categorizeLog()
{
return basename(str_replace('\\', '.', static::class), 'Task');
}
... | true |
6cc20bf41413f348f38039d28ccfb53b605f5990 | PHP | abdullahalnahhal/edu | /app/Http/Requests/UnitsRequest.php | UTF-8 | 2,146 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class UnitsRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the ... | true |
3f805b1558321a0abf8873e545140f15dc0cd440 | PHP | AleksandrMishchaniuk/ads-app-laravel | /app/Repositories/Interfaces/UserRepositoryInterface.php | UTF-8 | 660 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Interfaces;
use App\Entities\Interfaces\UserEntityInterface;
/**
*
*/
interface UserRepositoryInterface
{
/**
* @param string $username
*
* @return UserEntityInterface|null
*/
public function getByUsername($username);
/**
* @param int $id
... | true |
4b7b5bfbbcfbeed81f2cff724881f1b4e9ceb56b | PHP | chan201/Tutor_Dashboard | /app/Listeners/Student/StudentIsActivated.php | UTF-8 | 644 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Aham\Listeners\Student;
use Aham\Events\Student\Activated;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
class StudentIsActivated implements ShouldQueue
{
use InteractsWithQueue;
/**
* Create the event listener.
*
* @return void
*/
... | true |
4db83f50ee69834d85a4deee6c8aed6cda7baf20 | PHP | RobGriggs/ReadySetJet-2x | /php/front_end/ViewFilter.php | UTF-8 | 1,528 | 3.140625 | 3 | [] | no_license | <?php
/**
* Holds Viewfilter Class
*/
/**
* Checks view request against whitelist containted in local variable
*/
class ViewFilter
{
/** @var array List of key values, a valid request string as the key from the front end and the respective view classname as the value */
private $whitelist = array( 'budget... | true |
a3c38e0024a847fe0d3fb31b7140fe6f83f5de81 | PHP | harmonyrichman/portfolio | /contact-form/contact.php | UTF-8 | 5,842 | 2.84375 | 3 | [] | no_license | <?php
/*
* CONFIGURE EVERYTHING HERE
*/
// an email address that will be in the From field of the email.
$from = 'inquiries@harmonyrichman.com';
// an email address that will receive the email with the output of the form
$sendTo = 'hmrichman@gmail.com';
// subject of the email
$subject = 'New message from contact... | true |
ae24c4fff1aef5338b1a22254f4438ca6b2a9289 | PHP | josephjlee/laravel-crud-simple | /database/seeds/NewsTableSeeder.php | UTF-8 | 692 | 2.671875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class NewsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Faker\Factory::create();
// add 10 rows of random data
for ($i=0; $i < 10; $i++) {
DB::table('news')->insert(... | true |
c4d937df0bed320a5ee8d723fb824c98fa41e8ea | PHP | eaglexpf/HttpServer | /Autoload.php | UTF-8 | 749 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: roc
* Date: 2017/3/25
* Time: 16:02
*/
namespace HttpServer;
class Autoload{
public static function loadByNamespace($name){
$class_path = str_replace('\\', DIRECTORY_SEPARATOR, $name);
if (empty($class_file) || !is_file($class_file)) {
$c... | true |
19cab9f265957812db853fe48f269482e608c2cf | PHP | Smatix/pai_backend | /tests/User/Application/Command/RegisterUserHandlerTest.php | UTF-8 | 837 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Tests\User\Application\Command;
use App\User\Application\Command\RegisterUserCommand;
use App\User\Application\Command\RegisterUserHandler;
use App\User\Infrastructure\InMemoryUserStoreRepository;
use PHPUnit\Framework\TestCase;
class RegisterUserHandlerTest extends TestCase
{
public function... | true |
f1856ba686f261ce58a42cabab4a983072649c9e | PHP | Tajulislamcse/Problem_Solving | /Self_Practice/Codeforces/C_InSearchOfEasyProblem.php | UTF-8 | 223 | 3.296875 | 3 | [] | no_license | <?php
fscanf(STDIN,"%d",$n);
$line=trim(fgets(STDIN));
$singleValue=explode(" ", $line);
$count=0;
for($i=0;$i<$n;$i++)
{
if($singleValue[$i]==1)
{
echo "HARD";
$count=1;
break;
}
}
if($count==0)
echo "EASY";
| true |
72f5e9a5e4e90ee43d22ce88b780b3c00b110d5f | PHP | rahmatcmos/ideaconnect | /protected/modules/funding/models/FundingAccount.php | UTF-8 | 5,195 | 2.59375 | 3 | [] | no_license | <?php
/**
* This is the model class for table "ic_funding_account".
*
* The followings are the available columns in table 'ic_funding_account':
* @property integer $id
* @property integer $bank_id
* @property string $account_number
* @property string $owner_name_alias
*
* The followings are the available mode... | true |
f6705379ffefaa90faf11527bf681714f92204d7 | PHP | crapougnax/t41 | /library/t41/Backend/Adapter/CsvAdapter.php | UTF-8 | 7,245 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace t41\Backend\Adapter;
/**
* t41 Toolkit
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.t41.org/license/new-bsd
* If you did not receive a... | true |
59f487a03235d89af3eb9b10499d1e3367742466 | PHP | gewaer/gewaer-api-remove | /library/Models/LeadsOwner.php | UTF-8 | 1,474 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Gewaer\Models;
class LeadsOwner extends BaseLocalModel
{
/**
*
* @var integer
* @Primary
* @Identity
* @Column(type="integer", length=11, nullable=false)
*/
public $id;
/**
*
* @var string
* @Column(type="string", length=45, nullable=false)
... | true |
574737e6b4b1cbc0e1a541e11c030774189815d3 | PHP | alex-kimmm/testrepo1 | /webroot/Modules/Insurancepages/Repositories/EloquentInsurancepage.php | UTF-8 | 1,522 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace TypiCMS\Modules\Insurancepages\Repositories;
use Illuminate\Database\Eloquent\Model;
use TypiCMS\Modules\Core\Repositories\RepositoriesAbstract;
class EloquentInsurancepage extends RepositoriesAbstract implements InsurancepageInterface {
public function __construct(Model $model) {
$this-... | true |
f744860d6497c7d4036cde3de5776df94c72bf02 | PHP | desarrollosamr/turismo | /hoteles/model/tbhotelClienteData.php | UTF-8 | 6,381 | 2.640625 | 3 | [] | no_license | <?php
include_once('d:\xampp_new\htdocs\turismo\hoteles\controller\Database.php');
include_once('d:\xampp_new\htdocs\turismo\hoteles\controller\Executor.php');
class tbhotelClienteData
{
public static $tablename='tbhotelCliente';
public function tbhotelClienteData()
{
$this->idnitHotel=0;
$this... | true |
f50f7ad7e8fd2ddf73e201573e7aa04feccbeafb | PHP | marfino3028/xpro | /app/Models/Product.php | UTF-8 | 2,974 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use DB;
use Carbon\Carbon;
class Product extends Model
{
protected $table = 'x_product_service';
protected $fillable = [
'name',
'description',
'stock',
'price',
'status',
];
public function ... | true |
cbd2f5f9fe6029978d19e249184613c9e3844442 | PHP | rickkosse/Tunebase-website | /users/delete_users.php | UTF-8 | 4,586 | 2.609375 | 3 | [] | no_license | <?php
if ($_SERVER["REQUEST_METHOD"] != "POST") {
echo "HTTP/1.0 405 Method Not Allowed <br />";
echo "Allow: POST";
die();
}
require_once('../config.inc.php');
$user_id = $_POST['user_id'];
//delete user's likes first
$stmtdeletelikes = $dbh->prepare(" DE... | true |
9a95341a8b5724a0f6e29de4874f400a044f40de | PHP | AbstractEverything/cart | /src/Cart/CartManager.php | UTF-8 | 5,458 | 3.09375 | 3 | [] | no_license | <?php
namespace AbstractEverything\Cart;
use Illuminate\Session\SessionManager;
use Illuminate\Support\Collection;
use Illuminate\Config\Repository as Config;
class CartManager
{
/**
* @var Illuminate\Session\SessionManager
*/
protected $session;
/**
* @var Illuminate\Config\Repository
... | true |
f7864a6c649682906f8895c957a7d4eae54b20d3 | PHP | tu801/ci4-comments | /Database/Migrations/2020-07-12-103047_create_comments_table.php | UTF-8 | 2,738 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php namespace Modules\Comments\Database\Migrations;
use CodeIgniter\Database\Migration;
class CreateCommentsTable extends Migration
{
public function up()
{
/*
* Create Comments Table
*/
$this->forge->addField([
'id' => ['type' => 'int', 'constraint' => ... | true |
1da6d27a1e68070765c38e5e232a84a8347924fc | PHP | rajithv/OS2 | /module/Album/src/Album/Model/BusinessTable.php | UTF-8 | 2,691 | 2.578125 | 3 | [] | no_license | <?php
namespace Album\Model;
use Zend\Db\TableGateway\TableGateway;
use Zend\Validator\Db\RecordExists;
use Zend\Db\TableGateway\AbstractTableGateway;
use Zend\Db\Adapter\Adapter;
use Zend\Db\ResultSet\ResultSet;
use Zend\Db\Sql\Sql;
use Zend\Db\Sql\Expression;
class BusinessTable
{
protected $tableGateway;
... | true |
3f01eb22eeaccf12fad81c5510139a6bf217090b | PHP | yunjinwoo/jinwoo | /cafe24/mybook/vitamin/chapter19.php | UTF-8 | 2,286 | 2.96875 | 3 | [] | no_license | <?php
function getVar()
{
return array(15,11,1,3,8,5,7,16,2) ;
//return array(95,75,85,100,50) ;
}
?>
<style type="text/css">
#log td{ vertical-align: top;}
</style>
<h3>20.<?php echo getSubTitle() ; ?> : 규칙성을 만들어주는 정렬</h3>
<div style="float:left;width:700px;">
<div style="float:right;width:680px;">
<ul>
<li>... | true |
60640a49c21bdf0991b2d65cc16a637d55ad593b | PHP | MrFigoro/userTestLaravel | /app/Console/Commands/UserDelCommand.php | UTF-8 | 1,276 | 2.75 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use App\User;
use GuzzleHttp\Client;
use Illuminate\Console\Command;
class UserDelCommand extends UserCommand
{
/**
* The name and signature of the console command.
*
* @var string
*/
// protected $signature = 'user:del {id}';
protected $signature = '... | true |
e0675dcf1c55d6c20b4b3be9b60643fc7f0caa26 | PHP | CTUAppStore/AppStore | /app/UserModule/presenters/AuthorsCatalogPresenter.php | UTF-8 | 850 | 2.625 | 3 | [] | no_license | <?php
namespace UserModule;
/**
* AuthorsCatalog Presenter.
*/
class AuthorsCatalogPresenter extends SignedPresenter
{
private $m_AuthorsList;
/** @brief Start presenteru
@return void
*/
protected function startup()
{
parent::startup();
$this -> repository = $this -> context -> applicationReposito... | true |
3afd46afc6ae6ad2bc61cc70f2eba4f8adbd078f | PHP | igorw/lambda-php | /src/parser.php | UTF-8 | 1,771 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
// lambda calculus parser
//
// based on the grammar from:
// http://zeroturnaround.com/rebellabs/parsing-lambda-calculus-in-scala/
namespace igorw\lambda;
use Dissect\Lexer\SimpleLexer;
use Dissect\Parser\Grammar;
use Dissect\Parser\LALR1\Parser;
class LambdaLexer extends SimpleLexer
{
public function __... | true |
04199cc33061d6875da43bfcacde20f8b349d1ef | PHP | ashishkpoudel/read-with-the-author | /src/LeanpubBookClub/Domain/Model/Session/SessionWasCancelled.php | UTF-8 | 346 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace LeanpubBookClub\Domain\Model\Session;
final class SessionWasCancelled
{
private SessionId $sessionId;
public function __construct(SessionId $sessionId)
{
$this->sessionId = $sessionId;
}
public function sessionId(): SessionId
{
return ... | true |
76b069aaba4e6efc70a0d3d0e600f1955c8d9894 | PHP | kamelaBessas20/Php-Exos | /Exo5/exo5.php | UTF-8 | 3,657 | 3.359375 | 3 | [] | no_license | #!C:\xampp\php\php.exe
<?php
/**
* Retourne la factorielle d'un entier naturel
* @param int $n Un entier dont on veut calculer la factorielle
* @return int
* @see https://fr.wikipedia.org/wiki/Factorielle
*/
function factorielle($n) : float
{
return ($n === 0) ? 1 : $n*factorielle($n-1);
}
/**
* Retourne la dis... | true |
86f80dbc37b836695018591a812924431ba87769 | PHP | chemisus/shoestring | /test/Shoestring/BasicRouterTest.php | UTF-8 | 2,247 | 2.515625 | 3 | [] | no_license | <?php
namespace Shoestring;
/**
* Generated by PHPUnit_SkeletonGenerator 1.2.0 on 2013-03-16 at 13:48:44.
*/
class BasicRouterTest extends \PHPUnit_Framework_TestCase
{
/**
* @var BasicRouter
*/
protected $object;
protected $route;
protected $routes;
protected $otherwise;
protecte... | true |
c0766569c7fcd6f240f5bbd4e3dfec46dc7ff01b | PHP | kimryan0416/Full-Function-Music-Player-DISCON- | /functions/retrieveSongInfo.php | UTF-8 | 1,512 | 2.671875 | 3 | [] | no_license | <?php
require("config.php");
$mysqli = new mysqli( DB_HOST, DB_USER, DB_PASSWORD, DB_NAME );
$dataToSend = array(
"Success" => false,
"Error" => "No request sent"
);
if (isset($_POST["id"])) {
$query = "SELECT * FROM Music WHERE music_id=".$_POST["id"];
if (!$result = $mysqli->query($query)) {
$dataToS... | true |
5e0436a6bf7f7066b5481cc8dfd31bc5f9fc4ed3 | PHP | Markvandersteen/SEFLAB | /app/Seflab/Repository/Queue/QueueRepository.php | UTF-8 | 721 | 2.75 | 3 | [] | no_license | <?php namespace Seflab\Repository\Queue;
use Seflab\Repository\BaseRepository;
/**
* Class QueueRepository
* @package Seflab\Repository\Queue
*/
abstract class QueueRepository implements BaseRepository
{
const STATUS_ERROR = 0;
const STATUS_PENDING = 1;
const STATUS_RETRIEVED = 2;
const S... | true |
a30b855549b8c6574286348f7e1a4e21c5b45b31 | PHP | phfoxer/php-test | /exercicio1/index.php | UTF-8 | 672 | 3.515625 | 4 | [] | no_license | <?php
/**
* Crie um script PHP que mostra o nome do país e sua capital usando uma array chamada $location.
* Ordene a Lista pelo nome da capital e adicione pelo menos 5 entradas no array.
*/
$location = [
['pais' => 'Russia', 'capital' => 'Moscow'],
['pais' => 'Espanha', 'capital' => 'Madrid'],
['p... | true |
ea754e72feda9c09a13c7fabe24e00192c9c8ba6 | PHP | faryar76/framework | /src/Base/Routing/Middleware.php | UTF-8 | 2,963 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Base\Routing;
class Middleware
{
/**
* The current index in the queue.
*
* @var int
*/
protected $index;
/**
* The middleware queue to run
*
* @var \Base\Routing\MiddlewareQueue
*/
protected $middleware;
/**
* Store all the Middlewar... | true |
c9b8e3b3760733176db84cfb80c63c97e39a57d4 | PHP | Hyfos2/eps-system | /app/Http/Controllers/Auth/RegisterController.php | UTF-8 | 2,598 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
use Auth;
class RegisterController extends Controller
{
use RegistersUsers;
// public function __construct()
// {
// ... | true |
16b6d3b107c1240588c03516314b5454e5d6b49b | PHP | HughbertD/forest-pay | /app/src/Services/Validation/Withdrawal.php | UTF-8 | 898 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace ForestPay\Services\Validation;
class Withdrawal extends BaseValidator
{
protected $rules = [
'amount' => 'required|numeric|min:10',
'wallet_id' => 'required|exists:wallets,id',
'user_id' => 'required|exists:users,id'
];
protected $customErrorMessages = [
'w... | true |
57eb7e9de4006de6b1741ffef322ff7a604579d4 | PHP | Ziolang/cs313 | /web/week03.php | UTF-8 | 677 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
</head>
<body>
<form action="submit.php" method="post">
Name: <input type="text" name="name"><br/>
Email: <input type="email" name="name"><br/>
Degree:<br/>
<?php
$major = array("cs" => "Computer Science", "wdd" => "Web Design and Development", "cit" => "Computer Info... | true |
e2f1424d73930d1798a0ec313a468b0257628e41 | PHP | JesseObrien/CommandBus | /src/ValidationBus.php | UTF-8 | 862 | 2.875 | 3 | [] | no_license | <?php namespace CommandBus;
use Illuminate\Container\Container;
use Illuminate\Log\Writer;
use ReflectionException;
class ValidationBus implements CommandBus {
private $container;
private $inflector;
private $bus;
private $log;
public function __construct(CommandBus $bus, Container $container, NameInflector $... | true |
73ef6409722727b6a84bf90b1ad4a51d856f804f | PHP | A973C/covid-dashboard-france | /src/CovidDashboardFrance/France.php | UTF-8 | 4,617 | 3.125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace CovidDashboardFrance;
class France
{
/** @var Department[] */
protected $departments = array();
/** @var Region[] */
protected $regions = array();
/**
* France constructor.
*
* @param $departmentsDataUrl
* @param $regionsDataUrl
*
* @throws \Exceptio... | true |
9dd4c94e4ed570bfdc6bf676a556f6b56470c4d1 | PHP | phphatesme/LiveTest | /src/lib/Zend/Markup/Parser/Bbcode.php | UTF-8 | 23,448 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license an... | true |
b355b48f7592ffc7ba793f36b315fb030dd6e72c | PHP | SerafimArts/PEReader | /src/Marshaller/Marshaller.php | UTF-8 | 3,409 | 2.546875 | 3 | [] | no_license | <?php
/**
* This file is part of PEReader package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Serafim\PEReader\Marshaller;
use Doctrine\Common\Annotations\AnnotationReader as DoctrineAnnota... | true |
cf4cb5b1b45cc1ca93441a719bf62d05e63ee481 | PHP | solka14/sePuede | /public_html/backend/ControladorGeneral.php | UTF-8 | 850 | 3.015625 | 3 | [] | no_license | <?php
require './ConexionBD.php';
class ControladorGeneral {
private $conexion = null;
public function __construct() {
//Se establece la conexion con la base de datos
$bd = new ConexionBD();
$this->conexion = $bd->getConexion();
}
... | true |
1ff00cc514e2583e3a98b9d02edaa86f11541cf5 | PHP | garuda2015/app-web | /common/models/User.php | UTF-8 | 317 | 2.65625 | 3 | [] | no_license | <?php
/**
* 用户AR
*/
namespace common\models;
use Yii;
use yii\db\ActiveRecord;
class User extends ActiveRecord {
public static function tableName(){
return Yii::$app->db->tablePrefix . 'user';
}
public static function checkLogin($username, $pwd){
if(!$username || !$pwd){
return false;
}
}
} | true |
aef26c110c2c91ba7f068c4482849a0f7ad25d7d | PHP | Swfuse/swfustify | /includes/classes/Constants.php | UTF-8 | 628 | 2.78125 | 3 | [] | no_license | <?php
class Constants {
public static $passwordsDoNoMatch = "Passwords don't match";
public static $passwordIncorrect = "Passwords is incorrect, please use A-Z, 0-9";
public static $passwordSize = "Password must be between 5 and 30 symbols";
public static $emailInvalid = "Email is invalid";
public ... | true |
59a5904b21314f268d55019489f94b1466d6b84c | PHP | nidico/berlinadd | /web/templates/status.php | UTF-8 | 464 | 2.625 | 3 | [] | no_license | <?php
function showStatus($status) {
//get color
$color = '';
switch($status['in_osm']) {
case 0:
$color = 'red';
break;
case 1:
$color = 'green';
break;
case 2:
$color = 'orange';
break;
}
?>
<div style="width: 100%; min-height: 16px; padding: 2px; font-size: 0.8em; text-align: center; bac... | true |
15a69283f321b2ae5125f0e9abc2681398ea7530 | PHP | kafruhs/fws | /base/php/Language.php | UTF-8 | 1,429 | 3.140625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Alex
* Date: 01.09.2014
* Time: 21:17
*/
class Language implements base_interface_Singleton
{
const DEUTSCH = 'de';
const ENGLISH = 'en';
/**
* @var null|Language
*/
protected static $_instance = null;
/**
* @var array
*/
prot... | true |
76213558dd2a026bc42da4f9a3ca49ed06e5374c | PHP | kuznezgrb/lift-control | /www/src/Utils/СLiftRedis.php | UTF-8 | 475 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: alexander.kuznetsov
* Date: 15.11.2018
* Time: 10:02
*/
namespace App\Utils;
use Predis\{Client};
/**
* Class СLiftRedis
* @package App\Utils
*/
class СLiftRedis
{
/**
* @param string $lifts
*/
public function setListsRedis(string $lifts)
{
... | true |
53fecdf205e3baf48efac2c609d8db5c95d8fcd3 | PHP | cultuurnet/entry-json-demo | /src/EntryPoster/EntryPoster.php | UTF-8 | 20,696 | 2.78125 | 3 | [] | no_license | <?php
namespace CultuurNet\EntryJsonDemo\EntryPoster;
use CultuurNet\TransformEntryStore\ValueObjects\AgeRange\AgeRange;
use CultuurNet\TransformEntryStore\ValueObjects\BookingInfo\BookingInfo;
use Guzzle\Http\Client;
use Monolog\Logger;
use ValueObjects\Identity\UUID;
use ValueObjects\StringLiteral\StringLiteral;
c... | true |
20ecebf153ad86446888c5b0f2cdee2a0f0f0b0c | PHP | Malplaquet/Narramus | /public/index.php | UTF-8 | 787 | 2.515625 | 3 | [] | no_license | <?php
use Doctrine\DBAL\Configuration;
use Doctrine\DBAL\DriverManager;
require __DIR__.'/../vendor/autoload.php';
$config = new Configuration();
include 'include/config.php';
include 'include/session.php';
$conn = DriverManager::getConnection($connectionParams, $config);
// récupère deux templates :
$loader = new... | true |
e5d65a2b620443a8342ae0685dff8dc7cf4238f5 | PHP | ucmucm/SocialNetworkWebsiteDemo | /extreme_award_user_list.php | UTF-8 | 937 | 2.65625 | 3 | [] | no_license | <?php
/**
* 获取提交的数据
*
*/
$act = $_POST['act'];
$id = $_POST['id'];
$user_id = (int)$_POST['user_id'];
$form_data = $_POST['form_data'];
$param_arr = array();
// 获取到的数据格式为 “foo=bar&baz=boom&cow=milk&php=hypertext+processor”
// http_build_query 的数据形式用parse_str解析为数组格式
parse_str($form_data, $param_arr... | true |
53a179a62cb16c5cde1cce6c7aba32ead761b587 | PHP | lukaszb1/magento2-productnote | /Lb1/ProductNote/Api/Data/NoteInterface.php | UTF-8 | 2,761 | 2.8125 | 3 | [] | no_license | <?php
namespace Lb1\ProductNote\Api\Data;
/**
* @api
*/
interface NoteInterface
{
/**#@+
* Constants defined for keys of data array
*/
const NOTE_ID = 'note_id';
const CONTENT = 'content';
const PRODUCT_ID = 'product_id';
const CUSTOMER_ID = 'customer_id';
const STORE_ID = 'store_i... | true |
b5ea837b4831f81576a801771ef0503b27b489d9 | PHP | symbiose/symbiose | /lib/ctrl/api/GitController.class.php | UTF-8 | 9,421 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace lib\ctrl\api;
use Exception;
use InvalidArgumentException;
use RuntimeException;
use Gitonomy\Git\Repository;
use Gitonomy\Git\Commit;
use Gitonomy\Git\Tree;
/**
* Manage Git repositories.
* @author emersion
* @since 1.0beta5
*/
class GitController extends FileController {
const CONFIG_FILE = '/... | true |
6239efb12272041fec2ad1c104e77fbbe6140606 | PHP | vuduchiep234/web | /app/Services/File/FileService.php | UTF-8 | 596 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: admin
* Date: 4/24/2019
* Time: 9:38 AM
*/
namespace App\Services\File;
use Illuminate\Http\UploadedFile;
interface FileService
{
public function setUploadedFile(UploadedFile $uploadedFile);
public function download(array $attributes): ?array;
public funct... | true |
823b031b87d8635381aa71b3ee71bd18c940da23 | PHP | kaihuayu/Thinkphp51 | /public/demo/pattern.php | UTF-8 | 1,631 | 3.6875 | 4 | [
"PHP-3.0",
"Apache-2.0"
] | permissive | <?php
//单例模式
class site{
//属性
public $siteName;
//本类的静态实例
protected static $instance= null;
//禁用掉构造器 构造方法私有化(禁止类外部用new的方式实例化类)
private function __construct($siteName){
$this->siteName = $siteName;
}
//获取本类唯一实例
public static function getInstance($siteName="hello"){
//判断$instance 是否是本类的实例
... | true |
0cd72f28756adcbfabd08e36bedf240fd8561a86 | PHP | teraone/lox24 | /src/Lox24.php | UTF-8 | 3,383 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace NotificationChannels\Lox24;
use GuzzleHttp\Client as HttpClient;
use GuzzleHttp\Exception\ClientException;
use NotificationChannels\Lox24\Exceptions\CouldNotSendNotification;
class Lox24
{
/** @var HttpClient HTTP Client */
protected $http;
/** @var null|string Lox24 Account ID. */
p... | true |
ab98eb00b565f8060e6bac86cfac7afb577a56d4 | PHP | Andy-Lonly/black-house | /struct/scriptAction.php | UTF-8 | 2,961 | 2.796875 | 3 | [] | no_license | <?php if($_GET['action'] == 'addNewRecord'){ ?>
<?php if(!$_POST['username'] || !$_POST['qqnum'] || !$_POST['level'] || !$_POST['reason']){ ?>
<b>很抱歉,您填写的信息不完整</b><br>
<?php } else { ?>
<?php
//这里做防止injection的处理
$insertUsername = filter_var($_POST['username'], FILTER_SANITIZE_MAGIC_QUOTES);
$ins... | true |
05ad895c2d0726ec9edd72a089d789e3b8bd7d3b | PHP | winsonwll/Laravel-all | /app/Http/Middleware/LoginMiddleware.php | UTF-8 | 769 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
class LoginMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
//判断前台是否有登录
... | true |
fea365995f02f3f5eb0b0597ae0014ddbc3a0c70 | PHP | pedrochaves/tdd-developer-week | /tests/unit/Calculator/Operation/AdditionTest.php | UTF-8 | 240 | 2.765625 | 3 | [] | no_license | <?php
namespace Calculator\Operation;
class AdditionTest extends \Codeception\TestCase\Test
{
public function testAddition()
{
$operation = new Addition(1, 2);
$this->assertEquals(3, $operation->solve());
}
}
| true |
268d16450300d1c7bd345aae3bb551637f230ea1 | PHP | podlove/podlove-publisher | /lib/modules/transcripts/renderer.php | UTF-8 | 4,749 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Podlove\Modules\Transcripts;
use Podlove\Model\Episode;
use Podlove\Model\Podcast;
use Podlove\Modules\Contributors\Model\Contributor;
use Podlove\Modules\Transcripts\Model\Transcript;
/**
* Transcript renderer.
*
* Renders an episode transcript as JSON or webvtt.
*
* EXAMPLE
*
* $renderer... | true |
8ebafe69d0e6bd94df4e1d6799f5eb8e223fe5b2 | PHP | BrandonDyer64/ScoutingApp | /api/classes/Page.php | UTF-8 | 587 | 3.125 | 3 | [] | no_license | <?php
// Helper for inclduing a page/api call
class Page {
public function __construct($script, $display_block = TRUE) {
$this->script = $script;
$this->display_block = $display_block;
}
public function render($args, $class="") {
extract($args);
$output = "";
if (file_exists("{$... | true |
a531bfb681d1689eaa74bc1a7259bab806eeb7f8 | PHP | ItIsJAPO/admin_loteria | /autoloader.php | UTF-8 | 856 | 2.578125 | 3 | [] | no_license | <?php
spl_autoload_register('plataforma_autoloader', true, true);
function plataforma_autoloader( $className ) {
$className = ltrim($className, '\\');
$fileName = '';
$namespace = '';
if ( $lastNsPos = strripos($className, '\\') ) {
$namespace = substr($className, 0, $lastNsPos);
$cla... | true |
f8a37a11aced385ce7b495447f1e37a91dfe3137 | PHP | catchco/magento-module-fondof-contentful | /src/app/code/community/FondOf/Contentful/Block/Navigation/Item/Renderer/Custom.php | UTF-8 | 1,372 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Navigation item renderer custom block
*
* @category FondOf
* @package FondOf_Contentful
*
* @codeCoverageIgnore
*/
class FondOf_Contentful_Block_Navigation_Item_Renderer_Custom extends FondOf_Contentful_Block_Navigation_Item_Renderer_Abstract
{
/**
* Retrieve link text
*
* ... | true |
10c0f3cc4e68dd77166c4123a34d78d4b5d80e3b | PHP | ishunko/hubzero-cms | /core/components/com_courses/models/section/code.php | UTF-8 | 3,664 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package hubzero-cms
* @copyright Copyright 2005-2019 HUBzero Foundation, LLC.
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Components\Courses\Models\Section;
use Components\Courses\Models\Base;
use Components\Courses\Tables;
use User;
require_once dirname(dirname(__DIR__)) .... | true |
e990599fcde2ae09468a1d0858d5ce9678741ba2 | PHP | bencostello/batchvalidator | /lib/php/Spider/Filter/EffectiveURL.php | UTF-8 | 481 | 2.71875 | 3 | [] | no_license | <?php
class Spider_Filter_EffectiveURL extends Spider_UriFilterInterface
{
protected $options = array();
function __construct(Iterator $iterator, $options = array())
{
$this->options = $options;
parent::__construct($iterator);
}
function accept()
{
return true;
... | true |
4963f8d55f459bee05c134db1ae68b24a0958d5e | PHP | touchstorm/chronos | /app/Providers/EloquentServiceProvider.php | UTF-8 | 655 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Providers;
use Chronos\Providers\ServiceProvider;
use Illuminate\Database\Capsule\Manager;
class EloquentServiceProvider extends ServiceProvider
{
/**
* Register Eloquent
* the application container is available $this->app
*/
public function register()
{
$capsu... | true |
ed8d6496b0889815931c72a2b3f7d50a395eb876 | PHP | terryhuangbo/review | /ycafan/lib/setting.php | UTF-8 | 559 | 2.515625 | 3 | [] | no_license | <?php
/**
* 公共设置
**/
/**
* 设置摘要的字数.
* @param int $length Excerpt length.
* @return int (Maybe) modified excerpt length.
*/
function wpdocs_custom_excerpt_length( $length ) {
return 50;
}
add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 999 );
/**
* 设置摘要更多的格式
* @param string $more "Read more" e... | true |
4cd928dda02100dfcea00beaca2d07ddf7461079 | PHP | zsturgess/overwatch | /src/ServiceBundle/Expectation/ToPingExpectation.php | UTF-8 | 1,675 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Overwatch\ServiceBundle\Expectation;
use Overwatch\ExpectationBundle\Exception as Result;
use Overwatch\ExpectationBundle\Expectation\ExpectationInterface;
/**
* ToPingExpectation
* Expectation classes are the actual runners of tests.
* This is the runner for the "toPing" expectation.
*/
class To... | true |
e953eed6e7ac84bc8a5adce3549e7aa68d12a03c | PHP | vgrugor/beetroot-homeworks | /27_composer/app/controllers/ShoppingCartController.php | UTF-8 | 830 | 2.71875 | 3 | [] | no_license | <?php
namespace Shop\Controllers;
use Shop\Models\ShoppingCart;
class ShoppingCartController
{
public function add(): void
{
$goodId = $_POST['id'] ?? null;
if ($goodId !== null) {
$userId = $_SESSION['user']['id'];
$shoppingCart = new ShoppingCart();
... | true |
4438e7a6d926403a20c345392b372696a1e9258b | PHP | teiman/notificapp | /inc/db.inc.php | UTF-8 | 4,408 | 2.5625 | 3 | [] | no_license | <?php
/**
* Ayudas para acceso a datos
*
* @package ecomm-aux
*/
define ("FORCE",1);
$link = falsE;
$UltimaInsercion = false;
$FilasAfectadas = false;
function parametros(){
$args = func_get_args();
if (count($args) < 2){
return false;
}
$query = array_shift($args);
$args = array_m... | true |
78208ca3293ec37ae31de9569679f9ecc16929ff | PHP | deljdlx-wordpress/wordpress-template | /public/wp-content/plugins/woof/class/Models/Database.php | UTF-8 | 1,547 | 2.640625 | 3 | [] | no_license | <?php
namespace Woof\Models;
use Illuminate\Database\Capsule\Manager;
class Database
{
public static $prefix;
private $driver;
private $wordpressDriver;
public function __construct($wpdb)
{
$this->wordpressDriver = $wpdb;
static::$prefix = $this->wordpressDriver->prefix;
... | true |
67660eb62f796d4a301d7a074bdceeea253a37c3 | PHP | marcos-mauricio-mendes/Exemplos-Para-Seguir | /script_orientacao_objeto_novo_em_uso/calculadora/class/calculadora.php | UTF-8 | 2,261 | 3.734375 | 4 | [] | no_license | <?php
/**
* Created by Sistema de Calculadora
* User: Marcos
* Date: 14/01/2015
* Time: 20:45
*/
class calculadora {
const adicao = 1,
subtracao = 2,
mutiplicacao = 3,
divisao = 4;
private $operando,
$resultado;
/**... | true |
d9e19490ac92dacec59ee1666da67db50f0b034a | PHP | rolland-dev/all-work-php | /exo06/myincludes/fonctions_util.php | UTF-8 | 484 | 2.609375 | 3 | [] | no_license | <?php
function protect_montexte($param) {
$param = trim($param);
$param = stripslashes($param);
$param = htmlspecialchars($param);
return $param;
}
function createMenuLi($href, $txt){
$str = '<li class="nav-item">';
$str .= '<a class="nav-link" href="'.$href.'">'.$txt.'</a>';
$str .= '</... | true |
fb0b7cd84a41da9f201f217f85f23f2759836999 | PHP | purplenimbus/nimbus-ems-api | /app/Paystack/PaystackBatch.php | UTF-8 | 694 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Paystack;
use GuzzleHttp\Client as Guzzle;
class PaystackBatch {
private $guzzle;
private $endpoint;
public function __construct()
{
$this->guzzle = new Guzzle(['headers' => ['Authorization' => 'Bearer '.env('PAYSTACK_SECRET_KEY')]]);
$this->endpoint = env('PAYSTACK_PAYME... | true |
0affafa2c13ba7ef1c0dfc884d9d6ad3d5d49bb0 | PHP | jankilal/crm_demo | /application/models/carquote_model.php | UTF-8 | 4,385 | 2.578125 | 3 | [] | no_license | <?php
class Carquote_model extends CI_Model {
public $_table_name;
public $_order_by;
public $_primary_key;
function task_spent_time_by_id($task_id) {
$total_time = "SELECT start_time,end_time,end_time - start_time time_spent
FROM tbl_tasks_timer WHERE task_id = '$task_id'";
$r... | true |
8f7b740992b7c134e9b56e3460f02c2364722569 | PHP | Bendells/OemPro-Php | /Utility/SubscriberList.php | UTF-8 | 5,813 | 2.734375 | 3 | [] | no_license | <?php
namespace KONEK\OemproBundle\Utility;
use KONEK\OemproBundle\Utility\SessionData;
class SubscriberList
{
/**
*
*/
public function __construct()
{
}
/**
* create
*
* Creates a new subscriber list
*
* @param string $subscriberList... | true |
a18086a000baa209e6c45aeb2baac6441460b445 | PHP | rajivPHP/POC | /HighCharts/index.php | UTF-8 | 1,557 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
$host = "localhost";
$username = "root";
$password = "";
$database_name = "icampus";
$connect = mysql_connect($host, $username, $password);
if (!$connect) {
echo "could not connect to database";
return false;
}
$selectdb = mysql_select_db($database_name, $connect);
$queryStudent = "SELECT * FROM stud... | true |
29bfa7be1b33ab7262f95486499a37fc70b9902a | PHP | contributte/fio | /src/Utils/ExportXmlGenerator.php | UTF-8 | 836 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace Contributte\Fio\Utils;
use SimpleXMLElement;
/**
* XmlGenerator
*/
class ExportXmlGenerator
{
/**
* @param mixed[] $data
*/
public static function fromArray(array $data): string
{
// Import tag
$xml = new SimpleXMLElement('<?xml version="1.0" encoding="utf-8"?... | true |
02a7492e8b609483597af666796d15dd1b857d9e | PHP | SavemeImfine/mission_6_r-mail_form | /mission_6_insert.php | UTF-8 | 3,662 | 2.53125 | 3 | [] | no_license | <?php
session_start();
header("Content-type: text/html; charset=utf-8");
//クロスサイトリクエストフォージェリ(CSRF)対策のトークン判定
if ($_POST['token'] != $_SESSION['token']){
echo "不正アクセスの可能性があります。";
exit();
}
//クリックジャッキング対策
header('X-FRAME-OPTIONS: SAMEORIGIN');
//データベースへの接続
$dsn = 'データベース名';
$user = 'ユーザー名';
$password = 'パスワード... | true |
1c79342156f125097baeba291a9237af53f6205e | PHP | JosepTai/phpconsole | /app/PhpC/UpdatesManager.php | UTF-8 | 12,491 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: JOSIAH
* Date: 4/29/2018
* Time: 3:12 AM
*/
namespace App\PhpC;
use App\Setting;
use Chumper\Zipper\Zipper;
use Illuminate\Support\Facades\Storage;
use ZipArchive;
class UpdatesManager {
public $filesArray;
protected $moved = false;
protected $updateFiles;
... | true |
10a63b08f74c796dcf7c3a9feca2d09b63c520fc | PHP | sylvaintouchon/projets_sylvain | /qcm2019/date.php | UTF-8 | 169 | 2.90625 | 3 | [] | no_license | <?php
$annee = date('Y');
$noel = mktime(8, 0, 0, 12, 25, $annee); // Le timestamp du 25 décembre de l'année actuelle à 8h00 (ouverture des cadeaux).
echo $noel
?>
| true |
27cc8a7712dce1ca9d5f06c479d737483e16dcf8 | PHP | fred001/laravel-lib | /src/Frd/CommandLine.php | UTF-8 | 4,744 | 3.203125 | 3 | [] | no_license | <?php
namespace Frd;
/*
* 实现机制:
* 1. 解析预定义命令, 拆分成 cmd, params, options 三部分
* 2. 解析时,先用 cmd 去匹配 输入, 若都满足,则认为是这个命令(所以长的命令应当放在前面)
* 3. 剩下部分 首先获取关键词赋值,再对剩下进行次序赋值
* 4. 最后检验命令必要的参数是否都存在,是则成功匹配,否则抛出异常,指示什么参数不满足
*
* 5. 若没有命令匹配,返回 false
*/
class CommandLine
{
public $cmd_lines=[];
... | true |
bc9a48dd670d94f06f3382f4ca5f4885b7019a8c | PHP | Edu4rd17/WebDevProject | /EduardProject/public/books.php | UTF-8 | 2,815 | 2.90625 | 3 | [] | no_license | <?php
require_once 'templates/header.php';
if (!isset($_SESSION['bookID'])) {
$_SESSION['bookID'] = [];
}
if ($_SESSION['Active'] == false) { /* Redirects user to Login.php if not logged in. Remember, we set $_SESSION['Active'] == true in login.php*/
header("location:login.php");
exit;
}
?>
<?php
if (isse... | true |