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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
cda75c12a8f6d1ea10737bb078f0a52ac048c9f3 | PHP | deadwin19/codesignal | /shapeArea.php | UTF-8 | 216 | 3.5 | 4 | [] | no_license | <?php
$polygon = 3;
$polygonArea = shapeArea($polygon);
echo $polygonArea;
function shapeArea($n) {
$area = 1;
for ($i = 0; $i<$n ; $i++)
{
$area = $area + (4*$i);
}
return $area;
}
| true |
2920db7568b74242850913d4020be376149670a9 | PHP | Sarthak8989/Capstone | /class/config.php | UTF-8 | 808 | 2.65625 | 3 | [] | no_license | <?php
class Config{
const DB_HOST = "localhost";
const DB_NAME = "sad";
const DB_USER = "root";
const DB_PASSWORD = "root";
//METHODS
// kindly do not edit methods
// they are constant methods that are used all over in the system
// editing these methods may lead to false data due to misconfiguration.
p... | true |
e16e8f3910f513b192934fe941be558ea71cb18d | PHP | KamevoTeam/Kamevo | /kamevo_src/php/mp.class.php | UTF-8 | 2,318 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/*****
This class is an extension of users class. Please note that the user objet is not directly link it.
******************/
class mpClass extends users{
private $userDatas; //contain all all current users infos.
private $currentIdConv; //current idConv
public function __construct($userInf){
//nothin... | true |
abd9255ceabca8b212f5ca9b3a52109aec3d662c | PHP | philmayfield/shelterhope | /manager/employees.php | UTF-8 | 2,013 | 2.515625 | 3 | [] | no_license | <?php
session_start();
require_once('../db_connect.php'); // Sets up $conn
require_once('login_test.php'); // requires session_start(), sets up $logged_in, $user, $user_is_employee, $user_access, $empdata, $locdata;
if ($user_access > 1) {
header("location: main.php");
}
?>
<!DOCTYPE html>
<!--[if lt IE 7]> ... | true |
33a6c8bfe863fbb4b5a09b896567a516782d15d3 | PHP | binomotraders/binomocoin.com | /app/Models/BNCLive.php | UTF-8 | 812 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class BNCLive extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'b_n_c_lives';
/**
* The attributes that are mass assignable.
*
* @var array
*/
... | true |
0f34f8cb5b81b7afc811dbba0d0f6d9a29022651 | PHP | oimtrust/larapus | /database/seeds/BooksSeeder.php | UTF-8 | 1,288 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Author;
use App\Book;
use App\BorrowLog;
use App\User;
class BooksSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//Sample penulis
$author1 = Author::create(['name'=>'Fathur ... | true |
74046a7f285b702c2f3d70c34cbd84b41f5974ae | PHP | tranthanhhoa/semantic-ui-phalcon | /app/modules/frontend/controllers/IndexController.php | UTF-8 | 1,860 | 2.59375 | 3 | [] | no_license | <?php
namespace FrontEnd\Controller;
use Application\Mvc\Controller;
use FrontEnd\Forms\LoginForm;
use FrontEnd\Forms\UserForm;
class IndexController extends Controller {
public function indexAction() {
// $this->helper->cacheExpire(120);
$this->helper->title()->append( 'Homapge' );
}
public function login... | true |
30cf51ad5c20a040cde6256d2378c5a55779203e | PHP | SUSUPerformingArts/Performing-Arts-Website | /webroot/oldSite/nuffield/pitches/submit.php | UTF-8 | 4,203 | 2.5625 | 3 | [] | no_license | <?php
$root = $_SERVER["DOCUMENT_ROOT"];
require $root . "/compose.php";
use \PA\Auth\Auth;
\PA\Snippets\Header::printHeader("SUSU Performing Arts :: Submit a Nuffield pitch");
$now = new DateTime("now", new DateTimeZone("Europe/London"));
$deadline = new DateTime("2016/05/30", new DateTime... | true |
c35c0ae4b4f936ae3b0b9fb659f97d56b5abacea | PHP | Einenlum/Phrench | /src/ConjugatorInterface.php | UTF-8 | 309 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Phrench;
use Phrench\DTO\ConjugationModality;
use Phrench\DTO\Verb;
interface ConjugatorInterface
{
public function conjugate(Verb $verb, ConjugationModality $modality): string;
public function supports(Verb $verb, ConjugationModality $modality): bool;
}
| true |
3d07d5c83ea04096cfc6161346da5619161bf990 | PHP | Jyrno42/EstonianLolLadder | /brain/class.UpdateManager.php | UTF-8 | 6,607 | 2.625 | 3 | [] | no_license | <?php
class UpdateManager
{
const FILE_NAME = 'update_state';
const LOG_FILE = 'update_log';
const STATE_FILE = 'update_status';
private $offline = 0;
private $updated = 0;
private $no_sid = 0;
private $no_updates = 0;
public function __construct($Datamanager, $Cache, $Smarty,... | true |
a5f676c7571cee8de0b8983a3d63dcbfcc4b2ea8 | PHP | poyuki/assessment | /assessment-www/src/Domain/Api/QuestionFactoryInterface.php | UTF-8 | 386 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Domain\Api;
use App\Application\CreateQuestion\Dto\CreateQuestionDto;
use App\Domain\Question;
interface QuestionFactoryInterface
{
/**
* @param \App\Application\CreateQuestion\Dto\CreateQuestionDto $createQuestionDto
* @return Question
*/
public f... | true |
5774878da6d0af9494466ee623baf40733545bb3 | PHP | electric-eloquence/fepper-drupal | /backend/drupal/core/lib/Drupal/Core/Database/Query/SelectInterface.php | UTF-8 | 22,441 | 2.65625 | 3 | [
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-other-copyleft",
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
namespace Drupal\Core\Database\Query;
use Drupal\Core\Database\Connection;
/**
* Interface definition for a Select Query object.
*
* @ingroup database
*/
interface SelectInterface extends ConditionInterface, AlterableInterface, ExtendableInterface, PlaceholderInterface {
/* Alter accessors to expose the... | true |
5c9a7a825117b5ddec2436d58c52a42d30d8890f | PHP | flysion/laravel-model-helper | /src/Console/BuildModel.php | UTF-8 | 6,148 | 2.59375 | 3 | [] | no_license | <?php
namespace ModelHelper\Console;
use Composer\Autoload\ClassMapGenerator;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
use ReflectionClass;
class BuildModel extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = ... | true |
73c7599213a5f266c71f9785f606c383a71c01c9 | PHP | GueroSF/maxibook | /models/FormMath.php | UTF-8 | 1,124 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: guerosf
* Date: 10.02.18
* Time: 23:25
*/
namespace app\models;
use yii\base\Model;
/**
* Class FormMath
* @package app\models
*
* Модель для формы.
*
* @property int|float num1
* @property int|float num2
* @property string action
*/
class FormMath extends Mode... | true |
a26d428e795369d83542306034ae10e135e090f8 | PHP | apihour/crm | /src/Tutto/XhtmlBundle/Lib/AbstractTag.php | UTF-8 | 3,498 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tutto\XhtmlBundle\Lib;
/**
* Class AbstractTag
* @package Tutto\XhtmlBundle\Lib
*/
abstract class AbstractTag implements TagInterface {
/**
* @var string
*/
protected $name;
/**
* @var array
*/
protected $attributes = array();
/**
* @var AbstractTag
... | true |
cdca00c3fe681fe8ae54605e758f5fe135ef3b11 | PHP | mobilewish/Embed | /src/Providers/Api/GoogleMaps.php | UTF-8 | 2,114 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Embed\Providers\Api;
use Embed\Adapters\AdapterInterface;
use Embed\Providers\Provider;
use Embed\Providers\ProviderInterface;
use Embed\Utils;
/**
* Provider to use the API of google.
*/
class GoogleMaps extends Provider implements ProviderInterface
{
protected $mode;
protected $config = [... | true |
cef7ecbab0daad75ebb3136df0d64bbc7d618e06 | PHP | peter279k/http-1 | /src/Cookie/CookieAttributes.php | UTF-8 | 7,317 | 3.125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Amp\Http\Cookie;
/**
* Cookie attributes as defined in https://tools.ietf.org/html/rfc6265.
*
* @link https://tools.ietf.org/html/rfc6265
*/
final class CookieAttributes {
/** @var string */
private $path = '';
/** @var string */
private $domain = '';
/** @var int|null */
... | true |
9e1f4ecbea16dd6832cc84b9147ea4b81c599926 | PHP | jl-robledo/practicasPHP | /practica_5.1_joseluisrobledo/funciones/funcion_editar.php | UTF-8 | 2,959 | 2.875 | 3 | [] | no_license | <?php
if(isset($_POST['actualizar'])){
// validamos los nuevos datos introducidos
$id = $_POST['id'];
$nombre = $_POST['nombre'];
$familia = $_POST['familia'];
$descripcion = $_POST['descripcion'];
$formato = $_POST['formato'];
$stock = $_POST['stock'];
$precio = $_POST['precio'];
$imagen = ... | true |
83ebdef454c6908c0965d21be59ab2892e1533f6 | PHP | hkrzysztof/tasks | /Task5/Bowling.php | UTF-8 | 2,462 | 3.234375 | 3 | [] | no_license | <?php
class Bowling
{
private $rolls = [];
private $currentRoll = 0;
public function roll($pins){
$this->rolls[$this->currentRoll++] = $pins;
}
private function sumOfBowlsInFrame($frameIndex){
return $this->rolls[$frameIndex] + $this->rolls[$frameIndex +1];
}
private func... | true |
ce5e1785cb9e09d3b7ff89b428aaa69a781064f8 | PHP | vargas1987/tour-travel | /src/AltezzaTravelBundle/Entity/TerritorialLocation.php | UTF-8 | 4,631 | 2.53125 | 3 | [] | no_license | <?php
namespace AltezzaTravelBundle\Entity;
use AltezzaTravelBundle\Entity\Traits\CreateUpdateEntity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="territorial_location")
*/
class TerritorialLocation
{
use CreateUpdateEntity;
/**
... | true |
b03b0924632fc56227564e6c192bf960cf0980fd | PHP | jlbooker/homestead | /class/SOAPDataProvider.php | UTF-8 | 5,980 | 2.609375 | 3 | [] | no_license | <?php
PHPWS_Core::initModClass('hms', 'SOAP.php');
class SOAPDataProvider extends StudentDataProvider {
public function getStudentByUsername($username, $term)
{
// Force username to lowercase (SOAP is case sensitive)
$username = strtolower($username);
$soap = SOAP::getInstance(UserSt... | true |
8f422eee9c124c88efc2dab57c5e3cb2b3613af1 | PHP | fdalcin/codewars | /PHP/7KYU/SumOfTheFirstNthTermOfSeries.php | UTF-8 | 197 | 2.671875 | 3 | [] | no_license | function series_sum($n) {
return number_format(series_sum_recursive($n, 1), 2);
}
function series_sum_recursive($n, $d) {
return $n === 0 ? 0 : 1 / $d + series_sum_recursive($n - 1, $d + 3);
} | true |
9fcd8b36515d5412fefb5cfa4b52ff324ed1097b | PHP | rolandalla/wordpress-to-instagram | /vendor/mgp25/instagram-php/src/Settings/Factory.php | UTF-8 | 11,815 | 2.78125 | 3 | [
"Apache-2.0",
"GPL-2.0-or-later"
] | permissive | <?php
namespace InstagramAPI\Settings;
use InstagramAPI\Exception\SettingsException;
/**
* Effortlessly instantiates a StorageHandler with the desired Storage backend.
*
* Takes care of resolving user configuration values from multiple sources, then
* creates the correct Storage backend and hooks it up... | true |
2f154a7f7c3fc6a7f6496f64e042bed0b1ba2905 | PHP | tud58/thieunien_v2 | /models/Event.php | UTF-8 | 707 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
class Event extends BaseModel
{
public static function tableName()
{
return static::getDb()->tablePrefix . "event";
}
public function rules(){
return [
[['name'], 'required'],
[['description', 'slug', 'logo'], 'string'],
... | true |
b504a93354c235f15cea3d714b1652255f620d27 | PHP | dhruvmatta/CSRBS | /modifybooking.php | UTF-8 | 11,176 | 2.59375 | 3 | [] | no_license | <?php
// checks if there is a booking available from get and sets it in the variable
if (isset($_GET["bookingID"])) {
$bookingID = $_GET["bookingID"];
} else {
$bookingID = $_GET["userbookingID"];
}
?>
<!DOCTYPE html>
<!--
Template Name: Geodarn
Author: <a href="http://www.os-templates.com/">OS Templat... | true |
c7273bac9cefcee72f7983b8360d9a9b04e2de75 | PHP | CostiNec/MyWebsite | /WEBProject/signup.inc.php | UTF-8 | 1,549 | 2.578125 | 3 | [] | no_license | <?php
session_start();
require 'connect.php';
if(!empty( $_POST['firstname']) && !empty($_POST['secondname']) && !empty($_POST['username']) && !empty($_POST['password']) && isset($_POST['firstname']) && isset($_POST['secondname']) && isset($_POST['username']) && isset($_POST['password']))
{
$firstname = $_... | true |
0add447797a0b0912974cdfda29d40859693f050 | PHP | cedtanghe/elixir-db | /src/PDO.php | UTF-8 | 8,339 | 2.75 | 3 | [] | no_license | <?php
namespace Elixir\DB;
use Elixir\DB\Query\QueryBuilderInterface;
use Elixir\DB\Query\QueryBuilderTrait;
use Elixir\DB\Query\SQL\Expr;
use Elixir\DB\Query\SQL\SQLInterface;
use Elixir\DB\ResultSet\PDO as ResultSet;
use Elixir\Dispatcher\DispatcherInterface;
use Elixir\Dispatcher\DispatcherTrait;
/**
* @author C... | true |
9fffb7da43685737c9d21fde7d98961ec7ab1735 | PHP | pabloroman/admin | /src/SleepingOwl/Admin/Repositories/ModelRepository.php | UTF-8 | 2,861 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php namespace SleepingOwl\Admin\Repositories;
use Carbon\Carbon;
use SleepingOwl\Admin\Repositories\Interfaces\ModelRepositoryInterface;
use SleepingOwl\Admin\Models\ModelItem;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use SleepingOwl\Models\Interfaces\ModelWithOrderFieldInterface;
use Sle... | true |
30489f210dfa912aff088ebcc638c1b8bf889bb3 | PHP | snigers/education | /lesson/22/class/math_complex.php | UTF-8 | 872 | 3.421875 | 3 | [] | no_license | <?php
function test()
{
echo "ttttttt";
}
class MathComplex
{
public $re, $im;
function add($re, $im)
{
echo $this->re += $re;
echo $this->im += $im;
}
}
class MathComplex2
{
public $re, $im;
function add(MathComplex2 $y)
{
$this->re += $y->re;
$this->im += $y->im;
}
... | true |
fe2b96a841cbd9cb01b664ba4c02be59629f2ca3 | PHP | aryelgois/bank-interchange | /src/ShippingFile/Controller.php | UTF-8 | 3,502 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* This Software is part of aryelgois/bank-interchange and is provided "as is".
*
* @see LICENSE
*/
namespace aryelgois\BankInterchange\ShippingFile;
use aryelgois\Medools;
use aryelgois\BankInterchange;
use aryelgois\MedoolsRouter\Resource;
/**
* Controller class for shipping files
*
* A shipping fi... | true |
934eff7f60eec773a663190ee06a9609b0f14b6f | PHP | matthewmuirhead/Cars-site | /Cars/Controllers/Manufacturer.php | UTF-8 | 1,668 | 2.796875 | 3 | [] | no_license | <?php
namespace Cars\Controllers;
class Manufacturer {
private $manufacturersTable;
public function __construct($manufacturersTable) {
$this->manufacturersTable = $manufacturersTable;
}
function list() {
$manufacturerVariables = [];
$variables = [$manufacturerVariables];
$i=0;
$manufacturerList = $... | true |
d05cee8edf0fe131d63bea8fada4a7253dd88027 | PHP | YeFFreY/petitefourchette | /tests/Feature/ManageEquipmentsTest.php | UTF-8 | 2,410 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class ManageEquipmentsTest extends TestCase
{
use WithFaker, RefreshDatabase;
/** @test */
public function a_user_can_create_an_equipment()
{
$th... | true |
307275a66c6bdf5b7e8b5f184b9cc0f83f7af6ec | PHP | Jazzee/Jazzee | /src/views/elements/Standard-sir_applicants_single.php | UTF-8 | 1,696 | 2.75 | 3 | [] | no_license | <?php
/**
* Single applicant view page
*/
$page->getJazzeePage()->setApplicant($applicant);
?>
<div class='page' id='page<?php print $page->getPage()->getId() ?>'>
<h4><?php print $page->getTitle(); ?></h4>
<?php
if ($page->getJazzeePage()->getStatus() == \Jazzee\Interfaces\Page::SKIPPED) { ?>
<p>Applicant ... | true |
cb9185c3f2e3b3949b36c3bb03246794f832b8b2 | PHP | vquyen96/techwiz_fpt | /app/Services/ImageService.php | UTF-8 | 2,471 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Repositories\ImageRepository;
class ImageService implements ImageServiceInterface
{
protected $imageRepository;
public function __construct(ImageRepository $imageRepository)
{
$this->imageRepository = $imageRepository;
}
public function store($file)... | true |
469f56d45cc4e28b273be4510162423f00bab35a | PHP | ILambuRI/booker | /server/rest/lib/Handler.php | UTF-8 | 5,231 | 3.03125 | 3 | [] | no_license | <?php
namespace lib;
use lib\services\Convert;
class Handler
{
/** Response format */
private $contentType = DEFAULT_TYPE;
/** Response code */
private $code;
/**
* The response type is always 200 or in headers.
* ?response_type_head=true - switches between them.
* (Default always 200).
*/
private $t... | true |
1de106c0bb28362c631ff43f0a064be801bc81ce | PHP | handsomegyr/wechat | /lib/Weixin/Wx/Model/Shop/Spu/Sku.php | UTF-8 | 2,222 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Weixin\Wx\Model\Shop\Spu;
/**
* sku信息
*/
class Sku extends \Weixin\Model\Base
{
/**
* out_product_id string 是 商家自定义商品ID
*/
public $out_product_id = NULL;
/**
* out_sku_id string 是 商家自定义skuID
*/
public $out_sku_id = NULL;
/**
* thumb_img string 是 sku小图
... | true |
36ec13efd74382ca586bfe4c5ecb251e13749f93 | PHP | drandin/TreeClosureTable | /src/IClosureTable.php | UTF-8 | 1,965 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Igor Drandin <idrandin@gmail.com>
* @copyright 2015 Igor Drandin
*/
namespace TreeClosureTable;
/**
* Interface IClosureTable
*/
interface IClosureTable {
/**
* Check having element in tree
* @param $idEntry
* @return bool
*/
public function hasEntry($idEn... | true |
453b2ea984b2a4357e050d8d7ce84eaf41920b39 | PHP | AaronZhangL/git-web-client | /app/src/VersionControl/GitlabIssueBundle/Repository/IssueLabelRepository.php | UTF-8 | 3,210 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the GitlabIssueBundle package.
*
* (c) Paul Schweppe <paulschweppe@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace VersionControl\GitlabIssueBundle\Repository;
use VersionContr... | true |
2fe65a0facaf78d89f69b6774e955e19cc653e25 | PHP | MohamedSwilam/eyecenter | /eye_center phase2/php/model/html.php | UTF-8 | 1,811 | 2.8125 | 3 | [] | no_license | <?php
include_once 'database.php';
include_once 'crud.php';
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of html
*
* @author mohamedswilam
*/
class html exte... | true |
b84e9b723e1432e663518ab847b671ab33d82a90 | PHP | linkprofit-cpa/chance | /tests/Strategies/PercentStrategyTest.php | UTF-8 | 1,244 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace linkprofit\Chance\Strategies;
use linkprofit\Chance\ValueObjects\Percent;
use PHPUnit\Framework\TestCase;
require_once 'mt_rand.php';
/**
* @group strategies
*/
class PercentStrategyTest extends TestCase
{
const TRUE = 60;
const FALSE = 10;
public function test__construct()
{
... | true |
2fc288113edbd0f34a84f1a910d1af8b2b0c29c5 | PHP | james-harper/data-contracts | /src/Rules/Max.php | UTF-8 | 920 | 2.921875 | 3 | [] | no_license | <?php
namespace DataContracts\Rules;
use DataContracts\Schema\Property;
use DataContracts\Schema\Constants\Type;
/**
* Max validation rule
* @see https://laravel.com/docs/8.x/validation#rule-max
*/
class Max extends Size
{
/**
* Checks if the rule should be applied
*
* @return bool
*/
... | true |
fe97ebcb8531838055f07b51e8ed4ba9bf52d711 | PHP | Ben-yachou/CoursAlkas | /exercices/php/bdd/orderBy.php | UTF-8 | 2,523 | 2.96875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Recherche Apparts </title>
<meta charset="utf-8">
</head>
<body>
<form action="" method="post">
<select name="column" id="">
<option value="id">Identifiant</option>
<option value="city">Ville</option>
<option value="address">Ad... | true |
35cf3d71b8d1df79b43b1c12054b02492128c32a | PHP | Cathe313/PHP-exercises | /Forms/forms4.php | UTF-8 | 2,120 | 2.96875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Poetry</title>
</head>
<body>
<h1>Days of the week poetry!</h1>
<?php
if (!isset($_POST["button"])) {
?>
<form method="post" action="forms4.php">
<h2>Select a day of the week:</h2>
... | true |
e1374f50fd716123b3c4d6d79e83b98744d6f4a1 | PHP | hmsvitor/curso-php | /php-pdo/config.php | UTF-8 | 290 | 2.640625 | 3 | [] | no_license | <?php
$dbHost = "localhost";
$dbName = "firstDb";
$dbUser = "hms";
$dbPassword = "password";
$conn = mysqli_connect($dbHost, $dbUser, $dbPassword, $dbName);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully<br>";
| true |
0b197ea4041275926db50fb2758036b366a7cfe8 | PHP | lucidphp/lucid | /lucid/resource/src/Loader/ResolverInterface.php | UTF-8 | 884 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This File is part of the Lucid\Resource package
*
* (c) iwyg <mail@thomas-appel.com>
*
* For full copyright and license information, please refer to the LICENSE file
* that was distributed with this package.
*/
namespace Lucid\Resource\Loader;
/**
* @interface ResolverInterface
*
* @package Luci... | true |
8f4b7cb42fedd26c2f0751e1a27c3aeb73ed67bd | PHP | SaraMariaSc/COMP0022_Group2 | /src/useCase5.php | UTF-8 | 1,129 | 2.734375 | 3 | [] | no_license | <?php
include "connect.php";
$genres = ["Action", "Adventure", "Animation", "Children", "Comedy", "Crime", "Documentary", "Drama", "Fantasy", "FilmNoir", "Horror", "Musical", "Mystery", "Romance", "SciFi", "Thriller", "War", "Western"];
$ID = mysqli_real_escape_string($conn, $_GET['ID']);
$sql = "SELEC... | true |
09b89cddc3e02b7d1bb2a7af55b2b695a2424b50 | PHP | InspiredMemoriesInc/DamnOfficial | /version2/services/wp-content/plugins/formidable/classes/models/FrmPointers.php | UTF-8 | 12,668 | 2.5625 | 3 | [
"Apache-2.0",
"GPL-2.0-only",
"GPL-1.0-or-later",
"GPL-2.0-or-later"
] | permissive | <?php
/**
* This class handles the pointers used in the introduction tour.
*/
class FrmPointers {
/**
* @var object Instance of this class
*/
public static $instance;
/**
* @var array Holds the buttons to be put out
*/
private $button_array;
/**
* @var array Holds the admin pages we have pointers f... | true |
5549a571fc43d1e2d91e46e23c59a04c5453c577 | PHP | MichaelCostaOliveira/tudo-de-php | /aula/php meu/php meu/05_variavel_ambiente.php | UTF-8 | 1,087 | 3.28125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<?php
/* No PHP temos variaveis com escopo super global.($_COOKI... | true |
20f8f0b0ba98f0ced44c823eabec2103b20f143f | PHP | MattWilliamsDev/landstory | /our_projects/sidenav.php | UTF-8 | 1,743 | 2.921875 | 3 | [] | no_license | <?php
require_once( 'data/project-data.php' );
$categories = getCategories();
?>
<ul id="sidenav" class="projects">
<li class="home"><a href="/">Home</a></li>
<li class="title"><a href="/our_projects">Projects</a></li>
<?php foreach ( $categories as $categoryName => $category ): ?>
<li class="<?php echo $categ... | true |
b8b0a3ef8a3f8452550c3034f2ab52e79df8b170 | PHP | jacksunny2020/expressapi | /src/LogServiceContract.php | UTF-8 | 504 | 2.515625 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace Jacksunny\ExpressApi;
/**
*
* @author 施朝阳
* @date 2017-6-1 16:17:22
*/
interface LogServiceContr... | true |
33de2087fd6dbe9a94eb64e499f1ff6219cdb9bd | PHP | Hasantha96/eat-me | /api/v1/StewardUpdateServed.php | UTF-8 | 1,033 | 2.625 | 3 | [] | no_license | <?php
header("Content-Type:application/json");
header("Access-Control-Allow-Methods: GET");
require_once "./core/DBConnection.php";
$DBConnection = new DBConnection();
$con = $DBConnection->getConnection();
if ($_SERVER['REQUEST_METHOD'] == "GET") {
//get staff id
$order_id = $_GET['order_id'];
//updat... | true |
4357335f51d92ae63c903a4aaaa1fcfca699d2f5 | PHP | bodiandras/zf2-library | /Library/View/Table.php | UTF-8 | 435 | 2.53125 | 3 | [] | no_license | <?
namespace Library;
class View_Table extends ViewModel
{
public function __construct($title, $columns, $data)
{
$this->setTemplate('view-table');
$view = array(
'title' => $title,
'columns' => $columns,
... | true |
5c0b33b0f74caf02671cc621729cf0e0e0588e55 | PHP | hopeseekr-contribs/apex | /src/core/form/dashboard_profiles_items.php | UTF-8 | 1,296 | 2.71875 | 3 | [
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | <?php
declare(strict_types = 1);
namespace apex\core\form;
use apex\app;
use apex\libc\db;
use apex\libc\debug;
use apex\app\exceptions\ApexException;
/**
* Dashboard profile items form.
*/
class dashboard_profiles_items
{
// Properties
public $allow_post_values = 1;
/**
* Defines the form fields inclu... | true |
01d796c00e44f28ed67048286d818b6c55cab061 | PHP | adspirkova/final-test | /q27.php | UTF-8 | 482 | 2.5625 | 3 | [] | no_license | <?php
if($_POST)
{
$comment_data = $_POST['comment'];
// $comment_data should be an associative array with all the submitted information
var_dump($comment_data);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-sca... | true |
d14db09d87f40a0822ab8d03232660e433ac5b3a | PHP | abdul-local/PHP-Dasar-fundamental- | /functionArgument.php | UTF-8 | 722 | 3.71875 | 4 | [] | no_license | <?php
// function sayHello($name="anynomues",$lastname=""){
// echo " hello {$name} {$lastname}".PHP_EOL;
// }
// sayHello('abdul');
// sayHello('eko');
// sayHello('abdul','hamzan');
// function sum(int $first, int $last){
// $total=$first+$last;
// echo "Total: $first+$last=$total".PHP_EOL;
// }
//... | true |
a37d4678730a3e3b48534277eface715b179ea0d | PHP | eitss813/impt_module | /modules/OLDYndynamicform/Model/Form.php | UTF-8 | 9,044 | 2.53125 | 3 | [] | no_license | <?php
/**
* YouNet Company
*
* @category Application_Extensions
* @package Yndynamicform
* @author YouNet Company
*/
class Yndynamicform_Model_Form extends Core_Model_Item_Abstract
{
const MAX_SIZE = 512;
public function getCategory()
{
$category = Engine_Api::_()->getItem('yndynamic... | true |
c5914ad3634161d0224ef547a622f100f63051a3 | PHP | mariateresachaves/ltw_event_managment | /src/db/reset_password.php | UTF-8 | 577 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
include_once('connection.php');
$token = $_POST["token"];
// User clicked on submit button
if(isset($_POST["submit"])) {
$password = md5($_POST["password"]);
// Update the password
$stmt_1 = $db->prepare("UPDATE users SET password=? WHERE token=?");
$stmt... | true |
79d2ce4d1ae1505cd411598d159972618bb91d17 | PHP | OnrampLab/laravel-transcription | /src/ValueObjects/Transcription.php | UTF-8 | 925 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace OnrampLab\Transcription\ValueObjects;
use JsonSerializable;
use OnrampLab\Transcription\Enums\TranscriptionStatusEnum;
class Transcription implements JsonSerializable
{
/**
* The identity in third-party service.
*/
public string $id;
/**
* The status of specific transcript... | true |
bcc57e86b2a7c5a74b064c14a3ab4ad3d9043f8d | PHP | ExeQue/remix | /tests/Unit/Compare/Array/IsListTest.php | UTF-8 | 1,847 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Tests\Unit\Compare\Array;
use ArrayIterator;
use ExeQue\Remix\Compare\Array\IsList;
use ExeQue\Remix\Exceptions\InvalidArgumentException;
use stdClass;
it('checks if a value is a list', function (mixed $input, bool $expected) {
$comparator = IsList::make();
expect($... | true |
d20efee734f0dd386fa8e3e87912292066823861 | PHP | 3AMproductions/3amproductions.net | /www/xml/errorlogfeed.php | UTF-8 | 4,906 | 2.609375 | 3 | [] | no_license | <?php
require_once('../config.inc');
require_once('Zend/Feed.php');
require_once('class.clf_log.php');
$item = false;
$errors = array();
$tags = array();
$nottags = array("200");
if(isset($_SERVER['PATH_INFO'])){
$path = explode("/",$_SERVER['PATH_INFO']);
if(($tmp = array_search("tags",$path)) !== false){
... | true |
5231841249e4ae1fef4b4d7ed5b2c8279e3a04c1 | PHP | nezarfadle/php-json-schema-validator | /src/JsonSchemaValidator.php | UTF-8 | 2,879 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php namespace Json\Validation;
use Json\Validation\Exceptions\InvalidJsonPayloadException;
use Json\Validation\Exceptions\EmptyPayloadException;
use Json\Validation\Exceptions\NotExistsPropertyException;
use Json\Validation\Exceptions\EmptySchemaException;
use Json\Validation\Utils\ArrayUtil;
use Json\Validation\Uti... | true |
08fc949c099b408cebb89319e4299815eda605e9 | PHP | stennkool/vimrc | /sources_non_forked/phpcomplete.vim/tests/fixtures/GetClassName/self_return_type_array.php | UTF-8 | 579 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
class Baz3 {
/**
* return_self_array
*
* @return self[]
*/
public function return_self_array() {
}
/**
* return_static_array
*
* @return static[]
*/
public function return_static_array() {
}
/**
* return_this_array
*
* @return $this[]
*/
public function return_this_array() {
... | true |
beae3bc65ea4a8e8a3b1d59e362776432775f814 | PHP | vonsovsky/scripts | /astronomy_calculations_php/includes/ecliptic_obliquity.php | UTF-8 | 1,371 | 2.8125 | 3 | [] | no_license | <?php
/*
This PHP function computes the mean obliquity of the ecliptic
given a JD argument corresponding to any given date and time.
Author: Jay Tanner - 2010
The algorithm used here is based on work published by J. Laskar
Astronomy and Astrophysics, Vol 157, p68 (1986),
New Formulas for the Preces... | true |
213025f277df1e888dc581d1b53f718e99a61414 | PHP | pear/OpenDocument | /OpenDocument/Document.php | UTF-8 | 20,157 | 2.53125 | 3 | [] | no_license | <?php
/**
* PEAR OpenDocument package
*
* PHP version 5
*
* LICENSE: This library 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; either
* version 2.1 of the License, or (at your option) any later vers... | true |
18211dcf434a6e8b71bfbfe0c60e398bb4c63243 | PHP | sancoLgates/smvc | /framework/database/Mydb.class.php | UTF-8 | 2,507 | 2.890625 | 3 | [] | no_license | <?php
class Mydb {
protected $conn = false;
protected $sql;
public function __construct($config = array()) {
$host = isset($config['host']) ? $config['host'] : 'localhost';
$user = isset($config['user']) ? $config['user'] : 'root';
$password = isset($config['password']) ? $config['passwor... | true |
0288e2cd11e0935dda29b466db94d80db9003b7a | PHP | vendi-advertising/log-file-parser | /src/parser_command.php | UTF-8 | 1,783 | 2.765625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Vendi\LogParser;
use League\Csv\Writer;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Styl... | true |
6066f56bf6994bc28462140d6b1fa02dc712f9d4 | PHP | picqer/exact-php-client | /src/Picqer/Financials/Exact/QuotationLine.php | UTF-8 | 3,169 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Picqer\Financials\Exact;
/**
* Class QuotationLine.
*
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=CRMQuotationLines
*
* @property string $ID Primary key
* @property float $AmountDC Amount in the default currency of the company
* @property float $AmountFC Amount... | true |
b896cf2921a1755a2e34b9fd53bc429214c4d1b7 | PHP | FernandoLlallire/PracticaDH | /php/Clase 2/ejercicio10.php | UTF-8 | 383 | 2.8125 | 3 | [] | no_license | <?php
$nombre="antyom";
switch ($nombre) {
case "fernando":
echo "Hola $nombre";
break;
case "ruben":
echo "Hola $nombre";
break;
case "yayo":
echo "Hola $nombre";
break;
case "leo":
echo "Hola $nombre";
break;
case "soul":
echo "Hola $nombre";
break;
defaul... | true |
06d86570f4bb310fce7a23321f2daa623d6297dd | PHP | ProgressoRU/plasticode-warcry | /src/Generators/NewsGenerator.php | UTF-8 | 980 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Generators;
use Plasticode\Generators\TaggableEntityGenerator;
use Plasticode\Traits\Publishable;
class NewsGenerator extends TaggableEntityGenerator
{
use Publishable;
public function beforeSave(array $data, $id = null) : array
{
$data = parent::beforeSave($data, $id);
... | true |
045790cca45ef191f6d32ca3d0c858ec6e4007f9 | PHP | salamandrait/OneStepA | /modelos/Deposito.php | UTF-8 | 3,391 | 2.75 | 3 | [] | no_license | <?php
//Incluímos inicialmente la conexión a la base de datos
require "../config/Conexion.php";
Class Deposito
{
//Implementamos nuestro constructor
public function _construct()
{
}
//Implementamos un método para insertar registros
public function insertar($cod_deposito,$desc_deposito,$responsable,$direccion... | true |
a3dfcae436a5c852c7340359f1a89aa974e32026 | PHP | Cross-repo/Dance-School---CRUD | /authentication.php | UTF-8 | 2,268 | 2.96875 | 3 | [] | no_license | <?php
// $dbhost = "localhost";
// $dbuser = "root";
// $dbpass = "";
// $dbname = "dancedb";
// if(!$auth = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname))
// {
// die("Failed to connect!");
// }
$errorCount = 0;
... | true |
5e04c53359b2a6edf26539f3f07ec7a0d2da5a26 | PHP | varunsridharan/action-apigen | /apigen/vendor/andrewsville/php-token-reflection/TokenReflection/Invalid/ReflectionFunction.php | UTF-8 | 8,491 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHP Token Reflection
*
* Version 1.4.0
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this library in the file LICENSE.md.
*
* @author Ondřej Nešpor
* @author Jaroslav Hanslík
*/
namespace TokenReflection\Invalid;
use TokenReflection, TokenReflection\... | true |
e8b363959dac44b17abf06d5993c70571c273e7f | PHP | KeeperJerry/L-Shop-remade | /app/DataTransferObjects/Admin/Products/Add/Category.php | UTF-8 | 545 | 2.78125 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace app\DataTransferObjects\Admin\Products\Add;
use app\Entity\Category as Entity;
class Category implements \JsonSerializable
{
/**
* @var Entity
*/
private $category;
public function __construct(Entity $category)
{
$this->category = $categor... | true |
23d4fdf88ddd03bef1f1c77c76c6ef366202e09e | PHP | iqraakbar/lab-no-11 | /viewproduct.php | UTF-8 | 1,697 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title></title>
</head>
<body>
<div class="container">
<?php
session_start();
echo "<table class='table'>";
echo "<tr>";
echo "<td>Sno</td>";
echo "<td>Name</td>";
echo "<td>Price</td>";
echo "<td>Quantity</t... | true |
eed4a4949feff277f47cb4e753c90acbf40d8d76 | PHP | riaz4519/stem | /app/Http/Controllers/PeoplecategoryController.php | UTF-8 | 1,264 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Peoplecategory;
use Session;
class PeoplecategoryController extends Controller
{
public function index()
{
$data['peoplecategories'] = $peoplecategories = Peoplecategory::latest()->get();
return view('admin.peopl... | true |
6b32d4f6b0bd1a34f11ec82788232aee962bafb8 | PHP | longnt203/kfxt | /Front/Lib/Util/FRGInterface.class.php | UTF-8 | 2,795 | 2.5625 | 3 | [] | no_license | <?php
class FRGInterface {
/**
* Util_Httpdown
* @var Util_Httpdown
*/
private $_httpDown;
private $_encryptKey='kdfndsfasdrn@#$b'; //加密密钥
private $_userName='client'; //账号
private $_passWord='KeFu*Sw$_@kfe87s6'; //密码
private $_superLoginKey='uY*$&n-87N'; //超级密码
private $_sendUrl=nul... | true |
4375f861ba1d81f02041a3919c31297ca2f837c6 | PHP | bsilverio/Robot | /src/core/tests/Unit/StoreGetTest.php | UTF-8 | 1,497 | 2.5625 | 3 | [] | no_license | <?php
namespace Tests\Uni;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use App\Models\Store;
class StoreGetTest extends TestCase
{
protected $token;
public function setU... | true |
6d348ae4b97f5768dc235806c4a3017c0e988997 | PHP | jmdalessandro/CS-101-Exam-Site | /Back/getGradingData.php | UTF-8 | 2,776 | 2.625 | 3 | [] | no_license | <?php
//mysql credentials
$dbhost = "sql1.njit.edu";
$dbuser = "hy276";
$dbpass = "FbRHBUeZ";
$dbname = "hy276";
//login to
$conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
if (!$conn) {
die("Cannot connect to DB: " . mysqli_connect_error());
}
$getdata = file_get_contents('php... | true |
911db9f02a1931503a3f9022550815eb74a1cda3 | PHP | MalekHm/Projet-Web | /model/Commande.class.php | UTF-8 | 563 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
class Commande
{
private $date;
private $nom;
private $reference;
public function __construct()
{
$this->date="";
$this->nom="";
$this->reference="";
}
public function getdate()
{
return $this->date;
}
public function setdate($date)
{
$this->date=$date;
}
public function ge... | true |
1954ea9dbce1a7010de3f1bc770f228da0ec50f9 | PHP | Zhaoyu777/AH | /cz/tests/Unit/Task/ViewLogServiceTest.php | UTF-8 | 3,233 | 2.515625 | 3 | [] | no_license | <?php
namespace Tests\Unit\Task;
use Biz\BaseTestCase;
class ViewLogServiceTest extends BaseTestCase
{
public function testCreateViewLog()
{
$this->mockBiz(
'Task:ViewLogDao',
array(
array(
'functionName' => 'create',
're... | true |
c6ec3c0256cd58ab4625716067a70a44d959f6d9 | PHP | sautmanurung1/aslab-IR | /edit.php | UTF-8 | 2,529 | 2.578125 | 3 | [] | no_license | <?php
include 'Koneksi.php';
$id = (int) $_GET['id'];
$sql = "SELECT * FROM produk INNER JOIN buku ON produk.id_produk=buku.id_produk WHERE produk.id_produk='$id'";
$query = mysqli_query($Koneksi, $sql);
$data = mysqli_fetch_array($query);
?>
<!DOCTYPE html>
<html lang="en">
<hea... | true |
05cdda7acbfe85a88db9062c6de3cddafc229b0d | PHP | golincode/monologgly | /src/Processors/RequestInformation.php | UTF-8 | 1,324 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Golin\MonoLoggly\Processors;
class RequestInformation
{
/**
* The environment
*
* @var string
*/
protected $environment;
/**
* The method
*
* @var string
*/
protected $method;
/**
* The url
*
* @var string
*/
protected... | true |
21485e0637b3c6aa1d97244a1e7cfdbf93539581 | PHP | fi1a/crawler | /tests/Proxy/ProxyTest.php | UTF-8 | 6,654 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Fi1a\Unit\Crawler\Proxy;
use DateTime;
use Fi1a\Crawler\Proxy\Proxy;
use Fi1a\Crawler\Proxy\ProxyInterface;
use Fi1a\Unit\Crawler\TestCases\TestCase;
use InvalidArgumentException;
/**
* Прокси
*/
class ProxyTest extends TestCase
{
/**
* Провайдер данных полей прок... | true |
277baf7e678cd43d60b3c6b841ef513d46649d7b | PHP | TazShetu/sferp | /database/seeds/UsersTableSeeder.php | UTF-8 | 726 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\User;
class UsersTableSeeder extends Seeder
{
public function run()
{
$users = [
0 => ['Dummy', 'd@g.com', '123456'],
1 => ['Shagar', 'sagar@gmail.com', '123456789A'],
2 => ['xxx', 'a1@g.com', '123456789A'],
... | true |
52d34de9c8652b0d652caee254ef62c3aa5df48d | PHP | SidonieODOTJUNG/todolistEval | /classes/Tache.php | UTF-8 | 2,088 | 2.953125 | 3 | [] | no_license | <?php
class Tache {
private $user_id;
private $id_tache;
private $description;
private $date_limite;
function __construct($user_id, $id_tache, $description, $date_limite) {
$this->user_id = $user_id;
$this->id_tache = $id_tache;
$this->description = $description;
... | true |
c79a4a629e347ce904a9b8f51627ad657d4a2c63 | PHP | MagedEWilliam/Alpha | /page.php | UTF-8 | 3,849 | 2.59375 | 3 | [] | no_license | <?php
require_once('classes/class_database.php');
function get_current_route(){
$query = $_SERVER['PHP_SELF'];
$path = pathinfo( $query );
$what_you_want = $path['basename'];
return $what_you_want;
}
function _getContentOf(){
$page = get_current_route();
$db = Database::getInstance();
$mysqli = ... | true |
b2c504ed72d9dfc720296e8f1c793d77313254ca | PHP | a1ex7/asciit | /app/Http/Middleware/DetectLocale.php | UTF-8 | 655 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\App;
class DetectLocale
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public ... | true |
6d081eedfe72b8152339cb17fde35f3adc3071bd | PHP | p290829114/php | /mycaigou/protected/business/base/models/BspShowForestModel.php | UTF-8 | 3,548 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: wangk
* Date: 2015/8/27
* Time: 9:20
*/
namespace business\base\models;
/**
* Class BspShowForestModel 基础分类--对外展示分类表
* @package business\base\models
* @property string categoryId 数据库主键
* @property string categoryShortname 分类简称
* @property string categoryName 分类全称... | true |
fc2ed7b3409b6dd4bb3eba507bf6dc035489fab5 | PHP | jovandosen/librafire.project | /app/User.php | UTF-8 | 3,704 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace LibraFireProject;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use LibraFireProject\Connection;
class User extends Connection
{
public function register($firstName, $lastName, $email, $password)
... | true |
12165897f2a1cc9be8cf70ed6039b8b7c21bf9b7 | PHP | Loki3000/HTML_QuickForm2 | /tests/QuickForm2/Rule/LengthTest.php | UTF-8 | 7,133 | 2.703125 | 3 | [] | no_license | <?php
/**
* Unit tests for HTML_QuickForm2 package
*
* PHP version 5
*
* LICENSE
*
* This source file is subject to BSD 3-Clause License that is bundled
* with this package in the file LICENSE and available at the URL
* https://raw.githubusercontent.com/pear/HTML_QuickForm2/trunk/docs/LICENSE
*
* @category ... | true |
1e4b4bf471e09185d06cac761cfe8ba72696521f | PHP | AdamHebby/Arctic-Gems | /Classes/Inventory.php | UTF-8 | 2,630 | 3.125 | 3 | [] | no_license | <?php
namespace Inventory;
class Inventory implements \Iterator, \Countable
{
protected $items = array();
protected $position = 0;
protected $ids = array();
public function __construct()
{
$this->items = array();
$this->ids = array();
}
public function isEmpty()
... | true |
9ba7e9037417d75b3e78cf89b1d465626334ed53 | PHP | meyer-archives/another-portfolio-cms | /admin/includes/class.registry.php | UTF-8 | 1,367 | 3.578125 | 4 | [] | no_license | <?php
abstract class Registry{
abstract protected function get($key);
abstract protected function set($key,$val);
}
Class My_Registry extends Registry {
// Registry array of objects
private static $objects = array();
// The instance of the registry
private static $instance;
// Back off
private function ... | true |
0a99a30ea5dddb116099e111caa2d5c2b4163152 | PHP | abhayzonvoir/cortex | /app/cortex/foundation/database/migrations/05_create_activity_log_table.php.stub | UTF-8 | 1,519 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateActivityLogTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create(config('cortex.foundation.tables.activity_log'), fun... | true |
a534f0d351b40f15aadc3acffa24f19ab4b2f366 | PHP | anasbinmukim/SitTestingShot | /application/helpers/common_helper.php | UTF-8 | 15,022 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created By: Tim Hudson - 3/1/2017
* Last Modified: t.hudson 3/1/17
* @package CedarWaters
* @author CedarWaters
* @link http://cedarwaters.com
* @since Version 1.0.0
* @filesource
*/
defined('BASEPATH') OR exit('No direct script access allowed');
define('TAB1', "\t");
define('TAB2', "\t\t")... | true |
8d43e8d2a83a97c03fed2aa4bc799cb33207e346 | PHP | kolaente/statamic-snippet-addon | /src/Modifiers/TextSnippet.php | UTF-8 | 1,992 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
namespace Kolaente\Snippet\Modifiers;
use Statamic\Fields\Value;
use Statamic\Modifiers\Modifier;
class TextSnippet extends Modifier
{
protected static $handle = 'snippet';
/**
* Creates a text snippet of a given string. A snippet is an "intelligent substring": It will try to end the
* snipp... | true |
5623b4e06c5f3261f79c2478ea5c602e037eb99d | PHP | loftyD/caskmaster2 | /framework/RoutingManager.php | UTF-8 | 705 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* RoutingManager.php
* Put all your routes here
*/
include "autoload.php";
include "misc/config/config.php";
// store our Flight instance into a superglobal. This can then be used in other classes
$_SERVER['app'] = $app;
/*
* Put your Flight Routes below here
* Please check the FlightPHP documentation... | true |
14fa30846e569afab3ed51e2cafa21d9328dead8 | PHP | davidpanyella/repository | /src/Exceptions/RepositoryException.php | UTF-8 | 301 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Rinvex\Repository\Exceptions;
use Exception;
class RepositoryException extends Exception
{
public static function listNotFound($list, $object)
{
return new static('Given list "'.$list.'" not found in '.get_class($object).' class');
}
}
| true |
919b3e4831b44223fc4315c403b840fe058bab4a | PHP | hquinteros/SimpleDatabaseApp | /www/public/create.php | UTF-8 | 3,280 | 3.609375 | 4 | [] | no_license | <?php
/*In PHP when a form is submitted all inputs are placed into a $_POST array, ex: <input type="text" name="firstname"> becomes $_POST['firstname] */
if (isset($_POST['submit'])) /*This code will run only if the form has been submitted*/
{
require "../config.php"; /*variables pulled from config... | true |
b667d26696c46aa6d2374efc8e982d83dad7339f | PHP | sayali1505/Tourism | /Project/Dashboard1/newstates.php | UTF-8 | 702 | 2.59375 | 3 | [
"LicenseRef-scancode-other-permissive"
] | permissive | <?php
$state_id=$_POST['state_id'];
$state_name=$_POST['state_name'];
if(isset($_POST['btn_submit1']))
{
$dbHost='localhost';
$dbUser='root';
$dbPassword='';
$dbName='db_tourism';
$conn=mysqli_connect($dbHost, $dbUser, $dbPassword, $dbName);
if (!$conn)
{
die("connection failed: ".mysqli_connect_error());
}
... | true |
1e5910d4a3d7e6ae98f70e259fe29c662f7e4876 | PHP | shaponpal6/WordPress-REST-API-with-Corn-Job | /widgets/view_apartments_small_render.php | UTF-8 | 3,731 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | <?php
class PDXSyncViewApartmentsSmallRender {
/**
* Shortcode callbac.
*
* [pdx_apartments types='assignment,rent']
*/
static public function shortcode($atts){
$types = isset($attr['types']) && $attr['types'] ? explode(',', $attr['types']) : [];
return self::render($types... | true |