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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
941359a196dc8a20344af553757442af0815b188 | PHP | incanus/drupal-dav | /contrib/dav_fs/dav_fs.admin.inc | UTF-8 | 1,443 | 2.5625 | 3 | [] | no_license | <?php
// $Id$
/**
* @file
* DAV FS admin page callbacks.
*/
//////////////////////////////////////////////////////////////////////////////
// DAV FS settings form
function dav_fs_admin_settings() {
$form = array();
// If no setting has been saved yet, and the directory doesn't exist, show a prominent warning... | true |
ff4c3fcdd18583cc5d4e0e8feb15ad364199c9ef | PHP | zoomilar/public_html | /modules/FrontEndUsers/lib/class.feu_user_query.php | UTF-8 | 6,258 | 2.671875 | 3 | [] | no_license | <?php
class feu_user_query_opt
{
const MATCH_USERNAME = '*username*';
const MATCH_PASSWORD = '*password*';
const MATCH_EXPIRES_LT = '*expires-lt*';
const MATCH_GROUP = '*group*';
const MATCH_GROUPID = '*gid*';
const MATCH_PROPERTY = '*property*';
private $_type;
private $_expr;
private... | true |
c3687b8629a44befef4fd936a7ea15744e287826 | PHP | Sanysaif/form-data-submission-validation | /changepass.php | UTF-8 | 940 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Change Password</title>
</head>
<body>
<?php
session_start();
if($_SESSION["flag"]==true)
{
$un=$_SESSION["user"];
$myfile=fopen("".$un.".txt","r") or die("Unable to open file.");
$arr=explode(",",trim(fgets($myfile)));
if(sizeof($... | true |
515c170206bf4f57a56fa1fced231296353dd960 | PHP | anton-itscript/WM | /application/protected/commands/HeartbeatReportCommand.php | UTF-8 | 6,643 | 2.734375 | 3 | [] | no_license | <?php
/*
* Generate Heartbeat Report
* Save report in DB
* Send email with attachment .xls
*/
class HeartbeatReportCommand extends CConsoleCommand
{
// log
protected $_logger = null;
// Option
private $status;
private $email;
private $period;
private $clientName;
// report
privat... | true |
cdb314c9947ee3422b4a3ca2f154028be8139073 | PHP | takedabruno/php | /class_log.php | UTF-8 | 1,787 | 3.328125 | 3 | [] | no_license | <?php
class log{
//Exemplo de como logar a classe e método que estão sendo executados o método logMsg
//$this->log->logMsg(__METHOD__ . "-> " . "Lendo arquivo local : " . $arquivo_caminho);
function logMsg($msg, $level = 'info', $file = 'main.log'){
// variável que vai armazenar o nível d... | true |
82b5981b3c4302c0239dc86d8b441902950f83ff | PHP | mikejw/empathy | /src/Empathy/MVC/Plugin/JSONView/ROb.php | UTF-8 | 874 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Empathy\MVC\Plugin\JSONView;
class ROb extends BaseROb
{
protected $meta;
protected $data;
protected $pagination;
public function __construct()
{
$this->meta = new \stdClass();
$this->data = new \stdClass();
$this->pagination = new \stdClass();
... | true |
d7c6f4381597ef4753f7a93555f8f8b22d70c6e8 | PHP | cvdgit/stories | /common/models/TestWord.php | UTF-8 | 2,024 | 2.875 | 3 | [] | no_license | <?php
namespace common\models;
use Yii;
use yii\db\ActiveRecord;
/**
* This is the model class for table "test_word".
*
* @property int $id
* @property string $name
* @property int $word_list_id
* @property int $order
* @property string $correct_answer
*
* @property TestWordList $wordList
*/
class TestWord... | true |
83c0808caa55211065dc575da3ed22ad8edf7f9a | PHP | pedped/simpledom | /apps/core/AtaPaginator.php | UTF-8 | 8,677 | 2.734375 | 3 | [] | no_license | <?php
use Phalcon\Paginator\Adapter\Model as Paginator;
use Simpledom\Core\Classes\Config;
class AtaPaginator extends Paginator {
private $searchItemArrays = array();
private $orderItemArrays = array();
private $listPath;
private $editUrl;
private $deleteUrl;
private $tableHeaders = array();
... | true |
2a79c5e92256a6f4796284fb639b9f5d42a128c4 | PHP | RandyTaboada/PHP-Form | /PHP Site/inc/Variable.php | UTF-8 | 113 | 2.625 | 3 | [] | no_license | <?php
$variablename = "I am a Lady Boss.";
$empty_variable = "";
$eyes = "brown";
$hair = 'brown';
$age = 35;
?>
| true |
552b40bb2932a0a268b9fcceccd8205b2427308f | PHP | juliogarcia3378/totalplanning | /src/TotalPlanning/GeneralConfigBundle/Entity/Country.php | UTF-8 | 2,909 | 2.59375 | 3 | [] | no_license | <?php
namespace TotalPlanning\GeneralConfigBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Rol
*
* @ORM\Table(name="country")
* @ORM\Entity(repositoryClass="TotalPlanning\GeneralConfigBundle\Repository\CountryRepository")
*/
class Country
{
/**
... | true |
7c9c8abe23869c73a2023fdb978fc9b09c36bc8d | PHP | prakashdparmar/result-analysis | /result/export_grt80.php | UTF-8 | 1,573 | 2.734375 | 3 | [] | no_license | <?php
require_once 'dbconfig.php';
//filter excel data
function filterData(&$str){
$str = preg_replace("/\t/","\\t",$str);
$str = preg_replace("/\r?\n/","\\n",$str);
if(strstr($str,'"')) $str = '"' . str_replace('"', '""', $str) . '"';
}
//excel filename for download
... | true |
41b62cd23f0b36cc331eba9576701bafe27e66c8 | PHP | Edixon112/EBGYM | /core/app/model/RolData.php | UTF-8 | 1,119 | 2.96875 | 3 | [] | no_license | <?php
class RolData
{
public static $tablename = "rol";
public function RolData(){
$this->id = "";
$this->nombre = "";
}
public function add(){
$sql = "insert into ".self::$tablename." (nombre) ";
$sql .= "value (\"$this->nombre\")";
return Executor::doit($sql);
}
public func... | true |
6beb4b1600694c8254343046cd9820ce29da1a3f | PHP | oldDriver/test | /lib/BaseEntity.php | UTF-8 | 503 | 2.625 | 3 | [] | no_license | <?php
namespace lib;
use lib\Debug;
class BaseEntity
{
protected $id;
public function setId($id)
{
$this->id = $id;
}
public function getId()
{
return $this->id;
}
public function save()
{
$class = get_class($this).'Table';
$id = $this->getId();
... | true |
f9010ae90bcb2f14a860e35f1522ebe678e0231e | PHP | f1nder/SolutionRstBuilder | /src/Element/CommonHelper.php | UTF-8 | 929 | 3.09375 | 3 | [] | no_license | <?php
namespace Solution\RstBuilder\Element;
trait CommonHelper
{
/**
* @param $elements
* @param $glue
* @param null $prefix
* @param null $suffix
*
* @return string
*/
protected function glueElements($elements, \Closure $callback, $glue, $prefix = null, $suffix = null)
... | true |
b75bffd265f4912de393aab6e0edaa4534ead8a8 | PHP | borisaeric/dosamigos-football-laravel | /app/Http/Controllers/MatchController.php | UTF-8 | 3,994 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Match;
use App\Season;
use App\Club;
use App\Http\Resources\MatchResource;
class MatchController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public functio... | true |
2e7daa32c8a3d5888fac83987362e53e719adaf3 | PHP | Dimitri78000/rentree_2018 | /CSC4101/tp-04/todo-app/src/Controller/TodoController.php | UTF-8 | 1,771 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Gestion de la page d'accueil de l'application
*
* @copyright 2017 Telecom SudParis
* @license "MIT/X" License - cf. LICENSE file at project root
*/
namespace App\Controller;
use App\Entity\Todo;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Respons... | true |
624dd2792a407820d59a2fcdbfaa642c217650b6 | PHP | Delabove/studioweb-php | /sessions.php | UTF-8 | 468 | 2.515625 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html lang="">
<head>
<title>Ch 11</title>
</head>
<body>
<h1>PHP SESSIONS</h1>
<!--Tracks who is visiting in a dynamic website -basis of shopping carts and video games. -->
<?php
$_SESSION["favcolors"] = "green";
$_SESSION["favanimal"] = "dog";
echo "Session variable... | true |
3fb4f3223c1326e94e878104ab6a64151178d03f | PHP | JitendraSSingh/rancher-master-control | /app/Models/User.php | UTF-8 | 595 | 2.75 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class User extends Model{
protected $table = "oauth_users";
protected $fillable = ['username', 'first_name', 'last_name', 'email'];
public function setPassword($plainTextPassword){
$hashedPassword = password_hash($plainTextPassword, PASSWORD... | true |
b5adf9da6dca71b25b1db1ef71c41bac29fe0135 | PHP | Vixtrime/rank | /src/API/DataForSeoBundle/Client/RestClientException.php | UTF-8 | 682 | 2.71875 | 3 | [] | no_license | <?php
namespace App\API\DataForSeoBundle\Client;
use Exception;
class RestClientException extends Exception
{
protected $http_code;
//TODO В оригинальной либе - $http_code вставляется перед $code = 0;
public function __construct($message, $http_code, $code = 0, Exception $previous = null)
{
... | true |
a31db1bfa66474bdebc29b0b60a717f40d38b1f3 | PHP | dimnocode/projetphp | /models/utilisateur.php | UTF-8 | 3,246 | 2.671875 | 3 | [] | no_license | <?php
class utilisateur extends Model{
private $utilisateur;
private $code;
private $nom;
private $prenom;
private $admin;
private $actif;
var $id;
var $table = "utilisateurs";
var $PK = "utilisateur";
var $data;
public function titresActions(){
if... | true |
b05875aba30e822e31cc6766fb6d5f389d92e22f | PHP | SergSova/turist | /models/Comments.php | UTF-8 | 3,036 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "tur_comments".
*
* @property integer $id
* @property integer $event_id
* @property integer $user_id
* @property string $text
* @property integer $rate
*
* @property User $user
... | true |
e6201be6bd74049ff543a65210e9e689f96e2704 | PHP | php-kitchen/code-specs | /tests/Unit/Matchers/NumberMatcherTest.php | UTF-8 | 1,432 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Unit\Matchers;
use PHPKitchen\CodeSpecs\Expectation\Matcher\NumberMatcher;
use Tests\Base\BaseMatcherTest;
/**
* Unit test for {@link NumberMatcher}
*
* @method NumberMatcher createMatcherWithActualValue($actualValue)
*
* @coversDefaultClass \PHPKitchen\CodeSpecs\Expectation\Matcher\Number... | true |
9f1ad886be4117bd560b472037c48f161234835a | PHP | csrdelft/bb | /src/tag/BbDiv.php | UTF-8 | 2,167 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
namespace CsrDelft\bb\tag;
use CsrDelft\bb\BbTag;
/**
* @author G.J.W. Oolbekkink <g.j.w.oolbekkink@gmail.com>
* @since 27/03/2019
*
* @param string optional $arguments['class'] Class attribute
* @param boolean optional $arguments['clear'] CSS clear: both
* @param string optional $arguments['float'] CSS ... | true |
4b7655c8bae3a797cb8d2df9fd97433f80ecc7c7 | PHP | fresns/theme-manager | /src/Commands/Traits/StubTrait.php | UTF-8 | 7,717 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Fresns (https://fresns.org)
* Copyright (C) 2021-Present Jevan Tang
* Released under the Apache-2.0 License.
*/
namespace Fresns\ThemeManager\Commands\Traits;
use Fresns\ThemeManager\Support\Config\GenerateConfigReader;
use Fresns\ThemeManager\Support\Json;
use Fresns\ThemeManager\Support\Stub;
use Il... | true |
c803d5bb3ede83a48039716b6a768469d3d8b0f1 | PHP | skr1pmen/DiscordServers | /models/User.php | UTF-8 | 1,640 | 2.640625 | 3 | [] | no_license | <?php
namespace app\models;
use app\component\repository\UsersRepository;
use Yii;
use yii\base\BaseObject;
use yii\base\NotSupportedException;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
use yii\web\IdentityInterface;
class User extends BaseObject implements IdentityInterface
{
public $id;
... | true |
0875833fe11128391e19afc9c8a0dd1a57be49f0 | PHP | andparsons/mage-app-start | /app/code/Magento/CatalogPermissions/Model/Indexer/Plugin/AbstractProduct.php | UTF-8 | 1,210 | 2.59375 | 3 | [] | no_license | <?php
namespace Magento\CatalogPermissions\Model\Indexer\Plugin;
abstract class AbstractProduct
{
/**
* @var \Magento\Framework\Indexer\IndexerRegistry
*/
protected $indexerRegistry;
/**
* @var \Magento\CatalogPermissions\App\ConfigInterface
*/
protected $config;
/**
* @p... | true |
e45d0a4d4ab4e00b9febebb43f73b765e51b7f21 | PHP | pzohner/cs313-php | /web/dnd/character-creation.php | UTF-8 | 4,422 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html>
<?php
session_start();
?>
<html>
<head>
<meta charset="UTF-8">
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=" crossorigin="anonymous"></script>
<!-- <script src="intro/scripts.js"></script> -->
<!-- Including bootstrap -->... | true |
746a9f71ad0eaf20e8f8949ceb74d6c3564cc9c5 | PHP | lbfxq/labor-laws | /backend/utils/InfoUtil.php | UTF-8 | 1,252 | 2.578125 | 3 | [] | no_license | <?php
namespace app\utils;
use Yii;
use yii\web\Controller;
/**
* Created by PhpStorm.
* User: zn
* Date: 2017/6/15
* Time: 18:48
*/
class InfoUtil extends \yii\base\Object
{
/**
* 显示信息
* @param Controller $controller
* @param $info
* @param string $name
* @return string
* @int... | true |
24ea7e9c40f7e68c9028fac3e7546acfb154e198 | PHP | sasquath158/sinefy | /modules/openbuildings/jelly/classes/kohana/jelly/exception/methodmissing.php | UTF-8 | 696 | 2.546875 | 3 | [
"ISC",
"MIT"
] | permissive | <?php defined('SYSPATH') OR die('No direct access allowed.');
/**
* Jelly_Exception_Event class for event exceptions
*
* @package Jelly
* @author Ivan Kerin
* @copyright (c) 2012 OpenBuildings Inc.
* @license http://creativecommons.org/licenses/by-sa/3.0/legalcode
*/
class Kohana_Jelly_Exception_Meth... | true |
9cd1d5d7989d6d8d9c29df156ff323502d3bd0c4 | PHP | rodrigod89/point | /public_html/pointws/services/DepartmentService.php | UTF-8 | 1,612 | 2.734375 | 3 | [] | no_license | <?php
include ('Service.php');
define('Department', 'Department');
class DepartmentService extends Service {
public function includeSpecificFiles() {
include('../model/Department.php');
}
public function create() {
if (checkParam(Department)) {
$Department = $this->getDepartment();
return Dep... | true |
e04f49f83060e0051b8c1919e830c1af932a42e1 | PHP | othiass9/miproyecto | /app/Services/ListClases.php | UTF-8 | 322 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Clases;
class ListClases
{
public function get()
{
$clases = Clases::get();
$clasesArray[''] = 'Selecciona una clase';
foreach ($clases as $clase) {
$clasesArray[$clase->id] = $clase->clase;
}
return $clasesArray;
}... | true |
1f0c62600e51adb2b78dac7cc8608a4677f8c0b4 | PHP | qalaxy/quebec | /app/Shell/Data/RoleData.php | UTF-8 | 1,701 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Shell\Data;
class RoleData{
public $rows = 15;
public $name_key = 'name';
public $display_name_key = 'display_name';
public $description_key = 'description';
public $permission_key = 'permission';
public $permission_id_key = 'permission_id';
public $role_id_key = 'role_id';
public $owner... | true |
071759141d776ae6a94709464b59e37de9c2190c | PHP | gidzRufino/eskwela | /app/modules/reports/views/reportCard/aac_back_sh.php | UTF-8 | 25,438 | 2.765625 | 3 | [] | no_license | <?php
//get the birthday and the age before first friday of june
$firstFridayOfJune =date('Y-m-d', strtotime('first Friday of '.'June'.' '.$settings->school_year));
$bdate = $student->cal_date;
// $from = new DateTime($bdate);
// $to = new DateTime($firstFridayOfJune);
$bdateItems = explode('-', $b... | true |
6e11c53400b40fda16f50341a204fd3eb9cd3906 | PHP | leadorub/ai-email-validator | /src/AI/EmailValidator/Rules/Rule.php | UTF-8 | 1,408 | 3.3125 | 3 | [
"MIT"
] | permissive | <?php
namespace AI\EmailValidator\Rules;
/**
* Class Rule
* @package AI\EmailValidator\Rules
*/
abstract class Rule
{
/**
* Информация о результате последней проверке по правилу.
*
* @var string
*/
private string $lastCheckingStatus;
public function __construct()
{
$th... | true |
2881cbdd0bb15619f0924542794d1d909c960fb2 | PHP | curedao/curedao-sdk-php | /lib/Api/MeasurementsApi.php | UTF-8 | 95,732 | 2.515625 | 3 | [] | no_license | <?php
/**
* MeasurementsApi
* PHP version 5
*
* @category Class
* @package CureDAO\Client
* @author Mike P. Sinn
* @link https://github.com/cure-dao
*/
namespace CureDAO\Client\Api;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\M... | true |
5a6fd5922745125f9a0faa85d7a0876a0c58e08c | PHP | scottlt/Project_cs4433 | /inventory_update.php | UTF-8 | 4,082 | 2.6875 | 3 | [] | no_license | <?php
require_once('lib/01_definitions.php');
require_once('lib/02_inventory.php');
session_start();
display_html_header(__FILE__);
display_topnav(__FILE__);
display_page_messages(__FILE__);
// Form submitted
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (isset($_POST['update']... | true |
b07c3167159e1f57f440cbfae9a2c7a1a1181a7e | PHP | Akposieyefa/AishaProject | /libs/classes/DB.php | UTF-8 | 1,550 | 3.28125 | 3 | [] | no_license | <?php
/**
* class DB
*
* @author Lewis Uzoma <boblewisu@gmail.com>
* @package libs\classes
*
*/
class DB
{
private $pdo;
private $dsn;
public $config = array(
'host' => 'localhost',
'user' => 'root',
'password' => '',
'dbname' => 'gigs_orphanage',
'charset' => 'utf8'
);
function __cons... | true |
5557441057b4e69425568adfcc11b6d5b5543379 | PHP | TimbreDesignStudio/WooComm | /Change Add to Cart Name Conditionally.php | UTF-8 | 1,566 | 2.59375 | 3 | [] | no_license | /**
* Change the "Add to Cart" text on the single product page based on the product type
*
* @param string $text
* @param object $product
* @return string
*/
function wc_custom_single_addtocart_text( $text, $product ) {
switch ( $product->product_type ) {
case 'simple' : $text = 'Simple product text'... | true |
84c4f28f42ddb5fecd2a1ff82c57d865bcabc262 | PHP | rafael-oliveira-silva/sjmpts | /app/code/community/PagSeguro/Model/Carrier/frete.php | UTF-8 | 4,537 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
class PgsFrete
{
private $_use = 'curl';
private $_debug = false;
private $_methods = array('curl');
private $_result;
public function PgsFrete()
{
if ($this->debug()) {
echo "\nPgsFrete started!";
}
}
public function debug($debu... | true |
6955a1ddbbba9755bce526f579028a21f9b99613 | PHP | stepanaraqelyan/ringcentral-integration | /helpers/curl.php | UTF-8 | 724 | 2.890625 | 3 | [] | no_license | <?php
class Request {
public static function get($url) {
return self::req($url);
}
public static function post($url, $body = []) {
return self::req($url, 'POST', $body);
}
public static function req($url = '', $method = 'GET', $vars = []) {
global $cnf;
$ch = curl_init();
curl_setopt($ch, CURLOPT_UR... | true |
d80c77358268a90a554524798730e98aeac30f53 | PHP | brace-project/brace-mod-connection-info | /src/ConnectionInfoModule.php | UTF-8 | 2,038 | 2.65625 | 3 | [] | no_license | <?php
namespace Brace\Connection;
use Brace\Connection\Helper\IPSet;
use Brace\Core\BraceApp;
use Brace\Core\BraceModule;
use Phore\Di\Container\Producer\DiService;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ServerRequestInterface;
class ConnectionInfoModule implements BraceModule
{
public f... | true |
9b8e66a396044d3590f18c21b49facab0d4eb168 | PHP | Jessyfq90/ejerciciosPHP | /ejerciciosPHP/ejerciciosPHP/ejercicio2-bis/ejercicio9.php | UTF-8 | 591 | 3.203125 | 3 | [] | no_license | <?php
include"../cabecera.php";
$matriz1=array("cougar","ford",null,"2.500","v6",172);
//eliminamos un elemento
unset($matriz1[3]);
echo"<h2>Imprimo matriz con print_r</h2>";
print_r($matriz1);
echo"<h2>Imprimo matriz con var_dump</h2>";
var_dump($matriz1);
//Eliminamos lo que hay en el array usando foreach
foreach($... | true |
c157cb02593990a72c19d9d20b42a22f94e1ae7a | PHP | skymen-drudesk/pmmidev | /docroot/modules/custom/pmmi_search/src/Plugin/Block/PMMIAdminPanelAgentSearchBlock.php | UTF-8 | 1,727 | 2.515625 | 3 | [] | no_license | <?php
namespace Drupal\pmmi_search\Plugin\Block;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Form\FormBuilder;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Builds the PMMI Admin Panel Agent Search block.
*
* @Block(
* id = "pmmi... | true |
8a2c0c223bb7d8ed5a47452295d8a0a4111588ed | PHP | eusonlito/laravel-Packer | /src/Eusonlito/LaravelPacker/Providers/ProviderInterface.php | UTF-8 | 436 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Eusonlito\LaravelPacker\Providers;
interface ProviderInterface
{
/**
* @param array $settings
* @return string
*/
public function __construct(array $settings);
/**
* @param string $file
* @param string $base
* @return mixed
*/
public function pack... | true |
88b2d3628095366a72b13d23af3317b5991fea09 | PHP | rsantos2018/501 | /Aula09/mvc/app/Model/UsuariosModel.php | UTF-8 | 375 | 2.671875 | 3 | [] | no_license | <?php
namespace Model;
use Model\Mapper\UsuariosMapper;
use Model\Entity\Usuarios;
class UsuariosModel
{
private $usuariosMapper;
public function __construct(){
$this->usuariosMapper = new UsuariosMapper();
}
public function all(){
return $this->usuariosMapper->buscarTodos();
}
public function inser... | true |
592888b667ed0efeaa2f88286ea034535596afca | PHP | migda/gugik-php-sdk | /src/GugikResponse.php | UTF-8 | 1,446 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Migda\GugikSdk;
use Migda\GugikSdk\Exceptions\GugikResponseException;
class GugikResponse
{
protected $statusCode;
protected $headers;
protected $body;
protected $decodedBody = [];
/**
* GugikResponse constructor.
* @param $response
* @throws GugikResponseException... | true |
9045ff6ebaea64e6ff1eac1f0ba0a1dc8c550e63 | PHP | jlshipman/msbwc | /library/Larc/Comment.php | UTF-8 | 2,678 | 3.171875 | 3 | [] | no_license | <?php
/**
* Defines a class with methods for parsing code comments.
*
* @package Larc
* @subpackage Comment
* @author Cory R. Gilbert <cory.r.gilbert@nasa.gov>
*/
/**
* Defines a class with methods for parsing code comments.
*
* @package Larc
* @subpackage Comment
* @author... | true |
7e2a5ffa1fbe9a044620ccb35e2223254a5de371 | PHP | getmonitor/ZeeJong | /core/controller/createGroup.php | UTF-8 | 1,819 | 3 | 3 | [] | no_license | <?php
/*
File to create a new group
*/
namespace Controller {
require_once (dirname(__FILE__) . '/../config.php');
// Require config file containing configuration of the database
require_once (dirname(__FILE__) . '/../database.php');
// Require the database file
require_once (dirname(__FILE__) . '/../classes/U... | true |
484b4add9b8f8ac3ff86d1e5f8dfb8837bf145c9 | PHP | ludotm/cobalt | /Core/Db.php | UTF-8 | 3,826 | 2.671875 | 3 | [] | no_license | <?php
namespace Core;
use Core\Sql;
use Core\Entity;
use Core\Service;
class Db extends Sql
{
use \Core\Singleton;
protected $connexion;
protected $databases;
public $is_connected = false;
protected function __construct()
{
$request = Service::Request();
if ($request->load_db) {
$this->setDatabase(... | true |
360de7ec5c7beb6831ed07290529af5cf56606d2 | PHP | wieni/wmentity_overview | /src/Common/Column.php | UTF-8 | 2,564 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Drupal\wmentity_overview\Common;
use Drupal\Component\Render\MarkupInterface;
class Column implements ColumnInterface
{
/** @var string */
protected $name;
/** @var MarkupInterface|string|null */
protected $label;
/** @var bool */
protected $sortable;
/** @var string|null ... | true |
3af2a4d011f7f07d5b9f264d89de2cd9052ee806 | PHP | gabrielew/learning_php | /poo/classAnimal.php | UTF-8 | 539 | 3.890625 | 4 | [] | no_license | <?php
abstract class Animal {
private $name;
private $yearsOld;
abstract protected function andar();
public function setName($n) {
$this->name = $n;
}
public function getName() {
return $this->name;
}
}
class Cavalo extend... | true |
2d919048615f289054b6635319f5813785125060 | PHP | palaphon/wealthbot | /system/Model/Pas/Repository/GainLossRepository.php | UTF-8 | 2,369 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Model\Pas\Repository;
class GainLossRepository extends BaseRepository
{
public function __construct()
{
$this->table = static::TABLE_GAIN_LOSS;
parent::__construct();
}
/**
*
*/
public function insert(array $parameters)
{
$sql = "INSERT INTO {... | true |
65565d9943c7baef205c12de064045cc72ed5b76 | PHP | purplenimbus/edu-api | /tests/Unit/Rules/ValidCourseSchemaTest.php | UTF-8 | 978 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Unit\Rules;
use App\Rules\ValidCourseSchema;
use Tests\TestCase;
class ValidCourseSchemaTest extends TestCase
{
public function testItValidatesAValidCourseSchema()
{
$rule = new ValidCourseSchema();
$this->assertTrue($rule->passes('', [
[
"name" => "assignment 1",
... | true |
6b86495ea051f00016234b3a4f2f06af9a4c7753 | PHP | alpemreelmas/aek-file-uploader | /src/Contracts/FileUploaderService.php | UTF-8 | 1,048 | 2.84375 | 3 | [] | no_license | <?php
namespace AEK\FileUploader\Contracts;
abstract class FileUploaderService
{
public $fileUploader;
public $key;
public $propertyOfKey;
public $disk = "local";
abstract public function setFileName($file);
abstract public function storeFile();
abstract public function getPublicPathOfFi... | true |
815b61760af573b287b0258f3521bc5de49488d6 | PHP | kuangda/tools | /vendor/zhaoming-tools/src/lib/UnzipTools.php | UTF-8 | 1,779 | 2.84375 | 3 | [
"AFL-3.0"
] | permissive | <?php
namespace Zhaoming\tools\lib;
use Zhaoming\tools\ToolsInt;
class UnzipTools implements ToolsInt
{
private $ext =[
'zip',
'rar',
'7z',
];
public function unPackage($dir)
{
if ($handle = opendir($dir)) {
while (($file = readdir($handle)) !== false)... | true |
abf5d52becb4c7c3dea8a7dd5e94848684015682 | PHP | Obrubok/php-project-lvl1 | /src/Games/Even.php | UTF-8 | 452 | 3.359375 | 3 | [] | no_license | <?php
namespace Brain\Games\Games\Even;
use function Brain\Games\Game\game;
const TARGET = 'Answer "yes" if the number is even, otherwise answer "no".';
function isEven(int $number): bool
{
return $number % 2 === 0;
}
function run(): void
{
$getTask = function (): array {
$question = random_int(1, ... | true |
e35d998c5010341926bf8e525bfd55297fb35bf8 | PHP | commonledger/php-resque-repeater | /lib/ResqueRepeater.php | UTF-8 | 6,766 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* ResqueRepeater - managing recurring/repeating jobs in resque
*
* Based on the php-resque-scheduler library by Chris Boulton
*
* @package ResqueRepeater
* @author API Team <api@commonledger.com>
* @copyright (c) 2014 Common Ledger
* @license http://www.opensource.org/licenses/mit-license.php
*/
c... | true |
4a7940690b2bb24b6fa737cfc82396485bd77298 | PHP | skergoat/Compagnie-des-Trois-Rivieres | /lib/vendors/Model/AnimationsManager.php | UTF-8 | 1,858 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Model;
use \CRFram\Manager;
use \Entity\Animations;
abstract class animationsManager extends Manager
{
/**
*
* update animation
*
*/
abstract protected function update(Animations $animations);
/**
*
* add animation
*
*/
abstract public function add(Animations $anim... | true |
6724afeb4d507801adfcfe367a879812bb8dca11 | PHP | CataAndrei97/AzureProject | /db_connection.php | UTF-8 | 906 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
include('log_fct.php');
// PHP Data Objects(PDO) Sample Code:
try {
$conn = new PDO("sqlsrv:server = tcp:testwebappsql.database.windows.net,1433; Database = twdatabase", "sql", "Aa12345678");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch (PDOException $e) {
print("... | true |
ab3ad29f0add675c2ea5844c7dc9f6cd32c45194 | PHP | buzzpop/Money_Transfert_Back | /src/Entity/Taxes.php | UTF-8 | 1,124 | 2.625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\TaxesRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TaxesRepository::class)
*/
class Taxes
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type=... | true |
223328e60965bfd5d8d6fc77549ea06b2f4ebab0 | PHP | Reginald-dev5/soup | /client.php | UTF-8 | 765 | 2.53125 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of client
*
* @author reginald
*/
class client {
public function __construct() {
... | true |
bcd3fc455e265504e5023bb91a0687d0019f2467 | PHP | jwatte/mwreg | /teaminfo.php | UTF-8 | 6,855 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
require_once 'mailinfo.php';
function make_new_team() {
global $user;
if (!$user) {
// not logged in
return false;
}
$teams = get_teams_by_leader($user['userid']);
if ($teams) {
// already leading a team
return false;
}
$newteam = db_insert(
... | true |
34c9deefd09cd5662d7b7af1ef0986441621fabc | PHP | Astropilot/appsy_project | /src/models/Ticket.php | UTF-8 | 6,558 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Testify\Model;
use Testify\Model\Database;
use Testify\Model\User;
use Testify\Config;
class Ticket {
private function __construct() {}
public static function getTicketsFromUser($user) {
try {
$tickets = array();
$req = Database::getInstance()->getPDO()->prep... | true |
d346fd7726b1119839b7720ef97177fadbb92d04 | PHP | underwear/php-eventerra-sdk | /src/Eventerra/ApiActions/EventerraActionGetTours.php | UTF-8 | 1,780 | 2.75 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
/**
* This is unofficial SDK for working with eventerra.de API
*
* @link https://www.eventerra.de/api/help.php
*
* Author: Igor Filippov <thisfil@ya.ru>
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,... | true |
4e919bca9308843589d6698a60a0843dbe71a34f | PHP | ruminiki/followmoney | /com/followMoney/domain/services/BancoService.php | UTF-8 | 601 | 2.65625 | 3 | [] | no_license | <?php
include_once("dao/BancoDao.php");
include_once("valueObjects/BancoVO.php");
class BancoService
{
public function save(BancoVO $banco){
return BancoDao::save($banco);
}
public function update(BancoVO $banco){
return BancoDao::update($banco);
}
public function remove(BancoV... | true |
005621787f235bdb9eb1c146c43bfc2066492207 | PHP | yifish/modular | /app/MyCommon/Token.php | UTF-8 | 779 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/8/6
* Time: 22:08
*/
namespace App\MyCommon;
/**
* Token类
*/
class Token extends CipherCommon
{
public function __construct($ranDomCodeNumber = 32)
{
$this->ranDomCodeNumber = $ranDomCodeNumber;
$this->ranDomCode = $thi... | true |
92bb73374ba56caf3d1be3bd6eb12521c9087a55 | PHP | binomotraders/binomocoin.com | /app/User.php | UTF-8 | 1,192 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
p... | true |
7d57b3ef2d2bb6ca9e312c5d52bbec9d1a8f6149 | PHP | AdrianCEV/cardMarket | /database/migrations/2021_01_14_193737_create_collections.php | UTF-8 | 1,048 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCollections extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('collections', fu... | true |
1d9e38dc51d751ec9d6d330b895754a5539db874 | PHP | HRobertSI/Registration-LogIn | /admin.php | UTF-8 | 3,712 | 2.75 | 3 | [] | no_license | <?php
//session_start();
require_once './config.php';
$link = connectDatabase();
$add_typ='';
$add_nom='';
$add_couleur='';
$add_code='';
$add_prix='';
$add_taille='';
$add_image='';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div sty... | true |
57be274dfbadd5a50239d01f48a68491775b3b13 | PHP | Tacks9/leetcode | /phpcode/169_majority-element.php | UTF-8 | 3,344 | 3.96875 | 4 | [] | no_license | <?php
/*
169.[求众数]
给定一个大小为 n 的数组,找到其中的众数。众数是指在数组中出现次数大于 ⌊ n/2 ⌋ 的元素。
你可以假设数组是非空的,并且给定的数组总是存在众数。
示例 1:
输入: [3,2,3]
输出: 3
示例 2:
输入: [2,2,1,1,1,2,2]
输出: 2
[思路]:
- 哈希数组
+ 通过遍历数组中每个元素,用新数组来记录,把元素值做为新数组的键,然后值用于计数;
+ 遍历一次,哈希表的插入是常数时间的,因此时间复杂度为 O(n);
+ 因为额外使用了数组,所以空间复杂度:O(n);
- 摩尔投票法(参考别人的题解)
... | true |
c1bde0fc9e7aafec2bab29a29549bf14aa07969f | PHP | bvalchev/WEB-FMI-Project | /api/controllers/UsersController.php | UTF-8 | 6,105 | 2.90625 | 3 | [] | no_license | <?php
include_once dirname(__DIR__)."/models/UsersModel.php";
include_once "BasicController.php";
class UsersController extends BasicController{
private $model = null;
public function __construct(){
parent::__construct();
$this->model = new UsersModel('users');
}
private function areAl... | true |
37cfbcd03d0c67c29ac5070788c2861faa42cd07 | PHP | otdev1/laravel_ecommerce_demo | /app/helpers.php | UTF-8 | 1,077 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
function presentPrice($price)
{
//return money_format('$%i', $this->price / 100);
/*%i is the placeholder for the dollar amount
money_format function does not exist on all OSes, windows is 1 of them
see https://stackoverflow.com/questions/21507977/fatal-error-call-t... | true |
a4a427fb46f941e595b0461496494e5325ce604d | PHP | GunSnake/MVC | /Lib/CompileClass.php | UTF-8 | 2,818 | 2.953125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 95
* Date: 2016/8/8
* Time: 10:59
*/
namespace Lib;
class CompileClass
{
private $template; //待编译的文件
private $content; //需要替换的文本
private $comfile; //编译后的文件
private $left='{'; //左定界符
private $right='}'; //右... | true |
27337f3e5fb7c8c356a2a362259b37721badbe3c | PHP | Alexey8k/MVC_Framework | /app/Infrastructure/Abstract/IHashAlgorithm.php | UTF-8 | 70 | 2.734375 | 3 | [] | no_license | <?php
interface IHashAlgorithm
{
function getHash(string $str);
} | true |
ae81301420e490fd16d88c135d16c323afe1a7ad | PHP | cristianob/HomeCreator | /modules/Button.php | UTF-8 | 3,599 | 2.5625 | 3 | [] | no_license | <?
class Button extends HC_Text_Element {
var $size;
var $align;
var $weight;
var $padding;
var $line_height;
var $color;
var $margin;
var $background_color;
var $width;
var $height;
var $border;
var $href;
var $title;
public function get_html() {
$style = "";
if($this->s... | true |
451a9d0e2025be79a9d03d8dcb79ce802d9da754 | PHP | mrizkimaulidan/wangkas | /database/migrations/2021_01_30_213027_create_students_table.php | UTF-8 | 1,140 | 2.703125 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStudentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('students', fun... | true |
c55750399f5635e2241e4e54e7e14273734969c2 | PHP | jasony62/xinxintong | /models/site/admin.php | UTF-8 | 1,672 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace site;
/**
* 站点管理员
*/
class admin_model extends \TMS_MODEL
{
/**
*
*/
private function &_queryBy($where, $options = [])
{
$fields = isset($options['fields']) ? $options['fields'] : '*';
$q = array(
$fields,
'xxt_site_admin',
$where,
);
$admins = $this->... | true |
65a102e25e8275f37a2a9e32ab57a8ce41cd6a91 | PHP | qq1060656096/rabbitmq-event | /src/Tests/Demo/EventCallback/EventDemoUser.php | UTF-8 | 775 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Zwei\RabbitMqEvent\Tests\Demo\EventCallback;
/**
* 示例用户事件处理
* Class EventDemoUserRegisterCallback
* @package Zwei\RabbitMqEvent\Tests\Demo\EventCallback
*/
class EventDemoUser
{
/**
* 用户注册成功
* @param array $message
*/
public static function registerSuccess($message)
{
... | true |
a413cc6922fb75723989dd229b88f76b4bea5cf0 | PHP | lyhiving/lumina | /modules/Core/View/Components/Inputs/Checkbox.php | UTF-8 | 1,254 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Core\View\Components\Inputs;
use Illuminate\Support\Str;
use Illuminate\View\Component;
class Checkbox extends Component
{
public $name;
public $options;
public $type;
public $label;
public $verify;
public $value;
public $selected;
public $iptkey;
/**
... | true |
1fdda2e6df0e9bcc35ef41b66159c256d0060b53 | PHP | dydrich/e-school | /lib/PrimarySchoolClassbookPDF.php | UTF-8 | 3,231 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: riccardo
* Date: 18/06/15
* Time: 8.33
*/
require_once 'SchoolPDF.php';
require_once 'RBTime.php';
require_once 'ClassbookPDF.php';
class PrimarySchoolClassbookPDF extends ClassbookPDF {
protected function studentDetail(){
$students = $this->studentsData;
$this->Ad... | true |
7b235b980f9eb5b572fb18bdf49a27df86a81222 | PHP | alextend/ps2alerts-api | /src/Utility/FractalUtility.php | UTF-8 | 1,308 | 2.921875 | 3 | [] | no_license | <?php
namespace Ps2alerts\Api\Utility;
use League\Fractal\Resource\Item;
use League\Fractal\Resource\Collection;
use League\Fractal\TransformerAbstract;
use Ps2alerts\Api\Contract\FractalAwareInterface;
use Ps2alerts\Api\Contract\FractalAwareTrait;
class FractalUtility implements FractalAwareInterface
{
use Frac... | true |
fb675c1218079ff1d83a7ca8cb65a6bd8a0aa528 | PHP | niowang/php-libs | /src/Libs/Services/EmailServers.php | UTF-8 | 951 | 2.953125 | 3 | [] | no_license | <?php
namespace JMD\Libs\Services;
/**
* 发送邮件微服务组件
* Class EmailServers
* @package JMD\Libs\Services
*/
class EmailServers
{
/**
* 发送邮件
* @param string|array $content
* @param string $title
* @param string|array $to
* @param string $from
* @param string|array $attachments
* ... | true |
501553fd6868b11e6c6753e05ae1a92a19bad313 | PHP | jamogriff/lab-badging-system | /private/validation_functions.php | UTF-8 | 961 | 3.609375 | 4 | [] | no_license | <?php
// is_blank('abcd')
// * validate data presence
// * uses trim() so empty spaces don't count
// * uses === to avoid false positives
// * better than empty() which considers "0" to be empty
function is_blank($value) {
return !isset($value) || trim($value) === '';
}
// has_presence('abcd')
// * valida... | true |
ee32d56c44e676699f777d11da428758d8352642 | PHP | Salmafassi/laravel-app | /app/Http/Controllers/AdminController.php | UTF-8 | 3,688 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
use Hash;
class AdminController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$etudiants = User::where('is... | true |
a4bffcb1b8c2035cda1c35f13b7e0a753c084d15 | PHP | mohammedzaki/php-40 | /OOP/src/Abstract_Classes.php | UTF-8 | 514 | 3.0625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: mohamedzaki
* Date: 12/5/20
* Time: 12:40 PM
*/
abstract class Base_Product {
public $id;
public $name;
private $type;
abstract public function get_using();
public function get_info() {
return "test test";
}
}
class Kitchen_Machine ext... | true |
74ff014b842eeb15614acab8e24e20202cfbc3bb | PHP | amf133/263_Assignment | /getClusters.php | UTF-8 | 630 | 2.765625 | 3 | [] | no_license | <?php
require_once("config.php");
$conn = new mysqli($hostname, $username, $password, $database);
if ($conn->connect_error) {
fatalError($conn->connect_error);
return 502; //invalid response from server
}
function getClusters() {
/* Returns an array of all clusters in the database (called from JS) */
... | true |
4f8af3ccee3acfaaaacdd268bbb40cbd3ce67556 | PHP | alancrisp/Twendy | /Twendy/View/Interface.php | UTF-8 | 688 | 2.5625 | 3 | [] | no_license | <?php
/**
* Twendy_View_Interface
*/
interface Twendy_View_Interface extends Zend_View_Interface
{
/**
* Set view engine
* @param Twig_Environment $twig
* @return Twendy_View_Interface
*/
public function setEngine(Twig_Environment $twig);
/**
* Set layout path
* @param string $layoutPath
* @return T... | true |
1828732df6771f749e216c00dfa2b89af69ad594 | PHP | 5l1v3r1/flash | /system/core/Router.php | UTF-8 | 5,402 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Flash Framework
*
* A high performance, open source web application framework.
*
* @package : Flash Framework
* @author : Rajkumar Dusad
* @copyright : Rajkumar Dusad
* @license : MIT License
* @link : https://github.com/rajkumardusad/flash
*/
defined('BASEPATH') OR exit('No direct access allowed');
/**
*... | true |
4094a1dd197f6ebbe70363f1de772032e538ed45 | PHP | mgmuino/sunsetsurf | /model/entidades/OUT_bono.php | UTF-8 | 557 | 2.9375 | 3 | [] | no_license | <?php
class Bono {
private $id_bono;
private $precio;
private $num_clases;
function getId_bono() {
return $this->id_bono;
}
function getPrecio() {
return $this->precio;
}
function getNum_clases() {
return $this->num_clases;
}
function setId_bono($i... | true |
fe477878295d27cdbc14ea99891379da1204c15e | PHP | shaburof/sparrow | /Vendor/Sparrow/Core/Csrf/CsrfToken.php | UTF-8 | 706 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: shaburov
* Date: 05.04.2019
* Time: 11:58
*/
namespace Vendor\Sparrow\Core\Csrf;
class CsrfToken
{
protected $token;
protected $expired;
public function __construct(string $token, string $expired)
{
$this->token = $token;
$this->expired =... | true |
6535193256bd205f036f81d87aad51d965fa7895 | PHP | JianHui97/SemProject | /sdw/ManagePayment/Model/Payment_Detail_Model.php | UTF-8 | 730 | 2.6875 | 3 | [] | no_license | <?php
require_once 'Libs/Payment_Detail_Database.php';
class modeldetail
{
public function pp()
{
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "ims";
//Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->con... | true |
e84942e2a1b2ff91e8168dd3958c1be2c44a1f8b | PHP | iconic-publishing/slim3-skeleton-ecommerce | /app/Storage/SessionStorage.php | UTF-8 | 1,126 | 2.96875 | 3 | [] | no_license | <?php
namespace Base\Storage;
use Countable;
use Base\Storage\Contracts\SessionStorageInterface;
class SessionStorage implements SessionStorageInterface, Countable {
protected $session;
public function __construct($session = 'default') {
if(!isset($_SESSION[$session])) {
$_SESSION[$ses... | true |
043382ec1d61cd76e318734a507d26884bee78ab | PHP | Maike-9F/exercicios1 | /ex.2/index.php | UTF-8 | 1,803 | 3.5 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fibonacci</title>
</head>
<body>
<form action="index.php" method="get">
<h3>FIBONACC... | true |
397728ea1387aca6c3ad338377d92215343cebbb | PHP | julianseeger/clean_arch_shop | /tests/Bws/Repository/BasketRepositoryMock.php | UTF-8 | 1,124 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Bws\Repository;
use Bws\Entity\Basket;
use Bws\Entity\BasketStub;
use Bws\Entity\EmptyBasketStub;
class BasketRepositoryMock implements BasketRepository
{
private $baskets = array();
private $findById;
public function __construct()
{
$this->save(new BasketStub());
$th... | true |
775616f997cdfe4d632698f12f6faf5c6a797767 | PHP | ModernPUG/DesignPatternsPHP | /Creational/Builder/CarBuilder.php | UTF-8 | 987 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace DesignPatterns\Creational\Builder;
use DesignPatterns\Creational\Builder\Parts\Vehicle;
class CarBuilder implements BuilderInterface
{
/**
* @var Parts\Car
*/
private $car;
public function addDoors()
{
$this->car->setPart('rightDoor', new Parts\Door());
$thi... | true |
8d12e906b0345560a3e49e4b8babf49e7a1d185c | PHP | BIGGANI/Firefly | /app/controllers/LimitController.php | UTF-8 | 4,508 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
require_once(app_path() . '/helpers/Toolkit.php');
/**
* Class LimitController
*/
class LimitController extends BaseController
{
/**
* Add a limit to a certain component for a given year and month.
*
* @param \Component $component The component
* @param int $year The year
... | true |
9dd42317de3e5f262378fb1e21a62518582b570e | PHP | Cholipski/DayVahe | /admin/kierownik/pracownik/pracownikU.php | UTF-8 | 1,486 | 2.578125 | 3 | [] | no_license | <?php
require_once("../../../config.php");
$errors = 0;
if(is_null($_POST['login'] ) || $_POST['login']=="" ){
$errors = $errors + 1;
}
if(is_null($_POST['haslo'] ) || $_POST['haslo']==""){
$errors = $errors + 1;
}
if(is_null($_POST['imie'] ) || $_POST['imie']==""){
$errors = $errors + 1;
}
if(is_null($_POS... | true |
8c4669d999d70098b94ac972b2bbfff82cbe23aa | PHP | biglanggwapoventures/apic | /application/views/printables/rcbc-check.php | UTF-8 | 847 | 2.5625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
html{
font-size: 130%!important;
color: black!important;
font-weight: bold!important;
}
</style>
</head>
<body ... | true |
435c23e33b5dbee2c3f64138c7ffb62e676e4fbc | PHP | dlhextall/gti350-lab3 | /webapp/inc/secure_functions.php | UTF-8 | 10,434 | 2.859375 | 3 | [] | no_license | <?php
require_once 'ConfigFunctions.php';
$delay_before_login = 15;
/**
* Call this function at the top of any page you wish to access a php session variable.
* This function makes your login script a whole lot more secure.
*
* @return [type] [description]
*/
function sec_session_start() {
$session_na... | true |
4fdb64aca21386288c1c23880745fda59c6ee7f5 | PHP | longhua828/lightworx | /Lightworx/Resource/Views/HttpException/403.php | UTF-8 | 717 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
echo '<div class="error_message">',$exception->getMessage(),'</div>';
if(strtolower(RUNNING_MODE)=='production'){return;}
foreach($traces as $trace)
{
$code = '<div class="debug_box">';
$code .= '<h3>Stack Trace</h3>';
$code .= '<div class="metainfo">';
$code .= '<span class="meta_file">File:'.$trace['fil... | true |