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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1d62a23b78f7809cd61c6df4716f77f152faaf1e | PHP | noah-franklin/smart-library | /f20-Dynamic-Mapping/Admin/Feedback/feedback.php | UTF-8 | 2,767 | 2.53125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang = "en">
<head>
<meta charset = "UTF-8">
<link rel="stylesheet" type="text/css" href="../Admin.css">
<title> View FeedBack Statistics</title>
</head>
<body>
<div id = "wrapper">
<div id = "header-div">
<h1> View FeedBack Statistics</h1>
</div>
<div id = "nav-div">... | true |
da1fd094f0c71df04861a1800c2936a87a7fc4a0 | PHP | lightbinder/ChowningRoster | /0.4/proglang_admin.php | UTF-8 | 1,500 | 2.734375 | 3 | [] | no_license | <!-- The other admin file that allows a user to add more programming languages to the dropdown menu for roster_add.php -->
<!-- This file is very similar to level_add.php, so detailed comments are included there -->
<?php require_once("includes/header-require_login.php"); ?>
<?php require_once("includes/menu.php");... | true |
f782a83679476e1dfb679eb3a4e3fd8f04553f5a | PHP | TDSD/Backend_SenActe | /api/annuler-rv.php | UTF-8 | 755 | 2.75 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Annuler rendez-vous</title>
</head>
<body>
<?php
require_once 'database.php';
$id = ($_POST['id'] !== null && (int)$_POST['id'] > 0)? mysq... | true |
7e3bcc3d23d8f40038c3d3d9bee92a284a7377e1 | PHP | kevinsito/money-transfer | /app/Http/Controllers/UserController.php | UTF-8 | 808 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\User;
use Auth;
class UserController extends Controller
{
// display all users within the database
public function index() {
$users = User::all()->except(Auth::user()->id);
return view('users', compact... | true |
99e8f8feaec7a066ca4402735172ded2d27f51ce | PHP | janicheg/zway-api | /src/Devices/SwitchControl.php | UTF-8 | 1,208 | 2.609375 | 3 | [] | no_license | <?php
namespace ZWay\Devices;
use ZWay\Commands\Device\DownstartCommand;
use ZWay\Commands\Device\DownstopCommand;
use ZWay\Commands\Device\ExactCommand;
use ZWay\Commands\Device\UpstartCommand;
use ZWay\Commands\Device\UpstopCommand;
class SwitchControl extends SwitchBinary
{
const TYPE_NAME = 'switchControl';
... | true |
92d4ef3714ace40f917d6022c90360310a566960 | PHP | ickokid/pph21 | /tests/Pph21_test.php | UTF-8 | 936 | 2.765625 | 3 | [] | no_license | <?php
namespace Pajak\Tests;
use Pajak\Pph21 as Pph21;
use PHPUnit\Framework\TestCase;
class Pph21Test extends TestCase{
public function testGetValue()
{
$month_salary = 7800000;
$married_status = 1; // 1 : Married, 0 : Single
$children = 1;
$pajak = new Pph21($month_salary, $married_status, $children... | true |
9fe5bcc894ef9d231a0aa10edd07b05275f95886 | PHP | adedamola-var/Pandasport | /admin.php | UTF-8 | 4,516 | 2.828125 | 3 | [] | no_license | <?php include('header.php'); ?>
<?php include('config/server.php'); ?>
<?php
if (!isset($_SESSION['username'])) {
$_SESSION['msg'] = "You must log in first";
header('location: login.php');
}
if (isset($_GET['logout'])) {
session_destroy();
unset($_SESSION['username']);
header("location: login.php");
}
?>
<... | true |
e80928126adb11f5a3aba88f28fe313f16380044 | PHP | jucabrera/teaching-php | /testes-unitarios/tests/BilheteUnicoTest.php | UTF-8 | 943 | 2.5625 | 3 | [] | no_license | <?php
declare ( strict_types = 1 );
use PHPUnit\Framework\TestCase;
final class BilheteUnicoTest extends TestCase {
public function testBilheteValido() {
$data = new Datetime();
$data->sub ( new DateInterval ( 'P5D' ) );
$bilheteUnico = new BilheteUnico ();
$bilheteUnico->setCreatedAt ( $data );
$isVa... | true |
dcd685ff0e064c9681516d31326a749c752369dd | PHP | jiewangsu/test | /ab.php | UTF-8 | 514 | 3.546875 | 4 | [] | no_license | <?php
abstract class ab
{
public function show()
{
$this->getName();
}
protected abstract function getName();
public abstract function getAge($ange);
}
class chikc extends ab{
public function getName()
{
// TODO: Implement getName() method.
}
public function get... | true |
19b0b167b47d3a4164c17c263af5ee9a5ea01a3a | PHP | pinoyshaun1991/Gecko | /src/Model/SolarSystemModel.php | UTF-8 | 1,079 | 3.0625 | 3 | [] | no_license | <?php
namespace gecko\Model;
use gecko\Common\Model\SolarSystemModelInterface;
use gecko\Service\CalculateService;
/**
* Class SolarSystemModel
* @package gecko\Model
*/
class SolarSystemModel implements SolarSystemModelInterface
{
public $id;
/**
* Gets the id
*
* @return mixed
*/
... | true |
0612ee6619d18105f60f8ab6ca12946d7d7de0c6 | PHP | kjrasus/Midterm | /login.php | UTF-8 | 3,730 | 2.8125 | 3 | [] | no_license | <?php
session_start();
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] !== true){
header("location: welcome.php");
exit;
}
require_once "config.php";
$_SESSION["verify"] = false;
$_SESSION["code_access"] = false;
$username="";
if($_SERVER["REQUEST_METHOD"] == "POST"){
if(empty(tri... | true |
79bf057101569ffb836a1b7d6f74b9b17f4d9abb | PHP | lemondrop81/Liger-Aquariums | /process_register.php | UTF-8 | 1,407 | 2.515625 | 3 | [] | no_license | <?php
require ('connect.php');
$submit = $_POST['command'];
$username = filter_var($_POST['username'], FILTER_SANITIZE_SPECIAL_CHARS);
$password1 = filter_var($_POST['password1'], FILTER_SANITIZE_SPECIAL_CHARS);
$password2 = filter_var($_POST['password2'], FILTER_SANITIZE_SPECIAL_CHARS)... | true |
2f112ae50766235389fb68c4153b7fb4d1fe2ec5 | PHP | wenbinye/tars-php | /src/rpc/middleware/AddRequestReferer.php | UTF-8 | 867 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace wenbinye\tars\rpc\middleware;
use wenbinye\tars\rpc\message\ClientRequestInterface;
use wenbinye\tars\rpc\message\ResponseInterface;
use wenbinye\tars\server\ServerProperties;
/**
* 在 context 中添加调用方信息.
*/
class AddRequestReferer implements ClientMiddlewareInterface
{
p... | true |
d876343368232195faf1d4e14f4ca971ef88096d | PHP | Vitnere/BlackSwan | /other/Docs(Basics of raw PHP)/4. Arrays.php | UTF-8 | 869 | 3.453125 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title>Arrays</title>
</head>
<body>
<?php
$numbers=array(4, 8, 15, 16, 23, 42);/*arr init*/
echo $numbers[0];/*echo po indexu u arr*/
?>
<br/>
<?php $mixed=array(6, "fox", "dog", ar... | true |
f8cc507832641250d737cd4fc7a67b80c69d16c5 | PHP | RyGoCRGT/PersonalUAB | /model/TipoEmpleadoConsulta.php | UTF-8 | 370 | 2.546875 | 3 | [] | no_license | <?php
/**
*
*/
class TipoEmpleadoConsulta
{
public $Conexion;
function __construct($conexion)
{
$this->Conexion=$conexion;
}
public function listaTipoEmpleado()
{
$query="SELECT * FROM tipoEmpleado";
$consulta=$this->Conexion->prepare($query);
$consulta->execute();
$registro=$consu... | true |
24ce913452ba7523cad531a56910d33094f7b668 | PHP | enzoruiz/vaoapelotearl | /app/models/Periodo.php | UTF-8 | 2,984 | 2.578125 | 3 | [] | no_license | <?php
class Periodo extends Eloquent{
protected $fillable = array('iddia', 'horainicio', 'horafin', 'precio');
protected $primaryKey = "idperiodo";
public function horas(){
return $this->hasMany('Hora', 'idperiodo');
}
public function dia(){
return $this->belongsTo('Dia', 'iddia');
}
public static funct... | true |
65827b95dec416e9e2daba4b086fb339fc6b731c | PHP | Mikdaam/MEA_QUIZZ | /src/application/models/Connect_model.php | UTF-8 | 775 | 2.796875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
*
*/
class Connect_model extends CI_Model
{
function __construct()
{
$this->load->database();
}
public function set_user($data)
{
return $this->db->insert('users', $data);
}
public function get_user($mail)
{
$query = $this->db->get_where('users', array(... | true |
8536660d18e0e27c572a62612bd6651da856e1c7 | PHP | makeadiff/profile-app | /system/get_names.php | UTF-8 | 524 | 2.625 | 3 | [] | no_license | <?php
require_once '../common.php';
$city_id = i($QUERY, 'city_id', 0);
$name = i($QUERY, 'name', '');
$city_check = '';
if($city_id) $city_check = "AND city_id=$city_id";
$people = $sql->getById("SELECT id, name FROM User WHERE status='1' AND user_type='volunteer' $city_check AND name LIKE '%$name%'");
if... | true |
7ce5cb2ae91efaa06ff96d19540fe83fa0ccbaac | PHP | matheusagnes/mwork | /framework/MGrid.php | UTF-8 | 14,109 | 2.71875 | 3 | [] | no_license | <?php
class MGrid
{
private $columns;
private $actions;
private $sqlColumns;
private $listControlName;
private $listViewName;
private $formControlName;
private $formViewName;
private $gridId;
private $filter;
protected $model;
private $MCore;
private $editImage;
pri... | true |
ec0180ccef6e0d6ae6925277a9851cd61a2447a2 | PHP | nate-kobe/fratapp | /src/AppBundle/Entity/UploadedFile.php | UTF-8 | 2,584 | 2.6875 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* UploadedFile
* @ORM\MappedSuperclass
* @ORM\Entity(repositoryClass="AppBundle\Repository\UploadedFileRepository")
* @ORM\InheritanceType("JOINED")
* @ORM\DiscriminatorColumn(name="discr", type="string")
* @ORM\DiscriminatorMap({"design_c... | true |
fe12f00d7d41a694224c868bc0c0b143db300d50 | PHP | reFreshD2/dockercompose | /app/src/Entity/Lot.php | UTF-8 | 2,173 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
use App\Repository\LotRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=LotRepository::class)
*/
class Lot
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="s... | true |
b49baaad157944b631efee90108a4ad5d5d96ea0 | PHP | antoniog85/warehouse | /src/Transformer/EloquentToEntity/TransformableToEntity.php | UTF-8 | 347 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Warehouse\Transformer\EloquentToEntity;
use Illuminate\Database\Eloquent\Model;
use Warehouse\Entity\EntityInterface;
interface TransformableToEntity
{
/**
* Transform into an entity
*
* @param Model $model
* @return EntityInterface
*/
public function transform(Model ... | true |
0a9ce0e2e7ab617b584da7597f342a3230c6b177 | PHP | magekey/module-migration-sql | /Console/Command/MigrationSetupUpgradeCommand.php | UTF-8 | 1,115 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright © MageKey. All rights reserved.
* See LICENSE.txt for license details.
*/
namespace MageKey\MigrationSql\Console\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use MageKey\Migrat... | true |
c8ac171524381100ab2afc0ad5a3415ad59e8580 | PHP | sevensand/phpwork | /_function/function.php | UTF-8 | 2,883 | 2.671875 | 3 | [] | no_license | <?php
//my staring point
function startingPoint($lat=null, $lng=null){
global $g_key;
global $api_geocode;
$url = ''.$api_geocode.'address='.$lat.''.$lng.'&sensor=false&key='.$g_key.'';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt... | true |
037c77f3b86caf7eea75fcaf4798c6a0be5afaa9 | PHP | andrewchen5678/pomona | /includes/functions.php | UTF-8 | 3,194 | 2.890625 | 3 | [] | no_license | <?php
if (!defined('ACCESS_INCLUDE'))
{
die("access denied");
}
if (!defined('LOAD_COMMON'))
{
die("load common.php first before loading functions.php");
}
require_once('constants.php');
function redir301($url){
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: ".$url );
die();
}
function red... | true |
6bc6c7d9a782ae0c0bc5b1c41d260ac229d5a9c2 | PHP | Hyoumori/paiza | /20170517/D_006.php | UTF-8 | 203 | 2.890625 | 3 | [] | no_license | <?php
$line = trim(fgets(STDIN));
$b = explode(" ",$line);
if($b[1] == "km"){
echo $b[0]. "000000";
}else if($b[1] == "m"){
echo $b[0]. "000";
}else if($b[1] == "cm"){
echo $b[0]. "0";
}
?>
| true |
89e3f0f38816ad7c9948daecd6552ba1fad9dfdf | PHP | MimMarcelo/api-conta-contas | /src/Model/Conta.php | UTF-8 | 1,195 | 2.59375 | 3 | [] | no_license | <?php
namespace MimMarcelo\API\ContaContas\Model;
use Illuminate\Database\Eloquent\Model;
use MimMarcelo\API\ContaContas\Model\Helper\ValidateFields;
/**
* Description of Conta
*
* @author Marcelo Júnior
*/
class Conta extends Model implements ValidateFields
{
public $timestamps = false;
protected $fi... | true |
bbd434eae524cfc4a70166dcddef6725734b64af | PHP | karayakar/sharepoint-1 | /feeds/SharePointViewParser.inc | UTF-8 | 4,000 | 2.671875 | 3 | [] | no_license | <?php
//$Id$
/**
* Parses a given file as a CSV file.
*/
class SharePointViewParser extends FeedsParser {
private $list_info;
/**
* Implements FeedsParser::parse().
*/
public function parse(FeedsSource $source, FeedsFetcherResult $fetcher_result) {
$list = $fetcher_result->getRaw();
// Fe... | true |
0a0d35898bf90dbe8e0739c4ca02c764ec592fb0 | PHP | flakeshake/mail2forum | /tests/display/display.php | UTF-8 | 6,650 | 2.734375 | 3 | [] | no_license | <?php
/************************************************************
*
* $Date$
* $Revision$
* $Author$
* $HeadURL$
*
/***********************************************************/
class m2f_HtmlReporter extends SimpleReporter {
var $_character_set;
/**
* Does nothing y... | true |
97c3651ee3728e2e2f383776b5bfdd6f6267116d | PHP | lumenated/fractal-views | /src/View.php | UTF-8 | 1,937 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace Lumenated\FractalViews;
use League\Fractal\Manager;
use League\Fractal\Pagination\Cursor;
use League\Fractal\Resource\Collection;
use League\Fractal\Resource\Item;
use Traversable;
/**
* Class View
* @package Lumenated\FractalViews
*/
abstract class View
{
/**
* @var
*/
protecte... | true |
bbad4f22a975eff8391fe6a0b6e28e2de1330fe8 | PHP | ricardojriosr/RocketInternetTest | /src/AppBundle/Controller/CashmachineController.php | UTF-8 | 3,576 | 2.625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Ricardo
* Date: 27-10-2015
* Time: 12:24 PM
*/
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoun... | true |
6f7665cbc4be0c7be7f9d0512e4279c6d552e714 | PHP | nameless08/php-tasks | /lecture-2/task-4.php | UTF-8 | 991 | 3.609375 | 4 | [] | no_license | <?php
/*
Задача №4.
Написать программу для перевода числа из десятичной системы счисления в двоичную и наоборот.
*/
$n = 8;
$result = '';
while($n > 0) {
if($n % 2 == 0) {
$result = $result.'0';
$n = (int)($n / 2);
}
if($n % 2 == 1){
$result = $result.'1';
$n = (int)$n / 2;
}
}
... | true |
afaea9cf0040cf867a19ade8db1b45d5d93655e6 | PHP | gezpage/mtapptest | /src/MindTools/TestApp/Form/RegistrationFormHandler.php | UTF-8 | 1,253 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace MindTools\TestApp\Form;
use MindTools\TestApp\Form\Validator\RegistrationFormValidator;
use MindTools\TestApp\User\UserManager;
/**
* Class RegistrationFormHandler
*
* @package MindTools\TestApp\Form
*/
class RegistrationFormHandler
{
/**
* @var \MindTools\TestApp\User\UserManager
*... | true |
aa498f583cde4ebc5007118a88f87baac5aaf0a7 | PHP | Kr4v3N/Forteroche_project | /src/Controller/UserController.php | UTF-8 | 5,412 | 2.9375 | 3 | [] | no_license | <?php
namespace Controller;
use Model\User;
use Model\UserManager;
/**
* Class UserController
*
* @package \Controller
*/
class UserController extends AbstractController
{
/**
* UserController constructor.
*/
public function __construct()
{
parent:: __construct();
if ($_SERV... | true |
cc59e75930b2ce4e3672f7f534e022f784b12dba | PHP | lightster/say-it-to-my-socket | /public/client.php | UTF-8 | 1,425 | 2.578125 | 3 | [] | no_license | <html>
<body>
<script type="text/javascript">
var createFizzbuzzClient = function (messagePriority, iterationCallback) {
var connection = new WebSocket('ws://v.com:8085');
connection.onmessage = function (event) {
var message = JSON.parse(event... | true |
5d75999a1ae8ab2de9f3e7b598fb9450a3d75834 | PHP | vboctor/mantisbt-web | /irclogs.php | UTF-8 | 4,841 | 3.140625 | 3 | [] | no_license | <?php
/**
* IRC logs archive page is built dynamically by reading the contents
* of the /irclogs directory
*/
/**
* Parsing directories in sorted order using provided callback function
*/
class SortingIterator extends ArrayIterator {
public function __construct( Traversable $iterator, $callback ) {
parent::_... | true |
1c05b33362632539b2b222625f81fb64a797d794 | PHP | robotil/legos2 | /lib/import/importVectorLog.class.php | UTF-8 | 13,965 | 2.6875 | 3 | [] | no_license | <?php
class ImportVectorLog {
private $_mission;
private $_dcmMissionPart;
private $_pcmMissionPart;
private $_pushbackMissionPart;
private $_culDeSecSeconds;
private $_startSingleCulDeSecTime;
private $_phaseImport;
private $_trails = array ();
private $_islocValid = false;
private $_lastLatitude;
private $... | true |
36dbf8ecfcc7c374850b2fb624cc7802846c75c2 | PHP | dlightnin/Firecollect | /backend/fc-projects/includes/deleteProject.php | UTF-8 | 2,152 | 2.515625 | 3 | [] | no_license | <?php
require '../../includes/dbConnect.php';
// include '../projects.php' ;
if(isset($_POST['del']))
{
$del = $_POST['del'];
$check = "SELECT * from tbl_projects where id = '$del'" ;
$result = $db_conn->query($check) ;
$res = $result->fetch_assoc() ;
// if not already in trash
if($res['deleted'] == 0)
{
... | true |
257d40674e1fc9b82039a9c3d9cca4a471381952 | PHP | anton6378/td | /backend/migrations/m210315_161900_create_car_table.php | UTF-8 | 1,511 | 2.703125 | 3 | [] | no_license | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%car}}`.
*/
class m210315_161900_create_car_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%car}}', [
'id' => $this->primaryKey(),
'name' => $th... | true |
a3fcebf84c607869f83c5b4cd9cc765ecfa8eea4 | PHP | aradvari/aradvarirepo | /models/SzallitasiMod.php | UTF-8 | 788 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "szallitasi_mod".
*
* @property string $id_szallitasi_mod
* @property string $nev
*/
class SzallitasiMod extends \app\components\db\ActiveRecord
{
const TYPE_CSOMAGKULDO = 1;
const TYPE_SZEMELYES = 2;
const TYPE_GLS = 3;
... | true |
6e82a35032db2f02567b1b92615ecbd1ccac6741 | PHP | studiofontana/hudebnibanka-lenny-admin | /src/WebLoader/JavaScriptLoader.php | UTF-8 | 1,813 | 2.609375 | 3 | [] | no_license | <?php
namespace Lenny\WebLoader;
use Nette\DI\Container,
WebLoader,
Nette\Utils\Finder;
abstract class JavaScriptLoader extends WebLoader\Nette\JavaScriptLoader
{
public function __construct(Container $context)
{
$wwwDir = $context->parameters['wwwDir'];
$basePath = $context->httpRequest->url->basePath;
... | true |
7441ec3d9b4d9861eb8a38b9dc83ac32ae24e474 | PHP | BigmIkeX/personal-management-system | /src/Command/Upload/GenerateMiniaturesForImagesCommand.php | UTF-8 | 6,105 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Command\Upload;
use App\Controller\Core\Application;
use App\Controller\Core\Env;
use App\Services\Validation\FileValidatorService;
use App\Services\Files\DirectoriesHandler;
use App\Services\Files\FilesHandler;
use App\Services\Files\ImageHandler;
use DirectoryIterator;
use Doctrine\DBAL\Driver\E... | true |
3a69af8494cddf96829f432dfd72717c174fffd5 | PHP | saintriko/back-end-course-PS | /lw3/print_args.php | UTF-8 | 307 | 3.109375 | 3 | [] | no_license | <?php
header('Content-Type: text/plain;charset=UTF-8');
if ($argc < 2) {
echo 'No parameters were specified!';
} else {
echo 'Number of arguments: ' . ($argc - 1) . "\n";
echo 'Arguments: ';
for ($argument = 1; $argument < $argc; $argument++) {
echo $argv[$argument] . ' ';
}
} | true |
dc2379aa9ac799d60b3423626b892619570b4d46 | PHP | codezips/task-manager-php | /config.php | UTF-8 | 563 | 2.53125 | 3 | [] | no_license | <?php
# Define() - used to define a costant at runtime
define('DB_SERVER', 'localhost:3306');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'taskmanager');
$mysqli = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
if($mysqli->connect_errno > ... | true |
9947b47c303a16120e6a0e83481fb204fbc37192 | PHP | sslab-gatech/autofz | /docker/benchmark/seeds/fuzzer-test-suite/php-fuzz-parser/ArrayAccess_indirect_append.phpt | UTF-8 | 479 | 3.234375 | 3 | [
"MIT"
] | permissive | <?php
class AA implements ArrayAccess {
private $data = [];
public function &offsetGet($name) {
if (null === $name) {
return $this->data[];
} else {
return $this->data[$name];
}
}
public function offsetSet($name, $value) {
$this->data[$name] = $va... | true |
07e7e85cc41f9e9aa7849b360302bbd89f8ba9fe | PHP | julesdecockHogent/moederbarrywebsite | /dao/AdminDAO.php | UTF-8 | 1,972 | 2.84375 | 3 | [] | no_license | <?php
require_once __DIR__ . '/DAO.php';
class AdminDAO extends DAO {
public function updateEvent($post, $id) {
if(isset($post["subedit"])) {
$sql = "UPDATE mb_events SET `name` = :name, `date` = :dates, `time` = :times, `fbevent` = :fbevent, `description` = :description, `image` = :image, `location` = :l... | true |
44e66837ca5a7fbbe50468aec111af01eb29270b | PHP | YuluaP/PHP | /Is.php | UTF-8 | 135 | 2.953125 | 3 | [] | no_license | <?php
$myVar = 23;
if (is_array($myVar)) {
echo 'Массив';
}
else {
echo 'Не массив';
}
echo '<br />' . PHP_EOL;
?> | true |
085d454e398f3512ab6a9aa49b587168cfb01e99 | PHP | xiaobinghhh/LaravelPing | /app/Http/Controllers/Teacher/BasisController.php | UTF-8 | 6,164 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Teacher;
use App\Application\Basis;
use App\Application\Course;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\Validator;... | true |
cf564df4cede795c6db8b00743eaf31c1f18dc0c | PHP | yanzi321/feilin | /app/Http/Controllers/AdminV2/ETemplateController.php | UTF-8 | 2,366 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\AdminV2;
use App\Models\Esign\Event;
use Illuminate\Http\Request;
use App\Models\Basic\ETemplate;
use App\Http\RequestsV2\ETemplateRequest;
use App\ServicesV2\ETemplateService;
class ETemplateController extends BaseController
{
protected $service;
public function __const... | true |
333af2ca071ef9f023c9fb7a834a264d3da91300 | PHP | spittfree/roman-numbers | /app/RomanNumbers/Logic/Roman/Logic.php | UTF-8 | 2,508 | 3.46875 | 3 | [] | no_license | <?php
namespace RomanNumbers\Logic\Roman;
use RomanNumbers\Mappers\Roman\SymbolsMapper;
use RomanNumbers\Mappers\Exception\InvalidValueException;
class Logic
{
/**
* @var SymbolsMapper
*/
private $symbolsMapper;
/**
* This constructor uses home-made dependency injection for testing purpos... | true |
bdb2ad9582b5c160c853b3f36de3ad5962efc562 | PHP | ingokuba/planningapp | /public/classes/Entity.php | UTF-8 | 4,437 | 3.390625 | 3 | [] | no_license | <?php
/**
* Abstract parent class for all database entities.
*
*/
abstract class Entity
{
/**
* Name of the implemented entity and identifier of the database table.
*
* @var string
*/
private $entityType;
/**
* Two dimensional array containing the attribute values.
* <cod... | true |
99af8f2eee81914bc6a46eb148464ffa18445d3c | PHP | FajarBay/WEB_2_A2_14085 | /database/seeds/Fajar_seeder.php | UTF-8 | 640 | 2.78125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class Fajar_seeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Faker\Factory::create(); //import library faker
$limit = 10; //limit berapa banyak data
for($i = 0; $i ... | true |
1f4b406117a9571e9ac117debea46dd5e55bf247 | PHP | wuxi889/laravel-blog | /app/Http/Controllers/Index/Article.php | UTF-8 | 2,504 | 2.515625 | 3 | [] | no_license | <?php
/*
* @Description: Article 控制器
* @Author: uSee
* @Date: 2020-02-24 13:32:02
* @LastEditors: uSee
* @LastEditTime: 2020-02-28 11:01:29
* @FilePath: \laravel-blog\app\Http\Controllers\Index\Article.php
*/
namespace App\Http\Controllers\Index;
use App\Models\Articles;
use App\Models\Comments;
class Article... | true |
4c6427cf84223da50800ec6e870034ad3381d031 | PHP | Naaataaliya/dip_php | /view/AnswerView.php | UTF-8 | 475 | 2.671875 | 3 | [] | no_license | <?php
require_once 'autoload.php';
class AnswerView extends View
{
private $template = 'adminPage.twig';
public function __construct($template = '')
{
if (!empty($template)) {
$this->template = $template;
}
parent::__construct();
}
public function rende... | true |
45e4f899c2e6505c3d60610de2dd4e62e04f3674 | PHP | bwoester/yii-feature-request-module | /protected/modules/featureRequest/behaviors/LazyLoadAbstractUserBehavior.php | UTF-8 | 1,149 | 2.6875 | 3 | [] | no_license | <?php
/**
* Returns an AbstractUser instance for use in feature request module.
* Will create AbstractUser records as needed on the fly.
*
* @author Benjamin
*/
class LazyLoadAbstractUserBehavior extends CBehavior
{
private $_abstractUser = null;
/**
* @return AbstractUser
*/
public function getAbs... | true |
f98a208c0eb5028ea952cecb0fcdb331c7bbcabe | PHP | iwyg/image | /Color/Cmyk.php | UTF-8 | 2,850 | 2.90625 | 3 | [] | no_license | <?php
/*
* This File is part of the Thapp\Image\Color package
*
* (c) iwyg <mail@thomas-appel.com>
*
* For full copyright and license information, please refer to the LICENSE file
* that was distributed with this package.
*/
namespace Thapp\Image\Color;
use Thapp\Image\Color\Palette\Cmyk as CmykPalette;
use T... | true |
2c83420c0ea925e0fa624bdbb466727982d87a68 | PHP | guoliang1994/tp5base | /extend/crypto/Aes.php | UTF-8 | 1,099 | 3.265625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace crypto;
class Aes
{
private $cipher;// 加密方式
private $key;// 密钥
private $options = 0;// options 是以下标记的按位或: OPENSSL_RAW_DATA 、 OPENSSL_ZERO_PADDING
private $iv;
public function __construct($cipher,$key,$options = 0,$iv = '')
{
$this->cipher = $cipher;
$this->key = ... | true |
6e8ce85c4f264bf3dfe0c3bee83a1a4bdaf2bd43 | PHP | Ashraful05/phpbasics | /demo.php | UTF-8 | 420 | 3.28125 | 3 | [] | no_license | <?php
class Demo
{
public $name="BITM";
protected $city="Dhaka";
private $country="Bangladesh";
public function addition($x,$y){
// echo $this->subtraction($x,$y);
$z=$x+$y;
echo $z;
}
protected function subtraction(){
$res = 'In Subtraction';
echo $res;... | true |
867c3d3691192e90429d3aaf2e532361ebec57a7 | PHP | bee7813993/KaraokeRequestorWeb | /configlist_json.php | UTF-8 | 317 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
// 設定一覧をjsonで返す。
$configfile = 'config.ini';
$config_ini = array ();
if(file_exists($configfile)){
$config_ini = parse_ini_file($configfile);
//var_dump($config_ini);
$json = json_encode($config_ini,JSON_PRETTY_PRINT);
print $json;
}else{
print "no $configfile";
}
?>
| true |
d08317d3ff44dc271d83a8a366c9048aa2ead86e | PHP | Ntanui/Informatics-Project | /signup.php | UTF-8 | 5,091 | 2.78125 | 3 | [] | no_license | <!-- This file provides input capabilities into a table of Users -->
<!--It also lists the contents of the table -->
<!-- It uses Bootsrap for formatting-->
<!--Norman K. Tanui-->
<?php
include_once('config.php');
include_once('dbutils.php');
include_once('header.php');
?>
<html>
<head>
<title>... | true |
373e3b272a7c1eeab24667dc44752819977c357d | PHP | pankaj-php/Hypleystaging | /wp-content/plugins/wp-hummingbird/admin/views/performance/audits/uses-responsive-images.php | UTF-8 | 4,598 | 2.625 | 3 | [
"MIT",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only"
] | permissive | <?php
/**
* Properly size images audit.
*
* @since 2.0.0
* @package Hummingbird
*
* @var stdClass $audit Audit object.
* @var \Hummingbird\Admin\Pages\Performance $this Performance page.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<h4><?php esc_html_e( 'Over... | true |
6e43f018238fb27281af93fe84d591c16548aaa7 | PHP | boluijten3/BASALT_PAMsoftware | /htdocs/gino-pam/php_cm/modules/interface/components/select/SelectDocumentCluster.class.php | UTF-8 | 2,080 | 2.734375 | 3 | [] | no_license | <?php
/**
* Het SelectDocumentCluster object.
*
* @author ben.dokter
*
*/
require_once('SelectComponent.class.php');
require_once('gino/MysqlUtils.class.php');
class SelectDocumentCluster extends SelectComponent {
protected $mysqlQuery = "";
protected $validQuery = false;
// edit
protected $clu... | true |
8b61430b77dab5bedfd336368cfc65c230aeca3e | PHP | alec-a/laravel-app | /database/migrations/2018_12_28_164305_create_issues_table.php | UTF-8 | 1,012 | 2.609375 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIssuesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('issues', functio... | true |
fde27f7b65623878e1622ed87a6546bc7677b219 | PHP | mons54/devis | /class/users.php | UTF-8 | 1,293 | 2.640625 | 3 | [] | no_license | <?php
@session_start();
class users extends db {
public function getUserConnect() {
return !empty($_SESSION['user']);
}
public function hacherMotDePasse($mdp){
@define("PREFIXE", "ftyuio79g71adf");
@define("SUFFIXE", "46fglp46a22dr5");
return md5(sha1(PREFIXE) . $mdp . sha1(SUFFIXE));
}
public funct... | true |
e1fb62e4cd95728ee7bcb108cfe44c383d223809 | PHP | profchydon/api.school | /app/api/v1/Repositories/ScholarshipCollectionRepository.php | UTF-8 | 1,278 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Api\v1\Repositories;
use App\ScholarshipCollection;
use Illuminate\Http\Request;
use DB;
class ScholarshipCollectionRepository
{
/**
* Create a new User
*
* @param object $request
*
* @return object $user
*
*/
public function create($request)
{
try {
... | true |
b15195492a74f6e12597fda55c05b1bcaaf637d5 | PHP | hackzilla/bing-api | /PHP/bingads/BingAds/CustomerManagement/SecretQuestion.php | UTF-8 | 1,273 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace BingAds\CustomerManagement;
/**
* Defines the possible secret questions that users can choose from to help them recall their password.
* @link http://msdn.microsoft.com/en-us/library/bb671980(v=msads.90).aspx SecretQuestion Value Set
*/
final class SecretQuestion
{
/** Do not specify this value... | true |
6ec187d2fa67bed379532d2d2f307844be856e0a | PHP | Sher208/Revels | /app/models/User.php | UTF-8 | 4,636 | 3.0625 | 3 | [] | no_license | <?php
class User{
private $db;
public function __construct(){
$this->db = new Database;
}
//Register
public function register($data){
$this->db->query('INSERT INTO users (name, regNo ,phoneNo, email, category, event, token, password) VALUES(:name, :... | true |
e952220f8650cb9291fefd538c22bbf477847453 | PHP | Ultrabenosaurus/OrphanCrawler | /site-crawler.class.php | UTF-8 | 19,874 | 3.046875 | 3 | [] | no_license | <?php
// Original PHP code by Dan at github.com/Ultrabenosaurus
// Please acknowledge use of this code by including this header.
include_once 'robots-crawler.class.php';
class SiteCrawler{
private $url; // (string) initial to start crawling from
private $pages; // (array) queue of pages yet to be crawled
pri... | true |
295ed8208257549e5fa12635103b1e98244e9bd3 | PHP | berkanrhdz/Fadming | /Web/php/opciones_select_simple.php | UTF-8 | 1,785 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
error_reporting(0);
require("conectar_basedatos.php");
define('CLIENTE_PARTICULAR', '1');
define('CLIENTE_EMPRESA', '2');
$tipo = $_SESSION['tipo'];
if ($tipo == CLIENTE_EMPRESA) {
echo "<option value='1'>Finca con más plantas</option>";
echo "<option value='2'>Huerto con más plantas</option>";
ec... | true |
3e2d5bc31a12935e83201421d78b30b1e0be121d | PHP | BurakBaykara/dynamische-cv | /update/student.php | UTF-8 | 1,843 | 2.6875 | 3 | [] | no_license | <?php
if(isset($_POST['submit'])){
$voornaam = $_POST['voornaam'];
$achternaam = $_POST['achternaam'];
$studentennummer = $_POST['studentennummer'];
$woonplaats = $_POST['woonplaats'];
$geboortedatum = $_POST['geboortedatum'];
include('database_connectie.php');
$sql ="UPDATE S... | true |
8952249e55a57a3caa58da3562de17f48a2bc7b0 | PHP | bloatless/query-builder | /src/ConnectionAdapter/PdoSqlite.php | UTF-8 | 917 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Bloatless\QueryBuilder\ConnectionAdapter;
require_once __DIR__ . '/ConnectionAdapterInterface.php';
require_once __DIR__ . '/../Exception/QueryBuilderException.php';
use Bloatless\QueryBuilder\Exception\QueryBuilderException;
class PdoSqlite implements ConnectionAdapterInte... | true |
69702fc6d6a3e5f918e98ccc68ce505e5d9114a8 | PHP | deadelus/Embrace_of_Dracula | /php/save.php | UTF-8 | 881 | 2.546875 | 3 | [] | no_license | <?php
include "db.php";
// Accès à la base de données
if(isset($_GET['saveJoueur'])
&& isset($_GET['nom'])
&& isset($_GET['prenom'])
&& isset($_GET['pseudo'])
&& isset($_GET['mail'])
&& isset($_GET['pseudo'])
&& isset($_GET['passw'])
&& isset($_GET['vie'])
&& isset($_GET[... | true |
da96339ea10ae81c9e0b1a7937d0b6e64d86286a | PHP | lightyoruichi/saferlanes | /includes/callow/util/CollectionInterface.php | UTF-8 | 503 | 2.71875 | 3 | [] | no_license | <?php
/**
* timestamp May 30, 2012 4:09:44 PM
*
*
* @author Lasana Murray <lmurray@trinistorm.org>
* @copyright 2012 Lasana Murray
* @package callow\util
*
*
*/
namespace callow\util;
interface CollectionInterface
{
public function add($member, $index=NULL);
public function remove($index);
p... | true |
e89f7f433aeb818735465046eb270c673ba9ef87 | PHP | johnsantosdk/appclinica | /app/Http/Requests/TelefoneRequest.php | UTF-8 | 1,794 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class TelefoneRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get t... | true |
5a26956373d59eb488665bf8dde4c3a5d22736c7 | PHP | ClassConnect/ClassConnect-Core | /extensions/dropbox/core/main.php | UTF-8 | 11,458 | 2.828125 | 3 | [] | no_license | <?php
/*/
* Throughout this file, if a SQL query is over 80 characters long, I will
* include a comment with a nicely formatted version of the query.
/*/
function _dropbox_authorize_content($assignment_id,$student_id)
{
global $user_id;
global $class_id;
global $class_level;
// Any student other than the ... | true |
aed191c7e9211f1a2f7e3ca2d54fb45a85051507 | PHP | martinmen/tpFinalPW02 | /htdocs/controlador/controlador_crearReserva.php | UTF-8 | 10,965 | 2.625 | 3 | [] | no_license | <?php
use mysql_xdevapi\Session;
include("../modelo/modelo_CrearReserva.php");
if (isset($_GET['vuelo']) && isset($_GET['matricula'])) {
$tipo_doc = getTipoDocumentos();
$vueloId = $_GET["vuelo"];
$matricula = $_GET["matricula"];
$tipo_cabina = getTipoDeCabinas($vueloId);
$costo = getCosto($vuel... | true |
d35e7062da1d9ec8d2aeb99b5b37b8a5dc72164b | PHP | medharik/it2_2019_jours | /it2_dynamique/poo/test_etudiant.php | UTF-8 | 354 | 2.6875 | 3 | [] | no_license | <?php
include("etudiant.class.php");
//instancier des objets de type etudiant(classe)
$reda=new Etudiant();
$reda->nom='ZAGHLOUL';
$reda->prenom='Reda';
$reda->age=22;
$reda->nom_complet();
$reda->majorite();
$youssef=new Etudiant();
$youssef->nom='DEBAB';
$youssef->prenom='Youssef';
$youssef->age=16;
$youssef->nom_com... | true |
afdf10d335fe8e9dc361a7f320cd2a7d069c2a58 | PHP | sellvana/sellvana | /resize.php | UTF-8 | 9,826 | 2.65625 | 3 | [
"LicenseRef-scancode-generic-cla"
] | no_license | <?php
/**
* Parameters:
*
* - f=<filename>
* - d=<default_filename>
* - s=<width>x<height> || <width|500>
* - q=<quality|95>
* - bg=<background|#FFFFFF>
* - t=text
* - c=<text color|888888>
*/
#$t = microtime(true);
//ini_set('display_errors', 1);
//error_reporting(-1);
ini_set('display_errors', 0);
error_r... | true |
3dc912313638a84a7e6d71eb735df081b10b5b28 | PHP | RuggedRadius/ACME-Entertainment-Movie-Database | /Source/topRated.php | UTF-8 | 2,150 | 2.796875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<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>Top Rated</title>
<?php
require "./php/html_head.php";
?>
</head>
<body>
<script
src="https://c... | true |
0195cae221fdd7fe3b6cb5c2db978eb11e7e2590 | PHP | joseph-walker/vector-functors | /src/Data/Constant.php | UTF-8 | 1,175 | 2.9375 | 3 | [] | no_license | <?php
namespace Vector\Data;
use Vector\Core\Module;
use Vector\Typeclass\MonadInterface;
/**
* Class Constant
* @package Vector\Data
*/
class Constant extends Module implements MonadInterface
{
private $heldValue;
/**
* Constant constructor.
* @param $value
*/
private function __const... | true |
6df600cce68aaffb8b10ccfbe1008900734ef928 | PHP | urakozz/yii-mongo-db-suite | /lib/EMongoLogRoute.php | UTF-8 | 5,031 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @author Ianaré Sévi (merge into EMongoDB)
* @author aoyagikouhei (original author)
* @license New BSD license
* @version 1.3
* @category ext
* @package ext.YiiMongoDbSuite
*/
/**
* EMongoLogRoute
* Example, in config/main.php:
* 'log'=>array(
* 'class' => 'CLogRouter',
* 'routes' ... | true |
8fb017acc6856cc481337cd61de2bd803afd7bb0 | PHP | nikola-n/testcase | /database/DbConnection.php | UTF-8 | 960 | 3.0625 | 3 | [] | no_license | <?php
namespace Database;
require __DIR__ . '/../vendor/autoload.php';
use PDO;
try {
$db = new PDO('mysql:host=localhost;dbname=steets-testcase', 'root', 'root');
} catch (\PDOException $th) {
echo $th->getMessage();
}
class DbConnection
{
/**
* @var \PDO
*/
private $connection;
pu... | true |
3805e3aefa58a41cee08eddc4d3d434cef151e86 | PHP | jimmymixer/MAMP | /09_mult_by_5/index.php | UTF-8 | 204 | 3.703125 | 4 | [] | no_license | <?php
$A = array(2,4,5,8,10,20,22,45);
function multiple($array,$factor){
foreach ($array as $value) {
echo $value * $factor . "<br>";
}
}
$B = multiple($A,6);
var_dump($B);
?>
| true |
d60cb2ede3d6da449b049520901e559ae933414a | PHP | matejMitas/Minicup-2014 | /2014/kontrolery/fotogalerie.php | UTF-8 | 1,942 | 2.65625 | 3 | [] | no_license | <?php
$template = 'fotogalerie.latte';
$foto = Array();
$i=0;
set_time_limit(60*100);
include __DIR__ .'/../sources/Utils/Object.php';
include __DIR__ .'/../sources/Utils/Image.php';
foreach (Array("patek", "sobota", "nedele", "vyhlaseni") as $key => $den) {
if (file_exists(__DIR__ . "/../upload/$den/$den.txt")) ... | true |
850a013f11509d4b021eef26ef40a6f1f3d1f7e9 | PHP | mrtnzlml-archive/CMS-lite | /app/extensions/Registrar.php | UTF-8 | 2,428 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Extensions;
use Kdyby\Doctrine\EntityManager;
use Nette;
use Nette\DI\Container;
/**
* @method onExtensionRegistration(Registrar $registrar)
* @method onInstall()
* @method onUninstall()
*/
class Registrar extends Nette\Object
{
/** @var \Closure[] */
public $onExtensionRegistration = [];
... | true |
7e2fbc30b0dddcaaebb77acf9b536061fe476871 | PHP | rogernavarro/sat-catalogos | /src/CFDI/ClavesUnidades.php | UTF-8 | 965 | 2.75 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace PhpCfdi\SatCatalogos\CFDI;
use PhpCfdi\SatCatalogos\Common\AbstractCatalogIdentifiable;
use PhpCfdi\SatCatalogos\Common\EntryIdentifiable;
use PhpCfdi\SatCatalogos\Repository;
/**
* Class ClavesUnidades
* @method ClaveUnidad obtain(string $id)
*/
class ClavesUnidades exte... | true |
3190cae00f57e1367279d5d076568d59d563060b | PHP | GlennKimbleJr/sails | /tests/Unit/CustomerTest.php | UTF-8 | 493 | 2.578125 | 3 | [] | no_license | <?php
namespace Tests\Unit;
use App\Customer;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class CustomerTest extends TestCase
{
use RefreshDatabase;
/** @test */
public function full_name_returns_the_first_and_last_name_concatenated()
{
$customer = factory(Customer... | true |
4ab92ba4d5023ee4a9c6f0c0047e805a1294a784 | PHP | jschreuder/Middle | /spec/ServerMiddleware/RoutingMiddlewareSpec.php | UTF-8 | 2,602 | 2.515625 | 3 | [] | no_license | <?php
namespace spec\jschreuder\Middle\ServerMiddleware;
use jschreuder\Middle\Controller\ControllerInterface;
use jschreuder\Middle\Router\NoRouteMatch;
use jschreuder\Middle\Router\RouteMatch;
use jschreuder\Middle\Router\RouterInterface;
use jschreuder\Middle\ServerMiddleware\RoutingMiddleware;
use PhpSpec\ObjectB... | true |
26058b6709520c5ac14640b68cbcaa66145224b6 | PHP | Jositoyoyo/carrito-strategy | /src/Payment/PaypalPayment.php | UTF-8 | 322 | 2.875 | 3 | [] | no_license | <?php
namespace Payment;
class PaypalPayment implements PaymentInterFace {
private $email;
private $password;
public function __construct(string $email, string $passwod) {
$this->email = $email;
$this->password = $passwod;
}
public function pay($amount) {
return;
}
... | true |
3ae54c6f4c4b62d428340cf1564939ea771460f3 | PHP | Tim6640/NarrowCasting | /classes/Crud.php | UTF-8 | 10,561 | 3.15625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Christian
* Date: 2/14/2018
* Time: 9:14 AM
*/
class Crud extends DbConnect
{
/**
* This class has been build for the reason to make dynamic DB calls. The reason for this is that you don't need
* a lot of useless functions repeating each DB process. This cla... | true |
1b434f8b649520bb57e4102901e5fee5ff4de227 | PHP | saturnin13/youth-projects | /programmation 2/wamp www site/www/site/MVC/vue/compte/connexion.php | UTF-8 | 842 | 2.859375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>connexion php</title>
</head>
<body>
<?php if(isset($_SESSION["id"]))
{?><p>vous êtes connécté <?php echo $_SESSION['pseudo'];?></p><?php }//si la session est ouverte
else {
if(isset($session_ouverte) AND $session_ouverte==FALSE)... | true |
43c69a583b1b326bcbe2398b46ff9d52e79a6f3e | PHP | RafalBysiek/SimpleCMS | /repository/UsersRepositoryImpl.php | UTF-8 | 2,412 | 3.171875 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Dto\User;
use App\Core\App;
class UsersRepositoryImpl implements UsersRepository {
private $pdo;
public function __construct($pdo) {
$this->pdo = $pdo;
}
// returns true if User with given email exists in container, returns false otherwise
public function userExists... | true |
1ffc7637122b6b5a62c6fddad69f050a27783b8b | PHP | manhluong1999/CNWEB-2020 | /get-totalFriendRequest-ajax.php | UTF-8 | 778 | 2.765625 | 3 | [] | no_license | <?php
ob_start(); // xóa kí tự lạ đầu file
require_once 'init.php';
require_once 'functions.php';
?>
<?php
include 'check-before-login.php';
?>
<?php
if (isset($_GET['userID'])) {
$userID = $_GET['userID'];
// lấy số lượng thông báo và số lượng inbox
$fr = totalFriendRequest($userID);
$ib = totalInboxR... | true |
d4c430c34ff4f03b89eb8545104091b71b3be81c | PHP | graze/dal | /tests/src/OrmAdapterFunctionalTestCase.php | UTF-8 | 3,525 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Graze\Dal\Test;
use Aura\Sql\ExtendedPdo;
use Graze\Dal\DalManagerInterface;
use Graze\Dal\Test\Entity\Customer;
use Graze\Dal\Test\Entity\Order;
use Graze\Dal\Test\Entity\Product;
abstract class OrmAdapterFunctionalTestCase extends FunctionalTestCase
{
/**
* @var ExtendedPdo
*/
pro... | true |
9f6d341804991b23aacf3691205335437936b9d7 | PHP | JoachimNem/web_dev | /PHP/PHP_global/Exercices/ex_5_4.php | UTF-8 | 264 | 3.96875 | 4 | [] | no_license | <?php
function multiplicationTable(){
$nombre = readline("Entrer un nombre : ");
echo("Table de $nombre : \n");
for ($i=1; $i<=10; $i++){
$résultat = $nombre * $i;
echo("$nombre x $i = $résultat\n");
}
}
multiplicationTable(); | true |
96e26654d61ee35aa166f66183510054f3cac8d6 | PHP | st884310/service-install | /web/test.php | UTF-8 | 401 | 2.703125 | 3 | [] | no_license | <?php
include ('./config.php');
$sql = "SELECT * FROM user_message where name='amy'";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result)) {
$haha = "id: " . $row['id']. " - Name: " . $row['name']. " -age: " . $row['age']. " -phone:" .$row['phone']. "... | true |
34f2e4bc7ef64382e14da0694998d7f88f7737f9 | PHP | jeawhanlee/fhorla | /System/Engine/model/DB.php | UTF-8 | 10,589 | 2.765625 | 3 | [] | no_license | <?php
require_once 'DB_Con.php';
class DB extends DB_Con{
protected $query,
$column = "*",
$where = array(),
$order,
$limit,
$custom,
$data;
protected static $table;
private $sql;
public static function t... | true |
a1cf10fda118fe01177af6d9b6fa565cdc4a26a3 | PHP | atrakeur/laravel-repository | /src/Atrakeur/Repository/Eloquent/EloquentConverter.php | UTF-8 | 213 | 2.515625 | 3 | [] | no_license | <?php namespace Atrakeur\Repository\Eloquent;
/**
* Convert an Eloquent model to something else
*/
interface EloquentConverter {
public function convert($models);
public function import($object, $model);
} | true |
b40ff615d279510e98a68b69a196a88cfdf23bb9 | PHP | 25mordad/gap-city-modern-system- | /module/adv_wb/model/WbRelClassStudent.php | UTF-8 | 4,150 | 2.640625 | 3 | [] | no_license | <?php
/**
* WbRelClassStudent.php
*
* This file is part of GCMS > MODEL
* The file is part of the layer for interacting with database.
* Linked table in DB: gcms_wb_rel_class_student
*
* @author dahdash <dahdash@gmail.com>
* @version 2.0
*
*/
class WbRelClassStudent
{
public function __construct()
{
}
... | true |
e00c41aaefe643fcd14ce4f5a101b438cc45844d | PHP | eam9891/ServiceRobot | /admin/editor/DeleteTable.php | UTF-8 | 760 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Ethan
* Date: 4/25/2017
* Time: 4:27 PM
*/
namespace admin\editor {
use admin\IAdminUI;
use database\UniversalConnect;
class DeleteTable extends IAdminUI {
private $error;
public function __construct(string $tableName) {
parent::_... | true |