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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
63d875c10be77add8e8413c994015ad4f7838e16 | PHP | yendefrr/mvc-blog | /src/MyProject/Models/Comments/Comment.php | UTF-8 | 2,486 | 3 | 3 | [] | no_license | <?php
namespace MyProject\Models\Comments;
use MyProject\Exceptions\InvalidArgumentException;
use MyProject\Models\ActiveRecordEntity;
use MyProject\Models\Articles\Article;
use MyProject\Models\Users\User;
class Comment extends ActiveRecordEntity
{
/** @var string */
protected $text;
/** @var int */
... | true |
224adb7abfecd375787935a9cb4ae9fe97923cc6 | PHP | xiaoxuan6/aliyun-safe | /src/Core/Regions/EndpointProvider.php | UTF-8 | 1,313 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of aliyun safe package.
*
* (c) vinhson <15227736751@qq.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
class EndpointProvider
{
private static $endpoints;
public static function findProductDomain($regi... | true |
3b110929dfe8a43a8a2160ab6ecaff55130a32a8 | PHP | haha0738/member_api | /app/member.php | UTF-8 | 462 | 2.515625 | 3 | [] | no_license | <?php namespace App;
use Illuminate\Database\Eloquent\Model;
class member extends Model {
protected $fillable = ['pid', 'username', 'password', 'status'];
public function profile()
{
return $this->hasOne('App\member_profiles', 'uid');
}
public function credit()
{
return $this->hasOne(... | true |
5f7e05bc9abcf04105973f7646690500f6841bc9 | PHP | phuctrung0201/aissgnPage | /modal/modalUser.php | UTF-8 | 3,544 | 2.6875 | 3 | [] | no_license | <?php
class database extends mysqli{
private $pages;
private $usern;
function setPage($usern){
$this->usern = $usern;
$list = $this->query("select * from lists where userid in (select id from users where usern ='$usern') and state != 'close'");
$num_lists ... | true |
807e9661258b142092d6e317f08c836280ae8f7c | PHP | DesmondMilez/AlumniSite | /app/Http/Requests/JobApplyRequest.php | UTF-8 | 540 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Auth;
class JobApplyRequest extends Request
{
public function authorize()
{
return Auth::user()->isStudent();
}
public function rules()
{
return [
'cv' => 'required|mimes:doc,docx,pdf'
];
}
public function mess... | true |
b1d5896f997375c043210e81f2b46303950eace0 | PHP | dougieforde/EIDCymru | /scripts/animal_report.php | UTF-8 | 5,730 | 2.59375 | 3 | [] | no_license | <?php
require 'include/prepend.php';
include 'include/PHPExcel-1.7.7/PHPExcel.php';
include 'include/PHPExcel-1.7.7/PHPExcel/Writer/Excel2007.php';
$DATE_FORMAT = "%d/%m/%Y";
$TIMESTAMP_FORMAT = "%d/%m/%Y %T";
$STYLE_BOLD = array(
'font' => array(
'bold' => true
)
);
function scoteid_investigate_tag_movement_r... | true |
9f5370ac3f77bb423933133a8dd5165436966225 | PHP | Oliza77dr/array_loops_tasks_olga | /21.php | UTF-8 | 197 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Olga
* Date: 6/28/2017
* Time: 9:44 PM
*/
$rows = 9;
for ($r=1;$r<=$rows;$r++) {
for ($n=1;$n<=$r;$n++){
echo $r;
}
echo "<br/>";
} | true |
6a97f41771131284a61cd2b0de526defec423b72 | PHP | lune-projects/core | /src/Registry/InMemoryRegistry.php | UTF-8 | 918 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Lune\Framework\Core\Registry;
use Closure;
class InMemoryRegistry extends AbstractRegistry
{
protected $registry;
public function initialize()
{
$this->registry = [];
}
public function register(string $key, $value)
{
$this->registry[$key] = $value;
}
... | true |
c4d0c3c34f39347fa08f94ba06083a2d98fe9f7d | PHP | HectorDNC/Market | /app/Models/Usuario.php | UTF-8 | 6,255 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Models;
use Exception;
use PDO;
class Usuario extends Persona{
private $usuario;
private $password;
private $rol_id;
private $error;
public function __construct(){
}
public function getUsuario(){
return $this->usuario;
}
public function setUsuario($... | true |
d1374e1dd7209b2793e6de8d881c00f314ef8c06 | PHP | nashvent/challenlink | /challenge-01/index.php | UTF-8 | 947 | 3.5 | 4 | [] | no_license | <?php
function findPoint($strArr)
{
$firstList = array_map("intval", explode(",", $strArr[0]));
$secondList = array_map("intval", explode(",", $strArr[1]));
$max = (end($firstList) > end($secondList)) ? end($firstList) : end($secondList);
$countArray = array_fill(0, $max + 1, 0);
... | true |
447befaacee0c6efd611dfeeeb52e587fb20cda2 | PHP | AncyPB/mlab-php-file-project | /mlab-final/modify_query.php | UTF-8 | 2,330 | 2.546875 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Modify Query</title>
<link rel="stylesheet" type="text/css" href="css\style.css">
</head>
<body
style="background-color:#576574">
<div id="main-wrapper1">
<center>
<h2>Fill in the details to modify your query!!!!!</h2>
<h3>Note: Query code c... | true |
8ab3dd5b9b043ef109a9d2cb09bb1aef9c1dd48f | PHP | dettomilo/TecWebProject | /src/foodservice/format_url.php | UTF-8 | 501 | 3 | 3 | [] | no_license | <?php
/*
* Questa funzione formatta l'URL specificato come parametro in maniera tale da rimuovere
* "http://", "www" e "/". Esempi:
* 1) http://google.com/ --> google.com
* 2) www.google.com --> google.com
* 3) google.com/ --> google.com
*/
function formatURL($url) {
$url = trim($url, '/');
if (!preg_... | true |
2e6eac0ca2bc542c21702c7ffe6376c9e747e29f | PHP | BronjaA/KnjizaraOnline-API | /books/sell/postOffer.php | UTF-8 | 1,938 | 2.625 | 3 | [] | no_license | <?php
require '../../config/Database.php';
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
if(isset($postdata) && !empty($postdata))
{
// Sanitize
$userID = mysqli_real_escape_string($conn, trim($request->userID));
$naziv = mysqli_real_escape_string($conn, trim($request->na... | true |
8267dba50be1b5dd8d944600a578296b7e9b01d6 | PHP | YegorSS/nedesign | /console/migrations/m150826_074001_create_orders_table.php | UTF-8 | 2,663 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Schema;
use yii\db\Migration;
class m150826_074001_create_orders_table extends Migration
{
public function safeUp()
{
$this->createTable('orders', [
'id' => 'pk',
'text' => Schema::TYPE_TEXT,
'image' => Schema::TYPE_STRING,
'sort' => Sch... | true |
2e12134d06aece155b38251fac4c717bd6da59c0 | PHP | amlakiaqu/amlaki | /app/PostMedia.php | UTF-8 | 1,021 | 2.640625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class PostMedia extends Model
{
/**
* Table Columns:
* - id
* - media_url
* - type ['VIEDO', 'IMAGE']
* - post_id
*/
/**
* The table associated with the model.
*
* @var string
*/
protected ... | true |
32c12ed3bf7f1dc096ff1d1fb7998f66aa5088e9 | PHP | ministryofjustice/opg-use-an-lpa | /service-front/app/test/CommonTest/Validator/SiriusReferenceStartsWithTest.php | UTF-8 | 1,535 | 2.65625 | 3 | [
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace CommonTest\Validator;
use Common\Validator\SiriusReferenceStartsWithCheck;
use PHPUnit\Framework\TestCase;
class SiriusReferenceStartsWithTest extends TestCase
{
private SiriusReferenceStartsWithCheck $validator;
public function setUp(): void
{
$this->va... | true |
a0601298fe5073ba425166c81a870fc5e0793210 | PHP | LFrancoF/SistemaDentista-mvc | /vista/VCargo.php | UTF-8 | 307 | 2.515625 | 3 | [] | no_license | <?php
class VCargo{
private $MCargo;
public function __construct(){
$this->MCargo = new MCargo();
}
public function index(){
$cargos = $this->MCargo->index();
require_once "public/views/layout/nav.php";
require_once "public/views/cargo/index.php";
}
} | true |
f2c66c1fb3a405ab33579b46d42c139aa179ec65 | PHP | sankeerth96/filing | /login.php | UTF-8 | 2,554 | 2.65625 | 3 | [] | no_license | <?php
include("config.php");
session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
// username and password sent from form
$myusername = mysqli_real_escape_string($db,$_POST['email']);
$mypassword = mysqli_real_escape_string($db,$_POST['passw']);
$sql = "SELECT... | true |
b78d7cd98e9ebd3dcc0821563981f8b69b3b54d7 | PHP | WPPlugins/magazine-columns | /magazine-columns.php | UTF-8 | 3,856 | 2.546875 | 3 | [] | no_license | <?php
/*
Plugin Name: Magazine Columns
Plugin URI: http://bavotasan.com/downloads/magazine-columns-wordpress-plugin/
Description: Divides your post or page content into two or more columns, like a magazine article.
Author: c.bavota
Version: 1.0.7
Author URI: http://www.bavotasan.com/
License: GPL2
*/
/* Copyright 201... | true |
525eabaed383966a748bb8976fcea91e5bbfe2d4 | PHP | PToledoCESJF/Consultorio-Recepcao | /Cemis_Recepcao/class/EspecialidadeController.php | UTF-8 | 770 | 2.609375 | 3 | [] | no_license | <?php
class EspecialidadeController {
private $especialidadeDao;
public function __construct() {
$this->especialidadeDao = new EspecialidadeDAO();
}
public function carregar($idEspecialidade){
return $this->especialidadeDao->carregar($idEspecialidade);
}
public functi... | true |
a703585b2fe888364fcaa7ba934fbe5f8236b88c | PHP | FreeAndFair/evoting-systems | /EVTs/Pret-a-Voter/release-2007-07-01/php/ballotaudit.php | UTF-8 | 3,504 | 3.109375 | 3 | [] | no_license | <?php
/** ballotaudit.php
* Looks up a ballot form that has been audited and retrieve the info
*/
// includes
include_once("config.php");
// do head of html page
$flagEnterSerial = false;
// check if serial number has been given. if not, flagEnterSerial
if(isset($_GET['serial'])) {
$serial =... | true |
898df3e9adae377ede921cd2c29f0cbc077bfcd6 | PHP | TWesterlinck/ProjectIMD | /ProjectIMD/index.php | UTF-8 | 2,711 | 2.640625 | 3 | [] | no_license | <?php
session_start();
include_once("classes/Db.class.php");
include_once("classes/User.class.php");
// Cookie voor "remember me"
if(isset($_COOKIE['login']))
{
$cookieval = explode(',', $_COOKIE['name']);
$_SESSION['name'] = $cookieval[0];
$_SESSION['email'] = $cookiev... | true |
adc679edc81300e32bad09d7cddded9894d3f930 | PHP | Dimanych90/mvc2 | /Base/Controller.php | UTF-8 | 490 | 2.625 | 3 | [] | no_license | <?php
namespace Base;
class Controller
{
/** @var view */
public $view;
/** @var bool */
protected $_render = true;
/** @var array */
protected $_jsonData = [];
public function preAction()
{
}
/**
* @return bool
*/
public function needRender(): bool
{
... | true |
60134c072c3ead9229110530bd2b251725ef2b40 | PHP | dadiazp/TaskManager | /app/Repository/InvoiceRepository.php | UTF-8 | 803 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Models\Invoice;
class InvoiceRepository
{
protected $invoice;
public function __construct()
{
$this->invoice = new Invoice();
}
public function getById($id)
{
return $this->invoice->findOrFail($id);
}
public function getInvoic... | true |
b83a65b6896e4f66a2e283021e51e89127bbcf74 | PHP | kawserahmed47/PHP_OOP_Ecommerce | /classes/Category.php | UTF-8 | 3,004 | 2.921875 | 3 | [] | no_license | <?php
$filepath= realpath(dirname(__FILE__));
include_once ($filepath.'/../lib/Database.php');
include_once ($filepath.'/../helpers/Format.php');
?>
<?php
class Category{
private $db;
private $fm;
public function __construct() {
$this->db= new Database();
$this->fm= new Format();
}
... | true |
ec5b8176e0735b4b32b5f70ce2dc376e8b27ac4f | PHP | adamOSU/FinalProject | /src/checkLogin.php | UTF-8 | 1,083 | 2.703125 | 3 | [] | no_license | <?php
//This file takes the login username and password and checks it against the users database. If they match, it redirects them to the main user page. If it doesn't match, it alerts then and they are
//auto-redirected to the login page to try again.
session_start();
$uname = $_POST["username"];
$pword = $_... | true |
879ff0968c744b4a2ff8a006801c1fd9e678dd1e | PHP | killer-djon/dev.pol-na5.ru | /published/CM/lib/actions/construct/CMConstructDeleteSection.action.php | UTF-8 | 975 | 2.609375 | 3 | [] | no_license | <?php
class CMConstructDeleteSectionAction extends UGViewAction
{
protected $type_id;
protected $section_id;
protected $section_info;
public function __construct()
{
parent::__construct();
$this->title = _("Delete section");
$this->type_id = Env::Get('type_id', Env::T... | true |
5091e7a9051cb05d89436a36dd9dd04f986dfade | PHP | tpraxl/MarkdownContentBundle | /Hook/FrontMatterContentHook.php | UTF-8 | 2,441 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the AsmMarkdownContentBundle package.
*
* (c) Marc Aschmann <maschmann@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/** @namespace Asm\MarkdownContentBundle\Hook */
namespace Asm\Markdo... | true |
4c2ea6e89d15a227735762757fcce6adb1ffc4b1 | PHP | nvvetal/ra | /modules/article/Articles.class.php | UTF-8 | 4,142 | 2.578125 | 3 | [] | no_license | <?php
class Articles extends API_List
{
protected $_itemObjName = 'Article';
public function sortByAuthor($order = 'DESC', $page = 1, $perPage = 0)
{
$cnt = 0;
if($page < 1) $page = 1;
if($perPage > 0){
$q = "
SELECT COUNT(*) as cnt
FROM "... | true |
b9356f1a27ab56d871940eac016a5458ec1111f9 | PHP | Tubbz-alt/spreader-1 | /src/Support/Contracts/ParameterContract.php | UTF-8 | 492 | 2.578125 | 3 | [] | no_license | <?php
namespace Indb\Spreader\Support\Contracts;
interface ParameterContract
{
/**
* Get the possible/usable parameters
*
* @return array
*/
public function getDefinedParameters();
/**
* Get the parameters that has default values
*
* @return array
*/
public fun... | true |
a9b6c3156dfc515cc893bf7a2f3222c61927d2c8 | PHP | ircmaxell/BehaviorTest | /lib/BehaviorTest/Interactor.php | UTF-8 | 251 | 2.84375 | 3 | [] | no_license | <?php
namespace BehaviorTest;
interface Interactor {
public function getName();
/**
* Set up the state (should modify present state, not return new one)
*
* @return void
*/
public function interact(State $state);
} | true |
d89666ebd46c334d5fbc5febdb4094598dc50050 | PHP | Sephiroth-F/jjjshop | /app/app/shop/model/settings/Delivery.php | UTF-8 | 4,377 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\shop\model\settings;
use app\shop\model\product\Product as ProductModel;
use app\common\model\settings\Delivery as DeliveryModel;
/**
* 配送模板模型
*/
class Delivery extends DeliveryModel
{
/**
* 添加新记录
*/
public function add($data)
{
if (!isset($data['rule']) || empty($... | true |
fef0f4a38916b275fbc28fbb2ba744c2612649db | PHP | adawey/customers | /config/db.php | UTF-8 | 664 | 2.984375 | 3 | [] | no_license |
<?php
class Database{
private $host = 'localhost';
private $db_name = 'cus';
private $username = 'root';
private $password = '';
public $connection;
public function getConnection()
{
$this->connection = null;
try{
$this->connection = new... | true |
a75a86a32fbc7b3906276f88c2c1be8870a38670 | PHP | tropotek/tk-table | /Tk/Table/Cell/Email.php | UTF-8 | 603 | 2.9375 | 3 | [] | no_license | <?php
namespace Tk\Table\Cell;
/**
* Class Text
*
* @author Michael Mifsud <info@tropotek.com>
* @see http://www.tropotek.com/
* @license Copyright 2015 Michael Mifsud
*/
class Email extends Text
{
/**
* @param mixed $obj
* @param int|null $rowIdx The current row being rendered (0-n) If null no r... | true |
757a3cd3ad3ea4a2dc5e1cdf395e8efa1465a70a | PHP | ricardolimati/O2 | /classes/StatusDados.class.php | UTF-8 | 2,763 | 2.9375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Ricardo Lima
* Date: 18/04/2019
* Time: 16:18
*/
class StatusDados
{
private $stCodigo;
private $stDescricao;
private $mensagem;
function __construct() {
$this->stCodigo = 0;
$this->stDescricao = "";
$this->mensagem = "";
}
... | true |
1fceddf800093cbca5f62806a12db9a45302c633 | PHP | raf-jana/mookambika | /app/Console/Commands/Deploy.php | UTF-8 | 2,063 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Validator;
use RuntimeException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
class Deploy extends BaseCommand {
/**
* @var string
*/
const TAG_PREFIX = 'set-';
const REGEX_TAG = '/(\{\s*([^|} ]+)(... | true |
afe9385bcc139fe13fbd6596c03172ce2faf5b0d | PHP | temenb/login_and_registration | /Core/Controller/AController.php | UTF-8 | 1,545 | 2.84375 | 3 | [] | no_license | <?php
namespace Core\Controller;
use Core\App;
use Core\Router;
abstract class AController implements IController
{
const SRC_DIR = '../src/';
public $template;
public $messages = array(
'errors' => array(),
'success' => array(),
);
public $headerTemplate = 'header.phtml';
pub... | true |
b84cb1aea6cea6d27942649ba3ca88af695c1b63 | PHP | mikkoluukkotuni/MMT6 | /src/Template/Users/signup.ctp | UTF-8 | 867 | 2.609375 | 3 | [
"MIT"
] | permissive |
<div class="users form large-8 medium-16 columns content float: left">
<h3><?= __('Create User') ?></h3>
<?= $this->Form->create($user) ?>
<?php
echo $this->Form->input('email');
echo $this->Form->input('password', array('placeholder' => 'The password has to be at least 8 chara... | true |
a8f0a1c6512c9a8c69436507e8fc784c676c635b | PHP | AlencarGabriel/Chat-Long-Pooling-SENAI | /scripts/php/lib/message.class.php | UTF-8 | 1,269 | 3.375 | 3 | [] | no_license | <?php
/**
* Classe que representa uma mensagem
*/
class message
{
private $username;
private $message;
private $created_at;
public function __Get($name){
return $this->$name;
}
public function __Set($name,$value){
$this->$name = $value;
}
public function Send(){
$pdo = conexao::conecta();
$stmt ... | true |
c8acc0fb9c429a9bdda04a3a4230ce81a556c0ee | PHP | gitter-badger/bors-core | /classes/common/do/login.php | UTF-8 | 1,336 | 2.53125 | 3 | [] | no_license | <?php
class common_do_login extends base_page
{
function title() { return ec('Авторизация.'); }
function pre_parse()
{
if(empty($_GET))
{
debug_hidden_log('error_auth', ec('Ошибка передачи параметров в класс логина, пустой _GET'));
return bors_message(ec('Ошибка передачи параметров. Возможно, сбой в наст... | true |
b7c7c3cc37a709896d1e8fcea18617d853d32082 | PHP | M-Media-Group/mmedia-login-wp-plugin | /includes/callback.php | UTF-8 | 5,657 | 2.609375 | 3 | [] | no_license | <?php
/**
* File callback.php.
*
* @author Justin Greer <justin@justin-greer.com
*/
defined('ABSPATH') or die('No script kiddies please!');
// Redirect the user back to the home page if logged in.
if (is_user_logged_in()) {
wp_redirect(home_url());
exit;
}
// Grab a copy of the options and set the redirec... | true |
c682353ded363e3e171187569edfdcf410b2d79d | PHP | Kritika1300/PHP-Practice | /Php sessions.php | UTF-8 | 404 | 2.9375 | 3 | [] | no_license | <?php
session_start();
?>
<! DOTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
$_SESSION["favcolor"] = "black";
$_SESSION["favanimal"] = "dog";
echo "Session variables have been set";
?>
</body>
</html>
//GETTING SESSION VARIABLES:.......................
<?php
session_start();
?>
<! DOTYPE html>
<html>... | true |
b8256d237ce53b3791be94eab2799fbfb9228533 | PHP | Bahlul19/music | /src/Controller/Admin/QuestionsController.php | UTF-8 | 5,890 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controller\Admin;
use App\Controller\Admin\AppController;
use Cake\ORM\TableRegistry;
/**
* Questions Controller
*
* @property \App\Model\Table\QuestionsTable $Questions
*
* @method \App\Model\Entity\Question[]|\Cake\Datasource\ResultSetInterface paginate($object = null, array $settings = [])... | true |
5ce5be736b9428377cee68abca9c9d842f979f4d | PHP | aivarasbaranauskas/e-aukcionas | /src/AppBundle/Service/User/UserManager.php | UTF-8 | 3,481 | 2.90625 | 3 | [] | no_license | <?php
namespace AppBundle\Service\User;
use AppBundle\Doctrine\Repository\UserRepository;
use AppBundle\Entity\User;
use Doctrine\ORM\EntityManager;
use Symfony\Component\HttpFoundation\Session\Session;
class UserManager
{
/** @var EntityManager */
private $entityManager;
/** @var Session */
priva... | true |
d165f6ca7cfa27de658da27b793e2425dd250d02 | PHP | vaniocz/doctrine-domain-events | /tests/Fixtures/EditArticleOnPublish.php | UTF-8 | 929 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Vanio\DoctrineDomainEvents\Tests\Fixtures;
use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\EntityManager;
use Vanio\DoctrineDomainEvents\DomainEvent;
class EditArticleOnPublish implements EventSubscriber
{
/** @var EntityManager */
private $entityManager;
/** @var string */
priv... | true |
2b8136f858ffdfcfb8402ce5d6dd0eb3ccf2c556 | PHP | RVXD/silverstripe-instagram | /src/model/InstagramMediaObject.php | UTF-8 | 5,142 | 2.640625 | 3 | [] | no_license | <?php
namespace Broarm\Instagram;
use SilverStripe\Assets\Folder;
use SilverStripe\Assets\Image;
use SilverStripe\ORM\DataObject;
use SilverStripe\Security\Member;
use SilverStripe\Security\Security;
/**
* Class InstagramMediaObject
* @package Broarm\Silverstripe\Instagram
*
* @property string Title
* @property... | true |
690390c2be7c7b069f6034b84a36fe1453ee3550 | PHP | tungchem1607/helpers | /src/JWTHelper.php | UTF-8 | 2,040 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* Project helpers
* Created by PhpStorm
* User: 713uk13m <dev@nguyenanhung.com>
* Copyright: 713uk13m <dev@nguyenanhung.com>
* Date: 11/6/19
* Time: 10:49
*/
namespace nguyenanhung\Classes\Helper;
/**
* Class JWTHelper
*
* @package nguyenanhung\Classes\Helper
* @author 713uk13m <dev@nguyenan... | true |
762e78553b3c2cbff3440c29d6f336bbdaca2ac0 | PHP | betasns/beta | /system/core/Utf8.php | UTF-8 | 2,760 | 3.09375 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Utf8 类
*
* 提供支持 UTF-8 的环境
*
*/
class CI_Utf8 {
/**
* 构造函数
*
* 确定是否启用 UTF-8 支持
*
*/
function __construct(){
log_message('debug', "初始化 Utf8 类");
global $CFG;
if (
// 注: /u 表示按 unicode(utf-8) 匹配(主要针对多字节比如汉字)
... | true |
6ee722a0e931a48c809c0d7a84908f266abf2a47 | PHP | scadaunity/auth | /Models/Adresses.php | UTF-8 | 849 | 2.875 | 3 | [] | no_license | <?php
namespace Scadaunity\Auth\Models;
use CodeIgniter\Model;
class Adresses extends Model
{
protected $table = "adresses";
protected $primaryKey = "addr_id";
protected $returnType = 'object';
protected $useSoftDeletes = false;
protected $allowedFields = ['user_id', 'street','number'];
pr... | true |
d2d86f47895a1206da715b7fdba5ae07de0ac086 | PHP | alshabalin/kohana-advanced-route | /classes/Advanced/Route.php | UTF-8 | 15,891 | 2.625 | 3 | [] | no_license | <?php
/**
* Advanced Routes are made to generate flexible resource routes, like Rails does
*
* @package Advanced_Routes
* @author Alexei Shabalin <mail@alshabalin.com>
*/
class Advanced_Route extends Kohana_Route {
public $params = [];
public function __construct($uri = NULL, $regex = ... | true |
666f8f6825b91dfb4fed5fbf46c1ef2f35d02d66 | PHP | luissanchez0305/trikygol | /ws/getUsersOrderedPoints.php | UTF-8 | 621 | 2.6875 | 3 | [] | no_license | <?php
include "helper.php";
if(isset($_GET['g']) && $_GET['g'] != 'null') {
/* grab the posts from the db */
$group = $_GET['g'];
$query = "SELECT nombre, puntos FROM usuarios WHERE grupo LIKE '$group' ORDER BY puntos DESC"; //LIMIT 5";
$result = mysql_query($query,$link) or die('Errant query: '.$query);
/* cre... | true |
918480c5a82c5aaa900654b33ea876c61c482bb5 | PHP | kirtangajjar/ee4 | /php/EE/Bootstrap/ConfigureRunner.php | UTF-8 | 553 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace EE\Bootstrap;
/**
* Class ConfigureRunner.
*
* Initialize the configuration for the `EE\Runner` object.
*
* @package EE\Bootstrap
*/
final class ConfigureRunner implements BootstrapStep {
/**
* Process this single bootstrapping step.
*
* @param BootstrapState $state Contextual state to p... | true |
5890b449876d3cfbc129a9f639a3af1195755e2e | PHP | Zowarke/pvjgw2 | /createGame.php | UTF-8 | 2,746 | 2.578125 | 3 | [] | no_license | <?php
include("Header.php");
if(isset($_POST['gameTitle']) && $_POST['gameTitle'] != "" && $_POST['typeGame'])
{
$gameTitle = $_POST['gameTitle'];
$typeGame = $_POST['typeGame'];
$login = $_SESSION['login_user'];
if($typeGame == "Computer")
{
$id_joueur2 = "Computeur";
}
else
{
$id_joueur2 = "";
}
$req... | true |
b7a8812b0458b7bb2ca44f77fbd40573261deb94 | PHP | helldrum/UseDacastAPI | /Test/PHPWrapper/Class/LiveTest.php | UTF-8 | 27,099 | 2.625 | 3 | [] | no_license | <?php
include_once ("PHPWrapper/autoload.php");
/**
* Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2014-05-05 at 18:47:11.
*/
class LiveTest extends PHPUnit_Framework_TestCase {
/**
* @var Live
*/
protected $object;
protected $objectMissSet;
/**
* Sets up the fixture, for example... | true |
3bc9ff94c06fd45054962d7909524606c837eb70 | PHP | sammycorgi/laravel-hierarchy | /tests/Unit/HierarchyTreeNodeTest.php | UTF-8 | 4,335 | 2.671875 | 3 | [] | no_license | <?php
use Illuminate\Support\Collection;
use Sammycorgi\LaravelHierarchy\Tree\HierarchyTreeBuilder;
use Sammycorgi\LaravelHierarchy\Tree\HierarchyTreeNode;
use Tests\TestCase;
use Tests\Utility\MakesTreeNodes;
use Tests\Utility\MockHasHierarchy;
class HierarchyTreeNodeTest extends TestCase
{
use MakesTreeNodes;
... | true |
919c2efe7f8204a011b73998e7fb419a16414236 | PHP | devLopez/laravel-api-health | /src/Listeners/SendFailedNotification.php | UTF-8 | 998 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Pbmedia\ApiHealth\Listeners;
use Pbmedia\ApiHealth\Checkers\CheckerSendsNotifications;
use Pbmedia\ApiHealth\Events\CheckerHasFailed;
use Pbmedia\ApiHealth\Storage\CheckerState;
class SendFailedNotification
{
use SendsNotifications;
/**
* Sends the failed notification if needed.
*
... | true |
27c3486a48d4afef87bbffa7f2ec468666658790 | PHP | thecheese247/xtraStuff | /www/StuffEvolves/Tut/Login.php | UTF-8 | 2,577 | 2.703125 | 3 | [] | no_license | <?php
session_start();
if (isset($_POST['LogOut']))
{
Unset ($_SESSION['Loggedin']);
}
if (isset($_SESSION['Loggedin']))
{
if ($_SESSION['Loggedin']==TRUE)
{
echo "Your are an idiot and are already logged in";
echo"<br>";
echo "CUNT";
echo "
<FORM METHOD='POST' ACTION='Login.php'>
<INPUT TYPE='Submit' Name='... | true |
512d4583dea458065577531ef2f5eb350d7a0506 | PHP | AmaniYunge/George-Wingety | /app/controllers/RequisitionFormController.php | UTF-8 | 2,739 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
class RequisitionFormController extends \BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
return View::make('requisitionForm.index');
}
/**
* Show the form for creating a new resource.
* @par... | true |
48d0c30a52387002f142582befbd0b95c69b32f4 | PHP | Shubham-codes-docs/Attendance-Tracker-Final | /admin/updateMeet.php | UTF-8 | 2,629 | 2.5625 | 3 | [] | no_license | <?php
require '../functions/load.php';
$conn = require "../functions/db.php";
require '../header.php';
session_start();
AdAuth::requireLogIn();
$meet = AdminManage::getById($conn,$_GET['id']);
$errors=[];
if(isset($_GET['id']))
{
if($_SERVER["REQUEST_METHOD"]=="POST"){
if($_POST['meetname']==='')
{
... | true |
bf037206f28e2f28abbbb94f2356e725b7be6599 | PHP | bradpsheehan/semantic_form | /build/index.php | UTF-8 | 1,816 | 3.15625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<?php
// if the form has been submitted, process it - otherwise, just display the form normally
if(isset($_POST['send'])){
// pull the name out of the submitted for
... | true |
b7544698fb9d5921dab5218fb0c6f5b5f44ba1e9 | PHP | P79N6A/php | /dreamlive/common/src/application/models/dao/DAOLottoPrize.php | UTF-8 | 2,996 | 2.640625 | 3 | [] | no_license | <?php
class DAOLottoPrize extends DAOProxy
{
const TYPE_STAR=1;//星光
const TYPE_DIAMOND=2;//星钻
const TYPE_BIG_HORN=3;//大喇叭
const TYPE_SMALL_HORN=4;//小喇叭
const TYPE_RIDE=5;//座驾
const TYPE_BAG_GIFT=6;//背包礼物
const TYPE_ENTITY=7;//实物
const TYPE_EMPTY=8;//空奖
public function __construct()
... | true |
ecb423bd1ab5b282f1828bf92079f73b6d7ea78b | PHP | marcllort/PwPay | /src/Controller/SignInController.php | UTF-8 | 3,367 | 2.75 | 3 | [] | no_license | <?php
namespace Pw\Pay\Controller;
use Psr\Container\ContainerInterface;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
final class SignInController
{
private ContainerInterface $container;
public function __construct(ContainerInte... | true |
03341b6f9e056fb1a4001886589a559e2476b164 | PHP | Kaelyscius/Technews | /src/Controller/TechNews/IndexController.php | UTF-8 | 5,102 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Controller\TechNews;
use App\Article\ArticleCatalogue;
use App\Entity\Article;
use App\Entity\Category;
use App\Exception\DuplicateCatalogueArticleException;
use App\Service\Article\YamlProvider;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Control... | true |
95ebe88856b2f539a6254ad590ced4e0fbf953c9 | PHP | taskinegemen/pys | /models/Proposal.php | UTF-8 | 2,014 | 2.546875 | 3 | [] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "proposal".
*
* @property int $proposal_id
* @property string $proposal_no
* @property string $proposal_title
* @property string $proposal_type
* @property string $proposal_abstract_tr
* @property string $proposal_abstract_en
* @pr... | true |
77bf552514dba4d6e1054ca847e101afc118d55b | PHP | SpongeUK/tygr | /app/Http/Controllers/AccountController.php | UTF-8 | 1,726 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Http\Requests\UpdateAccountRequest;
use Input;
use Hash;
class AccountController extends Controller {
/**
* Display a listing of the resource.
*
* @return Response
*/
publi... | true |
ee692739760291d428ce3b727a5d5f5f52f40c09 | PHP | alexz202/goldenlight | /app/models/DtbUserBasic.php | UTF-8 | 18,108 | 2.53125 | 3 | [] | no_license | <?php
use Phalcon\Mvc\Model\Validator\Email as Email;
use Phalcon\Mvc\Model\Query;
class DtbUserBasic extends \Phalcon\Mvc\Model
{
public function initialize(){
//$this->hasOne('invite_code','DtbInviteCode','invite_code');
$this->hasMany('user_id','DtbRaiseProjectBasic','user_id');
}
... | true |
fdcf040af52eda42ea5732c1acb40f2d7b10f57f | PHP | hightemp/libFaceDetection | /src/FaceDetector.php | UTF-8 | 1,783 | 2.71875 | 3 | [] | no_license | <?php
namespace libFaceDetection;
use libFaceDetection\FisherfacesDetector;
use libFaceDetection\EigenfacesDetector;
use libFaceDetection\LBPDetector;
use libFaceDetection\HaarDetector;
use Exception;
use libFaceDetection\DetectorInterface;
class FaceDetector implements DetectorInterface
{
protected $hResource;
... | true |
c96379c936444c0eb82afcb178e71904a410f2b6 | PHP | SteveSimpson/naos-db | /models/db/NmapPortInfo.php | UTF-8 | 1,024 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace app\models\db;
use Yii;
/**
* This is the model class for table "t_nmap_port_info".
*
* @property string $id
* @property int $host_id
* @property int $port_id
* @property string $type
* @property string $text
*/
class NmapPortInfo extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
... | true |
f8c6de7b15e0fa5d9cd32210e006859023ed3883 | PHP | jvelazco1337/CES | /application/models/main_model.php | UTF-8 | 400 | 2.921875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Main_model extends CI_Model
{
// function to add to the database by using query builder
function insert_data($data)
{
// runs code equivalent to:
// INSERT INTO Users (firstName, lastName) VALUES ("John", "Doe")
$this->db->insert("Testing", $data);
}
// function to get data from database
fun... | true |
f349ac1bfb138924c135da9ad2e5a4c6dfa85b06 | PHP | phpkangwang/muzimu_backend | /common/models/game/RobotPlayerInfo.php | UTF-8 | 2,844 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models\game;
use backend\models\ErrorCode;
use backend\models\MyException;
use backend\models\Tool;
use Yii;
class RobotPlayerInfo extends \backend\models\BaseModel
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'robot_player_info';
}
... | true |
88c037c3ab9594ec9804caf2d08924a88d4001ea | PHP | barbarybaer/LampBeltExam | /application/views/quoteEntry.php | UTF-8 | 1,841 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Quotes</title>
<style type="text/css">
#nonFavorites, #favorites{
display: inline-block;
border: 1px solid black;
padding:10px;
margin-left: 20px;
}
.singleQuote{
display:block;
border: 1px solid black;
padding:5px;
}
... | true |
588b23716771d1c445e8d0a6b65c134b009e3fe8 | PHP | motherfocas/mf-market-commission-api | /src/infrastructure/repository/DoctrineScopeRepository.php | UTF-8 | 1,556 | 2.859375 | 3 | [] | no_license | <?php
namespace infrastructure\repository;
use Doctrine\ORM\EntityRepository;
use League\OAuth2\Server\Entities\ClientEntityInterface;
use League\OAuth2\Server\Entities\ScopeEntityInterface;
use League\OAuth2\Server\Repositories\ScopeRepositoryInterface;
class DoctrineScopeRepository implements ScopeRepositoryInterf... | true |
3ed68fcb996b80cb44ae519c2edd2f9736e524df | PHP | jrconway3/jrblog-wp | /library/JR/Models/Contact.php | UTF-8 | 1,885 | 2.65625 | 3 | [] | no_license | <?php
namespace JR\Models;
class Contact {
public function __construct(\WP_Post $item, $relations = false)
{
///////////////////////////////////
// Inherit all $item properties //
///////////////////////////////////
foreach ((array) $item as $key => $value) {
$thi... | true |
46e0332dce48a9219fc69830bbe2b8b8884bef32 | PHP | nuannuanwu/qtxiaoxin | /protected/backend/models/official/SendTimer.php | UTF-8 | 2,189 | 2.703125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "{{send_timer}}".
*
* The followings are the available columns in table '{{send_timer}}':
* @property string $stid
* @property integer $infoid
* @property integer $msgid
* @property integer $deleted
* @property integer $forward
* @property integer $close
* @prope... | true |
0811264324c615aad3500e214e66431ae28a9807 | PHP | talandrius/coa | /plugins/CoaPlugin/functions/page_objects.php | UTF-8 | 6,535 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php if(!defined('IN_GS')){ die('you cannot load this page directly.'); }
/*
Make Page Objects
Echo HTML Body
*/
/* Text Object
* since 1.0 */
function textObj($OA) {
// echo 'wrap' before
if(isset($OA['wrapB'])) echo $OA['wrapB'];
// echo 'link' begin
if (isset($OA['link'])) {
// check ... | true |
4bb581c2215580f78d06d172976eded94e40c5e1 | PHP | glauberportella/omie-php-sdk | /src/Base/Clientes/Recomendacoes.php | UTF-8 | 835 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Omie\Base\Clientes;
/**
* Recomendações do cliente.
*
* @pw_element string $numero_parcelas Número de Parcelas padrão para as Vendas.
* @pw_element integer $codigo_vendedor Código do Vendedor padrão.
* @pw_element string $email_fatura Enviar a NF-e e Boleto para outro e-mail?
* @pw_element strin... | true |
b140892564497139a191d249df7aaed80ac65ed4 | PHP | callmedienz/webapp.github.io | /Controller/admintrainer.php | UTF-8 | 4,234 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Admin</title>
<link rel="stylesheet" type="text/css" href="addstyle.css">
</head>
<body>
<body>
<?php
require_once('db.php');
if(isset($_GET['TrainerID']) && isset($_GET['TrainerName']) && isset($_GET['TrainerEmail']) && isset($_GET['TrainerPhone'])&& isset($_GET['TrainerPa... | true |
d73c630a97deef70fc18c0be4b0296e51a32038d | PHP | Darky1948/database_system_ecommerce_project | /workspace/model/m_cart.php | UTF-8 | 3,435 | 3.171875 | 3 | [] | no_license | <?php
/*
* Author Kristen VIGUIER
* Copyright 2017 Kristen VIGUIER.
*/
class m_cart {
private $database;
public function __construct($database) {
$this->database = $database;
}
/*
* Get an product by its ids.
*/
public function get_article($idCustomer, ... | true |
a2846708d91c8d036b4cb7ceeaccd810bd310e1f | PHP | adamyaziji/Canetis | /register.php | UTF-8 | 2,442 | 2.6875 | 3 | [] | no_license | <?php
include "includes/Classes/Account.php";
$account = new Account();
$account->register();
include "includes/handlers/register-handler.php";
include "includes/handlers/login-handler.php";
?>
<html>
<head>
<title>Log in</title>
</head>
<body>
<div id="inputContainer">
<form id="loginForm... | true |
0d78ad57a58012a16b934cd66a11e8835772dbb2 | PHP | mrtrung99/academic-term2-2012-distributed-application-group-21 | /6.Source/RestaurantManagementSystem/source/dal/MenuDAO.php | UTF-8 | 658 | 2.828125 | 3 | [] | no_license | <?php
require_once 'MongoDatabase.php';
/**
*
* @author Stanley
*
*/
class MenuDAO {
public function getAllMenu(){
return MongoDatabase::getAllDataFrom("ThucDon");
}
public function getAllYearOnMenu(){
$menus = $this->getAllMenu();
$years = array();
foreach ($menus as $menu){
$date... | true |
a77e9775563f2c4c213a3a17b585dca617ac3d12 | PHP | hienle212/deck-of-cards | /deckofCard.php | UTF-8 | 985 | 3.375 | 3 | [] | no_license | <?php
class cards{
public function __construct($value,$suits){
$this->value = $value;
$this->suits = $suits;
}
}
class deck{
public $suits;
public $value;
public $total_card;
public $cards = [];
public function __construct() {
$this->suits = ["Hearts", "Spades", "Diamonds", "Clubs" ];
$this-... | true |
b344d897bae691bd0e953ba18785d5c1047ecea9 | PHP | luffyzhao/laravel-admin-auth | /src/Console/Commands/AuthSeederCommand.php | UTF-8 | 2,134 | 2.8125 | 3 | [] | no_license | <?php
namespace LAuth\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputArgument;
class AuthSeederCommand
extends Command
{
protected $files;
/**
* The cons... | true |
00430b62c4fbdb4de5164a890751bd6ff44b0e5e | PHP | Imtiajul/Material-Share- | /profile.php | UTF-8 | 4,080 | 2.546875 | 3 | [] | no_license | <?php
include_once('dbMySql.php');
include_once('session.php');
//session_start();
$conn = mysqli_connect('localhost', 'root', '', 'material_share');
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Profile</title>
<link rel="stylesheet" type="text/css" href="index.css">
<style>
table,... | true |
e4786e3ac5ce60547d26e0bc043d0dc1097b8df0 | PHP | xurenlu/b8_v6 | /update/dba_2to3.php | UTF-8 | 5,571 | 2.53125 | 3 | [] | no_license | <?php
# Copyright (C) 2012 Tobias Leupold <tobias.leupold@web.de>
#
# This file is part of the b8 package
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation in version 2.1 of the... | true |
aff65b4f72ca1efc48baf8d9e815d1d3926a227c | PHP | Nobox/lazy-strings-lumen | /src/LazyPublishCommand.php | UTF-8 | 2,929 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Nobox\LazyStrings;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
class LazyPublishCommand extends Command
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'lazy:publ... | true |
9f0089daa488d7a8af710374bccaa4fa5b60af82 | PHP | buzduganalex1/project | /ChangeEmail.php | UTF-8 | 1,566 | 2.578125 | 3 | [] | no_license | <?php include_once "Navigation.php" ?>
<?php include_once "Composer.php" ?>
<?php session_start() ?>
<form method="post">
<pre>Email Nou</pre><input type="text" name="NewEmail" ><br>
<input type="submit" name="btnNewEmail" value="Submit">
</form>
<?php
if (isset($_POST['btnNewEmail'])){
if ( isset($_P... | true |
a7f08bf5f3864e0e533d374184ce68d27eaa7cac | PHP | mehedimi/laravel-dynamodb | /src/Eloquent/Model.php | UTF-8 | 9,169 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Mehedi\LaravelDynamoDB\Eloquent;
use Illuminate\Database\Eloquent\Model as BaseModel;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Mehedi\LaravelDynamoDB\Collections\ItemCollection;
/**
* Class Model
*
* @method static Builder keyCondition($column, $operator, $value = null)
... | true |
037197b9c27c974f9627db69e913444d91e0d908 | PHP | shakirullahi/ssm-library | /scripts/gui/rm_student.php | UTF-8 | 1,662 | 2.703125 | 3 | [] | no_license |
<?php
if(isset($_POST['remove']))
{
$f=false;
for($i=0;$i<$_POST['count'];$i++)
{
if(isset($_POST['del'][$i]))
{
$f=true;
$ob->remove_student($_POST['del'][$i]);
}
}
if($f)
echo "<div class='error'>Removed..!</div>";
else
echo "<div class='error'>Please select before removing..!</div>";
}
... | true |
f4c0bee0f4fcdc727d74a407b10705a6b3dc3bc1 | PHP | V-WebM/MERCOSUR | /app/Rules/pais/actualizar/DuplicidadNombreRule.php | UTF-8 | 1,048 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Rules\pais\actualizar;
use Illuminate\Contracts\Validation\Rule;
use Illuminate\Support\Facades\DB;
class DuplicidadNombreRule implements Rule
{
/**
* Create a new rule instance.
*
* @return void
*/
public function __construct($id = 0, $nombre="")
{
$this->... | true |
02dbdcd4404fca0624428a6cb6f30f74fac63fe6 | PHP | SIU-Toba/framework | /php/convenciones/Toba/Sniffs/Files/FileEncodingSniff.php | WINDOWS-1250 | 1,464 | 2.9375 | 3 | [] | no_license | <?php
class Toba_Sniffs_Files_FileEncodingSniff implements PHP_CodeSniffer_Sniff
{
/**
* Returns an array of tokens this test wants to listen for.
*
* @return array
*/
public function register()
{
return array(T_OPEN_TAG);
}//end register()
/**
* Processes this ... | true |
153811e58c555af2aa9766e4a97db8cf51b3f926 | PHP | Yo-sandy/PHP-OOP-Example | /test2.php | UTF-8 | 2,713 | 3.03125 | 3 | [] | no_license | <?php
require_once "welcome.php";
$db = new DB("localhost","root","","sandeep");
$message = "";
$name = null;
$btn_name = "insert";
$btn_value = "Save Item";
if (isset($_POST['message']) && !empty($_POST['message'])){
$message = "<div class='alert alert-success' role='alert'>Order Updated Successfully</d... | true |
a88ef217b2a7ac2daa1a67661818cb0d62d50c8c | PHP | M-To-codding/User_Profile | /tests/FormHandlerTest.php | UTF-8 | 803 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Я
* Date: 28.04.2017
* Time: 2:57
*/
namespace form;
use form;
require_once dirname(__DIR__) . './templates/form.php';
require_once dirname(__DIR__) . './db_connect/database.php';
class FormHandlerTest extends \PHPUnit_Framework_TestCase
{
public function dataMu... | true |
52197f5d73cbcb9eea0e25b5321fc142bf8e275f | PHP | MateuxLucax/programacao-ifc | /3-ano/1Trimestre/13-02-Classe-Basico/Exemplo/main-teste.php | UTF-8 | 208 | 2.96875 | 3 | [] | no_license | <?php
include_once "marca.class.php";
$marca = new marca;
$marca->setCodigo(10);
$marca->setCodigo(-10);
$marca->setDescricao("IFC");
$marca->setDescricao("I");
echo $marca;
?> | true |
0ee35c777063ce62e58fcc7d9d87597b911c7af3 | PHP | uJoao22/Kamys-Store | /publico/produtos/produto.php | UTF-8 | 5,813 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php require_once("../../conexao/conexao.php");
if (isset($_GET["k"]) ) {
$produto_id = $_GET["k"];
} else {
Header("Location: index.php");
}
//Selecionando os detalhes dos produtos
$selectDetalhe = "SELECT * ";
if (!isset($_POST["cor"])) {
$selectDetalhe .= " ,MIN(de... | true |
be16822a3cc40270ac770fb7a4aaf8a2b239f2d1 | PHP | coffeedzic/trivia | /api/classes/score.class.php | UTF-8 | 1,975 | 3.328125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Trivia ReactJS
* Score class
*
* @author Edin Kahvedžić <edin@coffeedzic.com>
* @version 1.0.0
*/
class Score extends DbObject {
/**
* Database table name variable
*
* @var string
*/
protected static $db_table ... | true |
68afcd143f3949fb3fb2539e6f1b4b0b2ea36f44 | PHP | gbyram/php-vanilla | /required/misc/tool_color.php | UTF-8 | 1,413 | 2.734375 | 3 | [] | no_license | <?php
class tool_color{
public $step_color=6;
public $generator_grey=array(
"r"=>0, "g"=>0, "b"=>0
);
public $id_color=0;
public static $array_color=array(
"#ff0000","#00ff00","#0000ff","#ffff00","#00ffff","#ff00ff",
"#ff2222","#22ff22","#2222ff","#ffff22","#22ffff","#ff22ff",
"#ff4444",... | true |
8255d9cde0946c00fc8dd2df79bcbfa23a0a6cbc | PHP | zawiszaty/tutorials_tank | /symfony/src/Application/Command/Comment/Create/CreateCommentCommand.php | UTF-8 | 903 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Application\Command\Comment\Create;
/**
* Class CreateCommentCommand.
*/
class CreateCommentCommand
{
public $content;
public $user;
public $parentComment;
public $post;
public function getContent()
{
return $this->content;
}
public function setConten... | true |
64bdc5b281cd991b34c765540a18cc0d56eb5fd4 | PHP | open-classifieds/geo | /application/classes/Kohana.php | UTF-8 | 2,796 | 3.078125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php defined('SYSPATH') or die('No direct script access.');
class Kohana extends Kohana_Core {
/**
* @var boolean True if Kohana is running from the command line
*/
public static $is_cli = FALSE;
/**
* original requested data
* @var array
*/
public static $_POST_ORIG;
... | true |
f038817d9e4e8f519c03167843cc061c406c806a | PHP | stekel/laravel-blade-directives | /src/LaravelBladeDirectivesServiceProvider.php | UTF-8 | 2,322 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace stekel\LaravelBladeDirectives;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
class LaravelBladeDirectivesServiceProvider extends ServiceProvider
{
/**
* Perform post-registration booting of services.
*
* @return void
*/
public function boot(... | true |
36a330b1381e34ab80cf18019b80bc207648a39e | PHP | okkedek/voxelprinter | /src/AppBundle/Repository/PrinterRepository.php | UTF-8 | 779 | 3.03125 | 3 | [] | no_license | <?php
namespace AppBundle\Repository;
use AppBundle\Entity\Printer;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class PrinterRepository
{
private static $SESSION_KEY = '__VXl__PRN__';
private $session;
public function __construct(SessionInterface $session)
{
$this->sessio... | true |