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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d473f2e737f8d5b4181b2e7eff28e05e9c59f63d | PHP | IvayloIV/PHP-Web-Basics | /PHP-Web-Basics-May-2019/Lab-Interfaces_and_Abstraction/04.Hardware_Devices/Mobile.php | UTF-8 | 568 | 3.453125 | 3 | [
"MIT"
] | permissive | <?php
abstract class Mobile {
/**
* @var string
*/
private $operator;
public function __construct(string $operator)
{
$this->setOperator($operator);
}
/**
* @return string
*/
public function getOperator(): string
{
return $this->operator;
}
... | true |
ea3378e12b81dc17afe1967c8c1ad3ac9e108e1c | PHP | yooqin/yooqin.com | /www/app/Http/ViewComposers/FooterComposer.php | UTF-8 | 1,171 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\ViewComposers;
use Illuminate\View\View;
use Illuminate\Support\Facades\Route;
use App\Yooqin\Models\Blog;
use App\Yooqin\Decorator\BlogDecorator;
use App\Yooqin\Consts\BlogConst;
class FooterComposer
{
/**
* Bind data to the view.
*
* @param View $view
* @return ... | true |
d39bd51ae9706daba02656a0bbc9ecd5a913230a | PHP | leiviton/arca | /app/Http/Controllers/ContactController.php | UTF-8 | 1,390 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ContactController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public fu... | true |
71039b520c287e6f5c40b3c27058c77ee4326775 | PHP | fly85/codility | /lesson4/MissingInteger.php | UTF-8 | 634 | 3.484375 | 3 | [] | no_license | <?php
/**
* @param array $A a non-empty zero-indexed array of N integers
* @return integer the minimal positive integer (greater than 0) that does not occur in $A
*
* @see https://codility.com/programmers/task/missing_integer/
* @see https://codility.com/demo/results/trainingP57R8F-6FB/
*/
function solution($A) ... | true |
236c78c8c801a705e8cb54fb348554d43a429118 | PHP | rauldolores/Inova-360-Website | /clases/Paises.php | UTF-8 | 5,026 | 2.828125 | 3 | [] | no_license | <?php
include_once("Log.php");
include_once("Idiomas.php");
include_once("ZonasAdministrativas.php");
include_once("Ciudades.php");
class Paises{
public $CONEXION;
public $LOG;
public $CONFIG;
function __construct() {
$this->CONEXION = new Mongo();
$this->LOG = new Log();
}
functi... | true |
b6bc5e4262cd398857fecc6f9aa4b3e398eb0ead | PHP | Ehtycs/ttss-treenis | /app/Model/LoginAccount.php | UTF-8 | 3,132 | 2.59375 | 3 | [] | no_license | <?php
App::uses('BlowfishPasswordHasher', 'Controller/Component/Auth');
class LoginAccount extends AppModel {
public $actsAs = array('Containable');
public $belongsTo = array(
'Band',
'Member',
);
public $validate = array(
'username' => array(
'required' => array(
'rule' => array('notE... | true |
2995a59a2cd8663eea7442ab7dba904ba05fba92 | PHP | singhpushkar978/Chatroom | /db_connect.php | UTF-8 | 385 | 2.53125 | 3 | [] | no_license | <?php
#these are when u first time install xampp and u don't change anything
$servername ="localhost";
$username ="root";
$password ="";
$database ="chatroom";
//creating database connection
$conn= mysqli_connect( $servername, $username, $password, $database);
//checking connection
if(!$conn)
{... | true |
2a4f5269bc5e89e47c663cc982d4da074d4c95a3 | PHP | mahmud83/simpegptt | /app/Base/Traits/ResCacheTrait.php | UTF-8 | 11,063 | 2.625 | 3 | [] | no_license | <?php
namespace App\Base\Traits;
use Illuminate\Support\Facades\Cache;
use Carbon\Carbon;
trait ResCacheTrait {
protected $cacheData;
protected $cacheIndex;
protected $cacheIndexField=[];
/*
* $_cachedMethod array list nama method berdasarkan prefix (groupdata) nya
... | true |
d1cecc636725302c9e15744dbb39a665904bd26f | PHP | RikudouSage/ReflectionFile | /src/Parser/Token.php | UTF-8 | 835 | 3.28125 | 3 | [
"WTFPL"
] | permissive | <?php
namespace Rikudou\Parser;
class Token
{
/**
* @var int
*/
private $type = T_UNKNOWN;
/**
* @var string
*/
private $typeString;
/**
* @var string
*/
private $content;
/**
* Token constructor.
*
* @param array<mixed>|string $token
*/... | true |
c262e34b2fba2ecaf651ac8848307c067e2a8e93 | PHP | tenchoo/gitUeliao_gz | /manage/application/modules/member/controllers/LevelController.php | UTF-8 | 2,005 | 2.71875 | 3 | [] | no_license | <?php
/**
* 会员等级管理模块控制器
* @access 会员等级
* @author liang
* @package Controller
*/
class LevelController extends Controller {
/**
* 显示会员等级列表
* @access 会员等级
*/
public function actionIndex() {
$keyword = Yii::app()->request->getQuery('keyword');
$criteria = new CDbCriteria;
if( $keyword ){
$criteria... | true |
666a4b6f8d56b52084e44e268aa47aa3bcfcf529 | PHP | PrajaktaSoftware/php-family-tree | /bin/cli_libs/cli_utilities.php | UTF-8 | 3,551 | 3.078125 | 3 | [] | no_license | <?php
/**
* Helper functions during CLI execution, each prefixed with cli_ to avoid name crashing.
*/
// Used to collect messages and errors temporarily. See chmod() as an example.
global $_messages, $_errors;
/**
* Change the mode on a directory structure recursively. This includes changing the mode on files as ... | true |
d9619d204d8aa3d0247535b33c762406902afff4 | PHP | JaimeKata/RepositorioPhp | /ArrayTiendaVerduras/index.php | UTF-8 | 1,209 | 2.53125 | 3 | [] | no_license | <?php
$productos = [
'lechuga' => ['unidades' => 200,
'precio' => 0.90],
'tomates' => ['unidades' => 2000,
'precio' => 2.15],
'cebollas' => ['unidades' => 3200,
'precio' => 0.49],
'fresas' => ['unidades' => 4800,
'precio' => 4.50],
'manzanas' => ['unidades' => 2500,
... | true |
bbe35b23dbd50ee3626ff6df1775b249078f3f34 | PHP | DavidCao626/server | /app/EofficeApp/XiaoE/Repositories/XiaoELogRepository.php | UTF-8 | 2,542 | 2.546875 | 3 | [] | no_license | <?php
namespace App\EofficeApp\XiaoE\Repositories;
use App\EofficeApp\Base\BaseRepository;
use App\EofficeApp\XiaoE\Entities\XiaoELogEntity;
class XiaoELogRepository extends BaseRepository
{
public function __construct(XiaoELogEntity $entity)
{
parent::__construct($entity);
}
/**
* 监控数... | true |
1a12a336f5811c2e0fceab3eca0d22ad1a471fe0 | PHP | altamuran/ProgettoTestInteractionCorp | /database/factories/ModelFactory.php | UTF-8 | 2,916 | 2.59375 | 3 | [] | no_license | <?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding yo... | true |
39e3867a78764815d0b54101c8e4bf5a565323f1 | PHP | kfitzgerald/coders-survey | /lib/CodersSurvey/SurveyResult.class.php | UTF-8 | 3,137 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Coder's Survey
*
* @author Ulrich Kautz <uk@fortrabbit.de>
* @copyright 2012 Ulrich Kautz
* @link http://coderssurvey.com
* @version 1.0.0
* @package CodersSurvey
*
* Playing around with 5.4..
*
* MIT LICENSE
*
* Permission is hereby granted, free of charge, to any person ... | true |
ab8a430800112d0f7d4476991802bea4e0a3a5bf | PHP | ustcomp3111/comp3111project | /event.php | UTF-8 | 605 | 2.734375 | 3 | [] | no_license | <?php
require("config.inc.php");
if(!empty($_POST)) {
$output = array();
$username= $_POST['username'];
$query = "SELECT * FROM event WHERE holder = '$username' ";
$result = mysql_query($query) or die("Could not get response: " . mysql_error());
while ($row = mysql_fetch_assoc($result))
$output[] = $row... | true |
236d08f8eba91f6237ac865f39d9a12d6c860cf5 | PHP | yannlo/image-ressource | /tests/ImageTest.php | UTF-8 | 2,902 | 2.671875 | 3 | [] | no_license | <?php
namespace Yannlo\Tests;
use PHPUnit\Framework\TestCase;
use Yannlo\ImageRessource\Image;
use Yannlo\ImageRessource\Exceptions\ImageException;
class ImageTest extends TestCase
{
public function setUp(): void
{
$this-> data =[
"name" => "img23_".Image::MEDIUM_SIZE,
"type" ... | true |
97e3120323d32addaeaee3ccc9026f427b673d6c | PHP | oargoub/Formalab-php-1 | /php/config.php | UTF-8 | 619 | 3.171875 | 3 | [] | no_license | <?php
//definition d'une fonction de connexion à la base de données
function connexion(){
$server = 'localhost';
$base = 'travail';
$username = 'root';
$password = '';
try{
//connexion base données
//creation d'un objet de connexion
$con = new PDO("mysql:host=$server;dbnam... | true |
e651774da1711554f353e3ba858893a85f7ed258 | PHP | GlobalFreightSolutions/magento2-gfs | /Gfs/Helper/Pdf.php | UTF-8 | 3,440 | 2.734375 | 3 | [] | no_license | <?php
namespace JustShout\Gfs\Helper;
use JustShout\Gfs\Model\Carrier\Gfs;
use Magento\Sales\Model\Order;
/**
* Pdf Helper
*
* @package JustShout\Gfs
* @author JustShout <http://developer.justshoutgfs.com/>
* @copyright JustShout - 2019
*/
class Pdf extends Data
{
/**
* This method will get a des... | true |
2c8b58118cb8c8adb80b3c61084e63bc4501b022 | PHP | Dmitriy-Volkov18/I-SHOP | /signup.php | UTF-8 | 2,823 | 2.5625 | 3 | [] | no_license | <?php
if(isset($_POST['sign_in_btn']))
{
require("includes/db_connect.php");
$username = $_POST['username'];
$email = $_POST['email'];
$password = $_POST['password'];
$reppassword = $_POST['reppassword'];
if(empty($username) || empty($email) || empty($password) ... | true |
1359afc984831bfc89cfc7bceb175532dce4e477 | PHP | halimus/laraswagger | /app/Http/Controllers/Api/FieldController.php | UTF-8 | 3,290 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Dingo\Api\Routing\Helpers;
use App\Models\Field;
use Illuminate\Support\Facades\Validator;
class FieldController extends Controller {
use Helpers;
/**
* Display a listing of the resourc... | true |
b03297e1c0c8b4fd41dd384d5d8056f7a16b4926 | PHP | noname007/food_book_system | /CMenuList.php | UTF-8 | 1,000 | 2.640625 | 3 | [] | no_license | <?php
// const DATAFILEFOLD ='';
// const PREFIX_FOODID = 'food_id';
class CMenuList
{
private $menulistFile ='';
function __construct($menulistFile='')
{
date_default_timezone_set('PRC');
$this->menulistFile = $menulistFile;
}
function select($file='')
{
if(empty($file))
{
$file = $... | true |
63fe1103660556388fc11d8c77da530ef39ebe4a | PHP | andropplelab/amazing | /app/Repositories/VersionInterface.php | UTF-8 | 866 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: wasif
* Date: 5/17/19
* Time: 8:36 PM
*/
namespace App\Repositories;
use \App\Version as Model;
use Illuminate\Pagination\LengthAwarePaginator;
/**
* Interface VersionInterface
* @package App\Repositories
*/
interface VersionInterface
{
/**
* @return int
... | true |
f427afb16c2afa6b85e94910f94e07288b34471a | PHP | javonmoatt/JohnShopProject | /app/Providers/AppServiceProvider.php | UTF-8 | 766 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Contracts\Repos\IProductRepository;
use App\Repos\Eloquent\ProductRepository;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function regi... | true |
ac85348e8402cffdadee369ae8a24cd1f50d111e | PHP | OpenMageModuleFostering/searchspring_manager | /app/code/community/SearchSpring/Manager/VarienObject/Data.php | UTF-8 | 1,977 | 3.078125 | 3 | [] | no_license | <?php
/**
* Data.php
*
* @copyright B7 Interactive, LLC. All Rights Reserved.
*/
/**
* Class SearchSpring_Manager_VarienObject_Data
*
* Performs operations on Varien_Objects
*
* @author Nate Brunette <nate@b7interactive.com>
*/
class SearchSpring_Manager_VarienObject_Data
{
/**
* Finds updated data ... | true |
41ffd917b537f9f3d5dadec69889746bb4ec6c25 | PHP | katsana/katsana-sdk-php | /tests/One/Vehicles/TestCase.php | UTF-8 | 6,038 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Katsana\Sdk\Tests\One\Vehicles;
use Katsana\Sdk\Tests\TestCase as SdkTestCase;
use Laravie\Codex\Contracts\Response;
use Laravie\Codex\Testing\Faker;
abstract class TestCase extends SdkTestCase
{
/**
* Response to today.
*
* @param int $vehicleId
* @param string $resource
... | true |
fcc48e360161277dcd16d80f8b8301abe26bb289 | PHP | luigif/WsdlToPhp | /samples/xignite-bondsrealtime/Bond/Sale/XiBondsRealTimeTypeBondLastSale.php | UTF-8 | 7,202 | 2.734375 | 3 | [] | no_license | <?php
/**
* Class file for XiBondsRealTimeTypeBondLastSale
* @date 08/07/2012
*/
/**
* Class XiBondsRealTimeTypeBondLastSale
* @date 08/07/2012
*/
class XiBondsRealTimeTypeBondLastSale extends XiBondsRealTimeWsdlClass
{
/**
* The ShortName
* Meta informations :
* - minOccurs : 0
* - maxOccurs : 1
* @... | true |
0d207dafd29c74a5398d11ffabe1bc415a480ef7 | PHP | Yorickov/slim-dev | /src/models/User.php | UTF-8 | 826 | 2.953125 | 3 | [] | no_license | <?php
namespace Slim\Dev\Models;
class User
{
private $id;
private $passwordDigest;
public function __construct($nickname, $password)
{
$this->nickname = $nickname;
$this->password = $password;
}
public function setId($id)
{
$this->id = $id;
}
public func... | true |
349d139e544a6b2e7e873c16b3772a5adb722440 | PHP | liuyu0723/i_service | /application/library/convertor/TaskCategory.php | UTF-8 | 864 | 2.703125 | 3 | [] | no_license | <?php
/**
* Convertor for task category
*/
class Convertor_TaskCategory extends Convertor_Base
{
public function __construct()
{
parent::__construct();
}
/**
* Convert data list for output
*
* @param $list
* @param $count
* @param $param
* @return array
*/... | true |
effe69722d30c6ad2e8d602cefb38f01d9a0b5cf | PHP | TeoConan/ATHome | /product/models/typeModel.php | UTF-8 | 1,766 | 3.125 | 3 | [] | no_license | <?php
//include_once("../objects/piece.php");
class typeModel
{
public static $var = 'test de class static';
/*public static function newStyle($piece){
PDOModel::insertSQL('piece',
"`prix`,
`dimensions`,
`img_present`,
`img_slide`,
`ref`,
`id`,
`label`,... | true |
8668349cae49b5d57971e061100496be952d161a | PHP | vimalvas0/cms_edwin_diaz | /admin/includes/admin_show_users.php | UTF-8 | 2,940 | 2.671875 | 3 | [] | no_license |
<table class="table table-bordered">
<thead>
<tr>
<th>Id</th>
<th>Username</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>User Image</th>
<th>Role</th>
<th... | true |
e2bad0b920a55317ed2873719d8ba98e8b3adf37 | PHP | SoldierVega/SIRSJ1 | /application/models/pojo/tiemde_pojo.php | UTF-8 | 2,096 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of tiemde_pojo
*
* @author Diego
*/
class TiemdePojo {
private $idDetalleTM;
... | true |
381b02dfc6f59efe181a7c6effc509b4d39c364b | PHP | guilhermebussidias/AW-3.0 | /src/App.php | UTF-8 | 3,845 | 2.71875 | 3 | [] | no_license | <?php
require_once dirname(__DIR__) . "/config/config.php";
/******************************************************************************/
session_start();
/******************************************************************************/
spl_autoload_register(function ($class) {
// project-specific namespace... | true |
e353fc7565ac13fb16c1610f5cf775684aae1fee | PHP | neversettle7/ProgettoLAM | /include/functions.php | ISO-8859-1 | 4,259 | 3.015625 | 3 | [] | no_license | <?php
/*
* LIBRERIA CONTENENTE LE FUNZIONI ESTERNE UTILIZZABILI
*/
// Questa funzione serve per connettersi al db e effettuare operazioni
function connect($query) {
$db_host = "localhost";
$db_user = "root";
$db_pass = "root";
$db_name = "lamdb";
// Connessione al database
//function db_connect() {
//inc... | true |
d32837e85e3a672e88f94ae469a714b55f7bac82 | PHP | ibrahem-ammar/rms | /database/seeders/BranchSeeder.php | UTF-8 | 823 | 2.703125 | 3 | [] | no_license | <?php
namespace Database\Seeders;
use App\Models\Branch;
use App\Models\Publicadministration;
use App\Models\User;
use Faker\Factory;
use Illuminate\Database\Seeder;
class BranchSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$... | true |
eb286b9603af661b55975a9548ca87299422b485 | PHP | LeonClancy/asbs | /application/controllers/Activity.php | UTF-8 | 1,509 | 2.546875 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Activity extends CI_Controller{
public function __construct()
{
parent::__construct();
$this->load->library('session');
$this->load->model('Activity_model');
}
public function addActivity()
{
i... | true |
a3b0fc0c17b9d1bc2d5fb106dd79b687e5dee612 | PHP | andreyvit/retester | /lib/carriers.inc.php | UTF-8 | 636 | 2.53125 | 3 | [] | no_license | <?php
global $countries, $js_carriers;
$js_carriers = file_get_contents(dirname(__FILE__).'/../javascripts/carriers.js');
$js_carriers = str_replace('all_carriers = [', '[', $js_carriers);
$js_carriers = str_replace('];', ']', $js_carriers);
$js_carriers = json_decode($js_carriers);
$countries = array();
foreach($js... | true |
10240660c745910aa4137aed0399530e4b2e425c | PHP | Azz0k/schoolsite | /test/connect/includes/htmlout.inc.php | UTF-8 | 87 | 2.5625 | 3 | [] | no_license | <?php
function htmlOut($text){
echo htmlspecialchars($text, ENT_QUOTES,'UTF-8');
}
| true |
0a7158b528bb99469481bbd419adafcb4fd534a3 | PHP | fheer/activos | /application/models/Estado_model.php | UTF-8 | 1,503 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class Estado_model extends CI_Model
{
function __construct()
{
parent::__construct();
}
/*
* Get all records of estado
*/
function get_all_estado()
{
$this->db->where('eliminado=1');
$this->db->order_by('estado', 'asc');
return $this->db->get('estado')->result_array();
}
/*
* Get... | true |
69c03901bd73e41b26f805b9fd378cd33a36197a | PHP | nitishdola/rental | /app/Http/Controllers/ElectricityUnitsController.php | UTF-8 | 3,110 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\ElectricityUnit, App\Bill;
use Redirect, DB, Validator;
class ElectricityUnitsController extends Controller
{
public function create() {
return view('electricity_units.create', compact('units'));
}
pu... | true |
ae021c29ae1a797a7892f23e294737984c190f43 | PHP | goulahyane/Logements-Universitaires | /src/Ben/LogementBundle/Entity/University.php | UTF-8 | 3,631 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ben\LogementBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* University
*
* @ORM\Table(name="university")
* @ORM\Entity(repositoryClass="Ben\LogementBundle\Entity\UniversityRepository")
*/
class University
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
... | true |
66897b46244a21fe7c2a7e1f18e54d65d5d8d2e4 | PHP | Paoke/paoding_new | /Application/Admin/Logic/AdPositionLogic.class.php | UTF-8 | 2,902 | 2.578125 | 3 | [] | no_license | <?php
namespace Admin\Logic;
use Common\Logic\BaseLogic;
use Think\Log;
/**
* 广告逻辑
* @package Admin\Logic
*/
class AdPositionLogic extends BaseLogic
{
private $DAO = null;//当前表操作对象
private $assign = null;//输出模板的变量
private $is_assign = true;//是否输出模式
public function __construct()
{
paren... | true |
96e729363f1ee6266378af6ddad069d3f31f4543 | PHP | DigitalOceanPHP/Client | /src/Api/Monitoring.php | UTF-8 | 7,633 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of the DigitalOcean API library.
*
* (c) Antoine Kirk <contact@sbin.dk>
* (c) Graham Campbell <hello@gjcampbell.co.uk>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namesp... | true |
b439e34dc8ca47470d9195b67a5e5c4a25711b27 | PHP | Georginfanger/georginfanger.ch | /classes/basemodel.php | UTF-8 | 1,191 | 2.96875 | 3 | [] | no_license | <?php
/**
* Description of BaseModel
*
* @author georginfanger <me@georginfanger.ch>
*
*
*/
class BaseModel {
protected $viewModel;
protected $model;
//create the base and utility objects available to all models on model creation
public function __construct($admin = false) {
... | true |
3889d213bb89728ef3370fbd3fb3b9030627228d | PHP | Qevg/filehosting | /twig/Extensions/JsonDecodeExtension.php | UTF-8 | 733 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Filehosting\Twig\Extensions;
/**
* Class JsonDecodeExtension
* @package Filehosting\Twig\Extensions
*/
class JsonDecodeExtension extends \Twig_Extension
{
public function getFunctions()
{
return array(
new \Twig_SimpleFunction('json_decode', array($this, 'jsonDecode'))
... | true |
c758e4e58ed94275fb00d99927436f3e8af83fd1 | PHP | kresna1174/wifi | /app/Libraries/Arr.php | UTF-8 | 320 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Libraries;
class Arr {
public static function map($data, $index, $value) {
$result = [];
foreach ($data as $row) {
if (is_array($row)) {
$result[$row[$index]] = $row[$value];
} else {
$result[$row->$index] = $row->$value;
}
}
return $result;
}
} | true |
506366a30210d7a90be9e44b32e4290985e6f2bd | PHP | KonakovBG/Server | /learning/php/contact_book/php/contact_form.php | UTF-8 | 1,388 | 2.65625 | 3 | [] | no_license | <?php
require __DIR__ . '/../vendor/autoload.php';
$error = [];
$contact_info = [];
function test_input($data){
$data = trim($data);
$data = stripcslashes($data);
$data = htmlspecialchars($data);
return $data;
}
$rules = [
'fname' => 'required',
'lname' => 'required',
'phone' => 'requiredPho... | true |
83b61c652930caf1da9f0673c98f41a975739bcb | PHP | mohammadv184/laravel-cart | /src/CartService.php | UTF-8 | 9,191 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Mohammadv184\Cart;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use Mohammadv184\Cart\Models\Cart;
class CartService
{
/**
* the cart items.
*
* @var Collection
*/
protected $cart;
/**
* the cart session k... | true |
9c766486f95e1f7c7a29982dfeff49ad7021f221 | PHP | fikky123/Claim-System | /class/company.php | UTF-8 | 3,109 | 2.84375 | 3 | [] | no_license | <?php
class Company{
private $_data,
$_db;
public function __construct(){
$this->_db = Database::getInstance();
}
public function data(){
return $this->_data;
}
public function lastinsertid(){
return $this->_db->lastInsertId();
}
public static function exists($name){
return (!empty($this->_da... | true |
6a36e0a0197e9088b15bebc81b18962fa8df08e8 | PHP | JesusHuertaMtz/elidoM0JZ3 | /ESCOMobileServer/webServices/RegistrarEmpresa.php | UTF-8 | 2,393 | 2.5625 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
require_once( $_SERVER['DOCUMENT_ROOT'].'ESCOMobileServer/conf/configWebService.php' );
require_once( $_SERVER['DOCUMENT_ROOT']... | true |
0a92fffbe83e92b55f3c7ef5a95bbd02e53eec70 | PHP | ermaccer/manhunt-toolkit | /src/Service/Compiler/Tokens/T_SUBSTRACTION.php | UTF-8 | 377 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Service\Compiler\Tokens;
class T_SUBSTRACTION {
static public function match( $input, $current, $tokens ){
$char = strtolower(substr($input, $current - 1, 3));
if ($char == " - "){
return [
'type' => 'T_SUBSTRACTION',
'value' => "-"... | true |
75553d20d7fc13c04e72563bd06fbd600be29808 | PHP | Bright-Tech/cms | /app/Models/Category.php | UTF-8 | 932 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Watson\Validating\ValidatingTrait;
/**
* Class Category
* @package App\Models
*/
class Category extends Model
{
use SoftDeletes;
/**
* 对应表名
*
* @var string
*/
publi... | true |
4d8e0365284273eca91b2ceb52ff8097cc812808 | PHP | toddjustin345/ajax_tutorial_setup | /add_task.php | UTF-8 | 583 | 2.65625 | 3 | [] | no_license | <?php
session_start();
/* Process the form for creating a new task */
if (inputValid('title') && inputValid('description')) {
// all good, we're gonna create new Task
$_SESSION['tasks'][] = [
'title' => $_POST['title'],
'description' => $_POST['description']
];
} else {
header... | true |
35455d4f3a4855b75f2ca6fc177aa61824cda991 | PHP | ahmedsoliman8/ecommercestore | /app/Models/OrderTransaction.php | UTF-8 | 1,296 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class OrderTransaction extends Model
{
use HasFactory;
protected $guarded = [];
const NEW_ORDER = 0;
const PAYMENT_COMPLET... | true |
42ff5d73f715ed868629fa6d04f359ec71d370ee | PHP | CHStudio/Raven | /src/Validator/Expectation/ExpectationCollection.php | UTF-8 | 681 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace CHStudio\Raven\Validator\Expectation;
use ArrayIterator;
use IteratorAggregate;
/**
* @implements IteratorAggregate<int, ResponseExpectationInterface>
*/
class ExpectationCollection implements IteratorAggregate
{
/**
* @var ResponseExpectationInterface[]
*/
private readonly array ... | true |
85eb41f0f5c01c23fe51b57e9444e4ccfd533c53 | PHP | Hywan/pickle | /src/Package/HHVM/Util/Cmake/Parser.php | UTF-8 | 1,253 | 2.734375 | 3 | [] | no_license | <?php
namespace Pickle\Package\HHVM\Util\Cmake;
use Composer\Package\Loader\LoaderInterface;
class Parser
{
protected $loader;
public function __construct(LoaderInterface $loader)
{
$this->loader = $loader;
}
public function load($path)
{
if (false === is_file($path)) {
... | true |
489eb20773f72fbcd94860744a5e7e05ec73b881 | PHP | quoris/PHP | /shelterPetsWebsite/application/controllers/controller_animals.php | WINDOWS-1251 | 1,216 | 2.703125 | 3 | [] | no_license | <?php
class Controller_Animals extends Controller{
function __construct(){
$this->model = new Model_Animals();
$this->view = new View();
}
function action_index(){
$data = $this->model->get_data();
$this->view->generate('animals_view.php', 'template_view.php', $... | true |
1c38a2b3bcbbdcb3c8f7bcc835842d57ecac3a5f | PHP | Antonio-Cardaci/hw2 | /test_laravel/app/Http/Controllers/RegisterController.php | UTF-8 | 2,025 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Foundation\Auth\User;
class RegisterController extends Controller
{
//Questo controller implementa la logica della registrazione
public function register(Request $request)
{
//$conn = mysqli_connect("localhos... | true |
4accc0cf1902d341ce703d203f01d57c644ec9f8 | PHP | klhall1987/vue-popup-plugin | /vue-popup.php | UTF-8 | 4,389 | 2.875 | 3 | [] | no_license | <?php
/**
* Plugin Name: Vue Popup
* Description: Add a popup to for your WordPress site!
* Version: 1.0.0
* Author: Kenny Hall
* Author URI: https://woocommerce.com
* Text Domain: v-pup
*
*/
class vue_popup
{
public function __construct()
{
define( 'VPUP_DIR', plugin_dir_path( __FILE__ ) );
... | true |
2c87b22280af1276dd66eb6c45dd4f7ec2587d74 | PHP | functional-php/named-parameters | /src/functions.php | UTF-8 | 2,213 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace FunctionalPHP\NamedParameters;
function call_user_func_array_np($callback, array $arguments) {
$isConstructor = is_array($callback) && ($callback[1] ?? false) === '__construct';
$keys = array_keys($arguments);
if($keys === array_keys($keys)) {
// we have a non associative array, s... | true |
cf3fb938ecc1c82da3c624b7f7f7a6ff13436691 | PHP | abatanx/waggo6 | /api/html/canvas.php | UTF-8 | 1,610 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* waggo6
* @copyright 2013-2020 CIEL, K.K., project waggo.
* @license MIT
*/
require_once(dirname(__FILE__)."/htmltemplate.php");
abstract class WGCanvas
{
/**
* @var array $html
*/
public $html;
/**
* @var string $template
*/
public $template;
public function __construct()
{
$this->ht... | true |
1c4b2dc138c5179be26e9eab4ef3c524fbaf84cc | PHP | tayles/phoneinfo | /application/controllers/phoneinfo.php | UTF-8 | 1,365 | 2.59375 | 3 | [] | no_license | <?php defined('SYSPATH') OR die('No direct access allowed.');
class PhoneInfo_Controller extends Template_Controller {
// Set the name of the template to use
public $template = 'template';
public function __construct() {
parent::__construct();
$this->countries = ORM::factory('country')->find_all();
}
p... | true |
7665817fe53318fe2a5171529b2b45ca3cd0c074 | PHP | clivebeckett/m1n-lib | /src/Autoloader.php | UTF-8 | 3,962 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace m1n\lib;
/**
* Autoloader class, based on
* https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader-examples.md
*
* instantiate and register the loader:
* $autoloader = new Autoloader;
* $autoloader->register();
*
* register the base directories for namespace pre... | true |
202b7570f0dd3230e584db339d38f436584b9ccc | PHP | BenjaminS01/IT-Projekt | /core/controller.class.php | UTF-8 | 718 | 2.734375 | 3 | [] | no_license | <?php
namespace Trainingskalender\core;
class Controller{
private $controllerName;
private $actionName;
protected $_params = [];
public function __construct($controller, $action)
{
$this->controllerName=$controller;
$this->actionName=$action;
}
public function renderHTML()... | true |
31d0349d2ab6e3ec502540b75e79986fb410671e | PHP | truecastdesign/spamless | /src/Spamless.php | UTF-8 | 3,996 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
namespace Truecast;
/**
*
*
* @package True Framework 6
* @author Daniel Baldwin
* @version 1.1.1
* @copyright 2020 Truecast Design Studio
*/
class Spamless
{
private $data = [];
private $tests = [];
private $errors = [];
private $errorMsgs = [
'url'=>"URLs not allowed!",
'html'=>"HTML not allowe... | true |
3e5a4c4bfe4fe7e0bfa83bf4177796729b1373a4 | PHP | eebbni/accessoryShoppingMall | /html/test2/test2_edit.php | UTF-8 | 1,597 | 2.65625 | 3 | [] | no_license | <?
include "../common.php";
$no1=$_REQUEST[no1];
$query="select * from test2 where no17=$no1;";
$result=mysqli_query($db,$query);
if (!$result) exit("에러:$query");
$row=mysqli_fetch_array($result);
$tel1=trim(substr($row[tel17],0,3)); // 0번 위치에서 3자리 문자열 추출
$tel2=trim(substr($row[tel17],3,4)); // 3번 위... | true |
7eced6dc3c88229c5b007c20001ab7c4920eba0d | PHP | zinia94/PointOfSale | /insert8.php | UTF-8 | 2,767 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
//error_reporting(0);
$link = mysqli_connect("localhost", "root", "", "demo");
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
$host="localhost";
$user="root";
$password="";
$db="demo";
mysql_connect($host,$user,$password);
mysql_select_db($db);
$startTime = mysqli_real_es... | true |
1b4ed31649c461af50d736b1627cda72d4b1de88 | PHP | CSHH/website | /app/Router/RouterFactory.php | UTF-8 | 3,880 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Router;
use Nette;
use Nette\Application\Routers\Route;
use Nette\Application\Routers\RouteList;
class RouterFactory
{
/**
* @return Nette\Application\IRouter
*/
public static function createRouter()
{
$router = new RouteList;
$router[] = new Route('', 'Fron... | true |
0554db5734992e405141e8415772cd583b03caa9 | PHP | kjkoma/wnote | /src/Controller/Component/SysModelSusersComponent.php | UTF-8 | 3,963 | 2.640625 | 3 | [] | no_license | <?php
/**
* Copyright (c) Japan Computer Services, Inc.
*
* Licensed under The MIT License
*
* @author Japan Computer Services, Inc
* @copyright Copyright (c) Japan Computer Services, Inc. (http://www.japacom.co.jp)
* @since 1.0.0
* @version 1.0.0
* @license http://www.opensource.org/licenses/mit-li... | true |
3e297465ab9b5aec4e72a64082ad883b79e8edd4 | PHP | FullKernelPanic/http-api-client | /src/Client.php | UTF-8 | 2,051 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace HttpApiClient;
use ApiClientBase\ApiException;
use ApiClientBase\RequestInterface;
use ApiClientBase\ResponseInterface;
use ApiClientBase\UnsupportedRequestType;
use ApiClientBase\UnsupportedResponseType;
use GuzzleHttp\Client as HttpClient;
use GuzzleHttp\Exception\GuzzleExc... | true |
34e8ee7308811a49dd1f61e000aeb2cefbe3e2a2 | PHP | mvccore/mvccore | /src/MvcCore/View/Rendering.php | UTF-8 | 12,761 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* MvcCore
*
* This source file is subject to the BSD 3 License
* For the full copyright and license information, please view
* the LICENSE.md file that are distributed with this source code.
*
* @copyright Copyright (c) 2016 Tom Flidr (https://github.com/mvccore)
* @license https://mvccore.github.io... | true |
9106aec0ceda5cd6339051d87d5033f942e66a67 | PHP | alphen87/Ultimaker.com-code-challenge | /src/Application/Dto/StockStatisticsDto.php | UTF-8 | 467 | 2.515625 | 3 | [] | no_license | <?php
namespace Ultimaker\Challenge\Application\Dto;
class StockStatisticsDto
{
/**
* @var string
*/
public $stock;
/**
* @var float
*/
public $avgBuyPrice;
/**
* @var float
*/
public $avgSellPrice;
/**
* @var int
*/
public $... | true |
9de3adb40ae74ca45786fa7225939f133b88f4d7 | PHP | anventre/PHP-OpenPanel | /php-OpenPanel/app/Aruba/AppWsResult.php | UTF-8 | 3,148 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) 2012 <copyright Aruba spa>
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify,... | true |
8c6efd0f821a8c488bc3ad2ed4746dac37053f94 | PHP | aszkid/PHPixie-Twig | /twig/classes/twig.php | UTF-8 | 1,272 | 2.625 | 3 | [] | no_license | <?php
/**
* TWIG Module for PHPixie
*
* Documentation TO DO
*
* To enable it add 'twig' to modules array in /application/config/core.php
*
* @link todefine
* @package Twig
*/
class Twig extends View {
protected $_loader;
protected $_twig;
protected $_template;
protected $_name;
protected $_cache;
pro... | true |
b190b1926bf03ffe147dc3f0e522ceffb177842f | PHP | Nuk3r1337/skomager_john | /index.php | UTF-8 | 3,727 | 2.59375 | 3 | [] | no_license | <?php
session_start();
ini_set("display_errors",1);
error_reporting(E_ALL);
require_once $_SERVER["DOCUMENT_ROOT"] ."/skomager_john/classes/authentication.php";
require_once $_SERVER["DOCUMENT_ROOT"] ."/skomager_john/classes/navbar.php";
require_once $_SERVER["DOCUMENT_ROOT"] ."/skomager_john/classes/dataView.php";
... | true |
d2614dbb16a9faa6fdd487ac05077c2df7936459 | PHP | kkkhhh1022/GEEKJOB_Challenge | /プログラミング基礎2/while文.php | UTF-8 | 61 | 3 | 3 | [] | no_license | <?php
$i = 1000;
while ($i >= 100) {
echo $i;
$i /= 2;
}
| true |
68f381f131eb86c9e2b9de0062a4b74bc967d2c8 | PHP | smartymoon/laracom | /app/Http/Controllers/NewsController.php | UTF-8 | 1,272 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Repository\NewsCatRepository;
use App\Repository\NewsRepository;
class NewsController extends Controller
{
/**
* @var NewsCatRepository
*/
private $newsCatRepository;
/**
* @var NewsRepository
*/
private $newsRepository;
/**
... | true |
7b3ccc25cc642355354447f0ff5b441b4af01047 | PHP | garydinis/php-samples | /validation.php | UTF-8 | 376 | 3 | 3 | [] | no_license | <?php
var_dump(filter_var('bob@example.com', FILTER_VALIDATE_EMAIL));
var_dump(filter_var('http://example.com', FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED));
//regex
$email = "my@email.com";
$regex = "/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/";
if (preg_match($regex, $email)) {
... | true |
de773c43f394dbf0e55a191183bd1a633fd96fcd | PHP | mrbeaver1/test | /src/Entity/Place.php | UTF-8 | 2,903 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\PlaceRepository")
* @ORM\Table(name="place")
*/
class Place
{
/**
* @var int
*
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**... | true |
f6806a8778e3a858d95c2a894a84114e9ab28eda | PHP | Alien016/vote | /result.php | UTF-8 | 2,804 | 2.828125 | 3 | [] | no_license | <?php
//接收从调查页面传过来的数据,更改数据库的值,并且显示出来。
session_start();
$rowNum=$_SESSION['rowNum'];//表的个数
$tb_arr=array();
$tb_arr=$_SESSION['tb_arr'];//存放了很多表的名字的数组
$ansCounts=array();
$ansCounts=$_SESSION['ansCounts'];//存放每个问题对应的选项个数的数组
//连接数据库
$servername = "localhost";
$username = "rt";
$password = "413929";
$mysql_database = '... | true |
6bd39699f6874d80ce1e7df81f86bb180c1ad11d | PHP | durdenx/silex-bootstrap | /src/Models/Interfaces/IBaseManager.php | UTF-8 | 176 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Models\Interfaces;
use Models\Generics\EntityInterface;
/**
* IBaseManager
*/
interface IBaseManager
{
public function save(EntityInterface $object);
}
?> | true |
db7c7b028185ebcbd24d6622f8dcfc66e15f340c | PHP | ChrisIbitinga/php_iniciante | /servico/servicoValidacao.php | UTF-8 | 681 | 3.3125 | 3 | [] | no_license | <?php
// Validação de nomes
function validaNome(string $nome) : bool
{
if(empty($nome))
{
// chamando a funçao de setar a mensagemErro
setarMensagemErro($mensagem = 'O nome não pode ser vazio !!!');
return false;
}
elseif(strlen($nome) <= 2 or strlen($nome) >= 40)
{
setarMensagemErro($mensagem = 'O nome... | true |
27b1187f1b0ff812dae6f20a664578f644312852 | PHP | fontenele/kf | /src/Kf/Http/Request.php | UTF-8 | 1,082 | 2.75 | 3 | [] | no_license | <?php
namespace Kf\Http;
use Kf\System\ArrayObject;
class Request {
/**
* @var \ArrayObject
*/
public $get;
/**
* @var \ArrayObject
*/
public $post;
/**
* @var \ArrayObject
*/
public $files;
/**
* @var string
*/
public $query;
/**
... | true |
235cba2b3cc32e32eecc7404529d0ae53457c70d | PHP | kashyapsodha/MyChatApp | /signup_user.php | UTF-8 | 2,195 | 2.75 | 3 | [] | no_license | <?php
include('include/connection.php');
if(isset($_POST['sign_up'])) {
$name = htmlentities(mysqli_real_escape_string($con, $_POST['user_name']));
$pass = htmlentities((mysqli_real_escape_string($con, $_POST['user_pass'])));
$email = htmlentities(mysqli_real_escape_string($con, $_POST['user_email']));
$coun... | true |
710fe6041929731b16128ba3fba02a8ff508f952 | PHP | siwar-mae/GFI-MAE | /src/Service/Backend/User/PutService.php | UTF-8 | 365 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Service\Backend\User;
use App\Manager\Backend\UserManager;
class PutService
{
/**
* @var UserManager
*/
private $manager;
public function __construct(UserManager $manager)
{
$this->manager = $manager;
}
public function put($arrayUser)
{
re... | true |
a61e31bd373f7ae769ce3755004d0ad7f68a098d | PHP | cgerman89/BI | /app/Connect/Mongodb.php | UTF-8 | 5,564 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: andean
* Date: 28/08/18
* Time: 10:38
*/
namespace App\Connect;
use Illuminate\Support\Facades\DB;
class Mongodb {
/**
* @param string $key
* @param array $columns
* @return array
*/
public static function getDataCollection( string $key, ... | true |
ee86177e6845939a846a145150c172b16c1d5631 | PHP | baricio/sample-phpunit-docker | /tests/CoffeeMachineTest.php | UTF-8 | 1,478 | 2.8125 | 3 | [] | no_license | <?php
namespace tests;
use App\CoffeeMachine;
use PHPUnit\Framework\TestCase;
class CoffeeMachineTest extends TestCase
{
private $coffeeMachine;
protected function setUp(): void
{
parent::setUp();
$this->coffeeMachine = new CoffeeMachine();
}
public function testDoCoffeeWithoutR... | true |
6ce20eeb039d6f02a704f61665c00304a2739352 | PHP | geshaaa/commission-calculator | /src/App/Controller/CommissionController.php | UTF-8 | 3,038 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Helper\CommissionCalculator;
use App\Helper\ParserFactory;
use App\Validator\ValidatorInterface;
use App\Helper\CheckDateWeek;
class CommissionController
{
use CheckDateWeek;
/**
* @var ParserFactory
*/
private $parserFactory;
/**
* @var Validato... | true |
27a7ac13db0e15ec2463d50a52d8657ab30a86ef | PHP | Csardelacal/PHPAuthServer | /bin/classes/mail/SendInBlueTransport.php | UTF-8 | 804 | 2.75 | 3 | [
"MIT"
] | permissive | <?php namespace mail;
class SendInBlueTransport implements TransportInterface
{
const BASE_URL = 'https://api.sendinblue.com/v2.0';
private $key;
public function __construct($key) {
$this->key = $key;
}
public function deliver(\EmailModel $model) {
$post = Array();
$post['from'] = [\SysSettin... | true |
2a31f6e4e366b40efa4adcafaca65e575a3ba3b8 | PHP | emmanueltabordac/dracarys | /libs/view/elements/Modal.class.php | UTF-8 | 6,013 | 2.65625 | 3 | [] | no_license | <?php
class Modal{
private $element=array();
private $params=array();
//Esta clase recibe como parametro un arreglo el cual debe contener:
//Definir el identificador de la ventana modal (id).
//Definir el identificador del control que llamará a la ventana modal,
// si mas de uns control llama la ventana... | true |
e7ff13c9c05969d0f4586b3877e5bdc757816d1b | PHP | nfabre/deepzoom.php | /tests/Deepzoom/Tests/Fixtures/ImageAdapter/Stub.php | UTF-8 | 2,505 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Deepzoom.php package.
*
* (c) Nicolas Fabre <nicolas.fabre@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Deepzoom\Tests\Fixtures\ImageAdapter;
use Deepzoom\ImageAdapter... | true |
bf02b098b3e435bc16adf98e50b92c517a051c4c | PHP | bleakarte/Week3Php | /Week3Php/7 MorningPHPSeven/PhpClassSystem/server.php | UTF-8 | 712 | 2.859375 | 3 | [] | no_license | <?php
if (isset($_POST["btn_reg"])){
//receive values from the user
$name = $_POST["jina"];
$email = $_POST["arafa"];
$pass = $_POST["siri"];
$encrypted_password = md5($pass);
//connect to the database start saving
require_once"db_connection.php";
//prepare the insert query
$insert... | true |
635b4855472fabff4b2eb663b1c2b5e65ccd21da | PHP | leoszcarvalho/modelo_composer | /codigo/TesteCarai.php | UTF-8 | 152 | 2.640625 | 3 | [] | no_license | <?php
namespace Leokbr\Teste;
class TesteCarai {
public function __construct()
{
echo "Testando Porra carai ca ca ca carai";
}
}
| true |
6c913b46c3593075c92366e6be39738d00a92203 | PHP | banksbestrates/BankFx | /news/wp-content/themes/seos-magazine/inc/kirki/modules/css/property/class-kirki-output-property.php | UTF-8 | 1,041 | 3.25 | 3 | [
"MIT",
"CC0-1.0",
"GPL-2.0-or-later",
"OFL-1.1",
"GPL-2.0-only",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Handles CSS properties.
* Extend this class in order to handle exceptions.
*
* @package Kirki
* @subpackage Controls
* @copyright Copyright (c) 2020, David Vongries
* @license https://opensource.org/licenses/MIT
* @since 2.2.0
*/
/**
* Output for CSS properties.
*/
class Kirki_O... | true |
d3da16e0b4cfc36701608872158e86b0f35d1236 | PHP | SunRey/Codeup-Web-Exercises | /lib/Log.php | UTF-8 | 903 | 3.296875 | 3 | [] | no_license | <?php
class Log
{
protected $filename;
protected $handle;
public function __construct($prefix = 'log')
{
$this->setFileName($prefix);
$$this->setHandle();
}
protected function setFileName($prefix)
{
$this->filename = "../data/{$prefix}-" . date("Y-m-d") . ".log";
... | true |
2c47fabafd5966aec1fb9aa4068fc32e26e0d24b | PHP | duckhwx/GEREESC---Gerenciamento-Escolar | /nutricionista/cardapio/listar_refeicoes.php | UTF-8 | 818 | 2.765625 | 3 | [] | no_license | <?php
require_once '../../conexao.php';
session_start();
//string e função seleciona as refeições de um ano escolar no banco de dados
$select = 'select Cardapio_Refeicao.id, Refeicao.nome, Cardapio_Refeicao.data from Cardapio_Refeicao inner join Refeicao
on Cardapio_Refeicao.refeicao_id = Refeicao.id where Cardapio_Re... | true |
2e242aa148c0b72371c77caf6293fcae0b375663 | PHP | Tjoosten/CPS | /app/Petitions.php | UTF-8 | 800 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* Class Petitions
*
* @package App
*/
class Petitions extends Model
{
/**
* The mass-assign fields for the database table.
*
* @var array
*/
protected $fillable = ['author_id', 'title', 'description'];
/**
* Th... | true |
d88335f62f843829a516c05eb84dacd1acb49220 | PHP | dcdevito/devpoll | /site/survey/loadQuestions/loadSeveralAnswers.php | UTF-8 | 949 | 3.0625 | 3 | [] | no_license | <?php
// Create the textboxes returned by the AJAX call for several answer questions
$answers = $_POST['answers'];
$answerCount = $_POST['answercount'];
$saAnswer = array();
for ($i = 0; $i < $answerCount; $i++)
{
$saAnswerName = "saanswer".($i + 1);
$saAnswer[$i] = $_POST[$saAnswerName];
}
// Holds th... | true |
dad61b3bc6eb780aef209ac00eb82ec9ae863740 | PHP | tpunt/Blop | /app/views/AdminPostView.php | UTF-8 | 2,064 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace app\views;
use app\models\DataAccessLayer\PostMapper;
/**
* This is the view containing the binding logic for the 'Admin' page (using the templates/admin.tpl).
*
* @package Blop/app/views
* @author Thomas Punt
* @license MIT
*/
class AdminPostView
{
/**
* @var Twig_Environment|null... | true |
db874486af9980a9aa526e07e143a09561fd48d0 | PHP | allemas/php-cqrs-experiments | /src/Bus/Event/EventBus.php | UTF-8 | 1,452 | 2.6875 | 3 | [] | no_license | <?php
/*
* EventBus.php is part of ogame_deggolok.
*
* (c) Allemand Sébastien <sebastien.a.consulting@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Deggolok\Bus\Event;
use Deggolok\Bus\Command\CommandBusI... | true |