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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b0b91e0c3401bffd64e9c93575c6f9fadc870a69 | PHP | icaroperetti/ToDoList | /ToDoList/src/dao/usuarioDAO.php | UTF-8 | 1,139 | 2.953125 | 3 | [] | no_license | <?php
namespace App\dao;
use App\utils\ConnectionFactory;
use \PDO;
class usuarioDAO{
public static function create($nome,$email,$hashed_password){
$con = ConnectionFactory::getConnection();
$stmt = $con->prepare("INSERT INTO usuarios (nome,email,senha) VALUES (:... | true |
bed27624e8c28024722ba1eacfe30d1712815163 | PHP | phitien/ico-solution | /core/Log.php | UTF-8 | 1,025 | 2.703125 | 3 | [] | no_license | <?php
class Log {
public static function out($o,$section=null) {
if (!DEBUG) return;
if ($o instanceof Model) return Session::log($o->output,$section);
if (!$o instanceof Exception) return Session::log($o,$section);
Session::log('Error:'.$o->getMessage(),$section);
Session::log('ErrorType:'.get_class($o),$se... | true |
f7f42db90ef408048617fdc5beffd312bf95b26e | PHP | 7ioco/timesheet | /database/migrations/2018_04_26_054903_create_timesheet_details_table.php | UTF-8 | 948 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTimesheetDetailsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('timesh... | true |
905d67bc6271258dd26dadfb83d4fe7fa4caa9f7 | PHP | barthicus/jsonapi | /src/Converter/Parameter/Type/Filters.php | UTF-8 | 1,695 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Bolt\Extension\Bolt\JsonApi\Converter\Parameter\Type;
use Bolt\Extension\Bolt\JsonApi\Exception\ApiInvalidRequestException;
/**
* Class Filters
*
* @package Bolt\Extension\Bolt\JsonApi\Converter\Parameter\Type
*/
class Filters extends AbstractParameter
{
/** @var array $filters */
protect... | true |
73fe8b1b56fd55c796a8ae83473d3a83c16cfa83 | PHP | testomat/terminal-colour | /src/Contract/WrappableFormatter.php | UTF-8 | 543 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* Copyright (c) 2020 Daniel Bannert
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/testomat/terminal-colour
*/
namespace Testomat\TerminalColour\Contract;
interfac... | true |
709a63e460a41261b6a558acc039f2ff59cc3c6e | PHP | rem42/pec | /src/AppBundle/Entity/UserCategory.php | UTF-8 | 616 | 2.71875 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
class UserCategory {
protected $id;
protected $name;
// Mapping
protected $users;
function __construct()
{
}
public function getId()
{
return $this->id;
}
public function setId($id)
{
$this->id = $id;
}
pu... | true |
37d9459bccc8416b2d37ee06279a711b20bd1a1f | PHP | Lasynsec/mysportdating | /lib/MYFram/BackController.php | UTF-8 | 2,741 | 3.296875 | 3 | [] | no_license | <?php
namespace MYFram;
/**
* Classe est une classe de base dont héritera chaque contrôleur
* Elle executera l'action appropriée.
*
*/
abstract class BackController extends ApplicationComponent
{
protected $action = ''; // l'action à executer
protected $module = ''; // modifier le module associée au controleu... | true |
ac9beff7dfbbf516a51a2b36ca4b90468370fd1c | PHP | vatsal522/CodetoShare | /Web Development-PHP and HTML/18.php | UTF-8 | 691 | 2.921875 | 3 | [] | no_license | <?php
$conn = mysqli_connect("localhost","root","","pracs");
if($conn->connect_error){
die("Connection error");
}
if(isset($_POST['name'])){
$sql = "SELECT * FROM details WHERE name='".$_POST['name']."'";
$result = $conn->query($sql);
if($result->num_rows > 0){
while($row = $result->fetch_assoc()){
e... | true |
c984c42250695e6b46480890ac231c8f225f8d13 | PHP | gallu/CareerCollege | /GameServer/2023/Period12/if.php | UTF-8 | 228 | 3.53125 | 4 | [] | no_license | <?php // if.php
if (true) {
echo "into true <br> \n";
}
if (false) {
echo "into false <br> \n";
}
if (1 === 1) {
echo "into 1 === 1 <br> \n";
}
if (1 === 2) {
echo "into 1 === 2 <br> \n";
}
| true |
713edf990e355488c05d4daaef630af85e0aede2 | PHP | andreftavares88/Fscore | /Fscore/api/managers_games_clashes/create.php | UTF-8 | 4,433 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
// Carregar configurações
require_once '../../config.php';
$pdo = connectDB($db_web);
// Carregar classe
require_once '../../objects/Managers_Games_Clashes.php';
$managers_games_clashes = new Managers_Games_Clashes($pdo);
// Definição do cabeçalho
header("Access-Control-Allow-Origin: *");
header("Content-Type: ... | true |
4315e74194ff9701588d6b8a2ee685278242d48f | PHP | vrajroham/php-klarna | /src/Actions/ManageCustomerTokens.php | UTF-8 | 576 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Vrajroham\PhpKlarna\Actions;
use Vrajroham\PhpKlarna\Resources\CustomerToken;
use Vrajroham\PhpKlarna\Resources\Order;
trait ManageCustomerTokens
{
public function customerToken(string $customerToken)
{
$token = $this->get("customer-token/v1/tokens/{$customerToken}");
return ... | true |
c6dc69b35931661d07f499ec026d74b8ae086ba2 | PHP | binita266/projectphp | /root/views/login-register/userProfile.php | UTF-8 | 5,402 | 2.734375 | 3 | [] | no_license | <?php
include "../header.php";
require_once '../../model/Database.php';
require_once '../../model/User.php';
require_once '../../model/Product.php';
require_once '../../model/Deal.php';
//waiting for getting id of user when click a user in listuser.php
session_start();
if(isset($_SESSION['id'])){
$userid = $... | true |
04b5a25e4a3ad06eb2118406a2986501072f5ffa | PHP | Donny5300/modulair-router | /src/Controllers/System/AppMethodsController.php | UTF-8 | 2,592 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php namespace Donny5300\ModulairRouter\Controllers\System;
use Donny5300\ModulairRouter\Models\AppController;
use Donny5300\ModulairRouter\Models\AppMethod;
use Donny5300\ModulairRouter\Requests\StoreMethodRequest;
use Donny5300\ModulairRouter\Requests\UpdateMethodRequest;
/**
* Class AppControllersController
*
... | true |
3cc164090f356ebe7f6f2e25241062cf4bc14b78 | PHP | charles-owen/review-cl | /src/Review/ReviewApi.php | UTF-8 | 29,116 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @file
* API Resource for /api/review
*/
namespace CL\Review;
use CL\Course\Submission\Submissions;
use CL\Site\Api\JsonAPI;
use CL\Site\Site;
use CL\Site\System\Server;
use CL\Site\Api\APIException;
use CL\Users\User;
use CL\Course\Member;
use CL\Course\Members;
/**
* API Resource for /api/review
*/... | true |
77bdcee0f11fdfd6a302f5396f27e10771db598e | PHP | Jmainiero/projectMangement | /php/newProject.php | UTF-8 | 1,020 | 2.671875 | 3 | [] | no_license | <?php
require 'dbconnection.php';
$date = date('Y-m-d H:i:s');
$projectName = $_POST['projectName'];
$projectPriority = $_POST['project_priorityList'];
$projectStatus = $_POST['project_statusList'];
$priorityId = ["low" => 1, "medium" => "2", "high" => 3, "urgent" => 4];
$statusId = ["pending" => 1, "working-on" => "2... | true |
8a43fd79df2a5e308f20e278560cbff2de26b363 | PHP | zxj95121/education | /app/Http/Controllers/EclassPriceController.php | UTF-8 | 5,909 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\TeacherOne;
use App\Models\TeacherTwo;
use App\Models\TeacherThree;
use App\Models\TeacherFour;
use App\Models\ClassPrice;
use App\Models\BigOrder;
use App\Models\EclassOrder;
class EclassPriceController extends Controller
{
public... | true |
5d68759c008fe50dee18f2965cc07af5938f6d38 | PHP | mincms1/phalconphp_bootstrap | /app/library/I18n.php | UTF-8 | 1,223 | 2.5625 | 3 | [] | no_license | <?php
// +----------------------------------------------------------------------
// | 多语言界面
// | 默认语言包为zh.php 即为中文
// | 在初始化的控制器中要改变当前语言,可使用 Config::set('language','en');
// | 将自动找 app/messages/en.php 作为翻译包
// +----------------------------------------------------------------------
// | Author: Kang Sun <fleaphp@msn.co... | true |
a7b668eac665fd544b5fe5ddd19644a9837e3319 | PHP | jaredballou/insurgency-tools-old | /working/tree/treeManager.demo.php | UTF-8 | 6,354 | 3.03125 | 3 | [] | no_license | <h1>treeManager class showcase</h1>
<a href="class.treeManager.phps">class sourcecode</a>
<br><br>
<pre>
What is it?
===========
Something I got tired of doing over and over again.
This class which makes life easier when it comes to storing/retrieving hierarchical
arrays (tree... | true |
4219a6b1a3bea49aa1d8763c74a2c142df9e1d9d | PHP | AjayKarki/kunyo-api-sampling | /app/Foundation/Services/ExpenseService.php | UTF-8 | 3,080 | 2.53125 | 3 | [] | no_license | <?php
namespace Foundation\Services;
use Foundation\Lib\AccountingCategory;
use Foundation\Lib\ExpenseCategory;
use Foundation\Models\Expense;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\DB;
use Neputer\Supports\BaseService;
/**
* Class ExpenseService
* @package Foundation\Services
*/
class Expense... | true |
33f15513848e4171d303fda31060e02afc8c7cbc | PHP | Syxton/syxtoncms | /lib/timelib.php | UTF-8 | 5,552 | 3.09375 | 3 | [] | no_license | <?php
/***************************************************************************
* timelib.php - Time Library
* -------------------------------------------------------------------------
* Author: Matthew Davidson
* Date: 4/24/2012
* Revision: 0.3.2
*********************************************************************... | true |
3320ef1ba22b68f7160b405366cb3ceaaaae902c | PHP | ostatni5/cms-php | /php/logowanie.php | UTF-8 | 3,488 | 2.8125 | 3 | [] | no_license | <?php
include("sql.php");
$error=false;
if (isset($_POST['login']) && isset($_POST['pass'])){
if($_POST['login']=="admin" && get_client_ip()!="127.0.0.1" )
{
if(get_client_ip()!="127.0.0.1")
$error = "<span class=\"error\">Adminem to ty nie jesteś</span>";
}
else{
... | true |
5e9d286030a55b6d867b49277d6e2b7a6e498f5a | PHP | ffflabs/Captchavel | /src/Http/Middleware/ValidatesRequestAndResponse.php | UTF-8 | 2,738 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace DarkGhostHunter\Captchavel\Http\Middleware;
use DarkGhostHunter\Captchavel\Captchavel;
use DarkGhostHunter\Captchavel\Http\ReCaptchaResponse;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
trait ValidatesRequestAndResponse
{
/**
* Validate if this Request has the... | true |
3e49628a19f450de6515a3aafbb7bd1f06ace16e | PHP | Tyango/district_school | /index.php | UTF-8 | 717 | 2.609375 | 3 | [] | no_license | <?php
session_start();
include("database.php");
$sql = "SELECT * FROM district";
$result = mysql_query($sql);
echo "<form id ='form' action ='add.php' method ='post'>
<label>Choose district here</label>
<select name= 'District' id ='d_dropdown'> district<option>--Select--</option>";
while($row = mysql_fetch_array($resu... | true |
01f423e1388e6b0de265438b309525156d6f29c3 | PHP | MINMINNCU/components | /com_comment/helpers/avatars.php | UTF-8 | 5,999 | 2.578125 | 3 | [] | no_license | <?php
/**
* @package Ccomment
* @author Daniel Dimitrov <daniel@compojoom.com>
* @date 22.02.13
* @copyright Copyright (C) 2008 - 2013 compojoom.com . All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('_JEXEC') or die('Restricted acces... | true |
8d4390dcb0663b25fc7f01237ba0bc5e10583a3d | PHP | zakhttp/laravel-apidoc-generator | /src/Mpociot/ApiDoc/Parsers/RuleDescriptionParser.php | UTF-8 | 1,307 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Mpociot\ApiDoc\Parsers;
class RuleDescriptionParser
{
private $rule;
private $parameters = [];
/**
* @param null $rule
*/
public function __construct($rule = null)
{
$this->rule = $rule;
}
/**
* @return array|string
*/
public function getD... | true |
c7bbee24b369ff86daac9bfeb3e85ab9838feca6 | PHP | mariusklocke/liga-manager-api | /src/Infrastructure/CLI/SendTestMailCommand.php | UTF-8 | 1,075 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace HexagonalPlayground\Infrastructure\CLI;
use HexagonalPlayground\Application\Email\MailerInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class SendTestMailCo... | true |
a42f8b514783804d2f51e60dd680ba5ecfa3ff45 | PHP | Asen12345/laravel-project1 | /app/Eloquent/Anons.php | UTF-8 | 1,606 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Eloquent;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Laravel\Scout\Searchable;
class Anons extends Model
{
//OBSERVER
use Notifiable;
//use Searchable;
protected $table = 'anons';
protected $primaryKey = 'id';
... | true |
d91e215db6550e917cb94d507998a4eef07ab814 | PHP | scriptkitties/scriptkitties | /app/controllers/UserController.php | UTF-8 | 2,568 | 2.59375 | 3 | [] | no_license | <?php
use \Illuminate\Support\MessageBag;
class UserController extends BaseController {
public function getIndex() {
return $this->getLogin();
}
public function getControl() {
return View::make('pages.user.control', [
'user' => Auth::user(),
'showActions' => true
]);
}
public function getEd... | true |
64ae094b33c8a9f38c5181fd4dee3772055dcd48 | PHP | AndrewVanzha/Test_A25 | /send_data.php | UTF-8 | 2,543 | 2.734375 | 3 | [] | no_license | <?php
function adopt($text) {
return '=?UTF-8?B?'.Base64_encode($text).'?=';
}
function write_data_db($mess_name, $mess_tel, $mess_email, $mess_comment) {
require_once 'config.php';
$ret = array();
/** Запрос к БД */
$link = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
if(!$link) {
$ret["link"] = ... | true |
ad05a936377b822030aa87af6fc1a53fee502731 | PHP | dflydev/dflydev-finite-state-machine | /src/TransitionEvent/CallableTransitionEventCallback.php | UTF-8 | 788 | 2.78125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Dflydev\FiniteStateMachine\TransitionEvent;
use Dflydev\FiniteStateMachine\Contracts\TransitionEventCallback;
use Dflydev\FiniteStateMachine\State\State;
use Dflydev\FiniteStateMachine\Transition\Transition;
class CallableTransitionEventCallback implements TransitionEventCal... | true |
6df88049bda3c72acff134fa75a19019422364ba | PHP | JamesCatt/CP-CSS | /cpcss/ext.cpcss.php | UTF-8 | 4,115 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Cpcss_ext {
var $name = 'CP CSS';
var $version = '1.2.0';
var $description = 'Allows adding of custom CSS to the ExpressionEngine Control Panel';
var $settings_exist = 'y';
var $docs_url ... | true |
319f7bff20128b9c8133277a2cb6c561459730a2 | PHP | JuanRobles2164/HistoriasUsuario | /app/Http/Controllers/Funciones.php | UTF-8 | 295 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class Funciones extends Controller
{
public static function cifrarClave(string $clave){
$clave = crypt($clave, '$6$rounds=100$descifremeesta$');
$clave = substr($clave, 30);
return $clave;
}
}
| true |
6312ce3f4b5fa04cf067c926792782541b8bb73a | PHP | psdevelop/modules-store | /SberbankAST/SmallPurchasesSync/Request/Request.php | UTF-8 | 1,634 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Service\ETP\SberbankAST\SmallPurchasesSync\Request;
use App\Service\ETP\SberbankAST\SmallPurchasesSync\Interfaces\IRequest;
/**
* Class Request
* @package App\Service\ETP\SberbankAST\SmallPurchasesSync\Request
* @property $client HttpClient
*
* @author Poltarokov SP
* 10.08.2020
*/
abstrac... | true |
70b1ff948b183251e44c9610b935aff9c278aa9b | PHP | carlospcalvo/programacion_03 | /modelo_parcial_01/index.php | UTF-8 | 6,284 | 2.671875 | 3 | [] | no_license | <?php
include_once __DIR__.'\clases\usuario.php';
include_once __DIR__.'\clases\materia.php';
include_once __DIR__.'\clases\profesor.php';
include_once __DIR__.'\clases\asignacion.php';
include_once __DIR__.'\clases\login.php';
include_once __DIR__.'\clases\Files.php';
include_once __DIR__.'\vendor\firebase\php-jwt\s... | true |
f1815ea75a16f5e3e60763e43f5d63d2058bb3e6 | PHP | leosilvestre7/investiguemos | /application/libraries/Session_web.php | UTF-8 | 8,057 | 2.515625 | 3 | [] | no_license | <?php
class Session_web {
public function __construct() {
$this->ci = & get_instance();
/*
* Configuración para librerias, helpers y modelos
*/
$library = array('session', 'alerta', 'fecha', 'url_comp');
$helper = array();
$model = array('m_cliente');
... | true |
9c9efe474e608553d612a5b05db4f4827c7cc563 | PHP | jeki-aka-zer0/bigcommerce | /src/Core/Domain/Model/Auth/IntegrationRepository.php | UTF-8 | 520 | 2.546875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Src\Core\Domain\Model\Auth;
use Src\Core\Domain\Model\Id;
interface IntegrationRepository
{
public function findById(Id $integrationId): ?Integration;
public function findByStoreHash(Hash $storeHash): ?Integration;
/**
* @param Hash $storeHash
*
... | true |
dd38cd9d4b2d7c91b176c21d064092701fb77970 | PHP | Suvin1991/ebay | /dom-scrapper.php | UTF-8 | 2,666 | 2.921875 | 3 | [] | no_license | <?php
require_once 'simple_html_dom.php';
/**
*
*/
class DomScrapper
{
public $ids;
public $result;
public $fields;
public $parser;
public $html;
public $urlFormat;
public function __construct($ids = [])
{
$this->result = [];
$this->fields = [
'title' ... | true |
a19e033bbfb0835a1f7cd6f0d12d41caf2c1a92d | PHP | timek3/PAI | /10.18.17/php/Main/main.php | UTF-8 | 633 | 2.53125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>PHP</title>
</head>
<body>
<?php
echo '<h2 style="text-align:center"> ';
echo "Elo elo 320";
echo '</h2>';
//include '../imie.php'; //działa
//include '../imie.php'; //działa
//include '../imie1.ph... | true |
47ebb2004d6485f053c7382884fa258804359081 | PHP | kanopi/kanopi-components | /src/Repositories/IIndexedEntityGroupReader.php | UTF-8 | 615 | 2.625 | 3 | [] | no_license | <?php
/**
* Data reader interface for grouped entities to entities in a target repository
*/
namespace Kanopi\Components\Repositories;
use Kanopi\Components\Model\Collection\EntityIterator;
use Kanopi\Components\Model\Exception\SetReaderException;
interface IIndexedEntityGroupReader {
/**
* Read a set of values... | true |
88c5fcd90243e5937d7601a5cfa9420d21f435ad | PHP | LeylaAlp/auth | /database/seeds/CourseTableSeeder.php | UTF-8 | 868 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class CourseTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('courses')->insert([
[
'course_title' => 'php',
'course_content' => 'ph... | true |
b078e9be51ead05e46cb8d89314d6ff6f880bf2c | PHP | shoutenji/MKDict | /MKDict/v1/Exporter/SQL/V1SQLExporter.php | UTF-8 | 4,277 | 2.859375 | 3 | [] | no_license | <?php
namespace MKDict\v1\Exporter\SQL;
use MKDict\Exporter\SQL\SQLExporter;
use MKDict\v1\Database\JMDictDB;
use MKDict\v1\Database\JMDictEntry;
use MKDict\v1\Database\JMDictKanjiElement;
use MKDict\v1\Database\JMDictReadingElement;
use MKDict\v1\Database\JMDictSenseElement;
/**
* SQL Exporter for version 1
*
... | true |
37c4fa43dee0c8424907ba853a8422fd5433a441 | PHP | keysiwin12/chat | /Model/User.php | UTF-8 | 211 | 2.515625 | 3 | [] | no_license | <?php
class User extends AppModel {
public $validate = array(
'nombreUsuario'=>array('rule'=> 'notEmpty'),
'contraUsuario' => array('rule' => 'notEmpty')
);
}
?> | true |
de0fcbfc623820d47893c57bd3440164786cc66f | PHP | nitishpeeroo/mikaprod | /app/frontend/controllers/SignController.php | UTF-8 | 4,156 | 2.6875 | 3 | [] | no_license | <?php
namespace Application\Frontend\Controllers;
use Phalcon\Tag;
use Application\Models\User;
class SignController extends BaseController {
public function signoutAction() {
$this->session->remove(SESSION_NAME);
$this->session->destroy();
$this->flash->success('Vous avez bien été décon... | true |
588b275df1f59d016690b1b742aa3ad5e5ab610a | PHP | Turingcop/mvcgame | /src/Dice/DiceHand.php | UTF-8 | 1,068 | 3.609375 | 4 | [] | no_license | <?php
declare(strict_types=1);
namespace siev20\Dice;
class DiceHand
{
protected array $diceArr;
protected int $sum;
public $rolls = [];
public function __construct($dice, $amount)
{
for ($i = 0; $i < $amount; $i++) {
$this->diceArr[$i] = new $dice;
}
$this->s... | true |
7fd1a43bc3521a455eb8a6cd6fb45cdaf29ce52c | PHP | Sachou1234567890/GSBXamarin | /SIO2ALT/APIGSB/DAOTravailler.php | UTF-8 | 1,604 | 2.734375 | 3 | [] | no_license | <?php
include "cnx.php";
$request_method = $_SERVER["REQUEST_METHOD"];
function getLesTravailleurs()
{
global $cnx;
$reponse = array();
$sql = $cnx->prepare("SELECT regnom, visiteur.vismatricule, visnom FROM travailler, region, visiteur where travailler.regcode = region.regcode and visiteur.vismatr... | true |
c90ff9affa565dba627bf0783c31172de1ed07f9 | PHP | boban-dj/PhpSkelet | /Database/Entities/PrimaryKeyValueProxy.php | UTF-8 | 288 | 2.75 | 3 | [] | no_license | <?php
class PrimaryKeyValueProxy extends SafeObject implements ISqlValue
{
private $value;
public function __construct($value = null)
{
$this->value = $value;
}
public function toSql()
{
return $this->value;
}
function __toString()
{
return (string) $this->value;
}
}
| true |
cb3aaccc4e4891987c4a2134c348431cd75d70c1 | PHP | peresmishnyk/test_task | /src/Services/Route.php | UTF-8 | 575 | 2.671875 | 3 | [] | no_license | <?php
namespace Peresmishnyk\Task\Services;
class Route
{
protected static $allowed_method = ['get', 'post'];
public static function __callStatic(string $name, $args)
{
if (in_array($name, static::$allowed_method)) {
array_unshift($args, strtoupper($name));
return forward_... | true |
4d1518a7baf1b38c972276e2d6848682a2dbd046 | PHP | segfaultinc/finite | /tests/ValidationTest.php | UTF-8 | 2,882 | 2.609375 | 3 | [] | no_license | <?php
namespace SegfaultInc\Finite\Tests;
use SegfaultInc\Finite\Graph;
use SegfaultInc\Finite\State;
use PHPUnit\Framework\TestCase;
use SegfaultInc\Finite\Transition;
use SegfaultInc\Finite\Exceptions\ConfigurationException;
class ValidationTest extends TestCase
{
/** @test */
public function there_must_be... | true |
b7949223b01c92e447c9acb68b5ae1e81a8b51d8 | PHP | niklasb/contest-tasks-webapp | /includes/util.php | UTF-8 | 709 | 2.8125 | 3 | [] | no_license | <?php
function h($str) {
echo htmlspecialchars($str);
}
function get_url() {
$url = 'http';
if ($_SERVER["HTTPS"] == "on")
$url .= "s";
$url .= "://";
if ($_SERVER["SERVER_PORT"] != "80")
$url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
else
$url .= $_SERV... | true |
ffc68211e6174a0294a826e2a110123b4afdbf0b | PHP | chapcz/images | /src/Storages/LocalStorage/LocalModifiers.php | UTF-8 | 1,673 | 2.6875 | 3 | [] | no_license | <?php
namespace WebChemistry\Images\Storages\LocalStorage;
use Nette\Utils\Image;
use WebChemistry\Images\Image\IImage;
use WebChemistry\Images\ImageStorageException;
use WebChemistry\Images\Modifiers\ILoader;
use WebChemistry\Images\Modifiers\ModifierContainer;
class LocalModifiers implements ILoader {
/** @var ... | true |
89a639458634c308763e2f4de9e17d3d9ae6dfad | PHP | MrMarteng/WM-EM-Tippspiel | /public_html/game/register.php | UTF-8 | 3,278 | 2.828125 | 3 | [] | no_license | <?php
/* includes */
require_once("inc/tippDB.inc.php");
require_once("inc/ContentObjects.inc.php");
/* Vars */
$objStdCO = new std_CO();
$objRegisterForm = new formular("register", "?");
$strHTML = "";
$aryMessages = array();
$strForm;
$blnUserAdded = FALSE;
/* analyze the formular? */
if( array_key_exists('regis... | true |
10f25bde1677ef4fe572d767b614b1e3f87aa88a | PHP | safaaa1/my-project | /entities/categorie.php | UTF-8 | 2,326 | 3.1875 | 3 | [] | no_license | <?PHP
class Categorie
{
protected $id;
private $nom;
private $image;
public function __construct($id,$nom,$image)
{
$this->id=$id;
$this->nom=$nom;
$this->image=$image;
}
public function getId()
{
return $this->id;
}
public function setId($id)
{
$this->id=$id;
}
public function getNom(... | true |
a7d38e34a0c208a4bc5281153c32f8ecf7d2aa4e | PHP | undefinedCudaCore/ol | /app/Login.php | UTF-8 | 834 | 2.78125 | 3 | [] | no_license | <?php
namespace Main;
use App\DB\JsonDb;
class Login
{
private $loginResult = false;
public function __construct()
{
$data = [
['name' => 'Petras', 'pass' => md5('123')],
['name' => 'AloYzas', 'pass' => md5('123')],
];
if (... | true |
52eafdf0378dd81446f2d7e2ec1592024cd1ab13 | PHP | hi-andy/tp3.2.3-pinquduo | /Application/Api_3_0/Controller/RedisController.class.php | UTF-8 | 938 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Hua
* Date: 2017/8/23
* Time: 21:06
*/
namespace Api_3_0\Controller;
use Think\Controller;
use Think\Cache\Driver\Redis;
class RedisController extends Controller
{
private $redis = '';
public function _initialize()
{
$this->redis = new Redis();
}
... | true |
194d7a58a2857081759e815339031857c5af841a | PHP | permikomnaskaltara/Php-Google-Vision-Api | /src/Hydrator/Strategy/CropHintStrategy.php | UTF-8 | 1,418 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Vision\Hydrator\Strategy;
use Vision\Annotation\CropHint;
use Zend\Hydrator\Strategy\StrategyInterface;
class CropHintStrategy implements StrategyInterface
{
/**
* @var BoundingPolyStrategy
*/
protected $boundingPolyStrategy;
public function __construct()
{
$this->b... | true |
88f9a88c6fa4f99270f13fd115aff99c7a4e9356 | PHP | SupianIDz/Repository | /system/HTTP/Request/Server.php | UTF-8 | 2,194 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* ___ _
* / _ \ ___| |_ ___ _ __ _ _
* | | | |/ __| __/ _ \| '_ \| | | |
* | |_| | (__| || (_) | |_) | |_| |
* \___/ \___|\__\___/| .__/ \__, |
* |_| |___/
* @author : Supian M <supianidz@gmail.com>
* @version : v1.0
* @license : MIT
*/
namespace Octopy\HTTP\... | true |
bbc7f0fc6de51dd847af587e78b1714ead6500c0 | PHP | xjohjrdy/laravel-pt-ex | /app/Services/EleAdmin/MenuService.php | UTF-8 | 7,181 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\EleAdmin;
use App\Services\Service;
use App\Models\EleAdmin\Menu as MenuModel;
use App\Models\EleAdmin\RoleMenu as RoleMenuModel;
use App\Tools\ObjectDataHandle;
class MenuService extends Service
{
/**
* 新增
* @param $params
* @return array
*/
public static fun... | true |
318f9a4704d3ca90e3ff8fee4ba487af0c7e0f1c | PHP | suphair/speedcubingextraevents.org | /Classes/Data/country.data.class.php | UTF-8 | 416 | 2.703125 | 3 | [] | no_license | <?php
Class Country_data {
static function getByCode($code) {
if (!$code) {
return false;
}
return DataBaseClass::getRowObject("
SELECT
Name countryName,
LOWER(ISO2) code,
Continent continentCode
FROM Coun... | true |
dbde886d87fbf991d0152dedba9ee82bedf03dc0 | PHP | geraldoandradee/elegant-php | /src/ElegantPHP/Controllers/BaseController.php | UTF-8 | 1,436 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace ElegantPHP\Controllers;
class BaseController
{
private $basePath;
/**
* @param string $viewName
* @param array $params
* @return string
*/
public function loadView($viewName = 'index', $params = array())
{
if (!is_null($params) || count($params) > 0) {
... | true |
4d518f1fc2b43be347ac5db123667acfa17cbe7b | PHP | hasepi/rabbit | /common/exp_old/ExpUtil.php | EUC-JP | 3,372 | 3.09375 | 3 | [] | no_license | <?PHP
/*
ɲáĥ : WEB
*/
class ExpUtil extends Util{
Function ExpUtil(){
return ;
}
// * פǻѿ֤
Function marked( $setValue=False, $value=False, $marked=False, $output=False ){
$check = "";
if( $setValue==$value ){
$check = $marked;
if( $output ){
echo $marked ;
retu... | true |
0613bd0f3d8ed73a68b3b9e6dfcde4b2b4ebe13f | PHP | chukkynze/ekinect-site | /app/controllers/traits/MemberControls.php | UTF-8 | 4,007 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class MemberControls
*
* filename: MemberControls.php
*
* @author Chukwuma J. Nze <chukkynze@ekinect.com>
* @since 8/23/14 10:21 PM
*
* @copyright Copyright (c) 2014 www.eKinect.com
*/
trait MemberControls
{
public function checkPasswordStrength($password)
{
... | true |
3bdebcb2d5e2595d012808b7c619f510454b96ce | PHP | robertzengcn/bcms | /tagobj/cusplugins/block.environment.php | UTF-8 | 1,859 | 2.59375 | 3 | [] | no_license | <?php
/**
* 医院环境标签
* */
require_once 'common.php';
/**
* 根据页码获取对应的数据
*
* 对应function标签中的{environments}
*/
function smarty_block_henvlist( $params, $content, $template, &$repeat ) {
$pagesize = isset($params['pagesize']) ? $params['pagesize'] : '';
$sort = isset($params['sort']) ? $params['sort'] : true;
... | true |
003ebdd38dd6ab0b70f9e34bc4dbdd0e33c488f7 | PHP | BackEndTea/Advent-2019 | /src/Day/DayFour/ChainRule.php | UTF-8 | 690 | 3.125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace BackEndTea\Advent\Day\DayFour;
/**
* @psalm-pure
*/
final class ChainRule implements Rule
{
/**
* @var array<Rule>
* @psalm-var non-empty-list<Rule>
*/
private $rules;
/**
* @param array<Rule> $rules
*
* @psalm-param non-empty-list... | true |
58423bec6aaa5aa70cdbdcb18ac263e217f188bd | PHP | cuongvm17/laravel-repository | /app/Repository/Eloquent/PostRepository.php | UTF-8 | 529 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: cuongvu
* Date: 18/10/2018
* Time: 11:44
*/
namespace App\Repository\Eloquent;
use App\Repository\Contract\PostRepositoryInterface;
use App\Model\Post;
class PostRepository implements PostRepositoryInterface
{
private $model;
public function __construct(Post $m... | true |
aa9ac1cb9365133f618b2bed9296b99c2c380b6d | PHP | prahack/WebX-project | /class.ConfirmState.php | UTF-8 | 251 | 2.578125 | 3 | [
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | <?php
class ConfirmState extends State{
function __construct(){
}
public function changeState(Request $request){
$request->setState(new ConfirmState());
}
public function getState(){
return "confirmed";
}
}
?> | true |
3e71113b6288bd08ab701910e5b66d7ab988d92f | PHP | bborkovic/app_forum | /public/admin/categories_new.php | UTF-8 | 1,939 | 2.609375 | 3 | [] | no_license | <?php
// requires and includes all classes ..
require_once("../../includes/initialize.php");
if( !$session->is_logged_in() ) { redirect_to("login.php"); }
?>
<?php
if(empty($_GET['parent_cat_id'])) {
redirect_to('categories.php');
}
$parent_cat_id = $_GET['parent_cat_id'];
$name="";
$description="";
if(i... | true |
46b4d4e372f177062b378921887cf5f0e1090e28 | PHP | jsn-ads/PHP | /07-PHP_Intermediario/13-PDO_Inserir_Deletar_Atualizar/index2.php | UTF-8 | 480 | 2.5625 | 3 | [] | no_license | <?php
$banco = "mysql:dbname=pdo;host=127.0.0.1";
$dbuser = "admin";
$dbpass = "229536";
try {
$connection = new PDO($banco , $dbuser, $dbpass);
$usuario = "Neto";
$email = "jsn.ps4@gmail.com";
$senha = md5("jsn229");
$sql = "UPDATE usuario SET nome='$usuario' , email='$email' , senha='$senha' WHERE id... | true |
74387dc10eccc9f7ab990ae27e5acfbb6c958082 | PHP | BrazhnikovV/zende-expressive-rest | /src/User/src/Handler/User/Factory/GetUserByIdHandlerFactory.php | UTF-8 | 588 | 2.53125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace User\Handler\User\Factory;
use Psr\Container\ContainerInterface;
use User\Handler\User\GetUserByIdHandler;
/**
* Class GetUserByIdHandlerFactory
* @package User\Handler\User
*/
class GetUserByIdHandlerFactory
{
/**
* @param ContainerInterface $container
* @r... | true |
e73f0dbab41606bec4ef05a0dc5da30c9fca4923 | PHP | tylercd100/php-rebooter | /src/Drivers/Ssh/Ssh.php | UTF-8 | 1,454 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Tylercd100\Rebooter\Drivers\Ssh;
use Ssh\Session;
use Tylercd100\Rebooter\Drivers\ServerController;
use Tylercd100\Rebooter\Exceptions\MethodNotAllowedException;
abstract class Ssh implements ServerController
{
/**
* @var Session
*/
protected $session;
/**
* Gets the SSH s... | true |
414b241d275477a06f35d17a70f35080df35ec5c | PHP | kofiarhin/socialmedia | /classes/timeline.php | UTF-8 | 213 | 2.65625 | 3 | [] | no_license | <?php
class Timeline {
private $db = null;
public function __construct() {
$this->db = db::get_instance();
}
public function get_timeline($user_id = false) {
//get user timeline
}
} | true |
75a75adafe9d13743fd0abed7f3cc00edbf6e7a3 | PHP | isabella-anhol/helloworld | /index.php | UTF-8 | 3,231 | 3.40625 | 3 | [] | no_license | <?php
echo "Hello world!"; //oi
$nome = 1;
$nome2 = 1.0;
$nome3 = 1.02;
$nome4 = "Sérginho";
echo "<br> boa tarde, olha: $nome4"; /* olha issoooooooooo */
$num = 1;
$num2 = 1.0;
//o duplo = testa se são iguais (por exemplo, ali o ngc é inteiro)
if ($num == $num2){
ec... | true |
3352ba2121e3a73b6b024b9a6418a380165abb3f | PHP | kokx/kokx-library | /Kokx/Irc/Bot/Plugin/Achievements.php | UTF-8 | 12,502 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Kokx library
*
* @category Kokx
* @package Kokx_Irc_Bot
* @subpackage Plugin
* @copyright Copyright (c) 2009-2010 Pieter Kokx (http://blog.kokx.nl/)
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
/**
* Achievements
*
* @category Kokx
* @package ... | true |
179ab456128d1ae3187a8f0c485242f8d61c02b2 | PHP | kallehauge/Economic-PHP-SDK | /src/tkj/Economics/TokenClient.php | UTF-8 | 1,066 | 2.6875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php namespace tkj\Economics;
use SoapClient;
class TokenClient implements ClientInterface {
use ClientableTrait;
protected $token;
protected $appToken;
protected $appIdentifier;
public function __construct($token, $appToken, $appIdentifier, array $options = [])
{
$this->token = ... | true |
cef0e1aa7af7a7a147b62847d984b4122b786088 | PHP | snoozie/Resume2 | /app/views/resume/education.php | UTF-8 | 995 | 2.984375 | 3 | [] | no_license | <?php
/*
* Education - sub view for education section
*
* @author Susan Theron
* @version 1
* @date November 3, 2014
*/
print "<h3>Education</h3>";
/*
* Insert image depending on education using id from education table
*/
foreach($data as $d)
{
$image = "";
$title = "";
switch($d->id)
{
... | true |
613d01def3c624d4aacb0d69fdfcf8e13cfdbbba | PHP | yanghuolong123/yhlyii2 | /basic/controllers/WeixinController.php | UTF-8 | 5,888 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\controllers;
use Yii;
use yii\web\Controller;
class WeixinController extends Controller {
public $token = 'yanghuolonghebingbing123';
public $appid = 'wxa2d2cc7d8b460302';
public $secret = 'f36da1173c0a891fdac60da21cbb7c06';
public $api_url = 'https://api.weixin.qq.com';
priv... | true |
c381dc88bfdd0a11c9d00d40ab87b2a4f43a9117 | PHP | Technomatix/infotech | /src/moodle/question/type/amthauer6/renderer.php | UTF-8 | 5,496 | 2.65625 | 3 | [] | no_license | <?php
defined('MOODLE_INTERNAL') || die();
require_once($CFG->libdir . '/outputcomponents.php');
/**
* Subclass for generating the bits of output specific to amthauer6 questions.
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_amthauer6_renderer extends qtype_renderer
{
/*... | true |
85272a7f73529f334b7d12bd50cfee1463c76ca1 | PHP | Fly-76/ALB-POO | /debug.php | UTF-8 | 1,156 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
// *** First check db connexion, !!! Database class not yet abstract
// require_once "model/entity/database.php";
// $DBConnection = new Database();
// *** Now set Database to abstract and check child creation
require_once "model/userModel.php";
$userModel = new UserModel();
require_once "model/acco... | true |
531ce16f5595c6ddc358f240b29c2fbe3c8ea200 | PHP | Atar-rr/Camagru2.0 | /App/Src/Model/Module/Setting.php | UTF-8 | 4,107 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Src\Model\Module;
use App\Src\Exception\ValidateException;
use App\Src\Model\Data\Row\UserRow;
use App\Src\Model\Data\TableDataGateway\UserGateway;
use App\Src\Model\DTO\Setting\EmailEditDTO;
use App\Src\Model\DTO\Setting\LoginEditDTO;
use App\Src\Model\DTO\Setting\PasswordEditDTO;
use App\Src\Mod... | true |
60d2e40877b8c0dcce6172d832c4293767c42f89 | PHP | LEmanRUS17/Triangle-website-on-Yii2 | /modules/user/forms/frontend/SignUpForm.php | UTF-8 | 4,204 | 2.59375 | 3 | [] | no_license | <?php
namespace app\modules\user\forms\frontend;
use yii\base\Model;
use app\modules\user\models\User;
use app\modules\user\Module;
use Yii;
class SignUpForm extends Model
{
public $username; // Имя пользователя
public $email; // Email
public $password; // Пароль
public $verifyCode; // Код П... | true |
eb6b8e4595f49ab62e10f38dc0e94f0793c51fec | PHP | wangyingqian-team/service-dine | /app/Contracts/Shop/ShopOperationLogInterface.php | UTF-8 | 842 | 2.96875 | 3 | [] | no_license | <?php
namespace App\Contracts\Shop;
/**
* 商家操作日志相关接口
*
* @author zhangzhengkun
*/
interface ShopOperationLogInterface
{
/**
* 添加商家操作日志
*
* @param int $shopId 店铺id
* @param string $sellerAccount 操作账号
* @param string $content 操作内容
* @param string $route 操作路由
* @param string $ip... | true |
e6849ad30183313368a195f4e74c292da466876a | PHP | Korbeil/stripe-php-api | /generated/Model/ShippingMethod.php | UTF-8 | 3,755 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
/*
* This file has been auto generated by Jane,
*
* Do no edit it directly.
*/
namespace Stripe\Api\Model;
class ShippingMethod
{
/**
* A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency)... | true |
b7efb128cbbc7b47755a204f91fe79ebebea78d6 | PHP | vulpis161/opbd | /login.php | UTF-8 | 1,847 | 2.59375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Аунтификация</title>
</head>
<body>
<form method="post" class="log_form">
<p class="log_text">Логин: <input class="form_input" type="text" name="login"></p>... | true |
25c39864a69827684a12c2d0fa080548112cf019 | PHP | EHER/voluntarios | /src/Eher/QueroSerVoluntario/Bundle/DomainBundle/Entity/Cidade.php | UTF-8 | 1,906 | 2.625 | 3 | [] | no_license | <?php
namespace Eher\QueroSerVoluntario\Bundle\DomainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table()
* @ORM\Entity
*/
class Cidade
{
/**
* @var integer $id
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private... | true |
b683c4c82eea7d770634ce233ff1b89d09340064 | PHP | dewsoftpvtltd/testing | /app/Domain/Entities/Teacher.php | UTF-8 | 3,983 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Domain\Entities;
use Doctrine\ORM\Mapping AS ORM;
use App\Domain\Entities\School;
use App\Domain\Entities\User;
use App\Domain\Entities\Subject;
use App\Domain\Entities\Section;
use LaravelDoctrine\Extensions\Timestamps\Timestamps;
use LaravelDoctrine\Extensions\SoftDeletes\SoftDeletes;
use Doctrine... | true |
18c7c10e7e9062fe0f0143b5276fae753c5a665d | PHP | devatsrs/api.neon-crm | /app/Api/LibClass/RemoteSSH.php | UTF-8 | 2,705 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Api\Model\CompanyConfiguration;
use Collective\Remote\RemoteFacade;
use \Exception;
use Faker\Provider\Uuid;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Log;
class RemoteSSH{
private static $config = array();
public static $uploadPath = '';
public static ... | true |
8b282422fd08a7a8f60982607ab71d0a0b084804 | PHP | Vlada992/WebsiteCampersRent | /classes/Connect.class.php | UTF-8 | 477 | 2.90625 | 3 | [] | no_license | <?php
class Connect{
private static $_instance = null;
private function __construct(){}
public static function getInstance(){
if(self::$_instance == null){
try{
self::$_instance = new PDO("mysql:host=" . Config::get("db/host") . ";dbname=" . Config::get("db/dbname") . ";charset=utf8", Config::get("db/user"), Config::... | true |
6130a1c16077577f0c53259f0e4f36ca49e2d64a | PHP | ArielEspinoza07/nurse-service-api | /app/Policies/WorkShiftPolicy.php | UTF-8 | 2,881 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Policies;
use App\Models\User;
use App\Models\WorkShift;
use Illuminate\Auth\Access\HandlesAuthorization;
class WorkShiftPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @param User $user
*
* @return mixed
*/
... | true |
22b0b810bdc0d4736c2e556122155b9047fb2bc8 | PHP | JamesKotov/calories-calculator | /config.php | UTF-8 | 729 | 2.75 | 3 | [] | no_license | <?php
// config
$oConfig = new StdClass();
// number of kilocalories to substract for loss weight
$oConfig->iLossyCorrection = 500;
// minimal calories per day
$oConfig->iMinCaloriesPerDay = 1200;
// validation params
$oConfig->aAllowedGenders = array('male', 'female');
$oConfig->iMinWeight = 1;
$oConfig->iMaxWeig... | true |
25df38d287fed8d66bbdfcab7dffd14915a50952 | PHP | Thewebus/GBICHSMS | /Apis/sms.class.php | UTF-8 | 899 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jacquesgoude
* Date: 05/07/2018
* Time: 10:54
*/
header('Content-Type: text/html;charset=UTF-8');
include_once('smpp.class.php');
class SmsManager
{
private $_smpp;
private $_url;
private $_port;
private $_login;
private $_pwd;
public function __con... | true |
70875e8a61d2c79e1ca4c7370a8f282ab1d46195 | PHP | mghaneh1375/gachesefid.V2 | /app/models/SystemQuiz.php | UTF-8 | 539 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\models;
use Illuminate\Database\Eloquent\Model;
/**
* An Eloquent Model: 'SystemQuiz'
*
* @property integer $id
* @property integer $price
* @property string $name
* @property string $startReg
* @property string $endReg
* @property string $startDate
* @property string $startTime
*
* @mi... | true |
ef4919faf04b39c07cfe8225b858707262b8b9e8 | PHP | jerry-botaoyu/school_projects | /php/htdocs/app/models/Hashtag.php | UTF-8 | 1,433 | 3.09375 | 3 | [] | no_license | <?php
class Hashtag extends Model{
public $hashtag_id;
public $stock_id;
public $comment_id;
public $hashtag_name;
public function __construct()
{
parent::__construct();
}
public function getHashtagsFromStock($stock_id)
{
$stmt = self::$_connection->prepare("SEL... | true |
9cafb2c48805bd6d58cc5849bb080c8725d8c056 | PHP | Mwangimburu/table_banking | /app/Traits/TenantScope.php | UTF-8 | 1,520 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: kevin
* Email: robisignals@gmail.com
* Date: 31/08/2019
* Time: 16:15
*/
namespace App\Traits;
use App\Models\Permission;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
use Illuminate\Support\Fac... | true |
5781ffbcf7095fc1329dc06762dfe31713e03bf1 | PHP | markotom/galliano | /includes/twitter.php | UTF-8 | 3,597 | 2.625 | 3 | [] | no_license | <?php
class Twitter_API_Endpoints {
protected $api = 'https://api.twitter.com/1.1';
var $limit = 10;
var $max_limit = 25;
public function __construct() {
add_action( 'init', array( $this, 'add_endpoint' ), 0 );
add_filter( 'query_vars', array( $this, 'query_vars' ), 0);
add_a... | true |
078a0834246093ff94b5c0a093789ce1bcf6fea8 | PHP | spspasov/laravel-api | /app/Client.php | UTF-8 | 1,315 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Client extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'clients';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $f... | true |
51b83b605f77651d577bf85f7de65f12dbea0e20 | PHP | Gantyuk/SoftGroup | /mvc/app/controllers/MainController.php | UTF-8 | 3,821 | 2.578125 | 3 | [] | no_license | <?php
namespace app\controllers;
use app\models\Main;
use vender\core\base\Controller;
class MainController extends Controller
{
public function index()
{
$model = new Main();
if (isset($_POST['delet']) && !empty($_POST['delet']) && is_numeric($_POST['delet'])) {
$model->DeletId($... | true |
f5e9416eb65d1f7fec41aa1c370a28e31cbdcca6 | PHP | kchigrinov/test-rps | /app/Models/User.php | UTF-8 | 345 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Foundation\Auth\User as Authenticatable;
/**
* Class User
* @package App\Models
* @property integer id
* @property string nickname
* @property Carbon created_at
* @property Carbon updated_at
*/
class User extends Authenticatable
{
protected $fi... | true |
e7d6fceca580e0ce30d33f685bc63d23818a3592 | PHP | robzienert/Drake | /zf2/library/Drake/View/Helper/FormSubmitCancel.php | UTF-8 | 1,307 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Drake Framework
*
* This source file is subject to the new BSD license that is bundled with this
* package in the file LICENSE.
*
* @category Drake
* @package Drake_View
* @subpackage Helper
* @copyright Copyright (c) 2008-2010 Rob Zienert (http://robzienert.com)
* @license http://ww... | true |
4c7f28f448876735cc1dc54cb7bdaab099b705ba | PHP | sybila/CMP-api | /app/Entity/ExperimentEntities/ExperimentGraphset.php | UTF-8 | 1,929 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="experiment_graphset")
*/
class ExperimentGraphset implements IdentifiedObject
{
use Identifier;
/**
* @ORM\OneToMany(targetEntity="ExpVarToGraphset", ma... | true |
e431502e758317c712a844b54428b73430b6bdc7 | PHP | tbiedrzicki/jltAPI | /app/Http/Controllers/UsuarioController.php | UTF-8 | 3,424 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Usuario;
use Illuminate\Http\Request;
class UsuarioController extends Controller
{
public function __construct()
{
$this->middleware('apicheck');
}
public function all()
{
$usuario =Usuario::all();
return response()->... | true |
e01e1be7fc846356bb82ba5e744ca21dc482bc27 | PHP | Threespot/threespot-wp-sandbox | /web/wp-content/plugins/sfwd-lms/themes/ld30/templates/modules/course-steps.php | UTF-8 | 9,173 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Displays a Course Prev/Next navigation.
*
* Available Variables:
*
* $course_id : (int) ID of Course
* $course_step_post : (int) ID of the lesson/topic post
* $user_id : (int) ID of User
* $course_settings : (array) Settings specific to current course
* $can_complete : (bool) C... | true |