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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
8d856842f36f2cb05587fb172f92a87da1f39d2f | PHP | cborchert/syllable_stress | /process_stress.php | UTF-8 | 1,961 | 3.703125 | 4 | [] | no_license | <?php
// We're going to process the stresses file
// Each line is in the format WORD Stresses/Phonemes
// The stresses are 0 = no stress, 1 = primary, 2 = secondary
// e.g. AARDVARK AA1 R D V AA2 R K
// The information we should extract the word (aardvark), and the stress structure (12)
// The stresses.txt file can b... | true |
bef70108b1f852a2d6c5fdba4302f5f2d32c8344 | PHP | ludwig-sam/mt_xxl | /app/Repositorys/Admin/MchCategoryRepository.php | UTF-8 | 1,154 | 2.65625 | 3 | [] | no_license | <?php namespace App\Repositorys\Admin;
use App\Models\MchCategoryModel;
class MchCategoryRepository {
private $model;
public function __construct(MchCategoryModel $model)
{
$this->model = $model;
}
public function find($id)
{
return $this->model->find($id);
... | true |
2ec6302779a5dc39071bf705e68bcc3256624fa1 | PHP | Hack-ademy-4/beercraftObed | /app/Http/Controllers/HomeController.php | UTF-8 | 854 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class HomeController extends Controller
{
public function inicio()
{
$title = "Bienvenidos a Beercraft";
$color = "green";
return view("welcome", compact("title", "color"));
}
... | true |
216e6bed22e208da6d0a054060d35604c9ddc557 | PHP | dvien/second_hand_car | /app/Models/WechatUser.php | UTF-8 | 5,066 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class WechatUser extends Authenticatable
{
use Notifiable, SoftDeletes;
// 分页数
const PER_PAGE = 10;
// 是代理人
const AGENT_CODE... | true |
7b5fafdc2d18125d560e34c607e77400641160e5 | PHP | vadimklochkov/AuthPhpToMySql | /rlog.php | UTF-8 | 1,679 | 2.703125 | 3 | [] | no_license | <?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
$mysqli = @new mysqli('localhost', 'phpmyadmin', 'Gogoork_1337_vsdvsSdfasd', 'users');
if (mysqli_connect_errno()) {
echo "Подключение невозможно: ".mysqli_connect_error();
}
//методом пост вписывае... | true |
8f39593b900760982760047c3a6da26648bfffbb | PHP | Reviewver/markJob | /Vue/statut.php | UTF-8 | 346 | 2.59375 | 3 | [] | no_license | <?php
// Affiche l'icone de statut
function display_statut($statut)
{
?>
<img id="iconeStatut" src="<?php
if($statut == 0)
{
echo "img/wait.svg";
}
else if($statut == 1)
{
echo "img/error.png";
}
else if($statut == 2)
{
echo "img/ok.svg";
}
?>"><?php
... | true |
42a5707a415a22daf5487865177d13d6581768b1 | PHP | Wolfgang-Geisler/smart-home | /DevProject/api/models/raumModel.php | UTF-8 | 1,941 | 3.1875 | 3 | [] | no_license | <?php
class raumModel{
private $dbGateway;
public function raumModel(){
$this->dbGateway = new pdoDBGateway();
}
public function getRaum($stockwerkId){
$query = "SELECT * FROM raum WHERE StockwerkID = $stockwerkId";
$getRaum = $this->dbGateway->query($query);... | true |
8867a81290e64794da3f8ea785e5b84b4e496cc1 | PHP | yuletodim/MVCFramework_ShoppingCart_EducationProject | /ShoppingCart/Models/UserBindingModel.php | UTF-8 | 1,987 | 3.09375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Yulia
* Date: 03.10.2015
* Time: 17:47
*/
namespace Models;
class UserBindingModel
{
private $username;
private $password;
private $firstName;
private $lastName;
private $email;
/**
* @var \MVCFramework\Validator;
*/
private $validat... | true |
cf8f82e569a182d417b65642f0724efc482df1a6 | PHP | ptlis/semantic-version | /tests/Version/Label/LabelTest.php | UTF-8 | 999 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @copyright (c) 2014-2017 brian ridley
* @author brian ridley <ptlis@ptlis.net>
* @license http://opensource.org/licenses/MIT MIT
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ptlis\SemanticVersi... | true |
3a5c3ae37c27c49e704ec380280eae6c72409e55 | PHP | Alexandr93/blog | /framework/Response/Response.php | UTF-8 | 517 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: alex
* Date: 12.09.15
* Time: 21:16
*/
namespace Framework\Response;
class Response extends AbstrResponse implements ResponseInterface
{
public $type = 'html';
public function __construct($content, $code=200, $msg='Ok'){
parent::__construct();
... | true |
67039f5af7aaea797ffc97f1933e7a044466c5ec | PHP | uk-gov-mirror/ministryofjustice.wp-intranet-joi | /web/app/themes/jo/templates/sidebar.php | UTF-8 | 2,263 | 2.5625 | 3 | [] | no_license | <?php
use Roots\Sage\Extras;
$year = get_query_var('event_year');
if(empty($year) || $year == null) {
$year = date("Y");
}
$month = get_query_var( 'event_month' );
if(empty($month) || $month == null) {
$month = date("m");
}
?>
<!-- Left nav -->
<div class="column grid_3">
<?php if(is_post_type_archive('event')):... | true |
5dd658f92d2b4b64e60fc0d1d959fb4ceae8fa79 | PHP | mahtat555/facebook-publish | /app/Console/Commands/shareNow.php | UTF-8 | 1,123 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\Post;
use App\Http\Controllers\PostsController;
class shareNow extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'command:sharenow';
/*... | true |
c6b786952f5b5967be4be8f8a53e3ecc2649dec3 | PHP | BielLopes/Squeeze | /View/Admin/mostrarGENeART.php | UTF-8 | 1,986 | 2.796875 | 3 | [] | no_license | <?php
require_once "../../Controller/verifica2.php";
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<table>
<!-- Mostrar todos os Generos -->
<tr>
<th>Gênero</th>
</tr>
<?php
$conn = mysqli_connect("localhost","root","","squeeze");
if($conn-> connect_error){
die("Ocorreu um erro ao tent... | true |
a5bdf7cbcd6ee2507a007ab4f2a2f57cfcd69576 | PHP | DanielPeixoto712/RC-Atividade-9 | /6.php | UTF-8 | 124 | 3.28125 | 3 | [] | no_license | <?php
$soma=0;
while (true) {
$num=rand(1,50);
if ($num==37) {
break;
}
echo "<br>";
echo " " .$num;
}
?> | true |
59966ad0560eeb5cec2caa212fea6a11a0f19245 | PHP | LinioIT/seller-center-sdk | /src/Model/QualityControl/QualityControls.php | UTF-8 | 1,035 | 2.890625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace Linio\SellerCenter\Model\QualityControl;
use Linio\SellerCenter\Contract\CollectionInterface;
class QualityControls implements CollectionInterface
{
/**
* @var QualityControl[]
*/
protected $collection = [];
public function findBySellerSku(string $Sell... | true |
887c668a2e91cf61185db5edae132a335078250d | PHP | Zakaria590/TW_2020 | /SQL/S9/fichiers9-1/views/lib/fonctionsHTML.php | UTF-8 | 2,586 | 3.421875 | 3 | [] | no_license | <?php
/* argument : une liste (table) de coureurs.
* chaque élément de la liste est une table associative avec les clés 'equipe','dossard', 'nom'
* résultat : chaîne contenant le code HTML d'une table présentant ces infos
*/
function tableQ1cToHTML($table){
$res = '<table><thead><tr><td>équipe</td><td>dossard</... | true |
a4fa87e4bc342830769ca609efbed93c07953d91 | PHP | FellipeCarvalho/applistaTarefasPHPPDO | /app_lista_tarefas_interno/conexao.php | UTF-8 | 903 | 3.109375 | 3 | [] | no_license | <?php
/*Nessa classe vamos fazer a conexão com o banco de dados */
class Conexao{
private $host ='localhost';
private $dbname = 'lista_tarefas_php';
private $usuario = 'root';
private $senha = '';
public function conectarBanco(){
//fazemos um teste... | true |
ba145c546af0d99b36fd0bba23a22e37ff6b1635 | PHP | bavix/glow-api | /src/Interfaces/Bucketable.php | UTF-8 | 745 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Bavix\GlowApi\Interfaces;
interface Bucketable
{
/**
* @param string $name
* @return array
*/
public function createBucket(string $name): array;
/**
* @param string $name
* @return array
*/
public function showBucket(string $name): array;
/**
* ... | true |
e036996a6d458e8821737c7c9fc9124437542140 | PHP | NOPROD/Mediatheque | /phpmailer/EnvoiMail.php | UTF-8 | 1,805 | 2.8125 | 3 | [] | no_license | <?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'Exception.php';
require 'PHPMailer.php';
require 'SMTP.php';
Class EnvoiMail
{
public static function send($sujet, $messageHTML, $messageTexte, $piecejointe, $destinataire)
{
//Create a new PHPMailer instance
$mail ... | true |
b160f63f63c83419ccf54c487ebb98dc936da8b2 | PHP | eric890529/SimpleBackend | /choose.php | UTF-8 | 1,000 | 2.625 | 3 | [] | no_license | <?php
header("Content-Type: text/html; charset=utf-8");
if (!isset($_POST['submit'])) {
exit("錯誤執行!!!");
}
include('connect.php');
$subject = $_POST['subject'];
//$myalls = implode (",", $subject);
$id = $_POST['id'];
echo $id."<br>";
foreach ($subject as $class){
$sql = "INSERT INTO record(id,cId) values('$... | true |
2938935cb5401c18203010375c78fb3b5c535396 | PHP | eduardtovmasyan/News | /app/Services/UserService.php | UTF-8 | 1,708 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\User;
use App\Contracts\UserInterface;
use Illuminate\Support\Facades\Hash;
class UserService implements UserInterface
{
protected $userModel;
function __construct(User $userModel)
{
$this->userModel = $userModel;
}
public function index()
{
... | true |
a6704baa71ee52857b7c67602798c906b2387dbb | PHP | ertugrulozdgn/haberler | /database/seeds/TagTableSeeder.php | UTF-8 | 594 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
use App\Models\Tag;
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;
class TagTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$tags = [
'Samsung',
'Netflix',
'Apple',
... | true |
6d99f1fb24d24ba8cfa381dd2a6d630b7d8f7bfb | PHP | kalonzo/DS | /app/Models/CallNumber.php | UTF-8 | 3,336 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
/**
* Class CallNumber
*/
class CallNumber extends Model {
const TYPE_PHONE_NUMBER_RESERVATION = 1;
const TYPE_FAX = 2;
const TYPE_MOBILE = 3;
const TYPE_PHONE_CONTACT = 4;
const TYPE_PHONE_PRO = 5;
protected $table = 'call_numbers';
public $timestamps = tru... | true |
247753daef18cfff72c44fe94d427a17948cbc75 | PHP | seelmann/tsv-sulzfeld | /modules/common/classes/classDBmysql.php | UTF-8 | 1,782 | 2.96875 | 3 | [] | no_license | <?php
class DBmysql
{
var $host = "";
var $user = "";
var $password = "";
var $database = "";
var $error;
var $linkID = 0;
var $result;
var $row;
function DBmysql($error)
{
$this->error = $error;
... | true |
b68eb963ef8c7a717ac8c2ffcff189898e0f6499 | PHP | felipelacerda1992/PHP | /FinanceiroPHP/admin/empresa_alterar.php | UTF-8 | 3,922 | 2.578125 | 3 | [] | no_license | <?php
require_once '../CONTROLLER/EmpresaCTRL.php';
require_once '../VO/EmpresaVO.php';
require_once './_msg.php';
//verifica se existe na URL o COD e se o valor do COD é numérico
if (isset($_GET['cod']) && is_numeric($_GET['cod'])) {
$ctrl = new EmpresaCTRL();
$dados = $ctrl->DetalharEmpresa($_GET['cod']);
... | true |
ba1cb3678ae30dfaa914d90abbf93166a8349313 | PHP | php2015/wulianwang | /app/superadmin/controller/user/UserGroup.php | UTF-8 | 2,681 | 2.515625 | 3 | [] | no_license | <?php
/**
*
* @author: wuhaotian<442384644@qq.com>
* @day: 2019/12/07
*/
namespace app\superadmin\controller\user;
use app\superadmin\controller\AuthController;
use app\superadmin\model\user\UserGroup as GroupModel;
use crmeb\services\JsonService;
use crmeb\services\UtilService;
use crmeb\services\FormBuilder as ... | true |
2f709b313978370485b8f606bf94b92b8e40bd4b | PHP | msiApache/ilmioportale_cloud | /index.php | UTF-8 | 1,618 | 2.546875 | 3 | [] | no_license | <?php
use Ilmioportale\Controller\VehiclesController;
// Initialize the session
session_start();
// Check if the user is logged in, if not then redirect him to login page
if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true) {
header("location: login.php");
exit;
}
spl_autoload_register(
... | true |
1d82299593e8e2a2f0b10ba5f3ca5f3bd2e73bf4 | PHP | msm-code/coyote | /database/migrations/2015_12_06_151350_create_after_user_skill_delete_trigger.php | UTF-8 | 874 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
class CreateAfterUserSkillDeleteTrigger extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
DB::unprepared('
CREATE FUNCTION after_user_skill_delete() RETURNS trigger LANGUAGE plpgsql AS $$... | true |
ee1d969aff164842bac666bed0d5ab72f9e74bca | PHP | krhouser77/map_recommender | /src/MapRec/MapRecBundle/Form/Type/CardType.php | UTF-8 | 2,528 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace MapRec\MapRecBundle\Form\Type;
use MapRec\MapRecBundle\Model\Card;
use Propel\PropelBundle\Form\BaseAbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class CardType extends BaseAbstractType
{
protected $options = array(
'data_class' => 'MapRec\MapRecBundle\Model\Card',
... | true |
540fa15ed7a3e26f6b5ef1edecb8d3627e222bbe | PHP | Jwhelan3/ServiceHRM | /lib/Database.php | UTF-8 | 875 | 3.25 | 3 | [] | no_license | <?php
/* This class sets up and closes database connections for use within all of the
other classes within the system. Depends on the configuration file being set up
with the details for detable connectivity.*/
class Database {
public $connection;
public function __construct($configFile)
... | true |
1ab1e7321077136d066042096d8797cadf481eee | PHP | iulian1976/ConvertRomanToDecimal | /index.php | UTF-8 | 4,680 | 2.640625 | 3 | [] | no_license | <?php
session_start();
include_once('service.php');
if(!isset($_SESSION['res'])) {
$_SESSION['res']=['0','0','0','0','0'];
$res=['0','0','0','0','0'];
$plus="";
}
elseif(isset($_SESSION['res']))
{
$res=$_SESSION['res'];
}
// var_dump($_SESSION['res']);
?>
<h... | true |
a5fd594d6877a76948c128252de873cc8869d3a1 | PHP | radislaw/domo_test | /app/catalog.php | UTF-8 | 2,451 | 2.875 | 3 | [] | no_license | <?
/* Данные для mysql */
$server = "localhost";
$username = "root";
$password = "root";
$dbname = "catalog";
/* Соединение с базой данных */
$connection = new mysqli($server, $username, $password, $dbname);
if ($connection->connect_error) {
die("Ошибка соединения: " . $connection->connect_error);
}
/* Получение ... | true |
c228a7444c007a14e24a9f6329b9a18ec95d6a92 | PHP | ElectricBrandy/intro_git | /phpFullscratch/app/POST.php | UTF-8 | 2,057 | 2.953125 | 3 | [] | no_license | <?php
//MODELの部分
class Post {
Private $DB_HOST ="192.168.33.10";
private $DB_NAME ="kishi_base";
private $DB_USER ="root";
private $DB_PASSWORD ="Yokashita48699684@";
protected function db_access() {
//PHPがエラーを吐くように設定 下の一文
error_reporting(E_ALL & ~E_NOTICE);
/... | true |
9606d4a0746a62d1bb8a21771eaec23ef67f7742 | PHP | thauansrx/stillos | /src/models/Clientes.php | UTF-8 | 2,088 | 3.171875 | 3 | [] | no_license | <?php
use models\Conexao;
use entity\ClienteEntity;
class Clientes extends Conexao {
/*
Classe para a manipulação da camada model dos usuarios
*/
private $conexao;
function __construct() {
/* Estabelecendo conexão com o banco de dados */
$this->conexao = $this->conectar();
... | true |
68ffbff2e35cc34628555f1976e0c1f8a3f57422 | PHP | sltnakbar94/inventoryalc | /app/Services/DeliveryOrderServices.php | UTF-8 | 5,109 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Models\Item;
use App\Models\BagItemWarehouseOut;
use App\Models\WarehouseOut;
use Illuminate\Support\Facades\DB;
/**
* Handle All Trx on Warehouse out
*/
class DeliveryOrderServices {
public function __construct(
WarehouseOut $deliveryOrder,
BagItemWarehou... | true |
98248e186bac291687373950d229cbfabf890af3 | PHP | fiztehradio/radio.mipt.ru | /build/php/get_stats.php | UTF-8 | 997 | 2.8125 | 3 | [] | no_license | <?php
// Connect to MySQL
$link = new mysqli( 'radio.mipt.ru', 'stats-loader', 'give_me_stats_please', 'radio' );
if ( $link->connect_errno ) {
die( "Failed to connect to MySQL: (" . $link->connect_errno . ") " . $link->connect_error );
}
// Fetch the data
$query = "SELECT * FROM broadcast_statistics_2017 ORD... | true |
9ed8b7d166f6b39c0db37f1860d4bbd102b629a8 | PHP | imoisey/todoapp-vue | /api/src/Auth/Api/ApiInterface.php | UTF-8 | 170 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Auth\Api;
use App\Auth\Api\Dto\UserDto;
interface ApiInterface
{
public function getUserById(string $id): UserDto;
}
| true |
06c46df15561135d05eff493e80b4f3f8dd84ba5 | PHP | anokghosh/address-book | /registration.php | UTF-8 | 7,072 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<!-- Header section-->
<?php
include "include/header.php";
?>
<body>
<!-- navigation bar and db connection -->
<?php
ob_start();
session_start();
if( isset($_SESSION['username'])!="" ){
header("Location: home.php");
}
include... | true |
ccb0dc240390fe9b11ba1cd9f8018ac8340a94a9 | PHP | meklis/pon-helper | /src/Api/Middleware/AuthKeyMiddleware.php | UTF-8 | 1,676 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace PonHelper\Api\Middleware;
use PonHelper\Controllers\Auth;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Server\MiddlewareInterface as Middleware;
use Psr\Http\Server\RequestHandlerInterface as RequestHa... | true |
e532134f6e0960f09ec48e80a60cb95358c9dc7a | PHP | 1457792186/JWPHP | /PHPBase/DetailLearn/Main/MySQL数据库基础/SQLBase/SQL函数/16SQL-now().php | UTF-8 | 915 | 3.25 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: apple
* Date: 2018/1/17
* Time: 下午1:02
*/
SQL NOW() 函数
//NOW() 函数
//NOW 函数返回当前的日期和时间。
//提示:如果您在使用 Sql Server 数据库,请使用 getdate() 函数来获得当前的日期时间。
//SQL NOW() 语法
SELECT NOW() FROM table_name
//SQL NOW() 实例
/*
"Products" 表:
Prod_Id ProductName Unit UnitPrice
1 ... | true |
997b39bea553687fda21961524a31d274c3ea875 | PHP | dbojdo/wFirma | /src/Vat/VatRate.php | UTF-8 | 2,964 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Webit\WFirmaSDK\Vat;
/**
* Wraps VatCodeId or simple string VAT code that can be passed for create / edit actions
*/
final class VatRate
{
/** @var ?string */
private $code;
/** @var ?VatCodeId */
private $vatCodeId;
private function __construct(?string $code = null, ?VatCodeId... | true |
defdce883c3d17d62008b7fd1f3ccc1743be9985 | PHP | Lanptit/Tren | /database/seeds/ProductTypesTableSeeder.php | UTF-8 | 682 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Models\Product_Type;
class ProductTypesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('product_types')->delete();
$product_types_json = File::get('database/da... | true |
bfa3de55c84f3211743846b24967de0933f8a591 | PHP | keboola/job-queue-internal-api-php-client | /src/Result/InputOutput/Table.php | UTF-8 | 1,168 | 2.6875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Keboola\JobQueueInternalClient\Result\InputOutput;
use JsonSerializable;
class Table implements JsonSerializable
{
private string $id;
private string $name;
private string $displayName;
private ColumnCollection $columns;
public function __construct(
... | true |
24381cc6d1bb06d2c7b2374d153eebc8cc357527 | PHP | wysiwyg-team/betting | /classes/Balance.php | UTF-8 | 791 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app;
/**
* Created by PhpStorm.
* User: Ankush
* Date: 2/9/2018
* Time: 10:49 AM
*/
include 'vendor/autoload.php';
class Balance
{
/**
* @return bool
* Insert amount played in table Balance
*/
public function getAmount()
{
$user = new User();
$currentUs... | true |
c83ac2702fdaf2be8964440155921d375260f398 | PHP | lytsy/cs50 | /pset7/public/sell.php | UTF-8 | 3,186 | 2.5625 | 3 | [] | no_license | <?php
require("../includes/config.php");
$id = get_user_id();
if ($_SERVER["REQUEST_METHOD"] == "GET") {
$portfolios = CS50::query("SELECT * FROM portfolios WHERE user_id = ?", $id);
if (count($portfolios) == 0) {
render(
"report.php",
[
"title" => "Sell",
... | true |
e0b47bce247e180dc85797e184a534946390c1a2 | PHP | simob93/intermediamo | /_ws/service/immobileService.php | UTF-8 | 834 | 2.609375 | 3 | [] | no_license | <?php
include_once '../manager/immobileManager.php';
include_once '../classi/jsonResponse.php';
include_once '../generali/costanti.php';
class ImmobileService {
function getManager() {
return new ImmobileManager();
}
/**
* @param $immobile
*/
function save($immobile) {
... | true |
349bca34d1c337001a22cc164e5ce7c31eab119f | PHP | cloudinary/php-transformation-builder-sdk | /src/Transformation/Layer/BaseSourceContainer.php | UTF-8 | 3,130 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Cloudinary PHP package.
*
* (c) Cloudinary
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cloudinary\Transformation;
use Cloudinary\ArrayUtils;
/**
* Class BaseSourceContainer
*
... | true |
7c62ac5e9094d9f2967b50231a4aa2008dae763b | PHP | Enrique121919/RENOVA-SPA | /conexion.php | UTF-8 | 3,783 | 3.234375 | 3 | [] | no_license | <?php
/**
*Archivo de clase de conexion PDO
*
*Clase que permite acciones CRUD usando PDO
*
*@package PDO
*@author Enrique Díaz Ramírez <enrique121919@hotmail.com>
*
*
*/
class ClassPDO
{
public $connection;
private $dsn;
private $username;
private $password;
public $result;
/**
*Constructo... | true |
abd245b3a1c70dfdbe2ee9d64f03bfb153a95224 | PHP | clarkeash/kurenai | /src/Parsers/Content/CommonMarkParser.php | UTF-8 | 302 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Kurenai\Parsers\Content;
use League\CommonMark\CommonMarkConverter;
class CommonMarkParser
{
/**
* @param string $markdown
* @return string
*/
public function parse($markdown)
{
return (new CommonMarkConverter())->convertToHtml($markdown);
}
}
| true |
fad65236deeaacdeeb1e8433823338838312f284 | PHP | grifart/not-serializable | /tests/SaferSerializerTest.php | UTF-8 | 2,739 | 2.75 | 3 | [] | no_license | <?php
use Grifart\NotSerializable\SaferSerializer;
use Grifart\NotSerializable\NoSerialization;
use Tester\Assert;
require __DIR__ . '/../vendor/autoload.php';
class NestedSerialization {
private object $nested;
public function __construct(object $nested){$this->nested = $nested;}
/**
* @return array{someKey: ... | true |
f5115161b869fbb7dd199cd4cbee984941d6f260 | PHP | k1LoW/yak | /Lib/YakEmoji.php | UTF-8 | 2,578 | 2.59375 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
if (file_exists(dirname(__FILE__) . '/../vendor/autoload.php')) {
require_once(dirname(__FILE__) . '/../vendor/autoload.php');
}
class YakEmoji extends HTML_Emoji {
public static function getStaticInstance($carrier = null) {
static $instances = array();
$aliases = array(
'do... | true |
bade13f811e8c53777801b6f799f7c8a5031baad | PHP | alxarch/basex-php | /src/BaseX/Resource.php | UTF-8 | 4,830 | 2.796875 | 3 | [] | no_license | <?php
/**
* @package BaseX
* @copyright Copyright (c) 2012, Alexandors Sigalas
* @author Alexandros Sigalas <alxarch@gmail.com>
* @license BSD License
*/
namespace BaseX;
use BaseX\Database;
use BaseX\Helpers as B;
use BaseX\Resource;
use BaseX\Resource\ResourceInterface;
use DateTime;
use Simpl... | true |
892a9300419b64e90ea284f1eddb088004343cc8 | PHP | zetta-code/zend-authentication | /src/Authentication/Adapter/Credential.php | UTF-8 | 9,408 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @link https://github.com/zetta-code/zend-authentication for the canonical source repository
* @copyright Copyright (c) 2018 Zetta Code
*/
declare(strict_types=1);
namespace Zetta\ZendAuthentication\Authentication\Adapter;
use DoctrineModule\Authentication\Adapter\ObjectRepository;
use DoctrineMo... | true |
c71a7359cc521a255f22fb88fde77603cd950f8c | PHP | RenanSilva93/codeigniterrestful | /application/models/UsuarioModel.php | UTF-8 | 2,395 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class UsuarioModel extends CI_Model {
public function __construct() {
parent::__construct();
}
function Insert($dados) {
if (!isset($dados)) {
$response['status'] = false;
$response['message... | true |
01e464e9b7a413590869a3c761c64ee8950f7d68 | PHP | BotLife/BotLife | /src/Application.php | UTF-8 | 886 | 2.71875 | 3 | [] | no_license | <?php
namespace Botlife;
class Application
{
private $_bootstrap;
private $_autoloader;
public function __construct()
{
$this->_autoloader = new Application\Autoloader();
}
public function getBootstrap()
{
if (!$this->_bootstrap) {
$this->_bootstr... | true |
bd8c8cf5205ead114345f4ac3b52799c0edad852 | PHP | m1roff/yii-mmigration | /MMigration.php | UTF-8 | 24,571 | 2.90625 | 3 | [] | no_license | <?php
/**
* Расширение миграций для Yii
* Добавляет функционал запуска вложенных миграций.
* @author Jasur Mirkhamidov <mirkhamidov.jasur@gmail.com>
*/
class MMigration extends CDbMigration
{
const DEFAULT_OPTION = ' ENGINE=InnoDB DEFAULT CHARSET=utf8 ';
const DEFAULT_ENGINE = ' ENGINE=InnoDB ';
... | true |
866fe4008adfdd4c1199e1f9829110e45710eac5 | PHP | koenreiniers/mvc-cli | /src/App.php | UTF-8 | 3,821 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Kr\MvcCli;
use Kr\MvcCli\Controller\ControllerResolverInterface;
use Kr\MvcCli\Event\ControllerEvent;
use Kr\MvcCli\Event\ResponseEvent;
use Kr\MvcCli\Routing\Router;
use Kr\MvcCli\Directive\OutputTagInterface;
use Kr\MvcCli\Directive\TagRegistry;
use Kr\MvcCli\Templating\EngineInterface;
use Symfony\C... | true |
4171cca441e9ccb62874226d579488779588062d | PHP | andresfabian95/transportes_acme2 | /app/Http/Controllers/UserController.php | UTF-8 | 1,132 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\personal;
use Illuminate\Http\Request;
class
UserController extends Controller
{
//
public function index(){
//select * from users
$users=personal::all();
return view('users.index',compact('users'));
}
public function creat... | true |
63c5b5b31999bc059058fb36cc27f64badf4f0a7 | PHP | SeAppsT/IDF | /app/main/domain/Order.php | UTF-8 | 959 | 2.875 | 3 | [] | no_license | <?php
class Order implements DataObject {
use BaseDataHelper;
use Manager;
private $id;
private array $products;
private string $table = 'orders';
public function getId(){
return $this -> id;
}
public function setId($id){
$this -> id = $id;
}
public functio... | true |
2d98957f60dfe97b5466d43d4855b8cc3ebabbcd | PHP | xupeichun/fabloox | /app/Http/Controllers/Backend/Access/HomepageVideo/HomepageVideoController.php | UTF-8 | 3,160 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Backend\Access\HomepageVideo;
use App\Http\Requests\Backend\Access\HomepageVideo\StoreHomepageVideoRequest;
use App\Http\Requests\Backend\Access\User\ManageUserRequest;
use App\Repositories\Backend\Access\HomepageVideo\HomepageVideoRepository;
use Illuminate\Http\Request;
use App\... | true |
dc4ddafa9abbf2a2dba519ad5d9cd78b7d8c13ae | PHP | gregorip02/node-vs-swoole | /server.php | UTF-8 | 431 | 2.59375 | 3 | [] | no_license | <?php
$host = 'localhost';
$port = 9501;
$server = new Swoole\HTTP\Server($host, $port);
$server->on("start", function (Swoole\Http\Server $server) use ($port) {
echo "Swoole server listen on port ${port}\n";
});
$server->on("request", function (Swoole\Http\Request $request, Swoole\Http\Response $response) {
... | true |
06e9cbe981d80c00f3ea2883a96c706557b8d90e | PHP | Ingewikkeld/phpOpenNOS | /src/phpOpenNOS/Model/Article.php | UTF-8 | 1,412 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/**
* phpOpenNOS
*
* @category phpOpenNOS
* @package Model
* @author Stefan Koopmanschap <left@leftontheweb.com>
* @copyright 2010-2011 Stefan Koopmanschap
*/
namespace phpOpenNOS\Model;
/**
* Article model class represents article data coming from the API
*
* @author Stefan Koopman... | true |
f76c281f9a84bdc03cb2213e3c87340de6570929 | PHP | lcgwhat/oop | /common/models/ActiveRecord.php | UTF-8 | 1,351 | 2.6875 | 3 | [] | permissive | <?php
/**
* ActiveRecord.php
* atuthor: liuchg
*/
namespace common\models;
use yii\db\Expression;
use yii\behaviors\TimestampBehavior;
class ActiveRecord extends \yii\db\ActiveRecord
{
protected function timestampBehavior() {
return [
'class' => TimestampBehavior::className(),
... | true |
de83ce77a7422c9ee85516273d1852b8393556a4 | PHP | jokerai-draft/lpthw-backend | /ex5/g1p/ex2/non-staticsVersion/IStateService.php | UTF-8 | 229 | 2.578125 | 3 | [] | no_license | <?php
interface IStateService
{
public function getState();
public function reset();
}
// 参考
// https://www.php.net/manual/zh/language.oop5.interfaces.php
// https://tutorials.supunkavinda.blog/php/oop-inheritance
| true |
b560826694943e74784314b5cbd5e44faf960864 | PHP | kgaughan/afk | /fwk/classes/AFK/JoinedIterator.php | UTF-8 | 1,328 | 3.25 | 3 | [] | no_license | <?php
/*
* AFK - A minimalist PHP web development library.
* Copyright (c) Keith Gaughan, 2010. All Rights Reserved.
*
* For the full copyright and licence terms, please view the LICENCE file
* that was distributed with this source code.
*/
/**
* Allows iteration over a number of different iterable objects in
... | true |
2e19205126d79b821eaee60f02958b0ab6c14769 | PHP | davidrobbo/Laravel-bits | /Providers/RegisterAServiceProvider.php | UTF-8 | 1,766 | 2.96875 | 3 | [] | no_license | <?php
/*
* Why use Service Providers?
* Service providers are the central bootstrapping location
* of a Laravel application. The request lifecycle begins
* in index.php before instantiating our app/service
* container. Next the kernel bootstraps our application
* including registering our service providers.
* In... | true |
9bb637d139e7eec4fd0489ea66ebae70a736b6e0 | PHP | reemodo/Masseging | /employeeView.php | UTF-8 | 850 | 3.34375 | 3 | [] | no_license |
<?php
$connection = new mysqli("localhost", "root", "","SchoolBus"); // Establishing Connection with Server
if ($connection->connect_error) {
die("Connection failed: " . $conn->connect_error);
}// Selecting Database
//MySQL Query to read data
$heroes = array();
$qur = "SELECT Employee_id,Employee_name FROM `e... | true |
3ad1454a445458ef2d0b31c994cb977443885966 | PHP | dvsa/olcs-backend | /module/Api/src/Domain/Command/BulkSend/Letter.php | UTF-8 | 789 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Bulk send Letters
*
* @author Andy Newton <andy@vitri.ltd>
*/
namespace Dvsa\Olcs\Api\Domain\Command\BulkSend;
use Dvsa\Olcs\Transfer\Command\AbstractCommand;
use Dvsa\Olcs\Transfer\FieldType\Traits\User;
class Letter extends AbstractCommand
{
use User;
/**
* @var String
* @Transfe... | true |
f67d527a59e8bd97f43b7356e4a9121f74ba2134 | PHP | poking123/Running_Log | /CalendarTable/PHP/Login-account/CreateAccount.php | UTF-8 | 9,545 | 2.96875 | 3 | [] | no_license | <!DOCTYPE HTML5>
<html>
<head>
<title>Running Log</title>
<link rel=stylesheet type=text/css href="../../CSS/table.css" />
</head>
<?php
$ok = true;
$username = "";
$password = "";
$confirmPassword = "";
$email = "";
$addr... | true |
22e08ba458117eb86918aff73bac8afd8b882787 | PHP | sigtot/websockets-chat-front | /pullFromRemote.php | UTF-8 | 995 | 2.71875 | 3 | [] | no_license | <?php
$logFile = fopen("github.log", "a");
fwrite($logFile, "New request on webhook endpoint!\n");
$headers = getallheaders();
$body = file_get_contents("php://input");
fwrite($logFile, "Headers: \n");
foreach($headers as $name => $value) {
fwrite($logFile, $name.": ".$value."\n");
}
fwrite($logFile, "Body: \n");... | true |
915cfae00b77d19fb3a06f89c72b76bcf51ddac6 | PHP | brave20200727/0820 | /EasyMVC/controllers/BlogController.php | UTF-8 | 229 | 2.59375 | 3 | [] | no_license | <?php
class BlogController extends Controller {
function index() {
echo "home page of BlogController";
}
function list($pageNumber) {
echo "This page number is $pageNumber";
}
}
?> | true |
d5c0276ab3d5c3946e6a837ffd93583e963e55ea | PHP | Blas-P12/Coming-Soon-codeigniter- | /fuel/modules/news/models/admin_model.php | UTF-8 | 1,843 | 2.53125 | 3 | [] | no_license | <?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
require_once(FUEL_PATH.'models/base_module_model.php');
class Admin_model extends Base_module_model {
function __construct()
{
parent::__construct('news');
}
function list_items($limit = NULL, $offset = NULL, ... | true |
465eeac0668ca79d131b9abda351eb4efcfc72c0 | PHP | igorbiliba/telegram_bot_yii2 | /models/UserSession.php | UTF-8 | 2,730 | 2.59375 | 3 | [] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "user_session".
*
* @property string $id
* @property string $step
* @property string|null $amount
* @property string|null $btc_addr
* @property string|null $llc_account
* @property string|null $currency
* @property string|null $pho... | true |
28167dcabec5439dcbc53eee29e38588df500924 | PHP | tonimonteiro/transportadoras | /module/SimBase/src/SimBase/View/Helper/CpfOrCnpjFormat.php | UTF-8 | 1,624 | 2.734375 | 3 | [] | no_license | <?php
/**
* Sim Tecnologia Application
*
* 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://www.simtecnologia.com/license/new-bsd
* If you did not receive a copy of... | true |
093ef41500c90bca91582a706846926d787a5aa0 | PHP | stweet/nrd | /server/database/models/pdo/base/Uninstall.php | UTF-8 | 502 | 2.65625 | 3 | [] | no_license | <?php
namespace database\models\pdo\base {
use database\models\pdo\base\Model;
class Uninstall extends Model {
public function apply() {
$this->query("drop table if exists tasks;");
}
protected function query(string $request) {
if ($result = ... | true |
7dc44a701a7a558b3f855b4cc98cd04e2aeff2de | PHP | alexmon1989/pass-request | /application/libraries/Layout.php | UTF-8 | 19,270 | 2.875 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Layout
*
* Библиотека CodeIgniter, которая выводит страницы сайта
*
* @author Монастырецкий Александр Николаевич <monastyretsky@mail.ru>
* @version 1.0
*/
class Layout
{
/**
* Объект CodeIgniter
* @var object
*/
privat... | true |
5ead2eaa634f2f3fd4ef9882936566ffa70d5be9 | PHP | CalvinCLW/303COM-FYP | /createDatabase.php | UTF-8 | 503 | 2.609375 | 3 | [] | no_license | <?php
if ($dbc = mysqli_connect('localhost', 'root', '')){
print '<p>Successfully connected to MySQL!</p>';
if(@mysqli_query($dbc, 'CREATE DATABASE FYP')){
print '<p>The database has been created!</p>';
}
else{
print'<p style="color: red;">Could not create the database because: <br/>' ... | true |
3d143808001f885db8a2af900f2f240bce16ed33 | PHP | JesGarnica/Arcane-Network | /ArcaneLobby#/src/danixl/arcane/command/Stats.php | UTF-8 | 1,440 | 2.890625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace danixl\arcane\command;
use danixl\arcane\Main;
use pocketmine\Player;
use pocketmine\command\{
CommandSender,
PluginCommand
};
class Stats extends PluginCommand {
private $plugin;
public function __construct(Main $plugin) {
parent::__construct('sta... | true |
1f708ef74937bbd2e087f99fbaa4d5cbbfa6289d | PHP | ykxiao/cloud-wh-demu | /src/CloudService.php | UTF-8 | 1,553 | 2.84375 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
/**
* Author: ykxiao
* Date: 2020/6/20
* Time: 10:24
* Description:
*/
namespace CloudWhDemu;
use CloudWhDemu\Sender\ArrayCon;
use CloudWhDemu\Sender\Contents;
use CloudWhDemu\Sender\Message;
class CloudService
{
/**
* @var Message
*/
protected $message;
protected $config;
/**
... | true |
e6b21907f965e68dbf392089ecb02b6703bd72ff | PHP | Fiyery/FirePHP | /src/module/default/rest/lib/RestException.class.php | UTF-8 | 1,095 | 2.953125 | 3 | [] | no_license | <?php
use FirePHP\Exception\Exception;
/**
* HTTP REST Exception.
* @author Yoann Chaumin <yoann.chaumin@gmail.com>
*/
class RestException extends Exception
{
const ERROR_SQL = 'ERROR_SQL';
const INVALID_FOREIGN_KEY = 'INVALID_FOREIGN_KEY';
const INVALID_METHOD = 'INVALID_METHOD';
const MISSING_INST... | true |
f0edbcea24831687bf2d2a748f30226f672f0a51 | PHP | ptorn/bth-anax-user | /src/User/User.php | UTF-8 | 655 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Peto16\User;
/**
* Class to handle a user.
*/
class User
{
/**
* Columns in the table.
*
* @var integer $id primary key auto incremented.
*/
public $id;
public $username;
public $password;
public $email;
public $firstname;
public $lastname;
publi... | true |
d096957adbd84858fed3f411ebfc8ef17f694579 | PHP | 71810334/Challenge | /challenge_1/task1-6.php | UTF-8 | 364 | 3.234375 | 3 | [] | no_license | <HTML>
<head></head>
<body>
<?php
$content = 1;
if ($content == 1) {
echo '1です!';
} elseif ($content == 2) {
echo 'プログラミングキャンプです!';
} elseif ($content == 'a') {
echo '文字です!';
} else {
echo 'その他です!';
}
?>
</body>
</HTML> | true |
438372613e5e5a158281437c13b6e1d9640283b7 | PHP | educateddropout/vsa | /php/database/QueryBuilder.php | UTF-8 | 29,839 | 2.703125 | 3 | [] | no_license | <?php
class QueryBuilder
{
protected $pdo;
public function __construct($pdo, $decryptor)
{
$this->pdo = $pdo;
$this->decryptor = $decryptor;
}
public function fetchStatGrievanceType($code, $statCtr){
if($statCtr == 1){
$statement = $this->pdo->prepare("SELECT p.province_code AS 'code', p.provin... | true |
d4efc664c075784287a7fb02d50b3ed00115db60 | PHP | VitexSoftware/php-ease-core | /tests/src/Ease/AtomTest.php | UTF-8 | 1,447 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Základní objekty systému.
*
* @author Vitex <vitex@hippy.cz>
* @copyright 2009-2021 Vitex@hippy.cz (G)
*/
// @codingStandardsIgnoreFile
// @codeCoverageIgnoreStart
declare(strict_types=1);
namespace Test\Ease;
use Ease\Atom;
/**
* Test class for EaseAtom.
* Generated by PHPUnit on 2012-03-1... | true |
379986f646edd828c681d075c5e79d090cff02d6 | PHP | fortifi/php-api | /src/Requests/InteractionMessageRequest.php | UTF-8 | 3,320 | 2.6875 | 3 | [] | no_license | <?php
namespace Fortifi\Api\V1\Requests;
use Fortifi\Api\Core\ApiRequest;
use Packaged\Helpers\Objects;
use Packaged\Helpers\Strings;
class InteractionMessageRequest
extends ApiRequest
implements \JsonSerializable
{
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return [
"timestamp" =... | true |
dfeeec2dd0535b16cf1af4a02fe004d4a8275fc2 | PHP | jvitorn/modelo-MVC | /App/DAO/GrupoDAO.php | UTF-8 | 1,505 | 2.578125 | 3 | [] | no_license | <?php
namespace App\DAO;
use App\DAO\DAO;
use App\Model\Grupo;
class GrupoDAO extends DAO {
static public function create(Grupo $grupo){
$cols = "cd_grupo, nm_grupo, status_grupo,ds_grupo,created_at";
$vals = "NULL";
$vals .=",'".$grupo->getNome()."'";
$vals .=",'".$grupo->getStatus()."'";
$v... | true |
95c235cdb032fc2092e135e985f0975c32a14243 | PHP | babeto/html | /dataOpt.php | UTF-8 | 790 | 3.03125 | 3 | [] | no_license | <?php
class database {
public $host = "localhost";
private $adminUser = "siteadmin";
private $adminPassword = "User@123";
public $database = "magic_data";
public $con;
function __construct()
{
$this->con = mysql_connect("$this->host","$this->adminUser","$this->adminPassword");
if(!$this->con)
{
... | true |
ec079a673f0cc7a0088e1aacfda3e3f434d8f1ba | PHP | NathalieStiefsohn/CF_SCRUM_bus_agency | /includes/sql_helpers.php | UTF-8 | 214 | 2.609375 | 3 | [] | no_license | <?php
function checkAndPrintSQLError($successMessage) {
global $con;
$error = $con->error;
if ($error) {
echo "<p>MySQL error:: $error</p>";
} else {
echo $successMessage;
}
}
| true |
aaf2c532a900d2c446d0f3832251e87a799e1145 | PHP | dennyfardian/tsttodolist | /index.php | UTF-8 | 2,317 | 2.9375 | 3 | [] | no_license | <?php
//inisialisasi jika terjadi error
$error="Tidak bisa terhubung";
//connect ke database
$db=mysqli_connect("tsttodolist-mysqldbserver.mysql.database.azure.com", "mysqldbuser@tsttodolist-mysqldbserver", "Denny13735", "dbtodolist");
//laporan konfirmasi jika submit button diklik
if(isset($... | true |
d280714ac8fbe9774e032a92a4d00c6d82b1dd50 | PHP | timhunt/moodle-local_codechecker | /PHPCompatibility/Util/Tests/Core/IsNumericCalculationUnitTest.php | UTF-8 | 2,037 | 2.6875 | 3 | [] | no_license | <?php
/**
* PHPCompatibility, an external standard for PHP_CodeSniffer.
*
* @package PHPCompatibility
* @copyright 2012-2020 PHPCompatibility Contributors
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
* @link https://github.com/PHPCompatibility/PHPCompatibility
*/
namespace PHPCompatibility... | true |
b6ff3edafe54955d0902a90b0372caa0b8fef4ab | PHP | fiyahkid/SmgSupportCenter | /application/models/SmgSupportCenter/map/TicketsystemTableMap.php | UTF-8 | 2,287 | 2.546875 | 3 | [] | no_license | <?php
/**
* This class defines the structure of the 'ticketsystem' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ... | true |
4f187c07045fa62d20f9b68bdf42a71cb183afcd | PHP | WAME-IS/CategoryModule | /forms/containers/categoryMultiLevel/CategoryMultiLevelContainer.php | UTF-8 | 1,250 | 2.671875 | 3 | [] | no_license | <?php
namespace Wame\CategoryModule\Forms\Containers;
use Wame\DynamicObject\Forms\Containers\BaseContainer;
use Wame\DynamicObject\Registers\Types\IBaseContainer;
interface ICategoryMultiLevelContainerFactory extends IBaseContainer
{
/** @return CategoryMultiLevelContainer */
public function create();
}
class Ca... | true |
5f4b862d84c4359da2c5f2f21fc27bbb117b3e28 | PHP | ksmith-dev/the_fittest_warrior | /app/Member.php | UTF-8 | 763 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Member extends Model
{
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
protected $table = 'member';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
... | true |
600812570fd2e786f174813bd8e0fae18fa9003a | PHP | kylekatarnls/simple-cli | /tests/SimpleCli/DemoApp/CopyCommand.php | UTF-8 | 584 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\SimpleCli\DemoApp;
use SimpleCli\Attribute\Option;
use SimpleCli\Attribute\ReadableFile;
use SimpleCli\Attribute\WritableFile;
use SimpleCli\CommandBase;
use SimpleCli\SimpleCli;
/**
* Copy an input file into an output path.
*/
class CopyCommand extends CommandBase
{
#[Option]
#[Reada... | true |
8ac9d64343722d34841cb39654de1db43904e8b9 | PHP | Dezzi94/jackflix | /includes/classes/Constants.php | UTF-8 | 912 | 2.8125 | 3 | [] | no_license | <?php
class Constants
{
public static $firstNameCharacters = "Your First name must be between 2 and 25 characters!";
public static $lastNameCharacters = "Your Last name must be between 2 and 25 characters!";
public static $usernameCharacters = "Your username must be between 2 and 25 char... | true |
18baa10f8310f3487b985574f28e1508e4259671 | PHP | rongybika/appointment | /src/controller/auth/Login.php | UTF-8 | 582 | 2.609375 | 3 | [] | no_license | <?php
//attempt to login the user
if (isset($_POST['uemail']) && isset($_POST['psw'])) {
$loggedUser = $auth->login($_POST['uemail'], $_POST['psw'], 0, null);
if (!$auth->isLogged()) {
//if not logged in return to login page
echo $twig->render('login.html.twig', ['message' => $loggedUser['mess... | true |
5b42e04063ed58e1614d074c0e19a2e5ca00dfce | PHP | danutzzb/asign_php | /interfaces/index.php | UTF-8 | 382 | 2.765625 | 3 | [] | no_license | <?php
//$words = ["banana", "mar", "portocala", "gutuie"];
//$lenghts = array_map('strlen', $words);
//var_dump($lenghts);
//echo max($lenghts);
spl_autoload_register(function($class) {
require_once $class . '.php';
});
$croco = new Crocodile();
$mia = new Cat();
$robi = new Robodog();
$greg = new PetOwner();
$gre... | true |
ff882d1b34ead6e89297e9e5830d2aefecbb9f2e | PHP | ryota-wakamatsu/sample2 | /practice.php | UTF-8 | 794 | 3.109375 | 3 | [] | no_license | <?php
echo 'hello php!';
echo "\n";
$a = 3;
$b = 7;
echo $a + $b;
echo "\n";
$array_month = ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"];
echo $array_month[7];
echo "\n";
$hello='Hello,';
$name='Ryota';
$world="'s world!";
echo $hello . $name . $world;
echo "\n";
$tech_boost = "tech";
$tech_boost .=... | true |
2def9978fbb7a4f7e7474081401a17de64a6ddda | PHP | nixsolutions/design-patterns | /_includes/patterns/ru/Structural/DependencyInjection/Worker.php | UTF-8 | 554 | 3.34375 | 3 | [
"MIT"
] | permissive | <?php
namespace DesignPatterns\Structural\DependencyInjection;
/**
* Class Worker
* @package DesignPatterns\Structural\DependencyInjection
*/
class Worker
{
/**
* @var BurgerInterface
*/
protected $burger;
/**
* Worker constructor.
*
* @param BurgerInterface $burger
*/
... | true |
57613946632e9882674a84a1a7fe915ce72df29b | PHP | fadwaxl/sensetrace | /deploy/web_frontend/login.php | UTF-8 | 3,089 | 2.65625 | 3 | [] | no_license | <?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
session_start();
$username = $_POST['username'];
$passwort = $_POST['password'];
$hostname = $_SERVER['HTTP_HOST'];
$path = dirname($_SERVER['PHP_SELF']);
//Parse IniFile
$ini_array = parse_ini_file("auth/access.ini");
// Benutzername un... | true |