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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2e49367adb0058881a279e3312f9f9b15d7b9108 | PHP | IGS-PROMO-2020/ensemble-de-script-php | /calcule.php | UTF-8 | 246 | 3.09375 | 3 | [] | no_license | <?php
$valeur1 = 2;
$valeur2 = 3;
$operation = $valeur1+$valeur2;
echo "<center>";
echo "<h1>";
echo "<font color = 'red'>";
echo "LE RESULTAT";
echo "</font>";
echo "</h1>";
echo "<br>";
echo $operation;
echo "</center>";
?>
| true |
6b2b049320c20d6ac68e54df0351484ac7747d3a | PHP | erkineren/shopier | /src/Models/Address.php | UTF-8 | 513 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Shopier\Models;
/**
* Class Address
* @package Shopier\Models
*
* Common address for both shipping and billing address
*
*/
class Address extends BaseModel
{
protected static $requirement = [
'address' => true,
'city' => true,
'country' => true,
'postcode' =>... | true |
f8ef1d55f0d7c3531796ee9655f90cfb111f7639 | PHP | garmanovroman/samndzr | /local/app/Admin/Question/Tab.php | UTF-8 | 2,435 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Admin\Question
{
use BitrixAdminExtension\Control\Tab as Base;
use App\Model\Property;
use App\Model\PropertyValue;
use App\Model\Operator;
use App\Model\Question;
/**
* Дополнительная вкладка для редактирования свойств вопроса.
*/
class Tab extends Base
{
/**
* Колле... | true |
13673d5ed44f3d3e0c3b6487cab7ade7e00ab111 | PHP | taocheng1030/laravel-ProophessorDo-italia-master | /app/ProophessorDo/Model/Category/CategoryId.php | UTF-8 | 537 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Prooph\ProophessorDo\Model\Category;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface;
class CategoryId
{
protected $uuid;
public static function generate()
{
return new self(Uuid::uuid4());
}
private function __construct(UuidInterface $uuid)
{
$this->uui... | true |
3cf245ba0caa43890e3f61daafb04344def6784c | PHP | kalervik/todo-backend | /index.php | UTF-8 | 1,952 | 2.5625 | 3 | [] | no_license | <?php
//process client request (VIA URL)
header("Content-Type:application/json");
include("functions.php");
$todo_data ="Test todo-2";
$url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$url_path = parse_url($url, PHP_URL_PATH);
$url_path_arr= explode('/',$url_path);... | true |
19d244f9fdbb60681d21c866c3566c7ae43c7ab0 | PHP | NguyenSyLuu/jeeto.unicraft.in | /app/code/community/Jeetoshop/ShippingCod/sql/jeetoshop_shippingcod_setup/install-0.0.1.php | UTF-8 | 2,009 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
$this->startSetup();
/**
* Note: there are many ways in Magento to achieve the same result of
* creating a database table. For this tutorial, we have gone with the
* Varien_Db_Ddl_Table method, but feel free to explore what Magento
* does in CE 1.8.0.0 and earlier versions.
*/
$table = new Varien_D... | true |
49aaacf4258eb4976f55d5ba15f03da60350d31a | PHP | joneng2016/simulationmoise | /app/Models/Plan.php | UTF-8 | 496 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Plan extends Model
{
public function goal(){
$goalplans = $this->hasMany('App\Models\GoalPlan')->get();
foreach($goalplans as $goalplan){
$goal[] =
[
"goal" => $goalplan->hasMany("App\Models\Goal","id","goal_id")->first(),
... | true |
ef5a43c1cd3f5fe71c66333109cd4678e5f4ceb3 | PHP | MuKCePaBG/EventorPHPCW | /eventor/app/Http/Controllers/SporttypeController.php | UTF-8 | 2,433 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\SporttypeRequest;
use App\Sporttype;
class SporttypeController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$sportstype = Sporttype::... | true |
bab816caeffa5c5b93979bb7a96ad0a875b95a87 | PHP | KaiserRuben/ORGNZD_new | /app/Http/Controllers/ProjectController.php | UTF-8 | 4,227 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\ResultSet;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Auth;
class ProjectController extends Controller
{
public fun... | true |
7d5bb6c182139d0555e9d4a510ba5607329fd156 | PHP | ermogenous/reprodataPHPProject | /tools/table_list.php | UTF-8 | 23,067 | 2.8125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: micac
* Date: 2/11/2019
* Time: 2:39 ΜΜ
*/
class TableList
{
//SQL
private $tableName;
private $uniqueID;
private $sqlSelect = '';
private $sqlFrom = '';
private $sqlWhere = '';
private $sqlOrderBy = '';
private $sqlGroupBy = '';
private... | true |
5117de1639dc408a922ea6ad8791a94ae2892031 | PHP | linarsh08/WarcraftStats | /app/Console/Commands/CreateDB.php | UTF-8 | 843 | 2.78125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: vanyaz158
* Date: 15.11.16
* Time: 1:14
*/
namespace App\Console\Commands;
use Illuminate\Console\Command;
class CreateDB extends Command
{
protected $signature = 'db:create';
protected $description = 'Create database';
protected $directConnection;
prote... | true |
a54b6b2d8a23c30ca220cabe721fc2e2811e9515 | PHP | monty786/cp5637-assignment3 | /Monty-Social-Icons/includes/front-end/template.php | UTF-8 | 3,790 | 2.953125 | 3 | [] | no_license | <?php
/**
* Create Template Structure for the Display of Social Links
*
* @package Captain Social
* @subpackage Template
* @copyright Copyright (c) 2012, Bryce Adams
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 1.0.0
* @uses ob_start
* @uses ... | true |
87aeb02e4b2d3f4249f0f94ff1ed8b0214e478c1 | PHP | sonvq/booking | /Modules/Booking/Validators/BookingDateInRangeValidator.php | UTF-8 | 1,903 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Booking\Validators;
use Carbon\CarbonPeriod;
/**
* Class BookingDateInRangeValidator
* @package Modules\Booking\Validators
*/
class BookingDateInRangeValidator
{
/**
* @param $attribute
* @param $values
* @param $parameters
* @return bool
*/
public function... | true |
e59570f5592ef06c30775a92379a505a527e2d66 | PHP | MattSkea/property_cms | /services/api-user-delete.php | UTF-8 | 1,429 | 3.28125 | 3 | [] | no_license | <?php
/* * ********************************************** */
/* * ************DELETE USER SERVICE*************** */
/* * ********************************************** */
/* CREATE PLACEHOLDERS AND POPULATE THEM WITH THE POSTED DATA */
$sId = $_GET['id'];
/* LOCATE THE FILE BEING POPULATED */
$sFileName = '../data-us... | true |
2f470e3555f68566c569b3f255e2a12f2a081699 | PHP | toonketels/drev | /includes/drev.sync_path_menu.php | UTF-8 | 1,788 | 2.78125 | 3 | [] | no_license | <?php
/**
* Recurse over entire menu tree and updates path each menu item.
*/
function drev_sync_path_menu_update_menu($tree, $parent_alias = NULL) {
foreach($tree as $item) {
// Update the item
$new_parent_alias = drev_sync_path_menu_update_menu_item($item, $parent_alias);
// And go deepe... | true |
76c2354321c5ded5896d21e9aaa9c25c3742391c | PHP | afosto/io-sdk-php | /src/Model/OdrRecord.php | UTF-8 | 1,535 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file has been auto generated by Jane,
*
* Do no edit it directly.
*/
namespace Afosto\Sdk\Model;
class OdrRecord
{
/**
* @var string
*/
protected $id;
/**
* @var OdrKey
*/
protected $reference;
/**
* @var string
*/
pr... | true |
cf3973c9e7b124640b724f1a099a77aabefe990f | PHP | jamborweb/simple-php-jscore | /project/functions/connect.php | UTF-8 | 349 | 2.5625 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$userpassword = "";
$dbname = "jscore";
$connection = new mysqli("$servername", "$username", "$userpassword", "$dbname");
if($connection->connect_error){
die("Błąd połączenia z bazą danych! " . $connection->connect_error);
}
mysqli_set_charset(... | true |
80799bcd425e7bc277a7c52fcd9133e3ec58bedd | PHP | cultuurnet/projectaanvraag-silex | /src/Project/Event/RequestedActivation.php | UTF-8 | 1,410 | 2.71875 | 3 | [] | no_license | <?php
namespace CultuurNet\ProjectAanvraag\Project\Event;
use CultuurNet\ProjectAanvraag\Address;
use CultuurNet\ProjectAanvraag\Entity\ProjectInterface;
use JMS\Serializer\Annotation\Type;
class RequestedActivation extends AbstractProjectEvent
{
/**
* @Type("string")
* @var string
*/
private ... | true |
4cfbdcda6b60dbbd0662931b371f607b188d789a | PHP | hapsys/prime_numbers | /classes/PDOCache.php | UTF-8 | 1,847 | 3.1875 | 3 | [] | no_license | <?php
include_once __DIR__.'/Cache.php';
/**
* @author admin
*
*/
class PDOCache implements \Cache {
private $cahce = array();
private $pdo = null;
public function __construct(int $range_end, PDO $pdo) {
$this->pdo = $pdo;
$sql = 'SELECT p.prime_number FROM primes p WHERE ... | true |
1828f1754a6745d32b2c908c6e916e829f96dcee | PHP | LaBrush/KUB | /src/Kub/EDTBundle/TimeService/Interval.php | UTF-8 | 1,763 | 2.96875 | 3 | [
"BSD-3-Clause",
"CECILL-B"
] | permissive | <?php
namespace Kub\EDTBundle\TimeService ;
use Kub\EDTBundle\Entity\Horaire ;
class Interval
{
private $horaire ;
private $horaires ;
public function __construct(array $horaires, Horaire $horaire = null)
{
$this->horaires = $horaires ;
$this->horaire = $horaire ;
}
public function setHoraire(Horaire $ho... | true |
cedac870fa5d510da6b532694e0576adc4f68b95 | PHP | coolinmc6/oop | /class_methods.php | UTF-8 | 306 | 3.734375 | 4 | [] | no_license | <?php
/*
Lecture 9: Defining Methods
- PHP also keeps track of methods using get_class_methods('Cars');
*/
class Cars {
function greeting(){
}
function greeting2(){
}
}
$the_methods = get_class_methods('Cars');
foreach ($the_methods as $method) {
echo $method . "<br>";
}
?>
| true |
2e0801e0f90a9bc8a408dd9686060e5a75308b36 | PHP | Grompokstar/krujeva | /application/Krujeva/Excel/Excel.php | UTF-8 | 8,743 | 2.859375 | 3 | [] | no_license | <?php
namespace Krujeva\Excel {
use Reports\ExcelReportWriter;
use Reports\Styles;
abstract class Excel extends ExcelReportWriter {
protected $ABC = array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
protected $columnsHeader... | true |
d9cf20e0ec1832b7b7ebedfe7beb63976b83a9b5 | PHP | tibzoy/hrips | /test.php | UTF-8 | 434 | 2.734375 | 3 | [] | no_license | <?php
//$date = '2013-04-23 11:00:00';
//$add_hours = '0';
//$add_min = '89';
//echo "$date + $add_hours hours $add_min minutes = ".date('Y-m-d H:i:s',strtotime("+1 hours 0 minutes",strtotime($date)));
//echo '<pre>';print_r(explode(' ',"1 hours 0 minutes"));echo '</pre>';
echo "now is: ".date('Y-m-d H:i:s',t... | true |
7f7f1de330158fbff1a533d9fc95b694b30d8be6 | PHP | dshafik/Squiz-Framework | /Systems/Session/SessionActions.inc | UTF-8 | 4,224 | 2.625 | 3 | [] | no_license | <?php
/**
* Basic structure for all session handling systems.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be use... | true |
f3476f851f9ed410e14167072fdc2ce75cf8ff8b | PHP | gopatj1/vFacebook.te | /vfacebookte/friends.php | WINDOWS-1251 | 2,487 | 2.890625 | 3 | [] | no_license | <?php
require_once 'header.php'; //
if (!$loggedin) die();
if (isset($_GET['view'])) $view = sanitizeString($_GET['view']);
else $view = $user;
echo "<div class='main'>";
$followers = array(); //
$following = array(); //
//
$result = queryMysql("SELECT * FROM friends WH... | true |
9297b71134fcd9682d7f46d7ef1e7b80e989632d | PHP | enwikipedia-acc/waca | /includes/Helpers/BanHelper.php | UTF-8 | 6,686 | 2.609375 | 3 | [] | no_license | <?php
/******************************************************************************
* Wikipedia Account Creation Assistance tool *
* *
* All code in this file is released into the public domain by the ACC ... | true |
fe8ed920ece5b7bbc3f93d2f5eedd55fb422d82c | PHP | TycheLaughs/DinnerWizard | /php/request_filter.php | UTF-8 | 2,073 | 2.734375 | 3 | [] | no_license | <?php
/** request_filter.php
* Tommy Leedberg
* Date: 1/27/2015
* Summary:
* This is the request filter php page. It takes a JSON request from the DinnerWizard front end that contains
* the following schema
* [ "exclusiveIngredients" => true,
* "ingredientTags" => [ "id" => ... | true |
aafefafae72e609a39a65317cc6aed58c6613935 | PHP | nomantufail/laraplus | /app/Traits/RequestHelper.php | UTF-8 | 1,184 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: nomantufail
* Date: 04/05/2017
* Time: 9:57 AM
*/
namespace Traits;
use Mockery\Exception;
trait RequestHelper
{
public static function getRequestType()
{
$routeParts = explode('/', request()->route()->getPrefix());
if(isset($routeParts[0]) && $... | true |
8d72593bdf82c1187e52d12603f1c098eb7754fb | PHP | julioguerradev/sistema-completo-em-php | /config.php | UTF-8 | 358 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
define("HOST", "localhost");//banco
define("USER", "root");//usuario
define("PASS", "");//senha
define("BASE", "clinica");//base
$conn = new mysqli(HOST, USER, PASS, BASE) or die(mysqli_error($conn));
//mudar a data para o formato pt-BR
function ExibeData($data){
return date("d/m... | true |
829e18c8356512cd672431ad6d2b5d7d39417a2c | PHP | kodpen/pinegrap_software | /pinegrap/api.php | UTF-8 | 77,744 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
*
* liveSite - Enterprise Website Platform
*
* @author Camelback Web Architects
* @link https://livesite.com
* @copyright 2001-2019 Camelback Consulting, Inc.
* @license https://opensource.org/licenses/mit-license.html MIT License
*
*/
//required for software backup mysql dumb
u... | true |
104be0fad897d4436b9a0678a794290aad606aee | PHP | kylwes/ignition | /src/Settings/Fields/Field.php | UTF-8 | 1,868 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Kylwes\Ignition\Settings\Fields;
use Kylwes\Ignition\Store;
use Kylwes\Ignition\Plugin;
use Kylwes\Ignition\Settings\Page;
use Kylwes\Ignition\Settings\Notification;
class Field extends Plugin {
public $name;
public $namespace;
public $modifier;
public $default;
public stat... | true |
76f2c13690a7617fc64e7f321f388312c10cb27d | PHP | mcampbell508/git-review | /src/Reporter/Reporter.php | UTF-8 | 1,873 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of StaticReview
*
* Copyright (c) 2014 Samuel Parkinson <@samparkinson_>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @see http://github.com/sjparkinson/static-review/blob/master/LICENSE
*/
name... | true |
72a85898262c890a4853b016130bd17e56a0724d | PHP | estvoyage/ticTacToe | /tests/units/src/board/view/output.php | UTF-8 | 2,108 | 2.53125 | 3 | [] | no_license | <?php namespace estvoyage\ticTacToe\tests\units\board\view;
require __DIR__ . '/../../../runner.php';
use estvoyage\ticTacToe\{ tests\units, ostring };
use mock\estvoyage\ticTacToe as mockOfTicTacToe;
class output extends units\test
{
function testTicTacToeBoardIs()
{
$this
->given(
$this->newTestedInstan... | true |
24dab8a3ef940c70f55080516886c356ea335193 | PHP | IvanCeban/HotelRousseau | /database/seeds/RoomsTableSeeder.php | UTF-8 | 460 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Room;
use Faker\Factory as Faker;
class RoomsTableSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Faker::create();
//Room::truncate();
// add 1st row
for($i=0;$i<200;$i++){
Room::create( [
... | true |
2c93992e4e4a8d16f74a7429777326e4fcf3b23d | PHP | Syednazirhussain/Rental-system | /app/Repositories/Company/hrCivilStatusRepository.php | UTF-8 | 682 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Repositories\Company;
use App\Models\Company\hrCivilStatus;
use InfyOm\Generator\Common\BaseRepository;
/**
* Class hrCivilStatusRepository
* @package App\Repositories\Company
* @version June 11, 2018, 7:42 am UTC
*
* @method hrCivilStatus findWithoutFail($id, $columns = ['*'])
* @method hr... | true |
ddc7ccd0e798725ce9b699ba70e1a96b7269b2fa | PHP | sitegeist/sandmoulds | /Classes/Domain/Model/SandMould.php | UTF-8 | 1,586 | 2.53125 | 3 | [] | no_license | <?php
namespace Sitegeist\SandMoulds\Domain\Model;
/*
* This file is part of the Sitegeist.SandMoulds package
*/
use Neos\Flow\Annotations as Flow;
/**
* The sand mould domain entity
*
* @Flow\Proxy(false)
*/
final class SandMould
{
/**
* @var ModelIdentifier
*/
private $identifier;
/**... | true |
9d7a491682499f50d84543e057b974ef302a6ebf | PHP | server-may-cry/bubble-srv | /src/Commands/CronMissionCommand.php | UTF-8 | 2,086 | 2.65625 | 3 | [] | no_license | <?php
namespace Commands;
use Saxulum\Console\Command\AbstractPimpleCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use social\VK;
class CronMissionCommand extends AbstractPimpleCommand
{
private function sendLevelVK(array $notifs)
{
... | true |
82011bb2638b6397ba68fed0fd773dfa8e8c0e0c | PHP | Skyrul/ULAP | /protected/models/Survey.php | UTF-8 | 6,160 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This is the model class for table "{{survey}}".
*
* The followings are the available columns in table '{{survey}}':
* @property integer $id
* @property string $survey_name
* @property string $description
* @property integer $status
* @property integer $is_deleted
* @property string $date_created
... | true |
c8edd66bdafe2aa4c73af6dda2b0f3ff4fffaa6c | PHP | carlquistb/bubbles | /options.php | UTF-8 | 4,461 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: carlquistb
* Date: 8/7/2017
* Time: 9:57 AM
*/
if(!isset($_GET)) {
echo("ERROR: the options.php page is being called without a GET prerogative.");
exit;
}
if(!isset($_GET['table'])) {
echo("ERROR: the table parameter was not passed.");
exit;
}
include("co... | true |
e7d551bb4387eb419f52d7ee3a3625a9293c818b | PHP | mysoft-mall/vr-building | /components/weixin/messages/request/BaseEventMessage.php | UTF-8 | 483 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @link https://github.com/craa/weixin-sdk
*/
namespace weixin\messages\request;
/**
* Class BaseEventMessage 事件消息基础模型
*
* @author Chen Hongwei <crains@qq.com>
* @since 1.0
*/
class BaseEventMessage extends BaseMessage
{
/**
* @var string 事件类型
*/
public $Event;
/**
* @retu... | true |
ba331bee981c5bdcc954cc499148428f04d279ee | PHP | olasesi/openweather-laravel-api | /src/Exceptions/WeatherException.php | UTF-8 | 343 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace RakibDevs\Weather\Src\Exceptions;
use Exception;
class WeatherException extends \Exception
{
private $e;
public function __construct($e){
$this->e = $e;
}
public function render()
{
return $this->e->getResponse() == null?'Nothing found':$this->e->getResponse()->getBo... | true |
b7909994f0f9bc77ff7ca369625234b408d295a7 | PHP | hypernumbernet/appespresso | /lib/Ae/Input/Option.php | UTF-8 | 2,193 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Tomohito Inoue <hypernumbernet@users.noreply.github.com>
* @copyright 2009-2017 Tomohito Inoue
* @license MIT
*/
namespace Ae\Input;
/**
* HTMLフォームの入力定義
*
* @version 2.0.0
*/
abstract class Option extends Base
{
/**
* @var array select,radio,checkboxが使用
*
* [[value, c... | true |
7fef0026bcc4029d3835987ae09721f76289b638 | PHP | alex-kalanis/kw_images | /php-tests/CommonTestClass.php | UTF-8 | 3,864 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use kalanis\kw_files\Interfaces\IProcessNodes;
use kalanis\kw_storage\StorageException;
use kalanis\kw_storage\Storage\Target;
use PHPUnit\Framework\TestCase;
/**
* Class CommonTestClass
* The structure for mocking and configuration seems so complicated, but it's necessary to let it be totally idiot-proof
*... | true |
0dc833afd73c9e55c8b029b2fe7a99538313a2ef | PHP | mercurios/old-displan-temporario | /app/controllers/planos.php | UTF-8 | 3,781 | 2.515625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Planos extends CI_Controller
{
/**
* ----------------------------------------
* Carregamento dos models
* ----------------------------------------
*/
public function __construct()
{
parent::__constr... | true |
f88c3f7da60ab34ed39b999c649580da0be4835e | PHP | tomzx/project-euler | /php/24.php | UTF-8 | 1,471 | 3.765625 | 4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
use tomzx\ProjectEuler\Math;
require_once 'vendor/autoload.php';
// One can calculate the exact lexicographical permutation given an index and the alphabet
// For instance, in this problem, we are given the alphabet 0 1 2 3 4 5 6 7 8 9
// we know there are 10! = 3628800 possible permutations.
// We know that i... | true |
25938d767ab1aafa667630d2b9aff48e745f33e6 | PHP | exgamer/yii2-core | /actions/SetStatusAction.php | UTF-8 | 736 | 2.609375 | 3 | [] | no_license | <?php
namespace core\actions;
use Yii;
use yii\base\Action;
use yii\web\ServerErrorHttpException;
use core\models\ActiveRecord;
/**
* экшен для изменения статуса
*
* @author CitizenZet
*/
class SetStatusAction extends Action
{
public function run($id)
{
$model = $this->controller->findModel($id... | true |
51ad966774d5887ffc157f025c87903adcc0fc1f | PHP | jgaydos/PHP-Jawn | /src/Io/Xml.php | UTF-8 | 1,418 | 3.40625 | 3 | [
"MIT"
] | permissive | <?php
namespace Jawn\Io;
/**
* You put it in and take it out
*/
class Xml
{
/**
* Extract or read from source and store as an array
*
* @access public
* @param string $path Source
* @param string $options Extract options
* @return array
*/
public static functio... | true |
5af251fdc13615240c9d798b6cbcbc9fa5d2828d | PHP | devwebok123/tolko-laravel | /app/Services/Models/BlockAdsService.php | UTF-8 | 2,590 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Models;
use App\Http\Requests\Block\MassMarketingRequest;
use App\Models\Block;
use App\Models\BlockPublicationHistory;
use Carbon\Carbon;
class BlockAdsService
{
public const TYPE_CIAN = 'cian_promo';
public const TYPE_AVITO = 'avito_promo';
public const TYPE_YANDEX = 'yand... | true |
961483c159579f65b095bc407bdf85d55337d868 | PHP | pmatiash/t1-php | /src/MediaMath/TerminalOneAPI/Auth/UserPasswordAuth.php | UTF-8 | 2,788 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace MediaMath\TerminalOneAPI\Auth;
use MediaMath\TerminalOneAPI\Exception\LoginFailedException;
use MediaMath\TerminalOneAPI\Infrastructure\ApiHost;
use MediaMath\TerminalOneAPI\Infrastructure\CookieAuthenticable;
/**
* Class UserPasswordAuth
* @package MediaMath\TerminalOneAPI\Auth
*/
class UserPassw... | true |
c8733e5bc81e85e6a1de622ac13be4ade902d34c | PHP | joeynovak/expression-expander | /tests/SetupMethods.php | UTF-8 | 638 | 2.78125 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: Joey
* Date: 5/5/12
* Time: 12:25 PM
* To change this template use File | Settings | File Templates.
*/
class SetupMethods
{
public static function setupForCircles($expression_expander){
$expression_expander->addConstants(
array(
... | true |
c47e74e34e1edab04aaa08c1530eadd424703079 | PHP | aadityatadas/nabhitsolutions | /excel/EMR/export.php | UTF-8 | 6,865 | 2.53125 | 3 | [] | no_license | <?php
ob_start();
session_start();
?>
<!DOCTYPE html>
<html>
<table class="table" style="width:100%" border="0" style="border: 1px solid" >
<tr>
<th colspan="17" style="background-color: #d9edf7;">
<h1 style="text-align: center; text-decoration: underline... | true |
267c3642b7caa1384f984a85736cb9f9774b4ebd | PHP | wql1211608804/Practice | /add_user.php | UTF-8 | 3,774 | 2.875 | 3 | [] | no_license | <!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
// put y... | true |
227024eae05ef36c275ae48d61eb0b3f119a60d2 | PHP | montseflores/Pagina | /conexion3.php | UTF-8 | 239 | 2.53125 | 3 | [] | no_license | <?php
$conn=mysqli_connect("localhost","root","","inventario");
// Verificar la conexion
if(!$conn){
echo "Fallo la conexion <br>";
die("Falló la conexion: " . mysqli_connect_error());
}
else{
// echo "Conexion Exitosa";
}
?> | true |
f69a957027ee1ec6a94377e50297efa4fa3ab0ea | PHP | rasheed-msi/wp_pf | /wp-content/plugins/member-register-type/models/MrtUser.php | UTF-8 | 7,868 | 2.5625 | 3 | [] | no_license | <?php
class MrtUser {
public $profile;
public $contact;
public $user_id;
public function __construct($user_id = null) {
global $wpdb;
$this->link = $wpdb;
if (!is_null($user_id)) {
$this->user_id = $user_id;
$this->logged_in = false;
} else {
... | true |
3b3d28de2bdfb2a5b20233f06968c87326fd87b3 | PHP | php-addition-repository/core | /src/PHPUnit/ObjectEqualityComparator.php | UTF-8 | 1,134 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Par\Core\PHPUnit;
use Par\Core\ObjectEquality;
use Par\Core\Values;
use SebastianBergmann\Comparator\Comparator;
use SebastianBergmann\Comparator\ComparisonFailure;
/**
* @psalm-suppress PropertyNotSetInConstructor
*/
final class ObjectEqualityComparator extends Comparator... | true |
57c69cf6eff6b36e6355cca90ccb99128db831ad | PHP | talis/tripod-php | /src/mongo/MongoGraph.class.php | UTF-8 | 8,755 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tripod\Mongo;
require_once TRIPOD_DIR.'mongo/MongoTripodConstants.php';
/**
* Class MongoGraph
* @package Tripod\Mongo
*/
class MongoGraph extends \Tripod\ExtendedGraph {
/**
* Constructor
*/
function __construct()
{
$this->_labeller = new Labeller();
}
/**
... | true |
c8418d447e61939d6bd4a7761f863abe75643ef1 | PHP | nocksapp/checkout-omnipay | /src/Message/Request/FetchTransactionRequest.php | UTF-8 | 772 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Omnipay\Nocks\Message\Request;
use Omnipay\Common\Exception\InvalidRequestException;
use Omnipay\Common\Message\ResponseInterface;
use Omnipay\Nocks\Message\Response\FetchTransactionResponse;
class FetchTransactionRequest extends AbstractNocksRequest
{
/**
* @return array
* @throws InvalidReques... | true |
b2bb3a8f315200e69b7005f25e6760192d9fc6d6 | PHP | 52fhy/YjcPHP | /vendor/yjc/payment/src/Alipay/ScanQrcodePay.php | UTF-8 | 7,227 | 2.53125 | 3 | [] | no_license | <?php
namespace YJC\Payment\Alipay;
use YJC\Payment\Alipay\Utils\Config;
use YJC\Payment\Alipay\Utils\Core;
use YJC\Payment\Alipay\Utils\Logger;
use YJC\Payment\Alipay\Utils\Rsa;
/**
*
* 支付宝扫码支付
*
* @author YJC
*
* @see http://app.alipay.com/market/document.htm?name=saomazhifu#page-19
*
*/
class Scan... | true |
4092aa861d4dec9d1bacc229d425bee6f4a1e8c5 | PHP | russsiq/bixbite | /database/seeders/ArticleCommentsSeeder.php | UTF-8 | 615 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use App\Models\Article;
use App\Models\Comment;
use Illuminate\Database\Seeder;
class ArticleCommentsSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run(): void
{
$articles = Article::pluck('id')->toAr... | true |
2dc28edf37177c2fa3da300403aafe98e953c8a4 | PHP | FlominatorTM/wikipedia_nearest_photographers | /next_inc/GeoLocation.php | UTF-8 | 9,061 | 2.90625 | 3 | [] | no_license | <?php
class GeoLocation
{
public $lon = -1;
public $lat = -1;
public $iso = "";
public $name = "";
public $server;
public $exists; //article exists
public $hasCoordinates; //article has coordinates
public $onlyFallback;
public $wasChecked; //article was checked for coordinates
static private $a... | true |
759bf2a131c3e521c02b132c02574be25f2bda2a | PHP | youssefRakrouki/projetWeb-integration- | /views/Back office/modifierVol.php | UTF-8 | 4,237 | 2.578125 | 3 | [] | no_license | <?PHP
include "../../core/VolC.php";
include "../../entities/Vol.php";
include "header.php";
if (isset($_GET['idVol'])){
$volC =new VolC();
$result=$volC->recupererVol($_GET['idVol']);
foreach($result as $emp){
$idVol=$emp['idVol'];
$airline=$emp['airline'];
$lieu_a=$emp['lieu_a'];... | true |
d2c14df242f7abd6d9066919dc5d23f145bfda94 | PHP | wanggang198810/simple-mvc-shop | /source/model/commentModel.php | UTF-8 | 857 | 2.546875 | 3 | [] | no_license | <?php
/*
* 文章数据模型
* ?????????????????????????
* 1.应该怎样合理的include所需的类呢?记得比较框架的时候,有人说:什么需要时候才加载所需的类,比较有效率神马的
* */
if(!defined('ROOT_PATH'))exit('Access denied!');
class commentModel extends QModel
{
public $table = 'comment';
public $pk = 'id';
private $fields = array(); //保存数据表的字段名
private $... | true |
f340f42d1a9dc1db1fe07fe943b8a94202adbd2d | PHP | aeruizmx/curso-fundamentos-php | /sintaxis.php | UTF-8 | 1,050 | 3.734375 | 4 | [] | no_license | <?php
//Asignacion
$num = 9;
$lang = [
'es' => 'español',
'en' => 'english'
];
//Aritmetica
echo "Suma 2 + 2 " . ((int) 2 + (int)2);
echo "Resta 2 + 2 " . ((int) 2 - (int)2);
echo ",ultiplica 2 * 2 " . 2 * 2;
echo "Divide 2 / 2 " . 2 / 2;
echo "Modulo 2 % 2 " . 2 % 2;
echo "Exponencial 2 ** 2 " . 2 ** 2;
//Co... | true |
80717be0b54fbb24b53586a4c127a3aff8c8dca7 | PHP | shawcohn/cheezcap-example | /inc/helpers.php | UTF-8 | 5,999 | 2.921875 | 3 | [] | no_license | <?php
/**
* Contains helper functions.
*/
class Helpers {
//used to define distinct names for registering scripts/styles
private static $handle_counter = 0;
/**
* Enqueues user defined css from cheezcap settings.
*
* @param string $css_paths_str
*/
public static function enqueue_user_css( $css_paths_st... | true |
90da2566f1300368e4f49f33cca2327584b8317f | PHP | celloist/web3 | /app/Http/Traits/ReturnAssoc.php | UTF-8 | 275 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Traits;
trait ReturnAssoc {
public function getAssocValues (array $data = array()) {
$return = [];
foreach ($data as $key => $values) {
$return[$key] = $values['title'];
}
return $return;
}
} | true |
d844c9e88dd9fb8b5744628c46a2f260d9a674ab | PHP | alexssico/parse | /controller/parse.php | UTF-8 | 1,767 | 2.75 | 3 | [] | no_license | <?php
class ParseClass {
public function parse(){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, SITE);
curl_setopt ($ch, CURLOPT_HEADER, true);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$header = substr($resul... | true |
b60764a36306636586a8a5d0d2cc6129563b7ca6 | PHP | visithan/fatfree | /app/models/Student.php | UTF-8 | 882 | 2.59375 | 3 | [] | no_license | <?php
namespace app\models;
//use app\models\Model;
class Student extends \DB\SQL\Mapper
{
//static protected $_tableName = 'students_sm'; // database table name
public function __construct(\DB\SQL $db)
{
parent::__construct($db, 'students_sm');
}
public function all()
{
$this... | true |
ac21465f95afbf0d63e5202b34365b455430f3a2 | PHP | Purefait/mspr1 | /includes/helpers.php | UTF-8 | 861 | 2.640625 | 3 | [] | no_license | <?php
function connectDB(){
global $database;
$host = $database['localhost'];
$dbname = $database['mspr1'];
$username = $database['root'];
$password = $database[''];
return new PDO("mysql:host=$host;dbname=$dbname", "$username", "$password");
}
function getID($id){
$bdd = connectDB();... | true |
6ee974a8df5193107d9f2fea3e8ebf4c9aa5b94e | PHP | Mina-R-Meshriky/eloquent | /src/QueryBuilder/Aggregates/CountableLoader.php | UTF-8 | 2,716 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2021 Cloud Creativity Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | true |
538e45822852b50b53c34b50a28b3e04611d99cd | PHP | Jan-E/cairo | /tests/CairoContext/Paths/appendPath.phpt | UTF-8 | 1,291 | 2.84375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-only",
"LGPL-2.0-or-later"
] | permissive | --TEST--
Cairo\Context->appendPath() method
--SKIPIF--
<?php
if(!extension_loaded('cairo')) die('skip - Cairo extension not available');
?>
--FILE--
<?php
$surface = new Cairo\Surface\Image(Cairo\Surface\ImageFormat::ARGB32, 50, 50);
var_dump($surface);
$context = new Cairo\Context($surface);
var_dump($context);
$pat... | true |
c4a433826a45c315badb4b6824b1e51b26d5b9bf | PHP | eleskin/timman-api | /app/Http/Controllers/NotesController.php | UTF-8 | 1,935 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Notes;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class NotesController extends Controller
{
public function createNote(Request $request): JsonResponse
{
$request->validate([
'user_... | true |
5bc27d9be60d25aec4118cb357857a061aa616d3 | PHP | YmumuBill/liyulinbill | /Application/Admin/Model/AlbumModel.class.php | UTF-8 | 794 | 2.546875 | 3 | [] | no_license | <?php
namespace Admin\Model;
use Think\Model;
class AlbumModel extends BaseModel{
public function __construct()
{
$this->tableName = "zh".$_SESSION['webInfo']['id']."_album";
parent::__construct();
}
//自动验证
protected $_validate = array(
array('name', 'require', '已有该相册名称', 0,... | true |
95e432a05ec43478d1be02ebdb970c002fba5839 | PHP | qhaaakaa/study-php | /DesignPatterns/factoryAbstract/ConcreteFactory2.php | UTF-8 | 278 | 2.875 | 3 | [] | no_license | <?php
namespace factoryAbstract;
/**
* 具体工厂1
*/
class ConcreteFactory2 implements AbstractFactory
{
public function createProductA()
{
return new ProductA2();
}
public function createProductB()
{
return new ProductB2();
}
}
| true |
69b24d5ef6417ab36bc29533f6e7b4934f8e8011 | PHP | lucadibello/DuxBack | /catalog/controller/information/finder.php | UTF-8 | 5,427 | 2.609375 | 3 | [] | no_license | <?php
class ControllerInformationFinder extends Controller {
private $errors = array();
/**
* Default function used when the controller it's called.
*/
public function index() {
// Optional. This calls for your language file
$this->load->language('information/finder');
$this->document->addSc... | true |
35291c4e75a44f8a646fb682fef1681ca250e7fb | PHP | Seretos/BehatLoggerExtension | /src/Entity/BehatResult.php | UTF-8 | 2,250 | 3.0625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: aappen
* Date: 08.08.18
* Time: 17:09
*/
namespace seretos\BehatLoggerExtension\Entity;
use JsonSerializable;
class BehatResult implements JsonSerializable
{
private $environment;
private $stepResults;
private $duration;
private $message;
public fun... | true |
a00fcd39badb4028e91f5eac55470a91f92db7d9 | PHP | Frangar1998/ExamenMagento2020 | /Garcia/Model/Exam.php | UTF-8 | 1,643 | 2.6875 | 3 | [] | no_license | <?php
namespace Hiberus\Garcia\Model;
use Hiberus\Garcia\Api\Data\ExamInterface;
use Magento\Framework\Model\AbstractModel;
/**
* Class Exam
* @package Hiberus\Garcia\Model
*/
class Exam extends AbstractModel implements ExamInterface
{
protected function _construct()
{
$this->_init(\Hiberus\Garci... | true |
197f0fbccabe50f0b062843f6cf1803d9603ca8b | PHP | TxxmmvSFn9saf/alarm | /pattern/creational/factoryMethod/Marketingmanager.php | UTF-8 | 311 | 2.640625 | 3 | [] | no_license | <?php
require_once 'HiringManager.php';
require_once 'CommunityExecutive.php';
/**
* Class Marketingmanager
*/
class Marketingmanager extends HiringManager
{
/**
* @return Interviewer
*/
public function makeInterViewer (): Interviewer
{
return new CommunityExecutive();
}
} | true |
3b7b2909cc60954b98eca3154e7b6698bba508be | PHP | d3yii2/d3system | /dictionaries/SysModelsDictionary.php | UTF-8 | 3,621 | 2.734375 | 3 | [] | no_license | <?php
namespace d3system\dictionaries;
use ReflectionMethod;
use Yii;
use d3system\models\SysModels;
use yii\helpers\ArrayHelper;
use d3system\exceptions\D3ActiveRecordException;
use yii\helpers\VarDumper;
class SysModelsDictionary{
private const CACHE_KEY_LABEL_LIST = 'SysModelsDictionaryList';
private con... | true |
5a992d7696bccf1af8de4c5e62bd2685a8e9f68f | PHP | yinsongbj/tinychain | /common/rc4.php | UTF-8 | 914 | 3.15625 | 3 | [] | no_license | <?php
/*
$pwd password
$data data
*/
function rc4($data, $pwd)
{
$cipher = '';
$key[] = "";
$box[] = "";
$pwd_length = strlen($pwd);
$data_length = strlen($data);
for ($i = 0; $i < 256; $i++) {
$key[$i] = ord($pwd[$i % $pwd_length]);
$box[$i] = $i... | true |
aec54743d0e8462c3ba395d7d42aa751081ab987 | PHP | sethrandall/f5backup | /src/ui/users.php | UTF-8 | 2,073 | 2.9375 | 3 | [] | no_license | <?php
/* RBAC permissions
Add the role ID to the permissions array for the required
level to restrict access. Remove the permissions array to
allow all.
$permissions = array(1,2,3);
1 - Administrator
2 - Device Admin
3 - Operator
4 - Guest
*/
$permissions = array(1);
include("include/session.php");
include("includ... | true |
f25440ab520272b4c769c00adcc7c4a34aa19a51 | PHP | zbQAQ/laravel-blog | /app/Http/Model/GoodsCate.php | UTF-8 | 1,869 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Model;
use Illuminate\Database\Eloquent\Model;
class GoodsCate extends Model
{
//
protected $table = 'goodsCate';
protected $primaryKey ='gcate_id';
public $timestamps = false;
protected $guarded = [];
//获取商品分类 $cate $data是传过来的商品列
public function getGo... | true |
a69cc8b7b540baab27cc0662252dde56e2bfed6e | PHP | marcjoancr/cronose-api | /controllers/WorkDemand.controller.php | UTF-8 | 752 | 2.625 | 3 | [] | no_license | <?php
require_once '../dao/WorkDemand.dao.php';
class WorkDemandController {
public static function getCard($card_id) {
return WorkDemandDAO::getCard($card_id);
}
public static function getAllCards($worker_id, $client_id, $specialization_id) {
return WorkDemandDAO::getCards($worker_id, $client_id, $sp... | true |
ec67e0107e7ec5fe7125f7cbdb5d019764f01594 | PHP | lily-PHP/login | /app/Models/Entity/ZhUser.php | UTF-8 | 8,406 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Models\Entity;
use Swoft\Db\Model;
use Swoft\Db\Bean\Annotation\Column;
use Swoft\Db\Bean\Annotation\Entity;
use Swoft\Db\Bean\Annotation\Id;
use Swoft\Db\Bean\Annotation\Required;
use Swoft\Db\Bean\Annotation\Table;
use Swoft\Db\Types;
/**
* 区域用户表
* @Entity()
* @Table(name="zh_user")
* @uses... | true |
b5a57db3196a5bfd49b17b5ad5773ee565cafa7c | PHP | rebider/TD | /app/Diamond.php | UTF-8 | 1,325 | 2.5625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Support\DataViewer;
class Diamond extends Model
{
use DataViewer;
protected $hidden = array('supplier_id', 'stock');
protected $fillable = [
'id', 'price', 'stock', 'certificate', 'shape', 'weight', 'color', 'clarity', 'cut', 'polis... | true |
c9cf3db0bd1006a95f4e10fa46aa4db716fbefeb | PHP | Gvieirabriel/logiclearn | /www/crud/listarListas.php | UTF-8 | 830 | 2.53125 | 3 | [] | no_license | <?php
$conn = include_once('mysql.inc.php');
$vari = 0;
$sql = "select * from tbListaExercicio";
$res = mysqli_query($conn, $sql);
echo "<center>";
echo "<a href='/crud/home.php'>Home</a>";
echo " | ";
echo "<a href='form.php'>Novo</a> <br/><br/>";
echo "<table border='1px' style='width:80%'>";
ec... | true |
b35f9a0abe0d48f8ecaa47e4c2113077298734f3 | PHP | gwhitcher/GWPRESS | /gw-content/themes/gwpress/functions.php | UTF-8 | 2,109 | 3.046875 | 3 | [] | no_license | <?php
/* DROP DOWN NAV FUNCTIONS */
function prepareList(array $items, $pid = 0) {
$output = array();
foreach ($items as $item) {
if ((int) $item['parent_id'] == $pid) {
if ($children = prepareList($items, $item['id'])) {
$item['children'] = $children;
}
... | true |
aada2c32b0f6d6d047783946fbec21722053326e | PHP | REKA-DEV/php-filesystem | /FileSystem/Folder.php | UTF-8 | 455 | 2.953125 | 3 | [] | no_license | <?php
namespace reka\FileSystem;
class Folder extends Entity
{
protected $type = "folder";
public function __construct(string $path, bool $create = false, FileSystem $system = null)
{
parent::__construct($path, $create, $system);
$this->updateInformation();
}
protected function calcSize()
... | true |
40420293902b9a6e7717823686a9efc3de09ab6b | PHP | sop/jwx | /lib/JWX/JWT/Claim/Validator/ContainsValidator.php | UTF-8 | 577 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Sop\JWX\JWT\Claim\Validator;
/**
* Validator to check whether the claim value contains a given constraint.
*
* If the claim value is an array, validator checks whether the array contains
* a constraint. Otherwise variable equality is tested.
*/
class ContainsValidator ... | true |
3a4899cb0a561c67b18cef5094e00aa10f4899b1 | PHP | BaineGames/skinshop-timeclock | /api/runReport.php | UTF-8 | 1,564 | 2.59375 | 3 | [] | no_license | <?php
require_once('../db.php');
$data = array();
$input = json_decode(file_get_contents('php://input'),true);
$startDate = $input['startDate'];
$endDate = $input['endDate'];
$withNotes = $input['withNotes'];
$user_id = $_SESSION['user_id'];
if(!$endDate){
$date_sql = " DATE(timeclock.clock_in) = :start_date "... | true |
07c430d9ae3e22569bc252b41e01036aa306f72a | PHP | expertenpool/hsgym | /functions/get_fach_entries.php | UTF-8 | 486 | 2.515625 | 3 | [] | no_license | <?php
include ("mysql_connect.php");
// Es werden alle zur Verfügung stehenden Fächer von der Datenbank abgeholt:
$sql = sprintf("SELECT * FROM fach ORDER BY UPPER(name)");
$res = mysql_db_query( "hsgym-ep", $sql );
$fach_anzahl = mysql_num_rows($res);
$fach_DATA = array();
$fach_DATA_ID = array();
... | true |
5e8db37a5300dbd6466e4ff8faaab27df9bfe744 | PHP | andrewjohnston99/SouthfaceEquityEvaluator | /vendor/prismic/php-sdk/src/Prismic/Dom/Date.php | UTF-8 | 384 | 3.09375 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Prismic\Dom;
class Date
{
/**
* Returns the date as a DateTime object
*
*
* @param string $date The date as a string
*
* @return \DateTime The DateTime object representing the date
*/
public static function asDate($date)
{
... | true |
c40bb8e8788b98f6509497f0a7ac5dee467e4673 | PHP | edgarsn/laravel-tms-api-client | /src/Endpoints/Media/Delete.php | UTF-8 | 1,616 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Newman\LaravelTmsApiClient\Endpoints\Media;
use Newman\LaravelTmsApiClient\AbstractEndpoint;
use Newman\LaravelTmsApiClient\Contracts\EndpointContract;
use Newman\LaravelTmsApiClient\Enums\AuthMethodEnum;
use Newman\LaravelTmsApiClient\Enums\HttpMethodEnum;
use Newman\Laravel... | true |
82b0be20d9d17d7508f2a4b5f42f1e5158a76884 | PHP | BGCX261/zoombi-svn-to-git | /tags/0-6-0/Zoombi/Net/response.php | UTF-8 | 8,334 | 2.859375 | 3 | [] | no_license | <?php
/*
* File: response.php
* Author: Andrew Saponenko <roguevoo@gmail.com>
* Description: Class for Zoombi PHP Framework
*/
if(!defined('ZBOOT'))
return;
/**
*
*/
class ZResponse implements IZSingleton
{
private $m_headers;
private $m_content;
private $m_code;
private $m_message;
... | true |
a2eddf070061424b723df5d650237a8ce847d536 | PHP | ridwanzal/edo_mvc | /application/controllers/Blog.php | UTF-8 | 4,862 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Blog extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->helper('url');
}
public function submit_blog(){
if($this->session->userdata('status') != "login"){
redirect(base_url(... | true |
4e73ec0a2f1bbfdc6724f64ee5011c9958187446 | PHP | Koss10/kw-h.info | /module/Application/src/Model/Device.php | UTF-8 | 2,386 | 3.1875 | 3 | [] | no_license | <?php
namespace Application\Model;
class Device
{
private $id;
private $category;
private $model;
private $manufacturer;
private $power;
private $release_date;
private $property;
private $description;
public function __construct($id, $category, $model, $manufactur... | true |
4f1140d058a999281532e0b04b5ad9d1ce625a09 | PHP | isaqib23/Panafrican | /app/Http/Controllers/NotesController.php | UTF-8 | 4,350 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Repositories\AccountsRepositoryEloquent;
use App\Repositories\ActivityRepositoryEloquent;
use App\Repositories\ContactRepositoryEloquent;
use App\Repositories\LeadsRepositoryEloquent;
use App\Repositories\OpportunityRepositoryEloquent;
use App\Transformers\NotesTransforme... | true |
d9e8d6c1564ca9f2a88bd026292eae7c7a58c0af | PHP | npabisz/shopify | /src/Resources/Inventory/InventoryLevel.php | UTF-8 | 3,092 | 2.65625 | 3 | [] | no_license | <?php
namespace Yorki\Shopify\Properties\Inventory;
use Yorki\Shopify\Criteria\Inventory\InventoryLevelCriteria;
use Yorki\Shopify\Resources\Base;
use Yorki\Shopify\Resources\Traits\GetsAll;
use \Carbon\Carbon;
/**
* @property-read Carbon $updated_at
*
* @property int $inventory_item_id
* @property int $locatio... | true |
42d19a6e1779a3a00fefae93950469df77946c6b | PHP | cleong98/Catalog | /insert_book.php | UTF-8 | 3,763 | 2.875 | 3 | [] | no_license |
<?php
//require some tools
require './utils/utils.php';
require_once './db.php';
try {
$sql = "SELECT * FROM catalogs ";
$rows = $pdo->query($sql)->fetchAll(PDO::FETCH_OBJ);
} catch (PDOException $e) {
}
//check post method is post and must be regis... | true |
e60feb086be027f4ed8034b48d91c1bb13c5dd61 | PHP | Sergejs-B/test | /PHP/Classes/disc_class.php | UTF-8 | 345 | 3.21875 | 3 | [] | no_license | <?php
class Disc extends Product {
function __construct(string $sku,string $name,string $price, string $attribute, string $disc){
parent:: __construct($sku, $name, $price,$attribute);
$this->set_attribute($disc);
}
function set_attribute($disc) {
$this->attribute = 'Size: ' .$disc."... | true |
f5652264f6b9e206c9b8902aa9c20e9d220c089e | PHP | krutik2403/laravel-vue-list-app | /app/Http/Controllers/UsersController.php | UTF-8 | 3,192 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\User;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
class UsersController extends Controller
{
public function index(User $user)
{
try {
return response()->json... | true |