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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c52fa0a81a26a7f405d5d666c717e54e72bdc782 | PHP | sunspidersp/Questionnaire | /app/library/CalFunc.php | UTF-8 | 677 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @Author: sxf
* @Date: 2015-08-12 15:08:17
* @Last Modified by: sxf
* @Last Modified time: 2015-08-12 15:44:00
*/
/**
*
*/
class CalFunc
{
public static $func_reg = array('sum', 'avg');
public static function sum($array)
{
$sum = 0;
foreach ($array as $value) {
$sum += $value;
}
ret... | true |
28c37ca897be5c75625fb46a254f059af934537a | PHP | ElexZhuo/eh-shop | /common/models/Product.php | UTF-8 | 2,857 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
use common\models\User;
use common\models\CommonModel;
use common\models\Category;
/**
* This is the model class for table "product".
*
* @property string $id
* @property string $category_id
* @property string $product_title
* @property string $product_desc
* @property ... | true |
dd16521525cd3f1a460e7dc51a634ba199afaa2b | PHP | simialbi/yii2-statscore-api-client | /src/models/Column.php | UTF-8 | 837 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package yii2-statscore-api-client
* @author Simon Karlen <simi.albi@gmail.com>
*/
namespace simialbi\yii2\statscore\models;
use yii\base\Model;
class Column extends Model
{
/**
* @var integer Unique identifier for the column
*/
public $id;
/**
* @var string Name of the col... | true |
ed2828890555e58090c7de25ff16d384892cc3b4 | PHP | Fullplate/Music-Ratings | /results.php | UTF-8 | 792 | 2.640625 | 3 | [] | no_license | <?php
$dsn = "pgsql:"
. "host=ec2-184-73-162-34.compute-1.amazonaws.com;"
. "dbname=d7am24ir1dih0m;"
. "user=haixijvtehbrpr;"
. "port=5432;"
. "sslmode=require;"
. "password=WYCyCU0S0IsYlhjfS4Dkd4n8ET";
$pdo = new PDO($dsn);
// search for a particular artist
if (isSet($_POST["artist_search"]))... | true |
c23ce73144b6dd06c2c096b84bf70ae96f965ed6 | PHP | MadDog-420/P_WEB | /admin/new_product.php | UTF-8 | 3,994 | 2.578125 | 3 | [] | no_license | <?php
include_once('utilities.php');
include_once('../models/db/database_utilities.php');
if( $_POST )
{
header('Location: index.php');
//die();
$nombre = isset( $_POST['nombre'] ) ? $_POST['nombre'] : '';
$precio = isset( $_POST['precio'] ) ? $_POST['precio'] : '';
$description = isset( $_POST['description'... | true |
aaa0dd0eb2eed7e24e3b999c3a94a307ed26a917 | PHP | TzepART/examples-of-patterns | /src/StructuralPatterns/Proxy/Runner.php | UTF-8 | 457 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Patterns\StructuralPatterns\Proxy;
use Patterns\RunnerInterface;
class Runner implements RunnerInterface
{
public static function using(): void
{
$door = new SecurityProxy(door: new SecretDoor());
$door->open(password: 'invalid password'); // Big no! ... | true |
365bff3931ea713481d071707aa8e70bebe0cf2e | PHP | smokie/taher_fw | /lib/Config/DB.php | UTF-8 | 570 | 2.703125 | 3 | [] | no_license | <?php
/**
* @author: smokiee
* @date: 4/26/13
* @package Lib/Config
*/
/**
* @method getHost
* @method getUser
* @method getPassword()
*/
namespace Config;
class DB extends \DataStorage
{
use \I;
protected function data() {
return array(
'host' => 'localhost',
'u... | true |
ff811ba947fb1eac888b32751a15129e348610da | PHP | afradbhuiyan/lobster | /app/classes/ajax_users_notifications.php | UTF-8 | 2,060 | 2.6875 | 3 | [] | no_license | <?php
/*
* 1. The class `ajax_users _posts` will be used to store all the function and variable
* fo dasboards post options
*
* 2. Only POST Reqeust will be acceptable.
*/
class ajax_users_notifications{
//store the config class object
private $config;
//store the functions class objec... | true |
876539cf02455d57b71213baad40d6aa93acd941 | PHP | dloopes/fluxa_beta | /src/controller/RecursoController.php | UTF-8 | 13,129 | 2.671875 | 3 | [] | no_license | <?php
namespace Fluxa\Controller;
use Fluxa\Entity\Recurso;
use Fluxa\Entity\Endereco;
use Fluxa\Entity\EnumRecursoStatus;
use Fluxa\Entity\EnumTiposFluxo;
use Fluxa\Business\RecursoBusiness;
use Fluxa\Business\RecursoCategoriaBusiness;
use Fluxa\Business\EnderecoBusiness;
use Fluxa\Exception\BusinessException;
use Fl... | true |
d8c6ee78ffac3dc517a68e6663edb64996ab5d6b | PHP | UalissonRodrigues/crud-php | /controller/adicionar.php | UTF-8 | 777 | 2.59375 | 3 | [] | no_license | <?php
//conexão
require_once 'dbconexao.php';
session_start();
if (isset($_POST['btn-cadastrar'])) :
$nome = mysqli_escape_string($connect, $_POST['nome']);
$email = mysqli_escape_string($connect, $_POST['email']);
$sexo = mysqli_escape_string($connect, $_POST['sexo']);
$telefone = mysqli_escape_string... | true |
650f414ec34256adc740e63f777d0c6c5ccd9bbb | PHP | johanxr1/XmlGenerador | /dateact.php | UTF-8 | 10,659 | 2.859375 | 3 | [] | no_license | <?php
/*-----------------------------
//Formatos de las fechas
-----------------------------*/
$fecha = date("d/m/Y");
$fechaa = date("d.m.Y");
$date = date("d-m-Y");
$fechae = date("Y-m-d");
//Incrementando 2 dias
$mod_date = strtotime($date."+ 9 days");
$fechan = date("d/m/Y",$mod_date);
$fechaen = date(... | true |
8b09db44c8b7b36c8f5f149250746b793c8df6d0 | PHP | ATarasovs/sections_tree | /resources/db.php | UTF-8 | 1,650 | 3.125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: atara
* Date: 8/3/2019
* Time: 16:51
*/
include('config.php');
class db extends mysqli {
// single instance of self shared among all instances
private static $instance = null;
// db connection config vars
private $username = username;
private $passw... | true |
406c18e5144f69c863936a58a3e7d3461b58e649 | PHP | PurwantoGZ/MahadIslamy | /admin/control/updateCollection.php | UTF-8 | 3,041 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
include_once '../../config/base.php';
$db = new BaseClass();
$idCollku = $_POST['idCollku'];
$ISBNku = $_POST['ISBNku'];
$Titleku = $_POST['Titleku'];
$Yearku = $_POST['Yearku'];
$Countkuku = $_POST['Countkuku'];
$AuthorSelectku = $_POST['AuthorSelectku'];
$Publisherk... | true |
03d5f1479e7461272b5f07bc35e4657aac780581 | PHP | Toumash/alco-app-backend | /root/panel/Log.class.php | UTF-8 | 1,178 | 2.953125 | 3 | [] | no_license | <?php
/**
* @author Toumash <dev.code-sharks.pl/about?p=toumash>
*/
class Log
{
public static $DEFAULT_LOG = 'logs/main.log';
public static $API_LOG = 'logs/api.log';
public static function d($data, $file = ' ')
{
$file = ($file == ' ') ? self::$DEFAULT_LOG : $file;
$fp = fopen($file, "a");
//... | true |
10e424e57f3127f91b3fcfdaff9982efd41eb5f1 | PHP | agielasyari1/ZippyCracker | /helper.php | UTF-8 | 1,949 | 3.015625 | 3 | [] | no_license | <?php
/*
* @ ZippyShare Cracker
* @ Created by Agiel Asyari
*/
//fungsi untuk mengirim request ke web zippyshare
function curl($url)
{
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_POST => 0,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT... | true |
4b489b07c0c2b2d342d43211ea7088eb44167403 | PHP | underdogg-forks/experimentcms | /Modules/Employees/Models/Staff.php | UTF-8 | 1,745 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Employees\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Staff
* @package App\Models
* @version May 12, 2017, 8:47 am UTC
*/
class Staff extends Model
{
use SoftDeletes;
public $table = 'staff';
const CREATED_AT = 'created_at';
... | true |
5adee1cdabec8b61dd636318cb137fd0cc615c8c | PHP | pdc-rh/pdc-rh-2.0 | /model/Gestor_area.php | UTF-8 | 1,910 | 2.65625 | 3 | [] | no_license | <?php
require_once '../config/CRUD.php';
require_once '../config/conexao.php';
class Gestor_area {
private $id;
private $id_area;
private $bi_pessoa;
private $tipo;
private $id_filial;
public function __construct($bi_pessoa,$tipo, $id_area,$id_filial) {
$conexao=new con... | true |
e0c9bd16113c204c2741d1b1b3c315c69802635e | PHP | olha-novikova/coachestribune | /matador/ts-essentials/includes/widgets/social-icons.php | UTF-8 | 12,024 | 2.671875 | 3 | [] | no_license | <?php
/*---------------------------------------------------------------------------------*/
/* Social Icons Widget */
/*---------------------------------------------------------------------------------*/
class ts_social_icons_widget extends WP_Widget {
function __construct() {
$widget_ops = array(
'cla... | true |
3e857b703794cb4de3707e16c749cd3eaa3be0bf | PHP | jamesvweston/php-utilities | /src/InputUtil.php | UTF-8 | 1,500 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
namespace jamesvweston\Utilities;
class InputUtil
{
/**
* @param mixed $param
* @return int|null
*/
public static function getInt($param)
{
if (is_int($param))
return $param;
else if (ctype_digit($param))
return (int)$param;
r... | true |
3221414fc6e8e9c901febbabac1f0f2d9511fb40 | PHP | marcinsoja/php-json-rpc | /lib/JsonRpcLib/Server/Service/Wrapper/Plugin/Annotation.php | UTF-8 | 1,826 | 2.53125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
namespace JsonRpcLib\Server\Service\Wrapper\Plugin;
use \Doctrine\Common\Annotations\AnnotationRegistry;
use \Doctrine\Common\Annotations\AnnotationReader;
abstract class Annotation
{
/**
*
* @var \Doctrine\Common\Annotations\AnnotationReader
*/
private $reader = null;
private $annot... | true |
cb6e1048de7dec6c47b1c062a5f7fec95711d88a | PHP | lode/jsonapi | /src/interfaces/ProfileInterface.php | UTF-8 | 228 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace alsvanzelf\jsonapi\interfaces;
interface ProfileInterface {
/**
* the unique link identifying and describing the profile
*
* @internal
*
* @return string
*/
public function getOfficialLink();
}
| true |
19b2427f30a4a42510d054ff2887f1cf1703ef7d | PHP | swapon-ahamed/Design-Pattern-PHP | /Classes/Strategy/SendFax.php | UTF-8 | 179 | 2.515625 | 3 | [] | no_license | <?php
namespace Classes\Strategy;
use Interfaces\Strategy\SendMsg;
class SendFax implements SendMsg
{
public function notification(){
return 'Send Fax notification sent';
}
} | true |
4680634f8f06cff74b84d6bf3b05d75a1df10d5e | PHP | jclough14/e2 | /p2/index-controller.php | UTF-8 | 1,882 | 3.46875 | 3 | [] | no_license | <?php
# Jonathan Clough DGMD E-2, Fall 2019
# Setting up arrays
$outcomes = ['Rock', 'Paper', 'Scissors'];
$player_1_roll_result = [];
$player_2_roll_result = [];
$game_result = [];
# Setting up variables
$player_1_wins = 0;
$player_2_wins = 0;
$game_number = 0;
# While loop for each game
while ($player_1_wins <= 2 ... | true |
50c841e8792d3c5d8cf73d1b71894c35734483d7 | PHP | lxh888/openshop | /server/src/eapie/source/table/shop/shop_order_write_off.php | UTF-8 | 5,292 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/** ---- eapie ----
* 优狐积木框架,让开发就像组装积木一样简单!
* 解放千千万万程序员!这只是1.0版本,后续版本势如破竹!
*
* QQ群:523668865
* 开源地址 https://gitee.com/lxh888/openshop
* 官网 http://eonfox.com/
* 后端框架文档 http://cao.php.eonfox.com
*
* 作者:绵阳市优狐网络科技有限公司
* 电话/微信:18981181942
* QQ:294520544
*/
namespace eapie\source\table\shop;
use eapi... | true |
c080412bb1b9f88a46664fd4273ed2e8e4b7f31c | PHP | mikitakafukane/php2 | /2-4.php | UTF-8 | 176 | 3.28125 | 3 | [] | no_license | <?php
$number = 10;
// $numeric = is_numeric($number);
if (is_numeric($number)) { // ==trueを省略
echo '数字です';
} else {
echo '数字ではありません';
}
| true |
21f0a88514bc4bbff1257db228eb57bd3e32bec3 | PHP | r7alves/laravel-challenge | /app/Http/Controllers/InviteController.php | UTF-8 | 2,371 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Event;
use Illuminate\Http\Request;
use App\Mail\InviteCreated;
use App\Models\Invite;
use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Mail;
class InviteController extends Controller
{
/**
* show the user a form with... | true |
27c019579c28ba30bd7e3714504a1a1e7856ab73 | PHP | LiveHelperChat/livehelperchat | /lhc_web/ezcomponents/EventLog/src/mapper/filterset.php | UTF-8 | 3,008 | 2.953125 | 3 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | <?php
/**
* File containing the ezcLogFilterSet class.
*
* @package EventLog
* @version 1.4
* @copyright Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
* @license http://ez.no/licenses/new_bsd New BSD License
*/
/**
* Mapping of an eventType, eventSource and eventCategory to a mixed variable
* us... | true |
1d264b3a101f619cb93c2a5abbb853ac75b6fab3 | PHP | 68publishers/omni | /src/UserBundle/Bridge/Nette/Security/Role.php | UTF-8 | 925 | 2.828125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace SixtyEightPublishers\UserBundle\Bridge\Nette\Security;
use Nette\Security\Role as RoleInterface;
use SixtyEightPublishers\UserBundle\Domain\ValueObject\Role as RoleValueObject;
final class Role implements RoleInterface
{
private RoleValueObject $role;
private function __c... | true |
4ca69876002c52d2138a388fc2ef852ea2a2f164 | PHP | burneyburney/Exercises | /logger.php | UTF-8 | 1,143 | 3.453125 | 3 | [] | no_license | <?php
function logMessage($logLevel, $message)
{
$dateTime = getdate();
$filename = 'log-YYYY-MM-DD.log';
$handle = fopen($filename, 'a');
foreach($dateTime as $dt){
// echo $dateTime . PHP_EOL;
echo $dt . PHP_EOL;
};
}
logMessage("INFO", "This is an info message.");
logMessage("ERROR"... | true |
d459ea9914963019c6b762c07e90193a2b6af1c6 | PHP | diloabininyeri/dilovel | /src/Components/Http/Validate/MaxValidate.php | UTF-8 | 771 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Components\Http\Validate;
use App\Components\Http\Request;
use App\Components\Lang\Lang;
use App\Interfaces\ValidateLengthInterface;
/**
* Class MaxValidate
* @package App\Components\Http\Validate
*/
class MaxValidate extends AbstractValidate implements ValidateLengthInterface
{
/**
... | true |
ca18cf9d32a506491fedccd0d497669a96f4f94b | PHP | nuelcyoung/phpauthentication | /process.php | UTF-8 | 1,497 | 2.734375 | 3 | [] | no_license | <?php
if(isset($_POST['login'])){
$user_name = $_POST['user_name'];
$password = $_POST['password'];
$myfile = file_get_contents("files/user.json");
$json = json_decode($myfile, true);
foreach ($json as $val) {
if($val['user_name'] == $user_name
&& $val['password'] == $password)... | true |
e475f83dc58704d9a59b6908d8d3866ed5b5ce2d | PHP | barisyazilimnet/html | /html1.php | UTF-8 | 266 | 2.609375 | 3 | [] | no_license | <html>
<body>
<form name="yazdirma" method="post" action="#">
<label>Sayıyı Giriniz:</label>
<input type="text" name="sayi"></input>
</form>
<?php
if($_POST){
$sayi=$_POST["sayi"];
for($i=0; $i<$sayi; $i++)
echo "Hoşgeldiniz<br>";
}
?>
</body>
</html> | true |
37da6119bee096073521e3e0d4b3f53f586657fe | PHP | stevekama/zuru | /app/Helpers/MpesaHelper.php | UTF-8 | 3,583 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Cache;
class MpesaHelper
{
private $short_code=633590;
private $passkey='de7b459bda15459ca60511171b2b1bd2ea54d0cf0c2de7423cbdc9fcb9fb7741';
priva... | true |
f9aefcc3e4846a34167e7e5f0b097b15455c8516 | PHP | iamasadul/PHP-Production-Database | /con/mgrdb.php | UTF-8 | 429 | 2.84375 | 3 | [] | no_license | <?php
session_start();
/* Set PHP variables from global session */
$userName=$_POST['user_name'];
$password=$_POST['password'];
$_SESSION['username']= "$userName";
$_SESSION['password']= "$password";
$con = new mysqli("localhost", $userName, $password, "production");
if (m... | true |
7156355116b85921e905fa5c33adc0aae0a64c6c | PHP | dbd311/linked-open-data-e-participation | /app/Retriever/ElasticRetriever.php | UTF-8 | 2,655 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Retriever;
use App\Http\Display\Zebra_Pagination;
use App\Documents\CELLARDoc;
/**
* ElasticRetriever allows to query the Elasic index
*
* @author Duy Dinh <dinhbaduy@gmail.com>
*/
class ElasticRetriever extends Retriever {
public function retrieveDocs($query) {
$q... | true |
dd4b4d67a0db6260b4aa6ab079581ddd82881887 | PHP | carnar/BlogAPI | /app/database/seeds/PostTableSeeder.php | UTF-8 | 356 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Faker\Factory as Faker;
class PostTableSeeder extends Seeder
{
public function run()
{
$faker = Faker::create();
foreach (range(1, 10) as $index) {
Post::create([
'title' => $faker->sentence(5),
'content' => $faker->paragraph(5)
... | true |
35cac896ef421a45e2f5ca7071f3a363fdc749bc | PHP | emcodepro/mvc-framework | /controllers/AuthController.php | UTF-8 | 1,731 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: grand
* Date: 28-Feb-21
* Time: 18:38
*/
namespace app\controllers;
use emcode\phpmvc\Application;
use emcode\phpmvc\Controller;
use emcode\phpmvc\middlewares\AuthMiddleware;
use app\models\LoginForm;
use app\models\User;
class AuthController extends Controller
{
pu... | true |
de994bead851a085c059dd7a5033f736d4ae5c53 | PHP | MComScience/queue-udh-api | /helpers/Enum.php | UTF-8 | 697 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Tanakorn Phompak
* Date: 14/5/2562
* Time: 10:21
*/
namespace app\helpers;
use Yii;
use yii\base\InvalidConfigException;
use yii\helpers\Inflector;
class Enum extends Inflector
{
public static function startDateNow()
{
return Enum::formatter()->asDate('no... | true |
2ffb959b419c6ead7b47cd501e5fde65e0fca264 | PHP | concept-and-proof/FakeDataGenerator | /src/Concept/FakeDataGenerator/Generator/AgeGenerator.php | UTF-8 | 652 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is a part of FakeDataGenerator
* Brought to you by Concept&Proof
*/
namespace Concept\FakeDataGenerator\Generator;
class AgeGenerator implements GeneratorInterface
{
public static function generate ( $additionalInfo = [] )
{
$minAge = 1;
$maxAge = 100;
... | true |
cf8692da1d9b05dd0e5a9e15d1d3402025313138 | PHP | splittingred/Rowboat | /core/components/rowboat/model/rowboat/drivers/rbquery_mysql.class.php | UTF-8 | 5,602 | 2.734375 | 3 | [] | no_license | <?php
/**
* Rowboat
*
* Copyright 2011 by Shaun McCormick <shaun+rowboat@modx.com>
*
* Rowboat is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any la... | true |
ea325b65c5561cf2063d5476491f0601102ef96e | PHP | olaszakos19/PHP | /19_1_autoclass.php | UTF-8 | 429 | 3.03125 | 3 | [] | no_license | <?php
class automobil
{
private $uzemanyagMennyiseg = 0;
protected $uzemanyagTipus;
public function tankol($mennyiseg)
{
$this->uzemanyagMennyiseg += $mennyiseg;
}
public function __construct($tipus)
{
$this->uzemanyagTipus = $tipus;
}
public function __destruct... | true |
94db04f2ba82e958137d6e85707f7665243a2f85 | PHP | eliezermartinez/webdevelopment | /Doctrine2/DoctrinePaginator.php | UTF-8 | 3,391 | 2.546875 | 3 | [] | no_license | <?php
namespace Company\YourCompanyBundle\Repository;
use Pagerfanta\Adapter\DoctrineDbalAdapter;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Tools\Pagination\Paginator;
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
/*
* @author: Marco A. Simão
*
*/
class DoctrinePaginator
{
protected $offset ... | true |
cd736cc83bbb823653dcec541b85ef30647b92a5 | PHP | ifargo/mvc-store | /controllers/UserController.php | UTF-8 | 2,569 | 2.9375 | 3 | [] | no_license | <?php
use testShop\models\Category;
use testShop\models\User;
/**
* Controller UserController
*/
class UserController
{
/**
* Action for Register page
* @return bool
*/
public function actionRegister() {
$categories = array();
$categories = Category::getCategoriesList();
... | true |
4071e19a0f61e69abb5a369e464c46c3d29981d6 | PHP | adefathudin/PMKS-Sistem | /application/controllers/Migrate.php | UTF-8 | 1,023 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Description of Migrate
*
* @author adefathudin
*/
class Migrate extends CI_Controller {
function index($version=0){
if(PHP_SAPI !== 'cli' || isset($_SERVER['HTTP_USER_AGENT'])){
show_404();
ex... | true |
893ffebb77cec9bc645c177fb1ad9de4ac64972a | PHP | yabdelouahed/Datenbanken-Webtechnologien | /Meilenstein 3 - MVC_BladeOne_Authentifizierung/db.php | UTF-8 | 3,063 | 2.625 | 3 | [] | no_license | <?php
namespace Emensa\Model{
require 'vendor/autoload.php';
$dotenv = \Dotenv\Dotenv::create(__DIR__, '.env');
$dotenv->load();
$dotenv->required(['DB_HOST', 'DB_NAME', 'DB_USER', 'DB_PASS', 'DB_PORT']);
$remoteConnection = mysqli_connect(getenv('DB_HOST'),
getenv('DB_USER'),
gete... | true |
a2c9c0e70997a3a616a53c5b218495746ee4d2a0 | PHP | lya880901/project02 | /mysqli_oo.php | UTF-8 | 735 | 2.78125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<?php
$mysqli = new mysqli("localhost","root","mypassword","database");
if($mysqli->connect_errno)
die("無法建立資料連接:".$mysqli->connect_error);
$mysqli->query("SET NAMES utf8");
$result = $mysqli->query("SELECT*FROM data WHERE M1 = '0'... | true |
c7b4ec2e07a1cf14f948135c3aa776889e0ea0a7 | PHP | kekakuka/BugTracking | /app/BugDate.php | UTF-8 | 405 | 2.84375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 39260
* Date: 17/10/2018
* Time: 12:56 PM
*/
namespace App;
class BugDate
{
public $date;
public $countOpen=0;
public $countClosed=0;
function __construct($date)
{
$this->date=$date;
}
public function addOpen(){
$this->coun... | true |
eb08d59d4194bd12c22f1a73755995956373479d | PHP | dinaerteneto/eduzz | /app/Entities/Person.php | UTF-8 | 884 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entities;
use Carbon\Carbon;
use App\Entities\Entity;
use Illuminate\Database\Eloquent\SoftDeletes;
class Person extends Entity
{
use SoftDeletes;
const GENDER_MALE = 'Masculino';
const GENDER_FEMALE = 'Feminino';
protected $table = 'person';
protected $fillable = [
... | true |
5fb7e22b07be811361d06b4edf67836c39c23299 | PHP | mmmdf/df-back | /_include/Template/Template.class.php | UTF-8 | 2,671 | 2.59375 | 3 | [] | no_license | <?php
/*
* Template.class.php
* - template wrapper for Smarty
*
* Author : Andrei Gavrila (andrei.gavrila@gmail.com)
* Date : 2005.08.22
* Licence : GPL 2.0
*
* Changes :
* - [2005.10.06] - Andrei Gavrila - Changed location for configuration (language) files
* - [2006.02.28] - Andrei Gavrila - Adde... | true |
cf0e2750d85fdc6e64e690fa9d80f0d9c27feaad | PHP | kadse/EM-Manager | /websoccer/classes/actions/ChooseTrainerController.class.php | UTF-8 | 2,123 | 2.515625 | 3 | [] | no_license | <?php
/******************************************************
This file is part of OpenWebSoccer-Sim.
OpenWebSoccer-Sim is free software: you can redistribute it
and/or modify it under the terms of the
GNU Lesser General Public License
as published by the Free Software Foundation, either version 3 of
t... | true |
b0a4476db1238bb5891566b7449e78e8581d04b1 | PHP | coder-d/payment_library | /app/Test/Case/Model/ProductTest.php | UTF-8 | 642 | 2.53125 | 3 | [] | no_license | <?php
App::uses('Product', 'Model');
/**
* Order Test Case
*
*/
class ProductTestCase extends CakeTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('app.product');
/**
* setUp method
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->Product = ClassRegistry::ini... | true |
9705842233a088bfef3c0acd533295db3e43c9e3 | PHP | 48cfu/nearup_telegram_bot | /Commands/SeatPriceCommand.php | UTF-8 | 886 | 2.6875 | 3 | [] | no_license | <?php
namespace Longman\TelegramBot\Commands\UserCommands;
use Longman\TelegramBot\Request;
use Settings\Config;
include_once __DIR__ . '/../bot.php';
class SeatPriceCommand extends MyCommand
{
protected $name = 'seatPrice';
protected $description = 'Get Seat Price';
protected $usage = '/getSeatPrice';
... | true |
6663252b86522735995f038c3c24155ee18a2e17 | PHP | Izidor11/AOC2015 | /advent1.php | UTF-8 | 224 | 3.1875 | 3 | [] | no_license | <?php
$input = file_get_contents('input.txt');
$floor = 0;
for($i = 0; $i < strlen($input); $i++)
{
$floor += $input{$i} === '(' ? 1 : -1;
}
echo 'A miki a ' . $floor. ' emeletre jutott miután, a leírást követvte' ;
?> | true |
3efdcbff90193d8e88e655319b34a5100dd80f63 | PHP | wuchuhengtmp/a1206 | /hyperf/app/Model/DevicesModel.php | UTF-8 | 2,115 | 2.578125 | 3 | [] | no_license | <?php
declare (strict_types=1);
namespace App\Model;
use Hyperf\DbConnection\Db;
use Hyperf\DbConnection\Model\Model;
/**
*/
class DevicesModel extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'devices';
/**
* The attributes that ar... | true |
bc0702eff598353385bfad9c1fd7444743160c85 | PHP | zartech22/Croissantage | /src/middleware/SessionMiddleware.php | UTF-8 | 523 | 2.734375 | 3 | [] | no_license | <?php
namespace Src\Middleware;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Src\Utilities\SessionUtility;
class SessionMiddleware
{
private $session;
public function __construct(SessionUtility $session)
{
$this->session = $session;
... | true |
744cc53ee2fedaca441b7a979abe23fc2633e12b | PHP | BohdanBoriak/ATran | /src/Entities/Translations.php | UTF-8 | 540 | 3.078125 | 3 | [
"Unlicense"
] | permissive | <?php
namespace ATran\Translate\Entities;
use ATran\Translate\Entities\DetectedLanguage;
use ATran\Translate\Entities\Translation;
class Translations {
public $detectedLanguage;
public $translations;
public function __construct(DetectedLanguage $detectedLanguage, Translation ...$translations){
$this->detect... | true |
a5c45ba5408d85be9eff40b61a19870c37f7663d | PHP | VinterDefoe/bee | /Core/Router/Route.php | UTF-8 | 1,400 | 2.921875 | 3 | [] | no_license | <?php
namespace Core\Router;
use Psr\Http\Message\ServerRequestInterface;
class Route
{
/**
* @var array
*/
private $method;
private $name;
private $pattern;
private $handler;
/**
* @var array
*/
private $tokens;
/**
* Route constructor.
* @param arra... | true |
2cfb36513af71736fef052e91ebb96746b22e2c8 | PHP | davidomelettes/tactile-git | /egs/models/SLCustomer.php | UTF-8 | 1,931 | 2.515625 | 3 | [] | no_license | <?php
class SLCustomer extends DataObject {
function __construct() {
parent::__construct('slmaster');
$this->idField='id';
$this->identifierField = 'name';
$this->belongsTo('Company', 'company_id', 'company');
$this->belongsTo('Currency', 'currency_id', 'currency');
$this->belongsTo('PaymentTerm', '... | true |
19827b5bce1e3f2b314acb2e7037fefee05fc933 | PHP | jbcisne/integras-sei | /src/Jb/Integras/Sei/Version/Services/SEI260/Webservice/ListarTiposProcedimento.php | UTF-8 | 1,856 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Jb\Integras\Sei\Version\Services\SEI260\Webservice;
use Jb\Integras\Sei\Version\IntegrasSEI260;
use Jb\Integras\Sei\IntegrasConfigParamenterSEI;
use Jb\Integras\Sei\Version\Services\ExtractInterface;
use Jb\Integras\Sei\Version\Services\IntegrasServiceInterface;
use Jb\Integras\Sei\Version\Services\Exc... | true |
e2f882247ab193a9079979c801aded9a8d213b1b | PHP | JMundondo/elearning | /app/Http/Controllers/Teacher/Auth/TeacherLoginController.php | UTF-8 | 1,713 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Teacher\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
use App\Form;
use Illuminate\Foundation\Auth\ThrottlesLogins;
class TeacherLoginController extends Controller
{
p... | true |
483c13c7b6fde8e160836247a72d1c8d20d14a20 | PHP | novyrika/codeigniter-inventory | /application/views/cetak/inventaris.php | UTF-8 | 1,726 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
$pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);
$pdf->SetTitle('Daftar Inventaris');
$pdf->SetHeaderMargin(30);
$pdf->SetTopMargin(20);
$pdf->setFooterMargin(20);
$pdf->SetAutoPageBreak(true);
$pdf->SetAuthor('Ramdhan Eka Saputra');
$pdf->SetDisplayMode('real', 'default');
$pdf->AddPage()... | true |
ff8d223f3c3538380f95b21721be7bf68f1c0866 | PHP | emilia98/SoftUni-PHPWeb | /PHP Basics/OOP Basics - Exercises/09.Google_2/judge.php | UTF-8 | 5,979 | 3.265625 | 3 | [] | no_license | <?php
class Car
{
private $model;
private $speed;
public function getModel()
{
return $this->model;
}
public function setModel(string $model)
{
$this->model = $model;
}
public function getSpeed()
{
return $this->speed;
}
public function setSpe... | true |
c2ea2af71e2e139f27b434657e80583bb63c50bc | PHP | hguochen/algorithms | /php/cracking_coding_interview/chapter9/chapter10/sorted_merge.php | UTF-8 | 1,881 | 3.796875 | 4 | [] | no_license | <?php
/**
* You are given two sorted arrays, A and B, where A has a large enough buffer at
* the end to hold B. Write a method to merge B into A in sorted order.
*/
/**
* Time: O(n+m) where n is size of large array, m is size of small array
* Space: O(n+m)
*
*/
function sortedMerge($large, $small) {
// pu... | true |
f27ed32b98496436483d5df9056cc13264365244 | PHP | karenf2011/cg_cv_poject | /app/Controllers/UserController.php | UTF-8 | 2,468 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Controllers;
use App\Helpers\Helper;
use App\Models\UserModel;
use App\Libraries\View;
use App\Models\RoleModel;
class UserController
{
// Show user record
public function index()
{
$userId = Helper::getIdFromUrl('user');
Helper::checkUrlIdAgainstLoginId($userI... | true |
8cf8ee1a61994f9f7c6e74e37f7a292dc34295d2 | PHP | AkioUnity/Student-Housing | /signer/src/Controllers/User.php | UTF-8 | 6,608 | 2.578125 | 3 | [] | no_license | <?php
namespace Simcify\Controllers;
use Simcify\File;
use Simcify\Mail;
use Simcify\Auth;
use Simcify\Database;
class User{
/**
* Get users view
*
* @return \Pecee\Http\Response
*/
public function get() {
$users = Database::table("users")->where("company", 0)->get();
$us... | true |
c21db6837ae832b2aaab9036d1fec5e41af87fab | PHP | yhs6375/ShoppingMall_PHP | /server/member/login/LoginProcess.php | UTF-8 | 3,498 | 2.703125 | 3 | [] | no_license | <?php
//서버의 로그인 관련(DB 및 유효성) 처리 클래스
namespace Server\Member\Login;
use Server\Log\Logger;
use Server\DB\DB;
use Server\Member\MemberData;
/*
success -> 1 : login successfully;
2 : no matching member;
3 : password incorrect;
0 : error;
error -> 0 : unknown er... | true |
70bfa1be48ca50624e2a76027b375c9752a8ddcb | PHP | AdelineDs/Blog_photo_ajax | /Modele/Commentaire.php | UTF-8 | 2,249 | 2.890625 | 3 | [] | no_license | <?php
require_once 'Modele/Modele.php';
class Commentaire extends Modele {
// Renvoie la liste des commentaires associés à un billet
public function getCommentaires($idBillet) {
$sql = 'SELECT id, id_billet, auteur, commentaire, DATE_FORMAT'
. '(date_commentaire, \'%d/%m/%Y à %Hh%imin%ss\'... | true |
1249f1f30487192579586e2121d7cf5690fbd1e3 | PHP | zer0php/form | /test/Validator/EmailValidatorTest.php | UTF-8 | 806 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Test\Validator;
use Zero\Form\Validator\ValidationException;
use PHPUnit\Framework\TestCase;
/**
* Class EmptyValidatorTest
* @package Test\Validator
*/
class EmailValidatorTest extends TestCase {
/**
* @test
*/
public function validate_givenInvalidEmail_throwsExceptionWithError... | true |
212b022656d33e73fb9fc3b3a4c505125ba0bd91 | PHP | cissa11/trabalho_tai_final | /app/Http/Controllers/FilmeController.php | UTF-8 | 1,679 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\FilmeModel;
use Request;
class FilmeController extends Controller
{
public function listar()
{
$filmes = FilmeModel::orderBy('nome')->get();
return view('filme')->with('filmes', $filmes);
}
public function cadastrar()
{
retu... | true |
633e55e968b822bae463db75418d35bdaaeb0198 | PHP | Thorroad/aula2 | /aulaPHP/operadorternario.php | UTF-8 | 569 | 3.1875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Operador Ternário</title>
<style>
h2{
font: 12pt Arial;
color: #171559;
}
</style>
</head>
<body style="background-color:#f3f3f3;">
<div>
... | true |
1daee4946928a9e4376b4767ce48814a79c46cfe | PHP | xrmxsolutions/tabs2-php-client | /src/tabs/apiclient/actor/Enquiry.php | UTF-8 | 4,541 | 2.8125 | 3 | [] | no_license | <?php
namespace tabs\apiclient\actor;
use tabs\apiclient\Builder;
/**
* Tabs Rest API Enquiry object.
*
* @category Tabs_Client
* @package Tabs
* @author Carlton Software <support@carltonsoftware.co.uk>
* @copyright 2017 Carlton Software
* @license http://www.php.net/license/3_01.txt PHP License 3.01... | true |
e6abf55dbca975eb27ab3bff98d2a2989ccab29d | PHP | Wisembly/sfBalloon | /apps/frontend/lib/form/RegisterWallForm.class.php | UTF-8 | 587 | 2.875 | 3 | [] | no_license | <?php
class RegisterWallForm extends WallForm
{
public function configure()
{
$this->useFields(array('name', 'real_start_date'));
$this->widgetSchema->setNameFormat('wall[%s]');
$this->validatorSchema->setPostValidator(
new sfValidatorCallback(array('callback' => array($this, 'checkRealD... | true |
943a8f37d9ce5b60f68f02d4b294bdca0ff6323e | PHP | wp-kitten/valpress-dash-widgets | /widgets/WidgetStatsSpamComments.php | UTF-8 | 2,080 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Widgets;
use App\Helpers\StatsHelper;
class WidgetStatsSpamComments extends AbstractWidgetBase
{
public function __construct( $id = '', $options = [] )
{
parent::__construct( $id, $options );
if ( empty( $id ) ) {
return;
}
$info = StatsHelper... | true |
9ed5db147c2b6dc6ddb9c4b52dd43199c3477edb | PHP | Erick-Rdz/proyectoHRAE | /includes/funciones.php | UTF-8 | 3,704 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
function graficaIncidenciasMesActual($conexion){
//$sql = "SELECT c.nombre AS 'NOMBRE', COUNT(i.id) AS NUMERO FROM incidencias i INNER JOIN catalagoincidencias c ON c.id=i.idIncidencia WHERE YEAR(i.fecha)=YEAR(CURRENT_DATE()) AND MONTH(i.fecha) = MONTH(CURRENT_DATE()) GROUP BY c.id ";
$sql = "SELECT a.nombre a... | true |
b756a63a46ac830586f7692a2eb8fd94a406c521 | PHP | arifulislamTmu/E-commerce-HTML | /admin/Product.php | UTF-8 | 4,792 | 2.78125 | 3 | [] | no_license | <?php
include_once'database.php';
include_once'format.php';
?>
<?php
class Product{
private $db;
private $fm;
public function __construct(){
$this->db = new Database();
$this->fm = new Format();
}
public function productInsert($data,$file){
$productName= mysqli_real_escape_string($this->db->link,$... | true |
a3cad46d6c6d82f18ae3e82cd2fcbd2809b6b2b1 | PHP | Hannelore-L/OEF2.3-Abstract-Classes-Interfaces | /Model/Nature.php | UTF-8 | 1,392 | 3.078125 | 3 | [] | no_license | <?php
class Nature extends AbstractImageInfo
{
private $type;
private $family;
private $animal;
/**
* Get the value of type
*/
public function getType()
{
return $this->type;
}
/**
* S... | true |
fbe35b0d561c1d59648940bab9177c508c2deb62 | PHP | XTAIN/JoomlaBundle | /Installation/Configuration.php | UTF-8 | 1,332 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the XTAIN Joomla package.
*
* (c) Maximilian Ruta <mr@xtain.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace XTAIN\Bundle\JoomlaBundle\Installation;
/**
* Class Configuration
*
* ... | true |
2e319506ec853416a15c0694de3007d671881de1 | PHP | crafterr/unittest | /tests/unit/CollectionTest.php | UTF-8 | 2,722 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Tests;
use App\Support\Collection;
use PHPUnit\Framework\TestCase;
use IteratorAggregate;
use ArrayIterator;
class CollectionTest extends TestCase {
public function testEmptyCollection() {
$collection = new Collection();
$this->assertEmpty($collection->get());
}
public function test... | true |
294918ca91189f7aa71265742a63a42d5266fb85 | PHP | xabbuh/panda-client | /src/Api/AccountManagerInterface.php | UTF-8 | 1,609 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the XabbuhPandaClient package.
*
* (c) Christian Flothmann <christian.flothmann@xabbuh.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xabbuh\PandaClient\Api;
/**
* Interface defini... | true |
42bb63b522e39f98e122bb822b4fa48ec82529fe | PHP | gregmag/navplan2 | /src/php/Navplan/Notam/Domain/NotamGeometry.php | UTF-8 | 508 | 2.703125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Navplan\Notam\Domain;
use Navplan\Geometry\Domain\Altitude;
use Navplan\Geometry\Domain\IGeometry2d;
class NotamGeometry {
public $shape;
public $bottomAltitude;
public $topAltitude;
public function __construct(
IGeometry2d $shape,
?Altitude... | true |
a2369990a9a7b4b299fc47254c8388383d79fad6 | PHP | hxxy2003/haowan | /frontend/components/FLog.php | UTF-8 | 1,380 | 2.53125 | 3 | [] | no_license | <?php
/**
* summary: 文件log - 按模块
* author: primexiao
* date: 2014.08.01
*/
class FLog
{
private static $_rootPath = '/var/log/';
public static $logPath = '';
public static $logFile = 'default.log';
public static $customKey = 'custom';
public static function init($logFile='', $custo... | true |
54208749ef46341322bc49cb731d95dea3876864 | PHP | Iskalpero/PHP-MySQL | /1월 25일자/diat.php | UTF-8 | 207 | 2.734375 | 3 | [] | no_license | <?php
$h=170; //키
$w=63; //몸무게
$a=($h-100)*0.9;
echo("키: $h<br>");
echo("몸무게:$w<br>");
if($w>$a){
echo ("다이어트 하세요!!!<br>");
} else {
echo ("정상입니다.<br>");
}
?> | true |
b18648734e60497b12f9fa3a37d9f629ad83b18d | PHP | AlvarosParicios/medea_test | /file_downloader/lib/connections.php | ISO-8859-10 | 2,318 | 2.5625 | 3 | [] | no_license | <?php
include('constants.php');
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING) );
function conecta_BDmaestra ()
{
global $BDmaestra;
global $usuBDmaestra;
global $passBDmaestra;
global $esquema_MEDEA;
$cnxx=mysqli_connect ("localhost", $usuBDmaestra, $passBDmaestra, $BDmaestra);
if ($cnxx) {
... | true |
b53d36033affb74c197d046e33ace5619190ea38 | PHP | Glebsky/PHP | /Shop/pages/classes.php | UTF-8 | 5,529 | 3.15625 | 3 | [] | no_license | <?php
/**
* TOOLS CLASS
*/
class Tools
{
static function connect($host='127.0.0.1:3306',$user="root",$pass="",$dbname="shop")
{
$cs = 'mysql:host='.$host.';dbname='.$dbname.';charset=utf8';
$options = array(
PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE=>PDO::FETCH_ASSOC,
PDO::... | true |
0b88ac93e70034cd38809fbaf70663722a4b8b12 | PHP | leo9319/gic_clients | /app/Task.php | UTF-8 | 518 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Task extends Model
{
protected $fillable = [ 'step_id', 'task_name', 'assigned_to', 'duration', 'file_upload', 'form_name'];
public static function getAllTasks($step_id)
{
return static::where('step_id', $step_id)->get();
}
... | true |
5633673a19f29c943746670e26ec6d5d3165a705 | PHP | EugeneVdovenko/absolute-hr-test | /app/Services/CurrencyService.php | UTF-8 | 590 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Models\Currency;
use Illuminate\Database\Eloquent\Collection;
class CurrencyService
{
public function addCurrency(string $code, string $title): ?Currency
{
$model = new Currency();
$model->code = $code;
$model->title = $title;
if ($model->... | true |
a432d6e2dc20b330f19f7a2bc56e0cd34c920514 | PHP | dereuromark/cakephp-ide-helper | /tests/test_files/VirtualFieldAnnotation/VirtualFieldAnnotation.missing.php | UTF-8 | 204 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace TestApp\Model\Entity;
class Foo {
/**
* @return int|null
*/
protected function _getExpectedReleaseType(): ?int
{
$expected = $this->something;
return $expected ?? null;
}
}
| true |
d38db512eb8b9352a8b0bba0c6b7c1a949bb4553 | PHP | midnite81/laravel-base | /src/Helpers/carbon.php | UTF-8 | 265 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Return carbon date using the localised format
*
* @param Carbon $object
* @param string $format
* @return mixed
*/
function carbonLocale(\Carbon\Carbon $object, $format = '%A %d %B %Y') {
return $object->formatLocalized($format);
} | true |
1c911951ffa468c813f4ac3ef1955ca78b966206 | PHP | fossabot/RidPT | /apps/models/api/v1/form/TorrentsForm.php | UTF-8 | 2,553 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Rhilip
* Date: 2019/3/16
* Time: 11:30
*/
namespace apps\models\api\v1\form;
use Rid\Validators\Validator;
class TorrentsForm extends Validator
{
public $tid;
public static function inputRules()
{
return [
'tid' => 'required | Integer'
... | true |
7961788ce53f2925b36e8685c7be0e8f9e8b30ef | PHP | hitsujimeeee/pawapro-simu | /php/getHistories.php | UTF-8 | 542 | 2.75 | 3 | [] | no_license | <?php
require 'global.php';
function getHistories () {
$data = array();
try{
$dbh = DB::connect();
$sql = 'SELECT date_format(ENTRY_DATE, \'%Y-%m-%d\') ENTRY_DATE, DESCRIPTION
FROM HISTORIES
ORDER BY ENTRY_DATE DESC
';
// SQL の実行
$sth = $dbh->query($sql);
while ($row = $sth->fetch(PDO::FETCH_ASSOC... | true |
8f221edd62df08abaf51aac2423bf19e3b5df4c1 | PHP | Nant1ng/REST-API_Ecommerce | /objects/Product.php | UTF-8 | 3,232 | 3.59375 | 4 | [] | no_license | <?php
class ProductException extends Exception {}
class Product {
private $_id;
private $_product_title;
private $_description;
private $_price;
private $_stock;
private $_img_url;
public function __construct($id, $product_title, $description, $price, $s... | true |
de39fb366af2cbdf3dd94c92988cd85d300cd3d8 | PHP | BenjaminZekavica/BZ__Gutenberg-WordPress-Blocks | /gutenberg_block/src/block/artikel-tile/portfolio-auflistung.php | UTF-8 | 5,083 | 2.515625 | 3 | [] | no_license | <?php
// Dynamic Block
register_block_type('bzblocks/articletile', array(
'render_callback' => 'prwp_articletile',
'attributes' => array(
'align' => array(
'type' => 'string',
'default' => 'center',
),
'anz... | true |
eaafb59f62cd372a309d973c25e3d77e6b38c994 | PHP | olvidio/orbix | /apps/ubis/model/entity/Region.php | UTF-8 | 13,943 | 2.703125 | 3 | [] | no_license | <?php
namespace ubis\model\entity;
use core;
/**
* Clase que implementa la entidad xu_region
*
* @package delegación
* @subpackage model
* @author Daniel Serrabou
* @version 1.0
* @created 20/11/2010
*/
class Region extends core\ClasePropiedades
{
/* ATRIBUTOS --------------------------------------------... | true |
a84d475178ffb3a4252142d101787cfb0d30a460 | PHP | anil-ninja/bluenetV0 | /ajax/getareas.php | UTF-8 | 497 | 2.609375 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION['user_id'])) {
header('Location: index.php');
}
require_once "../components/dbConnection.php";
if(isset($_POST['type'])){
$type = $_POST['type'];
$data = "<option value='0'>Select Area </option>";
$area = mysqli_query($db_handle, 'SELECT * FROM area ;');
while ( $a... | true |
8078a197e364fb4fd27aabc1bfee818634cdbafb | PHP | PayGreen/module-magento-2 | /bundles/PGSystem/Components/Service/CallDelayer.php | UTF-8 | 3,986 | 2.6875 | 3 | [
"X11",
"MIT"
] | permissive | <?php
/**
* 2014 - 2022 Watt Is It
*
* NOTICE OF LICENSE
*
* This source file is subject to the MIT License X11
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/mit-license.php
* If you did not receive a... | true |
3ddcdae018066e41208753f986399be034422918 | PHP | ezetrobo/centro-del-peinador | /app/Clases/Persona/Sexo.php | UTF-8 | 341 | 3.25 | 3 | [] | no_license | <?php
namespace App\Clases\Persona;
class Sexo{
public $idSexo;
public $descripcion;
public function __construct($idSexo = 3){
// 1: Masculino
// 0: Femenino
// 3: indeterminado
$this->idSexo = $idSexo;
$this->descripcion = ($this->idSexo == 1) ? 'Masculino' : ( ($this->idSexo == 0) ? 'Femenino' : 'Inde... | true |
34f5dc22c78a0e56dd8bc1c4401093f2be6d95bc | PHP | AxelJarni/BankyPHP | /view/singleView.php | UTF-8 | 2,528 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
include "layout/header.php";
if(!isset($error)):
?>
<div class="mb-5">
<button onclick="location.href='index.php'" class="btn btn-warning">Retourner à l'accueil</button>
</div>
<h3>Votre compte en détail : </h3>
<div class="row my-3">
<div>
<table class="table table-striped table-dark">
... | true |
c854c35e3e16e021a72c0e8e12fa34f931ddf8e9 | PHP | avinashmz/webbee-test | /app/Repository/Eloquent/EventRepository.php | UTF-8 | 1,459 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Repository\Eloquent;
use App\Models\Event;
use App\Models\Booking;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use App\Repository\EventRepositoryInterface;
class EventRepository extends BaseRepository implements EventRepositoryInterface
{
/**
* EventRepositor... | true |
17c18fb5e219c95b77e546986f418c73dc7996c2 | PHP | dimichspb/yii2-notificator | /src/repositories/ActiveRecordNotificationRepository.php | UTF-8 | 2,289 | 2.65625 | 3 | [] | no_license | <?php
namespace dimichspb\yii\notificator\repositories;
use dimichspb\yii\notificator\interfaces\NotificationInterface;
use dimichspb\yii\notificator\interfaces\NotificationTypeInterface;
use dimichspb\yii\notificator\models\Notification\Id;
use dimichspb\yii\notificator\models\Notification\search\NotificationSearch;
... | true |
3c285dde00c6dcd7ad9a1d811820b02ac11d152a | PHP | imper86/ean13-generator | /src/Imper86/EAN13Generator/Generator.php | UTF-8 | 731 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright: IMPER.INFO Adrian Szuszkiewicz
* Date: 29.08.18
* Time: 10:55
*/
namespace Imper86\EAN13Generator;
class Generator implements GeneratorInterface
{
public function generate(string $number, string $prefix = '200'): string
{
if (strlen($number) + strlen($prefix) > 12) {
... | true |