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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d521a7fda8c1dfeaf252e18ce17fda1ef50dfaa3 | PHP | TecXra/SmartHR | /admin/edit_employee.php | UTF-8 | 8,288 | 2.546875 | 3 | [] | no_license | <?php include ("header.php");?>
<?php include ("navbar.php");?>
<?php
if(!isset($_SESSION['admin_username'])) {
header("location: ../index.php");
}
else{
?>
<body>
<div class="container">
<h1>Update Employee's Data</h1>
<hr>
<div class="row">
<?php
include("../connect.php");
//$emplo... | true |
8eac11452d901e5743a4f73242b1ed4acdd400d0 | PHP | ThiagoMiltonFerreira/php | /JSON/GrandoJsonApartirDeArray.php | UTF-8 | 196 | 3.515625 | 4 | [] | no_license | <?php
//Tenho o Array e converto para JSON
$meses = array("Janeiro","Fevereiro","Março");
echo json_encode($meses); // Gera o JSON ou seja o JSON e um array estou convertendo o array em JSON
?> | true |
8fe3e4b179f32723f7899f9d211820df5eb8a470 | PHP | LongVHa/POS | /app/controllers/signup.php | UTF-8 | 5,023 | 2.65625 | 3 | [] | no_license | <?php
class Signup extends Controller{
//init
public function Index()
{
if(isset($_POST['submit']))
{
$first = $_POST['first'];
$last = $_POST['last'];
$email = $_POST['email'];
$uid = $_POST['uid'];... | true |
3eb1851a4d96e057ed88a87271501b04fa566307 | PHP | SanalbuDev1/mis-trabajos-php | /REPASO SENA/php y mysqli/editar.php | UTF-8 | 1,149 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<?php
if ($_GET) {
$id = $_GET['id'];
$con = mysqli_connect("localhost","root","","php1");
$query = mysqli_query($con , "SELECT * FROM php1t where id=$id");
$row = mysqli_fetch_array($query);
}
... | true |
c237503f449e4ddac9a03cc82d6ec629a197e032 | PHP | rahaf-jamool/learning-laravel8 | /app/Http/Controllers/FluentController.php | UTF-8 | 452 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
class FluentController extends Controller
{
public function index(){
$slice = Str::after('This is my name', 'This is');
echo $slice .'<br>';
$slice2 = Str::afterLast('App\Http\Controllers\rahaf',... | true |
1e2126f37478f671e55808986fcce9167862233c | PHP | k7code/laravel_blog_codigoFacilito | /database/migrations/2017_10_02_160950_add_tags.php | UTF-8 | 1,245 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddTags extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tags', function (Blueprint $table) {
$table->incre... | true |
b6a7f9663938f11e4a3409ef8eade78e77c24273 | PHP | omermehmeti/PI_19-20 | /register.php | UTF-8 | 3,313 | 2.90625 | 3 | [] | no_license | <?php
/* Registration process, inserts user info into the database
and sends account confirmation email message
*/
// use PHPMailer\PHPMailer\PHPMailer;
// use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php';
// Set session variables to be used on profile.php page
$name = $_POST['fi... | true |
559b23f8ba2912dd7666e60654dc7a84cd461918 | PHP | wefabric/laravel-move | /src/Rules/UniquePostcodeHousenumber.php | UTF-8 | 985 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Uteq\Move\Rules;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;
class UniquePostcodeHousenumber implements \Illuminate\Contracts\Validation\Rule
{
/**
* Determine if the validation rule passes.
*
* @param string $attribute
* @param mixed $value
... | true |
6247966c090bc1a5b95be780fa0acd9225a23da2 | PHP | serhiikorobov/graph | /frontend/models/User.php | UTF-8 | 1,041 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: serhii.korobov
* Date: 8/14/2017
* Time: 8:43 PM
*/
namespace frontend\models;
use common\models\User as UserBase;
class User extends UserBase
{
public static function getStatusOptions()
{
$statusOptions = [
self::STATUS_ACTIVE => \Yii::t('app... | true |
11d7e37178aa1ab4ff6c1fdfc0c4970cf3dd1058 | PHP | AlexisMeunier/projet_en_equipe | /admin/list_users.php | UTF-8 | 1,917 | 2.75 | 3 | [] | no_license | <?php
session_start();
require_once '../inc/connect.php';
if($_SESSION['user']['role'] != 'admin'){
header('location:index.php');
die;
}
$userId = $_SESSION['user']['id'];
$userRole = $_SESSION['user']['role'];
$page = 'list_users';
$errors = [];// tableau d'erreurs
if(!empty($_GET)){
$get = $post = array_map('t... | true |
2d69cd4b786611d593694920030e361003511ab9 | PHP | arcmedia/mage2-slackbot | /Helper/Slackbot.php | UTF-8 | 1,799 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Arcmedia\Slackbot\Helper;
use Magento\Framework\App\Helper\AbstractHelper;
use Magento\Framework\App\Helper\Context;
class Slackbot extends AbstractHelper
{
protected $botName = "SlackBot";
protected $botIcon = "https://www.akeneo.com/wp-content/uploads/2013/09/icon-magento.png";
protected... | true |
022d74f2809a1bd7d7cfea2ab693eede56bf4d40 | PHP | koalacoding/e_commerce | /products/show_product_details/show_product_details.php | UTF-8 | 3,500 | 2.5625 | 3 | [] | no_license | <?php
/*----------------------------------------------------
------------------------------------------------------
-----------------SHOW PRODUCT DETAILS-----------------
------------------------------------------------------
----------------------------------------------------*/
function show_product_details($product... | true |
fbba021ed996e229e2c1a284b97b4e6c94d0354e | PHP | sergeymakinen/laravel-phpstorm-stubs | /stubs/Illuminate/Support/Facades/Blade.php | UTF-8 | 2,508 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Laravel PhpStorm autocomplete stubs
*
* Generated on Laravel 5.4.13
*
* @see https://github.com/sergeymakinen/laravel-phpstorm-stubs
* @copyright Copyright (c) 2016-2017 Sergey Makinen (https://makinen.ru)
* @license https://github.com/sergeymakinen/laravel-phpstorm-stubs/blob/master/LICENSE ... | true |
b092dd0282fb73fc0650e72587d4ec4e74a24314 | PHP | ClemenceDaval/Todolist-Back-Lumens-Part-2 | /app/Http/Controllers/TaskController.php | UTF-8 | 6,853 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Task;
use Illuminate\Http\Request;
class TaskController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function list()
{
$tasksList = Task::all()->load('category');
//return r... | true |
a827df431a302f8f833f2b1f6bb3a46f5a31a319 | PHP | MohammadGhodsi/Dry-cleaning-system-with-php | /Database/database.php | UTF-8 | 947 | 3.109375 | 3 | [] | no_license | <?php
include_once('./connection.php');
class database extends connection
{
public function __construct()
{
parent::__construct();
if(session_status() == PHP_SESSION_NONE)
{
session_status();
}
}
# for just one row
public function getrow($query , $... | true |
809877a411cadc80ba06b0efaf468d4435b26773 | PHP | SergioMadness/laravel-sendbox | /src/Interfaces/Services/Response.php | UTF-8 | 727 | 2.875 | 3 | [] | no_license | <?php namespace professionalweb\sendbox\interfaces\Services;
/**
* Interface for Sendsay API response
* @package professionalweb\sendbox\interfaces\Services
*/
interface Response
{
/**
* Check request failed
*
* @return bool
*/
public function isError(): bool;
/**
* Check redir... | true |
673d4e998a8ca0e282945e7d6b57bd10b6acdfa0 | PHP | bytic/document-generator | /src/PdfLetters/Writer/AbstractObject.php | UTF-8 | 852 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ByTIC\DocumentGenerator\PdfLetters\Writer;
use ByTIC\DocumentGenerator\PdfLetters\Models\Fields\FieldTrait;
use setasign\Fpdi\Tcpdf\Fpdi;
abstract class AbstractObject
{
protected Fpdi $pdf;
protected $value;
protected $x;
protected $y;
/**
* @para... | true |
063b08160d253f3be1845d98130598039b72aa65 | PHP | 15928606958/NewCMS | /Application/Common/Common/function.php | UTF-8 | 878 | 2.765625 | 3 | [] | no_license | <?php
/**
* 显示
* @param $status
* @param $message
* @param array $data
*/
function show($status,$message,$data=array()){
$result = array(
'status' => $status,
'message' => $message,
'data' => $data,
);
exit(json_encode($result));
}
/**
* 获得加密密码
* @param $password
* @retur... | true |
f8e867e5fab306e2592ce8e32ad0a34387025839 | PHP | damgru/workshop_movie_catalog | /src/Domain/Movie.php | UTF-8 | 2,590 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Cainon
* Date: 14.07.2017
* Time: 08:56
*/
namespace Domain;
use Domain\Event\MovieAdded;
use Domain\Event\MovieDeleted;
use Domain\Event\MovieWatched;
use Prooph\EventSourcing\AggregateRoot;
use Rhumsaa\Uuid\Uuid;
class Movie extends AggregateRoot implements \JsonSeria... | true |
ba2772fb88c6d75e63ef2706b328d6804a6b2e8d | PHP | TH-zhou/TH-Framework | /th/core/Config.php | UTF-8 | 2,379 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: zxm
* Date: 2019/7/28
* Time: 2:54 PM
*/
namespace core;
use design\Singleton;
/**
* 配置类
* Class Config
* @package core
*/
class Config
{
use Singleton;
//全局配置数组
private $configArray = [];
/**
* 加载配置文件
* @param $file
* @return array
... | true |
fc91d326ac9fa166368218af25a49f8a8efa3785 | PHP | quengeorges/iim-2019-symfony-ecommerce | /src/Entity/Cart.php | UTF-8 | 2,694 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\CartRepository")
* THE CART ENTITY `
*/
class Cart
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
... | true |
9304ad976948e4f06347dcbb416a31d28479dd80 | PHP | renowncoder/wp-cloud-deploy | /includes/core/apps/wordpress-app/tabs-server/goaccess.php | UTF-8 | 24,349 | 2.75 | 3 | [] | no_license | <?php
/**
* Goaccess
*
* @package wpcd
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class WPCD_WORDPRESS_TABS_SERVER_GOACCESS
*/
class WPCD_WORDPRESS_TABS_SERVER_GOACCESS extends WPCD_WORDPRESS_TABS {
/**
* WPCD_WORDPRESS_TABS_PHP constructor.
*/
public function __construct() {
parent::__construct... | true |
afbc70f0b1520bb16663f11cfb2935ed1ca762b4 | PHP | Karo-Darbinyan/news-catalog | /migrations/m201208_074535_add_foreign_keys.php | UTF-8 | 1,082 | 2.546875 | 3 | [] | no_license | <?php
use yii\db\Migration;
/**
* Class m201208_074535_add_foreign_keys
*/
class m201208_074535_add_foreign_keys extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->addForeignKey(
'fk-news_rubric-news_id',
'news_rubric',
'new... | true |
08cc15c470b744f18c06ee61cbfe5affb9e153eb | PHP | cfowlie/EventRegistration | /EventRegistration_Web/persistence/PersistenceEventRegistration.php | UTF-8 | 574 | 3 | 3 | [] | no_license | <?php
class PersistenceEventRegistration
{
private $filename;
function __construct($filename = 'data.txt')
{
$this->filename = $filename;
}
function loadDataFromStore()
{
if (file_exists($this->filename)) {
$str = file_get_contents($this->filename);
$rm... | true |
bfa444f6dfbe6d37bdd3bec7612ce22e1c0eb0bd | PHP | gerardobeltranmx/Desarrollo-Web-con-PHP-y-Laravel | /mysql/ejemplos/control_empleados/EmpleadosReporte.php | UTF-8 | 1,187 | 3.015625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
include("config.php");
ini_set('display_errors', 1);
error_reporting(E_ALL);
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_... | true |
af7a953bd6bd20a1bcbfc0da7085d235c0fafa02 | PHP | INHack20/VzlaToolsBundle | /Call/HttpGetXml.php | UTF-8 | 1,980 | 2.625 | 3 | [] | no_license | <?php
/*
* This file is part of the TecnoCreaciones package.
*
* (c) www.tecnocreaciones.com
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tecnocreaciones\Vzla\ToolsBundle\Call;
use Lsw\ApiCallerBundle\Call\ApiCall... | true |
4e427032441e464954c2fb43d00a67fdf9cf41b0 | PHP | jtanjung/pehape | /src/Constants/Message.php | UTF-8 | 1,451 | 2.71875 | 3 | [] | no_license | <?php namespace Pehape\Constants;
/**
* Class Message
* @package Pehape\Constants
*/
class Message {
/**
* Message for undefined class
*/
public static $NO_CLASS = "Class '%s' not found";
/**
* Message for undefined method
*/
public static $NO_METHOD = "Call to undefined method... | true |
eca385b8200a62ebbef4c90a642c10ee005a9cc7 | PHP | eSimula/eSimula | /classes/Usuario.class.php | UTF-8 | 120 | 2.6875 | 3 | [] | no_license | <?php
class Usuario{
var $nome;
function __construct($nome) {
$this->nome = $nome;
}
//comentario
}
?> | true |
8df7fe9504460571984d5e5668ca57f7f09da847 | PHP | criscordovaa/test_logic | /libraries/Grid.php | UTF-8 | 5,535 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
require("Cli.php");
class Grid extends Cli
{
static $default_rows = 3;
static $default_columns = 3;
static $round_side;
private $current;
private $last;
private $intents;
private $finish;
static $settings = [
[
"letter" => "R",
"symbol" => ">",
... | true |
d9eaf0a63ae199c7145b62e74cbead67c85a2b7a | PHP | ValouuR/A2_PHP_OOP_GR2 | /resuscitate.php | UTF-8 | 1,764 | 2.625 | 3 | [] | no_license | <?php
require __DIR__.'/_header.php';
/** @var \Doctrine\ORM\EntityManager $em */
$em = require __DIR__ . '/bootstrap.php';
$trainerRepository = $em->getRepository('ValouuR\PokemonBattle\Model\Trainer');
$myTrainer = $trainerRepository->find($_SESSION['id']);
$pokemonRepository = $em->getRepository('ValouuR\Pokemon... | true |
ceee8c861ab04e88db5cfc9025e5b6555bd623b7 | PHP | alexlouf/laravel_crud_film | /app/Http/Controllers/ArticleController.php | UTF-8 | 2,591 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Article;
class ArticleController extends Controller
{
public function create() {
return view('article.create');
}
public function store(Request $request) {
$request->validate([
'title' => 'required|str... | true |
e3278dbe9089ea797a54e2981b967b6c1c896e0f | PHP | redoxx/sf3-Analysis | /src/Medical/AnalysisBundle/Controller/DefaultController.php | UTF-8 | 1,915 | 2.53125 | 3 | [] | no_license | <?php
namespace Medical\AnalysisBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Medical\AnalysisBundle\Entity\Analyse;
use Medical\AnalysisBundle\Entity\Patient;
use Medical\AnalysisBundle\Entity\Laboratery;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFound... | true |
5d2489c833839f4c64686677eb166b4781c55897 | PHP | LeVanTan-58131382/design_pattern_LP | /php_designpattern/0-ioc/ex01-dependency/DataAccess.php | UTF-8 | 227 | 2.90625 | 3 | [] | no_license | <?php
class DataAccess {
public function __construct() {
}
// get it from DB in real app
public function getCustomerName(int $id): string {
return "Get customer name by id = {$id}";
}
}
| true |
2b872655bc7528e02689d2a4eac893069be52fce | PHP | oleahmed/Assignment02 | /update.php | UTF-8 | 1,341 | 2.796875 | 3 | [] | no_license | <?php
$pdo = new PDO("mysql:host=localhost;dbname=crud256", "root", "");
$del_id = $_GET['id'];
//update section
if(isset($_POST['submit'])){
$name = $_POST['name'];
$email = $_POST['email'];
$number = $_POST['num'];
$address = $_POST['address'];
$q = "UPDATE mobiles SET name='$name',email='$email',number='$nu... | true |
d960dba0a11264790880f6076872661a8578da72 | PHP | ringoteam/palabre | /src/Palabre/UserBundle/Model/User.php | UTF-8 | 1,362 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Palabre\UserBundle\Model;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
use Palabre\ProjectBundle\Model\Project;
class User extends BaseUser
{
protected $firstName;
protected $lastName;
protected $projects;
public function setFirstName($firstNa... | true |
cfec19d7a7558c485bf768b256d42bb54305780e | PHP | zemlia-zemlia/ankva-crm.mcdir.ru | /models/Country.php | UTF-8 | 639 | 2.515625 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
class Country extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'country';
}
public function rules() {
return [
['id', 'integer'],
['name', 'string'],
... | true |
4fb3afad69756b5048fca2d34361926a369b55dc | PHP | P79N6A/rongsheng | /app/application/models/game/Game_model.php | UTF-8 | 21,968 | 2.640625 | 3 | [] | no_license | <?php
/**
* 机器人model
* Class Robot_model
* @author harvey
* @Date: 16-12-29
* @license http://www.boyaa.com/
*/
class Game_model extends Bmax_Model {
private $ndb;
private $odb;
private $m;
private $_game;
public function __construct()
{
parent::__construct();
$this->load... | true |
bb01c1ab97a02f9fa011c50c64a9c4d7160694e3 | PHP | Davidmattei/phpinvest | /src/Exception/Project/AlreadyExistsException.php | UTF-8 | 503 | 2.90625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace PhpInvest\Exception\Project;
use PhpInvest\Entity\Project;
use PhpInvest\Exception\InvestException;
final class AlreadyExistsException extends InvestException
{
private Project $project;
public function __construct(Project $project)
{
parent::__construct... | true |
b284aad80e0e78d192fa68e80e52b40900a06d57 | PHP | laborci/phlex | /src/Parser/TRex/TRex.php | UTF-8 | 1,309 | 2.71875 | 3 | [] | no_license | <?php namespace Phlex\Parser\TRex;
use App\ServiceManager;
use Phlex\Parser\TRex\Fang;
use zpt\anno\Annotations;
class TRex {
/** @var Fang */
protected $fang;
/** @var Dragon */
protected $dragon;
public function __construct() {
$this->fang = new Fang($this);
$this->dragon = new Dragon($this);
}
publi... | true |
0b1656ce7aa81d3627cf84cdad254226853d61fc | PHP | rohitshakya/CodeBucket | /8. PHP/abc.php | UTF-8 | 12,730 | 2.625 | 3 | [] | no_license | <?php
//registration Module
public function getcities(){
$sid = $this->request->getPost('sid');
$var = "<option value=''>Select City</option>";
$cityData = $this->db->query("SELECT * FROM `cities` WHERE `state_id`=$sid")->getResultArray();
foreach($cityData as $cityId){
... | true |
e2ed7995177acb1ce1b8565c90b2ae6cd0e73aca | PHP | aedart/athenaeum | /packages/Config/src/Parsers/Files/Ini.php | UTF-8 | 1,258 | 2.90625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Aedart\Config\Parsers\Files;
use Aedart\Config\Parsers\Exceptions\UnableToParseFile;
/**
* Ini Configuration File Parser
*
* @see http://php.net/manual/en/function.parse-ini-file.php
*
* @author Alin Eugen Deac <aedart@gmail.com>
* @package Aedart\Config\Parsers\Files
*/
class Ini extends Pars... | true |
ecfccdc3d63d1e52efbfc933ed1363189ab428f8 | PHP | mishraseema411/life_repository | /cmodel.php | UTF-8 | 764 | 2.9375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Pasistence
* Date: 25-09-2018
* Time: 07:05 PM
*/
class cmodel
{
public $id,$name;
/**
* cmodel constructor.
* @param $id
* @param $name
*/
public function __construct($id, $name)
{
$this->id = $id;
$this->name = $name;
... | true |
8182275fae10f21b3082e191d6d3a2b5c2862aa3 | PHP | cog-project/cog | /mongointerface.class.php | UTF-8 | 3,298 | 2.6875 | 3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
// I'm going to hell.
class ObjectId {
}
class MongoInterface {
public function __construct() {
}
public function exec($db,$cmd) {
$safe_db = escapeshellarg($db);
$safe_cmd = escapeshellarg("printjson({$cmd});");
$full_cmd = "mongo --quiet --eval {$safe_cmd} {$safe_db}";
$res = shell_exec($full_cmd);
... | true |
0d038efce597f4aff4018764ca7204a4fe649b16 | PHP | Omnia-Kamal-66/php-course | /index2.php | UTF-8 | 363 | 3.6875 | 4 | [] | no_license | <?php
//switch statement
$weather = 'windy';
$color =null;
switch (true){
case $weather == 'sunny':
$color = 'blue';
break;
case $weather == 'cloudy':
$color = 'grey';
break;
default :
echo 'weather is not defined';
break;
}
echo $color;
/* we can pass a 'true' value to the switch statem... | true |
0602620f07326dd6526d81c1f168f1faebf068d4 | PHP | slideloft/decred-woocommerce-plugin | /includes/class-gw-checkout.php | UTF-8 | 9,095 | 2.765625 | 3 | [
"ISC"
] | permissive | <?php
/**
* Payment Gateway methods used by the checkout page
*/
namespace Decred\Payments\WooCommerce;
use Decred\Crypto\ExtendedKey;
defined( 'ABSPATH' ) || exit; // prevent direct URL execution.
require_once __DIR__ . '/class-constant.php';
/**
* Decred Payments
*
* @class Decred\Payments\WooCommerc... | true |
8e9757d30c635cf26f753df484503428a73221ec | PHP | 0007David/app-shop | /app/Category.php | UTF-8 | 497 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Category extends Model{
/**
* Metodo que define la relacion entre Category->Products
*/
public function products(){
return $this->hasMany(Product::class);
}
public function getImageAttribute(){
if(... | true |
b1b1b58a92b04d32cd879b5d574412e0079676de | PHP | Oktopost/Wave | /tests/Wave/FileSystem/JsonFileAccessTest.php | UTF-8 | 1,995 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Wave\FileSystem;
use Wave\Base\FileSystem\IFileAccess;
use Wave\Base\FileSystem\IJsonFileAccess;
use Wave\Scope;
class JsonFileAccessTest extends \PHPUnit_Framework_TestCase
{
/**
* @return \PHPUnit_Framework_MockObject_MockObject|IFileAccess
*/
private function mockFileAccess()
{
return $t... | true |
29df8bb42b5cdc47d33b8cddf34a997b960806c3 | PHP | danielmullin/NotificationBundle | /Adapter/DatabaseMessageAdapter.php | UTF-8 | 2,048 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace IrishDan\NotificationBundle\Adapter;
use IrishDan\NotificationBundle\DatabaseNotifiableInterface;
use IrishDan\NotificationBundle\DatabaseNotificationManager;
use IrishDan\NotificationBundle\Message\MessageInterface;
use IrishDan\NotificationBundle\Notification\NotificationInterface;
class DatabaseM... | true |
a6362b4ccb76a5b0771e0c4430a2d210db1253c3 | PHP | pmn834/wgtotw | /Anax-MVC/app/src/Question/QuestionController.php | UTF-8 | 27,523 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Anax\Question;
/**
* To attach comments-flow to a page or some content.
*
*/
class QuestionController implements \Anax\DI\IInjectionAware
{
use \Anax\DI\TInjectable;
/**
* Initialize the controller.
*
* @return void
*/
public function initialize()
{
... | true |
882e1cb896a72306a015db81eed7e8da09af287d | PHP | gnovaro/OpenApiGenerator | /src/Scraper/DefaultScrapper.php | UTF-8 | 930 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace wapmorgan\OpenApiGenerator\Scraper;
use wapmorgan\OpenApiGenerator\ErrorableObject;
use wapmorgan\OpenApiGenerator\Scraper\Result\Result;
abstract class DefaultScrapper extends ErrorableObject
{
/**
* Should return list of controllers
* @return Result
*/
abstract public function... | true |
c0ad8ec34e57a2494a12e35f21c133148ef30720 | PHP | furaoing/edusoho | /src/ApiBundle/Api/Resource/Course/CourseMemberFilter.php | UTF-8 | 1,073 | 2.515625 | 3 | [] | no_license | <?php
namespace ApiBundle\Api\Resource\Course;
use ApiBundle\Api\Resource\Filter;
use ApiBundle\Api\Resource\User\UserFilter;
class CourseMemberFilter extends Filter
{
protected $simpleFields = array(
'id', 'courseId', 'deadline', 'courseSetId'
);
protected $publicFields = array(
'user',... | true |
0e7e3329011b7d12c1b946d3cf08e0c26c88daef | PHP | nimid/Knutt | /src/application/controllers/backend/category.php | UTF-8 | 3,835 | 2.625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Knutt
*
* An open source content management system.
*
* @package controllers/backend
* @author Saroj Saengphongumphai
* @copyright © 2013 Saroj Saengphongumphai
* @license http://creativecommons.org/licenses/by-sa/3.0/
*/
// ----... | true |
a808ba86b161ff192769301f8375b2f749ee4e2e | PHP | mandalornl/duo-cms | /src/Duo/CoreBundle/EventSubscriber/SlugSubscriber.php | UTF-8 | 2,060 | 2.8125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Duo\CoreBundle\EventSubscriber;
use Doctrine\Common\EventSubscriber;
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
use Doctrine\ORM\Event\PreUpdateEventArgs;
use Doctrine\ORM\Events;
use Duo\AdminBundle\Tools\Intl\Slugifier;
use Duo\CoreBu... | true |
73f5d7ce557c064367ca0184ab90dbb7092d277d | PHP | Orel2888/ghost | /tests/ApiTesting/DocApi.php | UTF-8 | 2,391 | 2.828125 | 3 | [] | no_license | <?php
class DocApi
{
public $pathDocFile;
public function __construct($docFile = null)
{
if (is_null($docFile)) {
$this->pathDocFile = 'api_docs.json';
} else {
$this->pathDocFile = $docFile;
}
}
public function writeDocApi($apiMethod, $httpMethod, ... | true |
0ffcfcf8a872b437df10acd949eef3f19a84c9aa | PHP | Liddydu130295/instagram-php-scraper | /examples/saveSessionWithLongExpirationDate.php | UTF-8 | 1,778 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
ini_set('display_errors', 1);ini_set('display_startup_errors', 1);error_reporting(E_ALL);//Example how to:
//1. Use ttl in saveSettings to extend expiration date of apc_cache_info
//2. Extend expiration date of cache on initial stats_stat_correlation
//
//Why:
//I received a lot of emails from instagram with titl... | true |
f3323f87f2a120c5beea5fcbd156bc398048d2b2 | PHP | joanmon/PHPhotoSuite | /src/PhotoSuite/Domain/Lang.php | UTF-8 | 675 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace PHPhotoSuit\PhotoSuite\Domain;
use PHPhotoSuit\PhotoSuite\Domain\Exception\InvalidLanguageException;
class Lang
{
/** @var string */
private $value;
const LANGUAGE_EN = 'EN';
const LANGUAGE_ES = 'ES';
/**
* @param $value
* @throws InvalidLanguageException
*/
p... | true |
aab19b85b8614d0f7753ac3fb332cb80cf1b35e4 | PHP | chrispynegar/cms-old-version | /admin/create-module.php | UTF-8 | 2,015 | 2.53125 | 3 | [] | no_license | <?php
/**
* Develop21
*
* @package Develop21 CMS
* @author Chris Pynegar - Develop21
* @copyright © 2012
* @license http://develop21.com/cms/license.txt
*
*/
// if the configuration file doesn't exist, run the installer
if(!file_exists('../config.php')) {
header('Location: ../install/index.php');
exit();
}
... | true |
93e04b27ab0f73a07723d5d448c3fdcae96e3446 | PHP | chrisribal/onix-parser | /src/CodeList/CodeList255.php | UTF-8 | 2,191 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Ribal\Onix\CodeList;
/**
* ONIX Code List 255
*
* Used with <InsertPointType> <x574>
*
* @see https://ns.editeur.org/onix/en/255
*/
class CodeList255 extends CodeList implements CodeListInterface
{
/**
* Code List 255 for en
*
* @var array
* @see https://ns.editeur.org/onix/en/255
*/
... | true |
9bde807694b9e006caffaeecaf152fdc8ddc6b2e | PHP | Jonas-Martins/sistema_sublimacao | /papel.php | UTF-8 | 3,832 | 2.625 | 3 | [] | no_license | <?php
include_once 'validarLogin.php';
require_once 'classes/EstoquePapelCrud.php';
$objPapelCrud = new EstoquePapelCrud();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="css/consult.css" />
<?php
include_once 'navLogado/... | true |
3e5167bdddc60a6a1a0ea12201c8bfbb05fd9b9e | PHP | mkasprz/redo | /src/Repeka/Domain/UseCase/Metadata/MetadataDeleteCommand.php | UTF-8 | 472 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Repeka\Domain\UseCase\Metadata;
use Repeka\Domain\Cqrs\ResourceClassAwareCommand;
use Repeka\Domain\Entity\Metadata;
class MetadataDeleteCommand extends ResourceClassAwareCommand {
/** @var Metadata */
private $metadata;
public function __construct(Metadata $metadata) {
parent::__... | true |
5d63e4d22da1beb4370f0a204f6424bb9a48c3fc | PHP | furqanaleem-krishtecnolabs/MagentoTutorial | /app/code/SimplifiedMagento/FirstModule/Model/Pencil.php | UTF-8 | 684 | 3.09375 | 3 | [] | no_license | <?php
namespace SimplifiedMagento\FirstModule\Model;
use SimplifiedMagento\FirstModule\Api\PencilInterface;
use SimplifiedMagento\FirstModule\Api\Color;
use SimplifiedMagento\FirstModule\Api\Size;
class Pencil implements PencilInterface
{
protected $color;
protected $size;
protected $name;
protect... | true |
6449ae3b8d409a989930918c847b60f3a51b9e0b | PHP | JovanRis/fiktApp | /project.php | UTF-8 | 3,939 | 2.5625 | 3 | [] | no_license | <?php
require_once "header.php";
require_once "classes/projectClass.php";
$studentsPerProject = 5;
?>
<div id="main">
<div class="col-md-2">
<div class="btn-group-vertical">
<!-- Ako e najaven kako Kompanija da mozi da dodaj -->
<?php
if ($_SESSION['userType... | true |
b208c06006168a55738f3a7dd613f5cee2f235af | PHP | marcosvazquezfer/padel_optare | /controller/CourtsController.php | UTF-8 | 6,717 | 2.78125 | 3 | [] | no_license | <?php
//file: controller/CourtsController.php
require_once(__DIR__."/../model/Court.php");
require_once(__DIR__."/../model/CourtMapper.php");
require_once(__DIR__."/../model/User.php");
require_once(__DIR__."/../model/UserMapper.php");
require_once(__DIR__."/../core/ViewManager.php");
require_once(__DIR__."/../contr... | true |
cbc1d99b5a462b5ae3a39ce88948b6e90536e3e9 | PHP | jeffrey-borabo/ucsb-icm | /process/download.registrar.subjects.php | UTF-8 | 2,508 | 2.90625 | 3 | [] | no_license | <?php
/**
* Downloads subjects from UCSB's GOLD web service and inserts rows into database
*
*
* PHP version 5
*
* @author Blake Regalia <blake.regalia@gmail.com>
* @version 2012/08/30
*/
require "phpQuery.php";
require "database.php";
// establish this structure's namespace
$namespace = "registrar.... | true |
e648f899461a63b3c8298298fcdf5d5a08a238cb | PHP | iugosds/seller-center-sdk-php | /src/RocketLabs/SellerCenterSdk/Endpoint/Order/Request/GetOrder.php | UTF-8 | 862 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace RocketLabs\SellerCenterSdk\Endpoint\Order\Request;
use RocketLabs\SellerCenterSdk\Core\Client;
use RocketLabs\SellerCenterSdk\Core\Request\GenericRequest;
use RocketLabs\SellerCenterSdk\Core\Response\ErrorResponse;
use RocketLabs\SellerCenterSdk\Endpoint\Order\Response\GetOrder as GetOrderResponse;
/... | true |
0a7c8289abf3047cbd139ce29a14f4ea0fdb71f4 | PHP | jounpk/LaZafra_ControlSucursales | /funciones/agregaCorreoEnCotizacion.php | UTF-8 | 3,070 | 2.65625 | 3 | [] | no_license | <?php
session_start();
define('INCLUDE_CHECK',1);
require_once('../include/connect.php');
$correo = (isset($_POST['correo']) AND $_POST['correo'] != '') ? $_POST['correo'] : '' ;
$idCot = (!empty($_POST['idCot'])) ? $_POST['idCot'] : 0 ;
#echo '<br><br>------------------------ Se declara la función de validación del ... | true |
280deb55c70a981b4fef3f2693e244226e0373c9 | PHP | nnamnguyen/dotb_ims_new | /modules/DRI_Workflow_Task_Templates/Activity/AbstractAppointmentHandler.php | UTF-8 | 10,459 | 2.671875 | 3 | [] | no_license | <?php
namespace DRI_Workflow_Task_Templates\Activity;
/**
* Abstract implementation for all appointment activities (Meeting/Call)
*
* @author Emil Kilhage <emil.kilhage@addoptify.com>
*/
abstract class AbstractAppointmentHandler extends AbstractActivityHandler
{
const STATUS_PLANNED = 'Planned';
const STA... | true |
10ac989834634066dff9aa0a5272818ce389362d | PHP | bellyfat/maxibooking-hotel | /src/MBH/Bundle/BaseBundle/Service/YmlManager.php | UTF-8 | 2,855 | 2.90625 | 3 | [] | no_license | <?php
namespace MBH\Bundle\BaseBundle\Service;
use Symfony\Component\Yaml\Yaml;
/**
* Class YmlManager
* @package MBH\Bundle\BaseBundle\Service
*/
class YmlManager
{
/**
* @param $filePath
* @return array
*/
public function getParsedData(string $filePath)
{
return Yaml::parse(fi... | true |
2f2dfe9445701a6bea83cdc175437899b1ba6bd6 | PHP | kalevsuik/phpplay | /controllers/Vote.class.php | UTF-8 | 448 | 2.796875 | 3 | [] | no_license | <?php
class Vote
{
public function run()
{
// pole sisse loginud
if (!isset($_SESSION['logged_in']) || $_SESSION['logged_in'] != 1)
{
$view = new View();
$view->setTemplateFile('views/login_error.php');
echo $view->render();
return;
}
$gp = new GalleryPictures();
$view = new View();
$vie... | true |
a360d338ae8635c8891f1b834be214928482c343 | PHP | h-sn/socials-bundle | /Helpers/SocialBarHelper.php | UTF-8 | 2,456 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Secl\SocialsBundle\Helpers;
use Symfony\Component\Templating\Helper\Helper;
use Symfony\Component\Templating\EngineInterface;
/**
* Class SocialBarHelper
*
* PHP version 5
*
*
* @category Secl\SocialsBundle\Helpers
* @package Secl\SocialsBundle\Helpers
* @author HSN <info@secl.com.ua>
... | true |
9eb8d0ea530a77527b9f291d7f6fe5707afc4a44 | PHP | tyao1987/api | /module/Application/src/Application/Model/News.php | UTF-8 | 687 | 2.515625 | 3 | [] | no_license | <?php
namespace Application\Model;
use Application\Model\DbTable;
use Zend\Db\Sql\Select;
class News extends DbTable
{
protected $_name = 'news';
protected $_primary = 'id';
function __construct(){
$this->setTableGateway("cmsdb", $this->_name);
$this->_select = $this->tableGateway->getSql()->select();
}
p... | true |
afafcef2e948ecce869fc3bac7f760233f32a1a9 | PHP | daanbakker1995/WCS-Online | /admin/users_edit.php | WINDOWS-1252 | 7,397 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
session_start();
$admin_rights = true; // Page is only for admins.
include "check_login.php";
if ($_SESSION["ingelogd"] == true)
{
} else
{
header('location: ./login.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- ADMIN HEADER -->
<?php include 'include/head.php'; ?>
</... | true |
fbd4ba25a82324794b8e7f4339951db9c07748c1 | PHP | tiagodaniel29/ProjectoFinalCurso_Web | /interfacePF/recuperarSenha.php | UTF-8 | 2,505 | 2.5625 | 3 | [] | no_license |
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'projf');
$connection = mysqli_connect(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_DATABASE);
if($_POST['action']=="password")
{
$email = mysqli_real_escape_string($connection,$_POST['email']... | true |
6f6c285ae44d227d5df30c177bd3e1de8a14b6f4 | PHP | codelibo/shop | /Application/Clientapi/Controller/AuthController.class.php | UTF-8 | 34,228 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: sunfan
* Date: 2017/2/4
* Time: 10:02
*/
namespace Clientapi\Controller;
class AuthController extends MapiBaseController
{
public function login(){
try{
$data = $this->data;
if ($data['type']==""){
$this->ApiReturn(2000... | true |
50a7aa90b663fe8889c62327dd6cc1cb885ffe46 | PHP | cmd0315/online-forms | /app/BCD/OnlineForms/Rejection/Commands/RestoreRejectReasonCommandHandler.php | UTF-8 | 740 | 2.71875 | 3 | [] | no_license | <?php namespace BCD\OnlineForms\Rejection\Commands;
use Laracasts\Commander\CommandHandler;
use BCD\OnlineForms\Rejection\RejectReasonRepository;
class RestoreRejectReasonCommandHandler implements CommandHandler {
/**
* @var RejectReasonRepository $rejectReasonRepo
*/
protected $rejectReasonRepo;
/**
* Const... | true |
b12bedf1142204aa2ae0cfe8e3aef848eb6bf9df | PHP | ktv1/testmone | /module/Application/src/Entity/ProductToCollection.php | UTF-8 | 1,484 | 2.625 | 3 | [] | no_license | <?php
namespace Application\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="product_to_collection")
*/
class ProductToCollection
{
/**
* @ORM\Id
* @ORM\Column(name="id")
*/
protected $id;
/**
* @ORM\Column(name="collection_id")
*/
protected $c... | true |
ceceeb76e05ac2a08866f6615759465c7e271dc5 | PHP | tanrk/opus-js | /opus/tools/depender/php/build.php | UTF-8 | 991 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
include_once 'jsmin-1.1.1.php';
include_once 'utilities.php';
// FIXME: quicky way to allow for different server ports
//$base = "http://localhost:89/";
$base = $_SERVER['SERVER_ADDR'] . ":" . $_SERVER['SERVER_PORT'];
$path = @$_REQUEST["path"];
$list = @$_REQUEST["list"];
$prefix = @$_REQUEST["prefix"];
$fil... | true |
95eb9198611744a8c164db5714327b093ead4e1c | PHP | gaj223/SEproject | /medical/upload.php | UTF-8 | 1,620 | 2.578125 | 3 | [] | no_license | <html>
<body>
<form action="upload_file.php" method="post" enctype="multipart/form-data">
Patient Email or SSN:
<input type="text" name="id" id="id"><br>
Patient Firstname:
<input type="text" name="firstname" id="firstname"><br>
Patient Lastname:
<input type="text" name="lastname" id="lastname"><br>
Last 4 of So... | true |
9fc88822180822cf5f57e06423ffb75ba5884a0d | PHP | adellantado/bot-template-framework | /src/Builder/Drivers/ViberDriver.php | UTF-8 | 368 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace BotTemplateFramework\Builder\Drivers;
class ViberDriver extends Driver {
protected $token;
public function __construct($token) {
parent::__construct('Viber');
$this->token = $token;
}
public function toArray() {
return array_merge(parent::toArray(), [
... | true |
6de59f7d8ece8477b8ddda2cc999b4e0cb79bfe2 | PHP | Mateus8741/backend-carrinho | /app/models/Usuario.php | UTF-8 | 459 | 3.3125 | 3 | [] | no_license | <?php
namespace App\Models;
class Usuario {
private string $nome;
private string $senha;
public function __construct($nome, $senha) {
$this->nome = $nome;
$this->senha = $senha;
}
/**
* Get the value of nome
*/
public function getNome()
{
return $... | true |
90003598feed51321f41f2dc61f960efa59c67fd | PHP | RandommUser/php_quiz | /q1.php | UTF-8 | 4,821 | 2.703125 | 3 | [] | no_license | <?php include 'questions.php';?>
<?php
if (isset($_SESSION["get1"]))
{
echo '
<h1 class="Welcome">Welcome to the amazing quiz!!</h1>
<h2 class="part">Part 1: The Norm</h2>
<form method="post" action="';
echo htmlspecialchars($_SERVER["PHP_SELF"]);
echo '">';
if (!isset($_SESSION["q11"])){
echo '<div id="question">
<... | true |
df58b87699cb957284d64d4cbac89df0f19b0f3a | PHP | sessility/SEO | /Plugin/SEO/lib/lang/stopwords.php | UTF-8 | 2,163 | 2.828125 | 3 | [] | no_license | <?php
include_once(__DIR__ . '/../sseo.php');
class Sseo_Stopwords extends Sseo_Base {
private $path;
private $lang;
private $lang_config;
private $words;
function __construct($lang = 'en', $path = '/../../config/stopwords/') {
parent::__construct();
$this->lang = $lang;
... | true |
b9d59c5374ba298df958a2465cc57c4f654ff375 | PHP | arpite/arpite | /src/Component/Components/Chart/Chart.php | UTF-8 | 1,938 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Arpite\Component\Components\Chart;
use Arpite\Component\Component;
use Arpite\Component\Components\Chart\Enums\DataType;
use Arpite\Core\Utilities\ExportBuilder;
class Chart extends Component
{
/** @var array<int, string> */
private array $labels = [];
/** @var array<int, DataSet> */
private arr... | true |
5a415712a308916771c49c0a05e2c651fdf63d01 | PHP | DEVSENSE/Phalanger | /Testing/Tests/@PHP/classes/private_003b.php | UTF-8 | 436 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | [expect php]
[file]
<?php
error_reporting(0);
class pass {
private function show() {
echo "Call show()\n";
}
protected function good() {
$this->show();
}
}
class fail extends pass {
public function ok() {
$this->good();
}
public function not_ok() {
$this->show();
}
}
$t =... | true |
b5ca4e74beec0f990eddaf46acc6a3aafbe14c1f | PHP | elow61/projet5 | /app/controller/ConnexionController.php | UTF-8 | 1,608 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Controller;
class ConnexionController extends Controller {
public function index()
{
$title = 'Connexion | Success Mission';
require VIEW_FRONT . 'connexion.php';
}
public function login()
{
$users = $this->users->get($this->request->getParam('email'... | true |
23a274f452b3e20ce8fc84aff95beb69397a8253 | PHP | mishannn/schedule-vue-test | /app/Models/ClassModel.php | UTF-8 | 2,101 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\ClassModel
*
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ClassModel newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ClassModel newQuery()
* @method static \Illuminate\Da... | true |
daa907d0fd0bd31241f72622040699128f4376a3 | PHP | ivrag/ivrag-main | /assets/php/DataController/DataController.php | UTF-8 | 9,763 | 3.40625 | 3 | [] | no_license | <?php class DataController {
protected $server = "";
protected $username = "";
private $password = "";
protected $conn = "";
protected $database = "";
protected $table = "";
function __construct($params = []) {
$this->server = $params['server'] ?? NULL;
$this->database = $params['database'] ?? ... | true |
19bfb8a3ac44563798f26230252ab448c75b78cc | PHP | jehoshua02/chess-php | /test/suite/Chess/PieceTest.php | UTF-8 | 3,807 | 2.796875 | 3 | [] | no_license | <?php
use \Chess\Board;
use \Chess\Piece;
use \Chess\Piece\King;
use \Chess\Piece\Pawn;
use \Chess\Piece\Queen;
class PieceStub extends \Chess\Piece
{
}
class PieceTest extends PHPUnit_Framework_TestCase
{
public function testBoard()
{
$piece = new PieceStub(Piece::LIGHT);
$board = new Boar... | true |
7fca08bb1b5683cd6df0a7653a385df721673420 | PHP | srhickma/photesto | /public_html/php/SResetPass.php | UTF-8 | 1,512 | 2.65625 | 3 | [] | no_license | <?php
error_reporting(0);
$code = filter_input(INPUT_POST, 'code');
$usr = filter_input(INPUT_POST, 'usr');
$pas = filter_input(INPUT_POST, 'pas');
$cpas = filter_input(INPUT_POST, 'cpas');
$message = "";
try{
$goodCode = false;
if(!preg_match('/[^A-Za-z0-9]/', $pas) && !preg_match('/[^A-Za-z0-9]/', $cpas) && !... | true |
b37abdc38a926201175d7d2f05ac5625881970d1 | PHP | retry0/foodorder | /app/database/bk/2014_09_21_112728_create_ordering_table.php | UTF-8 | 760 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateOrderingTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ordering', function(Blueprint $table)
{
$table->integer('id', true);
$t... | true |
f805b5ca9301b19ab85d3501941d29eeff969cc0 | PHP | magicthemes/MagicThemes-WizardInstaller | /includes/db.php | UTF-8 | 9,026 | 2.953125 | 3 | [] | no_license | <?php
/**
* @package akeebainstaller
* @copyright Copyright (C) 2009-2010 Nicholas K. Dionysopoulos. All rights reserved.
* @author Nicholas K. Dionysopoulos - http://www.dionysopoulos.me
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL v3 or later
*
* Akeeba Backup Installer database connection class
*/
... | true |
7a72f3d56fda93689cd0ccc6e4701ef4bdca4e51 | PHP | esmcrezosis/esmc_php | /mcnp/application/models/EuActualite.php | UTF-8 | 3,133 | 3.109375 | 3 | [] | no_license | <?php
class Application_Model_EuActualite {
//put your code here
protected $actualite_id;
protected $actualite_libelle;
protected $actualite_resume;
protected $actualite_description;
protected $actualite_type;
protected $actualite_vignette;
protected $actualite_date;
protected $pu... | true |
eba6d63b1b5a289ef65a8186c7a9c627a23c723f | PHP | krapshsa/leetcode-php | /src/BinaryTree/SearchInABinarySearchTree.php | UTF-8 | 582 | 3.1875 | 3 | [] | no_license | <?php
namespace App\BinaryTree\BinaryTree;
class SearchInABinarySearchTree
{
public function searchBST(?TreeNode $root, int $val): ?TreeNode
{
if (null === $root) {
return null;
} elseif ($val === $root->val) {
return $root;
} elseif ($root->val < $val) {
... | true |
eee8fd32b68e15b7c125fc0c916fbc5a540fc9dc | PHP | muhammedkamel/DOTW | /Repositories/ICountryRepository.php | UTF-8 | 383 | 2.921875 | 3 | [] | no_license | <?php
namespace DOTW\Repositories;
interface ICountryRepository {
public function addCountry(int $code, string $name): bool;
public function addBulkOfCountries(array $countries): bool;
public function getCountryByID(int $id);
public function getCountryByCode(int $code);
public function getCountryByName(strin... | true |
2e797acaa22984e560f99eaf0632bc4438ab0985 | PHP | BeardedUnicorns/wedding | /application/core/MY_Controller.php | UTF-8 | 1,680 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* core/MY_Controller.php
*
* Default application controller.
*/
class MY_Controller extends CI_Controller
{
protected $data = array();
protected $choices = array(
'Guests' => '/guest',
'Gifts' ... | true |
29ec58276b142ec35942228316b54d82c617d995 | PHP | jozef507/itu_CI_app | /codefiles/models/Shows_model.php | UTF-8 | 608 | 2.71875 | 3 | [] | no_license | <?php
class Shows_model extends CI_Model
{
public function __construct()
{
$this->load->database();
}
public function get_shows()
{
$query = $this->db->get('KulturneDielo');
$result= $query->result_array();
return $result;
}
public function create_show($name, $type, $genre, $text)
{
$data = array(
... | true |
6bf288977296436322973a049105290407bdfe61 | PHP | efTobark/spaa | /app/Http/Controllers/UsuariosController.php | UTF-8 | 6,062 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
//clases --> illuminate empaqueta peticion como objeto, wrapper BD.
class UsuariosController extends Controller
{
public function login(Request $request){
$data = array();
if($request->session()->has('error')) $data['error... | true |
f38e2f3d556bf268932707c47fd855b985b3414a | PHP | promofarma-trends/promofarma-search-bundle | /src/SearchBundle/Services/EvolutionOfTheMostSpokenTopics.php | UTF-8 | 3,944 | 2.53125 | 3 | [] | no_license | <?php
namespace SearchBundle\Services;
use FOS\ElasticaBundle\Manager\RepositoryManagerInterface;
use Elastica\Query;
use Elastica\Query\BoolQuery;
use Elastica\Query\Filtered;
use Elastica\Filter\Term;
use Elastica\Query\Match;
use SearchBundle\Infrastructure\ElasticRepository;
use SearchBundle\Services\Domain\Creat... | true |
e7bb758dec3d81222be545eb5ec42955bdf929ec | PHP | alexyaroshchuk/userTaskAPI | /app/Models/Task.php | UTF-8 | 1,861 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Notifications\Notifiable;
class Task extends Model
{
use Notifiable;
/**
* The attributes that are mass assignable.
... | true |
c3e9bc6bc458bf7b57841f701ffbe0c2578f4a5b | PHP | mpagnin/cs313-php | /web/team/w03/w03test.php | UTF-8 | 1,479 | 3.078125 | 3 | [] | no_license | <?php
// The first thing I have to do is to process all the input
$name = htmlspecialchars($_POST["name"]);
$email = htmlspecialchars($_POST["email"]);
$major = htmlspecialchars($_POST["major"]);
$comments = htmlspecialchars($_POST["comments"]);
$continents = $_POST["continents"];
?>
<!DOCTYPE html>
<html lang="en-us">... | true |