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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
8d6135501823e1efd1cd4d45e9e219a1b8af7fd2 | PHP | vasyltanovsky/alfabrok.ua | /src/old.site/application/module/exchangeRate/provider.php | UTF-8 | 1,836 | 2.6875 | 3 | [] | no_license | <?php
/**
* @author Alex Tsurkin
*
*/
class ExchangeRateProvider extends Provider {
/**
* @param array() $param
* @return multitype:NULL Ambigous <unknown, multitype:> |NULL
*/
public function GetList($param = array()) {
$res = null;
$query = "";
if (! empty ( $param ['code'] ))
$query .= " and e.co... | true |
1954f4713d73001a2c65dc38360fb69b9a0c3cf1 | PHP | MasoudBehfar/Woo-currency | /list.php | UTF-8 | 1,401 | 2.75 | 3 | [] | no_license | <?php
include "db.php";
$stmt = $connection->prepare( "SELECT * FROM currency " );//WHERE dollar > 6500 AND dollar < 7500
$stmt->execute();
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum... | true |
43cd168bd328c80cf4711caf70784b7553cabc84 | PHP | icepoke/swooleyaf | /libs_frame/SyMessagePush/PushUtilBaiDu.php | UTF-8 | 1,939 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: 姜伟
* Date: 2019/6/27 0027
* Time: 16:33
*/
namespace SyMessagePush;
use SyConstant\ErrorCode;
use DesignPatterns\Singletons\MessagePushConfigSingleton;
use SyTool\Tool;
use SyTrait\SimpleTrait;
final class PushUtilBaiDu extends PushUtilBase
{
use SimpleTrait;
/**... | true |
73900617cdc631fc75a075dc7163fb38f0896287 | PHP | michalkovacik2/semestralna-praca-VAII-2 | /App/Models/Reservation.php | UTF-8 | 2,818 | 3.109375 | 3 | [] | no_license | <?php
namespace App\Models;
use App\Core\Model;
/**
* Class Reservation represents database entity reservation
* @package App\Models
*/
class Reservation extends Model
{
protected $reservation_id;
protected $request_date;
protected $reserve_day;
protected $return_day;
protected $book_id;
pr... | true |
4a05913f1ad3fc0c5497ea92ff1381a326d55731 | PHP | wahyutaqdirulaziz/phpbeginner-crud | /aksi/create_Materi.php | UTF-8 | 479 | 2.53125 | 3 | [] | no_license | <?php
// Check If form submitted, insert form data into users table.
if(isset($_POST['submit'])) {
$nama_materi = $_POST['nama_materi'];
$link = $_POST['link'];
// include database connection file
include_once("../koneksi.php");
// Insert user data into table
$result = mysqli_query($mysql,... | true |
8d22ae5c331f171d47fd4bb3c753e82c7dda1803 | PHP | Papakillyou/KinderGarden | /CodeIgniter-3.1.10/application/models/WorkerSalaryModel.php | UTF-8 | 2,297 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class WorkerSalaryModel extends CI_Model{
public function __construct()
{
parent::__construct();
$this->load->database();
}
//增加一条人员工资单,增加工作人员的时候添加会使用。
public function add($table,$WorkerSalary){
$this->db->insert($table,$WorkerSalary);
}
//根据工作人员工号查询出它的所有薪水单
public function showFromNum($table,$num)... | true |
21427ec35c1a07b71587ad42976ebfe9c76befda | PHP | mhabaj/Help-nShare | /control-session.php | UTF-8 | 329 | 2.609375 | 3 | [] | no_license | <?php
session_start(); // ici on continue la session
if ((!isset($_SESSION['id'])) || ($_SESSION['id'] == ''))
{
// La variable $_SESSION['login'] n'existe pas, ou bien elle est vide
// <=> la personne ne s'est PAS connectée
echo '<p>Vous devez vous <a href="../connexion.php">connecter</a>.</p>'."\n";
exit()... | true |
4552fbe0310a7fd15fc5886230a443f2721dc348 | PHP | erdincuzun/WPCourse | /Course06/06.php | UTF-8 | 299 | 3.015625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Merhaba</title>
</head>
<body>
<?php
$tarih = getdate();
foreach($tarih as $k => $v)
print($k . " : " . $v . "<br />");
print($tarih["mday"] . "<br />");
print($tarih["hours"]. "<br />");
?>
</body>
</html> | true |
09ee76b2fd84ad01d93f034753938ad7112153d5 | PHP | mopo922/LaravelTreats | /src/Controller/Api/Controller.php | UTF-8 | 9,408 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace LaravelTreats\Controller\Api;
use Auth;
use Validator;
use LaravelTreats\Controller\Controller as BaseController;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
class Controller extends BaseController
{
/** @var array $errors A pre-validation error description. */
protec... | true |
b8564e5d293429853a466df275592214b3bd0d68 | PHP | JamesGiraldo/publicidad | /rutas.php | UTF-8 | 650 | 2.765625 | 3 | [] | no_license | <?php
/* El Siguiente Codigo Gestiona El Contenido A mostrar o Procesar */
function cargarContenido($cnt , $acc){
// validar si El archivo Existe
if (file_exists("Controlador/".$cnt."_controlador.php")) {
require_once "Controlador/".$cnt."_controlador.php";
$clase = $cnt."_controlador";
$i = new $... | true |
f45ed389daee0318368f42f725a25616ea8db8b5 | PHP | contamobi/MicroserviceFrameworkBundle | /Logger/LoggerRawFormatter.php | UTF-8 | 800 | 2.765625 | 3 | [] | no_license | <?php
namespace Cmobi\MicroserviceFrameworkBundle\Logger;
use Monolog\Formatter\FormatterInterface;
class LoggerRawFormatter implements FormatterInterface
{
/**
* Formats a log record.
*
* @param array $record A record to format
* @return mixed The formatted record
*/
public functi... | true |
3242d05c7eacc21ed1ebdeb6a5cfaf7d213aece0 | PHP | miltondatta/hr-payroll | /application/models/api/To_do_model.php | UTF-8 | 1,131 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
class To_do_model extends CI_Model{
public function GettodoInfoWithValue($userid, $value = null, $date = null){
if($value != null){
$value_str = " and value = $value";
} else{
$value_str = '';
}
if($date != null){
$date_str = "... | true |
b5cbc60966cb4d283b386afb72bfd4a4dbcedb5b | PHP | jphp-group/jppm-http-repository | /src/api/repo/RepoDownloadHandler.php | UTF-8 | 1,542 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace api\repo;
use compress\GzipOutputStream;
use compress\TarArchive;
use php\http\HttpServerRequest;
use php\http\HttpServerResponse;
use php\io\File;
use php\io\IOException;
use php\lib\fs;
use utils\LocalRepository;
/**
* Class RepoDownloadHandler
* @package api\repo
*/
class RepoDownloadHandler
{
... | true |
7ca7dd1b4c007ee2e77f8af4a6fc3ef644d2a5e2 | PHP | myxanders/Projects | /Marist Housing Project/sql_helper.php | UTF-8 | 1,099 | 2.84375 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = DB_USERNAME;
$password = DB_PASSWORD;
$dbname = "ProjectTwo";
$conn = mysqli_connect($servername, $username, $password);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
function query($sql) {
global $conn;
return ... | true |
517b4b59c1d6d552af000102a95f80484b5ff066 | PHP | GregoryLacroix/cours-archive | /inc/functions.php | UTF-8 | 2,155 | 3.109375 | 3 | [] | no_license | <?php
//------------- FONCTION DEBUG
function debug($var, $mode = 1)
{
echo '<div style="background: orange; padding: 5px;">';
$trace = debug_backtrace(); // fonction prédéfinie retournant un tableau ARRAY contenat des informations tel que la ligne et le fichier où est executé la fonction
//echo '<pre>'; print_r($tr... | true |
40e428a87bedbb997ca78d6a5d132e194a13395f | PHP | barsengin/laravel | /app/Http/Controllers/EmployeeController.php | UTF-8 | 5,332 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Company;
use App\Models\Employee;
use App\Http\Requests\createEmployeeFormRequest;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class EmployeeController extends Controller
{
/**
* Display a listing of the resource.
... | true |
03f9c158a871effd3616c3905554d79f5f4a8a70 | PHP | sebastiantofano/sesiones-prueba | /index.php | UTF-8 | 1,357 | 2.921875 | 3 | [] | no_license | <?php
session_start();
if (isset($_SESSION["login"])) {
$nombre = $_SESSION["login"];
echo "Usted sigue logueado con la sesión de <strong>$nombre</strong>";
}
// Almaceno la coockie en una variable sino dejo por dejecto el tema claro
isset($_COOKIE['_cookietema']) ? $tema = $_COOKIE['_cookietema'] : $tema =... | true |
d2b83f15f93a55dc67b8c1822aecf41f3bae86c6 | PHP | fred001/frd-php-framework | /src/lib/Frd/Exception.php | UTF-8 | 561 | 4.0625 | 4 | [] | no_license | <?php
/*
$e=new Frd_Exception("test","test exception");
try{
throw new Exception("TEST");
throw $e;
}
catch(Frd_Exception $e)
{
echo $e->getType();
}
catch(Exception $e)
{
echo $e->getMessage();
}
echo 'bbb';
*/
class Frd_Exception extends Exception
... | true |
d9c15965fa88c5eeff251098dbb4ae913aad252f | PHP | nuwannnz/dcLibrary | /include/connection.php | UTF-8 | 295 | 2.578125 | 3 | [] | no_license | <?php
//this file creates a connection to the MYSQL database.
$conn = mysqli_connect($database['hostname'],$database['username'],$database['password'],$database['database']);
if(!$conn){
die("Something went wrong. We are unable to connect to our database." . mysqli_connect_error());
}
?> | true |
571f6a2cf88114c250aa0b7ef3e7ab4e385323b3 | PHP | LarsMog/Oenet-Intra | /administrator/components/com_sh404sef/plugins/system/shlib/shl_packages/html/contents/image.php | UTF-8 | 4,515 | 2.625 | 3 | [] | no_license | <?php
/**
* Shlib - programming library
*
* @author Yannick Gaultier
* @copyright (c) Yannick Gaultier 2016
* @package shlib
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @version 0.3.1.580
* @date 2016-08-25
*/
// Security check to ensure this file is being included by a... | true |
8752898e1fa0f2084fbf44ccfdd907678047b6ea | PHP | FurinKhazan/Sistem-Informasi-Monitoring-Pekerjaan-Pemadaman-Listrik-20Kv | /application/controllers/ulp.php | UTF-8 | 5,027 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Ulp extends CI_Controller {
public function __construct()
{
parent::__construct();
if (($this->session->userdata('role_id') != '1')) {
redirect('null');
};
$this->load->model('Ulp_model');
$this->load->library('form_validation');
... | true |
b22c66e0a15689ed211314d833249f42c8c7a26b | PHP | matak/dbrecord | /dbrecord/Entity.php | UTF-8 | 22,376 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* DbRecord
*
* @author Roman Matěna
* @copyright Copyright (c) 2010 Roman Matěna (http://www.romanmatena.cz)
*/
namespace dbrecord;
use Nette\FreezableObject,
Nette\ObjectMixin;
use Nette\MemberAccessException;
abstract class Entity extends FreezableObject implements \ArrayAccess, IObjectCont... | true |
795ec20649e212e5fe96eb77651900793a70985c | PHP | tnebes/edunova-pp23 | /learningphp.hr/love-calculator/loveCalculator.php | UTF-8 | 3,644 | 3.734375 | 4 | [] | no_license | <?php declare(strict_types = 1);
/**
* Function returns the combined names that are lowercase and that are used when calculating the love between two names
*/
function getCombinedNames(string $name0, string $name1): string
{
return strtolower(trim($name0)) . strtolower(trim($name1));
}
/*... | true |
ebca0225bbc541b4ccbfae2b40f243f7d8e446f5 | PHP | alexanderblnf/Book-a-Book | /dashboard/takePoints.php | UTF-8 | 725 | 2.71875 | 3 | [] | no_license | <?php
require_once "../config.php";
$points = $_POST['points'];
$email = $_POST['email'];
$sql = "SELECT points from users where Email='" . $email . "';";
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$remainingPoints = $row['points'] - $points;
if($remainingPoints < 0){
$success = false;
$m... | true |
d66b10e2d07570eb9ee89d90f763fd14c62180a7 | PHP | blakefan/kaili | /system/kaili/javascript.php | UTF-8 | 1,737 | 2.96875 | 3 | [] | no_license | <?php
namespace Kaili;
/**
* Kaili Javascript Class
*
* Support Javascript library in Kaili
*
* @package Kaili
* @subpackage Libraries
* @category Libraries
* @author Luigi Marco Simonetti
*/
class Javascript
{
/**
* Array of all added scripts
* @var array
*/
private $_scripts = ... | true |
3054d67cb50c89c0b8c889a7e1fb14de7ad09e92 | PHP | viger2012/testApp | /phpProgram/test_app/pay/wxpay.php | UTF-8 | 6,110 | 2.6875 | 3 | [] | no_license | <?php
class WxPay{
private $curl_timeout;
public $notify_url;
protected $values = array();
public function __construct() {
$this->curl_timeout = 0;
$this->notify_url = "";
}
public function set_notify_url($str){
$this->notify_url=$str;
}
public static function ... | true |
5b6e279e62eb2c6ff1bb6a9b85645d224594256a | PHP | adriensamson/Pac | /src/Pac/Command/ParseCommand.php | UTF-8 | 3,791 | 2.734375 | 3 | [] | no_license | <?php
/*
* This file is part of the c2is/silex-bootstrap.
*
* (c) Morgan Brunot <brunot.morgan@gmail.com>
*/
namespace Pac\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\I... | true |
21d9e6814cd5c61416304d88c8ea2407f5370869 | PHP | aprilarr/SPMI | /Controllers/MenubaseController.php | UTF-8 | 808 | 2.703125 | 3 | [] | no_license | <?php
namespace Controllers;
class MenubaseController extends \System\BaseController
{
// Controller ini digunakan sebagai induk dari controller lain
// untuk membuat menu, sehingga semua controller yang menginduk kesini bisa mengakses tampilan menu
public function __construct($controllerName=null, $actio... | true |
2fc798fa27adcfefe2641ce9f2dd010bcd1f2c1c | PHP | montuy337513/xoops-modules-backpack | /admin/backup.inc.php | UTF-8 | 14,909 | 2.640625 | 3 | [] | no_license | <?php
/*
*******************************************************
*** ***
*** backpack ***
*** Cedric MONTUY pour CHG-WEB ***
*** Original author : Yoshi Sakai ***
*** ***
*******************************************************
*/
// Define this to ena... | true |
e58dd935581b7ef497ded114c8e4ac4e2c87b135 | PHP | garethellis36/advent-of-code-2015 | /src/Day21/AttackingItemInterface.php | UTF-8 | 188 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: garethellis
* Date: 27/12/2015
* Time: 18:04
*/
namespace Day21;
interface AttackingItemInterface
{
public function getDamagePoints();
} | true |
8fa05631927a0ae83f81d365ed0f63bddd1ad37d | PHP | DelGarden/root-me | /r.php | UTF-8 | 487 | 2.65625 | 3 | [] | no_license | <?php
$cookie = $_GET[«c»]; // on reconnaît c en variable GET
if($cookie)
{
$fp = fopen(«cookies.txt»,»a»); // On ouvre cookies.txt en edition
(il est créé si il n’existe pas)
fputs($fp,$cook . «\r\n»); // On écrit le contenu du cookie sur une
nouvelle ligne
fclose($fp); // On ferme le fichier cookies.txt
... | true |
f11c6e5eedf133fec8530b05f5adbf571c3d09c3 | PHP | abatlleca/LaravelCoreApp | /app/Policies/UsersPolicy.php | UTF-8 | 2,672 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Policies;
use App\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class UsersPolicy
{
use HandlesAuthorization;
protected $role = 'user';
protected $permission_list = [
'list' => 'user-list',
'show' => 'user-show',
'create' => 'user-create',
'up... | true |
6441f06c4e0186542995ad6c3a4517edafa310f7 | PHP | BenDejardin/Projet_phpUnit | /src/Core/CardGame32.php | UTF-8 | 4,031 | 3.640625 | 4 | [] | no_license | <?php
namespace App\Core;
/**
* Class CardGame32 : un jeu de cartes.
* @package App\Core
*/
class CardGame32
{
//tableau des cartes et des couleurs
const ORDERS_COLORS = ['carreau' => 1, 'pique' => 2, 'coeur' => 3, 'trefle' => 4];
const ORDERS_CARDS = ['7' => 1, '8' => 2, '9' => 3, '10' => 4, 'valet' =... | true |
7399a9ec3938c5e5099fbf83193e4e47ded59054 | PHP | pondokit/deJacetre | /database/seeds/TagsTableSeeder.php | UTF-8 | 2,112 | 2.671875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Tag;
use App\Post;
class TagsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('tags')->truncate();
DB::table('post_tag')->truncate();
$php = new Tag();... | true |
51502ec72fa7f54aff1141a8f14e2255aed313b7 | PHP | ei12012/mieic1516-sinf-u | /Protótipo Vertical/Webpage/config/connection.php | UTF-8 | 1,976 | 2.9375 | 3 | [] | no_license | <?php
try
{
//$text = "sqlite:/Users/Miguel Moreira/Documents/Webpages/ProjectoSINF/Database/dados.db";
$text = "sqlite:" . $BASE_DIR_DB . "/dados.db";
$basedados = new PDO($text);
if ($basedados === false)
{
echo 'Conexao a base de dados falhou';
die();
}
$basedados->setAttribute(PDO::ATTR_PE... | true |
eb82bba1a386606ddebec3037f7328524cf8a679 | PHP | undercloud/xpc | /consoler/function/catch.xpc.php | UTF-8 | 1,969 | 2.53125 | 3 | [] | no_license | <?php
if (false === function_exists('xpc_catch')) {
/**
* @param callable|null $handler
*/
function xpc_catch(callable $handler = null)
{
$proxy = function (array $arguments) use ($handler) {
if ($handler) {
$handler($arguments);
}
$error = (
'--- ERROR ' . str_repeat('-', XPC_TERM_... | true |
cf2986cc01f450d047557cff729b6624dc95a86a | PHP | bleachangel/public | /TM/sl/5/5.18/test.php | UTF-8 | 741 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
$str=iconv("UTF-8", "GB2312","用今日的辛勤工作,换明日的双倍回报!");
$replace=iconv("UTF-8", "GB2312","百倍");
echo substr_replace($str, $replace, 26, 4);
//setlocale(LC_ALL, "en_US.UTF-8");
//echo setlocale(LC_ALL, 0);
// Set language to German
//putenv('LC_ALL=de_DE');
//setlocale(LC_ALL, 'de_DE');
// Specify locat... | true |
a8ce5adc943e120285c6eecc3a176dbfe5603b73 | PHP | KyleDBoyd/CSCI370FinalProject | /viewGroupPhoto.php | UTF-8 | 1,500 | 2.96875 | 3 | [] | no_license | <html>
<head>
<title>Viewing Photos</title>
</head>
<body>
<?php
try {
// Create (connect to) SQLite database in file
$file_db = new PDO('sqlite:photos');
// Set errormode to exceptions
$file_db->setAttribute(PDO::ATTR_ERRMODE,
PDO::ERRMODE_EXCEPTION... | true |
39d5f2895449a51e0e8ea0e59aea95666b5d927c | PHP | superdun/join-wechat | /include/functions.php | UTF-8 | 26,794 | 3.265625 | 3 | [] | no_license | <?php
/*
* 常用函数
*/
/*
* 得到当前的时间,精确到百万分之一秒
*/
function getMicroTime()
{
list($a, $b) = explode(" ", microtime());
return (double)$b + (double)$a;
}
/*
* 得到指定文件的扩展名
*/
function getFileExt($filename = "")
{
$dot = strrpos($filename, ".");
return substr($filename, $dot + 1);
... | true |
e52b8f4a6a7782aebff0d9b020d0f02596ea706e | PHP | mathmpr/winged-framework-v2 | /Winged/External/Mailgun/Mailgun.php | UTF-8 | 2,477 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Winged\External\Mailgun;
use Winged\Http\ExternalRequest;
class Mailgun
{
public $domain = null;
public $api_key = null;
public $resquest = null;
public function __construct($api_key = false, $domain = false)
{
if (is_string($api_key) && is_string($domain)) {
... | true |
15209b93c93c72c9729ad179129762e4cd04e147 | PHP | zimon42/taskopedia | /subtasks/task9_login_handler/v2/login_module/LoginSuccessPage.php | UTF-8 | 413 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
include_once("LoginConfig.php");
class LoginSuccessPage {
public function getContent() {
$html = "You have been logged in! ";
$url = isset($_SESSION["navigate_to_url_after_login"])
? $_SESSION["navigate_to_url_after_login"]
: LoginConfig::$mainPagePath;
$html .= "<button onclick=\"location='$url'... | true |
f618af9a121da7eb2e68a18dbda48df5a11e4453 | PHP | PacktPublishing/Functional-PHP | /Chapter02/02-hidden_inputs.php | UTF-8 | 1,748 | 3.328125 | 3 | [
"MIT"
] | permissive | <?php
function add(int $a, int $b): int
{
return $a + $b;
}
?>
<?php
// let's assume Session is a class giving access
// to the $_SESSION variable.
function nextMessage(): string
{
return Session::pop('message');
}
// A simple score updating method for a game
function updateScore(Player $player, int $point... | true |
0506eeb010e7006a8893ac3a33d44796e6366a82 | PHP | KSVaz/symfony_formation | /src/Entity/Demo.php | UTF-8 | 1,107 | 2.75 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
class Demo
{
/**
* @ORM\Id
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $titre;
/**
* @ORM\Colu... | true |
261029bb7d3848a06cfe23cdceb16521cc0e4456 | PHP | czarrar/baby-database | /library/Zarrar/Form/SubForm/Age.php | UTF-8 | 3,780 | 2.96875 | 3 | [] | no_license | <?php
/** Zend_Form */
require_once 'Zarrar/Form/SubForm/Date.php';
/**
* Collection of three form fields that are combined:
* - year, month, day as select fields
* - combined into Year-Month-Day
* Validation done on subfields and combined fields
*
* @package Zend_Form
* @author Zarrar Shehzad
**/
class Zar... | true |
cb03e9380df06a1f837bfa17467701001ef8e98c | PHP | nikserg/crm-certificate-api | /models/response/Esia/Egrul.php | UTF-8 | 1,794 | 2.578125 | 3 | [] | no_license | <?php
namespace nikserg\CRMCertificateAPI\models\response\Esia;
/**
* Запросы к ЕСИА
*
* @package nikserg\CRMCertificateAPI\models\response
*/
class Egrul
{
/**
* @var int
*/
public $id;
/**
* @var int
*/
public $status;
/**
* @var string
*/
public $comment;
... | true |
da30a07e69322f9d9dcf5cac3349c98aa5753a61 | PHP | Danack/DataType | /src/DataType/ProcessRule/EnumMap.php | UTF-8 | 1,921 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace DataType\ProcessRule;
use DataType\DataStorage\DataStorage;
use DataType\Exception\InvalidRulesExceptionData;
use DataType\Messages;
use DataType\OpenApi\ParamDescription;
use DataType\ProcessedValues;
use DataType\ValidationResult;
/**
* Checks that the value is one of a... | true |
9ea32f23955bfc256eea21f5ee070cb3ec679301 | PHP | germandosko/agrouruguay | /.svn/pristine/9e/9ea32f23955bfc256eea21f5ee070cb3ec679301.svn-base | UTF-8 | 2,880 | 3.21875 | 3 | [] | no_license | <?php
/**
* @author David Curras
* @version March 13, 2013
* @filesource /Utils/Data/Validate.php
*/
class Validate{
/**
* Returns false if the given string is a valid email address
* otherwise return the valid email string
*/
public static function Email($string, $sanitize=true){
if($sanitize){
... | true |
8d8873a74ea2ad5119403abddc1fe097b2071cb1 | PHP | ramanasha/Institute-Management-System | /IMS/validate/forms/form/add_batch_p.php | UTF-8 | 944 | 2.6875 | 3 | [] | no_license | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Add Batch</title>
</head>
<body>
<?php
include "dbinst.php";
$name=$_POST['course_name'];
$id=$_POST['batch_code'];
$start=$_POST['start_time'];
$time1=$_POST['time1'];
$end=$_POST['end_time'];
$time2=$_POST['time2'];
$strength=$_POS... | true |
9e50e3baf892c7fddc385cb4bacdbb2bddd5ff82 | PHP | kaustubh-kulkarni/phpprojects | /class_access.php | UTF-8 | 540 | 3.859375 | 4 | [] | no_license | <?php
class Cars {
//Property (Need to use var inside class to let php know, outside of class it is ok to use $)
public $wheel_count = 4;
private $door_count = 4;
protected $seat_count = 2;
// functions are nothing but methods
function car_detail()
{
echo $this->wheel_count;
echo ... | true |
8b06943487226ff157c054d6676efe02cfe84e82 | PHP | isabella232/wp-cookie-banner-plugin | /jam3-cookie-banner.php | UTF-8 | 3,249 | 2.671875 | 3 | [] | no_license | <?php
/*
Plugin Name: Jam3 Cookie Banner Plugin
Description: Creates cookie based user notice banner
Author: Jam3
Version: 1.0
*/
/**
* Current version of plugin
*/
define( 'JAM3_COOKIE_PLUGIN_VERSION', '1.0' );
/**
* Filesystem path to plugin
*/
define( 'JAM3_COOKIE_PLUGIN_BASE_DIR', dirname( __FILE__ ) );
defin... | true |
b4f53e872d52aba024d702df2a2b8e74d6ae7fe5 | PHP | davidnatanseabra/AgroNegocio | /App/Models/DAO/PermissaoDAO.php | UTF-8 | 1,916 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Models\DAO;
use App\Models\Entidades\Permissao;
class PermissaoDAO extends BaseDAO {
function selecionar($tabela, $campos, $quantidade, $pagina, $condicao, $valorCondicao, $orderBy, $debug = null) {
$resultado = $this->select($tabela, $campos, $quantidade, $pagina, $condicao, $valor... | true |
ec2cd60d2a68d4e19bcefe4668d344b2f677fb95 | PHP | bencagri/artisan-deployer | /src/Command/DeployCommand.php | UTF-8 | 3,641 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Bencagri\Artisan\Deployer\Command;
use Bencagri\Artisan\Deployer\Context;
use Bencagri\Artisan\Deployer\Helper\ConfigPathGuesser;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\... | true |
756bd81758f5722e4075e71aa76695e33bf5b93d | PHP | citizenofearth/reposition | /app/main/model/basicmodel.php | UTF-8 | 29,014 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: exodus4d
* Date: 16.02.15
* Time: 22:11
*/
namespace Model;
use DB\SQL\Schema;
use Controller;
use DB;
use lib\logging;
use Exception\ValidationException;
use Exception\DatabaseException;
abstract class BasicModel extends \DB\Cortex {
/**
* Hive key with DB obj... | true |
ca3454e84944b8745fc56cf36c70e29a35891be2 | PHP | tekiek/coachtracker | /backend/includes/userConnections.php | UTF-8 | 2,560 | 2.96875 | 3 | [] | no_license | <?php
/*
* Returns all user ids
*/
function getAllUserIds($filter) {
//SELECT id FROM students
$sql = "SELECT id FROM users WHERE $filter = 1";
$userIds = queryColumn($sql);
return $userIds;
}
/*
* Get all users
*/
function getAllUsers($cols) {
$cols = colsToSql($cols);
// Get all users data
$sql = "SEL... | true |
ce8570d90a99b7c4bd838b09368f105e074a79c9 | PHP | wwena8/phpInterview | /SOA/client/main.php | UTF-8 | 1,211 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: zhaoge
* Date: 2020/5/23
* Time: 10:56 下午
*/
class Client{
private $url;
private $service;
private $rpcConfig = [
"UserService" => "http://127.0.0.1:81"
];
public function __construct($service)
{
if (array_key_exists($service, $this->... | true |
e4e2a997658890cde07b034829b97494a54cc101 | PHP | juniorb2ss/checkin-website | /app/Http/Controllers/UserController.php | UTF-8 | 1,485 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Validator;
use App\User;
class UserController extends Controller
{
//
public function cadastrar(Request $request, User $user)
{
$validator = Validator::make($request->all(), [
'name' => 'required|min:4... | true |
91697f8a94fcd1a103b16edd93d277200206304d | PHP | Fu11meta1/lara-tenge | /src/Actions/Pipes/ApprovePaymentPipe.php | UTF-8 | 556 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Loot\Tenge\Actions\Pipes;
use Loot\Tenge\Tenge;
class ApprovePaymentPipe
{
public $request;
public function __construct($request)
{
$this->request = $request;
}
/**
* Check that payment exists.
*
* @param \Loot\Tenge\TengePayment $payment
* @param \Cl... | true |
1ece17aee5e26da2f81669801d5a9b072b1af338 | PHP | jatipandus/framework2 | /yuda/application/libraries/Total.php | UTF-8 | 238 | 2.859375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
*
*/
class Total
{
var $totalharga;
function __construct()
{
$this->totalharga = 0;
}
public function hasil($harga, $jumlah)
{
$this->totalharga = $harga*$jumlah;
return $this->totalharga;
# code...
}
}
?> | true |
c53b5dad0349322b47ff6b5dd324e7d0de9c97f8 | PHP | usersuccess/shop | /e_sale.php | UTF-8 | 2,684 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>处理订单</title>
</head>
<body>
<style type="text/css">
tr,td{font-size:2... | true |
6e1b2b76a8716dcc8c4892851f1a50271234846b | PHP | dardoguidobono/webpoints | /src/Entity/Webpoints/Point.php | UTF-8 | 3,235 | 2.65625 | 3 | [] | no_license | <?php
namespace Entity\Webpoints;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="Entity\Points\Repository\UserRepository")
* @ORM\Table(name="webpoints_point")
*/
class Point {
const ENABLED = 1;
const DISABLED = 0;
/**
* @ORM\Id @ORM\Column(type="integer",name="id")
... | true |
5fed4addb8281b86b51ab4a78784c4d6fd157d63 | PHP | bazo/nette-translation | /src/Bazo/Translation/Extraction/Extractor.php | UTF-8 | 4,024 | 2.75 | 3 | [] | no_license | <?php
namespace Bazo\Translation\Extraction;
use Bazo\Translation\Extraction\Filters;
use Nette\Utils\Finder;
/**
* Extractor
*
* Cool tool for automatic extracting gettext strings for translation
*
* Works best with Nette Framework
*
* This source file is subject to the New BSD License.
*
* @copyright Cop... | true |
3760b6e7d6e5a9d3c739d1e2a60d5b5932034df3 | PHP | EdgarJGE/Cryptography | /controladores/historial.controlador.php | UTF-8 | 4,338 | 2.609375 | 3 | [] | no_license | <?php
class ControladorHistorial{
/*=======================================
= CREAR HISTORIAL =
=======================================*/
static public function ctrCrearHistorial(){
if(isset($_POST["nuevoTitulo"])){
if(preg_match('/^[a-zA-Z0-9ñÑáéíóúÁÉÍÓÚ ]+$/', $_POST["nuevoTitulo"... | true |
78f502df68cb2ee021b210bd1adaeb1391926ce2 | PHP | lerouxlerouxleroux/PHPfonctions | /poo/classes/Equipe.class.php | UTF-8 | 1,351 | 3.234375 | 3 | [] | no_license | <?php
class Equipe
{
public $nom; // propriétés
public $annee_creation;
public $entraineur; // entraineur est un meme de la classe equipe
public $couleurs;
p... | true |
fc8a183f30216c8c90ccc3d61b1773ae97f19555 | PHP | raycogarcia13/SIGI | /database/seeds/TecnicActividadTableSeeder.php | UTF-8 | 572 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Models\TecnicActividad;
class TecnicActividadTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
TecnicActividad::truncate();
$actividad = array("Sistema de la Ges... | true |
388b6383897a9411cccf01a82ea184bd037ee837 | PHP | hannenz/hautliebe | /admin/classes/class_cmtdbtable.inc | UTF-8 | 5,140 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
/**
* OUTDATED: class_cmtdbtable.inc
* Kurzkommentar
*
* Langkommentar
*
* @version 30.01.2009 / 2009-01-30
* @author J.Hahn <info@buero-hahn.de>
*/
class cmtDbTable {
protected $db;
protected $parser;
protected $dbTable;
protected $condWhere;
protected $totalEntries;
public function __... | true |
ab2b970fa51bdbe986c47b539c2b8b070f91af1f | PHP | oldfoxlyw/ControlCenter | /application/models/survey.php | UTF-8 | 2,889 | 2.53125 | 3 | [] | no_license | <?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
class Survey extends CI_Model {
private $tableName = 'sys_survey';
private $questionName = 'sys_survey_question';
private $templateName = 'sys_survey_template';
private $questionView = 'survey_question_view';
private $templateView = 'survey_... | true |
f5547e1110bf0bdc128526c9320eaf7e91f0ad1c | PHP | mathmpr/winged-framework-v2 | /Winged/App/ResponseMiddleware.php | UTF-8 | 412 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Winged\App;
/**
* Class ResponseMiddleware
*/
class ResponseMiddleware extends Middleware
{
/**
* @param null $callback
*
* @return $this
*/
public function setCallback($callback)
{
if (is_callable($callback)) {
$this->callback = \Closure::bind($c... | true |
d432cabf605a64feaee15564ebd5f9b15c77d876 | PHP | liquid79/travelers_store | /phpstore/includes/form_errors.php | UTF-8 | 413 | 2.859375 | 3 | [] | no_license | <?php
function formError($errors=array()) {
$output = "";
if (!empty($errors)) {
$output .= "<div class=\"error\">";
$output .= "Please fix the following errors:";
$output .= "<ul>";
foreach ($errors as $key => $error) {
$output .= "<li>{$error}</li>";
... | true |
9d71e97059ab6bdc66ad3a7b0f90eb23705b7a4e | PHP | ayushpahwa/edCellHack | /admin_panel/application/controllers/Teacher.php | UTF-8 | 2,732 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
* Generated by CRUDigniter v3.2
* www.crudigniter.com
*/
class Teacher extends CI_Controller{
function __construct()
{
parent::__construct();
$this->load->model('Teacher_model');
}
/*
* Listing of teachers
*/
function index()
{
$data['teachers'... | true |
4d596d4422a99b8ec991d924f353064786276171 | PHP | kenziy/w2p-server | /application/controllers/UserController.php | UTF-8 | 4,607 | 2.53125 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class UserController extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->library('form_validation');
$this->load->model('Users');
$this->load->model('Points');
}
public function register() {
$re... | true |
5f79815b511e1b6c209b801d54064b6e1c4fecbb | PHP | BiohZn/sbnc-api | /controller/user.php | UTF-8 | 1,163 | 2.78125 | 3 | [] | no_license | <?php
class user extends controller {
function index() {
$this->json->error('Method not specified');
}
function add() {
$user = $_GET['ident'];
$pass = $_GET['password'];
if ($this->apiaccess->bncs == $this->apiaccess->bnclimit) {
$this->json->error('Bouncer limit reached');
die();
}
if (empty... | true |
9fe611ee7551941a4bf045b0b3f4cb0b2f7e9a72 | PHP | Dracaerys/mydioptra | /utils/Scraper/2_scrape_author.php | UTF-8 | 1,659 | 2.8125 | 3 | [] | no_license | <?php
include 'simple_html_dom.php';
include("../../inc/dbconn.php");
header('Content-Type: text/html; charset=utf-8');
$conn = open_database_connection();
for ($i = 169; $i < 230; $i++) {
$sql_command = "SELECT * from scrape_authors LIMIT 1 OFFSET " . $i;
echo $sql_command . '<br><br>';
$result = m... | true |
fc4b2f14cbae0e7ab1b024c75457cdbcd76cd07f | PHP | asidorov72/poll.zf2 | /module/Anketa/src/Anketa/Model/AnketaUser.php | UTF-8 | 902 | 2.515625 | 3 | [] | no_license | <?php
namespace Anketa\Model;
use Zend\InputFilter\InputFilterAwareInterface;
use Zend\InputFilter\InputFilterInterface;
class AnketaUser implements InputFilterAwareInterface {
public $user_id;
public $username;
public $email;
public $display_name;
public $state;
public function exchangeArray($data... | true |
eda8b9e9d762245babfe1af67387f0d230114b54 | PHP | 2br-dev/esayan_site | /modules/externalapi/model/resultformatter.inc.php | UTF-8 | 728 | 2.765625 | 3 | [] | no_license | <?php
/**
* ReadyScript (http://readyscript.ru)
*
* @copyright Copyright (c) ReadyScript lab. (http://readyscript.ru)
* @license http://readyscript.ru/licenseAgreement/
*/
namespace ExternalApi\Model;
class ResultFormatter
{
/**
* Подготавливает данные в заданном формате
*
* @param array $data - произ... | true |
e7611d244527a1e40e0ce3b9d3e4d4af0bbbaf4a | PHP | agp-tec/package-report | /src/Agp/Report/ReportColumn.php | UTF-8 | 4,858 | 2.90625 | 3 | [] | no_license | <?php
namespace Agp\Report;
use Closure;
/**
* Class ReportColumn
* Contem os atributos das colunas
* @package App\Helper
*/
class ReportColumn
{
/** Nome da coluna
* @var
*/
public $name;
/** Visibilidade da coluna
* @var bool
*/
public $visible = true;
/** Dados para fi... | true |
3c86f6b842152726dcf1564933ec6ac4747a9d5e | PHP | SamBurns-awin/haproxy-log-parser | /HaproxyLogEntry.php | UTF-8 | 192 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
class HaproxyLogEntry
{
function __construct($matches)
{
for ($i=0; $i<count($matches); $i++) {
$this->{$this->fields[$i]} = $matches[$i];
}
}
}
| true |
a4ab57d37a2dda4d66d82a3b3d3b172a190330c5 | PHP | klybz-lp/custom | /public/mvc/boot/Psr4AutoLoad.php | UTF-8 | 2,077 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* 自定义自动加载类
*/
class Psr4AutoLoad
{
protected $maps = array(); //存放命名空间映射
function __construct()
{
spl_autoload_register([$this,'autoload']); //将本类中的autoload方法注册为自动加载方法
}
//自定义自动加载方法
function autoload($className)
{
//echo $className; //当加载没有引入的类时,输出类名
//完整类名(命名空间名+类名):命名... | true |
5cd4917db1d1d5a27ead5e8c5688d4d40af710e1 | PHP | saltenasbenas/PHP_ND | /triangle.php | UTF-8 | 1,181 | 2.75 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="style.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Quicksand:400,700"
rel="stylesheet">
<title>Triangle</title>
</head>
<body>
<?php include 'meniu.php';?>
<h1>Check your Triangle!</h1>
<form action="tria... | true |
2fafe0008dc6ac8b500c147ba69c8e22da4b7e5e | PHP | philamakye/DistroProject | /distroAPI/api/delete_wishlist.php | UTF-8 | 898 | 2.53125 | 3 | [] | no_license | <?php
//headers
header('Access-Control-Allow-Origin: *'); //allows acces without auth etc
header('Content-Type: application/json');
header('Access-Control-Allow-Methods: DELETE');
header('Access-Control-Allow-Headers: Access-Control-Allow-Headers, Content-Type, Access-Control-Allow-Methods, A... | true |
3c916fb9c5ce79de0eee0778770018c3b4d8a0c7 | PHP | ChamodNimz/harithagardens-final | /src/helpers/validation.php | UTF-8 | 479 | 2.609375 | 3 | [] | no_license | <?php
// validation name,Item name, some cases like that
function validateName($string){
if(preg_match("/^[a-zA-Z\s]{5,30}$/", $string)){
return true;
}
else{
return false;
}
}
//item price qnty like validation
function validateNumeric($string){
if(preg_match("/^[0-9]{1,6}$/",$string)){
return tr... | true |
8e6b37c5ba2bdf72f69f0466ef72a58413aadef3 | PHP | Hexembly/thaihis-v1 | /backend/modules/ezforms2/classes/RandomizationFunc.php | UTF-8 | 4,099 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace backend\modules\ezforms2\classes;
use Yii;
use yii\db\Query;
/**
* Description of RandomizationFunc
*
* @author ... | true |
3e64892fd9ed86c9ec9f277d0bdef86b077ec886 | PHP | ciceroborges/tcc | /app/Http/Controllers/GroupController.php | UTF-8 | 2,690 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Group;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Validator;
class GroupController extends Controller
{
public function index(Request $request)
{
/* method */
$groups = Group::select('*');... | true |
b915847be6dbd301878f0579ef0c939870423f5c | PHP | Robert2703-ops/layout_2_upper | /layout_2/database/migrations/2021_06_21_124045_create_occurrences_table.php | UTF-8 | 827 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateOccurrencesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('occurrences... | true |
28d747f46186fcb673ec60b8a7f9010edb6cbeff | PHP | vankaizaar/intranet | /app/Orchid/Screens/icpac/Project/ProjectPublicListScreen.php | UTF-8 | 1,259 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Orchid\Screens\icpac\Project;
use App\Project;
use Orchid\Screen\Screen;
use Orchid\Screen\Layout;
use Orchid\Screen\Actions\Link;
class ProjectPublicListScreen extends Screen
{
/**
* Display header name.
*
* @var string
*/
public $name = 'Projects';
/**
* Di... | true |
f5faf7ca81df58dfff2cde1e51cfef9c7428afde | PHP | sallycms/0.7 | /sally/core/lib/sly/Util/MediaCategory.php | UTF-8 | 1,442 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
* Copyright (c) 2013, webvariants GbR, http://www.webvariants.de
*
* This file is released under the terms of the MIT license. You can find the
* complete text in the attached LICENSE file or online at:
*
* http://www.opensource.org/licenses/mit-license.php
*/
/**
* @ingroup util
*
* @author Christo... | true |
b94e0624c1bf9aedb553a42466f0def6c33c6a43 | PHP | hid-nagai/MagicWeapon | /mw_smarty.inc | UTF-8 | 2,042 | 2.96875 | 3 | [] | no_license | <?php
/**
* MW用 Smartyラッパー
*
* @package magicweapon
* @link http://www.grid-works-guild.net/MagicWeapon/ MagicWeapon
* @access public
* @author Michiaki Wuzawa <wuzawa@m-fr.net>
* @create $LastChangedDate$
* @version $Revision$
**/
require_once('Smarty.class.php');
class mw_smarty extends Smarty {
/*
... | true |
3ac76f918ea7dc2996f91a39e38b7de4b0bc254e | PHP | cwmiller/broadworks-connector | /src/Ocip/Models/GroupAdminServiceAccess.php | UTF-8 | 438 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace CWM\BroadWorksConnector\Ocip\Models;
/**
* GroupAdminServiceAccess
*
* Policy for a group administrator's access to assigning services to groups and users.
*
* @method static GroupAdminServiceAccess FULL()
* @method static GroupAdminServiceAccess READ_ONLY()
* @EnumValueType string
*/
class Gr... | true |
073992461474c596628f035533cb3cd445e286eb | PHP | sorokaOleksandr/way | /PHP/php_basics_tasks/10.php | UTF-8 | 186 | 2.578125 | 3 | [] | no_license | <?
header("Content-type: text/html; charset=utf-8");
$day = 5;
switch($day)
{
case 1:
case 2:
case 3:
case 4:
case 5:
echo 'Это рабочий день.';
break;
}
?> | true |
8a7394a945c7b2631b47cf14515082ace06e6cf8 | PHP | packaged/rwd | /src/Currency/Currencies/CNYCurrency.php | UTF-8 | 640 | 2.75 | 3 | [] | no_license | <?php
namespace Packaged\Rwd\Currency\Currencies;
use Packaged\Rwd\Currency\AbstractCurrency;
class CNYCurrency extends AbstractCurrency
{
public function getDecimalCount()
{
return 2;
}
public function getSymbol()
{
return '¥';
}
public function getCode()
{
return 'CNY';
}
public... | true |
b72a66a0f179cef35e88979758e3e6843cb7fb0a | PHP | kevinthant/InputFilter | /tests/InputFilterTest.php | UTF-8 | 4,615 | 2.8125 | 3 | [] | no_license | <?php
require_once 'vendor/autoload.php';
use Thant\Helpers\InputFilter;
/**
* Created by PhpStorm.
* User: kthant
* Date: 2/2/2017
* Time: 4:33 PM
*/
class InputFilterTest extends PHPUnit_Framework_TestCase
{
/**
* Test overall operation of input filtering class
*/
public function testFiltering... | true |
73cc2bf7b31225ebe509dacf2ca2ddc9948f29d4 | PHP | davidhyunchoi/MERID | /module/Application/src/Application/Mapper/RecordingMapper.php | UTF-8 | 2,469 | 2.734375 | 3 | [] | no_license | <?php
namespace Application\Mapper;
use Doctrine\ODM\MongoDB\DocumentManager,
Doctrine\ODM\MongoDB\RepositoryManager,
Application\Mapper\BaseMapper,
Application\Document\RecordingDocument as Recording,
Application\Document\VideoDocument as Video,
Application\Document\PieceDocument as Piece,
Ap... | true |
56ad7ec9b72e5b5fd41c307a6b10c9689dfd3ccd | PHP | allflame/vain-expression | /src/Parser/Translate/AbstractParserTranslateModule.php | UTF-8 | 1,343 | 2.6875 | 3 | [] | no_license | <?php
/**
* Vain Framework
*
* PHP Version 7
*
* @package vain-expression
* @license https://opensource.org/licenses/MIT MIT License
* @link https://github.com/allflame/vain-expression
*/
declare(strict_types = 1);
namespace Vain\Expression\Parser\Translate;
use Vain\Expression\Lexer\Token\Operator\O... | true |
735ae5007ed73d4c9c33b05331f38cba1ef2e337 | PHP | Trindream/Front-end | /Lw4/check_identifier.php | UTF-8 | 1,346 | 3.171875 | 3 | [] | no_license | <?
define(FIRST_SYMBOL_ERROR, 1);
define(OTHER_SYMBOL_ERROR, 2);
define(DOUBLE_ERROR, 3);
function checkIdentifier($arrOfChar)
{
$error = 0;
if (!ctype_alpha($arrOfChar[0]))
{
$error = FIRST_SYMBOL_ERROR;
}
for ($i = 1; $i < count($arrOfChar); $i++)
{
if (!is_numeric($arrOfChar[... | true |
32e695e37887f692f2ee4ad2685fe4ca86fb5bfb | PHP | OlegPozovnoy/FinalExamAssignment | /Model/database.php | UTF-8 | 6,814 | 3.03125 | 3 | [] | no_license | <?php
class MyException extends Exception{
}
class Database{
private $username = 'azure';
private $password = '6#vWHD_$';
private $host = "127.0.0.1:51073";
private $dbname = 'book_store';
private $timeToVerify = 10;
private $db;
//user_name password email isVerified registratoinD... | true |
2a68e434a906be9e62d78ee39210712eb5bac612 | PHP | radulski/contify-backend | /App/Controllers/FinancialMovementController_.php | UTF-8 | 16,194 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Controllers;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use App\DAO\MySQL\ContifyDev\FinancialMovementDAO;
use App\DAO\MySQL\ContifyDev\CompanyDAO;
use App\DAO\MySQL\ContifyDev\CustomerDAO;
use App\DAO\MySQL\ContifyDev\BankAccountDAO... | true |
b9929e9c6ba8da6117cf73b8c52014cdf5373352 | PHP | fulf/fast-med-web | /src/api/patients/PUT.php | UTF-8 | 1,675 | 2.6875 | 3 | [] | no_license | <?php
function bind($string)
{
return isset($string) ? "'" . $string . "'" : "NULL";
}
require_once "conn.php";
$data = json_decode(file_get_contents('php://input'), true);
if (!isset($data['CNP']) || !isset($data['FirstName']) || !isset($data['LastName']) || !isset($data['Age']) || !isset($data['Address']) || ... | true |
f65211866de909b786485d44e177063dc09d981b | PHP | islamwell/jmstack | /html/mp3online/protected/models/Album.php | UTF-8 | 4,138 | 2.703125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "album".
*
* The followings are the available columns in table 'album':
* @property integer $album_id
* @property string $album_name
* @property string $album_img
* @property integer $category_id
* @property integer $number_song
* @property string $create_date
* ... | true |
4b31d7de6304dfb1c9fcb6503fdc8636be52cf43 | PHP | marco458/TheQRef | /TheQRef/src/Router/DefaultRouter.php | UTF-8 | 5,523 | 2.796875 | 3 | [] | no_license | <?php
namespace Router;
use Symfony\Component\Yaml\Yaml;
error_reporting(E_ERROR | E_PARSE);
class DefaultRouter {
private array $map = [];
public function __construct() {
$this->map = YAML::parse(file_get_contents("src/Router/routes.yaml"));
}
public function match($ur... | true |
096906ff07c0d900b8c02920817d844f6df8e3d9 | PHP | nicholascheza/twitch-api-php | /test/TwitchApiTest.php | UTF-8 | 2,789 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
use PHPUnit\Framework\TestCase;
use TwitchApi\TwitchApi;
use TwitchApi\Exceptions\ClientIdRequiredException;
use TwitchApi\Exceptions\UnsupportedApiVersionException;
class TwitchApiTest extends TestCase
{
public function testCanCreateClassWithMinimumOptions()
{
$twitchApi = new TwitchApi(['clien... | true |
eea6f9ed460ce30c5fba3f39c5c1d467a3ac9cbf | PHP | angelmartinez15/web-gestion | /Controller/USUARIOS_Controller.php | UTF-8 | 7,223 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
//Clase : USUARIOS_Controller
//Creado el : 26-09-2019
//Creado por: dcquf1
//Descripcion: Funciona como intermediario Vista-Modelo (pide los datos al modelo y los devuelve de nuevo a la vista). Se encarga de controlar las interacciones del usuario en la vista.
//-------------------------------------------------... | true |