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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0edd9efbd8779cf1ed267892fe769ed8060f39c3 | PHP | FeintEars/zmeet-http-rest-php | /api/access/object_user.php | UTF-8 | 702 | 2.640625 | 3 | [] | no_license | <?php
require_once 'user.php';
require_once 'api/entities/User.php';
/**
* @file
* Access level: user object.
*/
/**
* User object - Create.
*/
function object_user_create($params) {
if (isset($_ENV['APP_ADMIN'])) {
if ($_ENV['APP_ADMIN']) {
return TRUE; // Admin mode is enabled.
}
}
error_access_den... | true |
5a0d2c672b546207c64412be4abed0a496e291b0 | PHP | onshamzaoui/BogoFinal | /src/Controller/TestController.php | UTF-8 | 1,342 | 2.625 | 3 | [] | no_license | <?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class TestController extends AbstractController{
public function test(){
dd("ca fonctionne!");die();
}
p... | true |
cd953a389d0fe50a2fb2b6acb0d8e298dd4c6d1a | PHP | AnTAVR/yii2-my-template | /protected/modules/callback/models/forms/CallbackForm.php | UTF-8 | 1,971 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\callback\models\forms;
use borales\extensions\phoneInput\PhoneInputValidator;
use Yii;
use yii\base\Model;
class CallbackForm extends Model
{
public $phone;
public $name;
public $verifyCode;
/**
* @return array the validation rules.
*/
public function rules(... | true |
42e98bdb46c181d42c7bf34ac7622ce4f14c018a | PHP | Mik9531/PW-Paginas-Web | /pruebanimales.php | UTF-8 | 274 | 3.296875 | 3 | [] | no_license | <?php
include ('Animal.php');
$pez1= new Animal("rojo", 10);
$pez2= new Animal("blanco", 7);
$pez1->comer_animal($pez2);
echo "el peso del pez 1 es: ".$pez1->getPeso()." y el del pez 2 es: ".$pez2->getPeso();
echo "tenemos: " .Animal::getContador(). "animales";
?> | true |
91b97545d22b16c0a7ff4c5a6b977d5f4f3405c6 | PHP | github-sprint3r/grean-press-01 | /tests/CheckoutTest.php | UTF-8 | 1,955 | 2.578125 | 3 | [] | no_license | <?php
require_once "./src/checkout.php";
class CheckoutTest extends PHPUnit_Framework_TestCase
{
private $freeResultText = 'ฟรีค่าจัดส่งสินค้า';
private $notFreeResultText = 'เสียค่าจัดส่งสินค้า';
public function testVIPBuySixBookShippingCostShouldBeFree()
{
// 5 Books
// 1 CD
... | true |
38c011251154c9f04fc50aa8f34dd50df5aae999 | PHP | j-muiruri/nafuumall | /sp_register.php | UTF-8 | 7,747 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Nafuumall | Make your order today.</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<?php
incl... | true |
99328b26b832f215a38d7e0f927b18df9b906722 | PHP | jcqdy/waima-script | /protected/modules/read/models/dao/ModelDaoReadStatus.php | UTF-8 | 2,307 | 2.609375 | 3 | [] | no_license | <?php
class ModelDaoReadStatus extends ModelDataMongoCollection
{
const _ID = '_id';
const USER_ID = 'userId';
const SCRIPT_ID = 'scriptId';
const READ_POS = 'readPos';
const UPDATE_TIME = 'updateTime';
public function __construct()
{
parent::__construct('dbwaima-script', 'waima... | true |
3b24ae4f640d406ddda06e96dfdca49bf04d446f | PHP | jbaldwin/project_euler | /lib/prime.php | UTF-8 | 1,815 | 3.796875 | 4 | [
"MIT"
] | permissive | <?php
/**
* Determines if a number is prime or not.
* @param int $n Calculate if this number is prime.
* @return bool true if $n is prime, false if $n is composite.
**/
function is_prime($n) {
if($n <= 1) return false;
if($n < 4) return true;
if($n % 2 == 0) return false;
if($n < 9) return true;
if($n % 3 == ... | true |
70eb7221928079fd6787dcb7fd787b70fefb5643 | PHP | OmarDakkak/ProjAWA | /vendor/symfony/flex/src/Configurator/ContainerConfigurator.php | UTF-8 | 3,686 | 2.6875 | 3 | [
"CC0-1.0",
"MIT"
] | permissive | <?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 Symfony\Flex\Configurator;
use Symfony\Flex\Lock;
use Symfony\Flex\Reci... | true |
b7fd8204d0c008f62158b945940227192f44838c | PHP | dagboujhatem/Gestion-Lycee-Bootstrap-PHP-MVC | /Controlleur/ControlleurParent.php | UTF-8 | 2,838 | 2.75 | 3 | [] | no_license | <?php
function addParent($bdd,$nom,$prenom,$mail,$login,$pass,$tel)
{
$res=$bdd->exec("INSERT INTO `parent` (`id`, `nom`, `prenom`, `mail`, `login`,`pass`,`tel` ) VALUES (NULL, '$nom', '$prenom', '$mail', '$login', MD5('$pass'), $tel)");
$last_id = $bdd->lastInsertId();
$bdd=null;
return $last_id;
}
func... | true |
6dd6f25ae8e17fe1456288ac9d7d78a4ba070290 | PHP | chenchaohan/Alts-Jxc | /Jxc/Impl/Libs/SimpleSQL.php | UTF-8 | 4,247 | 2.921875 | 3 | [] | no_license | <?php
namespace Jxc\Impl\Libs;
use Exception;
/**
* @Author TinyZ ()
*/
class SimpleSQL {
/**
* @param string $table
* @param string $fields
* @return string
*/
public static function select($table, $fields) {
return "SELECT $fields FROM $table ;";
}
public static func... | true |
3a86353f883c915bf74d6ea7311e796c6450593a | PHP | markstickley/static | /php/controllers/FController.php | UTF-8 | 9,558 | 2.78125 | 3 | [] | no_license | <?php
/**
* FController - File & Folder controller
*/
class FController extends BaseController{
private $filePath;
private $fs;
public function indexAction(){
$this->filePath = $this->getFilePath();
$this->fs = new Filesystem();
switch($this->registry->request_method){
case 'post':
return $this->... | true |
5f5e3ea1bb9eecb62f91f6e0af5904013366c7cb | PHP | jcamilofarfan-dev/loteria | /controllers/Objects.php | UTF-8 | 896 | 2.625 | 3 | [] | no_license | <?php
class ObjectsController{
public function __construct(){
require_once "models/ObjectsModel.php";
}
public function index(){
// require_once "models/ObjectsModel.php";
$objects = new Objects_model();
$data ["titulo"]= "Objetos";
$data ["Objects"]= $objects->get_o... | true |
69936beb23e6879e15c280b681adbef0f883d049 | PHP | gabrielsalazar8486/laravel-ddd-skeleton | /src/ERP/Items/Application/Create/ItemCreatorRequest.php | UTF-8 | 1,598 | 2.96875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Medine\ERP\Items\Application\Create;
final class ItemCreatorRequest
{
private $id;
private $code;
private $name;
private $reference;
private $type;
private $categoryId;
private $state;
private $companyId;
private $createdBy;
public fun... | true |
ba3239da9cf3e18bafb922e01cf7734aff43a8f0 | PHP | Jeanypure/yae | /backend/modules/cost/controllers/DomesticFreightController.php | UTF-8 | 6,525 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\modules\cost\controllers;
use Yii;
use backend\modules\cost\models\DomesticFreight;
use backend\modules\cost\models\DomesticFreightSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\web\Response;
/**
* DomesticFreightController implements t... | true |
2f0e4d6c04784b91aaea6e1637e64ba0937971ff | PHP | SuperAme/CRUDMVC | /app/libraries/Controller.php | UTF-8 | 629 | 2.96875 | 3 | [] | no_license | <?php
//Clase controlador principal
//Se encarga de poder cargar los modelos y las vistas
class Controller{
//cargar modelo
public function modelo($modelo){
//carga
require_once '../app/models/'.$modelo.'.php';
//Instanciar el modelo
return ne... | true |
e7d4033677cccac69b65e5b767de36a3a753d797 | PHP | renarsaar/VRK | /post.php | UTF-8 | 1,815 | 2.828125 | 3 | [] | no_license | <?php
require "inc/config.php";
session_start();
# Check for submit
if (isset($_POST["delete"])) {
# Get form data
$delete_id = $conn -> real_escape_string($_POST["delete_id"]);
# Create query
$sql = "DELETE FROM posts WHERE id = $delete_id;";
# Redirect to home page if query successfull
if ($conn -> que... | true |
27aa941793ef9b1ff9bde9d5aaebfe14bd46764e | PHP | snickers54/dblink | /library/db.php | UTF-8 | 3,616 | 3.125 | 3 | [] | no_license | <?php
class db
{
private $_serveur;
private $_user;
private $_pass;
private static $_db = false;
private $class;
// ici on fait un multi ton
/**
* @fn function __construct($class)
* @brief
* @file db.php
*
* @param class
* @return
*/
public function __... | true |
260122be5901525f089092d2fcb82a7df2f41e43 | PHP | lemondrop81/Liger-Aquariums | /process_login.php | UTF-8 | 907 | 2.71875 | 3 | [] | no_license | <?php
require ('connect.php');
$username = filter_var($_POST['username'], FILTER_SANITIZE_SPECIAL_CHARS);
$password = filter_var($_POST['password'], FILTER_SANITIZE_SPECIAL_CHARS);
$query = "SELECT * FROM users WHERE username = '$username'";
$statement = $db->prepare($query); // Returns a... | true |
a242703d5d2be1277717a03dcffbc8b8bc6463e4 | PHP | nagyist/phalicity-mgmt-phabricator | /src/aphront/AphrontController.php | UTF-8 | 2,031 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @group aphront
*/
abstract class AphrontController extends Phobject {
private $request;
private $currentApplication;
private $delegatingController;
public function setDelegatingController(
AphrontController $delegating_controller) {
$this->delegatingController = $delegating_controller;
... | true |
8ad6c6cf0a252230b75cacbee87a2bf0a6414414 | PHP | narensgh/StatusMail | /module/Management/src/Management/Model/Entity/AccessToken.php | UTF-8 | 2,684 | 2.546875 | 3 | [] | no_license | <?php
namespace Management\Model\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* AccessToken
*
* @ORM\Table(name="access_token", indexes={@ORM\Index(name="people_id", columns={"people_id", "auth_token"})})
* @ORM\Entity
*/
class AccessToken
{
/**
* @var integer
*
* @ORM\Column(name="access_tok... | true |
7825a82574bdf98bb1cafcbbef248d7f5f1b1932 | PHP | BrunoCRocha/sound3application | /backend/tests/unit/UserTest.php | UTF-8 | 1,509 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php namespace backend\tests;
use common\models\User;
class UserTest extends \Codeception\Test\Unit
{
/**
* @var \backend\tests\UnitTester
*/
protected $tester;
protected function _before()
{
}
protected function _after()
{
}
// tests
public function testVali... | true |
a250db756920bc9fae442648c39cb898e1e6ba93 | PHP | ShreyasVH/my-site-php | /app/scripts/importTeams.php | UTF-8 | 2,749 | 2.609375 | 3 | [] | no_license | <?php
use app\helpers\Api;
use Cloudinary\Uploader;
use Phalcon\Di\FactoryDefault\Cli;
date_default_timezone_set('Asia/Kolkata');
define('APP_PATH', realpath(dirname(dirname(dirname(__FILE__)))) . '/');
require_once APP_PATH . 'app/constants/Constants.php';
require_once APP_PATH . 'app/config/loader.inc.php';
$di =... | true |
7098955157ce36135d16c75cec87cf2537931f0e | PHP | mitchc32/aaf2 | /src/AAF/Routing/Routes.php | UTF-8 | 15,075 | 3.15625 | 3 | [] | no_license | <?php
namespace AAF\Routing;
use AAF\App;
use AAF\Security\User;
use AAF\Http\Response;
use AAF\Exceptions\RouteException;
use AAF\Controllers\BaseController;
/**
* Routes
*
* @package AAF
* @author Mitchell Cannon
* @copyright 2016
* @access public
*/
class Routes {
/**
* @var mixe... | true |
bc173a740545fd1cc9b40d6338e6979eab4a8fb5 | PHP | Julianqui/trabajoIntegrador | /pdo3/listado-peliculas.php | UTF-8 | 720 | 2.921875 | 3 | [] | no_license | <?php
require_once 'autoload.php';
$allMoviesResult =$dbMovies->getAllMovies();
$total =$dbMovies->totalRows($allMoviesResult);
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Listado de películas</title>
</head>
<body>
<h2>Listado de películas (total: <?= $total ?> )</... | true |
883874d27de0aff149c96f9facbec598c92543f7 | PHP | yasuaki640/keisan-mondai-san | /backend/app/Scopes/UserIdScope.php | UTF-8 | 491 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Scopes;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
/**
* Class UserIdScope
* @package App\Scopes
*/
class UserIdScope implements Scope
{
/**
* @param Builder $builder
* @param... | true |
133f59d3938ddd941c99bb83d76ef54e74a437aa | PHP | BGCX261/zibo-svn-to-git | /trunk/zibo_modules/zibo.database/src/zibo/library/database/driver/Driver.php | UTF-8 | 3,891 | 3.03125 | 3 | [] | no_license | <?php
namespace zibo\library\database\driver;
use zibo\library\database\manipulation\statement\Statement;
use zibo\library\database\Dsn;
use zibo\library\filesystem\File;
/**
* Interface for a driver of a database connection
*/
interface Driver {
/**
* Null value
* @var string
*/
const VALU... | true |
f0e71fee1cc352d5524722739afb94330e419d83 | PHP | menghuan/easyphalcon | /app/common/models/Test/Admin.php | UTF-8 | 1,186 | 2.8125 | 3 | [] | no_license | <?php
namespace Common\Models\Test;
/**
* Description of AdminModel
*
* @author wangjianghua
* @date 2018-2-25 11:50:20
*/
class Admin extends \Common\Models\BaseModel
{
/**
* 主键自增ID
* @var int
*/
public $id;
/**
* 管理员姓名
* @var string
*/
public $name;
/**
*... | true |
9a85f9966115206c91e768c90b80db1c46be7fbb | PHP | TeleSign/php_telesign | /Version.php | UTF-8 | 1,811 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace telesign\sdk\version;
use Composer\Script\Event;
use Composer\Semver\VersionParser;
class Version {
static function bumpVersion (Event $event) {
$io = $event->getIO();
if (!is_dir(__DIR__ . "/.git")) {
$io->writeError("Your local repository is missing.");
return;
}
... | true |
507572fbff92cd2fc2bd4dbd406a6c34ce9ea6e8 | PHP | felipeneuhauss/redesocial | /app/Http/Controllers/AppController.php | UTF-8 | 3,989 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Session;
use Request;
/**
* Class AppController
* @package App\Http\Controllers
*
* Especializacao da classe Controller para reutilizacao de funcoes
*/
abstract class AppController extends Controller
{
/**
* @var \App\Repositories\AbstractRepository.p... | true |
03f0175f900f82cf593a465fc448fe452b54305a | PHP | g4code/data-mapper | /src/Engine/Elasticsearch/ElasticsearchGeodistSortFormatter.php | UTF-8 | 1,557 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace G4\DataMapper\Engine\Elasticsearch;
use G4\DataMapper\Common\Selection\Sort;
use G4\DataMapper\Common\SortingFormatterInterface;
use G4\DataMapper\Exception\OrderNotInMapException;
class ElasticsearchGeodistSortFormatter implements SortingFormatterInterface
{
private $identity;
private $map ... | true |
324351bf9545bb0d26de6b248b2c94ea85696422 | PHP | SOG-Daniels/jobFinder | /config/config.php | UTF-8 | 257 | 2.546875 | 3 | [] | no_license | <?php
$server_name = "localhost";
$user_name = "root";
$password = "";
$database = "jobfinder";
//creating connection
$conn = mysqli_connect($server_name,$user_name,$password,$database);
if(!$conn){
die("Connection failed: ". mysqli_connect_error());
} | true |
d455d30f7a8c8bf9b2c8a9759ec72a8a80fd4d25 | PHP | hkui/algo_practice | /leetcode/php/31.php | UTF-8 | 1,179 | 3.703125 | 4 | [] | no_license | <?php
/**
* 下一个排列
* https://leetcode-cn.com/problems/next-permutation/
*
* https://blog.csdn.net/HappyRocking/article/details/83619392
*
*/
class Solution {
/**
* @param Integer[] $nums
* @return NULL
*/
function nextPermutation(&$nums) {
$len=count($nums);
$m=$n=-1;
... | true |
bf26662cdee98dba0f5dbc5ab63c0e2404b161ad | PHP | ImKubass/PandaWP | /panda/Components/EmployeeQuery/EmployeeQuery.php | UTF-8 | 757 | 2.59375 | 3 | [] | no_license | <?php
namespace Components\EmployeeQuery;
use Components\Employee\Employee;
use Presenters\QueryBase;
class EmployeeQuery extends QueryBase
{
public function __construct()
{
parent::__construct();
$this->setPostType(Employee::KEY);
$this->setComponent(Employee::class);
$this-... | true |
246da04a805b3c464b37e2ca3af8ecb7bccc7efd | PHP | danidomen/SendySailthru | /sendy/sailthru_integration/configclass.php | UTF-8 | 3,002 | 2.59375 | 3 | [] | no_license | <?php
class ConfigClass{
function onAllListObserver($map_config,$mysqli,$email,$status,$vars = false){
$qa = 'SELECT * FROM lists, subscribers WHERE subscribers.email = "'.mysqli_real_escape_string($mysqli, $email).'" AND subscribers.list = lists.id';
$ra = mysqli_query($mysqli, $qa);
... | true |
d44101b96fabac7a7329e6925f5189c5b7f37168 | PHP | Wilya3/Calculator | /models/Charge.php | UTF-8 | 1,650 | 2.8125 | 3 | [] | permissive | <?php
namespace app\models;
use Yii;
use yii\db\ActiveQuery;
use yii\db\ActiveRecord;
/**
* Table 'charge' from DB 'calculator'
* - id UNSIGNED PK
* - name VARCHAR(255)
* - description TEXT
* - amount DECIMAL(13, 3)
* - date DATE
* - user_category_id INT
* @property int id UNSIGNED PK
* @property string ... | true |
dd380a4915d646b25ed87c957130f7025701189c | PHP | PlorvenT/simple-game-backend | /app/Rules/attackEnemy/HeroAvailableRule.php | UTF-8 | 1,034 | 2.71875 | 3 | [] | no_license | <?php
/**
* Copyright © 2019 GBKSOFT. Web and Mobile Software Development.
* See LICENSE.txt for license details.
*/
declare(strict_types=1);
namespace App\Rules\attackEnemy;
use App\Models\Fight;
use Illuminate\Contracts\Validation\Rule;
/**
* Class HeroAvailableRule
* @package App\Rules\attackEnemy
*/
class ... | true |
364b937ee80234fc4ddc07960d56c428aa8fa5d5 | PHP | grudelsud/hack4europe | /web/application/models/scraper_model.php | UTF-8 | 2,370 | 2.546875 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Scraper_model
*/
class Scraper_model extends CI_Model
{
function __construct()
{
parent::__construct();
}
private function _execute_curl( $rest_call, $request_type, $auth_type, $auth_params, $post_params, &$debug = NULL )
{
$... | true |
2c30bff7956e7e4b642924261c4da70079e0790a | PHP | AbdelrahmanHashem468/haraz | /app/Models/Cart.php | UTF-8 | 781 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Product;
class Cart extends Model
{
use HasFactory;
protected $guarded = [];
public static function getCartItems()
{
$carts = Cart::all();
if(size... | true |
a7a2ba4e451e1e8ece46bed3bec6f05c92b4a171 | PHP | ns3777k/symfony-api-demo | /src/Service/System/ExceptionMappingResolver.php | UTF-8 | 1,323 | 2.765625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Service\System;
use InvalidArgumentException;
class ExceptionMappingResolver
{
/**
* @var array<string,ExceptionMapping>
*/
private array $mappings = [];
private function addMapping(string $class, int $code, bool $hidden, bool $loggable): void
... | true |
176648cf431dcdb5a0eeee6b5520329e91fa28a4 | PHP | Nano1237/grief | /grief/core/static_classes/AuthHandler.php | UTF-8 | 1,356 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This is a Demo Class, how you could use the AbstractGriefAuthHandler.
* @author Tim Rücker <tim.ruecker@ymail.com>
* @copyright (c) 2015
*
*/
class AuthHandler extends AbstractGriefAuthHandler {
private static $isLoggedIn = true;
/**
* Used to check if the user is logged in
* @ret... | true |
8e8948551463636ec40e8a9abbad8d99e49e7021 | PHP | reshmanair1993/Wastemanagement | /api/modules/v1/models/FeeCollectionInterval.php | UTF-8 | 1,630 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace api\modules\v1\models;
use Yii;
/**
* This is the model class for table "fee_collection_interval".
*
* @property int $id
* @property string $name
* @property int $status
* @property string $created_at
* @property string $modified_at
*/
class FeeCollectionInterval extends \yii\db\ActiveRecord
... | true |
5fb920f45a9a01cf85b5b6070aa418d975ba4fc4 | PHP | dongcheng/aliyun-mts-sdk-php | /src/MTS/Model/TimeSpan.php | UTF-8 | 683 | 3.109375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: shenlei
* Date: 16/5/24
* Time: 下午7:16
*/
namespace MTS\Model;
class TimeSpan
{
public function __construct($seek = '', $duration = '')
{
$this->seek = $seek;
$this->duration = $duration;
}
/**
* 开始时间
*
* @var string
... | true |
a52ef6f9f9b74361d51556461f2867a7fc176bae | PHP | dimadin/wis-wp-plugin | /inc/Scrapper.php | UTF-8 | 8,254 | 2.90625 | 3 | [] | no_license | <?php
namespace dimadin\WIS;
use Sunra\PhpSimple\HtmlDomParser;
/**
* Class with methods used for scrapping of pages for image.
*
* It uses fork of PHP Simple HTML DOM Parser,
* but there are many possible alternatives:
* https://github.com/technosophos/querypath
* https://github.com/FriendsOfPHP/Goutte
* htt... | true |
32e28a37a5b273097a0729e9a604d929d06a2a95 | PHP | murilorodriguesvs/murilo | /email.php | UTF-8 | 816 | 2.796875 | 3 | [] | no_license | <?php
if(isset($_POST['email']) && !empty($_POST['email'])){
$nome = addslashes($_POST['nome']);
$email = addslashes($_POST['email']);
$telefone = addslashes($_POST['telefone']);
$mensagem = addslashes($_POST['mensagem']);
$to = "murilo2759@gmail.com";
$subject = "Contato - Portifól... | true |
eba9d9c7a58a6a83293cc84329908b2d5b8b32ae | PHP | lancecaraccioli/LC | /library/LC/Debug/Writer/CommandLine.php | UTF-8 | 259 | 2.71875 | 3 | [] | no_license | <?php
namespace LC\Debug\Writer;
use LC\Debug\AbstractWriter;
/**
* This class is intended to dump data into the command line console
*
*/
class CommandLine extends AbstractWriter
{
public function dump($data)
{
var_dump($data);
}
}
| true |
d06753e85a077e2f25fd6eb4d782dbb11da6e6be | PHP | themsaid/laravel-multitenancy | /tests/Feature/TenantFinder/DomainTenantFinderTest.php | UTF-8 | 1,284 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Spatie\Multitenancy\Tests\Feature\TenantFinder;
use Illuminate\Http\Request;
use Spatie\Multitenancy\Models\Tenant;
use Spatie\Multitenancy\TenantFinder\DomainTenantFinder;
use Spatie\Multitenancy\Tests\TestCase;
class DomainTenantFinderTest extends TestCase
{
private DomainTenantFinder $tenantFi... | true |
521120edfaab6cb71ef1d601f12da549268e7418 | PHP | rasstroen/diary | /core/XSLClass.php | UTF-8 | 7,951 | 2.625 | 3 | [] | no_license | <?php
// класс генерирует xslt шаблон для страницы
class XSLClass {
private $xsltFileName = '';
private $xsltFiles = '';
private $xsltFilePathes = array();
private $xsl_cache_name;
private $cache_enabled = false;
public $fetched_from_cache = false;
public $puted_into_cache = false;
private $pageSe... | true |
188a9bcb91689a255ec70a5dc52fa87946142ff0 | PHP | RCreyghton/webdb | /htdocs/controllers/Users.php | UTF-8 | 6,822 | 2.828125 | 3 | [] | no_license | <?php
/*
* All classes and scripts must be loaded via index.php, where WEBDB_EXEC is set,
* and stop executing immediatly if otherwise.
*/
if (!defined("WEBDB_EXEC"))
die("No direct access!");
class Controllers_Users extends Controllers_Base {
public function login() {
if ($this->getString("login_submit")) {
... | true |
ed4c2050a67a1b147f29e29d121aa056465eb34b | PHP | Santiago9806/proyectoPrueba | /vista/mostrarTareas.php | UTF-8 | 4,233 | 2.640625 | 3 | [] | no_license | <?php
class MostrarTareas{
public function visualizarTareas($datos){
$complemento = "";
if(empty($datos)){
$html = "Aun no hay tareas desarrolladas";
}else{
$html = "<center><table class='table table-striped'>
<tr>
<td colspan='6... | true |
4aafbf1d40415aecc24131a43aad5c70a348029f | PHP | DanielOchoa/Tasks | /inc/connection.inc.php | UTF-8 | 485 | 3.046875 | 3 | [] | no_license | <?php
function dbConnect($connectionType = 'pdo') {
$host = 'ENTER HOSTNAME HERE, MOST LIKELY LOCALHOST';
$db = 'DATABASE NAME';
$user = 'DATABASE USER';
$pwd = 'DATABASE PASSWORD';
if ($connectionType == 'mysqli') {
return new mysqli($host, $user, $pwd, $db) or die('Cannot open database');
} else {
... | true |
3504b1d5fa4d233c0b02f1834327cf4f67c9c88f | PHP | heivin/swoft-game | /app/Game/Logic/GetCard.php | UTF-8 | 555 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Game\Logic;
use App\Game\Core\AStrategy;
use App\Game\Core\Packet;
use App\Game\Core\JokerPoker;
use App\Game\Conf\MainCmd;
use App\Game\Conf\SubCmd;
/**
* 获取卡牌信息
*/
class GetCard extends AStrategy
{
/**
* 执行方法
*/
public function exec()
{
... | true |
838a15b9b6dba5d00c84effb9214ff2c59fdd9a8 | PHP | yanny36/CRMEB | /application/core/model/user/UserLevel.php | UTF-8 | 6,391 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace app\core\model\user;
use app\core\model\system\SystemUserLevel;
use app\core\model\system\SystemUserTask;
use basic\ModelBasic;
use traits\ModelTrait;
class UserLevel extends ModelBasic
{
use ModelTrait;
/*
* 获取用户等级人数
* */
public static function setUserLevelCount($uids)
{
... | true |
8a5f7c44eb6ff93d55deed5ec66eec05e3dfc863 | PHP | PatrickRose/advent-of-code | /php/2018/app/Util/Instructions/Addi.php | UTF-8 | 171 | 2.59375 | 3 | [] | no_license | <?php
namespace PatrickRose\AdventOfCode\Util\Instructions;
class Addi extends AbstractAdd
{
public function getBValue(int $b): int
{
return $b;
}
}
| true |
c02fef0065b55acc96f115e205dbefd3d07e5ba8 | PHP | nano871022/lineaprimaria | /arbol/arbol/dto/vPaginasRol.php | UTF-8 | 2,650 | 2.71875 | 3 | [] | no_license | <?php
require_once '../../lib/interface/abstract/AbstractDTO.php';
class VPaginasRol extends DTO{
var $id;
var $pagina;
var $nombrPagina;
var $carpeta;
var $archivo;
var $descripcion;
var $rol;
var $nombreRol;
function setRow($row){
$this->id = $row['llave'];
$this->pagina = $row['pagina'];
$this->nombrePag... | true |
f2af00c35d442ec3a7418cc00e945eae439765e7 | PHP | Bcdo/project | /vendor/craftcms/cms/src/migrations/m160830_000000_asset_index_uri_increase.php | UTF-8 | 746 | 2.625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace craft\migrations;
use craft\db\Migration;
use craft\db\Table;
/**
* The class name is the UTC timestamp in the format of mYYMMDD_HHMMSS_migrationName
*/
class m160830_000000_asset_index_uri_increase extends Migration
{
/**
* Any migration code in here is wrapped inside of a transaction.
... | true |
a56cb09fbd640add1b5c44149f85c521c93f6f81 | PHP | aleksnc/lexx-backend | /classes/Explorer.php | UTF-8 | 274 | 2.59375 | 3 | [] | no_license | <?php
class explorer
{
public function sort_link($item) {
echo $child = $item['link'];
foreach ($MainPage as $item){
if($item['parent']==$child){
echo $item['title'].' ==> '.$item['link'].' ==> '.$item['parent'].'<br>';
}
}
}
} | true |
b64a2d9b4a92b17995969e5e110d9d919785e9bf | PHP | phucle1303/TAPIT_IoT_Training | /HW4/php/control.php | UTF-8 | 740 | 2.921875 | 3 | [] | no_license | <?php include 'connectDB.php';
?>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<a href="control.php?LED=ON"><button>ON</button></a>
<a href="control.php?LED=OFF"><button>OFF</button></a>
<br>
<?php
if(isset($_GET['LED'])){
$action = $_GET['LED'];
if ($action == 'ON') {
$sql = 'UPDATE led SET status = "1"';
echo ... | true |
28c97e329fb33efe3f794e1165efe702069d2d41 | PHP | RizvanWaheed/akpi | /application/controllers/api/Modules.php | UTF-8 | 2,617 | 2.5625 | 3 | [] | no_license | <?php defined('BASEPATH') OR exit('No direct script access allowed');
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
require APPPATH . '/libraries/REST_Controller.php';
class Modules extends REST_Controller {
private $telSmsSession;
private $telSmsSending;
private $telSmsMs... | true |
4fe4316c775fd2317559a6f9744bff9c821e5253 | PHP | ahmadsisfo/tours-backend | /systems/helper/preg.php | UTF-8 | 590 | 2.53125 | 3 | [] | no_license | <?php
class Preg {
public $preg = array();
public $rplc = array();
public function __construct() {
$this->preg = array(
'#(<a href=".*?).*?way=(.*?)&.*?(&.*?" .*?>.*?</a>)#' => '$1#$2$3',
'#(<a href=".*?).*?way=(.*?)&.*?(&.*?".*?>.*?</a>)#' => '$1#$2$3',
'#(<a href=".*?).*?way=(.*?)&.*?(" .*?>.*?</a>... | true |
94f8e45a244bcb3450c7389c2877e5140866a55f | PHP | shinanye/php_oop_xml | /Dbo.class.php | UTF-8 | 1,539 | 3.3125 | 3 | [] | no_license | <?php
class DBO{
private $servername = "localhost"; //服务器
private $username = "root"; //用户名
private $password = "root"; //密码
private $dbname="backstage";
private $conn;
private static $instance;//单例
public function __construct(){
$thi... | true |
4facb97650fb42fe87c0b8019a089067d98db599 | PHP | baptistadba/php | /while/exemplo-01.php | UTF-8 | 164 | 3.28125 | 3 | [] | no_license | <?php
$condicao=true;
while ($condicao) {
$numero = rand (1,10);
if ($numero===3) {
echo $numero." Três!";
$condicao=false;
}
echo $numero." ";
}
?> | true |
76dbf4998ee819ccce98fb8e6d54730a3b261b8b | PHP | sandrineBeauche/cookbookServer | /tests/units/UnitUpdateTest.php | UTF-8 | 1,736 | 2.625 | 3 | [] | no_license | <?php
require_once "UnitTest.php";
class UnitUpdateTest extends UnitTest {
protected function getDataSet(){
return parent::generateDataset(array("units.yml", "users.yml"));
}
protected function prepareRequest($args = array()){
return self::$client->post('units/update.ph... | true |
1c941d5d6213a1f7a73f7a4d87a7932c70e772be | PHP | phpinfo/smsfeedback | /src/Factory/ApiClientFactory.php | UTF-8 | 797 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace SmsFeedback\Factory;
use Psr\Log\LoggerInterface;
use SmsFeedback\ApiClientBuilder;
use SmsFeedback\ApiClientInterface;
abstract class ApiClientFactory
{
public static function createApiClient(
string $login,
string $password,
?string $baseUri = nu... | true |
c21e2b02796ebe67c2bd14e027edfc78f2a2e403 | PHP | ChutimaNurak/A | /app/PositionModel.php | UTF-8 | 2,054 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Support\Facades\DB;
class PositionModel {
//CONCAT Position
function select_all() {
$sql = "select ID_Position, CONCAT(Name,', ',House_number,' หมู่',Village,' ',Subdistrict,' ',City,' ',Province,' ',Zip_code) AS Name_Position FROM position INNER JOIN customer ON position.ID = c... | true |
19490db99ca8ad69e94370c86e588bb687a3d9e8 | PHP | PirxDanford/amazon-pay-oxid | /application/models/bestitamazonpay4oxidaddressutil.php | UTF-8 | 5,269 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Model to handle address parsing
*
* @author best it GmbH & Co. KG <info@bestit-online.de>
*/
class bestitAmazonPay4OxidAddressUtil extends bestitAmazonPay4OxidContainer
{
/**
* Returns parsed Street name and Street number in array
*
* @param string $sString Full address
... | true |
65b9b454af0369a0ac60ac6e4478ea15541a524a | PHP | REDSPK/ecan.in | /application/bootstrap.php | UTF-8 | 1,001 | 2.515625 | 3 | [] | no_license | <?php
/* Report all errors directly to the screen for simple diagnostics in the dev environment */
error_reporting(E_ALL | E_STRICT);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
/* Add the Zend Framework library to the include path so that we can access the ZF classes */
set_include... | true |
1b9221e2e2f733ac602ccf146393f7eba9722fb3 | PHP | proyectoalba/alba | /lib/model/om/BaseInforme.php | UTF-8 | 14,109 | 2.515625 | 3 | [] | no_license | <?php
abstract class BaseInforme extends BaseObject implements Persistent {
const PEER = 'InformePeer';
protected static $peer;
protected $id;
protected $nombre;
protected $descripcion;
protected $fk_adjunto_id;
protected $fk_tipoinforme_id;
protected $listado;
protected $variable... | true |
7e390b19824d5c333b664e18d2372a6aa10d2452 | PHP | jsarch/fuel-curl | /fuel/packages/oil/classes/generate.php | UTF-8 | 10,799 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* Fuel
*
* Fuel is a fast, lightweight, community driven PHP5 framework.
*
* @package Fuel
* @version 1.0
* @author Fuel Development Team
* @license MIT License
* @copyright 2010 - 2011 Fuel Development Team
* @link http://fuelphp.com
*/
namespace Oil;
/**
* Oil\Generate Class
*
* @packag... | true |
03378a4b3710ab5922396db2fe6b828e3f5bfeee | PHP | hivetidelivery/benditafome | /database/seeds/OrderTableSeeder.php | UTF-8 | 535 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use BenditaFome\Models\OrderItem;
use Illuminate\Database\Seeder;
use BenditaFome\Models\Order;
/**
* Class OrderTableSeeder
*/
class OrderTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
factory(Order::class, 10)
... | true |
34109053e413784c4a13fce286f3fa0524651b24 | PHP | caseyamcl/shuttle | /tests/Fixture/TestDoctrineEntity.php | UTF-8 | 746 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace ShuttleTest\Fixture;
/**
* Class TestEntity
* @package ShuttleTest\Fixture
*/
class TestDoctrineEntity
{
/**
* @var string
*/
private $identifier;
/**
* @var string
*/
private $name;
/**
* TestEntity constructor.
* @param string $identifier
... | true |
c0cb2ece021b89366a429f2b35f669f765c15461 | PHP | radicalneoevo/controldeacceso | /ControlAcceso/gui/contenidos/tablas/diasFeriados/TablaDiasFeriados.php | UTF-8 | 2,502 | 3.21875 | 3 | [] | no_license | <?php
include_once("entidad/DiaFeriado.php");
/**
* Representa una tabla de días feriados genérica.
*
* @author Ramiro Savoie (rsavo84@gmail.com)
* @since 20-12-2009
* @version 0.5
*/
class TablaDiasFeriados
{
/**
* Lista de días feriados a imprimir.
* @var array
*/
protected $diasFeriados... | true |
716b87b8b995c9e57b73ceaf55314d8488a62717 | PHP | Ganners/BrainFuck-Interpreter | /tests/Mocks/Mock_Token.php | UTF-8 | 571 | 2.875 | 3 | [] | no_license | <?php
namespace BrainFuck\Token;
use BrainFuck\Token\Token;
use BrainFuck\BrainFuck_Exception;
class Mock_Token extends Token {
static $identifier = array('X');
/**
* To be implemented by child classes
*
* @param array $tape - Our tape (array of 30000 containing ints)
* @param int $ptr ... | true |
ba2e230885c014892830bc017d2ecee199083ff4 | PHP | viniciusbrito/pedidos | /app/Pedido.php | UTF-8 | 1,439 | 2.515625 | 3 | [] | no_license | <?php namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Pedido extends Model {
use SoftDeletes;
protected $fillable = ['revendedora_id', 'status_id', 'campanha_id'];
protected $dates = ['created_at', 'updated_at'];
/**
* @return \Illuminate\... | true |
78fd8e8624b717684e4652b8fa11da31a457a479 | PHP | duylinhng95/laravel5_training | /app/Repository/PostRepositoryEloquent.php | UTF-8 | 9,900 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repository;
use App\Entities\Post;
use Barryvdh\LaravelIdeHelper\Eloquent;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Query\Builder;
use DB;
/**
* @method withTrashed()
*/
class PostRepositoryEloquent extends BaseRepositoryEloquent implements PostRepository
{
publ... | true |
afb1241b466262fd40bec491734ea459c700fb0b | PHP | MaxiNCh/gb-laravel | /app/Contracts/ParserInterface.php | UTF-8 | 189 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Contracts;
interface ParserInterface
{
public function getParsedData(string $url): array;
public function saveNews(string $url): void;
}
| true |
3ed1906b73ea8697f2516f8231a8b6b7070ec4af | PHP | GooSolaire/WSR-MODUL-2 | /photo.php | UTF-8 | 978 | 2.515625 | 3 | [] | no_license | <?php
if (isset($_GET['photo'])) {
if (isset($_FILES['photo'])) {
$name = $_FILES["photo"]["name"];
$prepare = $pdo->prepare("INSERT INTO
photo (name)
values (:name);");
$prepare->bindValue(":name", $name);
$execute = $prepare->execute()... | true |
ecdd929289906438d6596f103b07c77126363d14 | PHP | marciodouglasIFRN/prova | /src/Helper/ProjetoFactory.php | UTF-8 | 464 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Helper;
use App\Entity\Projeto;
class ProjetoFactory implements EntityFactory
{
public function create(string $json):Projeto
{
$content = json_decode($json);
$projeto = new Projeto();
$projeto->setNome($content->nome);
$factory = new Profes... | true |
563eec929d95c9de7f18161228d2f27030968674 | PHP | Turma-Back-end-Development-Flag/my-student | /examples/classes-inherant.php | UTF-8 | 2,524 | 3.453125 | 3 | [
"MIT"
] | permissive | <?php
interface Drivable {
public function drive();
public function stop();
}
interface Flyable {
public function fly();
public function land();
}
abstract class Vehicle
{
public $brand;
public $model;
public $color;
}
class Car extends Vehicle implements Drivable
{
public function drive()
{
e... | true |
8ab6f5776e3fa6fa39a7d326045994e7c73e1093 | PHP | oparin/KiselevMusic | /src/KiselevMusic/AudioBundle/Entity/Audio.php | UTF-8 | 1,830 | 2.515625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: oparin
* Date: 14.09.14
* Time: 15:08
*/
namespace KiselevMusic\AudioBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Class Audio
* @package KiselevMusic\AudioBundle\Entity
*
* @ORM\Entity
* @ORM\Table(name="km_audio")
*/
class Audio
{
/**
* @ORM\Colu... | true |
6ae6a845ee28e9cff94eb2bcc0d1b289310a45e1 | PHP | maxon755/gof-patterns | /generative/prototype/index.php | UTF-8 | 341 | 2.78125 | 3 | [] | no_license | <?php
require_once __DIR__ . '/Author.php';
require_once __DIR__ . '/Article.php';
$author = new Author('Maks Rogers');
$article = new Article('Sensation!', 'Something very interesting happened', $author);
$article->addComment('Great!');
print_r($article);
$copy = clone $article;
print_r($copy);
var_dump(count(... | true |
c1ca8ce7669512dd8a016efd8e9d1dc3ab72cae4 | PHP | BoseonHong/Brain-wave-security-system | /brainwave.php | UTF-8 | 1,894 | 2.515625 | 3 | [] | no_license | <?php
define('DB_DATABASE', 'brainwave');
define('DB_USERNAME', 'dbuser');
define('DB_PASSWORD', 'vagrant');
define('PDO_DSN', 'mysql:host=localhost;dbname=' . DB_DATABASE);
if(isset($_POST['ID'])) {
try {
$db = new PDO(PDO_DSN, DB_USERNAME, DB_PASSWORD);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_... | true |
45ca838c9752d9e9663b245dac08bee3bd2daf59 | PHP | abdulrahmansaber/PHP-Simple-Framework | /framework/import/upload.php | UTF-8 | 1,613 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
class UploadFile {
public $file;
public $allowed_extensions;
public $max_size;
public $move_to;
public $errors = array();
/** getsize()
* @return int
* Gets you back the uploaded file size.
*/
public function getsize()
{
return $_FILES[$this->f... | true |
b311eaedc839aa2986f42494a2a47169f2dbf2c1 | PHP | LeoStrupeni/DH_Php | /0611 - Cookies y Session/Home/home.php | UTF-8 | 872 | 2.546875 | 3 | [] | no_license | <?php
if($_POST){
session_start();
$_SESSION["color"]= "bgcolor= " . $_POST["favcolor"];
$_SESSION["name"]=$_POST["nombre"];
header("location:perfil.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=de... | true |
175edb9991d83aab15608c29a8841d1b66d2c1b8 | PHP | danielvalero41/Sistema-de-Compras---Ventas | /app/Articulo.php | UTF-8 | 739 | 2.78125 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Articulo extends Model
{
/**
* Con hacemos referencia a todos los campos de la tabla articulos
* Recordemos que en la tabla articulos el "idcategoria" esta relacionada con la tabla categoria
* Ya que un articulo pertene... | true |
fc2d8514e279711d21d2108688a04ec5bcbd0452 | PHP | vm370/bf | /app/Models/Book.php | UTF-8 | 564 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;
class Book extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'slug'
];
/**
* Boot the model.
*
* @return v... | true |
0ad7d43f44c6af5be6163d13d3c56c615d153749 | PHP | h-hamano/shifter-local_test | /volume/app/plugins/wppusher/Pusher/Handlers/UpdatePlugin.php | UTF-8 | 900 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"Apache-2.0"
] | permissive | <?php
namespace Pusher\Handlers;
use Pusher\Actions\PluginWasUpdated;
use Pusher\Commands\UpdatePlugin as UpdatePluginCommand;
use Pusher\Storage\PluginRepository;
use Pusher\WordPress\PluginUpgrader;
class UpdatePlugin
{
/**
* @var PluginRepository
*/
private $plugins;
/**
* @var PluginU... | true |
1aedac3b8f10cf4154ef5a2b5590f1fa7ff1b9a2 | PHP | flipak180/places-yii2 | /common/models/PlaceComfort.php | UTF-8 | 1,415 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "place_comforts".
*
* @property int $id
* @property int $place_id
* @property int $comfort_id
* @property int $created_at
* @property int $updated_at
*/
class PlaceComfort extends \yii\db\Acti... | true |
d22f5acdf9b741ebed21ff04c7896a2ceb328ef2 | PHP | evan-likhvar/my-base | /app/TranslatableModel.php | UTF-8 | 706 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\Interfaces\TranslatableContract;
use App\Traits\TranslatableModelTrait;
use Illuminate\Database\Eloquent\Model;
abstract class TranslatableModel extends Model implements TranslatableContract
{
use TranslatableModelTrait;
/**
* return array of fields then must be translatabl... | true |
04bffe6d8d55dbd28820e7ecbd4e0499fd785aea | PHP | yii2mod/yii2-cashier | /Billable.php | UTF-8 | 14,268 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace yii2mod\cashier;
use Carbon\Carbon;
use Exception;
use InvalidArgumentException;
use Stripe\Charge;
use Stripe\Customer;
use Stripe\Error\Card;
use Stripe\Error\InvalidRequest;
use Stripe\Invoice as StripeInvoice;
use Stripe\InvoiceItem as StripeInvoiceItem;
use Stripe\Refund as StripeRefund;
use Stri... | true |
047af6400c7833f0162e9302bcd61549e8fc9f09 | PHP | francecruz017/vanilla-php-rest-api | /models/User.php | UTF-8 | 3,681 | 3.03125 | 3 | [] | no_license | <?php
require_once("config/Database.php");
class User {
private $conn;
private $table = "users";
protected $date_now = "";
public function __construct()
{
$database = new Database();
$this->conn = $database->connect();
$this->date_now = date('Y-m-d H:i:s');
}
public function getAll()
{
$data = ar... | true |
0a955d337ac76b1430fd8943fb06d913a293cff8 | PHP | kiyoshikondo/funkyjam.com | /public_html/mori/mypage/edit/confirm.php | EUC-JP | 2,535 | 2.671875 | 3 | [] | no_license | <?php
require_once($_SERVER['DOCUMENT_ROOT'] . '/../lib0904/DatabaseAction.php');
require_once($_SERVER['DOCUMENT_ROOT'] . '/../lib0904/moriCommon.php');
class Action extends CommonAction {
function execute() {
}
function validate() {
$this->errors = array();
$key = 'zip1';
$key2 = 'zip2';
if(empty($this-... | true |
6b3e214762a0e67bf4980f4545dfe2da65194071 | PHP | dostric/child-parent-relations | /SearchSettings.php | UTF-8 | 1,737 | 2.984375 | 3 | [] | no_license | <?php
class SearchSettings {
public $id; // object id
public $idList; // objects id list
public $name; // object name
public $type; // object type
public $group; // object group
public $channel; // object channel
public $dateFrom;... | true |
f12410982d8b9982126e34f5684d6f4734a325b1 | PHP | jajamoks/laravelTimesheetPDF | /app/Http/helpers.php | UTF-8 | 25,060 | 3.046875 | 3 | [] | no_license | <?php
//Calendar Salary Entry Helper Method
function salaryEntryCalendar( $month, $year){
date_default_timezone_set('America/Los_Angeles');
if(request()->route()->parameters != null) {
$month = request()->route()->parameters['month'];
$year = request()->route()->parameters['year'];
}
... | true |
88b191155bc81fd7dbd01a08e00e095137ce3e41 | PHP | Niranjan-Gito/api | /database/seeds/UsersTableSeeder.php | UTF-8 | 721 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use GitoAPI\User;
class UsersTableSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run(){
/*USERS ARRAY*/
$users =[
[
'email' => 'test1@gito.me',
... | true |
027635442d6c30424bc55f69240ad582d9bcfebb | PHP | lzerma/GearmanBundle | /Generator/UniqueJobIdentifierGenerator.php | UTF-8 | 1,688 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Gearman Bundle for Symfony2
*
* @author Marc Morera <yuhu@mmoreram.com>
* @since 2013
*/
namespace Mmoreram\GearmanBundle\Generator;
use Mmoreram\GearmanBundle\Exceptions\WorkerNameTooLongException;
/**
* Job Unique Key generator
*
* @author Marc Morera <yuhu@mmoreram.com>
* @see https://gi... | true |
7c110c8b6d53713eefc316e2e3125707b806d465 | PHP | nkirnos/simple_blog | /src/Route.php | UTF-8 | 1,802 | 3.015625 | 3 | [] | no_license | <?php
class Route
{
protected $uri, $methods, $controller_class;
public function __construct($uri, $controller_class, $methods)
{
$this->setUri($uri);
$this->setMethods($methods);
$this->controller_class = $controller_class;
}
public function setMethods($methods)
{
... | true |
ae5d85650dfb4ff76364199e6a8d67729b54145f | PHP | GraphQLAPI/graphql-api-for-wp-dist | /vendor/pop-cms-schema/queriedobject-wp/src/Routing/CMSRoutingStateService.php | UTF-8 | 1,334 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace PoPCMSSchema\QueriedObjectWP\Routing;
use PoP\RootWP\Routing\RoutingManagerTrait;
use PoPCMSSchema\QueriedObject\Routing\CMSRoutingStateServiceInterface;
use WP_Query;
class CMSRoutingStateService implements CMSRoutingStateServiceInterface
{
use RoutingManagerTrait;
... | true |
0022d7d2601ace851538aa87b76a87979fc56fe0 | PHP | leCheveuCodeur/SnowTricks | /src/Doctrine/Listener/TrickSlugListener.php | UTF-8 | 474 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Doctrine\Listener;
use App\Entity\Trick;
use Symfony\Component\String\Slugger\SluggerInterface;
class TrickSlugListener
{
protected $slugger;
public function __construct(SluggerInterface $slugger)
{
$this->slugger = $slugger;
}
public function prePersist(Trick $entit... | true |
8a135535a650cdbb77a71afa84c89893db460d43 | PHP | teoc98/galielo | /tornei/workers/tdetails.php | UTF-8 | 1,202 | 2.546875 | 3 | [] | no_license | <?php
$torns = query("SELECT * FROM tornei WHERE ID = ".$_GET["tid"]);
$sq = mysqli_fetch_assoc(query("SELECT COUNT(ID) AS cc FROM torn_sq WHERE tornID = ".$_GET["tid"]))["cc"];
$torn = mysqli_fetch_assoc($torns);
#echo http_build_query($torn, '', '/');
?>
<div align="center">
<div class="w3-card-4 w3-padding width... | true |