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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b26109ec1bee776d024024a2fdd02b8d8d9c690a | PHP | adeel-k/php-practise | /PHP "Date and time" and Include statement/DateAndTime.php | UTF-8 | 185 | 3.015625 | 3 | [] | no_license | <?php
print "Today is " . date("Y-m-d") .
"<br>";
print "Today is " . date("l");
echo "<br>";
print "The time is " . date("H:i:sa");
| true |
a7ced0f1ebc4c708db8ac852cce66491585b93d0 | PHP | pmclain/authorizenet-php-sdk | /src/PaymentProfile/Payment/OpaqueData.php | UTF-8 | 1,819 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Pmclain\Authnet\PaymentProfile\Payment;
use Pmclain\Authnet\Exception\OpaqueDataInformationException;
class OpaqueData implements PaymentInterface
{
const KEY = 'opaqueData';
const FIELD_DATA_DESCRIPTOR = 'dataDescriptor';
const FIELD_DATA_VALUE = 'dataValue';
/**
* @var string
... | true |
d26101641b1c08383138528815f80873ac2cf5fb | PHP | mostafazs/webhook1 | /send_message.php | UTF-8 | 2,480 | 2.625 | 3 | [] | no_license | <?php
//Function for POST instead of file_get_contents
function send($url,$data,$header=array("Content-type: application/json")){
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER... | true |
4826a2405fe0d88b34c9aa3296c14287941708d6 | PHP | ardar/bi-framework | /framework/core/Fw.php | UTF-8 | 850 | 2.984375 | 3 | [] | no_license | <?php
class Fw
{
private static $_appInstance = null;
/**
* Gets global App instance.
* @param int $appId
* @return IApplication
* @throws FwException
*/
public static function app()
{
if(self::$_appInstance==null)
{
//Fw::$_appInstance = new Application();
throw new FwException("App Not initi... | true |
3a356b1abd19bad476af276457d04f711503df07 | PHP | arminlinzbauer/shard-cache | /src/Cacheables/Entity.php | UTF-8 | 974 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace ShardCache\Cacheables;
use ShardCache\ShardCache;
/**
* Class Entity
* @package ShardCache\Cacheables
*/
abstract class Entity
{
/** @var string */
private $guid;
/** @var string */
protected $shardCache;
public function __construct(ShardCache $shardCache, string $guid)
... | true |
53cf36e3a076c5f24c32b9c037ed5c3a712008fd | PHP | behinddesign/chalkboard | /src/AbstractDriver.php | UTF-8 | 1,970 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php namespace Behinddesign\Chalkboard;
abstract class AbstractDriver
{
protected $rawString;
protected $processConfig;
public function __construct($rawString = null)
{
if ($rawString) {
$this->setParseConfig($rawString);
}
}
/**
* {@inheritdoc}
*/
p... | true |
0029bc2dab4dec9f0f766dc853559db29876ff96 | PHP | nickysemenza/antelope | /backend/app/Http/Middleware/AdminOnly.php | UTF-8 | 559 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
class AdminOnly
{
/**
* Handle an incoming request.
* Only allows users who have the is_admin flag.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
*
* @return mixed
*/
public functi... | true |
b38edfefbea921093a111ae3164e1d83a5718802 | PHP | MicheasRosenkreuz/DBS-2017 | /semestral/HealthOne/app/kontrolery/home.php | UTF-8 | 580 | 2.609375 | 3 | [] | no_license | <?php
namespace app\kontrolery;
/*
* Home controller
* ukazka pouziti View
*/
use core\Controller;
use core\View;
class Home extends Controller {
public function __construct() {
$this->setTemplate('app/sablony/default');
// $this->openDatabaseConnection();
}
/**
* zakladni metoda ... | true |
7f00e6540d5247b020d21a8f574f436053791fd6 | PHP | lhnam298/google-calendar-line-reminder | /ReminderBot.php | UTF-8 | 1,382 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
require_once __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/const.php';
require_once __DIR__ . '/DBConnection.php';
class ReminderBot {
private $_conn;
private $_httpClient;
private $_sender;
public function __construct() {
$this->_conn = new DBConnection();
$this->_httpClient = new \LINE\LI... | true |
31994a6b85c57d9298d0ff326bab8a8d86ef6cf0 | PHP | wxinheb/uenty | /vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Payment.php | UTF-8 | 473 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Faker\Provider\nl_BE;
class Payment extends \Faker\Provider\Payment
{
public static function bankAccountNumber($prefix = '', $countryCode = 'BE', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
public static function vat($spacedNationalPrefix... | true |
e9f54ef8e4a654a519b163a29e6e09987f07a8a2 | PHP | poojapawarylp/PhpMachineTest | /adduser.php | UTF-8 | 4,907 | 2.59375 | 3 | [] | no_license | <?php
require('databaseconnection.php');
$message="";
$firstnameerror=$lastnameerror= $emailerror=$doberror=$mnumerror=$designationerror=$gendererror="";
$form_flag = TRUE;
if (isset($_POST['save'])) {
if(empty($_POST["firstname"])){
$firstnameerror="firstname required";
... | true |
c3f26f58b0c11003fad155fada74eb3cc7ed655a | PHP | wearesho-team/yii2-phonet | /src/Migrations/M190221131201CreateCallTable.php | UTF-8 | 2,831 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Wearesho\Phonet\Yii\Migrations;
use yii\db\Migration;
/**
* Class M190221131201CreateCallTable
*/
class M190221131201CreateCallTable extends Migration
{
protected const ENUM_CALL_TYPE = 'phonet_call_type';
protected const ENUM_EVENT = 'phonet_event';
protected const ENUM_STATE = 'phonet... | true |
2c4699d2724a95029b3dc444cbcd7d0b98ca14ee | PHP | jsuarezik/keiron-laravel-react | /app/Http/Controllers/UserController.php | UTF-8 | 1,312 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Exception;
use Illuminate\Http\JsonResponse;
use JWTAuth;
use Hash;
use App\Models\User;
use Tymon\JWTAuth\Exceptions\JWTException;
class UserController extends Controller
{
function login(Request $request):JsonResponse
{
$cr... | true |
3000f2753d0d0274d9125a574af24458b3fa9549 | PHP | tansoft88/tutorial-management-system | /app/Controller2/TitlesController.php | UTF-8 | 2,144 | 2.859375 | 3 | [] | no_license | <?php
App::uses('AppController', 'Controller');
/**
* Titles Controller
*
* @property Title $Title
*/
class TitlesController extends AppController {
/**
* index method
*
* @return void
*/
public function index() {
$this->Title->recursive = 0;
$this->set('titles', $this->paginate());
}
/**
* view metho... | true |
4a594508b5ff8ab3ccd2262a8c9624678002b7aa | PHP | MateuxLucax/programacao-ifc | /2-ano/1Trimestre/ExerciciosEstruturaDeSelecaoII/Exercicio12.php | UTF-8 | 1,561 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt-BR" />
<?php
$nota1 = isset($_POST['n1'])?$_POST['n1']:7;
$nota2 = isset($_POST['n2'])?$_POST['n2']:7;
$nota3 = isset($_POST['n3'])?$_POST['n3']:7;
?>
<head>
<meta charset="UTF-8" />
<title>Exercicio 12</title>
<meta name="viewport" content="width=device-width, initial-scale=... | true |
ac72b4b779160dc82a8e0742d2d4896a07b8a099 | PHP | picqer/exact-php-client | /src/Picqer/Financials/Exact/Persistance/Storable.php | UTF-8 | 1,759 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Picqer\Financials\Exact\Persistance;
use Picqer\Financials\Exact\ApiException;
use Picqer\Financials\Exact\Connection;
trait Storable
{
/**
* @return bool
*/
abstract public function exists();
/**
* @param array $attributes
*/
abstract protected function fill(arra... | true |
746938b126f1fd94d0879432564d8241d122db15 | PHP | treverson/coinflip | /src/AppBundle/DataFixtures/ORM/LoadGameData.php | UTF-8 | 1,522 | 2.625 | 3 | [] | no_license | <?php
namespace AppBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use AppBundle\Entity\Game;
use AppBundle\Entity\RandomHeadTailsGenerator;
class LoadGameData extends AbstractFixture im... | true |
0bd192945dc8570bcb0db95183c2664ac4fe95a9 | PHP | admistress216/wechat_test | /wechat/Model/Wxpay.class.php | UTF-8 | 5,376 | 2.546875 | 3 | [] | no_license | <?php
namespace Model;
use Vendor\Fundation\Config;
class Wxpay {
public function retWxPayUrl() {
$jsApi = new JsApiModel();
return $jsApi->createOauthUrlForCode();
}
/**
* 微信jsapi点击支付
* @param [type] $payData [description]
* @return [type] [description]
*/
p... | true |
59954c92c8138b43441f7c7a0ad5f4197f38c41c | PHP | NastyaKos/pract | /oop.php | UTF-8 | 1,159 | 3.25 | 3 | [] | no_license | <?php
abstract class Director_Abstract
{
protected
$Builder = null;
public function __construct(Builder_Abstract $Builder)
{
$this -> Builder = $Builder;
}
public function construct()
{
$this -> Builder -> BuildPartA();
$this -> Builder -> BuildPartB();
}
}
c... | true |
bda1a4188efc4bf7b6b0ef850ed8bfd77b4aa8ce | PHP | AndreyMashukov/networkstat | /src/Networkstat.php | UTF-8 | 10,129 | 2.796875 | 3 | [] | no_license | <?php
/**
* PHP version 7.1
*
* @package AM\Networkstat
*/
namespace AM\Networkstat;
use \DOMDocument;
use \DOMXPath;
use \Logics\Foundation\HTTP\HTTPclient;
/**
* Network statistics class
*
* @author Andrey Mashukov <a.mashukoff@gmail.com>
*/
class Networkstat
{
/**
* Get networkstats
*
... | true |
bc06e6c910e3540096bd030d5ea9407bda032a69 | PHP | WebFiori/framework | /tests/webfiori/framework/test/writers/WebServiceWritterTest.php | UTF-8 | 4,915 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace webfiori\framework\test\writers;
use PHPUnit\Framework\TestCase;
use webfiori\framework\writers\WebServiceWriter;
use webfiori\http\AbstractWebService;
/**
* @author Ibrahim
*/
class WebServiceWritterTest extends TestCase {
/**
* @test
*/
public function test00() {
$writter ... | true |
df58f19c7c944f84591fdcb30cb179285f68046b | PHP | Sortia/flashcards | /app/helpers.php | UTF-8 | 1,022 | 2.734375 | 3 | [] | no_license | <?php
use Jenssegers\Blade\Blade;
use App\Models\Auth;
/**
* dump variable and die
*
* @param mixed ...$vars
*/
function dd(...$vars)
{
echo '<pre>';
foreach ($vars as $var)
print_r($var);
exit;
}
/**
* dump variable
*
* @param mixed ...$vars
*/
function d(...$vars)
{
echo '<pre>';
... | true |
70a54dac09b760769aa0e5815eff00a97b33e378 | PHP | modstart/ModStartCMS_Laravel9 | /module/Vendor/Provider/Ocr/AbstractOcrProvider.php | UTF-8 | 362 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Module\Vendor\Provider\Ocr;
abstract class AbstractOcrProvider
{
abstract public function name();
abstract public function title();
/**
* @param $imageData string
* @param $format string
* @param array $param
* @return array
*/
abstract public function getT... | true |
b84970cf05510df1c9147edf78cb9dc83acbb526 | PHP | IBMDST/iWantTo-server | /library/My/Db/MongoCollections.php | UTF-8 | 1,286 | 2.578125 | 3 | [] | no_license | <?php
class My_Db_MongoCollections extends MongoCollection
{
protected $_name = null;
public function __construct()
{
$dbConfig = Zend_Registry::get("dbConfigs");
if(!Zend_Registry::isRegistered('dbconn'))
{
try {
//mongodb://[username:password@]host1[:port1][,host2[:port2:],...]/db
... | true |
34b84f8d009a5b064ab634fffd2ce5f79b3d9c50 | PHP | Hollyn/award-admin | /app/Repositories/CandidateRepository.php | UTF-8 | 397 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\Candidate;
class CandidateRepository
{
public function getAllCandidates()
{
$candidate = Candidate::get();
return $candidate;
}
public function saveCandidate($candidateName)
{
$candidate = Candidate::firstOrCreate([
... | true |
f52dc3c851a6aedbfa884ffd088c9ee92f0454a8 | PHP | mobile-legends-gang-bang/churvanessohlord | /application/models/student_profile_model.php | UTF-8 | 2,043 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Student_profile_model extends CI_Model{
public function select(){
$this->db->order_by('lname', 'DESC');
$query = $this->db->get('student_profile');
return $query;
}
public function insert($data){
$this->db->insert_batch('student_profile', $data);
}
public function getstudents(){
$teacher_... | true |
cecb0bd8e2f438a342d7dba21c2af109d9e1f9bf | PHP | nn23nn/yotta-space | /app/Http/Requests/RoleRequest.php | UTF-8 | 1,683 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
use Illuminate\Contracts\Validation\Validator;
class RoleRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
... | true |
ef5284ea16e6dddd35d7173cf2b1b391659b68d7 | PHP | riv2/Examples_codes_not_full | /ACTUAL_NEW_Laravel_example/app/Http/Controllers/StorageController.php | UTF-8 | 863 | 2.5625 | 3 | [] | no_license | <?php
/**
* Project qpartners
* Created by danila 13.07.2020 @ 15:39
*/
namespace App\Http\Controllers;
use App\Models\MultiStorage;
use PhpParser\Node\Expr\AssignOp\Mul;
class StorageController extends Controller
{
public function getMaterial($type, $file)
{
$f = "materials/{$type}/" . $file;
... | true |
a002632603292e4fe1156c89c1cb81758910d5cc | PHP | derilkillms/pdo-orm | /Database.php | UTF-8 | 4,818 | 3.125 | 3 | [] | no_license | <?php
/**
* Author : Muhammad Deril
* URI : http://www.derillab.com
* Github : @derilkillms
*/
class Database{
private $dbh;
private $stmt;
public function __construct(){
GLOBAL $CFG;
//database source name
$dsn = $CFG->dbtype.':host='.$CFG->dbhost.';dbname='.$CFG->dbname;
$option = [... | true |
14fe499fa89635a5aca9fca3f85bf1fefb2951d0 | PHP | dotkernel/dot-mapper | /src/Utility.php | UTF-8 | 2,712 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @see https://github.com/dotkernel/dot-mapper/ for the canonical source repository
* @copyright Copyright (c) 2017 Apidemia (https://www.apidemia.com)
* @license https://github.com/dotkernel/dot-mapper/blob/master/LICENSE.md MIT License
*/
declare(strict_types = 1);
namespace Dot\Mapper;
/**
* Class ... | true |
61c71dd6499e30fb5b8493e76e41aef60753be08 | PHP | goukenn/balafon-modules-igk-js-VueJS | /Lib/Classes/Html/CoreNode.php | UTF-8 | 448 | 2.65625 | 3 | [] | no_license | <?php
namespace igk\JS\VueJS\Html;
use IGKException;
use IGKHtmlItem;
/**
* abstract core node
* @package igk\JS\VueJS\Html
*/
abstract class CoreNode extends IGKHtmlItem{
const MEMORY_HISTORY = "memory";
const HASH_HISTORY = "hash";
const WEB_HISTORY = "web";
/**
*
* @param mixed $tagn... | true |
49df4def9b4793ef75f8e03906ec4cc8f6f19d56 | PHP | asafematos/cursos_php_basico | /1/5-().php | UTF-8 | 70 | 3 | 3 | [] | no_license | <?php
$x= 100000;
$y= 3;
$z= 2;
$result= ($x+$y)/$z;
print $result; | true |
87b89677ea48668af8440c361acbc8b288d6c473 | PHP | AminulCSE/versityproject2 | /app/Http/Controllers/WishlistController.php | UTF-8 | 1,562 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use DB;
class WishlistController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function addWishList($product_id){
if (Auth::check()) {
$dat... | true |
be15b15eb2b7b33a08abce943523a1b83e401ca3 | PHP | tagadvance/Elephant-Encryption | /src/tagadvance/elephant/cryptography/CertificateSigningRequest.php | UTF-8 | 2,544 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace tagadvance\elephant\cryptography;
class CertificateSigningRequest {
/**
*
* @var resource
*/
private $csr;
/**
*
* @param ArrayBuilder $builder
* @param PrivateKey $privateKey
* @throws CryptographyException
* @return self
*/
static functi... | true |
e77c4655f584ad7542d3e831a2e78578a058b1f3 | PHP | esironal/saved.io | /protected/migrations/m140608_191925_add_bookmarks.php | UTF-8 | 729 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class m140608_191925_add_bookmarks extends CDbMigration
{
public function up()
{
$this->createTable('bookmarks', [
'id' => 'pk',
'user_id' => 'integer NOT NULL',
'list_id' => 'integer',
'title' => 'string',
'domain' => 'string',
'url' => 'string',
'addition_date' => 'datetime NOT NULL',
... | true |
807d9d92e7787a4a1cb19f6290a0a955b32a654b | PHP | VladimirKorobeynik/HomeControl | /web/registration.php | UTF-8 | 2,028 | 2.65625 | 3 | [] | no_license | <?php
require_once "Database.php";
session_start();
$name = filter_var(trim($_POST['name']), FILTER_SANITIZE_STRING);
$fullname = filter_var(trim($_POST['fullname']), FILTER_SANITIZE_STRING);
$patronymic = filter_var(trim($_POST['patronymic']), FILTER_SANITIZE_STRING);
$number = filter_var(tri... | true |
69f6571a14edfad9502b8dbc845133c503c9443e | PHP | ddiazp01/sf_initinere | /src/Entity/Ciudad.php | UTF-8 | 2,159 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\CiudadRepository")
*/
class Ciudad
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(t... | true |
1a7dbc0dca32b3cb90d74e266db98b488c3578bb | PHP | reidarsets/Web_Sprints | /Sprint08/t07/Heroes.php | UTF-8 | 1,987 | 3.25 | 3 | [] | no_license | <?php
class Heroes extends Model {
public $id;
public $name;
public $description;
public $race;
public $class_role;
function __construct() {
parent::__construct("heroes");
}
function __toString() {
return "id: $this->id\n
name: $this->name\n
... | true |
0b0fb43937a269237297743d37cade8d82eada1f | PHP | terez2/ca-database | /app/Utils/Json/AttributesValidator.php | UTF-8 | 513 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Utils\Json;
use Nette\Http\IResponse;
class AttributesValidator
{
/**
* @param $jsonData
* @param $attribute
* @return mixed
* @throws \ApiException
*/
public function getValidatedAttribute($jsonData, $attribute){
if (array_key_exists($attribute, $jsonDa... | true |
f89cd568c112454dc524ba4b6cfe304fe71baa6c | PHP | sajalmustafiz/my_cart | /backup/admin_panel/core/database/connect.php | UTF-8 | 196 | 2.578125 | 3 | [] | no_license | <?php
Class connection_admin{
protected $_$link;
function __contract($host,$user,$pass,$db){
$this->_link = mysql_connect($host,$user,$pass);
mysql_select_db($db,$this->_link);
}
}
?> | true |
5e8f79e643cbb989369f364a10d957536003c272 | PHP | umbalaconmeogia/yii-batsg | /trunk/yii-batsg/protected/tests/unit/batsg/HFileTest.php | UTF-8 | 1,568 | 2.65625 | 3 | [] | no_license | <?php
class HFileTest extends CTestCase
{
public function testRmdir() {
// test checkDirExistance (remove unexist directory).
HFile::rmdir('rootDir', FALSE); // Exception does not occur.
$this->setExpectedException('InvalidArgumentException');
HFile::rmdir('rootDir');
// Remove real director... | true |
21c53fb3f4671ed218b2c727a1e7290de9936142 | PHP | bc99/lumina-framework | /lib/lumina/nodes/Node.php | UTF-8 | 4,298 | 2.96875 | 3 | [] | no_license | <?php
namespace lumina\nodes;
use lumina\core\Object;
use lumina\nodes\Option;
use lumina\nodes\NodeList;
/**
* @method Node create($option, $nodeList)
* @method Node singleton($option, $nodeList)
* @method String className()
*/
class Node extends Object{
/**
* @var NodeList
*/
protected $children = null... | true |
e40c240b03ad0ec6b48bf5b27e6f4f9dfdae738b | PHP | piranon/URL-Shortener-service | /app/Http/Controllers/URLController.php | UTF-8 | 1,387 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Factories\URLFactoriesInterface;
use App\Services\URLService;
use Illuminate\Http\Request;
/**
* Class URLController
* @package App\Http\Controllers
*/
class URLController extends Controller
{
/**
* @var URLFactoriesInterface
*/
private $URLFactory;
... | true |
510a2823450f649b73b1fa0f575cafeee1800582 | PHP | georgechem/framework | /src/Entity/EntityInterface.php | UTF-8 | 204 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Entity;
interface EntityInterface
{
public function create();
public function read(int $id);
public function update(int $id);
public function delete(int $id);
}
| true |
a46a2ff62d231dddd596e47dc224040c81957e67 | PHP | TheRatG/miaox | /modules/Acs/classes/Adapter/Db/Permission.class.php | UTF-8 | 2,643 | 2.75 | 3 | [] | no_license | <?php
class Miaox_Acs_Adapter_Db_Permission extends Miaox_PDO_Table
{
protected function _init()
{
$this->setName( 'tbl_acs_permission' );
}
public function getList()
{
$query = array();
$query[] = 'SELECT';
$query[] = 'r.id as resource_id';
$query[] = ', r.name as resource_name';
$query[] = ', g.id ... | true |
6aa8eb9045640ca9b9e892acd6202ed54221c84a | PHP | Dev4Media/ngnfeed-ebay | /src/D4m/NgnFeed/Ebay/Model/SalesTax.php | UTF-8 | 1,754 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author: Raul Rodriguez - raulrodriguez782@gmail.com
* @created: 9/5/13 - 9:00 PM
*
*/
namespace D4m\NgnFeed\Ebay\Model;
class SalesTax extends Entity
{
protected $salesTaxPercent;
protected $salesTaxState;
protected $shippingIncludedInTax;
protected $salesTaxAmount;
protected $an... | true |
8b7765a89d98421d606097ec43bf684f6fcd2f5b | PHP | superchow/huajiao | /DB/test.php | UTF-8 | 4,649 | 2.875 | 3 | [] | no_license | <?php
header( "Access-Control-Allow-Origin:*");
header('Access-Control-Allow-Methods:POST');
// 响应头设置
header('Access-Control-Allow-Headers:x-requested-with,content-type');
include 'db.php';
/* 判断是否有身份,没有的话都去查找 太麻烦(历史纪录会带来trouble),故直接全找(效率低)
* 最好是分表,然后根据学号对应,这里是简化了
*/
changePassword('teacher')... | true |
f21bd8ed57e38621e8af2525903acceae058246c | PHP | elegantmedia/PHP-Toolkit | /tests/Unit/Helpers/ValidationHelpersTest.php | UTF-8 | 1,063 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace ElegantMedia\PHPToolkit\Tests\Unit\Helpers;
use InvalidArgumentException;
class ValidationHelpersTest extends \PHPUnit\Framework\TestCase
{
/**
*
*/
public function testValidationHelpersValidateAllPresentIfNull()
{
$this->expectException(InvalidArgumentException::class);
validate_all_prese... | true |
0948e2ef84c667592ca3c9f73d770ff5982c6908 | PHP | ezsystems/ezplatform-link-manager | /src/lib/API/Repository/Values/Query/Criterion/Pattern.php | UTF-8 | 367 | 2.609375 | 3 | [] | no_license | <?php
namespace EzSystems\EzPlatformLinkManager\API\Repository\Values\Query\Criterion;
class Pattern extends Matcher
{
/**
* @var string|null
*/
public $pattern;
/**
* Pattern constructor.
*
* @param string|null $pattern
*/
public function __construct($pattern = null)
... | true |
80d2ac1a80c65b40600d215900d02dd606c98ae3 | PHP | subterranwars/legacy | /www/spiel/truppenverband.php | UTF-8 | 11,730 | 2.703125 | 3 | [] | no_license | <?php
//Includes
require("../includes/login_check.php");
//Welche IDs haben Kaserne und Waffenfabrik
$kaserne_id = 29;
$waffenfabrik_id = 31;
//Wenn User kasrne oder Waffenfabrik hat weitermachen
if( $_SESSION['user']->getGebäudeLevel($kaserne_id) > 0 || $_SESSION['user']->getGebäudeLevel($waffenfabrik_id... | true |
134f87b96be066e99562800bf211ee2e0e4fc41e | PHP | chimboveronica/k-parking | /php/administracion/zona/read.php | UTF-8 | 1,983 | 2.515625 | 3 | [] | no_license | <?php
require_once('../../../dll/conect.php');
if (!$mysqli = getConectionDb()) {
echo "{success:false, message: 'Error: No se ha podido conectar a la Base de Datos.<br>Compruebe su conexión a Internet.',state: false}";
} else {
function coneccion() {if (!$mysqli = getConectionDb()) {} else {retur... | true |
55503938fbd270f4fef6b57cb52282b3c4a010f1 | PHP | fdriteh/autotrolej | /potvrda_registracije.php | UTF-8 | 2,914 | 2.53125 | 3 | [] | no_license | <?php
session_start();
include 'includes/connection.php';
include 'includes/functions.php';
$con = new mysqli($host, $username, $password, $db);
$ime = !empty($_POST['ime']) ? $_POST['ime'] : '';
$prezime = !empty($_POST['prezime']) ? $_POST['prezime'] : '';
$adresa = !empty($_POST['adresa']) ? $_POST['adresa... | true |
fe0fcdbf8bc5c21afe2d9f808362cefd92c1d9bb | PHP | bytecodeman/Silvestri-s-Special-Apps-Center | /wordscape/index.php | UTF-8 | 13,917 | 2.546875 | 3 | [] | no_license | <?php
error_reporting(E_ALL | E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
set_time_limit(0);
spl_autoload_register(function ($class_name) {
require_once $class_name . '.php';
});
require "../library/php/dbconnect.php";
require "../library/php/library.php";
require "secret/recaptcha.php";
function logAccess($lett... | true |
4ea97210364b39c5e35f8370876661ec6d70abc8 | PHP | valdipietro/cenozo | /api/ui/push/note_delete.class.php | UTF-8 | 945 | 2.671875 | 3 | [] | no_license | <?php
/**
* note_delete.class.php
*
* @author Patrick Emond <emondpd@mcmaster.ca>
* @package cenozo\ui
* @filesource
*/
namespace cenozo\ui\push;
use cenozo\lib, cenozo\log;
/**
* push: note delete
*
* Add a delete note to the provided category.
* @package cenozo\ui
*/
class note_delete extends \cenozo\u... | true |
0b4e358c2464fca79dc36315db7fedeab4f74e10 | PHP | thiagolopescury/udemyHCODE | /funcoes/exemplo8.php | UTF-8 | 235 | 3.953125 | 4 | [] | no_license | <?php
function soma(int ...$valores): string
{
return array_sum($valores);
}
echo soma(10, 10, 10, 10, 10);
echo "<br>";
echo soma(20, 10);
echo "<br>";
echo soma(30, 10);
echo "<br>";
echo 'Curren PHP version: '. phpversion();
| true |
31d35df63d641f5cd64179698586febde93dcd63 | PHP | yingchaoOrg/tester_demo | /src/Framework/Timeer.php | UTF-8 | 829 | 3 | 3 | [] | no_license | <?php
namespace mtf\Framework;
use SebastianBergmann\Timer\Duration;
/**
* Description of Timeer
* 计时器,支持多次取结束时间
* @author dongasai
*/
final class Timeer
{
/**
* @var float
*/
private $startTimes;
public function start()
{
if ($this->startTimes) {
throw new \mtf\Ex... | true |
3be240be38e23cd7c0588658751871383e530c9d | PHP | tri-deptech/algorithms-and-data-structures | /php/radix_trie_2.php | UTF-8 | 7,100 | 3.09375 | 3 | [] | no_license | <?php
class Node
{
public $key;
public $value = null;
public $isValue = false;
public $children = [];
public function __construct($key)
{
$this->key = $key;
}
public function setValue($value)
{
$this->value = $value;
$this->isValue = true;
}
public... | true |
5aa9537ad49f0e1f72985c1c3a0b8c13157ac0fd | PHP | Tylerian/Illuminate-OAuth2-Server | /migrations/CreateOauth2TokenAccessTable.php | UTF-8 | 903 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateOAuth2TokenAccessTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('oauth2_tokens_access', function (Blueprint $... | true |
013beb440d714aab427872247994959096318cda | PHP | andreiFeelUnique/SRL-PHP | /src/Language/Methods/AsMethod.php | UTF-8 | 418 | 3 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace SRL\Language\Methods;
use SRL\Interfaces\Method;
/**
* Method having simple parameter(s) ignoring "as".
*/
class AsMethod extends Method
{
public function setParameters(array $params) : Method
{
$params = array_filter($params, function ($item) {
return !is_string($item) ... | true |
50da39cc640429f09f2c20c111b541a899bdf45a | PHP | cekip88/Leka | /dev_back/front/core/goodser.class.php | UTF-8 | 4,099 | 2.71875 | 3 | [] | no_license | <?php
include_once "db.class.php";
include_once "frontDb.class.php";
class Goodser{
private $db;
private static $frontDb;
function __construct(){
$this->db = new Db();
self::$frontDb = new Db();
}
function getGoods($goodsData){
$goodsData = (object)$goodsData;
$perPage = $goodsData->perPage;
$page = $g... | true |
2fac492a37826afff2797585623ec0797b1a2e96 | PHP | kamikazeovrld/rr | /app/resources/User.php | UTF-8 | 2,902 | 2.796875 | 3 | [] | no_license | <?php
namespace resources;
use wip\Resource;
use models\User_model;
class User extends Resource{
function __construct(){
parent::__construct();
}
function get($base, $args){
if(isset($args['id'])){
//id given
if(isset($args['action'])){
//action g... | true |
99f9963e210483a78139e52c52a510027247132b | PHP | paololeg/sistema3 | /acceso/modelografico.php | UTF-8 | 641 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
class modeloGrafico{
private $conexion;
function __construct() {
require 'conexion.php';
$this->conexion = new conexion();
$this->conexion->conectar();
}
function traerDatosGraficoBar(){
$sql = "CALL SP_DATOSGRAFICO_BAR";... | true |
639c599564218a3950a934d43a632d6a65d43865 | PHP | jorgecabane/gemar | /query/get_usersjson.php | UTF-8 | 928 | 2.8125 | 3 | [] | no_license | <?php
/*
* get_users funcion que se conecta al a base de datos para entregar la informacion de todos los usuarios
* o uno especifico si hay una variable $_POST['$user_id'] que indique id
*
*/
include_once dirname(__FILE__).'/conexion.php'; // archivo de conexion local
function get_usersjson($user_id = null) {
global... | true |
c720ade3141df4d2e57d7b7c1da638b5cc1883ad | PHP | skyameny/blw | /extend/core/service/interf/Searchable.php | UTF-8 | 243 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace core\service\interf;
/**
* 可循环查询的
* @author keepwin100
*
*/
interface Searchable
{
/**
* 可以循环
* @param array $condition
*/
public function searchInstances(array $condition=[]);
} | true |
6e5a4ec5addbdd9ad256ff6d2a03099bbdd7248a | PHP | billiegate/Bitgo-PHP-SDK | /packages/theleastcode/bitgo/src/Api/Wallet/Freeze.php | UTF-8 | 1,586 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Api\Wallet;
use Common\BitgoModel;
/**
* Class Freeze
*
* Parameters for the type
*
* @package Api\Wallet
*
* @property string time
* @property string expires
* @property integer duration
*/
class Freeze Extends BitgoModel
{
... | true |
cccd84f2c9edd4426a4df63e5a5178f36f3ea087 | PHP | joelsantiago/Store_dynamic | /php/functions.php | UTF-8 | 13,821 | 2.546875 | 3 | [] | no_license | <?php
session_start();
$Department_id = $_GET['Department_id'];
$Product_id = $_GET['Product_id'];
//$date = date('F j, Y');
/*
*
*/
function displayCart() {
$cart = $_SESSION['cart'];
if (!$cart) {
return '<li><a href="cart.php">Cart: 0 items</a></li>';
} else {
$items = explode(',',$cart);
$s = (count($ite... | true |
d4e83713c3ab7af6285acae393d274b69292ace3 | PHP | heshamelmasry77/tic-tac-toe | /Api/app/Actions/MoveToNextCell.php | UTF-8 | 1,424 | 3.03125 | 3 | [] | no_license | <?php
namespace App\Actions;
use App\Events\MovePlayed;
use App\Models\Cell;
use App\Models\Game;
use App\Robot\Contracts\Player;
use Spatie\QueueableAction\QueueableAction;
class MoveToNextCell
{
use QueueableAction;
/**
* The AI robot player.
*
* @var Player
*/
protected $robot;
... | true |
518349deff8ed96b11db14a4294897df80deb711 | PHP | rasheedromana97/Secure_App_Development | /project/database.php | UTF-8 | 4,485 | 2.671875 | 3 | [] | no_license | <?php
$mysqli = new mysqli('localhost','rasheedr1','S3cuReA99','secad_sm19');
if($mysqli->connect_errno){
echo "Connection to the database failed..";
exit();
}
function getpostowner($postID){
global $mysqli;
$prepared_sql = "SELECT postowner FROM posts WHERE postID = ?;";
//echo "Postid : $postID";
... | true |
afb2d8df91c574d4f7a1cef0bda328935ca3a681 | PHP | sjinks/em_login_as | /core.php | UTF-8 | 2,090 | 2.546875 | 3 | [] | no_license | <?php
/*
Plugin Name: EM Log In As
Version: 1.0
Description: This plugin allows you to log in as a different user
Plugin URI: http://www.extrememember.com/
Author: Extreme Member
Author URI: http://blog.sjinks.pro/
*/
defined('ABSPATH') or die();
class EM_LogInAs
{
public static function instance()
{
static $self... | true |
f958a8f8e71585c609841e1367bf264bc3a37583 | PHP | WsdlToPhp/PackagePayPal | /src/StructType/RiskFilterListType.php | UTF-8 | 3,741 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace PayPal\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for RiskFilterListType StructType
* Meta information extracted from the WSDL
* - documentation: Details of Risk Filter.
* @subpackage Structs
* @author WsdlToPhp <contact@wsdltophp.com>
*/
class RiskFilter... | true |
5f179cf3361f0cb85417831a9b94976df3d70fe0 | PHP | phpbrew/PEARX | /src/PEARX/Utils.php | UTF-8 | 534 | 2.71875 | 3 | [] | no_license | <?php
namespace PEARX;
use DOMDocument;
use Exception;
class Utils
{
static function create_dom()
{
$dom = new DOMDocument('1.0');
$dom->strictErrorChecking = false;
$dom->preserveWhiteSpace = false;
$dom->resolveExternals = false;
return $dom;
}
static functio... | true |
058dce5bb7c427905fe8910bc0eb5e5c3feca90e | PHP | meshab123/nova.social | /website/vendor/usaws/classes/meetings.php | UTF-8 | 2,518 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
class Meeting {
//array to hold the various key / values associated with a meeting
public $meetings;
public $meeting_count = 0;
public function __construct() {
// load meetup data into associative array
$json = file_get_contents("../vendor/usaws/data/meetups.json");
$thi... | true |
01e2cbe2a50ab2f4ed0c21402a5ec2adad1b0c02 | PHP | PooriaFarhad/email-crawler | /src/Lib/UrlHelper.php | UTF-8 | 739 | 3.046875 | 3 | [] | no_license | <?php
namespace App\Lib;
class UrlHelper
{
public static function getPathAndQuery(array $urlComponents): string
{
$result = '';
if (isset($urlComponents['path'])) {
$result .= $urlComponents['path'];
}
if (isset($urlComponents['query'])) {
$result .= '?'... | true |
5fc43d1e1ace6e89771c82e49c0bbf9e9d18d204 | PHP | jessiesiat/laradev | /migrations/2012_07_12_072314_create_laradev_books_table.php | UTF-8 | 680 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
class Laradev_Create_Laradev_Books_Table {
/**
* Make changes to the database.
*
* @return void
*/
public function up()
{
Schema::create('laradev_books', function($table){
$table->increments('id');
$table->string('title', 64);
$table->text('desc');
$table->string('author', 128);
$tab... | true |
311bb2d453ce487e34b90733d8a8e4f867674f4a | PHP | SergeyKostylev/soft_code-module- | /src/Model/Form/AddNewsForm.php | UTF-8 | 1,956 | 2.984375 | 3 | [] | no_license | <?php
namespace Model\Form;
class AddNewsForm
{
public $name;
public $category;
public $news_body;
public $title_image;
public $analitic;
public function __construct($name, $category, $news_body, $title_image,$analitic)
{
$this->name = $name;
$this->category = $category;
... | true |
faed9a532e4f0e0f1706cde11dd3a137bc25d25c | PHP | comaw/stomat | /backend/models/ItemPriceForm.php | UTF-8 | 3,258 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* powered by php-shaman
* ItemPriceForm.php 23.04.2016
* stomat
*/
namespace backend\models;
use Yii;
use yii\base\Model;
class ItemPriceForm extends Model
{
public $file;
const FILENAME = 'price_update.xlsx';
/**
* @inheritdoc
*/
public function rules()
{
retur... | true |
917c0b5c373653e607ad6359654f856fb8f9dea7 | PHP | DaveyJake/USARugbyStats.com | /module/UsaRugbyStats/RemoteDataSync/src/Jobs/SyncPlayer.php | UTF-8 | 12,433 | 2.515625 | 3 | [] | no_license | <?php
namespace UsaRugbyStats\RemoteDataSync\Jobs;
use UsaRugbyStats\Competition\Service\TeamService;
use ZfcUserAdmin\Service\User as UserService;
use Zend\Form\FormInterface;
use UsaRugbyStats\Account\Entity\Account;
use Zend\Math\Rand;
use Zend\Stdlib\ArrayUtils;
use UsaRugbyStats\Competition\Entity\Team;
use UsaRu... | true |
153cdd3b145eec8d8b491da56b8e3a1beb613c82 | PHP | theredhead/red.web | /src/lib/red/web/ui/webpageplugin.php | UTF-8 | 731 | 3.0625 | 3 | [] | no_license | <?php
namespace red\web\ui
{
use \red\IPlugin;
use \red\Obj;
abstract class WebPagePlugin extends Obj implements IWebPagePlugin
{
/**
* @var \red\web\ui\WebPage
*/
private $page;
/**
* Assign a page to this plugin
*
* @abstract
* @param WebPage $webPage
* @return void
*/
public fu... | true |
8c38b89c57601c018c7051a8e66a8f4b0e737bf8 | PHP | Dalee/pp-core | /lib/User/auth.class.inc | UTF-8 | 3,131 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use PP\Lib\Auth\AuthInterface;
use PP\Lib\Auth\AuthException;
class PXUserAuthorized extends PXUser
{
protected $authDriverRemap = [
'session' => PP\Lib\Auth\Session::class,
];
/**
* @param $what string|string[] single rule or array of rules for special behaviour,
* which provide "ANY" logic, so we ca... | true |
87dcfcec1c8d9314f531319bed7e0c9948667729 | PHP | Andrelua/conexao-ajuda | /src/Conex/Utils/Date.php | UTF-8 | 223 | 2.9375 | 3 | [] | no_license | <?php
namespace Conex\Utils;
final class Date
{
public static function format(string $date): string
{
$date = explode('-', $date);
return sprintf('%s/%s/%s', $date[2], $date[1], $date[0]);
}
} | true |
ae6196ecbb54dab812f29f1fd3c620cf7b149fc4 | PHP | prislanovia/CookAja-1 | /app/models/ReviewModel.php | UTF-8 | 881 | 3.21875 | 3 | [] | no_license | <?php
class Ulasan
{
private $id;
private $ulasan;
private $bintang;
private $id_user;
private $table = 'ulasan_resep';
private $db;
function __construct ()
{
$this->db = Database::getInstance();
}
f... | true |
5e070f870cb278e7097221c8f0350eea71c45783 | PHP | LegendRiver/FBAW_Project | /src/server/interface/FBInterface/builder/LocationTargetingBuilder.php | UTF-8 | 2,813 | 2.828125 | 3 | [] | no_license | <?php
use FacebookAds\Object\Fields\TargetingGeoLocationFields;
class LocationTargetingBuilder implements IFieldBuilder
{
//小的区域不能包含在大的区域内
private $countryArray = array();
//二维数组
private $regionArray = array();
//二维数组
private $cityArray = array();
private $locationTypeArray = array();
... | true |
24f6595b54b5c668f4fa995848ebc611b528ba9b | PHP | amin1988/gare | /class/Accorpamenti.php | UTF-8 | 3,336 | 3 | 3 | [] | no_license | <?php
if (!defined("_BASEDIR_")) exit();
/*
Kata:
stili
eta (solo se etamin = etamax-1)
sesso
no cinture
Sanbon:
cinture
peso
eta
no sesso
Ippon:
eta
cinture
no sesso
*/
class Accorpamenti {
/**
* @param Categoria $cat
* @param Categoria[] $lista
* @param boolean $forza
*/
public static function ordin... | true |
6abdb25718898889a61b3f9ee1d48dbc48f1ba44 | PHP | hoangvanngoc/AHT-MVC | /mvc/Models/Task.php | UTF-8 | 605 | 2.765625 | 3 | [] | no_license | <?php
namespace mvc\Models;
use mvc\Core\Model;
class Task extends Model
{
protected $id;
protected $title;
protected $description;
public function setId($id)
{
$this->id = $id;
}
public function setTitle($title)
{
$this->title = $title;
}
public function setDs... | true |
97aa33451cb186e3e668ece431596d9914e46b43 | PHP | Lordjago/Siwes | /libraries/functions/functions.php | UTF-8 | 19,106 | 2.75 | 3 | [] | no_license | <?php
//To protect all input by the user from SQL Injection, truncate html tags and trim white spaces
function protect($data){
global $db;
$data = $db->real_escape_string(htmlentities(trim($data)));
return $data;
}
//To run the sql query
function run_query($sql){
global $db;
$runs = mysqli_query($db, $s... | true |
fc91c05c85d00cbe6cc42c93ededb1d32702ff30 | PHP | wf3-fullstack/cours | /exos/poo-constructeur.php | UTF-8 | 1,140 | 3.5 | 4 | [] | no_license | <?php
class View
{
// METHODES "MAGIQUES"
// CONSTRUCTEUR (NOM OBLIGATOIRE __construct)
// $objetView = new View;
function __construct()
{
echo "<h2>__construct</h2>";
}
// DESTRUCTEUR (NOM OBLIGATOIRE __destruct)
// DECLENCHE QUAND ON DETRUIT LA VARIABLE
function __destruc... | true |
941353f8e1fd4ebeae2bb0843a890e5d8275b831 | PHP | hfutxrl2011/cliframework | /packworker/libs/Logic/Package.class.php | UTF-8 | 11,794 | 2.546875 | 3 | [] | no_license | <?php
class Package {
//从母包拷贝文件
public function copyPackageCodes($src, $des, $downloadDir) {
VseLog::TRACE('Destination file directory start to create');
if(file_exists($des)) {
$cmd = 'rm -rf '. $des;
$status = Utils::shellExec($cmd);
if(!$status) {
VseLog::TRACE('Delete old file directory fai... | true |
de171ab14a05a0c1c954be8f8b939f45c57475f7 | PHP | llstarscreamll/kirby-api | /packages/kirby/core/src/Abstracts/FormRequestAbstract.php | UTF-8 | 1,707 | 2.96875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Kirby\Core\Abstracts;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Arr;
/**
* Class FormRequestAbstract.
*
* @author Johan Alvarez <llstarscreamll@hotmail.com>
*/
class FormRequestAbstract extends FormRequest
{
/**
* Auth user must have ANY of the given roles or per... | true |
35efc7523d0fcdb7889c12279b737fd62eee1881 | PHP | jaspergar/Brgy4All | /database/migrations/2021_03_28_174442_create_brgy__workers_table.php | UTF-8 | 915 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBrgyWorkersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('brgy__worke... | true |
9a5ba2049c449b9e2dfd95b49ba1c6ba5baaee12 | PHP | MinifyJS/MinifyJS | /jsmin/nodes/or_expression.php | UTF-8 | 2,092 | 2.9375 | 3 | [] | no_license | <?php
class OrExpression extends BinaryExpression {
public function __construct(Expression $left, Expression $right) {
parent::__construct(OP_OR, $left, $right);
}
public function visit(AST $ast, Node $parent = null) {
$that = parent::visit($ast, $parent);
$else = $that->left->asBoolean();
if (... | true |
35971d029f57e8e3526b6a2fcabaaee46ffe750a | PHP | mariuszjarzab/zf3 | /module/Application/src/Application/Service/CommandServiceFactory.php | UTF-8 | 1,405 | 2.625 | 3 | [] | no_license | <?php
namespace Application\Service;
use Interop\Container\ContainerInterface;
use Interop\Container\Exception\ContainerException;
use Zend\ServiceManager\Exception\ServiceNotCreatedException;
use Zend\ServiceManager\Exception\ServiceNotFoundException;
use Zend\ServiceManager\Factory\FactoryInterface;
use Zend\Servic... | true |
4032fc0f858917366ab49f4f631f466d2fd5b736 | PHP | ochavezwilfredc/corte3 | /modelo/Huesped.php | UTF-8 | 4,977 | 3.125 | 3 | [] | no_license | <?php
require_once("Conectar.php");
class Huesped extends Conectar
{
private $idhuesped, $nombre, $cedula, $telefono, $email, $direccion;
// Fuente: https://desarrolloweb.com/articulos/sobrecarga-constructores-php.html
function __construct()
{
$params = func_get_args();
... | true |
2e1855b0630bc4cf4c958d5521e43a6f468bef0c | PHP | thomas-v/gestion | /application/controllers/Opportunities.php | UTF-8 | 9,291 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Opportunities extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->output->enable_profiler(true);
$this->load->model('category_database_model', 'category_database');
$th... | true |
4e003b5299a8d94d574238b3486ab66f736c23b8 | PHP | Iskalpero/PHP-MySQL | /1월 24일자/var.php | UTF-8 | 423 | 3.265625 | 3 | [] | no_license | <?php
$aaa="사과";
echo "<br>";
echo "맛있는"."$aaa"." 입니다.<br>";
echo "맛있는$aaa 입니다.";
$bbb = "오렌지";
echo "<br>";
echo $bbb;
$ccc = 100;
echo "<br>";
echo $ccc;
echo "<br>".$aaa.$bbb.$ccc;
echo "<br>".$aaa."와 ".$bbb."를 ".$ccc."개 구입했어요";
echo "<br> {$aaa}와 {$bbb}를 {$ccc}개 구입했어요";
echo "<br> {$aaa}와 {$bbb}를 ";
echo "{$ccc... | true |
d76d8b4a76f9e6ce023d27f0dc727f91865edbce | PHP | Avariya/Elastica | /tests/Query/TermsTest.php | UTF-8 | 2,462 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Elastica\Test\Query;
use Elastica\Document;
use Elastica\Exception\InvalidException;
use Elastica\Query\Terms;
use Elastica\Test\Base as BaseTest;
/**
* @internal
* @group unit
*/
class TermsTest extends BaseTest
{
public function testSetTermsLookup(): void
{
$terms = [
... | true |
983910636425991e750b1e4601c5a4d5b1c5aaa3 | PHP | pedramfeyz/library-app | /searchbook.php | UTF-8 | 2,275 | 2.671875 | 3 | [] | no_license | <?php
require 'connect.php';
$str=filter_var($_GET['book'], FILTER_SANITIZE_STRING);
$str=mb_strtoupper($str, 'UTF-8');
$str1= '/'.$str.'/' ;
// select the intended book from database based on what user type in searchbox
function searchbook(){
$query="SELECT isbn,mix FROM libbook";
$result=mysql_query($qu... | true |
32ad7f72c3070ddfb5365e14c1777ad63fefd75e | PHP | moharifhidayat/tracks | /database/seeds/AlbumTableSeeder.php | UTF-8 | 1,729 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Communicator;
class AlbumTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$letters = ["#","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W"... | true |
ad6940c651e24a35222b9e4f45729c4e0d511c0c | PHP | xiongbenwu/rageframe2 | /addons/RfArticle/uninstall.php | UTF-8 | 851 | 2.578125 | 3 | [] | permissive | <?php
namespace addons\RfArticle;
use Yii;
use backend\interfaces\AddonWidget;
/**
* 卸载
*
* Class UnInstall
* @package addons\RfArticle
*/
class UnInstall implements AddonWidget
{
/**
* 表前缀
*
* @var string
*/
protected $table_prefixion = "rf_addon_";
/**
* 列表
*
* @... | true |
1decfec46dc39d7af0450912e13c73924fbcc55c | PHP | pframework/p-input | /source/P/InputProcessResult.php | UTF-8 | 1,623 | 2.75 | 3 | [] | no_license | <?php
namespace P;
/**
* @property \ArrayObject $errors
*/
class InputProcessResult
{
protected $values = array();
protected $mappedNames = array();
protected $errors = null;
public function __construct()
{
$this->errors = new \ArrayObject(array(), \ArrayObject::ARRAY_AS_PROPS);
}... | true |
194aae404de583e35af12ae9df08fd9cd20c230b | PHP | randercarlos/before-soccer | /app/Http/Requests/PlayerFormRequest.php | UTF-8 | 857 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use App\Models\Player;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class PlayerFormRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize... | true |