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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9bc18f20c6d14f21d0b6e11bc4abf587ecb35f4e | PHP | yaiza-nt/Curso-PHP | /2-Fundamentos/funciones-arrays.php | UTF-8 | 798 | 3.59375 | 4 | [] | no_license | <?php
/*$amigo = [
'telefono' => 999887766,
'edad' => 22,
'pais' => 'España'
];
// Extrae elementos de arrays asociativos en variables:
extract($amigo);*/
$semana = [
'Lunes', 'Martes', 'Miércoles', 'Jueves',
'Viernes', 'Sábado', 'Domingo'
];
/*ec... | true |
7918a728c6cabefa348fa1ac13a1c544a8557b41 | PHP | github-day-b/test-Repository | /kintai/admin/confEmployee/ajax_changeEmployee.php | UTF-8 | 2,051 | 2.796875 | 3 | [] | no_license | <?php
/*
* @author YukiKawasaki
* FileName ajax_confEmployee.php
* @create 2014/05/01
* Remark 従業員を変更するだけ。
2014/05/16
sql操作をempinfoDBに追い出した。
*/
require_once("../../util/util.php");
require_once("../../database/empinfoDB.php");
session_start();
... | true |
87e667721c1c008ee1f75261a1ab47bf9454fbc1 | PHP | nlemaitre/php-connectSession | /login_post.php | UTF-8 | 956 | 3 | 3 | [] | no_license | <?php
session_start();
if (isset($_POST['login']) && isset($_POST['mdp'])) {
require 'connexion.php';
$bdd = pdo_connect_mysql();
$requete = "SELECT * FROM utilis WHERE LoginUtil=? AND PassUtil=?";
$resultat = $bdd->prepare($requete);
$login = $_POST['login'];
$mdp = $_POST['mdp'];
$... | true |
8b4efae834c7398ff572c8c6d2556979ae9903fc | PHP | emilysf/studiowizard | /app/Http/Controllers/FormController.php | UTF-8 | 1,174 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
class FormController extends Controller
{
public function signup() {
$servername = "127.0.0.1";
$username = "root";
$password = "password321";
$dbname = "Dance_db";
// Create co... | true |
5a26480373d28bda52540d3be054bd2f3ea17fa8 | PHP | thomasdion/bands | /molonlave/lib/Tours.php | UTF-8 | 4,189 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Description of Tours
*
* @author Διονύσης
*/
class Tours {
private $connection;
public $tours;
function __construct(){
$this->connection = null;
$this->tours=null;
}
function unset_con() {
$this->connection = null;
... | true |
41aa845a4e9a68441d53463f086baf3801b43576 | PHP | ronnyhartenstein/Image-and-Video-Thumbnailer | /src/BaseCommand.php | UTF-8 | 4,133 | 2.671875 | 3 | [] | no_license | <?php
namespace RhFlow\Thumbnailer;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Style\SymfonyStyle;
use \RuntimeException as Exception;
abstract class BaseCommand extends Command... | true |
d92b14fc1302b2354086b3a5d05e90b09416266c | PHP | doseonkim/Crypto-Sim | /PHP_SQL/get_user_wallet.php | UTF-8 | 1,775 | 2.765625 | 3 | [] | no_license | <?php
ini_set('display_errors', '1');
error_reporting(E_ALL);
// Connect to the Database
$dsn = 'mysql:host=cssgate.insttech.washington.edu;dbname=doseon';
$username = 'doseon';
$password = 'Getex~';
if (!isset($_GET['name']) || empty($_GET['name'])) {
$result = array(
"code" => 100,
"mes... | true |
dc9aeaa4e119106b20e92bd18232aa4ffb3baa3f | PHP | yushenxiang/mall-php | /application/common/service/Service.php | UTF-8 | 563 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @author xialeistudio
* @date 2019-06-13
*/
namespace app\common\service;
/**
* 业务基类
* Class Service
* @package app\common\service
*/
class Service
{
private static $_instances = [];
/**
* @return static|mixed
*/
public static function Factory()
{
$className = get_... | true |
cef6de59b4d0a94e378aa809230ebe5f07c91b13 | PHP | ArielAereal/ClaseUnoPHP | /ejj1prueba.php | UTF-8 | 1,157 | 3.1875 | 3 | [] | no_license | <html>
<head>
<title>Cuevas</title>
</head>
<body>
<h1>Hola Mundo!</h1>
<?php
$vueltas = 10;
$cuentap = 0;
$cuentai = 0;
$i;
$c1 = 0;
$c2 = 0;
$c3 = 0;
$c4 = 0;
$c5 = 0;
$c6 = 0;
$c7 = 0;
$c8 = 0;
$c9 = 0;
$c10 = 0;
for($i = 0; $i<$vueltas;$i++)
{
$numeroR = rand(1,10);
if ($numeroR%2 == 0)
{
$cuent... | true |
d15736cf1679872ba905418fc348d4527ad174ec | PHP | alifakbarr/Contoh_PHP | /fungsi02.php | UTF-8 | 202 | 3.140625 | 3 | [] | no_license | <?php
function cetak_ganjil($awal,$akhir){
for ($i=$awal; $i<=$akhir;$i++){
if ($i%2==1) {
echo "$i ";
}
}
}
$a=2;
$b=30;
echo "bilangan ganjil dari $a dan $b : <br>";
cetak_ganjil($a,$b);
?>
| true |
e9b5f8e2d4d555f4b51ed8685562382b41d1414f | PHP | gechiui/gechiui-develop | /tests/phpunit/tests/formatting/sanitizeTitle.php | UTF-8 | 518 | 2.578125 | 3 | [] | no_license | <?php
/**
* @group formatting
*/
class Tests_Formatting_SanitizeTitle extends GC_UnitTestCase {
public function test_strips_html() {
$input = 'Captain <strong>Awesome</strong>';
$expected = 'captain-awesome';
$this->assertSame( $expected, sanitize_title( $input ) );
}
public function test_titles_sanitiz... | true |
9de6c01797a8a407688cf950a65c1b73834f8764 | PHP | MrRobinMr/randomtools | /zam.php | UTF-8 | 441 | 2.609375 | 3 | [] | no_license | <?php
session_start();
$cena = 0;
require_once "conf.php";
try{
$db = new PDO("mysql:host=".$host.";dbname=".$db_name, $db_user, $db_password);
}
catch (PDOException $e){
die ("Error connecting to database!");
}
foreach ($_SESSION["koszyk"] as $value) {
$sth = $db->prepare('SELECT cena from produkty where id=:id');... | true |
4b0b5079c3a7d87ec321b6c48a63925745cbaf16 | PHP | luispdl/servidor | /Modelos/Auth.php | UTF-8 | 1,869 | 2.8125 | 3 | [] | no_license | <?php namespace Modelos;
require_once 'vendor/autoload.php';
use \Firebase\JWT\JWT;
use \Exception;
use \Firebase\JWT\ExpiredException;
use \Firebase\JWT\SignatureInvalidException;
class Auth
{
private static $clave_secreta = "isft_179_clave";
private static $encriptacion = ['HS256'];
private static $aud... | true |
b270f3464a5827439a2bb297eec84a94eed7c160 | PHP | Richard-NL/silex-adventure | /src/Rsh/Adventure/Action/ActionStrategy.php | UTF-8 | 578 | 2.796875 | 3 | [] | no_license | <?php
namespace Rsh\Adventure\Action;
class ActionStrategy
{
const actionClasses = [
ExitAction::class,
GoToAction::class,
InventoryAction::class,
// NoAction::class
];
public function getAction($userInputText): Action
{
foreach (self::actionClasses as $actio... | true |
5f87eb5ae83a37012d8b238423ae76620fcddc90 | PHP | silver-arrow-software/bg360 | /plugins/sas/social/models/BaseModel.php | UTF-8 | 1,950 | 2.65625 | 3 | [] | no_license | <?php namespace Sas\Social\Models;
use Model;
class BaseModel extends Model
{
protected $isSuperType = false; // set true in super-class model
protected $isSubType = false; // set true in inherited models
protected $typeField = 'type'; //override as needed, only set on the super-class model
public ... | true |
22338a4686ae4c702e166ec228d00fdc97644be5 | PHP | gilsonmello/aprendanaweb | /app/Repositories/Backend/PackageTeacher/EloquentPackageTeacherRepository.php | UTF-8 | 3,955 | 2.8125 | 3 | [] | no_license | <?php namespace App\Repositories\Backend\PackageTeacher;
use App\Package;
use App\PackageTeacher;
use App\Exceptions\GeneralException;
use App\Repositories\Backend\PackageTeacher\PackageTeacherContract;
use App\User;
/**
* Class EloquentPackageTeacherRepository
* @package App\Repositories\PackageTeacher
*/
class E... | true |
b9e5b54b8f92cd6e0dc8ffb51984ff92efa6b79d | PHP | ngtrian/bdImage | /library/bdImage/WidgetRenderer/SliderThreads.php | UTF-8 | 1,510 | 2.515625 | 3 | [] | no_license | <?php
class bdImage_WidgetRenderer_SliderThreads extends bdImage_WidgetRenderer_ThreadsBase
{
protected function _getConfiguration()
{
$config = parent::_getConfiguration();
$config['name'] = '[bd] Image: Thread Images Carousel';
$config['options'] += array(
'thumbnail_widt... | true |
38066356e6b6ed9300b2d862ef5162d2d9f5d175 | PHP | iJonKofee/server-API | /app/Model/Feedback/Table.php | UTF-8 | 2,570 | 2.59375 | 3 | [] | no_license | <?php
/**
* @method photo()
* @method taste()
* @method satiety()
* @method quality()
*/
class Feedback_Table extends Core_Db_Table_Abstract
{
use Core_Singleton;
/**
* @var string
*/
protected $_tableName = 'feedback';
/**
* @var integer
*/
private $photo;
/**
* @var... | true |
c5a2582385078f83a999ac07c7ff67eb7fe46c80 | PHP | diondi/contoh-website-pengaduan | /classes/Auth.php | UTF-8 | 1,778 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
class Auth {
private $connection;
public $table;
// Field table
public $id;
public $jenis;
public $username;
public $nama;
public $nohp;
public $email;
public $password;
public $user_data;
public function __construct($database, $table) {
$this->connection = $d... | true |
af6b94894ce3bd79bc7f1ac99e8c967083191ae0 | PHP | shreedhar-marasini/beedms | /config/mail.php | UTF-8 | 5,381 | 2.703125 | 3 | [] | no_license | <?php
$dbname = env('DB_DATABASE');
$user = env('DB_USERNAME');
$host = env('DB_HOST');
$pass = env('DB_PASSWORD');
$conn = new mysqli($host, $user, $pass, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT key_name, key_value FRO... | true |
fcf2602c3ea3a696ef9f6738ab3ea3d44ef1c689 | PHP | artviks/WannabeTinder | /app/Models/User.php | UTF-8 | 1,200 | 3.25 | 3 | [] | no_license | <?php
namespace WTinder\Models;
class User
{
private string $name;
private string $surname;
private string $email;
private string $gender;
private string $password;
private string $id;
public function __construct(
string $name,
string $surname,
string $email,
... | true |
6555cc44a9e7c199055a19bee83db09b42595175 | PHP | tolgadevsec/php | /src/Core/SessionContext.php | UTF-8 | 387 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace BitSensor\Core;
/**
* Information about the PHP session of the user.
* @package BitSensor\Core
*/
class SessionContext extends Constants
{
/**
* PHP session.
*/
const NAME = 'session';
/**
* Session ID of the connecting user.
*/
const SESSION_ID = 'sessionId';
... | true |
013f2652fd8733f0a96b7f41e8b94b3dec25a58a | PHP | 28kayak/BlogEngine_PHP | /config/createDB.php | UTF-8 | 3,056 | 3.09375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: kaya
* Date: 8/18/16
* Time: 4:07 PM
*/
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "blog";
//create connection
$conn = new mysqli($servername, $username, $password);
//check connection
if($conn->connect_error)
{
echo "Connection Failed: "... | true |
db2033a88a0ec583eb033370652f158cc517684f | PHP | hctom/drubo | /src/Config/Filesystem/FilesystemConfigListInterface.php | UTF-8 | 403 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Drubo\Config\Filesystem;
/**
* Interface for drubo filesystem configuration list classes.
*/
interface FilesystemConfigListInterface extends \Iterator, \Countable {
/**
* {@inheritdoc}
*
* @return FilesystemConfigItemInterface
*/
public function current();
/**
* {@inheritdoc}
... | true |
149777f8dcf6de1c7ac534ce70459c246640927a | PHP | ARCANEDEV/LaravelHtml | /tests/Traits/FormAccessible.php | UTF-8 | 3,527 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Arcanedev\LaravelHtml\Tests\Traits;
use Arcanedev\LaravelHtml\Tests\Stubs\{ModelThatDoesntUseForms, ModelThatUsesForms};
use Arcanedev\LaravelHtml\Tests\TestCase;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class FormAccessible
*
* @author ARCAN... | true |
55c139cd4cbbe5e22ef9ab47e89801a7fc90bb0f | PHP | donthedeveloper/streamerstats-old | /classes/ValidateInput.php | UTF-8 | 1,097 | 2.984375 | 3 | [] | no_license | <?php
class ValidateInput {
// returns array of passed(true) & failed(false) inputs
public function inputIsNotEmpty($inputArray, $requiredArray) {
$validatedInputArray = array();
foreach($inputArray as $inputName => $inputValue) {
// if the current input being looped through is required... | true |
10fc16c20a491c42e98f6b37901d8c8e6435f1c8 | PHP | ikebe094/simple-chat-2020 | /get_typing.php | UTF-8 | 1,151 | 2.84375 | 3 | [] | no_license | <?php
$sql = null;
$res = null;
$dbh = null;
// ホスト名、DB名、サーバーでPHPを実行する際のユーザー名・パスワードを指定する
$host_url = '****';
$db_name = '****';
$php_user = '****';
$php_pass = '****';
date_default_timezone_set('Asia/Tokyo');
$date = array("datenow"=>date("Y-m-d H:i:s"));
// ルーム名をURLの引数で指定し、テーブル名を整形する
$room_id_v = $_GET['room_id'];
... | true |
1d24aa4e78edb7626909dfdeef9a72743a6f0f97 | PHP | nilshollmer/oophp-v5 | /src/Dice100/DicePlayer.php | UTF-8 | 1,803 | 3.734375 | 4 | [] | no_license | <?php
namespace Nihl\Dice100;
/**
* Player class for Dice100 game
*
*/
class DicePlayer
{
/**
* @var string type Type of player
* @var string name Name of player
* @var integer totalPoints Total points
*/
protected $type;
protected $name;
protected $totalPoints;... | true |
52439f93fd13b33b28d63823676422983b21415c | PHP | Jasdoge/Djukebox | /scripts/class Tools.php | UTF-8 | 3,310 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
class Tools{
public static $ERRORS = array();
public static $NOTICES = array();
public static $N_DUMPED = false;
static function addError($text){
self::$ERRORS[] = $text;
}
static function addNotice($text){
self::$NOTICES[] = $text;
}
static function minmax($val, $min = 0, $max = 1){... | true |
aa9dd0dd1560f2519c6611eb76bc4392dfb92c24 | PHP | Ahlam97A/test_project | /src/views/Icons/aa.php | UTF-8 | 1,528 | 2.546875 | 3 | [
"MIT"
] | permissive |
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS, DELETE, PUT');
header('Access-Control-Allow-Headers: token, Content-Type');
header('Access-Control-Expose-Headers: *');
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Origin: http:/... | true |
5da0ef3e532392f73b7e2c684aed8437a841d5e7 | PHP | florianprechtl/InventoryManager | /InventoryManager/src/login/login-register/uploaduser.php | UTF-8 | 2,920 | 3.078125 | 3 | [] | no_license | <!-- As its name indicates, this code is to place the characteristics of new users into the db-->
<?php
include('../../common/connectDB.php');
include('../../common/basicFunctions.php');
// Connecting to the database
$db = connectToDB();
// Setting up variables
$usernr = null;
// Validat... | true |
68f144951c41af3ffdd7d27f1e2c204ca89b35e1 | PHP | sxeseb/StrasCook | /src/Service/CartService.php | UTF-8 | 2,594 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Service;
class CartService
{
public function addToCart()
{
$errors = [];
$datas = [];
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (!isset($_POST['gridRadios']) || empty($_POST['gridRadios'])) {
$errors['price'] = "Selectionnez une opt... | true |
42545d9361040b4a3514e1ed4b1ed91997cb055c | PHP | Arshad83/php | /php_examples/array.php | UTF-8 | 745 | 2.90625 | 3 | [] | no_license | <?php
$car['test']=array('first'=>'maruti','suzuki','third'=>'kwid');
var_dump($car['test']);
echo '<br/>';
var_dump($car);
echo '<br/>';
$car=array('first'=>array('m1'=>'maruti_volta',
'm2'=>'maruti_x'
),
'second'=>'suzuki',
'third'=>'kwid');... | true |
a7c4b3156d69408085e2da561c2122d12ec66ecf | PHP | franzose/kontrolio | /src/Rules/Core/Range.php | UTF-8 | 2,056 | 3.421875 | 3 | [
"MIT"
] | permissive | <?php
namespace Kontrolio\Rules\Core;
use DateTime as PhpDateTime;
use DateTimeInterface;
use InvalidArgumentException;
use LogicException;
use Kontrolio\Rules\AbstractRule;
/**
* Range of values validation rule.
*
* @package Kontrolio\Rules\Core
*/
class Range extends AbstractRule
{
/**
* @var mixed|nu... | true |
5c3e630aeeb0644c4a35bf07c6676e7a5a2dec5e | PHP | friendica/red | /library/asn1.php | UTF-8 | 8,375 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
// ASN.1 parsing library
// Attribution: http://www.krisbailey.com
// license: unknown
// modified: Mike Macgrivin mike@macgirvin.com 6-oct-2010 to support Salmon auto-discovery
// from openssl public keys
class ASN_BASE {
public $asnData = null;
private $cursor = 0;
private $parent = null;
public static... | true |
f6ec910b602b4687672e0ec2755be455d78b753e | PHP | hngi/Kymopoleia_bot | /landing.php | UTF-8 | 6,475 | 2.640625 | 3 | [] | no_license | <?php
/**
* A lightweight example script for demonstrating how to
* work with the Slack API.
*/
// Include our Slack interface classes
require_once 'slack-interface/class-slack.php';
require_once 'slack-interface/class-slack-access.php';
require_once 'slack-interface/class-slack-api-exception.php';
use Slack_In... | true |
0f4afaf28f766c8cdd03d37861e240f1a0944d38 | PHP | jetsaus/repeate | /41/41f.php | UTF-8 | 645 | 3.625 | 4 | [] | no_license | <?php
/*
* Модуль функций
*/
function decade(int $dayMonth = 1)
// Возвращает декаду месяца, в зависимости от числа
{
// Число в диапазоне от 1 до 31
if (($dayMonth >= 1) && ($dayMonth <= 31)) {
$decadeNum = $dayMonth / 10;
if ($decadeNum <= 1) {
return 'первая декада';
} e... | true |
16c82dd0d3869a5a89589a814e7af54760219ec3 | PHP | Windblow99/soultradelaravel | /app/Http/Controllers/Admin/UsersController.php | UTF-8 | 3,628 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\User;
use App\Models\Role;
use App\Models\Category;
use App\Models\Personality;
use PDF;
use Illuminate\Support\Facades\Gate;
use Illuminate\Http\Request;
class UsersController extends Controller
{
/**
* Limitin... | true |
233a26fbcfb8fa596e48949c59aa29252cf1d1f6 | PHP | kostadinoval/codeigniter-qa | /application/controllers/guest_search.php | UTF-8 | 3,474 | 2.671875 | 3 | [] | no_license | <?php
class Guest_search extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->model("sessions_model");
$this->load->model("questions_model");
$this->load->model("answers_model");
$this->load->model("user_details_model");
}
public function index(){
$data = $t... | true |
a70c861ece9cbbde4e696554c30e802e975d6c15 | PHP | tranbachngoc/projectMHDC | /app/app/Console/Commands/DeleteMessageChat.php | UTF-8 | 1,503 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Log;
use Carbon\Carbon;
use App\Models\ChatMessages;
use App\Models\User;
use DB;
use App\Helpers\Commons;
class DeleteMessageChat extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/... | true |
44ecc7269a0208fe0fdc793212cae0bd18b0fa67 | PHP | annurkhozin/evotingweb | /application/views/admin/cetak/ttd.php | UTF-8 | 867 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <p> </p>
<p> </p>
<table width="100%" border="0">
<tr>
<td width="56%"> </td>
<td width="44%"><br>
<center>Bojonegoro <?php
date_default_timezone_set('Asia/Jakarta'); $jam=date('Y-m-d H:i:s');
/* script menentukan hari */
$array_hr= array(1=>"Senin","Selasa","Rabu","Kamis","Jumat","Sabt... | true |
dc00b75dda7478130713e94031a5b12ad62d895d | PHP | thomaslu2000/minnowshare | /file.php | UTF-8 | 7,471 | 2.5625 | 3 | [] | no_license | <?php
include("header.php");
if(!isset($_GET['file'], $_GET['share']) or !is_numeric($_GET['file'])){
header("Location: browse.php");
exit();
}
$file_id = $_GET['file'];
switch($_GET['share']){
case 'public': case 'friends': case 'private':
$sharetype = $_GET['share'];
break;
default:
... | true |
49e880df36df7a7b6cb3f6fc86589aedad25e5ed | PHP | EugeneErg/SQLPreprocessor | /src/Argument.php | UTF-8 | 1,840 | 3 | 3 | [] | no_license | <?php namespace EugeneErg\SQLPreprocessor;
final class Argument {
const IS_ARRAY = 'array';
const IS_SCALAR = 'scalar';
const IS_VARIABLE = 'variable';
const IS_FUNCTION = 'function';
const IS_FIELD = 'field';
const IS_NULL = 'null';
private $type;
private $value;
public stat... | true |
80d55971046ac242eacae53f131eb78d8099acb8 | PHP | awagink/AdminSystem | /application/modules/admin/models/UserLevel/Repository.php | UTF-8 | 3,083 | 2.71875 | 3 | [] | no_license | <?php
class Admin_Model_UserLevel_Repository implements Admin_Model_UserLevel_IDAO, Zf_Model_IRepository
{
protected $_dao;
protected $_mapper;
/**
* @param unknown_type $dao
*/
public function setDao($dao) {
if (is_string($dao)) {
$dao = new $dao();
}
if (!$dao instanceof Admin... | true |
00d1f71e9e4cacfc3f50b73a5256b6879ca99581 | PHP | brassbandpl/gestion-frais | /src/Command/ExpenseEventRecalcCommand.php | UTF-8 | 2,078 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Command;
use App\Repository\ExpenseEventRepository;
use App\Service\ExpenseEventCalculator;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Compo... | true |
ba9651585e88a1aaf2ccf66c26e41371a9b941fc | PHP | sadatech/tns_sc | /database/seeds/SalesTableSeeder.php | UTF-8 | 2,134 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Carbon\Carbon;
use App\EmployeeStore;
use Faker\Factory as Faker;
class SalesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Faker::create();
// SALES HEADER ... | true |
dbe105f355c1c38f1a608dba7e1c5f4b4c24162c | PHP | YNCBearz/design-pattern | /app/FactoryPattern/Pizza/FounderIngredientFactory.php | UTF-8 | 444 | 2.71875 | 3 | [] | no_license | <?php
namespace App\FactoryPattern\Pizza;
use App\FactoryPattern\Pizza\Dough\GeneralDough;
use App\FactoryPattern\Pizza\Sauce\GeneralSauce;
use App\FactoryPattern\Pizza\Contracts\IngredientFactoryInterface;
class FounderIngredientFactory implements IngredientFactoryInterface
{
public function createDough()
{
... | true |
65cda952a212b9021154d89bf64fa2461d03733e | PHP | Gnime/KeaWork | /interfaceDesignExam/views/createUserProfile.php | UTF-8 | 1,337 | 2.734375 | 3 | [] | no_license | <?php
require "views/functions.php";
if (isset($_POST['username'])){
$username= $_POST['username'];
$password = $_POST['password'];
$title = $_POST['title'];
$asUsers = file_get_contents("users.txt");
$ajUsers = json_decode($asUsers);
//
$newUser = new stdClass();
$newUser->id = getG... | true |
9ef4203aee2c0e8ef7ba6ed1f4ec21dfb7740508 | PHP | icevisual/laravel5 | /app/Models/Form/Component.php | UTF-8 | 2,756 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Form;
use App\Models\BaseModel;
class Component extends BaseModel
{
protected $table = 'component';
public $timestamps = false;
public $guarded = [];
protected $createSql = "
DROP TABLE IF EXISTS `op_component`;
CREATE TABLE `op_component` (
`id` int(11) un... | true |
9e630e0bc99b6abde77590326719c23e7a6dd062 | PHP | xiaomlove/huanbao | /app/Http/Middleware/ImageToAttachmentKey.php | UTF-8 | 703 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
class ImageToAttachmentKey
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$method = $r... | true |
b092e81c03832d1e5771b2db45fb3077f70b8255 | PHP | HazemFCIH/PodBuilder | /app/Http/Controllers/HomeController.php | UTF-8 | 1,173 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
class HomeController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
return view('home');
}
public functio... | true |
87e898237ed9a4932b58bc76a80da13c09f4ee48 | PHP | jasonATindiecentive/coinbase-pro-sdk | /src/Functional/DTO/TimeData.php | UTF-8 | 1,056 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Marc MOREAU <moreau.marc.web@gmail.com>
* @license https://github.com/MockingMagician/coinbase-pro-sdk/blob/master/LICENSE.md MIT
* @link https://github.com/MockingMagician/coinbase-pro-sdk/blob/master/README.md
*/
namespace MockingMagician\CoinbaseProSdk\Functional\DTO;
use MockingMagician\C... | true |
b85e3c9b0906925b7e278285f846ee6663365613 | PHP | SendCloud/sendcloud | /CheckoutCore/Domain/Interfaces/DTOInstantiable.php | UTF-8 | 436 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace SendCloud\SendCloud\CheckoutCore\Domain\Interfaces;
use SendCloud\SendCloud\CheckoutCore\DTO\DataTransferObject;
/**
* Interface DTOInstantiable
*
* @package SendCloud\SendCloud\CheckoutCore\Domain\Contracts
*/
interface DTOInstantiable
{
/**
* Makes an instance from dto.
*
* @... | true |
a2ccd984104b5c1b6b4933ff8dfd259c24796732 | PHP | renangtm/rtc | /php/entidades/Usuario.php | UTF-8 | 46,273 | 2.53125 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Fornecedor
*
* @author Renan
*/
class Usuario {
public $id;
public $nome;
public $email;
... | true |
a59c67f549f5d3f1ab8f7febbfb291350e4eafc1 | PHP | bileto/omnipay-payu | /src/Messages/PurchaseResponse.php | UTF-8 | 1,985 | 2.78125 | 3 | [] | no_license | <?php
namespace Omnipay\PayU\Messages;
use Omnipay\Common\Message\AbstractResponse;
use Omnipay\Common\Message\RedirectResponseInterface;
class PurchaseResponse extends AbstractResponse implements RedirectResponseInterface
{
/**
* @return boolean
*/
public function isSuccessful(): bool
{
... | true |
0e8cab5c95a19b809e62b6cd8f204ac0c136f095 | PHP | Wick/eaa-MVC | /app/src/Source/CSource.php | UTF-8 | 9,060 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class for display sourcecode.
*
* @author Mikael Roos, me@mikaelroos.se
* @copyright Mikael Roos 2010 - 2014
* @link https://github.com/mosbth/csource
*/
namespace Mos\Source;
class CSource {
/**
* Properties
*/
private $options = array();
/**
* Constructor
*
* @param array $opt... | true |
488606c631d960e1e174a03d9c547bc05223d496 | PHP | kraftner/wpstarter | /src/Config/Result.php | UTF-8 | 5,505 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the WP Starter package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace WeCodeMore\WpStarter\Config;
/**
* Value object used as a result for all the validation o... | true |
69e5a575e9a8dfb14977bc480f7966a093291d99 | PHP | masterpuppet/ProjectManager | /module/Application/src/Application/Model/CommentInterface.php | UTF-8 | 293 | 2.921875 | 3 | [] | no_license | <?php
namespace Application\Model;
interface CommentInterface
{
/**
* @return int
*/
public function getId();
/**
* @param string $message
*/
public function setMessage($message);
/**
* @return string
*/
public function getMessage();
} | true |
0e434400000757e8cd58af1e51b0a0e0f98bc722 | PHP | Andrey-SD/billboard | /app/Http/Controllers/Auth/AuthLoginController.php | UTF-8 | 912 | 2.546875 | 3 | [] | no_license | <?php
namespace Billboard\Http\Controllers\Auth;
use Auth;
use Billboard\User;
use Illuminate\Http\Request;
use Billboard\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
class AuthLoginController extends Controller
{
public function login(Request $request)
{
$this->validate($request... | true |
608aaa93d2b068323ef823d3c756b2579a61298c | PHP | SeppeDev/web-backend-oplossingen | /24-opdracht-classes-begin/opdracht-classes-begin.php | UTF-8 | 776 | 2.859375 | 3 | [] | no_license | <?php
function __autoload( $className )
{
include "classes/" . $className . ".php";
}
$new = 150;
$unit = 100;
$percent = new Percent( $new, $unit );
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>24 | Oplossing classes begin</title>
</head>
<body>
<table>
... | true |
4cba7ab9b836e6a6c7b9b33c48a34d3f9de88eb9 | PHP | kennedylinzie/webprojects | /assets/v1/setup.php | UTF-8 | 1,585 | 2.625 | 3 | [] | no_license | <?php require 'assets/v1/connect.php'?>
<?php
// Create connection
$conn = mysqli_connect($servername, $username, $password);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
// Create database
$sql = "CREATE DATABASE $db";
if (mysqli_query($conn, $sql)) {
// echo "Databa... | true |
cdf2c5f6bca0182f29b11bf7b32299b3d56e51e4 | PHP | bina-antarbudaya/OR14 | /app/components/auth_component.php | UTF-8 | 2,775 | 2.5625 | 3 | [] | no_license | <?php
// auth component
class AuthComponent extends HeliumComponent {
public $prerequisite_components = array('sessions');
public $controller;
public $session;
public $auth_controller_name = 'auth';
public $login_action_name = 'login';
public $logout_action_name = 'logout';
public function init($controller... | true |
f9338d4bfa26cc5edf1c9a64034162015fdedbd4 | PHP | B3none/prospect-php-client | /src/Response/SearchReportResponse.php | UTF-8 | 477 | 2.5625 | 3 | [] | no_license | <?php
namespace Silktide\ProspectClient\Response;
use Countable;
use Iterator;
use Psr\Http\Message\ResponseInterface;
use Silktide\ProspectClient\Entity\Report;
class SearchReportResponse extends AbstractResponse
{
/**
* @return Report[]
*/
public function getReports() : array
{
$repor... | true |
7b1477130581bb96112b28c382c5aeb22c9bd3f4 | PHP | AlexandreGerault/simple-social-network-api | /app/Repositories/BaseRepository.php | UTF-8 | 372 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Repositories;
use Illuminate\Database\Connection;
abstract class BaseRepository
{
protected Connection $connection;
protected string $table;
/**
* BaseRepository constructor.
* @param Connection $connection
*/
public function __construct(Connection $connection)
... | true |
a35130b0730c9e4d567854c111fadb5a1881336a | PHP | maxbond/allCultureAPI | /src/ApiActions.php | UTF-8 | 1,297 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class ApiActions.
*
* all.culture.ru API wrapper
*
* @author Maxim Bondarev <macintosh.way@gmail.com>
*
* @link https://all.culture.ru/public/json/howitworks
*/
namespace Maxbond\AllCultureAPI;
abstract class ApiActions
{
/**
* Request object
* Must contain doRequest($url) method.
... | true |
5b55c5af4ea6c30ea050abb83e7ca190da553896 | PHP | deusagnis/laravel-microservice | /app/Microservice/Tools/ErrorsGenerator.php | UTF-8 | 2,358 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Microservice\Tools;
use Illuminate\Support\Facades\Response;
class ErrorsGenerator
{
/**
* List of existing errors: code => name
* @var string[]
*/
protected $errors = [
0 => 'Unexpected error',
1 => 'API not found',
2 => 'Basic validation failed'... | true |
cc153fad9ff68763174f8c1a11403aa634563564 | PHP | Cloudotron/scholarzone | /dexcode/core/email/email.php | UTF-8 | 2,229 | 2.71875 | 3 | [] | no_license | <?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
//require '../api/phpmailer/autoload.php';
class email{
public $atta;
public $bcc;
public $cc;
public function __construct(){
$this->atta = "";
$this->bcc = "";
$this->cc = "";
}
public ... | true |
62d3d0618616ef5da5e88e01818939311480101f | PHP | kaiopessoni/contacts-manager | /app/Http/Controllers/ContactsController.php | UTF-8 | 4,904 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Contact;
use App\User;
class ContactsController extends Controller
{
/**
* Allow only authenticated users
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
... | true |
9525699d8a76ab6120c84de84ce4fd7ff052f879 | PHP | PubFork/aikq | /app/Console/HtmlStaticCommand/OtherPlayerCommand.php | UTF-8 | 1,119 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Console\HtmlStaticCommand;
use Illuminate\Support\Facades\Storage;
class OtherPlayerCommand extends BaseCommand
{
protected function command_name()
{
return "other_player";
}
protected function description()
{
return "其他播放器";
}
public function handle... | true |
95eb9fe2f54b0728e17b29f8f3175a69de304450 | PHP | dijiflex/happyland-ventures-LTD | /includes/subscribe.inc.php | UTF-8 | 894 | 2.96875 | 3 | [] | no_license | <?php
include 'dbh.inc.php';
/* Attempt MySQL server connection*/
$link = mysqli_connect("localhost", "root", "", "cudb");
$sql ="";
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
// Escape user inputs for security
$email = mysqli_real_escape_string($link, ... | true |
0fb448d152eccfa92a77aab174d10f643d72ff8d | PHP | oelodran/photo_gallery | /public/login.php | UTF-8 | 2,515 | 2.703125 | 3 | [] | no_license | <?php
require_once ('../private/initialize.php');
$errors = [];
$username = '';
$password = '';
if (is_post_request())
{
$username = $_POST['username'] ?? '';
$password = $_POST['password'] ?? '';
$check = $_POST['check'] ?? '';
// validation
if (is_blank($username))
{
$errors[] = "Us... | true |
ec13c3cf70db819dc2b408178cd47ed08a2b4bc9 | PHP | maurosarruda/aulas_php | /02_condicionais/01_condicionais.php | UTF-8 | 1,869 | 3.609375 | 4 | [] | no_license | <h1> Estruturas Condicionais </h1>
<?php
$idade = 16;
if ($idade < 18){
echo "Usuário com $idade anos é menor de idade!";
} else if ($idade == 18){
echo "Usuário possui $idade anos!";
} else {
echo "Usuário com $idade anos é um adulto!";
}
?>
<h1> Operadores Lógicos </h1>
<?php
$idade = 15;
if ($idade >=... | true |
d5124271317fbe6ba7b4c8e9b0f8eaa237a4a215 | PHP | eddy983/-open-treasury-api | /app/Imports/TreasuryImport.php | UTF-8 | 3,677 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Imports;
use Carbon\Carbon;
use App\TreasuryTemporary;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\WithChunkReading;
class TreasuryImport implements ToMod... | true |
d933962ace21feee7c7968a45c47b3c077198807 | PHP | vasylshyshola/training | /tasks phpbooktrest/oopLesson2.php | UTF-8 | 3,052 | 3.828125 | 4 | [] | no_license | <?php
error_reporting(-1);
class Employee // employee значит «сотрудник»
{
public $name; // имя-фамилия
public $rate; // часовая ставка (сколько он получает тугриков за час работы)
public $hours = array(); // массив, содержащий отработанные часы по неделям
... | true |
8f7fdccb3382f605c6fd6c547488f8590e8ef7f8 | PHP | programmingdog/tinyframe-frame | /src/cache/Cache.php | UTF-8 | 1,200 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
// +----------------------------------------------------------------------
// | zibi [ WE CAN DO IT MORE SIMPLE]
// +----------------------------------------------------------------------
// | Copyright (c) 2016-2019 http://xmzibi.com All rights reserved.
// +------------------------------------------------------... | true |
c5ea25707fa1cf19d38230a1ead9acef9657e6ed | PHP | maarekj/netosoft-domain-bundle | /src/Domain/ChainHandler.php | UTF-8 | 1,042 | 2.875 | 3 | [] | no_license | <?php
namespace Netosoft\DomainBundle\Domain;
use Netosoft\DomainBundle\Domain\Exception\UnhandledException;
class ChainHandler implements HandlerInterface
{
/** @var HandlerInterface[]|array */
private $handlers;
/**
* @param HandlerInterface $handler
*
* @return $this
*/
public... | true |
eaeebee74177102db83986fd4832697852c6c875 | PHP | shuxiaoyuan/My-eBookStore | /My-eBookStore/application/models/BookModel.class.php | UTF-8 | 6,110 | 2.84375 | 3 | [] | no_license | <?php
/**
* application/models/BookModel.class.php
* 图书模型
*/
/* 防止 URL 路径访问 */
if(!defined('ENTRY')) {
header("Location:../../index.php");
exit;
}
class BookModel extends Model {
public function __construct() {
parent::__construct(TABLE_B... | true |
8103b1e7da292e5584c4adaabd06ce619500d7ee | PHP | KossmoHard/test-light-it | /models/User.php | UTF-8 | 3,271 | 3.078125 | 3 | [] | no_license | <?php
/**
* Класс User - модель для работы с пользователями
*/
class User
{
public static function register($name, $email, $password)
{
// Соединение с БД
$db = Db::getConnection();
// Текст запроса к БД
$sql = 'INSERT INTO user (name, email, password) '
. 'VAL... | true |
5d4513961b973068326a1d3e91091fac8f04f75b | PHP | urielfs/tesauro | /vistas/v.historico_ajax.php | UTF-8 | 4,703 | 2.65625 | 3 | [] | no_license | <?php
function array_to_json( $array ){
if( !is_array( $array ) ){
return false;
}
$associative = count( array_diff( array_keys($array), array_keys( array_keys( $array )) ));
if( $associative ){
$construct = array();
foreach( $array as $key => $value ){
// We fi... | true |
39ca69b632582ec934dd90b2b32c7d11e0974a25 | PHP | tradefurniturecompany/site | /app/code/Hotlink/Brightpearl/Model/Interaction/Stock/Realtime/Import/Environment/Instock.php | UTF-8 | 930 | 2.515625 | 3 | [] | no_license | <?php
namespace Hotlink\Brightpearl\Model\Interaction\Stock\Realtime\Import\Environment;
class Instock extends \Hotlink\Brightpearl\Model\Interaction\Stock\Realtime\Import\Environment\YesNo\AbstractYesNo
{
function getDefault()
{
return 1;
}
function getKey()
{
return 'put_back_in... | true |
11cc1d023ab28875772b645753c139daa2ba2f52 | PHP | fivesqrd/hive | /src/Factory.php | UTF-8 | 1,163 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Hive;
use Bego;
use Aws\DynamoDb;
class Factory
{
protected $_table;
protected $_name;
public static function instance($config, $name)
{
if (!isset($config['aws']['version'])) {
$config['aws']['version'] = '2012-08-10';
}
$db = new Bego\D... | true |
5f3c7ac40267921aee14b0035fd639ef8fa36ec5 | PHP | m0n0ph1/php-design-patterns-1 | /src/Nam/Proxy/ShoppingCart.php | UTF-8 | 172 | 2.578125 | 3 | [] | no_license | <?php
namespace Nam\Proxy;
class ShoppingCart implements Cart
{
private $products;
public function getProducts()
{
return $this->products;
}
} | true |
ece7cc55efc5448b13b8bd161085c67643a2b037 | PHP | bakert/compareweather | /classes/location.php | UTF-8 | 2,437 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
require_once __DIR__ . '/../classes/forecastio.php';
require_once __DIR__ . '/../classes/store.php';
require_once __DIR__ . '/../classes/weather.php';
class Location {
public static function init() {
return [
new Location(Config::firstCityName(), Config::firstCityLatitude(), Config::fir... | true |
81882039bdbf705018a1516462984765ea559f86 | PHP | meza/nestedset | /src/view/Layout.php | UTF-8 | 231 | 2.6875 | 3 | [] | no_license | <?php
/**
* Layout.php
*
* @author meza <meza@meza.hu>
*/
/**
* Common interface for layouts.
*/
interface Layout
{
/**
* Render the layout with the given data.
*
* @return string
*/
public function render($data='');
} | true |
13a183600747208e721be622cc8ba07a6b39ed70 | PHP | BubblestheKhan/MiscIT490Files | /testfiles/register.php | UTF-8 | 4,036 | 3.015625 | 3 | [] | no_license | <?php
require_once 'config.php'; //include config file
//Define variables with empty variables for input
$username = $password = $confirm_password ='';
$username_err = $password_err = $confirm_password_err = "";
//Process form data upon submission
if($_SERVER["REQUEST_METHOD"] == "POST"){
//Validate username
if(e... | true |
1f32569bf309e04b8e66e046c1fa62b48d61b337 | PHP | Eng-RSMY/Leave-Management-System- | /regadmin.php | UTF-8 | 2,238 | 2.796875 | 3 | [] | no_license | <?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
$errors = array();
$email=$_POST['email'];
$name=$_POST['name'];
$pw=$_POST['password'];
//start validation
include 'connection.php';
$sql = "SELECT * FROM admin where email='$email'";
if($result = mysqli_query($conn, $sql)){
... | true |
0d7449ce970484c07ce352873dd6c4e685b61d3f | PHP | tokenly/quotebot | /app/Console/Commands/FetchQuote.php | UTF-8 | 3,141 | 2.65625 | 3 | [] | no_license | <?php namespace Quotebot\Console\Commands;
use Carbon\Carbon;
use DateTimeZone;
use Illuminate\Console\Command;
use Quotebot\Quote\Selector;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Tokenly\CurrencyLib\CurrencyUtil;
class FetchQuote extends Command {
... | true |
cba53e8efce69ad8c1c54c0445729b81e7e56461 | PHP | wildanarifanani/Aplikasi-Bengkel-Surya-Motor-Cimahi | /bengkels/addKendaraan.php | UTF-8 | 613 | 2.8125 | 3 | [] | no_license | <?php
if($_SERVER['REQUEST_METHOD']=='POST'){
//Getting values
error_reporting(0);
$id = $_POST['id'];
$plat = $_POST['plat'];
$merk = $_POST['merk'];
$tahun = $_POST['tahun'];
//Creating an sql query
$sql = "INSERT INTO tbl_kendaraan(id,plat,merk,tahun) VALUES ('$id','$plat','$merk','$tahun')";... | true |
164d033281aa9d6dc11a23b3e0124df17c42281d | PHP | HolyLight110/bibc | /app/Models/Passenger.php | UTF-8 | 520 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Models;
use \Illuminate\Database\Eloquent\Model;
class Passenger extends Model
{
protected $table = 'register_user';
protected $primaryKey = 'iUserId';
protected $fillable = ['vName', 'vLastName', 'vEmail', 'vPhone'];
protected $appends = ['fullName'];
public function get... | true |
92b11f5641cdfea0daae6fb0a427f5b903ffead6 | PHP | the-cc-dev/PHPJava | /PHPJava/Attributes/JavaLineNumberTableAttribute.php | UTF-8 | 924 | 2.8125 | 3 | [] | no_license | <?php
class JavaLineNumberTableAttribute extends JavaAttribute {
private $LineNumberTableLength = null;
private $LineNumberTables = null;
public function __construct (&$Class) {
parent::__construct($Class);
$this->LineNumberTableLength = $this->Class->getJavaBina... | true |
d527d866d3c6c5e89b5a1f18474db4e37ac9712b | PHP | bsm2/laravelProject | /app/Http/Controllers/blogController.php | UTF-8 | 607 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\blog;
class blogController extends Controller
{
public function createBlog(Request $request){
$data = $this->validate(request(),[
'title'=>'required|max:10|min:2|regex:/^[a-zA-Z]*$/',
'content... | true |
6576edcf0f2395a4c9fac22eac6d44829e6e6988 | PHP | hughwilly/oioubl | /tests/Unit/DocumentTest.php | UTF-8 | 1,308 | 2.546875 | 3 | [] | no_license | <?php
namespace HughWilly\OioublTests\Unit;
use Carbon\Carbon;
use HughWilly\Oioubl\CreditNote;
use HughWilly\Oioubl\DocumentFactory;
use HughWilly\Oioubl\Invoice;
use HughWilly\Oioubl\UtilityStatement;
use HughWilly\OioublTests\TestCase;
class DocumentTest extends TestCase
{
public function documentTypeProvider... | true |
c1b38d5ce6c596ad5183bbcee33e2bc4137e7dd0 | PHP | tedslittlerobot/vi | /src/Core/Scopes/PublishingTrait.php | UTF-8 | 1,903 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php namespace Vi\Core\Scopes;
trait PublishingTrait {
/**
* Boot the publishing trait for a model.
*
* @return void
*/
public static function bootPublishingTrait()
{
static::addGlobalScope( new PublishingScope );
}
// ! Actions and Methods
/**
* Publish the model.
*
* @return void
*/
publ... | true |
b1b6f11c4af5454ff1c1d6973f79a94f1329bf68 | PHP | pgdba/ConsoleApplication | /Hnk/ConsoleApplicationBundle/Symfony/TaskHelper.php | UTF-8 | 2,035 | 2.75 | 3 | [] | no_license | <?php
namespace Hnk\ConsoleApplicationBundle\Symfony;
use Hnk\ConsoleApplicationBundle\Helper\RenderHelper;
use Hnk\ConsoleApplicationBundle\Helper\TaskHelper as BaseTaskHelper;
class TaskHelper extends BaseTaskHelper
{
/**
* Renders bundle choice
*
* @param array $bundles
* @param string... | true |
c5934ac93628e227e6db0a9825355b11d3fabe72 | PHP | MasahiroHanawa/online_shop | /src/db/migrations/20180423140703_create_products.php | UTF-8 | 871 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
use Phinx\Migration\AbstractMigration;
class CreateProducts extends AbstractMigration
{
/**
* Migrate Up.
*/
public function up()
{
// create the table
$table = $this->table('products');
$table->addColumn('gross_price', 'integer')
->addColumn('net_price... | true |
6a5e978bc0707b611ff8dfe830ee87f7bb9f1496 | PHP | jontxust0/proyecto_final | /model/butacaModel.php | UTF-8 | 2,775 | 2.796875 | 3 | [] | no_license | <?php
include_once ('butacaClass.php');
include_once ('connect_data.php');
class butacaModel extends butacaClass{
private $link;
private $lista= array();
public function getLista()
{
return $this->lista;
}
public function listaButacas($idCine)
{... | true |
4746191bbba466f1a2ec00e437b41acb7b7149e2 | PHP | glidepro/automatorm | /src/Orm/Traits/ClosureTree.php | UTF-8 | 4,958 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Automatorm\Orm\Traits;
use Automatorm\Database\Query;
use Automatorm\Database\QueryBuilder;
use Automatorm\Orm\Collection;
/**
* Expected closureTable structure:
* Create Table closure (
* id INT NOT NULL AUTO_INCREMENT,
* parent_id INT NOT NULL,
* child_id INT NOT NULL,
* depth INT NOT ... | true |
f5ad1f764732f2cede8c8208a5cba4d3c55e07ab | PHP | Paintras/SyliusRichEditorPlugin | /src/Service/FileUploader.php | UTF-8 | 1,959 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Monsieur Biz' Rich Editor plugin for Sylius.
*
* (c) Monsieur Biz <sylius@monsieurbiz.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace MonsieurBiz\SyliusRich... | true |
61b3e0423baac8e7f81604b2cf5abfc6dc415572 | PHP | dinhbachien/WebQuanLy | /ProjectManagement/app/Http/Controllers/Admin/TaskCrudController.php | UTF-8 | 7,243 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Requests\TaskRequest;
use App\Models\Task;
use App\User;
use Backpack\CRUD\app\Http\Controllers\CrudController;
use Backpack\CRUD\app\Library\CrudPanel\CrudPanelFacade as CRUD;
/**
* Class TaskCrudController
* @package App\Http\Controllers\Admin
* @property... | true |
5bada03ffbd9a1ee2197fa876335908bca35998c | PHP | SafalFrom2050/restaurant-app | /classes/admin/Controllers/CategoryController.php | UTF-8 | 742 | 2.5625 | 3 | [] | no_license | <?php
namespace admin\Controllers;
use admin\Services\CategoryService;
use Models\Category;
class CategoryController {
public $request;
public $view;
private $props;
public function __construct($request)
{
$this->request = $request;
$this->handleRequest();
}
public fun... | true |