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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
03335269263a9dd82c52aecaf0d4446a1946fa91 | PHP | FuJun-Tsai/team-for-me | /sharereport.php | UTF-8 | 1,048 | 2.515625 | 3 | [] | no_license | <?php
$ErrMsg='';
$NO = explode('&',$_REQUEST['val']);
$word = $_REQUEST['word'];
echo($NO[0]);
echo($NO[1]);
try{
require_once('connectbook.php');
if($NO[1]==""){
$sql = "INSERT INTO `article_report`
(ARTICLE_NO ,
ART_REPORT_REASON,
ART_REPORT_TIME,
... | true |
b7f18c121df1a6082a2fd94ba996a8fb05cff736 | PHP | crownbirth/t_wau | /teaching/coursehist.php | UTF-8 | 6,299 | 2.53125 | 3 | [] | no_license | <?php require_once('../Connections/tams.php'); ?>
<?php
if (!isset($_SESSION)) {
session_start();
}
require_once('../param/param.php');
require_once('../functions/function.php');
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue ... | true |
b174b8b8a3024faf1bd89cd27e6c52c9ab5120df | PHP | Lks9172/php_study | /lang/Constants/Systax/index.php | UTF-8 | 293 | 3.140625 | 3 | [] | no_license | <?php
/**
* Define Constants.
*/
// const 변수이름 = 값;
// const CONSTANT = 'Hello, world';
const CONSTANT = [
'message' => 'Hello, world',
];
// define('CONSTANT', 'Hello, world'); -> 레거시 방식의 php const 선언 방식입니다., 기능은 다름
var_dump(CONSTANT); | true |
e08b7bd67fbe05a3660ee9b76e1a19d65071f6ce | PHP | cheng1999/Student-Platform | /functions/storytelling/loadposts.php | UTF-8 | 1,456 | 2.578125 | 3 | [] | no_license | <?php
if(!checklogin()){
exit();
}
include(__DIR__.'/storytelling.class.php');
$load = new Storytelling();
//load only the post from a studentno, this require special operation when load replys of the post, so it run alone here.
if(@$_GET['studentno']){//only load posts of student
@$studentno = intval($_GET[... | true |
897eac63a02d5fedfcb8badac008aa00db9f6a01 | PHP | PrialdeVeloper/planner | /app/models/home/registerModel.php | UTF-8 | 3,886 | 2.796875 | 3 | [] | no_license | <?php
class Model extends Controller{
protected $db;
protected $dbname = 'planner';
protected $qmark;
public function __construct(){
$this->db = new PDO("mysql: host=localhost; dbname=$this->dbname",'root','');
$this->qmark = null;
}
public function updateOneField($table, $field, $whereClause, $... | true |
a93094146b9c1ae1e64b92f5308e721ed2703200 | PHP | dodi73/symfony3-course | /src/AppBundle/Entity/Product.php | UTF-8 | 2,531 | 2.796875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
//Névtér beállítása az Entity útvonalra:
namespace AppBundle\Entity;
//ORM osztály beemelése, állnévvel, az útvonalon az ORM nagybetűs legyen:
use Doctrine\ORM\Mapping as ORM;
//Adatbázis táblák neveinek definiálása annotációkkal, korábban a routing szabályokat és a
//metódusokat is ezzel adtuk meg. product a ... | true |
936a7c1d506550b0986c4a6e213a95e09f9abb19 | PHP | poiz777/flower-shop-management-tool | /src/Entity/Repo/NaviTopRepo.php | UTF-8 | 666 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity\Repo;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\ClassMetadata;
/**
* NaviTopRepo
* Repository Class automatically generated by Poiz Doctrine Mediator.
* You may add additional Methods to your Repository as well...
*... | true |
4792ae893a6db1627aadc3a76da3f932dbc7dadf | PHP | kieuson9x/psi-v2 | /php_action/Product.php | UTF-8 | 617 | 2.96875 | 3 | [] | no_license | <?php
require_once 'core.php';
require_once 'db_connect.php';
class Product
{
private $db;
public function __construct()
{
$this->db = new Database;
}
public function searchProducts($searchParam)
{
$this->db->query('SELECT id, product_code, name, model FROM products
... | true |
8a87f406ff4e5fbe5b5f0d16556252f35a21e4cb | PHP | XCPtools/xchain-cli | /local/Commands/CheckPrimedUTXOs.php | UTF-8 | 1,833 | 2.578125 | 3 | [] | no_license | <?php
namespace XChainCLI\Commands;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Tokenly\XChainClient\Clie... | true |
b75f4ff6aa841d04a2cfe499832da3bf1ce7179b | PHP | daemonu/php-underscore | /src/HigherOrderMessage.php | UTF-8 | 1,006 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the PHP-UNDERSCORE package.
*
* (c) Jitendra Adhikari <jiten.adhikary@gmail.com>
* <https://github.com/adhocore>
*
* Licensed under MIT license.
*/
namespace Ahc\Underscore;
/**
* Source: Laravel HigherOrderProxy.
*
* @link https://github.com/laravel/framework/pull/16267... | true |
b8b380aaf769bd09bdafca749c3fd2e662be2494 | PHP | wujie0919/YKProject | /WebSite/Common/Tools.php | UTF-8 | 618 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Aaron
* Date: 15/5/12
* Time: 上午9:48
* 工具类
*/
class Tools
{
function getCommonId() {
list($t1, $t2) = explode(' ', microtime());
return (float)sprintf('%.0f', (floatval($t1) + floatval($t2)) * 1000);
}
function microtime_format($tag, $time)
... | true |
ab57a2b5b8818cb8d8ddeb1335309a7b9d665baa | PHP | phooty/simulation | /src/Core/PeriodSimulator.php | UTF-8 | 1,046 | 3.109375 | 3 | [] | no_license | <?php
namespace Phooty\Simulation\Core;
use Phooty\Simulation\Match\MatchContainer;
class PeriodSimulator
{
/**
* Has the period sim started
*
* @var boolean
*/
protected $started = false;
/**
* Has the period sim finished
*
* @var boolean
*/
protected $finishe... | true |
94a9ac154750e154f13565029691fe7a6cd3a281 | PHP | adrelliott/leadfarm_v1 | /_backup/_fullbackup_06-02-2013/application/libraries/Infusionsoft.php | UTF-8 | 1,110 | 2.734375 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH') ) exit( 'No direct script access allowed' );
/* Striclty speaking this should probably be a model, but we'll treat it as a Libarary
*
* It loads the iSDK for infusionsoft and allows us to access infusionsoft
*
*
* Then the model inf_model extends this - this allows... | true |
75f5d919b73fe660b42f5c78285388908a67a3f9 | PHP | Sirius360/Capstone | /database/migrations/2020_12_07_003450_create_teams_table.php | UTF-8 | 1,303 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTeamsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('teams', function ... | true |
a29ce885fb6d42d539d8b92d9395ba025410ec6e | PHP | wilfriedkoussouri/jeanforteroche | /_class/Comment.php | UTF-8 | 2,974 | 2.859375 | 3 | [] | no_license | <?php
class Comment
{
public $pseudo;
public $comment;
public $date;
public $chapiter;
public $id;
public $report;
/**
* Comment constructor.
* @param $data
*/
public function __construct($data)
{
$this->pseudo = $data['pseudo'];
$this->comment = $d... | true |
56a08cde0aeffaced937620170d2540cc135e022 | PHP | abin12914/CPMUMS | /app/Repositories/MaterialRepository.php | UTF-8 | 4,199 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\Material;
use Exception;
use App\Exceptions\AppCustomException;
class MaterialRepository
{
public $repositoryCode, $errorCode = 0;
public function __construct()
{
$this->repositoryCode = config('settings.repository_code.MaterialRepository');
}... | true |
3df357188ea0923d3ad3e992b1bf5d138614dadf | PHP | emamulmurshalin/role-permission | /app/Services/Admin/UserService.php | UTF-8 | 2,128 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Admin;
use App\Models\User;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Testing\Fluent\Concerns\Has;
class UserService
{
public function __construct(User $user)
{
$this->model = $user;
}
public function showUsers()
... | true |
e2a1f04893d42c93014c2421faa7e55ad664c71f | PHP | motte/ivynexus | /controllers/members/controller.php | UTF-8 | 9,620 | 2.6875 | 3 | [] | no_license | <?php
class Memberscontroller {
/**
Registry object reference
*/
private $registry;
/**
Quotation model object reference
*/
private $model;
/**
Controller constructor - direct call to false when being embedded via another controller
@param Registry $registry our registry
@param bool $directCall ... | true |
1868089bf1ad341877c8fc0bb9fc96652b5c2b34 | PHP | Sen-i/2020-dec-api | /src/Validators/EmailValidator.php | UTF-8 | 426 | 3.109375 | 3 | [] | no_license | <?php
namespace App\Validators;
class EmailValidator
{
/**
* Ensures valid email
* @param string $email
* @return mixed
* @throws \Exception
*/
public static function validateEmail(string $email)
{
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
... | true |
3f49adf26996ed3e69d0ed68e9dd733db572c85c | PHP | mehmetemirerdem/wisdom-dental | /delete_do.php | UTF-8 | 1,221 | 2.578125 | 3 | [] | no_license | <?php
include "config.php";
if(isset($_SESSION["id"]) && $_SESSION["id"] > 0){
$result = $mysqli -> query("DELETE FROM users WHERE id=".$_SESSION['id']);
if ($result == false)
{
echo("Error description: " . $mysqli -> error);
}
else
{
session_destroy();
... | true |
0e17160ac7a39d1c5faffe3e2e930556a7849434 | PHP | CaNafo/Magacin | /Web servisi/dobijListuPoslovnica.php | UTF-8 | 1,108 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Ca
* Date: 8.1.2020.
* Time: 10.23
*/
require 'Konekcija.php';
include 'ModeliZaWebServise/PoslovnicaModel.php';
if (!isset($_REQUEST['q']))
$result = Konekcija::dajInstancu()->izvrsiUpit(
"SELECT * FROM poslovnica LEFT JOIN grad on poslovnica.GRAD_ID=grad.GRAD... | true |
9e7840bd4fc0d90b299efac46ecd436de73ddec3 | PHP | Cyken-Zeraux/GametrackerJSON | /gametrackajax.php | UTF-8 | 8,027 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
//The MIT License (MIT)
//
//Copyright (c) 2014 Cyken Zeraux aka CZauX
//
//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation files (the "Software"), to deal
//in the Software without restriction, including without limitation the rights
//... | true |
098bf94c8cc03337db64c4fb1a49273f1a736312 | PHP | lksalencar/CodeFlix | /app/Listeners/DeletePayPalWebProfileListener.php | UTF-8 | 886 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace CodeFlix\Listeners;
use CodeFlix\Models\PayPalWebProfile;
use CodeFlix\PayPal\WebProfileClient;
use Prettus\Repository\Events\RepositoryEntityDeleted;
class DeletePayPalWebProfileListener
{
/**
* @var WebProfileClient
*/
private $webProfileClient;
/**
* Create the event li... | true |
0ecae05376329d80349078f058b89ea20ed15034 | PHP | abler98/megakit-laravel-location | /src/Models/Point.php | UTF-8 | 1,483 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace MegaKit\Laravel\Location\Models;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Jsonable;
use JsonSerializable;
use MegaKit\Laravel\Location\Models\Jsonable as JsonableTrait;
class Point implements Arrayable, Jsonable, JsonSerializable
{
use JsonableTrait;
/**
... | true |
d08f6c68476f0ef277260b4944ca1101ea62ccf1 | PHP | rkulik/testing-in-laravel | /tests/Feature/WorkWithTasksTest.php | UTF-8 | 1,088 | 2.546875 | 3 | [] | no_license | <?php
namespace Tests\Feature;
use App\Task;
use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
/**
* Class WorkWithTasksTest
* @package Tests\Feature
*
* @author René Kulik <info@renekulik.de>
*/
class WorkWithTasksTest extends TestCase
{
use DatabaseMigrations;
/**
*
... | true |
1981c30bf906a69d8ac5f45f91f1db3fa76f182f | PHP | fzshsm/background | /modules/statistics/controllers/CurrencyController.php | UTF-8 | 4,953 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\statistics\controllers;
use app\controllers\Controller;
use app\modules\league\api\Match;
use app\modules\statistics\api\Finance;
use app\modules\statistics\api\Game;
use yii\helpers\Json;
/**
* Default controller for the `analyzestatistics` module
*/
class CurrencyController extends Co... | true |
812c3b2a7f889e6f7f3e926b605be2893e1db295 | PHP | thoroc/testing_ground | /src/piwik/Module/MobileMessaging.php | UTF-8 | 3,545 | 2.734375 | 3 | [] | no_license | <?php
namespace Piwik\Module;
use CiscoSystems\PiwikBundle\Connection\Request;
use Piwik\Module\AbstractModule as Base;
/**
* MODULE: MobileMessaging
*
* The MobileMessaging API lets you manage and access all the MobileMessaging
* plugin features including :
* - manage SMS API credential
* - activate phone n... | true |
2361f12b05208a54bf05a8cbf48c22d374a7163a | PHP | IBARTI2019/ibarti | /upload/upload2.php | WINDOWS-1250 | 1,029 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
//comprobamos que sea una peticin ajax
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')
{
//obtenemos el archivo a subir
$nombre = $_GET['nombre'];
$directorio = $_GET['directorio'];
$extension = explode('.',$_FILES['arc... | true |
cc5d82d36d1f80de25de80d0eb5a33439af5734f | PHP | serjjio/utg | /backend/models/Model.php | UTF-8 | 1,270 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "model".
*
* @property integer $idmodel
* @property string $name_model
* @property integer $id_marka
*
* @property Marka $idMarka
*/
class Model extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static fun... | true |
05d797aa3c5dbca2e4497d303cca6f6bce906813 | PHP | mcamara/laravel-localization | /src/Mcamara/LaravelLocalization/LanguageNegotiator.php | UTF-8 | 6,544 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Mcamara\LaravelLocalization;
use Illuminate\Config\Repository;
use Illuminate\Foundation\Application;
use Illuminate\Http\Request;
use Locale;
class LanguageNegotiator
{
/**
* Config repository.
*
* @var \Illuminate\Config\Repository
*/
protected $configRepository;
/... | true |
f05e88aac0a2d05b5a55fc0319642b9eb9800160 | PHP | NgweKyal/dltwdphpbatch1 | /attachform.php | UTF-8 | 1,375 | 2.828125 | 3 | [] | no_license | <?php
if(isset($_POST['upload'])){
if($_SERVER['REQUEST_METHOD']=='POST'){
$attach=$_FILES["attach"];
// var_dump($fruits);
$filename=$attach["name"];
$filetype=$attach["type"];
$filetmpname=$attach["tmp_name"];
$filesize=$attach["size"];
// echo ... | true |
627a13506d65ac565a452685069260bf47a53fc9 | PHP | binggrae/1000size | /core/entities/east/catalog/EquipmentUnit.php | UTF-8 | 1,566 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace core\entities\east\catalog;
use Yii;
/**
* This is the model class for table "east_equipment_unit".
*
* @property int $equipment_id
* @property int $unit_id
*
* @property Equipment $equipment
* @property Unit $unit
*/
class EquipmentUnit extends \yii\db\ActiveRecord
{
/**
* @inheritd... | true |
d5c3274908be538a20754c0b5175da66ac1d8f47 | PHP | 8bitbase/deploy-code | /use-api.php | UTF-8 | 1,141 | 2.640625 | 3 | [] | no_license | <?php
if (isset($_POST)){
$code = $_POST['code'];
$lang = $_POST['lang'];
$token = $_POST['token'];
$ch = curl_init();
$fields = array(
"lang" => $lang,
"code" => $code,
"token" => $token
);
$postvars = '';
foreach(... | true |
a084e535c9e60c20f44cdb6bd1a91a5b94839bc6 | PHP | FlexPress/plugin-cms | /src/FlexPress/Plugins/CMS/Generators/SiteMap.php | UTF-8 | 5,737 | 2.984375 | 3 | [] | no_license | <?php
namespace FlexPress\Plugins\CMS\Generators;
use FlexPress\Components\Hooks\HookableTrait;
class SiteMap
{
use HookableTrait;
// ==================
// ! ACTIONS
// ==================
const GOOGLE_WEBMASTER_TOOLS_URL = "http://www.google.com/webmasters/tools/ping?sitemap=";
const BING_... | true |
854d6dff47af2c2e500946332f6693f47c9cc90f | PHP | venkatagiri/eCom | /admin/orders/show.php | UTF-8 | 2,120 | 2.640625 | 3 | [] | no_license | <?php
require_once("../../core/init.php");
check_login();
if(isset($_POST['save'])) {
$order = Order::find_by_id($_POST['order_id']);
$order->status = $_POST['status'];
if($order->save()) {
$session->message("Order was updated successfully!");
redirect_to("show?id={$order->id}");
}... | true |
73ea12f1a7a2169a57986e4d51fe637a7ce03878 | PHP | nbrabant/lightningbot | /App/Game/Bot/MyBot.php | UTF-8 | 1,608 | 3.078125 | 3 | [] | no_license | <?php
namespace App\Game\Bot;
use App\Client\Response\DirectionsResponse;
use App\Client\Response\InfoResponse;
/**
* Class MyBot
*
* @package App\Game\Bot
*/
class MyBot extends AbstractBot
{
/**
* Cette fonction est appelée une seule fois lors de l'initialisation de la partie
* Elle permet la réc... | true |
6b93b2c0f10bffc5bb4d7bee867d97f635b8c74f | PHP | mohamedAhmed00/algorithm | /www/test/Sorting/QuickSortTest.php | UTF-8 | 366 | 2.84375 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
class QuickSortTest extends TestCase
{
public function testQuickionSort(){
$array = [11,42,16,80,29,21,4,5,1,7,100,88,26];
$quick_sort = new \App\Algorithm\Sorting\QuickSort();
$array = $quick_sort->sort($array,6);
$this->assertSame($array , [1... | true |
cee46337bf9328a384100b6e73e22d6513593125 | PHP | aknadif/Admin-Toko | /view/data.php | UTF-8 | 8,880 | 2.5625 | 3 | [] | no_license | <?php
require '../functions.php';
$barang = query("SELECT * FROM barang");
$query = "SELECT * FROM barang";
$result = mysqli_query($conn, $query);
// Konfigurasi Pagination
// $jumlahDataPerHalaman = 3;
$jumlahData = count(query("SELECT * FROM barang"));
// $jumlahHalaman = ceil($jumlahData/$jumlahDataPerHalam... | true |
b3219510806db9dda09d676aa69f5bd7db42ccac | PHP | joe11093/mooc-server | /get_all_matiere_of_annee.php | UTF-8 | 977 | 2.71875 | 3 | [] | no_license | <?php
require_once __DIR__ . '/db_connect.php';
$db = new DB_CONNECT();
//read input
$body = file_get_contents('php://input');
//obtain associative array from the json
$obj = json_decode($body, true);
$annee_id = $obj["annee_id"];
if(isset($obj["annee_id"])){
//query database for table matiere
//$sqlquery = "SELEC... | true |
e77115cea3eb8b4f97dac3611494e331f6da48f6 | PHP | Anricx/msgsrv-php-extension | /build/msgsrv.php | UTF-8 | 1,924 | 2.78125 | 3 | [] | no_license | <?php
/**
* Open a connection to a MsgSrv
* @param string $host MsgSrv's hostname or ip address
* @param int $port MsgSrv's port
* @param string $appname appname login with
* @param string $username username login with
* @param string $password password for login
* @return resource a MsgSrv link identifier on ... | true |
3a8cd4dbebdfb164a9e2ad2f57afca67c8157649 | PHP | alexismenna/repositorioa | /ejercicios de php/ejercicio7.php | UTF-8 | 183 | 3.453125 | 3 | [] | no_license | <?php
$array = array("rojo", "azul", "amarillo", "verde", "blanco");
foreach ($array as $valor){
$valor = strtoupper ( $valor );
echo "Valor: $valor<br />\n";
}
?>
| true |
1952590f5dd81b1eb35c87668ae64da26af2b289 | PHP | AgnJankowska/BudzetOsobistyMVC | /App/Controllers/Balance.php | UTF-8 | 2,056 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controllers;
use \Core\View;
use \App\Auth;
use \App\Flash;
use \App\Models\Expenses;
use \App\Models\Incomes;
class Balance extends Authenticated {
protected $range;
protected $showed;
protected function before() {
parent::before();
$this->range = false;
}
protected function setExp... | true |
20fbf435f849f09b95f042f865e7923a03c28074 | PHP | ren06/directhomecare | /protected/models/client/ServiceUser.php | UTF-8 | 16,362 | 2.65625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "tbl_service_user".
*
* The followings are the available columns in table 'tbl_service_user':
* @property integer $id
* @property string $first_name
* @property string $last_name
* @property string $date_birth
* @property integer $gender
* @property string $note
... | true |
28f6ff8a3373114e97f058aac75dfb03fb10d874 | PHP | am-artemis/annuaire-api | /app/Http/Controllers/UserResponsibilityController.php | UTF-8 | 2,461 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\User;
use App\Models\Responsibility;
use Dingo\Api\Contract\Http\Request;
use App\Http\Requests\UserResponsibilityStoreRequest;
use App\Http\Requests\UserResponsibilityUpdateRequest;
class UserResponsibilityController extends Controller
{
/**
* List of re... | true |
9782233a0dd6a731cd07dad36f58672fde308909 | PHP | Makraiyassin/PHP-Challenge | /conditions-array/array.php | UTF-8 | 1,289 | 3.109375 | 3 | [] | no_license |
<?php
$me = array (
'age' => 45 ,
'firstname' => 'Alexandre' ,
'lastname' => 'Plennevaux' ,
'favourite_movies' => array('My Own Private Idaho', 'Her', 'Matrix')
);
echo '<pre>' ;
print_r ( $me );
echo '</pre>' ;
print_r ( $m... | true |
0ca4ce27402063fcf4913e1b5c623bb08032b6b8 | PHP | jgable/chassis | /app/Harlo/Page/Creator.php | UTF-8 | 501 | 2.75 | 3 | [] | no_license | <?php namespace Harlo\Page;
use Validator;
use Page;
class Creator {
protected $listener;
public function __construct($listener)
{
$this->listener = $listener;
}
public function create($input)
{
$validation = Validator::make($input, Page::$rules);
if ($validation->fails())
{
... | true |
293be05d3722ede5be2a5274446dda8b2b107ea9 | PHP | omashaTech/e-commerce | /administration/application/models/Medicine_Model.php | UTF-8 | 4,814 | 2.53125 | 3 | [] | no_license | <?php
class Medicine_Model extends MY_Model {
function __construct() {
parent::__construct();
$this->table = 'store_medicines';
$this->prefix = 'medicine_';
$this->result['success'] = 0;
}
function _MedicineRecordCount()
{
return $this->db->count_all($this->... | true |
958d368d298569b134f9f980d817d71d971ba80e | PHP | kouxh/Magazine | /app/Model/CartModel.php | UTF-8 | 2,474 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
/**
* @购物车模型层
* Class CartModel
* @package App\Model
*/
class CartModel extends Model
{
const TABLE_NAME = 'mz_cart';
protected $table = self::TABLE_NAME;
public $timestamps = false;
/**
* @购物车列表
* @param $uid
* @r... | true |
bc9e92af65cfe71ac30fef34cfa80ef4abc53e29 | PHP | rahulyhg/liga-manager-api | /src/Domain/Event/SeasonCreated.php | UTF-8 | 273 | 2.625 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace HexagonalPlayground\Domain\Event;
class SeasonCreated extends Event
{
public static function create(string $seasonId): self
{
return self::createFromPayload([
'seasonId' => $seasonId
]);
}
} | true |
8c1b83a8d21c85fd5bb8807b3d1a61b37de3856c | PHP | chrisrebacz/lighthouse-framework | /src/Registries/ApiRouteRegistry.php | UTF-8 | 5,321 | 2.671875 | 3 | [] | no_license | <?php
namespace Lighthouse\Registries;
use Lighthouse\Routing\Api\AcfController;
use Lighthouse\Routing\Api\AcfTermController;
use Lighthouse\Routing\Api\AcfOptionController;
use Lighthouse\Routing\Api\AcfAttachmentController;
/*
|----------------------------------------------------------------
| Route Registry
|---... | true |
4e7fb1aceaf9e4677e9e03f9485ef1d7b92540dc | PHP | jhayrsolomon/marubiella | /frontend/modules/models/Refbrgy.php | UTF-8 | 1,230 | 2.59375 | 3 | [] | no_license | <?php
namespace frontend\modules\models;
use Yii;
/**
* This is the model class for table "refbrgy".
*
* @property int $id
* @property string|null $brgyCode
* @property string|null $brgyDesc
* @property string|null $regCode
* @property string|null $provCode
* @property string|null $citymunCode
*/
class Refb... | true |
99b1393052fdc2e3e7453f5fef0cc57d93926bbb | PHP | NemSt/Framework_Grafikart_Test | /src/Framework/App.php | UTF-8 | 3,522 | 3.015625 | 3 | [] | no_license | <?php
namespace Framework;
//use DI\ContainerBuilder;
use GuzzleHttp\Psr7\Response;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
//code sniffer pour détecter d'autres anomalies : "composer require squizlabs/php_codesniffer"
//git
class App... | true |
28c392855bcf042e0c548659f0fecaa4165bdabb | PHP | aliharrath/Librairie_Bousslama | /imen/admin/views/login.php | UTF-8 | 2,277 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: imen
* Date: 3/23/2018
* Time: 11:12 PM
*/
session_start();
include_once '../config.php';
class utilisateur
{
private $id;
protected $mdp;
/**
* utilisateur constructor.
* @param $nom
* @param $prenom
* @param $dateNa... | true |
ecd57a40f9c0f4a3e41a8b0177537a6d7bbc8fb0 | PHP | pi-engine/pi | /lib/Pi/Application/Service/ImageProcessing.php | UTF-8 | 13,602 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Smart image resizing (and manipulation) by url module for Laminas Framework 2
*
* @link http://github.com/tck/zf2-imageresizer for the canonical source repository
* @copyright Copyright (c) 2014 Tobias Knab
*
* For the full copyright and license information, please view the LICENSE.txt
* file th... | true |
9bb0a0a21e59763ff74099a3d540181ca033f031 | PHP | studioatual/slim4 | /app/Auth/Jwt.php | UTF-8 | 3,299 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace StudioAtual\Auth;
class Jwt
{
private $domain;
private $key;
private $fields;
private $model;
private $bucket;
private $user;
public function __construct($domain, $key, $fields, $model, $bucket)
{
$this->domain = $domain;
$this->key = $key;
$thi... | true |
f904e4ea719fc7ec31991e9da854cd7f4c57388f | PHP | spatzschke/padcon-leipzig-media | /post_file.php | UTF-8 | 2,520 | 2.703125 | 3 | [] | no_license | <?php
include('SimpleImage.php');
$image = new SimpleImage();
// If you want to ignore the uploaded files,
// set $demo_mode to true;
$demo_mode = false;
$upload_dir = 'uploads/';
$allowed_ext = array('jpg','jpeg','png','gif','pdf');
$image_ext = array('jpg','jpeg','png','gif');
$pdf_ext = array('pdf');
//$... | true |
e1ca123a152b5d372f421d276402597ed710c6cc | PHP | wushiyun/xinxintong | /models/matter/enroll.php | UTF-8 | 6,508 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace matter;
require_once dirname(__FILE__) . '/app_base.php';
/**
*
*/
class enroll_model extends app_base {
/**
*
*/
protected function table() {
return 'xxt_enroll';
}
/**
*
*/
public function getTypeName() {
return 'enroll';
}
/**
* @param string $ver 为了兼容老版本,迁移后应该去掉
*/
public ... | true |
c4cf873aa94e8738d9d190eb12f11f6cd1c2484f | PHP | umutbaris/hex-to-rgba | /tests/test.php | UTF-8 | 1,525 | 2.828125 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
/**
* Class IncludeMehodClass
*/
class Test extends TestCase
{
/**
* @test
*/
public function threeDigitWithDash()
{
$class = new IncludeMehodClass();
$hex = '#FFF';
$alpha = 0.3;
$result = $class->convertHexToRgba($hex, $alpha);
$this->assertEquals('rgba(255,25... | true |
d6636b999d976f343b39051bf378fafa8cbf0a86 | PHP | dealroadshow/k8s-resources | /src/Data/ComponentCondition.php | UTF-8 | 1,488 | 3.125 | 3 | [] | no_license | <?php
namespace Dealroadshow\K8S\Data;
use JsonSerializable;
/**
* Information about the condition of a component.
*/
class ComponentCondition implements JsonSerializable
{
/**
* Condition error code for a component. For example, a health check error code.
*/
private string|null $error = null;
... | true |
48d3f8e4c70d9902c17e86ceca0477f4ca00f868 | PHP | DomixEngineer/DomixoweDev | /app/Helpers/translator.php | UTF-8 | 2,016 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
use App\Http\Controllers\TranslatorController;
use App\Http\Controllers\LanguageController;
// Funkcja do tłumaczenia na podstawie klucza translacyjnego
function translate($translateKey)
{
$langController = new LanguageController;
$lang = determinateBrowserLang();
$f... | true |
b594591c231dfa9babb9a875286a5fccf89ddf58 | PHP | danapaduraru/TW-project | /database/plants-florin.php | UTF-8 | 8,719 | 2.703125 | 3 | [] | no_license | <?php
require_once('../models/Connection.php');
function insertPlant($url, $name, $family, $collection, $collector, $location) {
$connection = Connection::Instance();
// Select Database
mysqli_select_db($connection, 'planty');
// Get image from URL
$imageData = file_get_contents($url);
... | true |
b37f45129df1b54601b12a937cbf4e133a547fe7 | PHP | RodrigoBalabasquer/TP_LAV4_2017 | /apirest/apirestV6-JWT-MW-POO/clases/Juego.php | UTF-8 | 2,669 | 2.9375 | 3 | [] | no_license | <?php
class Juego
{
public $id;
public $jugador;
public $juego;
public $resultado;
/*public static function TraerTodoLosUsuarios()
{
$objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso();
$consulta =$objetoAccesoDato->RetornarConsulta("select * from usuarios");
$consulta->execute();
... | true |
f503e3e925a044d1de6c7a2f63f59564c20ec020 | PHP | FreezyBee/Editrouble | /src/Storage/BaseStorage.php | UTF-8 | 1,275 | 2.734375 | 3 | [] | no_license | <?php
namespace FreezyBee\Editrouble\Storage;
use Nette\Caching\Cache;
use Nette\Caching\IStorage;
use Nette\SmartObject;
use stdClass;
abstract class BaseStorage
{
use SmartObject;
protected Cache $cache;
/** @var mixed[] */
protected array $loadedData;
public function __construct(IStorage $c... | true |
3d593a89276777e69972870d12d78215df2ce761 | PHP | ssyunyun/chatapp-lara | /app/Http/Controllers/GroupController.php | UTF-8 | 5,307 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class GroupController extends Controller
{
/*========== 新規グループ作成処理 ==========*/
public function createGroup(Request $request) {
//bodyから情報を取得
$body = $request->all();
... | true |
ea0e70f3039bc2b5b5f77f258e3d6745d5a197bf | PHP | ipunkt/laravel-indexer-service | /app/Http/Api/Items/ItemsRequestHandler.php | UTF-8 | 3,645 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Ipunkt\LaravelIndexer\Http\Api\Items;
use Carbon\Carbon;
use Illuminate\Contracts\Cache\Repository;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Validation\ValidationException;
use Ipunkt\LaravelIndexer\EnvironmentValidation;
use Ipunkt\LaravelIndexer\Jobs\Items\CreateItem;
use Ipunkt\Larave... | true |
dc77e5a3ce915ad3ea53454f33f15a1a339ef159 | PHP | athh/tarea | /tarea/app/src/States.php | UTF-8 | 461 | 2.953125 | 3 | [] | no_license | <?php
//Connectio class
require_once("../../app/src/Connection.php");
//States class
class States extends Connection{
// object properties
var $id_state;
var $state;
/*function __construct($id_state, $state)
{
$this->id_state = $id_state;
$this->state = $state;
}*/
... | true |
776e38ffa8dd0ddec53867f09916c08bea8f9d30 | PHP | cntabana/charisma | /charisma/protected/models/MembersAjax.php | UTF-8 | 5,433 | 2.546875 | 3 | [] | no_license | <?php
/**
* This is the model class for table "members".
*
* The followings are the available columns in table 'members':
* @property integer $id
* @property string $cardnumber
* @property string $firstname
* @property string $middlename
* @property string $lastname
* @property string $issuedate
* @property ... | true |
e53e6d8c27472915fdc333f91c55a039a9048f11 | PHP | randomness/trackstat | /smarty_plugins/modifier.wordify_seconds.php | UTF-8 | 1,338 | 3.421875 | 3 | [] | no_license | <?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* Smarty count_characters modifier plugin
*
* Type: modifier<br>
* Name: wordify_seconds<br>
* Purpose: turns seconds to something like "about 10 minutes ago"
* @param integer
* @return string
*/
function smarty_modifier_wor... | true |
8b290f1ad6b650c4860f2117bbbc065ff063a194 | PHP | DaDaDa12138/TRU-Q-A | /w12_model_student.php | UTF-8 | 2,233 | 2.84375 | 3 | [] | no_license | <?php
$conn = mysqli_connect('localhost', 'zwan', 'wzy258852', 'COMP3540_zwan');
function insert_new_user($username, $password, $email)
{
global $conn;
if (does_exist($username))
return false;
else {
$current_date = date('Ymd');
$hashed_password = sha1($password);
$sql ... | true |
5130a12985e4cacf842a988bbdbe7f55bfb84f64 | PHP | wojciechgawronski/make_it_simple | /oop/dziedzyczenie_refactor_kompozycja.php | UTF-8 | 1,314 | 3.328125 | 3 | [] | no_license | <?php
/**
* INTERFEJSY OKREŚLĄ JAKIE ZACHOWANIA będzie posiadał nasz obiekt.
* KOMPOZYCJA nadejdzie;)
*
* Uciekamy od sztywnej struktury dziedziczenia na rzecz elastycznosci
* Nnikniemy sztywnej (złożonej, WIELOPOZIOMIWEJ) struktury powiązań między klasami
*
* W klasach dziedziczących co prawda można nadpisywać... | true |
66624860b3b0d4b0f7cc589ae5346a4405db88ab | PHP | GordonChen13/learn-examples | /php/advance/task_multi_process.php | UTF-8 | 2,821 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
// 设置umask为0,使当前进程创建的文件权限为777
umask(0);
$pid = pcntl_fork();
if ($pid < 0) {
exit('fork error.');
} else if ($pid > 0) {
// 主进程退出
exit();
}
// 子进程继续执行
// 最关键的一步,执行setsid函数
/**
* http://linux.die.net/man/2/setsid
[setsid详解][1] 主要目的脱离终端控制,自立门户。
创建一个新的会话,而且让这个pid统治这个会话,他既是会话组长,也是进程组长。
而且谁也没法控制这个会话,除了这个... | true |
9c38dd986be4d2fdaeed0cfa1fd166611da33cb9 | PHP | mollie/partner-demo | /laravel/app/Services/Mollie/StatusService.php | UTF-8 | 1,526 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace App\Services\Mollie;
use App\Exceptions\UserNotConnectedToMollie;
use App\OnboardingStatus;
use App\Repositories\MollieAccessTokenRepository;
use App\User;
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
use Mollie\Api\Exceptions\ApiException;
use Mollie... | true |
3382fd289bacc7ef4f8aa16eca87593e1ccfecc6 | PHP | harvard-library/acorn | /application/default/models/dao/records/AutotextDAO.php | UTF-8 | 7,980 | 2.515625 | 3 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | <?php
/**
* Copyright 2016 The President and Fellows of Harvard College
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... | true |
fd982ca861b3e5ec4866906198252119789d7280 | PHP | rashadrussell/UIUC_WebMonkeys_Website | /plugins/event-organiser/includes/event-organiser-event-functions.php | UTF-8 | 20,514 | 3.046875 | 3 | [] | no_license | <?php
/**
* Event related functions
*/
/**
* Retrieve list of event matching criteria.
* The defaults are as follows:
* 'numberposts' - default is - 1 (all events)
* 'orderby' - default is 'eventstart'
* 'showpastevents' - default is set in Event Organiser settings
* Other defaults are set by WordPress
*
* The functi... | true |
658852f703a76e49ac43c500017a3788453711aa | PHP | chrooter/delivery | /app/controllers/LoginController.php | UTF-8 | 1,055 | 2.515625 | 3 | [] | no_license | <?php
use Phalcon\Session\Adapter\Files as Session;
$di->setShared('session', function () {
$session = new Session();
$session->start();
return $session;
});
class LoginController extends \Phalcon\Mvc\Controller
{
public function indexAction()
{
}
public funct... | true |
a2659a9f4515962a4018523c342faa68157c6668 | PHP | bhaswanth53/locus | /Helpers/File.php | UTF-8 | 1,182 | 2.890625 | 3 | [] | no_license | <?php
namespace Helpers;
class File
{
public $file;
public $path;
public $name;
public function __construct($file)
{
$this->file = $file;
}
public function upload()
{
$file_name = $this->file['name'];
... | true |
f6a9a4ada02f812d4b76b0a1f50abd663e659bc1 | PHP | reippurt/marketplace | /application/libraries/Custom.php | UTF-8 | 7,164 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
Class Custom
{
public function __construct()
{
$this->CI =& get_instance();
}
public function loggedIn()
{
$CI->load->library('session');
if($CI->session->userdata('loggedIn'))
{
return true;
}
else
{
return false;... | true |
2a6854a5deca6f7676320d24407d7bc7789989a5 | PHP | RomanN44/DML_operations | /SqlWhere.php | UTF-8 | 369 | 2.703125 | 3 | [] | no_license | <?php
namespace RomanN44\DML_instructions;
interface SqlWhere
{
/**
* создает where-конструкцию
*
* @param array $condition
* @param string $operator
* @return $this
*/
public function where(array $condition);
public function andWhere(array $condition);
public functio... | true |
d36f889a3062f0bd52a146f0427e003d3f222f38 | PHP | Andrey9300/ufsin | /src/AppBundle/Repository/LichnyiSostavRepository.php | UTF-8 | 2,509 | 2.625 | 3 | [] | no_license | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AppBundle\Repository;
use Doctrine\ORM\EntityRepository;
/**
* This c... | true |
041c0efa9098edb9d1a504956215bd1a0056717c | PHP | rodnyco/vk-test | /App/View/InformationView.php | UTF-8 | 1,708 | 3.375 | 3 | [] | no_license | <?php
namespace App\View;
use App\Model\Game;
use App\Model\Person;
class InformationView
{
private Game $game;
private Person $person;
public function __construct(Game $game)
{
$this->game = $game;
$this->person = $game->getPerson();
}
public function displayView(): void
... | true |
25e6544ec1c4a41f3edf49aeb9f1ef02eb4aa17d | PHP | lchrusciel/CqsExample | /spec/Application/Command/ChangeCustomerEmailSpec.php | UTF-8 | 696 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace spec\App\Application\Command;
use App\Application\Exception\MalformedEmailException;
use PhpSpec\ObjectBehavior;
final class ChangeCustomerEmailSpec extends ObjectBehavior
{
function it_represents_immutable_intention_of_changing_customers_email(): void
{
$thi... | true |
808a8041a7f956759d80d9e7af0785e2d29e84d9 | PHP | jschlies/sample_code | /app/Console/Commands/WPListenCommand.php | UTF-8 | 5,005 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Waypoint\Console\Commands;
use App;
use App\Waypoint\Command;
use App\Waypoint\Exceptions\QueueException;
use Symfony\Component\Process\PhpExecutableFinder;
use Symfony\Component\Process\ProcessUtils;
/**
* Class ClientSeederCommand
* @package App\Console\Commands
*
* See https://laravel.com/... | true |
0978cca4895a7b7a54eb7e4b19fee1487500a12f | PHP | RodrigoAngeloValentini/slimphp-api-skeleton | /src/Api/Empresa/EmpresaController.php | UTF-8 | 670 | 2.65625 | 3 | [] | no_license | <?php
namespace Api\Empresa;
use Interop\Container\ContainerInterface;
class EmpresaController{
protected $ci;
//Constructor
public function __construct(ContainerInterface $ci) {
$this->ci = $ci;
}
public function index($request, $response, $args){
$pdo = $this->ci->get('pdo');... | true |
32bb4f04f847618d42497b89d24ad7029e12543b | PHP | dermatthes/esi-php | /src/Template/DocumentNode.php | UTF-8 | 1,147 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: matthes
* Date: 11/7/17
* Time: 11:20 PM
*/
namespace Esi\Template;
use Esi\Logic\Asset\RelativePathOutputFilter;
use Esi\Logic\Content\DefaultDocumentLogic;
use Esi\Logic\EsiLogic;
class DocumentNode extends TagNode
{
private $templateEnv;
public function _... | true |
3b88fcaa00ddd44de3baa0addf6bb5b1efcfdac5 | PHP | salmaChaeib/GestionReclamation | /Views/FrontOffice/NiceAdmin/cores/config.php | UTF-8 | 312 | 2.65625 | 3 | [] | no_license | <?php
class config
{
private static $bdd=NULL;
public static function getConnexion()
{
if(!isset($bdd))
try
{
$bdd =new PDO('mysql:host=localhost;dbname=baseprojet;charset=utf8','root','');
}
catch(Exception $e)
{
die('erreur:'.$e->getMessage());
}
return $bdd;
}
}
?> | true |
42dec1ff4bd89a4d41b2a2fe2e29dbb14842ecea | PHP | YukiMinemura/TECH-BASE | /mission_5-1_up.php | UTF-8 | 4,731 | 3.015625 | 3 | [] | no_license | <?php
//4-1データベース連携
$dsn ='データベース名';
$user = 'ユーザー名';
$password = 'パスワード';
$pdo = new PDO($dsn, $user, $password, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING));
//4-2テーブル作成
$sql = "CREATE TABLE IF NOT EXISTS mission_5"
." ("
."id INT AUTO_INCREMENT PRIMARY KEY,"
."name char(32),"
."comme... | true |
3e248eceb77b73adbb138f3ccbea51d5b15bf98e | PHP | DorriRaq/COP4331SmallProject | /LAMPAPI/register.php | UTF-8 | 940 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
$inData = getRequestInfo();
$firstName = $inData["registerFirst"];
$lastName = $inData["registerLast"];
$login = $inData["registerName"];
$password = $inData["registerPassword"];
$conn = new mysqli("localhost", "Team21", "COP433121Team", "COP4331");
if ($conn->connect_error)
{
returnWithError($co... | true |
3c86f62403dc6420749741b19dfbe6a18b8c1548 | PHP | connortakata/teamsource | /ProjectManagement/phpVersion(WIP)/functions/resourcesFunctions.php | UTF-8 | 2,054 | 2.78125 | 3 | [] | no_license | <?php
function getUsedStorageSpace($teamID)
{
$fileID = getTeamSubId($teamID,"FILE");
$con = mysqli_connect("localhost", "root", "TeamSource1!", "teamsource");
$sql = "SELECT FILE_SIZE FROM FILE WHERE FILE_FILE_MANAGER_ID='$fileID'";
$result = mysqli_query($con,$sql);
$fileSize=0;
while($row = m... | true |
f57e01e19a1798fd94ca74dda00d726c95b26f2a | PHP | dongshenyun/555 | /config/fyclass.php | UTF-8 | 2,461 | 2.71875 | 3 | [] | no_license | <?php
class Page{
protected $number;
protected $totalcount;
protected $page;
protected $totalpage;
public $url;
//public $limit;
public function __construct($number,$totalcount)
{
$this->number=$number;
$this->totalcount=$totalcount;
$this->totalpage=$this->gettotalpage();
$this->page=$this->getpage();
$this->url=$this... | true |
7837b1607df186e9d4ef670755717230014c614f | PHP | BC3015/OA | /app/Admin/Controllers/WeekController.php | UTF-8 | 4,955 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Admin\Controllers;
use App\Models\Week;
use App\Models\User;
use App\Http\Controllers\Controller;
use Encore\Admin\Controllers\Dashboard;
use Encore\Admin\Layout\Column;
use Encore\Admin\Layout\Content;
use Encore\Admin\Layout\Row;
use Encore\Admin\Grid;
use Encore\Admin\Form;
use Encore\Admin\Sho... | true |
36b7e62ba2a531b2f445d0271bcc835cd9e9c204 | PHP | Elenaaab/phpmvc | /app/models/CoreModel.php | UTF-8 | 643 | 2.9375 | 3 | [] | no_license | <?php
namespace app\models;
class CoreModel {
protected $id;
protected $name;
protected $created_at;
protected $updated_at;
/**
* Get the value of id
*/
public function getId()
{
return $this->id;
}
/**
* Get the value of name
*/
public functio... | true |
787c3ddb686e25aa44c898db48064abf5381c80d | PHP | laaksomavrick/hugelifts-deprecated | /database/migrations/2018_06_04_145546_create_routines_table.php | UTF-8 | 2,870 | 2.734375 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRoutinesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('routines', fun... | true |
0e1558d5b33bf162e8bc0387f205f1ea1c2f243f | PHP | KnpLabs/php-json-schema | /src/Collection.php | UTF-8 | 696 | 3.03125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace KnpLabs\JsonSchema;
use Exception;
final class Collection
{
/**
* @param iterable<JsonSchemaInterface<mixed>> $schemas
*/
public function __construct(private iterable $schemas)
{
}
/**
* @template J of JsonSchemaInterface
*
* @pa... | true |
e08a4482083f2f3fa880e61a39ec66377b1631d1 | PHP | YMindY/YMBrilliantMenu | /src/ymind/xming/YMBrilliantMenu/Func/Sign/SignData.php | UTF-8 | 2,348 | 2.625 | 3 | [] | no_license | <?php
/* 签到数据控制及签到响应 */
namespace ymind\xming\YMBrilliantMenu\Func\Sign;
use ymind\xming\YMBrilliantMenu\BaseResponser;
use ymind\xming\YMBrilliantMenu\Func\ID;
use pocketmine\utils\Config;
class SignData extends BaseResponser
{
private static $config,$players;
public function __construct()
{
@mkdir(self::get... | true |
14327d7e373ad517cc490bf4f29aaa3f0dd9411a | PHP | anytitleyoulike/praquerumo | /application/helpers/lr_helper.php | UTF-8 | 529 | 2.609375 | 3 | [] | no_license | <?php
function getMessageErrorByLR($lr) {
switch ($lr) {
case '05':
$message = "Transação não autorizada!";
break;
case '06':
$message = "Tente novamente!";
break;
case '12':
$message = "Transação inválida!";
break;
case '51':
$message = "Saldo Insuficiente! Consulte a sua operadora do ca... | true |
980453187721e94626931e1e9370a77d09dfc950 | PHP | smallzee/online-bookshop | /app/User.php | UTF-8 | 1,798 | 2.578125 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
p... | true |
d65498c6667552e28a74dd09fb00e337988b9672 | PHP | AbuzarAkbari/SWEN | /model/ArrayHelper.php | UTF-8 | 2,213 | 3.625 | 4 | [
"MIT"
] | permissive | <?php
/**
* a class with array methods
*
* @category Helper
* @author Leon in 't Veld <leon3110l@gmail.com>
*/
class ArrayHelper {
/**
* checks if something is an associative array
*
* @param array $array the array you want to check
* @return boolean if its assoc or not
*/... | true |
04172d7f0eb4fb14f812ad556d7606de335f5e58 | PHP | matthewslouismarie/AuPaysDesDelicesShop | /functions/generate-query-arguments.php | UTF-8 | 1,648 | 2.53125 | 3 | [] | no_license | <?php
function generate_query_arguments( int $os_posts_per_page, int $paged ): array {
$args = array(
'orderby' => 'position',
'order' => 'DESC',
'posts_per_page' => $os_posts_per_page,
'paged' => $paged,
'tax_query' => array()
);
// Filter selected categories
if ( osetin_get_fi... | true |
2889422c2e80f14d3a9880c31bc2fa7d924345f6 | PHP | shiyake/myTestSite.dev | /vecktor_OOP/models/VecktorVersion3.php | UTF-8 | 2,475 | 3.21875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ivan
* Date: 10.06.15
* Time: 13:03
*/
class VecktorVersion3 extends Vecktor{
public function __construct()
{
// Вызов родительского конструктора
parent::__construct();
// Проход по всем департаментам
foreach($this->allDepartments ... | true |
1f74160d4b74fd803a34683071cfa033b2915556 | PHP | programacion1urq/probando_pdo | /Ciclista.php | UTF-8 | 720 | 3.65625 | 4 | [] | no_license | <?php
class Ciclista
{
private $numero;
private $nombre;
private $edad;
private $equipo;
public function __construct($num, $nom, $ed, $eq)
{
$this->numero = $num;
$this->nombre = $nom;
$this->edad = $ed;
$this->equipo = $eq;
}
public function __toSt... | true |