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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
bfdf4dc75eccdeae54c95076356e1edc84a93c2b | PHP | s525998/MAFS | /views/Member/replyPost.php | UTF-8 | 7,205 | 2.90625 | 3 | [] | no_license | <?php
// needed for connection of database which is contain in sql.php
include_once('../admin/sql.php');
session_start();
/* To check if user logged in and visit this page */
if (isset($_SESSION['isMember'])){
// including member header from Templates Folder
include("../Templates/heade... | true |
854f080407ba1afceb697d7bc43fe7fba0434a3d | PHP | Mohit-Singh/AssignSeat | /Model/MessageTable.php | UTF-8 | 1,340 | 3.125 | 3 | [] | no_license | <?php
/**
* **************************** Creation Log *******************************
* File Name - MessageTable.php
* Project Name - AssignSeat
* Description - Class for creating table
* @Version - 1.0
* ***************************** Update L... | true |
20711ffcbfbb8c21c9ec878093f2e908605e7326 | PHP | saiful178/Lab-5 | /upload.php | UTF-8 | 1,398 | 2.96875 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html>
<body>
<form action="upload.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload Image" name="submit">
</form>
</body>
</ht... | true |
0b6bd145e2a64c8afe0af865e1c8c6577e521a3c | PHP | skipperbent/simple-router-demo | /app/Handlers/CustomExceptionHandler.php | UTF-8 | 1,305 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Demo\Handlers;
use Pecee\Http\Request;
use Pecee\SimpleRouter\Exceptions\NotFoundHttpException;
use Pecee\SimpleRouter\Handlers\IExceptionHandler;
class CustomExceptionHandler implements IExceptionHandler
{
/**
* @param Request $request
* @param \Exception $error
* @throws \Excepti... | true |
8c9c8af637b052ba427b212208f7768e29eaef0b | PHP | devuri/wp-env-config | /src/App/Console/CreateHtpasswd.php | UTF-8 | 2,673 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Urisoft\App\Console;
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\Style\SymfonyStyle;
use Symfony\Component\Filesys... | true |
6b440d856c5d8c28b2b7e5cf7bec7ab15c715a6e | PHP | IgorBaskakov/php2.local | /protected/App/Controllers/Errors.php | UTF-8 | 2,011 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Controllers;
use App\Components\Logger;
use \App\Exceptions\DbException;
use \App\Exceptions\E404Exception;
/**
* Class Errors
* @package App\Controllers
*/
class Errors extends Controller
{
/** @var Logger Should contain a logger */
protected $logger;
public function __construct(... | true |
c80acd6c1116339848a88a02804861d9e2fdf6bf | PHP | ShyZhen/fmock | /app/Listeners/SendSmsListener.php | UTF-8 | 3,156 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Listeners;
use App\Events\SendSms;
use App\Services\BaseService\SmsService;
use App\Services\BaseService\EmailService;
use App\Services\BaseService\RedisService;
use Illuminate\Contracts\Queue\ShouldQueue;
class SendSmsListener implements ShouldQueue
{
/**
* 任务应该发送到的队列的连接的名称
*
... | true |
3f53b5d35dc4dbe911d9aee7324ed9b2f91c3221 | PHP | SiyahKare/SiyahKare | /skcrm/application/app/Http/Middleware/Knowledgebase/Show.php | UTF-8 | 1,739 | 2.640625 | 3 | [] | permissive | <?php
/** --------------------------------------------------------------------------------
* This middleware class handles [show] precheck processes for knowledgebase
*
* @package Grow CRM
* @author NextLoop
*----------------------------------------------------------------------------------*/
namespace Ap... | true |
49b810458f30d53a789f75aa0ce3cba552074674 | PHP | arbor1979/sunshineCrm | /general/ERP/Framework/PHPExcelParser4/WriteExcel/WriteExcel.php | UTF-8 | 1,949 | 2.75 | 3 | [] | no_license | <?php
# Example of using the WriteExcel module to create worksheet panes.
#
# reverse('?), May 2001, John McNamara, jmcnamara@cpan.org
# PHP port by Johann Hanne, 2005-11-01
@set_time_limit(100);
//ini_set();
require_once "class.writeexcel_workbook.inc.php";
require_once "class.writeexcel_worksheet.inc.... | true |
003d7f332adcb9363b273e31d54e58f52ab6ae61 | PHP | benoit-development/BadPlayerChecker | /ws/addPlayer.php | UTF-8 | 487 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/*
* Search and add a player to session if found
*/
require_once __DIR__ . '/../utils/utils.php';
clog('Add Player');
if (isset($_REQUEST['search']) && isset($_REQUEST['week'])) {
if (addPlayer($_REQUEST['search'], $_REQUEST['week'])) {
clog('Player found');
echo 'ok';
... | true |
14bc972e8d0ca4f3bb99f824542dcd1c920f52a8 | PHP | bushraakhtar01/Apis-code-php | /api/post/read.php | UTF-8 | 1,114 | 2.53125 | 3 | [] | no_license | <?php
header('Access-Control-Allow_Origin: *');
header('Content-type: application/json');
header('Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS');
header("Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With");
// // Makes IE to support cookies
header("Content-Type: application/json;... | true |
e64df13baa061b1d1ccbf25b9d7de42b56d5b9fd | PHP | Asfaq19/OOP_PHP-7 | /1.Class_Object-Data-Type/Example_2.php | UTF-8 | 1,144 | 3.140625 | 3 | [] | no_license | <?php
class Employee{
// public $employee_name = "Niton";
// public $employee_dob = "01/01/1952";
// public $employee_gender = "Male";
// public $employee_designation = "CTA";
}
// $employees = [];
$employee = new Employee();
// print_r($employees);
// $employee->employee_name = "Niton";
// $em... | true |
2049483eaaf56b1e3d0dd49782c0beb7bbb904ce | PHP | jyyblue1987/FreeBooking | /app/User.php | UTF-8 | 3,320 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authoriz... | true |
5f988f257cf774cc63acdbd743801b51441251c1 | PHP | dream-chaser-51/TASK-WEB | /3001/insert.php | UTF-8 | 1,253 | 2.625 | 3 | [] | no_license | <?php
$con=mysqli_connect("localhost","root","","task3001");
$name=isset($_POST['uname'])?$_POST['uname']:null;
$age=isset($_POST['uage'])?$_POST['uage']:null;
$mail=isset($_POST['uemail'])?$_POST['uemail']:null;
$mobile=isset($_POST['uphone'])?$_POST['uphone']:null;
$address=isset($_POST['uaddress'])?$_POST[... | true |
b9033d46ffc7ebe4f53ed2a51fa46019fc1d340a | PHP | jaytaph/WhoToUnfollow | /public/index.php | UTF-8 | 1,304 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
require_once("../vendor/autoload.php");
// Get your keys and secrets at dev.twitter.com. Otherwise make a nice oauth thingie to do it from the web...
define('CONSUMER_KEY', 'YOUR-CONSUMER-KEY');
define('CONSUMER_SECRET', 'YOUR-CONSUMER-SECRET');
$twitter = new Twitter(CONSUMER_KEY, CONSUMER_SECRET, 'YOUR-ACCESS... | true |
d216d6376fcd00e37191cd97e99bbd0739701429 | PHP | TheCodRatchet/HumanRegister | /index.php | UTF-8 | 2,177 | 2.78125 | 3 | [] | no_license | <?php
require_once "vendor/autoload.php";
use App\RegisterEntry;
use App\RegisterTable;
if (isset($_POST['submit'])) {
new RegisterEntry($_POST['name'], $_POST['surname'], $_POST['id'], $_POST['info']);
header("Refresh:0");
}
$table = new RegisterTable("app/register.csv");
$records = $table->getRecords();
... | true |
a8b586cf76261619c63423403032d32a0cbe81ce | PHP | SmartEduTech/securelayer | /src/watchdog/ClientScan.php | UTF-8 | 1,689 | 2.5625 | 3 | [] | no_license | <?php
namespace Smartedutech\Securelayer\Watchdog;
use Smartedutech\Securelayer\Log\DBAgentLog;
use GeoIp2\Database\Reader;
abstract class ClientScan
{
public static function getClient()
{
return json_encode([
"REMOTE_ADDR" => isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '', ... | true |
72bb30cc02616538c9f8d96d7050f31daebaa01d | PHP | mhughes27/RPS | /copies.php | UTF-8 | 446 | 2.640625 | 3 | [] | no_license | <?php include("functions.php"); ?>
<!DOCTYPE html>
<html>
<head>
<title>Rock, Paper, Scoissors</title>
<link rel="stylesheet" type="text/class" href="teststyle3.css">
</head>
<body>
<h1>Rock, Paper, Scissors</h1>
<h3>You chose <?php echo $_GET["choice"]; ?>!</h3>
<h3>The Computer chose <?php echo weapon(); ?>... | true |
485f54ffce0d485ec6fe8294e04d6e4034bed74b | PHP | Sabols2k/webapp | /mvc/core/DB.php | UTF-8 | 1,493 | 3.078125 | 3 | [] | no_license | <?php
class DB{
public $con;
protected $servername = "localhost";
protected $username = "root";
protected $password = "";
protected $dbname = "quite_luxury";
protected $result = NULL;
// protected $username = "id15889535_quite_luxury_dbs";
// protected $password = "Chau@Chau0402";
... | true |
afe81b7abf3f90a3cb3e8aad6f9c173aa148bed7 | PHP | nimdaykw/myfirst | /Frame/Core/Page.class.php | UTF-8 | 10,023 | 2.984375 | 3 | [] | no_license | <?php
final class Page
{
public static $style=0;//0,1,2分页模块的样式为以后扩展分页模板样式定义的
//该参数为以后扩展分页模板定义
private static $pagemodel=0;
//分页模式0上一页 首页 1,2,3,4,5,6,7 尾页 下一页
private static $pagemodel_offset=6;//分页模式只有model为0的时候,这个偏移量才能被使用
private static $page='page';//get传值需要获取的参数名
private static $selectClass='current';//分页... | true |
1133fe40717bd6d646a8ef5b0c0041240e8a27cf | PHP | dcl-sicca/portfolio | /Aformac-dev/Combat des héros - POO/class/formulaire.php | UTF-8 | 1,686 | 3.015625 | 3 | [] | no_license | <?php
/* class formulaire {
echo '<form method="get" action="traitement.php">'
echo '<input type="text" id="nomPerso1" placeholder="Nom Perso1">'
echo '<input type="text" id="forceBrut" placeholder="Force Brut">'
echo '<input type="text" id="forceMagique" placeholder="Force Magique">'
echo '<input ... | true |
20b2f9e20d2e520a3ff99b8c638c8430b24ff3e2 | PHP | renan03barbosa/curso-php | /arrays/multiplicaVetor.php | UTF-8 | 506 | 3.640625 | 4 | [] | no_license | <?php
$vetor = array(2, 3, 4, 5);
$multiplicado = array();
echo "\n----------------------------------\n";
$contador = count($vetor);
$produto = 1;
for($i = 0; $i < $contador; $i++){
for($a = 0; $a < $contador; $a++){
if($i != $a){
$produto = ($vetor[$a]*$produto);
}
}
$multiplicado[$i] = $pro... | true |
7ed5a67e494880e0d825f08a51fb4247488b84ca | PHP | worldia/textmaster-api | /lib/Textmaster/Api/Author.php | UTF-8 | 1,395 | 2.609375 | 3 | [] | no_license | <?php
/*
* This file is part of the Textmaster Api v1 client package.
*
* (c) Christian Daguerre <christian@daguer.re>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Textmaster\Api;
use Textmaster\Api\Author\Mine;
use Textmaster\Exc... | true |
08480e5e8c0e0826b9ffc571fb5511be6868dbb9 | PHP | wwtg99/Flight2wwu | /src/Flight2wwu/Component/Utils/FormatUtils.php | UTF-8 | 6,075 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: wuwentao
* Date: 2015/9/21
* Time: 13:26
*/
namespace Wwtg99\Flight2wwu\Component\Utils;
use Wwtg99\StructureFile\Utils\FileHelper;
class FormatUtils
{
/**
* Create random string.
*
* @param int $length
* @param string $strPool
* @return str... | true |
750e384df3449b091f023853f2aef8e6cf41228d | PHP | yogafolio/php-exercises | /test.php | UTF-8 | 338 | 3.4375 | 3 | [
"MIT"
] | permissive | <?php
//konstanta __trait__ akan berisi nama trait dan namespace
//membuat name space
namespace Enemy;
//membuat trait
trait Makhluk {
function printTrait(){
echo "Nama Trait adalah: " . __TRAIT__;
}
}
class ManusiaSerigala {
use Makhluk;
}
//membuat objek
$aku = new ManusiaSerigala();
$aku-... | true |
a49b152bc374504a964bfac7db86d7caef850fc1 | PHP | angerlover/learnphp | /regex/backRef.php | UTF-8 | 352 | 3.265625 | 3 | [] | no_license | <?php
// 后向引用
// 寻找首字母和尾字母相同的单词
// 简化 首尾都是a的单词
$str = 'abfaa dfald preint fa';
$pattern = '/\ba\w+a\b/';
// 后向引用
$pattern2 = '/\b([a-zA-Z])\w+\1\b/';
preg_match_all($pattern2, $str, $match); // 会把子表达式的值作为数组的第二元素也返回,'a' 'd'
var_dump($match);
| true |
22a9079532e7031362e026ab300a9626a59c225a | PHP | thomasehayes/laravel | /app/Http/Controllers/StudentsController.php | UTF-8 | 1,871 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Models\Student;
use Session;
use Log;
class StudentsController extends Controller
{
public function index()
{
// 1. Model queries the db
// 2. Pass the resu... | true |
98b4cb682a7b56e337509ab55151cd9aa9d3beaa | PHP | sheenazien8/auth | /classes/Session.php | UTF-8 | 337 | 2.75 | 3 | [] | no_license | <?php
/**
*
*/
class Session
{
public static function exist($nama)
{
return isset($_SESSION[$nama]) ? true : false;
}
public static function set($nama, $nilai)
{
return $_SESSION[$nama] = $nilai;
}
public static function get($nama)
{
return $_SESSION[$nama];... | true |
7da96d7cbb55169b807d8992727e2a402511de3d | PHP | adawley/glowing-octo-robot | /php/backtest/DataAccessObjects.php | UTF-8 | 21,219 | 3.03125 | 3 | [] | no_license | <?php
/**
* DataAccessObjects
*
* PHP version 5
*
* @category PHP
* @package
* @author Rob Dawley <>
* @license http://opensource.org/licenses/MIT MIT
* @link http://
*/
/**
* CSVParserBase
*
* PHP version 5
*
* @category PHP
* @package
* @author Michael Crosby <michael@crosbymichael.c... | true |
4a9cba9ec089fe1679d2d32593c7d99a20f69f9f | PHP | korsvanloon/pathtype | /src/PathType/AbsDir.php | UTF-8 | 910 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the php-partial-constructor package.
* (c) Ruben Alexander de Gooijer <rubendegooijer@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PathType;
use \InvalidArgumentException;
us... | true |
896cbebc64a9f655d5c6293e83927a11eeae98e5 | PHP | cubo-cms/cms | /plugin/template.plugin.php | UTF-8 | 530 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Cubo;
defined('__CUBO__') || new \Exception("No use starting a class without an include");
class TemplatePlugin extends Addon {
// Encapsulates the output in the template
public static function render($html) {
$_Template = Template::get(Configuration::getParameter('template',Configuration::getDefa... | true |
116e74f00043e126667b3665ac8b768306008518 | PHP | wells5609/wp-app | /src/Cache/Driver/Apcu.php | UTF-8 | 758 | 2.59375 | 3 | [] | no_license | <?php
namespace WordPress\Cache\Driver;
use WordPress\Cache\Cache;
class Apcu extends AbstractDriver
{
public function exists($id) {
return apcu_exists($this->prefix.$id);
}
public function get($id) {
return apcu_fetch($this->prefix.$id);
}
public function set($id, $value, $ttl = Cache::DEFAULT_TTL) {
... | true |
bf17fb50fda59ff2d1f74195dd77760d061ce0bb | PHP | tim-van-dijck/dnd | /app/Http/Controllers/InviteController.php | UTF-8 | 808 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\User;
use App\Repositories\UserRepository;
use Illuminate\Http\Request;
class InviteController extends Controller
{
public function invitation(string $token)
{
$user = User::where('invite_code', $token)->firstOrFail();
return view('auth.reg... | true |
5821532425c7ce72364247029f424ce4fc7804d8 | PHP | urlaube/phpexec | /plugin.php | UTF-8 | 4,047 | 3.03125 | 3 | [] | no_license | <?php
/**
This is the PhpExec plugin.
This file contains the PhpExec plugin. It provides a PHP execution feature
and two shortcuts to trigger the execution. One shortcut directly writes the
PHP output into the content while the other shortcut escapes the output
before it writes the PHP output in... | true |
c2789f818e369c731843f0835105d560308fd0cd | PHP | acerus/WordPressify | /www/wp-content/plugins/template-events-calendar/titan-framework/lib/class-option-note.php | UTF-8 | 1,782 | 2.515625 | 3 | [
"GPL-2.0-or-later",
"GPL-1.0-or-later",
"GPL-2.0-only",
"MIT"
] | permissive | <?php
if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly
}
class TitanFrameworkOptionNote extends TitanFrameworkOption {
public $defaultSecondarySettings = array(
'color' => 'green', // The color of the note's border
'notification' => false,
'paragraph' => true,
);
/*
* Displa... | true |
e14c313d5c5855ff3d12c8d6b667258cc5fa6817 | PHP | r4k0nb4k0n/internet-programming-homework | /2_Assoc_Array/src/my_ksort.php | UTF-8 | 814 | 2.703125 | 3 | [
"MIT"
] | permissive | <meta charset="utf-8"/>
<?PHP
function my_ksort($arr){
$return=$keys=array();
foreach($arr as $arr_key => $arr_value){
$keys[]=$arr_key;
}
sort($keys);
for($i=0;$i<sizeof($keys);$i++){
$return[$keys[$i]]=$arr[$keys[$i]];
}
print_r($return);
}
$assoc = array(
"Student0" => "김갑",
"... | true |
455bb15044546ea83d2b1a34b930de1dbf8d503e | PHP | ngualterosp/proyecto_software | /Modelos/prensa/RuedaPrensa.php | UTF-8 | 1,205 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
class RuedaPrensa{
private $cod_rueda_prensa;
private $cod_ciudad;
private $fecha_rueda;
private $lugar_rueda;
private $descripcion_rueda;
function __construct(){}
public function getCodigoRuedaPrensa()
{
return $this->cod_rueda_prensa;
}
public function se... | true |
33339458f8440b0c8f0b7d3c789b2d9cd894e487 | PHP | lutrin/gestion | /procedure/ui/frame.php | UTF-8 | 2,263 | 2.78125 | 3 | [] | no_license | <?php
class ui_Frame {
protected static $defaultFields = array(
"lang" => "",
"charset" => "",
"title" => "",
"description" => "",
"author" => "",
"meta" => "",
"stylesheet" => "",
"head_script" => "",
"class" => "",
"body" => "",
... | true |
4c9f3c5cc6645751ea917039f75338fb7076931a | PHP | matthillman/Equation-Solver | /test.php | UTF-8 | 3,116 | 2.71875 | 3 | [] | permissive | <!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Equation Solver | Solve Your Everyday Maths Equation Problem</title>
<style>
body{
height: 100%;
background-color: #ADD8E6;
}
#equa{
font-size: 1.5em;
}
#equa:hover, #eq:active
{
fon... | true |
e57882b73df3f14776be154eb11b4139fe09a2ec | PHP | AyushVardhan/Project-Process-Automation | /others/test.php | UTF-8 | 652 | 2.671875 | 3 | [] | no_license | <?php
require("../DBA_related/dbfunc.php");
$conn = connect();
select_db();
/*$res = fetchnw3(col1, col2, col3, test);
while($row1 = mysql_fetch_array($res))
{
print_r($row1);
}*/
class student{
var $user;
var $pwd;
... | true |
88a711ee26f46bef723e482fed19e82ce0f99a64 | PHP | nikolaposa/disqus-helper | /src/Widget/BaseWidget.php | UTF-8 | 737 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Disqus Helper package.
*
* Copyright (c) Nikola Posa <posa.nikola@gmail.com>
*
* For full copyright and license information, please refer to the LICENSE file,
* located at the package root folder.
*/
declare(strict_types=1);
namespace DisqusHelper\Widget;
/**
* @author Ni... | true |
c112f8507a7c2e6f356086e71cb7f1be4c7d4565 | PHP | Shardj/zf1-future | /tests/Zend/Ldap/OriginalCanonTest.php | UTF-8 | 4,544 | 2.515625 | 3 | [
"JSON",
"LicenseRef-scancode-generic-cla"
] | permissive | <?php
use Yoast\PHPUnitPolyfills\TestCases\TestCase;
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
... | true |
c03a521d229ee15ec650bc8606d2c3860ea582d6 | PHP | BocanegraAlejo/MoviePass | /Models/Sala.php | UTF-8 | 2,120 | 2.8125 | 3 | [] | no_license | <?php
namespace Models;
use JsonSerializable;
class Sala implements JsonSerializable{
private $id_sala;
private $id_cine;
private $cant_filas;
private $cant_columnas;
private $nombre_sala;
function __construct($id_sala = '',$id_cine = '',$nombre_sala = '', $... | true |
b936590bcbf2b45b76df7f3699019f494b0607c6 | PHP | jumpsuitman/rekrytask | /1/ProductContract.php | UTF-8 | 647 | 3.515625 | 4 | [] | no_license | <?php
/**
* Contract for products.
*
* @author Filip Holmberg <filip@mobiilimarkkinointirouta.fi>
*/
interface ProductContract
{
/**
* Get product price.
*
* @return integer Price as micron integer
*/
public function getPrice();
/**
* Get product price formatted as string.
... | true |
c738a012cd08c666fb92ba7697b505efd0efa729 | PHP | mumingv/php | /func/strings/str_repeat.php | UTF-8 | 797 | 3.484375 | 3 | [] | no_license | <?php
/* =============================================================================
# FileName: str_repeat.php
# Desc: 重复一个字符串
# Author: Jie Yin
# Email: mumingv@163.com
# HomePage: https://github.com/mumingv
# Version: 0.0.1
# LastChange: 2017-01-22 10:35:42
# History:
=====... | true |
aec70f413dc399b18c61d5ff064efe9c748cf6e1 | PHP | thomasruiz/laravel-composer | /src/Recipes/Packages/DatabaseRecipes/DatabaseConfiguratorRecipe.php | UTF-8 | 3,338 | 2.875 | 3 | [] | no_license | <?php namespace LaravelComposer\Recipes\Packages\DatabaseRecipes;
use LaravelComposer\Composer;
use LaravelComposer\Recipes\AbstractRecipe;
class DatabaseConfiguratorRecipe extends AbstractRecipe
{
/**
* Run the recipe.
*
* @return string|bool
*/
public function run()
{
$drive... | true |
c756ddd75936bc1628e529073029d67b024dedd4 | PHP | Danack/example | /vendor/danack/params/lib/Params/ParamsValidator.php | UTF-8 | 1,756 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Params;
use Params\Exception\ValidationException;
use Params\Exception\ParamsException;
use Params\ValidationErrors;
/**
* Class ParamsValidator
*
* Validates an input parameter according to a set of rules.
* If there are any errors, they will be stored in this object,... | true |
3debf2c9558d8c59ef730f41ce52d4873d63d3b9 | PHP | lnidaa/myproj1 | /models/MakeOrderForm.php | UTF-8 | 669 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Dashok
* Date: 19.02.2018
* Time: 15:17
*/
namespace app\models;
use Yii;
use yii\base\Model;
class MakeOrderForm extends Model
{
public $name;
public $price;
public $quantity;
public function rules()
{
return [
['name', 'tr... | true |
6a633f40d0c905191c2bde1b2ab2c2faa5fb3f9a | PHP | jeffaristi92/delverdesoy | /foro/phpbb/extension/provider.php | UTF-8 | 1,714 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\extension;
/**
* Provide... | true |
9784698f86ac62deaf9e7b6960f2557a48fa9a12 | PHP | leonelpacheco/Zapateriav4 | /app/controllers/admin/ProveedoresController.php | UTF-8 | 4,245 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
class ProveedoresController extends \BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
//ValidaAccesoController::validarAcceso('Proveedores','lectura');
$proveedores = Proveedores::all();
if(is_null($proveedores)){
$proveedores = nul... | true |
c053b5e8d41e088b04d112d8589da842f713e796 | PHP | DikchyaTuladhar/summer-project | /summer_project(code)/sample_form.php | UTF-8 | 7,172 | 2.734375 | 3 | [] | no_license | <?php
// define variables and set to empty values
$FnameErr = $MnameErr = $LnameErr = $AddressErr = $EmailErr =$PhoneErr="";
$f_name = $m_name = $l_name = $address = $email =$Phone = "";
$vaild=0;
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["f_name"])) {
$FnameErr = "Valid first name is... | true |
cc2dd2d283735d9b93f492d3861bbee81290b509 | PHP | scento/phalcon | /src/Phalcon/Mvc/Model/Validator/Email.php | UTF-8 | 2,982 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Email Validator
*
* @author Andres Gutierrez <andres@phalconphp.com>
* @author Eduar Carvajal <eduar@phalconphp.com>
* @author Wenzel Pünter <wenzel@phelix.me>
* @version 1.2.6
* @package Phalcon
*/
namespace Phalcon\Mvc\Model\Validator;
use \Phalcon\Mvc\Model\Validator;
use \Phalcon\Mvc\Model\Valid... | true |
415ddded23e8eae4a6ac16ce7e7b76f9e1796f2d | PHP | SavorGit/savor_admin | /Application/Admin/Model/ArticleSourceModel.class.php | UTF-8 | 2,037 | 2.59375 | 3 | [] | no_license | <?php
/**
*@desc 文章来源model
*@author zhang.yingtao
*@since 2017-06-15
*
*/
namespace Admin\Model;
use Common\Lib\Page;
use Admin\Model\BaseModel;
class ArticleSourceModel extends BaseModel{
protected $tableName = 'article_source';
/**
* @desc 获取文章来源列表
*/
public function getList($where... | true |
02ef8f16c413f4336ee8b1e9f85fb9dde15575c9 | PHP | mbaumanndev/mini-mvc | /Core/Router/Router.php | UTF-8 | 2,529 | 3.28125 | 3 | [] | no_license | <?php
namespace core\Router;
class Router
{
private $routes = [];
/**
* @var Route
*/
private $current;
const NO_ROUTE = 1;
/**
* @param Route $route
*/
public function addRoute(Route $route)
{
if(!in_array($route, $this->routes))
{
$this... | true |
25efb9701818c033c7984e0ec95099055ebcb163 | PHP | bgstation/lojavirtual | /protected/models/Produto.php | UTF-8 | 8,124 | 2.546875 | 3 | [] | no_license | <?php
/**
* This is the model class for table "produtos".
*
* The followings are the available columns in table 'produtos':
* @property integer $id
* @property string $titulo
* @property string $descricao
* @property string $url_amigavel
* @property string $imagem
* @property string $video_apresentacao
* @pr... | true |
09ea1d04a4e2af01155ae61ee3b6e154714268fe | PHP | tuanld1989/11ok-yii | /protected/models/GlobalArticlesCategories.php | UTF-8 | 1,676 | 2.8125 | 3 | [] | no_license | <?php
class GlobalArticlesCategories extends CActiveRecord
{
/**
* The followings are the available columns in table '{{GlobalArticlesCategories}}':
* @var integer $id
* @var string $name
* @var string $description
* @var string $settings
* @var integer $countArticles
*/
/**
* Returns the static mod... | true |
e98ab242d8033d5f0bb7f80459de798114b1f45d | PHP | CWDN/atom-autocomplete-php | /php/providers/AutocompleteProvider.php | UTF-8 | 2,408 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
class AutocompleteProvider extends Tools implements ProviderInterface
{
/**
* Execute the command
* @param array $args Arguments gived to the command
* @return array Response
*/
public function execute($args = array())
{
$class = $args[0];
$name = $args[1];
... | true |
cd6b0959bee22e438f236aaa6aeea5785743fa39 | PHP | laurentj/jelix | /lib/Jelix/Core/ModuleClass.php | UTF-8 | 4,350 | 2.84375 | 3 | [] | no_license | <?php
/**
* @author Laurent Jouanneau
* @contributor Loic Mathaud
* @contributor Christophe Thiriot
* @copyright 2005-2014 Laurent Jouanneau
* @copyright 2008 Christophe Thiriot
* @link http://www.jelix.org
* @licence GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/... | true |
74060afe35d068c891db294e59245c2819bd73aa | PHP | sdmunozsierra/SecureWebSystemsFall2016 | /resources/authenticate.php | UTF-8 | 1,784 | 2.984375 | 3 | [] | no_license | <?php //authenticate.php
require_once 'login.php';
$connection = new mysqli ( $hn, $un, $pw, $db );
if ($connection->connect_error)
die ( $connection->connect_error );
if (isset ( $_SERVER ['PHP_AUTH_USER'] ) && isset ( $_SERVER ['PHP_AUTH_PW'] )) {
$un_temp = mysql_entities_fix_string ( $connection, $_SERVER ['PHP_... | true |
1dd2eec838498e7c840ff016ffcb35c396c70a59 | PHP | armphp/arm_php | /projects/arm_manager/arm/core/model/ARMDBManager.class.php | UTF-8 | 2,386 | 2.9375 | 3 | [] | no_license | <?php
/**
* This class grants access to all Db configured connections by slug or id
* @author alanlucian
*
*/
class ARMDBManager extends ARMBasePoolManager{
const DRIVER_MYSQLI = "MYSQLI" ;
private static $dbConfigPool = array();
/**
* Add an configurantion on DB config Pool
* @param ARMDbCon... | true |
666ace79ed52efe528ce51a3bc91ff24a17e0de8 | PHP | abhi-1203/abhi1203.github.io | /stripe.php | UTF-8 | 1,595 | 2.625 | 3 | [] | no_license | <?php
require_once "config.php";
// Token is created using Checkout or Elements!
// Get the payment token ID submitted by the form:
$price= $_POST['amount'];
$email1=$_POST['payer_email'];
$fname=$_POST['firstName'];
$lname=$_POST['lastName'];
$phno=$_POST['phone'];
if(!isset($_POST['stripeToken']) || !isset(... | true |
c2da35926ec1c3cdbdc943f8af4d909c54f85d1e | PHP | chelisss/PHP | /POO/this.php | UTF-8 | 524 | 3.640625 | 4 | [
"LicenseRef-scancode-public-domain"
] | permissive | <?php
class Persona {
public $nombre;
public $edad;
public $pais;
public function mostrarInformacion(){
echo $this->nombre . ' tiene ' . $this->edad .' y es de ' . $this->pais;
}
}
$carlos = new Persona;
$carlos -> nombre = 'Luis Enrique';
$carlos -> edad = 23;
$carlos -> pais = 'México... | true |
4e296a29f865519f7f38f15d930933c6905285f3 | PHP | jurchiks/numbers2words | /src/languages/Italian.php | UTF-8 | 3,859 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
namespace js\tools\numbers2words\languages;
use js\tools\numbers2words\exceptions\UnsupportedCurrencyException;
use js\tools\numbers2words\Speller;
/**
* @internal
*/
final class Italian extends Language
{
public function spellMinus(): string
{
return 'meno';
}
public function spellMinorUnitSeparator... | true |
4c2f3bf4daa78c353f3098d0daf46508e0fc8348 | PHP | PeterJCLaw/srobo-ide | /modules/team.php | UTF-8 | 4,660 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
class TeamModule extends Module
{
const IMAGE = 'image';
static $statusTextFields = array('feed', 'url', 'facebook', 'youtube', 'twitter', 'description', 'name');
public function __construct()
{
$this->installCommand('list-members', array($this, 'listMembers'));
$this->installCommand('list-projects', ar... | true |
fcc5fddeace88d0a932c957d84c6f6167d8a7a1b | PHP | tsmilgius/rss_v2 | /views/rsscontent.php | UTF-8 | 471 | 2.6875 | 3 | [] | no_license | <?php
if(!isset($_SESSION))
session_start();
?>
<h2><?= $rsscontent->getChannel();?></h2>
<?php
for($i=0; $i < $_SESSION['number']; $i++):
foreach($rsscontent as $item):?>
<h4> <a href="<?= $item[$i]->link ?>" target="_blank"><?=$item[$i]->title?> </a></h4>
<p><?= $item[$i]->description?></p>
... | true |
4db4e9acdb2eb092f0261bceab30a142ac18e281 | PHP | runrunbear/-runrunbear-20180522_php_tutorial_part_5 | /代码/44-2.php | UTF-8 | 291 | 2.71875 | 3 | [] | no_license | <?php
/****
布尔教育 高端PHP培训
培 训: http://www.itbool.com
论 坛: http://www.zixue.it
****/
$arr = array(1,0,0,0,0);
for($i=1;$i<=20;$i++){
array_pop($arr);
array_unshift($arr,0);
$arr[0] = $arr[2]+$arr[4];
}
print_r($arr);
echo array_sum($arr);
?> | true |
5dc3b652dcc4fb4d4dcfd8e112c25b55262e0575 | PHP | imoralescs/php-doctrine | /src/app/Middleware/CsrfGuard.php | UTF-8 | 1,019 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace NamespacesName\Middleware;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use NamespacesName\Security\Csrf;
use NamespacesName\Exceptions\CsrfTokenException;
class CsrfGuard
{
protected $csrf;
public function __construct(Csrf $csrf) {
$this->csrf = $c... | true |
2a9287b0c7b4a4dc0d8e2bc5ae0e114ffcb8bc7e | PHP | furrycz/furry.cz-v2 | /app/presenters/CmsPagePresenter.php | UTF-8 | 13,907 | 2.59375 | 3 | [] | no_license | <?php
use Nette\Application;
use Nette\Application\UI;
use Nette\Database;
use Nette\Application\ForbiddenRequestException;
use Nette\Application\ApplicationException;
use Nette\Application\BadRequestException;
/**
* CMS pages presenter
*/
class CmsPagePresenter extends BasePresenter
{
/**
* Default page; provid... | true |
bc3c5d03f12d9edba9f68b5275d08e9bae0a15de | PHP | snoozeDev/Narval | /sauveguarde.php | UTF-8 | 1,653 | 2.6875 | 3 | [] | no_license |
<?php
if (isset($_GET['update'])) {
updateMap();
} else if (isset($_GET['save'])) {
saveMap();
}
function saveMap() {
include 'db.php';
$con=mysqli_connect($dbhost,$dbuser,$dbpass,$db);
$name = $_GET['mapName'];
$description = $_GET['mapDescription'];
$cercles = $_GET['cercles'];
$polygs = $_GET['polygs'];
... | true |
4a1511fcbdfb03a663f35707481a1ed096dc84ed | PHP | emilegoeminne/eindwerk7SWM | /factuur.php | UTF-8 | 2,110 | 2.828125 | 3 | [] | no_license | <?php
include("includes/db_conn.php");
session_start();
//stap 1b: bestand db_conn.php insluiten
if (!isset($_GET["id"])){
// als de url-parameter niet werd meegegeven ga terug naar index.php
echo "ERROR: Could not able to execute" . mysqli_error($conn);
}
// stap 2: De query... | true |
baa6e4413cb9b1cf12b7c3741804883c2174551a | PHP | thaitv91/ebank | /admin/data/wallet_report.php | UTF-8 | 2,024 | 2.65625 | 3 | [] | no_license | <?php
session_start();
include("../config.php");
include("condition.php");
?>
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<?php
$user_id = $_SESSION['ipayindia_user_id'];
if(isset($_POST['submit']))
{
$username = $_REQUEST['username'];
$user_query = mysql_query("select * from users where use... | true |
8bfda8db058f79cd0c067b9a32eb296720db9c88 | PHP | DieTrinker/php | /entwurfsmuster/klassen/Singleton.php | UTF-8 | 649 | 3.625 | 4 | [] | no_license | <?php
class Singleton {
// eine statische Eigenschaft zum Speichern der Instance
private static $instance = NULL;
// eine statische Methode, um die Instanz auszuliefern
public static function getInstance(){
// falls das Exemplar noch nicht erzeugt wurde
if(self::$inst... | true |
5d586a8ed2cede88328221c4b66b42c4bd544c35 | PHP | zulsyah/zullrgs | /member/myPT3/orders_crud.php | UTF-8 | 2,498 | 2.625 | 3 | [] | no_license | <?php
include_once 'database.php';
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
//Create
if (isset($_POST['create'])) {
try {
$stmt = $conn->prepare("INSERT INTO tbl_order_a163776_pt2(fld_order_id, fld_sta... | true |
fef13ee66b93b7add225517d8f583c0de1931ad4 | PHP | ImperiumPF/laravel-api | /tests/Feature/RegisterTest.php | UTF-8 | 6,289 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Unit;
use App\User;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
class RegisterTest extends TestCase
{
use WithFaker;
use RefreshDatabase;
protected $password = 'password';
protected function ... | true |
1782f7ce77739855e821562eb94630ec9ee569df | PHP | Ignigena/vera | /lib/vera/Command.php | UTF-8 | 3,097 | 3.109375 | 3 | [] | no_license | <?php
namespace Vera;
class Command {
public $settingsFile;
public static $red = "\033[31;40m\033[1m%s\033[0m";
public static $yellow = "\033[1;33;40m\033[1m%s\033[0m";
public static $green = "\033[1;32;40m\033[1m%s\033[0m";
function __construct() {
$this->settingsFile = getcwd() . '/vera.json';
... | true |
d5a3943c45fe57a594c0c2f8d83530170be4d03d | PHP | tekton-php/assets | /src/AssetInfo.php | UTF-8 | 1,777 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php namespace Tekton\Assets;
use Tekton\Assets\Asset;
class AssetInfo
{
protected $asset;
public function __construct(Asset $asset)
{
$this->asset = $asset;
}
public function uri()
{
return $this->uri;
}
public function path()
{
return $this->manager->f... | true |
95967633043c7e1d9bdba577404833609ed201ba | PHP | a07061625/swooleyaf | /libs_frame/SyDingTalk/Corp/ChatBot/InstallRequest.php | UTF-8 | 782 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace SyDingTalk\Corp\ChatBot;
use SyDingTalk\BaseRequest;
/**
* dingtalk API: dingtalk.corp.chatbot.install request
*
* @author auto create
*
* @since 1.0, 2020.08.17
*/
class InstallRequest extends BaseRequest
{
/**
* 安装的机器人信息
*/
private $chatbotVo;
public function setChatbot... | true |
1dd4a5cefcc0a94350ac56ca1ecd6e5f62c798ef | PHP | guilhermesiani/virtualpet | /libs/Pet/PetFactory/PetFactory.php | UTF-8 | 1,209 | 3.328125 | 3 | [] | no_license | <?php
namespace Libs\Pet\PetFactory;
use Libs\Pet\PetFactory\PetFactoryInterface as PetFactoryInterface;
use Libs\Pet\Pet as Pet;
/**
*
*/
class PetFactory implements PetFactoryInterface
{
private $planet;
private $kind;
function __construct(string $planet, string $kind)
{
$this->planet = $this->getPlanetFr... | true |
2f0acbf5df4f9f0dcc671ba6a130c59919cc7dc4 | PHP | AhnafMuttaki/telegram_api | /telegram.php | UTF-8 | 5,629 | 2.78125 | 3 | [] | no_license | <?php
//------------------ Configs ---------------------------------
$bot_token= "BOT_Token";
$host_name = "localhost";
$database = "telegram_bot";
$username = "root";
$password = "12345";
//-------------------Get Last Update ID------------------------------------------
// $last_update_id_temp = "225170903";
##########... | true |
e3f789c3ff23d2d2aa00df5ba786ccb14044f472 | PHP | patelhumaira21/Azteca-Website | /Assignment/site_connect.php | UTF-8 | 1,098 | 2.703125 | 3 | [] | no_license | <?php
require_once '../constants.php';
if (session_status() != PHP_SESSION_ACTIVE) {
session_start();
}
function dbConnect() {
$database_source = 'mysql:host='.HOSTNAME.'; dbname='.DBNAME;
try {
$conn = new PDO($database_source, USERNAME,PASSWORD);
$dbstatus = true;
} catch (PDOException $e) {
$_SESSION... | true |
e2d6014ff7c9a6273f2f99e3b620c6fc35d79702 | PHP | theperfectcoder/carcas-backend-laravel | /app/Api/Exceptions/BadRequestException.php | UTF-8 | 457 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Api\Exceptions;
use Api\Core\Exceptions\AbstractHttpException;
use Illuminate\Http\Response;
/**
* Class NotFoundException
* @package Api\Core\Exceptions
*/
class BadRequestException extends AbstractHttpException
{
/**
* BadRequestException constructor.
* @param string $message
... | true |
f5b891dcd1e565c3d5e27fc2611b39848e6402de | PHP | anuj-padhiyar/mvc | /Model/Core/Request.php | UTF-8 | 789 | 2.859375 | 3 | [] | no_license | <?php
namespace Model\Core;
class Request
{
public function getPost($key=NULL,$option=NULL)
{
if (!$key) {
return $_POST;
}
if (!array_key_exists($key, $_POST)) {
return $option;
}
return $_POST[$key];
}
public function getGet($key=NULL,$option=NULL)
{
if (!$key) {
return $_GET;
}
if (!a... | true |
12e2559e8a825971e9ecde2655cafdac3c86ff6a | PHP | milkbear2019/milkbear2019-TeacherPHP7 | /ch03/0403_2.php | UTF-8 | 121 | 3.25 | 3 | [] | no_license | <?php
$a=10;$b=3;
echo floor($a/$b)."<br>";
echo $a."除以".$b."的商為:".(int)($a/$b)." , 餘數為:".($a%$b);
?> | true |
29761847850162c01e9bfc0543bef33f282245db | PHP | TerrayTM/myremindlist-api | /add_phone.php | UTF-8 | 1,463 | 2.765625 | 3 | [] | no_license | <?php
//Connect to database
include_once "./database_connect.php";
//Validate request parameters
$rules = array(
array("token", "s"),
array("phone", "i")
);
if (!validate_parameters($request, $rules)) {
die(json_encode(array("error" => "INVALID_ARGUMENTS")));
}
//Validate token and if valid... | true |
34892d627a63d675006f86a7efcb3492985195cc | PHP | BichHoang/24hschool | /app/Http/Controllers/Admin/UserController.php | UTF-8 | 3,230 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\DAO\DaoAdmin\DaoUser;
use App\Http\System\SystemStringParameter;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Input;
class UserController extends Controller
{
private $_dao_user;
public function __constru... | true |
135b88735ea28d73c1d35386d2321b988dc0b830 | PHP | adenzil/blog | /articles.php | UTF-8 | 2,326 | 2.59375 | 3 | [] | no_license | <?php
$m = new MongoClient();
$db = $m->mydb;
$collection = $db->mycol; //connecting to db
$value = array();
header('Content-Type: application/json');
error_reporting(0);
$entityBody = file_get_contents('php://input'); //getting input from body
$a=json_decode($e... | true |
277a9c79339c10df9f56ca2b0fd1ddc4ddad17e7 | PHP | theoafactor/sample-001 | /app/Classes/User.php | UTF-8 | 117 | 2.53125 | 3 | [] | no_license | <?php
require_once "./Contracts/IUser.php";
class User implements IUser{
public function checkUserExists(){
}
} | true |
3125dea0917d10d15762ff5a07e9be8fca082ed0 | PHP | mitsuru793/php-trump | /php/blackjack/src/BlackJack/Game/GameRunner.php | UTF-8 | 2,244 | 2.75 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace BlackJack\BlackJack\Game;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use BlackJack\BlackJack\Application\Actions\AskPlayerAction;
use BlackJack\BlackJack\Applicatio... | true |
b49ca1d6e88d6c0720d3f5cf5183af37346601ad | PHP | huudo/hotelhub | /protected/models/User.php | UTF-8 | 8,307 | 2.515625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "gc_user".
*
* The followings are the available columns in table 'gc_user':
* @property string $id_user
* @property string $id_group
* @property string $id_lang
* @property string $lastname
* @property string $firstname
* @property string $email
* @property stri... | true |
84a01930ad7aacbbd0ea7430b80c0b7a426b437e | PHP | xS0ares/aulaphp.com | /exer14.php | UTF-8 | 3,886 | 2.84375 | 3 | [] | no_license | <?php
$num1 = $_POST["num1"];
$num2 = $_POST["num2"];
$media = ($num1 + $num2) / 2;
$metade = ($num1 - $num2) / 2;
echo "A média artmética é: $media e a metade da diferença entre eles é $metade<br>";
echo "<br> <hr>";
$salarioBruto = $_POST["salario"];
echo "Salário bruto é: $salarioBruto<br>";
$desconto = $salarioBrut... | true |
4e3c1e5cfecc358ecb8af30ad5221abd495e80d5 | PHP | Imperium84/Blog | /class/FlashBag.php | UTF-8 | 869 | 3.046875 | 3 | [] | no_license | <?php
class FlashBag
{
public function __construct()
{
if(session_status() == PHP_SESSION_NONE)
{
session_start();
}
if (!array_key_exists("Messages", $_SESSION))
{
$_SESSION["Messages"] = [];
}
}
public function add(string $message)
{
$_SESSION["Messages"] = [$message];
}
publi... | true |
2496bf382c586789cac78a757935db8dcc22b77b | PHP | ErikTrapman/cyclear | /src/CQRanking/Parser/Strategy/Y2013/GeneralClassification.php | UTF-8 | 988 | 2.515625 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace App\CQRanking\Parser\Strategy\Y2013;
use App\CQRanking\Parser\Strategy\AbstractStrategy;
use App\CQRanking\Parser\Strategy\ParserStrategyInterface;
use Symfony\Component\DomCrawler\Crawler;
class GeneralClassification extends AbstractStrategy implements ParserStrategyInterfac... | true |
a9d26509a4ae0ea8e0a5d5cefb2c96eb1fcaf567 | PHP | tjhunkin/switchtel | /Question1/Services/Products/Interfaces/ProductServiceInterface.php | UTF-8 | 256 | 2.546875 | 3 | [] | no_license | <?php
namespace SwitchTel\Services\Products\Interfaces;
use SwitchTel\Models\Products\Interfaces\ProductInterface;
interface ProductServiceInterface
{
public function increaseProductFee(ProductInterface $product,float $percentageIncrease) : void;
}
| true |
c701e0469adf7ce9779e3dc37a103f28e80a1bf2 | PHP | leeliwei930/godspeed-essentials | /essentials/models/Event.php | UTF-8 | 10,302 | 2.5625 | 3 | [] | no_license | <?php namespace GodSpeed\Essentials\Models;
use Carbon\Carbon;
use Cms\Classes\Page;
use Model;
use October\Rain\Database\Attach\File;
use RainLab\User\Models\UserGroup;
/**
* Meeting Model
*/
class Event extends Model
{
use \October\Rain\Database\Traits\Validation;
/**
* @var string The database tabl... | true |
be99328c29108c78c532dc03e2938aaa65198d7d | PHP | ma867/secondProject2 | /src/HtmlTags.php | UTF-8 | 1,479 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: MAlzate
* Date: 3/13/2019
* Time: 1:23 PM
*/
class HtmlTags
{
public static function BeginOfTable()
{
return '<table class="table">';
}
public static function EndOfTable()
{
return '</table>';
}
public static function BeginOfHead... | true |
cb3d3f425f668ad3486660017878c3d62b755487 | PHP | petteri-hakala/procountor-php | /src/Procountor/Interfaces/DimensionItemInterface.php | UTF-8 | 555 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Procountor\Interfaces;
interface DimensionItemInterface extends AbstractResourceInterface {
//Dimension item ID. ,
public function getId(): int;
//Dimension item code name. ,
public function getCodeName(): string;
//Dimension item status. If the dimension item is marked as active... | true |
a35cb7f74e763d1b301412e3f78edf31f5d68db2 | PHP | johnykvsky/spisywarka | /src/CommandHandler/UpdateCollectionCommandHandler.php | UTF-8 | 1,576 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\CommandHandler;
use App\Command\UpdateCollectionCommand;
//use App\Entity\Collection;
use App\Repository\CollectionRepository;
use Symfony\Component\Messenger\MessageBusInterface;
use App\CommandHandler\Exception\CollectionNotUpdatedException;
use Psr\Log\LoggerInterface;
class UpdateCollectionCo... | true |
e0aeb86cb6fd241516f7607a2be9ebb2b1f4d26e | PHP | NYPL/barcode-service | /vendor/nypl/microservice-starter/src/Config.php | UTF-8 | 5,418 | 2.59375 | 3 | [] | no_license | <?php
namespace NYPL\Starter;
use Aws\Kms\KmsClient;
use Dotenv\Dotenv;
class Config
{
const LOCAL_ENVIRONMENT_FILE = '.env';
const GLOBAL_ENVIRONMENT_FILE = 'var_app';
const DEFAULT_TIME_ZONE = 'America/New_York';
const CACHE_PREFIX = 'Config:';
protected static $initialized = false;
protec... | true |
f2790bab10c09723a02bc7853eb58a7356bd4141 | PHP | Denvise/framework-php | /src/Entities/Article.php | UTF-8 | 2,445 | 2.53125 | 3 | [] | no_license | <?php
namespace Entities;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\DBAL\Query\QueryBuilder;
/**
* @Table(name="articles")
* @Entity
**/
class Article
{
/**
* @Id
* @var int
* @Column(type="integer", name="id")
* @GeneratedValue(strategy="AUTO")
**/
protected $id... | true |
7aa39466a5c6b8f5c3afbc6553f4305dd5d206fb | PHP | marc0manuel/assignment3 | /getproducts.php | UTF-8 | 1,027 | 3.375 | 3 | [] | no_license | <?php
//By: Marco Manuel
//Email: mmanuel5@uwo.ca
//We start with the basic Query first of getting all the information from the Product Table
$query = "SELECT * FROM Product";
//next, we choose see what sorting method was chosen from the previous page and add to the query the corresponding value
if($_GET["sort"] !... | true |