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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c4ac4c737ae50e1abb40bfd7f7af5c25d81d4981 | PHP | aminembarki/storyplayer | /src/php/DataSift/Storyplayer/Prose/FromHost.php | UTF-8 | 6,784 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Copyright (c) 2011-present Mediasift Ltd
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice... | true |
11ea4ff4a1ce7258db5ae56f47c2a1b9d4118b64 | PHP | zkrat/php-gpio | /src/PhpGpio/Sensor/Mcp/AbstractMcp.php | UTF-8 | 2,159 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace PhpGpio\Sensor\Mcp;
use PhpGpio\Sensor\AbstractSpi;
use PhpGpio\GpioInterface;
/**
* Common code to cummunication with MCP ADC
*/
abstract class AbstractMcp extends AbstractSpi
{
/**
* @var integer
*/
protected $channelsCount;
/**
* {@inheritdoc}
*/
public funct... | true |
88842e6b2e7d678a921f07a8c464a132c2296ed9 | PHP | ibnuhabibie/client | /src/Contracts/DataProviderHandlerContract.php | UTF-8 | 1,139 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Laracatch\Client\Contracts;
use Laracatch\Client\Models\ErrorModel;
use Throwable;
interface DataProviderHandlerContract
{
/**
* Push a new HTTP provider to the list.
*
* @param DataProviderContract $provider
*
* @return void
*/
public function pushHttpProvider(D... | true |
3f90b6581864179baf0f5758ae9c77a628dc731b | PHP | UsaidMuhammad/eliteshop | /app/Http/Controllers/Users/UsersController.php | UTF-8 | 4,066 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Users;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App;
class UsersController extends Controller
{
public function index()
{
return view("users.register");
}
public function register()
{
$validationValues = [
... | true |
a979fe2f6fbe32b1d71dad9ceaccccf0c20c2f30 | PHP | honeybee/honeybee-agavi-cmf-vendor | /app/lib/Logging/LogTrait.php | UTF-8 | 2,505 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Honeygavi\Logging;
use AgaviContext;
use AgaviLogger;
/**
* Trait to ease logging to specific loggers.
*/
trait LogTrait
{
// @codeCoverageIgnoreStart
public function getLoggerName()
{
return 'default';
}
public function logTrace()
{
AgaviContext::getInstanc... | true |
39351353fa090b53f448e4f5585f9b733e88ec56 | PHP | Lily-B/test_widget_corp | /public/login.php | UTF-8 | 1,812 | 2.6875 | 3 | [] | no_license | <?php require_once("../includes/session.php"); ?>
<?php require_once("../includes/db/db_connection.php"); ?>
<?php require_once("../includes/functions.php"); ?>
<?php require_once("../includes/validation_functions.php"); ?>
<?php $layout_context = "admin"; ?>
<?php include("../includes/layouts/header.php"); ?>
<?php
... | true |
096700e3d368e6ccee0cd0ee67ac9afc9e5405aa | PHP | mbbatist/Trabalho-Switch | /q2.php | UTF-8 | 2,213 | 2.796875 | 3 | [] | no_license |
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<form action="q2.php" method="POST">
<table border="1" width="25%" height="25%" align="center">
<tr>
<td bgcolor="#CD5C5C" align="center"><font face="Arial" color="white"> Digite o mês: </fon... | true |
729ab262b7b2146a21412b1ead35450d64f110cb | PHP | ljp2009/gitskills | /database/migrations/2016_06_12_112302_create_task_deliver_conditions_table.php | UTF-8 | 974 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTaskDeliverConditionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('t_task_deliver_condition', function (Blu... | true |
f7c580e0a472b344163b777c8136168f1a60e163 | PHP | andresoria2295/Programacion_I-Trabajo_Final-Videau-Soria | /api/choferes/index.php | UTF-8 | 5,458 | 2.609375 | 3 | [] | no_license | <?php
// Required headers
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Re... | true |
9d7af4badc7e01ddccaad83c1ce11b678072a730 | PHP | klekkala/virtlab_3D | /src/pages.php | UTF-8 | 2,703 | 3.046875 | 3 | [] | no_license | <?php
/*Author: Kiran Kumar Lekkala
Description: Main php program to create the user interface based on the input from the user as an xml config file
Date: 20 November 2015
*/
include 'parse.php';
//Function: To execute various file_operations which are required by this program
//Params: file_operation; 0 -> openin... | true |
6520ddf708847fe2ceef401752a0b7d872169f8c | PHP | harshyadav2402/GoSports-Fan-Social-Networking-Website | /login-system/notifications.php | UTF-8 | 1,878 | 2.609375 | 3 | [] | no_license | <!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title> Notifications</title>
<?php include ('navigation.php'); ?>
<?php include 'css/css.html'; ?>
<br>
</head>
<body>
<style>
input, textarea, select {
width: 15%;
}
</style>
<br><br>
<?php
$conn = new mysqli("localhost", "root", "jaye... | true |
5e34b706c42df71316be936feb47d20b883f1018 | PHP | Chia233/Cloud-Computing-Academy-AWS-Stateless-Design | /frontend/upload.php | UTF-8 | 2,088 | 2.6875 | 3 | [] | no_license | html>
<head>Welcome to Cloud Computing Academy</head>
<?php
session_start();
if (isset($_SESSION['user_name'])) {
echo "<br>";
echo "You are now logged in as ".$_SESSION['user_name'];
echo "<br>";
echo "<div class='simpleFlex' style='margin-right:10px;'>";
echo "<a href='Welcome.php'> Home... | true |
8274ae803edc44913cf32199dc2f38a2f8ac437e | PHP | bfodeke/wrappyws.client | /modules/contrib/WForm/Data.php | UTF-8 | 774 | 2.84375 | 3 | [] | no_license | <?php
/**
* @file
* File Data.php
*/
namespace WForm;
/**
* Class Data
* @package WForm
*/
class Data {
/**
* Get form values.
* @param $form_id
* @return mixed
*/
public static function get($form_id) {
$user = new \WClient\User();
$login = $user->logIn($variables = array('form_id' => $... | true |
dd3422d04cf87e479f7509569884ea10a8929223 | PHP | jaroja4/BitacoraCDC | /class/Tarjeta.php | UTF-8 | 7,522 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
//ACTION
if( isset($_POST["action"])){
$opt= $_POST["action"];
unset($_POST['action']);
// Classes
require_once("Conexion.php");
//
// Instance
$tarjeta = new Tarjeta();
switch($opt){
case "ReadAll":
echo json_encode($tarjeta->ReadAll());
... | true |
9bdf0c187e385418ca86c5e087af0acc0fe0afa9 | PHP | linda2912/linda2912.github.io | /internetOfThings/week2/lampje.php | UTF-8 | 2,098 | 2.578125 | 3 | [] | no_license | <?php header('Access-Control-Allow-Origin: *');?>
<?php
if(isset($_POST['on']))
{
$file = 'lampje.txt';
$previous = file_get_contents($file);
file_put_contents($file, '1');
}
?>
<?php
if(isset($_POST['off']))
{
$file = 'lampje.txt';
$previous = file_get_contents($file);
... | true |
07b712616c072bca2bbdbcf4f0ee95ce4acfab5d | PHP | apankov/projectAuthor | /vendor/contentful/contentful/src/Management/Proxy/Upload.php | UTF-8 | 1,792 | 2.71875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* This file is part of the contentful-management.php package.
*
* @copyright 2015-2017 Contentful GmbH
* @license MIT
*/
declare(strict_types=1);
namespace Contentful\Management\Proxy;
use Contentful\Management\Client;
use Contentful\Management\Resource\ResourceInterface;
use Contentful\Management\R... | true |
ac210ae57bf64de12a8c88643058a5ac862dfdd5 | PHP | andresriancho/w3af-moth | /webroot/moth/w3af/crawl/ajax/username-ajax.php | UTF-8 | 3,858 | 2.78125 | 3 | [] | no_license | <?php
// Include the Sajax library
include "Sajax2.php";
// Open conection to the database
mysql_connect('localhost', 'username', 'password');
mysql_select_db('database');
/*
CREATE TABLE `users` (
`user_id` INT( 9 ) NOT NULL AUTO_INCREMENT ,
`username` VARCHAR( 50 ) NOT NULL ,
`password` VARCHAR( 32 ) NOT NULL ,
PRI... | true |
5ee4c3a22283c4afcb732dda24ccb0538aca3ee4 | PHP | BAlleyneDev/Website-Design-Patterns | /assigncode/codebase/Validator.php | UTF-8 | 2,117 | 2.75 | 3 | [] | no_license | <?php
class Validator extends ValidatorAbstract{
function isRequestDataValid(array $requestData, array $pageVars){
$this->_pageVarData=$pageVars;
$this->_errors=[];
foreach ($requestData as $VarName => $value)
{
if (array_key_exists($VarName, $pageVars))
{
... | true |
eb8b44dca52bdb242707311f01e1823d18a6aecc | PHP | rehammoadi/back-end-server | /app/Objection.php | UTF-8 | 1,775 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Objection extends Model
{
//
protected $table = 'objection';
protected $fillable = [
"block_number",
"name_req" ,
"cause_text" ,
"app_user_id",
"announcement_id",
... | true |
81c9a689247bfdc4817c9e3cca1789fe564f3a7c | PHP | mjmconvento/symfony-authenticator | /src/Services/ChangeDbService.php | UTF-8 | 971 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Services;
use Doctrine\DBAL\Connection;
class ChangeDbService
{
/**
* @var Connection $dbalConnection
*/
private $dbalConnection;
/**
* @param Connection $dbalConnection
*
* @return void
*/
public function __construct(Connection $dbalConnection)
... | true |
ec415b6c4a5c328b7b66d25f5e9bfcdc83a9f475 | PHP | TurretChieftain/mysql-webapp | /mysql-connect.php | UTF-8 | 806 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<head>
<title>Login to SQL</title>
</head>
<body>
<div class='container'>
<div class='login-forms'>
<h1>Login to MySQL</h1>
<form method='post'>
Host:<br>
<input type="text" name='host'>
<br>
Username:<br>
<input type="text" name='usrname'>
<br>
Password:<br>
<i... | true |
b10621170972a3f5b91608bfc746e44f97b0681f | PHP | melvinastorga/videoPlaza | /insert_movie.php | UTF-8 | 1,366 | 2.5625 | 3 | [] | no_license | <?php
error_reporting(0);
$movie_code = $_POST['movie_code'];
$movie_name = $_POST['movie_name'];
$gender = $_POST['gender'];
$spanish = $_POST['spanish'];
$movie_actor = $_POST['movie_actor'];
$movie_director = $_POST['movie_director'];
$test = '';
include('connection.php');
$query ="SELECT * FROM movie ... | true |
fcc1fff699f6d3a3c02b238a7d214cf933a15199 | PHP | google-code-export/rmh-roomreservation-maker | /rmh-homeroom/tests/testBooking.php | UTF-8 | 1,929 | 2.609375 | 3 | [] | no_license | <?php
include_once(dirname(__FILE__).'/../domain/Booking.php');
class testBooking extends UnitTestCase {
function testBookingModule() {
$today = date('y-m-d');
$b = new Booking($today,"","Meghan2075551234","pending","","Tiny",
array("Meghan:mother", "Jean:father", "Teeny:sibling... | true |
e0417e813bd165bb8834510975933cf67e94a704 | PHP | xqmsg/phpsdk-core | /src/com/xqmsg/sdk/v2/util/CryptoAES.php | UTF-8 | 2,363 | 3 | 3 | [] | no_license | <?php namespace com\xqmsg\sdk\v2\util;
use com\xqmsg\sdk\v2\exceptions\StatusCodeException;
/**
* Class CryptoAES
* @package com\xqmsg\sdk\v2\util
*/
class CryptoAES
{
/**
* @param string $data The data to encrypt.
* @param string $passphrase The encryption passphrase.
* @param string|null $sal... | true |
94abdc0eeb3fd6b368bc528cb5834949f90486bf | PHP | Mohamed-Nagdy/SmartPlateWebsite | /filesNotNeededForNow/signUpConfirm.php | UTF-8 | 6,528 | 3.140625 | 3 | [] | no_license | <!--this code is to get all data and send to database-->
<!--front end never touch this code start from html tag only-->
<!---------------------------------------------------------------------------------------------------------------------------->
<?php
// this function is to create a random string to add it to the ... | true |
6e3a3f21f3f9480e5189e73024121581eff71438 | PHP | take-yasu/simplequote | /app/Http/Requests/SearchRequest.php | UTF-8 | 1,126 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class SearchRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the... | true |
e9e4fc5b712dacaf95efd9bd9425a89f71e08c1d | PHP | gabrielsscti/grade-curricular-deinf | /Model/Cadeira.php | UTF-8 | 4,161 | 3.171875 | 3 | [] | no_license | <?php
class Cadeira{
private $idCadeira, $nome, $departamento, $creditos, $codigo, $isEletiva, $grupo, $periodo, $ementa, $preReqs;
public function __construct($idCadeira, $nome, $departamento, $creditos, $codigo, $isEletiva, $grupo, $periodo, $ementa){
$this->idCadeira = $idCadeira;
$this-... | true |
7dda9a60287d4e02bcf4ff06e4f7def0cf1983f5 | PHP | ex2life/OptimalTrancWeb | /app/User.php | UTF-8 | 2,221 | 2.75 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
p... | true |
8e675afb8e67798ef1adf5b160b393e7653febf1 | PHP | doaaAbdelfatah/group1 | /app/Http/Controllers/ProductController.php | UTF-8 | 3,134 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Brand;
use App\Models\Category;
use App\Models\Products;
use Illuminate\Http\Request;
class ProductController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()... | true |
9382a9a54fb1e5249e452c7dc67ad5dd63049764 | PHP | mrzhouyu/PHP_About | /class/father_class.php | UTF-8 | 818 | 3.28125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Yu
* Date: 2017/10/15
* Time: 16:56
*/
class father_class
{
//私有变量
private $inner_age,$inner_name,$inner_sex;
//构造函数
/**
* father_class constructor.
* @param int $age
* @param string $name
* @param string $sex
*/
public functio... | true |
206b151815777d048404f5b42450902720545597 | PHP | Lpu8er/mf-discord | /src/Utils/DiscordCommand/DiscordDieCommand.php | UTF-8 | 2,089 | 3.125 | 3 | [] | no_license | <?php
namespace App\Utils\DiscordCommand;
use App\Service\Discord;
/**
* Description of DiscordDieCommand
*
* @author lpu8er
*/
class DiscordDieCommand extends DiscordCommand {
public function help(Discord $discordService) {
$msg = [];
$msg[] = '`'.$discordService->getPrefix().'die` '.$discord... | true |
7ed76f8cb6ca735873286b9f413521b7fba717b6 | PHP | dmitrychurkin/voiceless | /app/Services/Uploader/ImgBB/ImgBBResponse.php | UTF-8 | 1,863 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Uploader\ImgBB;
final class ImgBBResponse
{
private string $id;
private string $title;
private string $mime;
private int $size;
private string $expiration;
private string $fileName;
private string $extension;
private string $imageUrl;
private s... | true |
43f6ef9bcee0659bbdde8d1b5931d1ae09161c61 | PHP | DharmapriyaSahan/SPM-Project2018-Group18 | /BackEnd/FormReg.php | UTF-8 | 992 | 2.703125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
<?php
$mysqli = new mysqli("localhost", "root", "It12345@#1", "CSSE");
if(isset($_POST['submit'])){ // Fetching variables of the form which travels in URL
$StudentName=$_POST['StudentName'];
$StudentID=$_POST['StudentID'];
$DegreeProgramme= $_POST['DegreeProgramme'];... | true |
9b75caf703eadc4923322584f14f546522cdbc95 | PHP | williamokano/lock-challenge-solver | /src/NothingCorrectRule.php | UTF-8 | 483 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Katapoka\Katapoka;
class NothingCorrectRule extends Rule {
/**
* Check if the constraint match against the given number
*
* @param string[] $numbers
*
* @return mixed
*/
public function matchConstraint($numbers) {
$corrects = 0;
foreach ($numbers a... | true |
11c5c94bc21dca5ff8c11a197a1e6fe44a885822 | PHP | nraxz/PHPScripts | /FunWithString.php | UTF-8 | 831 | 3.78125 | 4 | [] | no_license | <?php
// PHP script to change the color of first letter of words in a string.
$text = 'PHP Tutorial';
$text = preg_replace('/(\b[a-z])/i','<span style="color:red;">\1</span>',$text);
echo $text;
/*
mixed preg_replace ( mixed $pattern , mixed $replacement , mixed $subject [, int $limit = -1 [, int &$count ]] )
*/
//... | true |
642096a89b3d4601f96e4916eeb3be3ef5a25d9f | PHP | dalencar/ans-tiss | /complexTypes/ct_situacaoInicial.php | UTF-8 | 1,205 | 2.828125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace anstiss\complexTypes;
use anstiss\complexTypes\ct_situacaoClinica;
class ct_situacaoInicial {
/**
*
* @var ct_situacaoClinica $situacaoClinica
* @access public
*/
public $situacaoClinica = null;
/**
*
* @var string $doencaPeriodontal
* @see st_logico... | true |
7ecef1cd4eefa92c2777b9574095f79ff7427fd3 | PHP | pdecrete/rektis | /yii2/modules/SubstituteTeacher/models/BaseImportModel.php | UTF-8 | 3,146 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\SubstituteTeacher\models;
use \Yii;
use yii\base\Model;
use PHPExcel_IOFactory;
use PHPExcel_Shared_Date;
/**
* Description of BaseImportModel
*
*/
class BaseImportModel extends Model
{
public $filename;
public $phpexcelfile;
public $fileinfo;
public $worksheets;
pri... | true |
8f2bda35b25f6c150d32c16c7a4c19e4c2cbad73 | PHP | oscarpon/ClubPadel | /views/Pago_Showall_View.php | UTF-8 | 1,553 | 2.53125 | 3 | [] | no_license | <?php
class PagoShowallView{
function __construct($datos){
$this->render($datos);
}
function render($datos){
include "../views/Header.php";
?>
<table class="tablaPagoTodo">
<tr id="letraPago">
<th>Email</th>
<th>Fecha operación</th>
<th>Importe</t... | true |
38e1a2a97751a2ed2644cdc161188c68173dfa0b | PHP | sanskargoyal/BOOKCART | /admin/pages/dropcomment.php | UTF-8 | 449 | 2.65625 | 3 | [] | no_license | <?php
include '../../connection/config.php';
$comment_id = mysqli_real_escape_string($conn, $_GET['id']);
$sql = "DELETE FROM comments_table WHERE comment_id='$comment_id'";
if ($conn->query($sql) === TRUE) {
echo '<script>alert("Comment Deleted Successfully.")</script>';
header("location:../comments.php");
} el... | true |
195d533b2ccb8cc36e1a643119345f3d680eabe9 | PHP | mohamed-samir907/college | /Modules/Common/Interfaces/RepositoryInterface.php | UTF-8 | 198 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Common\Interfaces;
interface RepositoryInterface
{
/**
* Builder Class.
*
* @return Illuminate\Database\Eloquent\Builder
*/
public function builder();
} | true |
f5102da48930d02fc8fa9c0250ed1fdb3d45d947 | PHP | OmgImAlexis/public_html | /photoderp/cron.php | UTF-8 | 854 | 2.59375 | 3 | [] | no_license | <?php
include_once 'includes/header.php';
$photo_result = mysql_query("SELECT * FROM photos");
$photo_count = mysql_num_rows($photo_result);
if ($photo_count == 0){
echo 'No images have been uploaded yet.';
} else {
$deleted = 0;
while ($photo_row = mysql_fetch_assoc($photo_result)){
$file_... | true |
ddf58201282f72d33bf0f3b7fd0cf6a920ffe287 | PHP | sysatom/php-bloom-filter | /src/BitMap.php | UTF-8 | 2,528 | 3.140625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Sysatom;
/**
* Class BitMap
* @package Sysatom
*/
class BitMap
{
/**
* @var
*/
private $fn;
/**
* @var integer $size file size
*/
private $size;
/**
* BitMap constructor.
* @param $length
*/
public function __construct()
{
$te... | true |
29983340956d846e5f6de4f83025df0f8ad91f3b | PHP | jpresagios/rest_api | /symfony/src/Controller/HolidayController.php | UTF-8 | 2,496 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
use App\E... | true |
2007ab725e5b192b803d3ed89ba62927304a9cd8 | PHP | Clemencea2020/CLEMY-CODES | /database/migrations/2021_04_07_073611_create_meters_table.php | UTF-8 | 716 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMetersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('meters', functio... | true |
bb9b7ee2aa32f104831625ca8421729976691faa | PHP | apmuthu/ajaxcrud | /examples/events/index.php | UTF-8 | 11,761 | 2.640625 | 3 | [] | no_license | <?php
require_once('../../preheader.php');
$eventID = $_REQUEST['pkEventID'];
$idsAdded = array(); //event ids are pushed onto this array by onAddCallBackFunction
if ($eventID){
$eventInfo = qr("SELECT pkEventID, fldTitle, fldDate, fldTime, fldLocation, fldAdditionalInformation, fldImage, fldType FROM tblEvent... | true |
b554043eb6a2d9bf994b813d901c595c856c81ef | PHP | abdelrahman-gad/social_network | /database/seeds/DatabaseSeeder.php | UTF-8 | 1,869 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// $faker = Faker\Factory::create();
//make object to genrate database tables for users @ posts @ Category and other elemen... | true |
fc38eb617ac9c64f1d68b71520529f56a609b697 | PHP | achrefouali/octa | /src/Services/NotificationService.php | UTF-8 | 1,883 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Entity\Notification;
use App\Services\CrudService;
use Doctrine\ORM\EntityManager;
/**
* Description of NotificationService
*
* @author air
*/
class NotificationService
{
private $application_crud;
private $em;
/**
* Construct
* @param EntityManager... | true |
e5d68ba66e29ee1d98ce8a0c4e25bbe0a926248d | PHP | kkthomas/kocksmachine | /Classes/Domain/Model/Machine.php | UTF-8 | 2,331 | 2.515625 | 3 | [] | no_license | <?php
namespace Kk\Kocksmachine\Domain\Model;
/***
*
* This file is part of the "KK Machine" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2020 Thomas Kemendi <kemendi@kreativ-konzept.com>... | true |
b36d3dac149a1950fd83bc2361b30550ac639b6e | PHP | SeoYeonii/dbProject | /php 복사본/student_php/question.php | UTF-8 | 11,294 | 2.640625 | 3 | [] | no_license | <?php
require_once("dbconfig.php");
$user_id = $_GET['user_id'];
$lecture_id = $_GET['lecture_id'];
$get_question_num = $_GET['question_num'];
$get_clock = $_GET['clock'];
$get_check = $_GET['check'];
$class_id =$_GET['class_id'];
//엑셀 데이터 불러오기 -------------------------------------------... | true |
42985883b93655ab6906352dbe4255d7a895d1ef | PHP | solutionDrive/multi-step-bundle | /src/Model/MultiStepFlow.php | UTF-8 | 2,733 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* Created by solutionDrive GmbH
*
* @copyright 2018 solutionDrive GmbH
*/
namespace solutionDrive\MultiStepBundle\Model;
use solutionDrive\MultiStepBundle\Exception\StepNotFoundException;
class MultiStepFlow implements MultiStepFlowInterface
{
/** @var string */
private... | true |
50c18c48011b4e78b04095869a70d06b2f31eadc | PHP | samhol/SPHP-framework | /sphp/php/Sphp/Documentation/CommonMark/HtmlApiLinkParser.php | UTF-8 | 2,626 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* SPHPlayground Framework (http://playgound.samiholck.com/)
*
* @link https://github.com/samhol/SPHP-framework for the source repository
* @copyright Copyright (c) 2007-2022 Sami Holck <sami.holck@gmail.com>
* @license https://opensource.org/licenses/MIT The MIT License
... | true |
8e039a8ad385c850fb714cac71be4e73dbf1e877 | PHP | Bayramooov/IUT_Attendance | /app/Http/Controllers/ClassController.php | UTF-8 | 9,687 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use App\TClass;
use DB;
class ClassController extends Controller
{
public $list;
public function __construct()
{
$this->middleware('auth');
$cls=DB::table('base')... | true |
1672be57deb4812edf0249f7150c979529d500ed | PHP | PtrTn/battlerite-sdk | /src/PtrTn/Battlerite/Query/Matches/OffsetCriterion.php | UTF-8 | 496 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace PtrTn\Battlerite\Query\Matches;
use PtrTn\Battlerite\Query\CriterionInterface;
class OffsetCriterion implements CriterionInterface
{
/**
* @var int
*/
private $offset;
public function __construct(int $offset)
{
$this->offset = $offset;
}
public function toA... | true |
c40c0ed911a2df5b2913147600e06d7bd45663b2 | PHP | VitasMobile/Design-pattern-in-php | /command/Commands/LightsCommand.php | UTF-8 | 747 | 2.9375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Vitas
* Date: 8/6/2017
* Time: 9:58 PM
*/
namespace CommandSample\Commands;
require_once ("ICommand.php");
class LightsCommand implements ICommand {
private $_light;
private $_states = [];
public function __construct($light)
{
... | true |
9dd2602488fd1c30b19a6baaad9ed745a2e12b25 | PHP | Kyrst/Old_Base | /includes/imager.php | UTF-8 | 5,497 | 2.84375 | 3 | [] | no_license | <?php
include ABS_PATH . 'libs/WideImage/WideImage.php';
class Imager {
const FIT_INSIDE = 'inside';
const FIT_OUTSIDE = 'outside';
const FIT_FILL = 'fill';
const SCALE_DOWN = 'down';
const SCALE_UP = 'up';
const SCALE_ANY = 'any';
const FORCE_GENERATE_CACHE = false;
cons... | true |
3606a0bfac12dcf2b941287b7ad8c15632dd859b | PHP | azuya/kohana3-admin | /classes/admin/log.php | UTF-8 | 3,255 | 3.015625 | 3 | [] | no_license | <?php defined('SYSPATH') or die('No direct script access.');
class Admin_Log {
// Returns a list of logs ordered by date in reverse
public static function latest_entries()
{
// Recursively get a list of log files
$logs = Kohana::list_files('logs');
// Find the month directory name
$log_year = array_pop( $... | true |
27cba8535d588721b53faae808da9cfe373627f1 | PHP | TimeToogo/Pinq | /Source/Queryable.php | UTF-8 | 8,681 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Pinq;
use Pinq\Expressions as O;
use Pinq\Iterators\IIteratorScheme;
use Pinq\Queries\Requests;
use Pinq\Queries\Segments;
/**
* The standard queryable class, fully implements the queryable API
*
* @author Elliot Levin <elliotlevin@hotmail.com>
*/
class Queryable extends QueryBuilder implements I... | true |
0fb1b52165aa964e276939e06c6b8dd63628241c | PHP | xu-chao/php-bootstarp-scaffold | /query_complex_action1.php | UTF-8 | 3,389 | 2.53125 | 3 | [] | no_license | <?php
header("Content-Type:text/html;charset=utf-8");
@$CityName=$_REQUEST['CityName'];
@$ParkName=$_REQUEST['ParkName'];
@$ProjectName=$_REQUEST['ProjectName'];
@$ProblemType=$_REQUEST['ProblemType'];
include "db_config.php";
$db = new mysqli("$mysql_server_name","$mysql_us... | true |
c7e2745cf2aede019c71ef2d5b46079633f54d71 | PHP | GrandvauxClement/starWarsMVC | /View/home_view.php | UTF-8 | 3,899 | 2.515625 | 3 | [] | no_license | <html>
<head>
<?php require 'Parts/stylesheets.html'; ?>
</head>
<body>
<?php require 'Parts/nav.php'; ?>
<h1 class="text-center text-primary">Bienvenue sur la page listant les planets et les vaisseaux </h1>
<h2 class="text-danger text-center">Les planètes </h2>
... | true |
db68fb243b96eb4ad56d3480c15bb31ef9004bde | PHP | xoandaica/zend | /application/models/CartItem.php | UTF-8 | 581 | 2.71875 | 3 | [] | no_license | <?php
class Application_Model_CartItem {
// chi tiet san pham
private $product;
// so luong
private $number;
// ghi chu san pham
private $note;
function getProduct() {
return $this->product;
}
function getNumber() {
return $this->number;
}
function getNot... | true |
e9b83a4f37181868880a2a5c5dadd4b9a428d255 | PHP | thomaswinsol/oopthomas | /table.php | UTF-8 | 599 | 2.6875 | 3 | [] | no_license | <?php
ini_set('display_erros',1);
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
require_once 'includes/Table.php';
require_once 'includes/Row.php';
require_once 'includes/Cell.php';
$celA1 = new cell('dit is A1');
$celA2 = new cell('dit is A2');
$rowA = new Ro... | true |
955be7ac8a211ba5b54259b23c2986ecf2bceef1 | PHP | JuliaSivartsson/1dv608 | /Project/src/view/NavigationView.php | UTF-8 | 2,705 | 2.796875 | 3 | [] | no_license | <?php
namespace view;
class NavigationView
{
const ViewAllProducts = "ViewAllProducts";
const RemoveItemFromBasket = "RemoveItemFromBasket";
const RemoveOneItemFromBasket = "RemoveOneItemFromBasket";
const ViewProduct = "ViewProduct";
const LoginUser = "LoginUser";
const AddProductToBasket = ... | true |
4e23c03e48c41caff0d9b15b60f8289e4b7f0817 | PHP | reporterry/Ciconia | /src/Ciconia/Extension/Core/LinkExtension.php | UTF-8 | 8,017 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Ciconia\Extension\Core;
use Ciconia\Common\Collection;
use Ciconia\Common\Text;
use Ciconia\Exception\SyntaxError;
use Ciconia\Extension\ExtensionInterface;
use Ciconia\Renderer\RendererAwareInterface;
use Ciconia\Renderer\RendererAwareTrait;
use Ciconia\Markdown;
/**
* Original source code from Mar... | true |
6d0ed39495de0d5e3c4fa563c47a89484888b2cb | PHP | divmazie/fullspectrumdatingapi | /Session.php | UTF-8 | 1,871 | 2.828125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: davidamackenzie
* Date: 11/11/18
* Time: 6:16 PM
*/
class Session extends DBObject
{
static $tableName = 'sessions';
static $columns = [
'id' => ['name' => 'id', 'primary_key' => true],
'account' => ['name' => 'account', 'foreign_key' => true, 'for... | true |
0be6b2f6f54ee62172ce9dbc9c9e700e6e5df253 | PHP | Saso/DI | /src/Base.php | UTF-8 | 363 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace DI\Creators;
abstract class Base {
abstract public function production();
abstract public function afterCreate($obj);
public function __construct($params) {
$this->params = $params;
}
/* // ne nucamo!
public function __invoke() {
... | true |
a6f1d2bc1e93925d26ef0b9f52ea97fe6c145feb | PHP | rawswift/Orinoco | /src/Route.php | UTF-8 | 9,585 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Orinoco Framework - A lightweight PHP framework.
*
* Copyright (c) 2008-2016 Ryan Yonzon, http://www.ryanyonzon.com/
* Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
*/
namespace Orinoco;
use Closure;
use Orinoco\Configuration;
use Orinoco\Container;
/**
* Fra... | true |
29faa99ec55ade62f6263b96a78fe1e9b42d4ccf | PHP | iambrianreich/shutterfly-order-fulfillment-api-client | /src/DeliveryEstimate.php | UTF-8 | 2,932 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file contains the RWC\Shutterfly\DeliveryEstimate class.
*
* @author Brian Reich <breich@reich-consulting.net>
* @copyright Copyright (C) 2018 Catalyst Fabric Solutions
* @license Private
*/
namespace RWC\Shutterfly;
/**
* Describes order delivery expectations.
*
* @package RWC\Shutterfl... | true |
f1ff9748d9acc113e548f7b6b6b65cdd1fdfd2aa | PHP | danielortega7DAW/RepositoryDAW2 | /clases/ejerciciosB/ej6b.php | UTF-8 | 198 | 3.296875 | 3 | [] | no_license | <HTML>
<HEAD><TITLE> EJ6B – Factorial</TITLE></HEAD>
<BODY>
<?php
$num="7";
$aux=1;
for($i=$num; $i>0; $i-=1){
$aux=$aux*$i;
}
echo $aux;
?>
</BODY>
</HTML> | true |
1bcf24430dd0309e1f974b536c3b246cbdc08451 | PHP | Dhruthi29/assignment-4 | /pg3.php | UTF-8 | 668 | 3.46875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>
example
</title></head>
<body>
<form method="post">
enter a number:<input type="text" name="num">
<button type="submit">check</button>
</form>
<?php
if($_POST)
{
$num=$_POST['num'];
$x=$num;
echo "number is";
echo $x;
$y=strrev($x);
echo "<br>";
echo "reversed n... | true |
3f50d2eb2096419f2f4f2c75af7b6800a2ea1feb | PHP | alfredosotil/meraki | /migrations/m180401_033307_add_variables_column_to_user_table.php | UTF-8 | 1,492 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles adding variables to table `user`.
*/
class m180401_033307_add_variables_column_to_user_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->addColumn('user', 'uuid', $this->string(45));
$this->addColumn('user', '... | true |
c206ea21db1a7fe610f20fc82110f964023843ef | PHP | phackctf/phack-ctf-2021-public | /challenges/Web-Server/agenda_2/frontend/src/graphql-client.php | UTF-8 | 740 | 2.71875 | 3 | [] | no_license | <?php
function graphql_query(string $endpoint, string $query, array $variables = [], ?string $token = null): array
{
$headers = ['Content-Type: application/json', 'User-Agent: Dunglas\'s minimal GraphQL client'];
if (null !== $token) {
$headers[] = "Authorization: bearer $token";
}
if (fal... | true |
3cd8ef8c9375724138d0c515a5ec1f0a18f94561 | PHP | fabioaspen/FB-php | /aula_43_Contador de visitas/contador.php | UTF-8 | 745 | 2.96875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<?php
// r = Abre para leitura, ponteiro no inicio
... | true |
4ef7229366cc62dcfcbbf45b1eaa07b932d784e3 | PHP | marcellinamichie291/autotrade-1 | /telegram/bots/boss_baby_xbot/Commands/ChartCommand.php | UTF-8 | 3,324 | 2.703125 | 3 | [] | no_license | <?php
/**
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Longman\TelegramBot\Commands\UserCommands;
use Long... | true |
f6dc1e408cf8c7b08565e5a380b5baa98e8059eb | PHP | slimouGit/Rosetta-App | /developement/sandbox/suchen.php | UTF-8 | 4,048 | 2.5625 | 3 | [] | no_license |
<?php
//include header
include "elements/header.php";
?>
<?php
//include db connection
include "include/db_connect.php";
?>
<?php
//include input_check
include "include/input_check.php";
?>
<!--Script Autovervollstaendigung-->
<script>
$(function() {
$( "#skills" ).autocomplete({
source: 's... | true |
34ed8959d69daaa564c1bcb30616034b24e24dae | PHP | fabriceLatri/mySymfonyFramework | /src/Controller/GreetingController.php | UTF-8 | 714 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class GreetingController {
public function hello (Request $request, string $name)
{
$name = $request->attributes->get('name');
// Intégrer du H... | true |
a4ad87d8611cae8d5e0b02dc79ee059224d16e78 | PHP | w990752800/DEMO | /php/ODYZ/ODYZ/detail/data/8_order_select_delete.php | UTF-8 | 1,439 | 2.6875 | 3 | [] | no_license | <?php
/**接收客户端提交的uname和pid,把相关信息保存入需要的表,返回:{"msg": "ok","uid":1,"cid":100,"pid":10,"count":4}**/
header('Content-Type: text/plain;charset=UTF-8');
//接收客户端提交的数据
@$uname = $_REQUEST['uname'];
@$pid = $_REQUEST['pid'];
if( !$uname || !$pid){ //若客户端未提交必需的数据
echo "{}";
return; //退出当前PHP页面的执行
}
/*************************... | true |
34b9ffa3e36afd18e01afc22fb77951bddaf6c9c | PHP | songxuebing/fair | /qufair.com/application/module/AttachModel.php | UTF-8 | 992 | 2.515625 | 3 | [] | no_license | <?php
class AttachModel extends Module{
public function __construct(){
parent::__construct();
$this->_table='attach';
}
public function ImageSave($data){
return $this->Db->insert($this->_table.'_image',$data);
}
public function ImageUpdate($data,$where){
return $this->Db->update($this->_table.'_i... | true |
8f7ef631e9945990707543f27393cb31ab82c13f | PHP | rmhdev/server-status | /src/ServerStatus/Domain/Model/Alert/Reason/AlertReasonDowntime.php | UTF-8 | 817 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* This file is part of the server-status package.
*
* (c) Roberto Martin <rmh.dev@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ServerStatus\Domain\Model\Alert\Reason;
us... | true |
173cb1c0ff8e482eeea0eb48d633b46111cd00ab | PHP | rugirl/fashionstore | /application/models/Clothes_model.php | UTF-8 | 2,241 | 2.890625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* Class Clothes_model
*/
class Clothes_model extends CI_Model
{
var $records_per_page = 10;
var $start_from = 0;
var $current_page_number = 1;
/**
* @return mixed
* query to fetch all records
*/
public function make_query()
{
if(isset($_POST["rowCount"]))
{
$this->records_per_page = $_P... | true |
6b1a53adc58425d08a9511de988b28a7ed6293fb | PHP | ZahariyaPehlivanova/PhpFundamentalsHomeworks | /Inheritance/Encapsulation/05.Pizza/Dought.php | UTF-8 | 1,529 | 3.390625 | 3 | [] | no_license | <?php
namespace Pizza;
class Dought
{
const CALORIES_PER_GRAM = 2;
const DOUGH_TYPES = [
"White" => 1.5,
"Wholegrain" => 1.0
];
const BAKING_TECHNIQUES = [
"Crispy" => 0.9,
"Chewy" => 1.1,
"Homemade" => 1.0
];
private $flourType;
private $bakingTe... | true |
d2bd7c5904e95f8b54576d4d649adfefc5116f9d | PHP | thenunn/MagicMen | /registration/register.php | UTF-8 | 2,331 | 2.84375 | 3 | [] | no_license | <?php
try
{
$required = array('name', 'usern', 'pw');
$error = false;
foreach($required as $field) {
if (empty($_POST[$field])) {
$error = true;
}
}
... | true |
b6758dcc28b5afc42ddb0b381c3fafa73a6a7fa3 | PHP | Shyuson/zzchat | /function/inscriptest.php | UTF-8 | 1,414 | 2.671875 | 3 | [] | no_license | <!******************************************/
/* inscriptest.php */
/*******************************************/
/* This file verify if the user is */
/* registered yet */
/*******************************************/>
<?php
include("function.php");
$login = $... | true |
7499d04ff0c709a339d24443faeb0973095c48c6 | PHP | meysamrazmi/ed808 | /sites/all/modules/808/custom_services/flag_resource.inc | UTF-8 | 4,858 | 2.5625 | 3 | [] | no_license | <?php
/*
* flag_resource_user_follow: called from user/targeted_actions/follow
* flag_resource_content_bookmark: called from contents/targeted_actions/bookmark
* flag_resource_tag_bookmark: called from tag/targeted_actions/bookmark
*
* each function prepare the parameter for flag the related entity
* */
/*------... | true |
4851c1fcdabf41a4a6ec519673ca828672128cc4 | PHP | Chocobann986/umitest | /classes/system/subsystems/streams/umap/Facade.php | UTF-8 | 843 | 2.609375 | 3 | [] | no_license | <?php
namespace UmiCms\System\Streams\Umap;
use \iConfiguration as iConfig;
/**
* Класс фасада маршрутизатора umap
* @package UmiCms\System\Streams\Umap
*/
class Facade implements iFacade {
/** @var iConfig $config конфигурация */
private $config;
/** @var iExecutor $executor исполнитель запросов */... | true |
e30092d563988ec7a2150ce25c7fa3bbe182c5ce | PHP | transio/qiphp | /vendors/Qi/Asset/Css.php | UTF-8 | 970 | 2.96875 | 3 | [] | no_license | <?php
namespace Qi\Asset;
/**
* The Css class abstracts an HTML stylesheet (link) asset
*/
class Css
{
public $path;
public $media;
public $condition;
public function __construct($path, array $options=array())
{
$defaults = array(
"media" => null,
"condition" ... | true |
f5c8cfbda5ae83e301824b22a3a773c1b72abb38 | PHP | medalibs/testclient | /Framework/Controller.php | UTF-8 | 1,417 | 2.953125 | 3 | [] | no_license | <?php
/**
* Class Controller.
*
* @author Dali
*/
class Controller {
// Action to execute
private $action;
// Execute Action
public function executeAction($action) {
if (method_exists($this, $action)) {
$this->action = $action;
$this->{$this->action}();
}else{
throw new Excepti... | true |
3dd6170ca1484a6be9598f94360bab32584960ae | PHP | mathysie/overhemd | /overhemd/calendar/CalendarParser.php | UTF-8 | 3,931 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace overhemd\calendar;
use Google_Service_Calendar_Event;
use overhemd\calendar\aanvragen\Aanvraag;
use overhemd\calendar\aanvragen\DLFAanvraag;
use overhemd\calendar\aanvragen\FooBarAanvraag;
use overhemd\calendar\aanvragen\ISSCAanvraag;
use overhemd\calendar\aanvragen\LIACSAanv... | true |
91f103c48bad78f123ae44fa04326c59d7b6592b | PHP | octalmage/wib | /php-7.3.0/Zend/tests/variable_with_boolean_name.phpt | UTF-8 | 134 | 2.5625 | 3 | [
"Zend-2.0",
"BSD-4-Clause-UC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"TCL",
"ISC",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"blessing",
"MIT"
] | permissive | --TEST--
Variable with boolean name
--FILE--
<?php
${true} = 42;
var_dump(${true});
var_dump(${'1'});
?>
--EXPECT--
int(42)
int(42)
| true |
879a0d4783e2c58161c621a5a0c50363490fca95 | PHP | AmauryCarrade/minutis-redcall-app | /symfony/src/Manager/PhoneManager.php | UTF-8 | 668 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Manager;
use App\Entity\Phone;
use App\Repository\PhoneRepository;
class PhoneManager
{
/**
* @var PhoneRepository
*/
private $phoneRepository;
public function __construct(PhoneRepository $phoneRepository)
{
$this->phoneRepository = $phoneRepository;
}
... | true |
d915a5e6416982f27e3c672a5cf6f54ae52da698 | PHP | gilangrestu/Tugas-UAS-WPF | /DB/classes/databese.php | UTF-8 | 813 | 2.703125 | 3 | [] | no_license | <?php
class Database{
private $host = DB_HOSTNAME;
private $user = DB_USERNAME;
private $pass = DB_PASSWORD;
private $name = DB_NAME;
public $db;
public function __construct(){
//membuat koneksi database
$this->db = new mysqli($this->host,$this->user,$this->pass,$this->name);
}
... | true |
cc59400eafafbd72077cde59ce103afbd3030340 | PHP | buzzingpixel/sitemonitor | /app/Console/Controllers/CheckSitesController.php | UTF-8 | 5,907 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Console\Controllers;
use App\MonitoredSite;
use App\NotificationEmail;
use App\SiteIncident;
use Carbon\Carbon;
use Symfony\Component\Console\Output\ConsoleOutput;
use GuzzleHttp\Client;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Mail\Message;
/**
* Class CheckSitesController
*... | true |
eaf8ae835613afffbcfe4e687ee968ec55cece1f | PHP | standardgalactic/Villain | /src/core/Villain/Form/Form.php | UTF-8 | 3,629 | 3.0625 | 3 | [] | no_license | <?php
/**
* @file
* A form html element.
*
* Created by Matt Farina on 2011-04-24
*/
namespace Villain\Form;
/**
* A form html element.
*
* @author Matt Farina
*/
class Form extends AbstractElement {
/**
* The collection holding the form elements.
*/
protected $collection = null;
/**
* The... | true |
78e85eea93b473bbfc7dfa95502cd2abc5b9592b | PHP | LaviniaDisca/HTTPcafe | /MVC App/HTTPCafe/app/controllers/product.php | UTF-8 | 1,246 | 2.703125 | 3 | [] | no_license | <?php
class Product extends Controller
{
public function getProductCatalog($type)
{
$products_model = $this->loadModel('ProductsModel');
$products = $products_model->getAllProducts($type);
$catalog = '<div class="catalog">';
foreach ($products as $product) {
$cat... | true |
7022f5fb4142bde491d8992e194b4d25075bed81 | PHP | iddanielsan/musical-potato | /app/Repositories/Eloquent/EloquentIncomeRepository.php | UTF-8 | 794 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Eloquent;
use App\Models\Income;
use App\Repositories\Contracts\IncomeRepository;
class EloquentIncomeRepository extends EloquentBaseRepository implements IncomeRepository
{
protected $income;
public function __construct(Income $income)
{
parent::__construct($inc... | true |
54f93366564556455e3e3b9e4fe8fdb8ee6c80f5 | PHP | hufeng903/laravel_demo | /app/Services/UserLogger.php | UTF-8 | 299 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: hu
* Date: 2018/5/21
* Time: 10:14
*/
namespace App\Services;
use App\Contracts\Logger;
class UserLogger implements Logger
{
public function execute($message)
{
info('this log is from user :'.$message);
return true;
}
} | true |
af1be7ba8861bb8c273c4e2de18bc57eb0ba99fe | PHP | anorgan/onfleet-client | /src/Response.php | UTF-8 | 803 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Anorgan\Onfleet;
use GuzzleHttp\Psr7\Response as BaseResponse;
use Psr\Http\Message\ResponseInterface;
/**
* Class Response
* @package Anorgan\Onfleet
*/
class Response extends BaseResponse
{
/**
* @param ResponseInterface $response
* @return Response
*/
public static functi... | true |
e0a08b31e2ccf2bdab5a631bdacc5b31eb63eac0 | PHP | nikola3in1/IT255-PZ-Backend | /getSong.php | UTF-8 | 2,641 | 2.765625 | 3 | [] | no_license | <?php
header("Content-type: application/json");
$postdata = file_get_contents("php://input");
$post = json_decode($postdata,true);
// $post['creator']="nikola";
// $post['songName']="Cardi";
// $post['ip']="87.116.179.16";
if(isset($post['creator']) && isset($post['songName']) && isset($po... | true |
c8fff380aceb15c07ad4e778f1114c96777adc24 | PHP | kaleidpixel/shachipoco | /apps/Core/Env.php | UTF-8 | 1,760 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* ENV ファイル・ログファイルの制御.
*
* @since 1.0.0
* @author KUCKLU <kuck1u@users.noreply.github.com>
* @licenses MIT License.
*/
realpath( $_SERVER[ 'SCRIPT_FILENAME' ] ) !== realpath( __FILE__ ) OR exit( 'No direct script access allowed' );
use \Dotenv\Exception\ValidationException;
/**
* エラーログの制御.
*/
d... | true |
ff82791798ec3b7af14bdfdeae7310a7ef70d6ca | PHP | 1int/rockstars | /commands/TacticsController.php | UTF-8 | 28,315 | 2.59375 | 3 | [] | no_license | <?php
/**
* Crafted by Pavel Lint 30/04/2018
* Mail to: pavel@1int.org
*/
namespace app\commands;
use app\models\TacticsLevel;
use app\models\TacticsPosition;
use Yii;
use yii\console\Controller;
use \Imagick;
use yii\image\drivers\Image;
use yii\base\Action;
us... | true |
d31648995edc2eac35403f573eaadd013a5634ed | PHP | fridgegit/predis | /lib/Predis/ResponseError.php | UTF-8 | 707 | 2.859375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Predis;
class ResponseError {
public $skipParse = true;
private $_message;
private $_type;
public function __construct($message) {
$this->_message = $message;
$this->_type = substr($message, 0, strpos($message, ' '));
}
public function __get($property) {
... | true |