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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e5267061e09f1674b2264defcbd81e853ec89223 | PHP | ogmartinii/challenge05 | /system/project/models/actor.model.php | UTF-8 | 275 | 2.8125 | 3 | [] | no_license | <?php
class Actor_Model extends model
{
public static function getActors()
{
$query = "SELECT label FROM imdb_genre";
$resultset = db::query($query);
$objects = static::fetchObjects($resultset);
return $objects;
}
} | true |
7acd717e7d972d776975445e7526326905d431e0 | PHP | cronycles/hirikoestudio.com | /app/Http/ViewComponents/Footer/Component/FooterComponent.php | UTF-8 | 506 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\ViewComponents\Footer\Component;
use App\Http\ViewComponents\Footer\Services\FooterViewModelService;
use Illuminate\Contracts\Support\Htmlable;
class FooterComponent implements Htmlable {
protected $service;
public function __construct(FooterViewModelService $service) {
$thi... | true |
33ebdbae40016a61de8672fd1ba36c45bdc901b7 | PHP | kaystrobach/FLOW.Pdf | /Classes/Renderer/MPdfRenderer.php | UTF-8 | 1,875 | 2.65625 | 3 | [] | no_license | <?php
namespace KayStrobach\Pdf\Renderer;
use Mpdf\Mpdf;
use Mpdf\Output\Destination;
use Neos\Flow\Annotations as Flow;
class MPdfRenderer extends AbstractRenderer
{
/**
* @Flow\Inject
* @var \Neos\Flow\Utility\Environment
*/
protected $environment;
/**
* @Flow\InjectConfiguration... | true |
5be4e78ea55d8f78ae69ce0e4466c7dc32a60576 | PHP | xenide-dev/client_supply_management | /main/modules/csv_extractor.php | UTF-8 | 449 | 2.734375 | 3 | [] | no_license | <?php
if(isset($_FILES["file"])){
$output["list"] = [];
$fileName = $_FILES["file"]["tmp_name"];
if ($_FILES["file"]["size"] > 0) {
$file = fopen($fileName, "r");
while (($column = fgetcsv($file, 10000, ",")) !== FALSE) {
... | true |
e4d36b46a41df0dcff648236ec62826b5bfc2149 | PHP | techdivision/import | /src/Listeners/Renderer/Debug/GenericDebugCompositeRenderer.php | UTF-8 | 1,191 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* TechDivision\Import\Listeners\Renderer\Debug\DebugCompositeRenderer
*
* PHP version 7
*
* @author Tim Wagner <t.wagner@techdivision.com>
* @copyright 2020 TechDivision GmbH <info@techdivision.com>
* @license https://opensource.org/licenses/MIT
* @link https://github.com/techdivision/impor... | true |
b9dc4cb3b07e42c85935ec1fa635ca8e1af1412c | PHP | broozkan/curtain-erp | /controllers/accounting-record.php | UTF-8 | 8,731 | 2.53125 | 3 | [] | no_license | <?php
/**
*
*/
class AccountingRecord extends Controller
{
public $limit = 50;
public $offset = 0;
public $page = 1;
function __construct()
{
parent::__construct();
if (strtolower(@$_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest' ) {
}else {
require $this->pathPhp."settings/sessio... | true |
24c62834b3e896728e151d5366f090b3ac14b1d9 | PHP | sopheos/pebble_database | /src/Driver.php | UTF-8 | 4,646 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace Pebble\Database;
use PDO;
use PDOException;
use Pebble\Database\DriverInterface;
use Pebble\Database\Exception;
use Pebble\Database\QueryInterface;
use Pebble\Database\StatementInterface;
/**
* Driver
*
* @author Mathieu
*/
class Driver implements DriverInterface
{
private PDO $pdo;
// -... | true |
b1a4cda8e04b7758149cb4e6694855dd534033ae | PHP | lyondeveloper/rimeim-sistema-inventarios | /phpapi/public_html/api/app/models/DBFile.php | UTF-8 | 1,873 | 3.03125 | 3 | [] | no_license | <?php
/*
Esta clase se encarga de hacer todas las operaciones
referentes a archivos en base de datos
*/
class DBFile {
public function __construct() {
$this->db = new Database;
}
public function save_all_files($fileupload, $id_usuario, $max_files = null) {
... | true |
9df4f4fc5ae043e7e36a14bf1e37066f93937dd5 | PHP | ronyfrias05/Programacion2019_RonyF | /productos e cartas/10_registro_de_datos/borrar_carta.php | UTF-8 | 446 | 2.546875 | 3 | [] | no_license | <?php
require_once 'conexion.php';
if (isset($_POST['borrar'])) {
$id = $_POST['id'];
// Borrado fisico
// $sql = "DELETE from cartas where id = $id";
// Borrado logico
$sql = "UPDATE cartas SET activo = 0 where id = $id";
$eliminando = $conexion->exec($sql);
if ($eliminando) {
... | true |
e95c64a8ad1728e0555e47be6603920f0562fab5 | PHP | wiliender/routes_slim | /slim/index.php | UTF-8 | 1,621 | 3.15625 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
//objeto onde pode ser definido a rota para api
$app = new \Slim\App;
//definindo a rota
$app->get('/postagens2', function(){
echo "Listagem de postagens";
} );
//[/exp]torna exp opcional
$app->get('/usuarios[/{id}]', function($request, $response){
$id = $request-... | true |
abfe7edfaee8596a7d208f3f63ec4de2829545ce | PHP | akerouanton/Gaufrette2 | /src/Exception/CouldNotDelete.php | UTF-8 | 403 | 2.75 | 3 | [] | no_license | <?php
namespace Gaufrette\Exception;
use Gaufrette\Exception;
use Gaufrette\Filesystem;
final class CouldNotDelete extends \RuntimeException implements Exception
{
public static function create(Filesystem $filesystem, string $path, \Throwable $previous = null)
{
return new self(sprintf('Filesystem "%... | true |
d24f75519e65b9e4fe654c6c861c733159268332 | PHP | ferdiebergado/elogbook-adminlte | /Modules/Users/Transformers/UserTransformer.php | UTF-8 | 1,360 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Users\Transformers;
use League\Fractal\TransformerAbstract;
use Modules\Users\Entities\User;
use Modules\Documents\Transformers\OfficeTransformer;
/**
* Class UserTransformer.
*
* @package namespace Modules\Documents\Transformers;
*/
class UserTransformer extends TransformerAbstract
{
... | true |
a0d4c1b26b21d49546144903cb4afde530aae47c | PHP | BaliseCode/AnchorFramework | /src/TaxonomyWrapper.php | UTF-8 | 1,919 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
* (c) Balise.ca
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Balise\AnchorFramework;
class TaxonomyWrapper
{
private $isSync;
public function __construct($taxonomy, $post = null, $isSync = false)
{
$this->... | true |
17d67ee0289bba9ef59d177aedf4be21ab29ad5e | PHP | ponchio22/websiteBase | /libraries/Ima/UI/SelectFormField.php | UTF-8 | 1,393 | 2.8125 | 3 | [] | no_license | <?php
namespace Ima\UI;
use Ima\UI\FormField;
/**
* SelectFormField
*
* @author LuisAlfonso
*/
class SelectFormField extends FormField {
private $options;
public function __construct($id, $name, $label, $type = '', $value = '', $placeholder = '', $visible = true) {
parent::__construct($... | true |
5b3230c5bf05679bb9b3d4fad111a825cea14969 | PHP | esuryadi/store-front-builder | /suryadisoft/admin/dbtool/remove_db.php | UTF-8 | 1,740 | 2.734375 | 3 | [] | no_license | <?php
require_once "../../class/User.php";
require_once "../../class/DBConnect.php";
require_once("../config.php");
?>
<html>
<head>
<?php
$HTTP_SESSION_VARS["db_connect"]->open();
$db_list = mysql_list_dbs();
while ($row = mysql_fetch_array($db_list)) {
$dbname [] = $row[0];
}
$HTTP_SESSION_VARS["db_connect"]->clos... | true |
24a5837b267bd63e00a58e6bc07d1a3dc66e4210 | PHP | latifiyll/hefa-gmbh | /app/Traits/FileuploadTrait.php | UTF-8 | 1,097 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Traits;
trait FileUploadTrait {
public function uploadImage($image) {
if ($image) {
$image_name = $image->store('public/images');
$name = explode("/", $image_name);
$img_name = $name[count($name) - 1];
return $img_name;
}
return null;
}
public function up... | true |
535ef9ddc8c4349d7dcd8ced519fa840b82e33b8 | PHP | meiosis-io/Amino-php | /Tests/OrganizationTest.php | UTF-8 | 2,212 | 2.53125 | 3 | [] | no_license | <?php
namespace Tests;
use Dotenv\Dotenv;
use Meiosis\Amino;
use Meiosis\Exceptions\ObjectNotFoundException;
use PHPUnit\Framework\TestCase;
class OrganizationTest extends TestCase
{
public static $amino = null;
public static function setupBeforeClass(): void
{
$dotenv = new Dotenv(__DIR__.'/..')... | true |
44c75311df536179838eac049ac18d9809938ebd | PHP | OctavianLfrd/Computer-Networks-LD7 | /database/seeds/AnswersSeeder.php | UTF-8 | 1,872 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class AnswersSeeder extends Seeder
{
public function run()
{
DB::table('Answers')->insert([
['question_id' => 1, 'client' => 'Alfred', 'text' => '<b> - bold, <i> - italic, <u> - underline', 'date' => new \DateTime],
['question_id' => 2, 'cl... | true |
7d12086e08405925364690e1e57610e3ffa12a5f | PHP | maximopeoficiales/Librerias-PDF | /Fpdf/BD/index.php | UTF-8 | 3,640 | 2.671875 | 3 | [] | no_license | <?php
include('conexionbd.php');
$sqlcategorias= 'SELECT * FROM Categorias';
$result= $conexion->query($sqlcategorias);
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
... | true |
51c92fd742ca218d38f409d1b1a3b35d244aa51e | PHP | cybercog/linuxforum | /models/Forum.php | UTF-8 | 1,153 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\db\ActiveQuery;
use yii\db\ActiveRecord;
/**
* This is the model class for table "forums".
*
* @property string $id
* @property string $forum_name
* @property string $forum_desc
* @property string $redirect_url
* @property string $moderators
* @property string $nu... | true |
667325cdde64ec18d86f42609d02095f5fbff886 | PHP | watsonwanda/kucingjoget | /buy.php | UTF-8 | 3,343 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
include 'ccxt.php';
include 'ExchangeService.php';
date_default_timezone_set ('UTC');
$arrSettings = array(
'exchangeName' => "binance",
'apiKey' => 'zwhEjpIR3XzbQShM5p9jMNmPUOphCTehHEup1G6DlB9wA8wpdmjc7tTsUiHhCtiF',
'secret' => 'UGVyb7Txko0t16DbCKjTxi1sI9fM2LK3oRf4WaRCTo6DIJVYSQySV5KOSVmyxzmU'
);
... | true |
99b1acce9661a24114b0447086974483d0a4cecd | PHP | monakuen/IMayFly | /assets/cron/dateVerif.php | UTF-8 | 569 | 2.75 | 3 | [] | no_license | <?php
try
{
$bdd = new PDO('mysql:host=localhost;dbname=IMayFly;charset=utf8', 'root', 'root');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
$now = new DateTime();
$listPosts = $bdd->query('SELECT * FROM post');
foreach ($listPosts as $post){
$datePost = new DateTime($post['date']);
$... | true |
063ade483b630d87d5aed8710b948986eb3feebe | PHP | yomy/dotmatrixrenderer | /src/Renderer/Shared/FluidLogic/ConnectionMap.php | UTF-8 | 6,126 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
Copyright 2016 Milos Jovanovic <email.yomy@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by a... | true |
6aad7518e3585e521f969f2b3542fe54e2b10492 | PHP | monimsyed/real_time_chat_app | /config.php | UTF-8 | 2,163 | 2.609375 | 3 | [] | no_license | <?php
$con = mysqli_connect("localhost","root","","chat");
function fetch_user_chat_history($from_user_id, $to_user_id, $con)
{
$query = "SELECT * from chat_message
WHERE (from_user_id = '".$from_user_id."' AND to_user_id = '".$to_user_id."') OR (from_user_id = '".$to_user_id."' AND to_user_id = '".$from_use... | true |
203cb3ea4b17bf4a67115704a5b7075858bfd5fc | PHP | shwrm/sheepla-sdk-php | /src/Request/Shipment/AbstractPerson.php | UTF-8 | 5,690 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Sheepla\Request\Shipment;
use JMS\Serializer\Annotation as JMS;
abstract class AbstractPerson
{
/**
* @JMS\AccessType("public_method")
* @JMS\XmlElement(cdata = false)
* @JMS\Type("boolean")
*/
protected $isCompany;
/**
* @JMS\AccessType("public_method")
* @... | true |
adf629f8fad9b7bb7646b8f2aaf8d1da1af36798 | PHP | chheunpheara/phpmysqlpentester | /controller/HomeController.php | UTF-8 | 543 | 2.75 | 3 | [] | no_license | <?php
namespace controller;
class HomeController {
public function index() {
$html = '<h3>Topics</h3>';
$html .= "<p>1. <a href=\"?page=user&route=login\">Login Form Injection</a></p>";
$html .= "<p>2. <a href=\"?page=product&route=list\">Query String Injection</a></p>";
$html .=... | true |
b32f5c3013dc748ebbb726a6f9324e0f77fb2b45 | PHP | nawhas/nawhas | /api/app/Modules/Authentication/Http/Requests/RegisterRequest.php | UTF-8 | 513 | 2.515625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace App\Modules\Authentication\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class RegisterRequest extends FormRequest
{
public function rules(): array
{
return [
'name' => ['required', 'string'],
'email' => ['required', 'stri... | true |
e7969cf19c13af3584d637b243aa3a36767ed9da | PHP | yanagswk/ninja_code | /src/Intermediate/ninja_5.php | UTF-8 | 904 | 3.46875 | 3 | [] | no_license | <?php
$list = [1, 2, [3, [4, 5], 6, 7], 8, [9]];
$result = "";
$result = [];
function is_numric_re($list) {
foreach($list as $index=>$value) {
if (!is_array($value)) {
$result[] = $value . '<br>';
} else {
foreach($value as $val) {
if (!is_array($val)) {
... | true |
60497e04f3ccdac21f27f6198e74f7beef164901 | PHP | charlsontsang/zidisha2 | /app/Zidisha/Html/BootstrapFormBuilder.php | UTF-8 | 14,360 | 2.734375 | 3 | [] | no_license | <?php
namespace Zidisha\Html;
use Illuminate\Config\Repository as Config;
use Illuminate\Html\HtmlBuilder;
use Illuminate\Html\FormBuilder;
use Illuminate\Session\SessionManager as Session;
use Zidisha\Form\AbstractForm;
class BootstrapFormBuilder
{
/**
* Illuminate HtmlBuilder instance.
*
* @var ... | true |
e69a3b184cf40294749dada2805c79034295c722 | PHP | rahulyhg/happy-giraffe | /site/common/behaviors/DuplicateBehavior.php | UTF-8 | 1,318 | 2.59375 | 3 | [] | no_license | <?php
/**
* User: alexk984
* Date: 21/01/13
*/
class DuplicateBehavior extends CActiveRecordBehavior
{
public $attribute = 'title';
public $error_text = 'Вы только что создали статью с таким названием';
public function afterValidate($event)
{
parent::afterValidate($event);
if (!$thi... | true |
a96fcabf904b00a295bb7ceea606d22ed8aaa455 | PHP | abidurcu/DIPTI | /67m/formvalidation.php | UTF-8 | 2,521 | 2.921875 | 3 | [] | no_license | <?php
$showMessage = $fname = $errFname = $crrfname = $lname = $errLname = $crrlname = $crrname = $email = $errEmail = $crremail = $errGender = $gender = $test = null;
if (isset($_POST['subbtn'])) {
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
if (empty($fname)) {
$e... | true |
8c64d1b3ac52c005403495f3421c937951fe0e6b | PHP | joyrocks/framework | /src/Response/Presentation/AbstractPresentation.php | UTF-8 | 757 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Bluz Framework Component
*
* @copyright Bluz PHP Team
* @link https://github.com/bluzphp/framework
*/
/**
* @namespace
*/
namespace Bluz\Response\Presentation;
use Bluz\Response\AbstractResponse;
/**
* AbstractPresentation
*
* @package Bluz\Response\Presentation
*
* @author Anton Shevchuk
... | true |
7a763bd346cf3a0f5b8525f9f7cbe62e5ebe41f0 | PHP | navarrete1985/dwse | /proyectoMvc/classes/izv/model/UserModel.php | UTF-8 | 1,211 | 2.609375 | 3 | [] | no_license | <?php
namespace izv\model;
use izv\database\Database;
use izv\data\Usuario;
use izv\tools\Util;
use izv\managedata\ManageUsuario;
class UserModel extends Model {
private $manage;
function __construct() {
parent::__construct();
$this->manage = new ManageUsuario($this->db);
}
... | true |
29bb4ab024a167f878a4a1c89c26d29474273e4e | PHP | doctrine/doctrine-website | /lib/Docs/RST/RSTPostBuildProcessor.php | UTF-8 | 4,477 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Doctrine\Website\Docs\RST;
use Doctrine\Website\Model\Project;
use Doctrine\Website\Model\ProjectVersion;
use Symfony\Component\Filesystem\Filesystem;
use function preg_match;
use function preg_replace;
use function sprintf;
use function str_replace;
use function strpos;
cl... | true |
4585be642c12b6cb35a242ed251604f17a0c311b | PHP | marinaua/producto | /app/Drawer/DrawingStrategyInterface.php | UTF-8 | 227 | 2.640625 | 3 | [] | no_license | <?php
namespace Producto\Drawer;
interface DrawingStrategyInterface
{
/**
* Build table
*
* @param @param EntityInterface|string $item
*
* @return array
*/
public function build($item);
}
| true |
f662d817577e61246871f26e73655f3c138c70c9 | PHP | masteryoda123/gtmovie | /utils.php | UTF-8 | 991 | 2.71875 | 3 | [] | no_license | <?php
$TICKET_PRICE = 11.54;
function Redirect($url, $permanent = false)
{
header('Location: ' . $url, true, $permanent ? 301 : 302);
exit();
}
function RedirectJS($url)
{
echo "<script type='text/javascript'>window.location.href='" . $url . "';</script>";
exit();
}... | true |
3d19c6618a3eab07728f8646062aaf8e5aaaebb0 | PHP | rajeshpillai/php-custom-mvc | /app/controllers/AppController.php | UTF-8 | 943 | 2.90625 | 3 | [] | no_license | <?php
/**
* Description of AppController
*
* @author rajesh pillai
*/
include_once 'libs/controller.php';
class AppController extends Controller {
function __construct($route = null) {
parent::__construct($route);
$controllerClass = $this->getControllerClassName() ;
// Create model... | true |
4b0b8d9b5ef2a33e6bf90acce8dcfd54a2f0552d | PHP | abhinav67/prodigy2 | /app/Model/Event.php | UTF-8 | 1,007 | 2.609375 | 3 | [] | no_license | <?php
App::uses('AppModel', 'Model');
/**
* Event Model
*
* @property EventType $EventType
*/
class Event extends AppModel {
/**
* Display field
*
* @var string
*/
public $displayField = 'name';
public $validate = array(
'name' => array(
'notEmpty' => array(
'rule' => array('notEmpty'),
'message... | true |
1eb0e146866b985ccc020a554bb48b5584e8a1c8 | PHP | codelibo/QwShop | /app/Model/Goods.php | UTF-8 | 767 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class Goods extends Model
{
protected $table = "goods"; //指定表
protected $primaryKey = "id"; //指定id字段
public $timestamps = false;
// 获取单个SKU
public function get_sku(){
return $this->hasOne('App\Model\GoodsSpec','goods_id','id... | true |
a6bb3edffe587956cb22fd69f5dd4ac0ad1b2448 | PHP | conel/conel-website | /matrix_engine/modules/clients/functions/import.php | UTF-8 | 15,170 | 2.640625 | 3 | [] | no_license | <?php
## =======================================================================
## dbobject_importTest
## =======================================================================
## handles the importing of dbojects from a csv file
##
## =======================================================... | true |
068b067dc6f3ee25692d6006ec57e2101acd2c39 | PHP | trusfin/aws-cognito | /src/Auth/RegistersUsers.php | UTF-8 | 4,259 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of AWS Cognito Auth solution.
*
* (c) EllaiSys <support@ellaisys.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Ellaisys\Cognito\Auth;
use Illuminate\Http\JsonResponse;
use Illuminate... | true |
f9f43dfc096cd197727d31063d5d56266ff9f3ac | PHP | joelgriffith/Very-Basic-Blog | /inc/images.inc.php | UTF-8 | 6,406 | 3.390625 | 3 | [] | no_license | <?php
class ImageHandler
{
// The saved images folder:
public $save_dir;
public $max_dims;
// Set the $save_dir and image dimensions once initialized:
public function __construct($save_dir, $max_dims = array(350, 240))
{
$this->save_dir = $save_dir;
$this->max_dims = $max_dims;
}
/**
*
* Resizes/resam... | true |
dca261f240b9e47bced64063f4e9333ec2ad42f6 | PHP | Was7ed/PHP-Foguete | /handling.php | UTF-8 | 388 | 2.828125 | 3 | [] | no_license | <?php
require_once 'foguete.php';
$g = $_GET["gasolina"];
$pil = $_GET["piloto"];
$pass = $_GET["passageiros"];
$foguete = new Foguete;
$gas = $foguete->gas($g);
$piloto = $foguete->piloto($pil);
$passageiros = $foguete->passageiros($pass);
echo $gas. "<br>";
echo $piloto. "<br>";
echo $passageiros.... | true |
7d2086cbd86a793bb65742e4cb2ca421932af990 | PHP | akashsrivastava-php/React-Laravel-Tutorial | /app/Http/Controllers/WsController.php | UTF-8 | 3,649 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\ws;
use Illuminate\Http\Request;
use validator;
use Hash;
class WsController extends Controller
{
public function login(Request $req){
$this->validate($req, [
'email' => 'required|email|exists:users,email',
'pass' => 'required',
... | true |
f8f92896f141c5ef9e4326cd858d2c874f6840c9 | PHP | mk813/problems | /sumOfNums.php | UTF-8 | 1,040 | 3.78125 | 4 | [] | no_license | <?php
// get sum of num elements
$num = 123;
$arr = array_map('intval', str_split($num));
echo array_sum($arr)."<br>";
// get num of repeated values
$lol = 4564565;
$target = 4;
$asd = array_map('intval', str_split($lol));
$rep = array_count_values($asd);
echo $rep[$target]."<br>";
$lol = ... | true |
01f4b8a1d2b6d7de2676ba24b53825457781bb3d | PHP | maxh213/RevisionGuide | /submit.php | UTF-8 | 978 | 3.046875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Revision</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<?php
$word=$_GET["word"];
$word='"'.$word.'"';
$definition=$_GET["definition"];
$definition='"'.$definition.'"';
try {
#Trys to connect to the database and if unable throws an error message
... | true |
29465b9d62807334538c63a47ba9d82a7728c166 | PHP | mariuskin/laravel-ex | /database/seeds/UsersTableSeeder.php | UTF-8 | 1,301 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = Faker::create();
for($i = 0; $i < 20; $i++){
DB::table('users')->insert... | true |
65a66182208af4b9619601b3df14826029e2b6d5 | PHP | arifptm/indor | /app/Http/Controllers/Auth/RegisterController.php | UTF-8 | 2,271 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Auth\Events\Registered;
use Illuminate\Http\Request;
use App\Jobs\SendRegisterVerificationEmail;
class RegisterControl... | true |
17d8d950c6200410d76fcc1a495aab55c3f28fb0 | PHP | Adms1/php | /flinnt/database/migrations/2018_10_23_062112_create_str_book_description_table.php | UTF-8 | 741 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateStrBookDescriptionTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('book_description', function(Blueprint $table)
{
$table->bigInteg... | true |
3ee63c0e686854fd5886bfecfda76a335be131b1 | PHP | k-ichikawa/portfolio | /app/Http/Controllers/ContactController.php | UTF-8 | 1,686 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Requests\SendMessageRequest;
use App\Mail\ContactNotification;
use App\Repositories\InquiryRepository;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
cl... | true |
8cc9df92f673f2c3bcb26d5e8d4e3f6f0eceedb0 | PHP | dmtr81/internetco-backend-assessment | /tests/Functional/Domain/Forum/Command/Post/PostMessageToThreadValidationTest.php | UTF-8 | 2,991 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Tests\Functional\Domain\Forum\Command\Post;
use App\DataFixtures\Forum\TestThreadWithAPostFixture;
use App\Domain\Forum\Command\Post\PostMessageToThreadCommand;
use App\Domain\Forum\Entity\Thread;
use App\Tests\Functional\FunctionalTestCase;
use App\Tests\Functional\ViolationAssertTrait;
use Symfo... | true |
f62d9da0b9d4603500ad1aaeb413cbbcdebc068d | PHP | ThatsARapp/switched_registrar | /tests/StudentTest.php | UTF-8 | 6,595 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
require_once "src/Course.php";
require_once "src/Student.php";
$server = 'mysql:host=localhost;dbname=registrar';
$username = 'root';
$password = 'root';
$DB = new PDO ($server, $username, $password);
... | true |
4b37a2f885d391c8f5a52767d4335696e707c165 | PHP | RestumpY/Yannis-Candys | /Connexion.php | UTF-8 | 3,840 | 2.65625 | 3 | [] | no_license | <?php
session_start();
// Connexion à la BDD
require "Fonction.php";
$bdd=connect();
if(isset($_POST['formconnexion'])){
$pseudoconnect = htmlspecialchars($_POST['pseudoconnect']); # Le " htmlspecialchars " permet d'éviter les injections de code à notre code
$mdpconnect = sha1($_POST['mdpconnect']... | true |
b6b631c9eb6bc6de4611ed5195de67af5cbd68a3 | PHP | sekarpov/phone-book | /app/Models/Contact.php | UTF-8 | 1,184 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property int $user_id
* @property string $name
* @property string $phone
* @property Carbon $created_... | true |
5bd620d47abadd6851ddbb894ee75a3f010d17ce | PHP | Dishan765/DodoAirline | /signup.php | UTF-8 | 7,016 | 2.75 | 3 | [] | no_license | <?php
session_start();
$error_msg = "";
$FnameErr = $LnameErr = $emailErr = $passwordErr = "";
$firstName = $lastName = $gender = $email = $pass = "";
$emailExist = false;
if (isset($_POST['register'])) {
//Retrieve the field values from our registrati... | true |
13d1cea9216d9824a69d546a7748393f37a89355 | PHP | dsanogo/questionnaires | /app/Providers/AppServiceProvider.php | UTF-8 | 852 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Providers;
use App\Billing\BankPaymentGateway;
use App\Billing\CreditPaymentGateway;
use App\Billing\PaymentGatewayInterface;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
... | true |
f5a8f741b8fbaea811c83e7d51d2d304db4c2d22 | PHP | kjagannathreddy/php | /arraypop.php | UTF-8 | 63 | 2.515625 | 3 | [] | no_license | <?php
$ar=array(10,20,50);
array_pop($ar);
print_r($ar);
?> | true |
6e1d4714724eb0817c68f647f48b523154031845 | PHP | 3dwebart/dev.3dwebart | /test/Thumbnail-class/sample.php | UTF-8 | 1,774 | 2.671875 | 3 | [] | no_license | <?php
require_once 'Thumbnail.class.php';
$watermark = new ThumbnailWatermark;
$sourcefiles = Array(
'sample_1.jpg',
'sample_2.jpg'
);
Thumbnail::setOption('debug', true);
for ($L1 = 0; $L1 < count($sourcefiles); $L1++)
{
// case 1
// 크기를 120x120 으로 설정하고 크기 안에 이미지가 모두 보이도록 설정
// 워터마크는 사용안함
Thumbnail::create... | true |
82cc01dcd2eb0279ce43f7d11c7262b951f4c4a1 | PHP | StephHoel/Steph-Hoel | /testando/inc/libs/clearbricks/mail/class.mail.php | UTF-8 | 2,537 | 3.046875 | 3 | [] | no_license | <?php
# -- BEGIN LICENSE BLOCK ---------------------------------------
#
# This file is part of Clearbricks.
#
# Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE B... | true |
923e5f61d21299487e8cf853bcbb44a05baab61b | PHP | samkim91/Valkyrie | /PHP/Login/requestSignup.php | UTF-8 | 319 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
require('../dbconn.php');
$id = $_POST['id'];
$pwd = $_POST['pwd'];
$name = $_POST['name'];
$sql = "INSERT INTO users (uid, upwd, uname) VALUES ('$id', '$pwd', '$name')";
if($conn -> query($sql) === TRUE ){
echo "ok";
}else{
echo "error: ". $sql . "<br>" . $conn->error;
}
$conn -> close();
?>
| true |
488e097e378cfbebc1c66842d5044a2e0971d888 | PHP | DigicreateJens/deployer | /test/src/DeployerTest.php | UTF-8 | 2,768 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/* (c) Anton Medvedev <anton@medv.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Deployer;
use Deployer\Collection\CollectionInterface;
use Deployer\Console\Application;
use PHPUnit\Framework\TestCase;
use Symfo... | true |
e10027f4b9e0dfe463e9d5ac87aee5ddd89a14e7 | PHP | gpslab/interval | /src/IPv4Network/IPv4Network.php | UTF-8 | 4,692 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* GpsLab component.
*
* @author Peter Gribanov <info@peter-gribanov.ru>
* @copyright Copyright (c) 2016, Peter Gribanov
* @license http://opensource.org/licenses/MIT
*/
namespace GpsLab\Component\Interval\IPv4Network;
use GpsLab\Component\Interval\Exception\InvalidIntervalFormatException;
use Gp... | true |
a3d6c7a420782cb0f208673edfb32f7689997c24 | PHP | junsuwhy/iamtrying | /Get_json/ttt.php | UTF-8 | 7,068 | 3.140625 | 3 | [] | no_license | <?php
//$a = array(1=>"foo", 2=>"bar", 3=>"baz", 4=>"blong");
//echo json_encode($a).'<br>';
class csa{
public $count=0;
public $sum=0;
public $avg=0;
}
//自訂函式
function mylog($a){
echo "<br>";
echo "日誌 : \$s=$a";
echo " type=".gettype($a).",print_r($a) : ";
print_r($a);
}
function StrToArray($str)... | true |
1c71006b5d95a7a9a0db0304c4ac5ff59ab7419f | PHP | aneeshikmat/2nees-design-pattern-tutorial-example | /creational-builder-3.php | UTF-8 | 2,627 | 3.453125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This is Builder interface
* 2nees.com
*/
interface SQLQueryBuilder
{
public function select(string $table, array $fields): SQLQueryBuilder;
public function insert(string $table, array $fields): SQLQueryBuilder;
public function where(string $where): SQLQueryBuilder;
public function lim... | true |
2d5136cd393173fc9ef87a35a508310b9f8d62e2 | PHP | iambstha/mechanics-finder | /includes/userlogin.inc.php | UTF-8 | 1,124 | 2.578125 | 3 | [] | no_license | <?php
session_start();
if (isset($_POST['login'])) {
require 'dbh.inc.php';
$userl = mysqli_real_escape_string($conn, $_POST['userid']);
$password = mysqli_real_escape_string($conn, $_POST['password']);
$sql = "SELECT * FROM users WHERE email='$userl' OR username='$userl';";
$result =... | true |
ff11c9d17bb4ab3f5f564f69d5578a4600d93c26 | PHP | antonioturdo/italia-bundle | /src/Constraints/CAPValidator.php | UTF-8 | 1,053 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace AntonioTurdo\Bundle\ItaliaBundle\Constraints;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
/**
* Description of CAPValidator
*
* @author Antonio Turdo <antonio.turdo@gmail.com>
*/
class CAPValidator extends ConstraintValidator
{
private $ca... | true |
f4b701d152373bf88a140438573b2745e0856754 | PHP | danicamisic/praxa | /praksa-plugin.php | UTF-8 | 2,095 | 2.8125 | 3 | [] | no_license | <?php
/*
Plugin Name: Praksa Plugin
Description: (1) Protected Content - Shortcode that displays the content to logged-in users only
(2) Reverse - Shortcode that displays the content in reverse order
(3) Weather - Shortcode that dispalys weather information for a given location
Version: 1.0
Author: Lazar ... | true |
befdd1c96105d64a6ea2a046f03a47984d84b49b | PHP | Paulo33603/TCC-Mika-Bolos | /model/conexao.php | UTF-8 | 444 | 2.71875 | 3 | [] | no_license | <?php
class Conexao
{
function Conectar()
{
$endereco_servidor = "localhost";
$usuario_servidor = "root";
$senha_servidor = "";
$porta_mysql = "3306";
$nome_BD = "bdadmnoticias";
//PDO - PHP Data Objects é uma classe para trabalhar com procedimentos relacionados a banco de dados
$con = new PDO("mysql... | true |
0af1dbd8ee935802d2dcad142b152bd76860038b | PHP | slywalker/demo20110827 | /resized_vs_sampled.php | UTF-8 | 2,343 | 2.84375 | 3 | [] | no_license | <?php
$srcImg = 'sample.jpg';
$resized = false;
if (!empty($_POST)) {
$params = $_POST;
array_walk($params, function(&$value, $key) {
$value = (int) $value;
});
$dstW = $params['dstW'];
$dstH = $params['dstH'];
$srcR = imagecreatefromjpeg($srcImg);
$resizedR = imagecreatetruecolor($dstW, $dstH);
imagecopyre... | true |
8c9629e66dbe9b4612b3d7f65343f862ccb5777a | PHP | AkatsukiKei/datum | /php/demo/Demo2-5/Demo2-5-6.php | UTF-8 | 141 | 3.328125 | 3 | [] | no_license | <?php
$students = array('王多多', '李多多', '张少少');
for ($i=0; $i < count($students); $i++) {
echo $students[$i] . '<br />';
} | true |
f24045a3c5a20b7a94b6824d5b31b31629fa1e31 | PHP | m0o0m/game.fjbdsh.com | /simplewind/Core/Library/Think/Upload/Driver/Aliyun/src/Aliyun/Common/Communication/Command.php | UTF-8 | 2,054 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Aliyun\Common\Communication;
use Aliyun\Common\Exceptions\ClientException;
use Aliyun\Common\Exceptions\ServiceException;
abstract class Command
{
protected $service;
protected $name;
public function __construct($name)
{
$this->name = $name;
}
public function getName()
{
return $this->nam... | true |
eb0a5c7cb1431ab21af3f71a72418b651b930bed | PHP | funkygao/fungame | /main/classes/Driver/Db/Mysql/ShardLookup.php | UTF-8 | 1,268 | 2.703125 | 3 | [] | no_license | <?php
namespace Driver\Db\Mysql;
final class ShardLookup
implements \Consts\DbConst {
private $table;
private function __construct($table) {
$this->table = $table;
}
/**
* @param string $table
* @return ShardLookup
*/
public static function factory($table) {
s... | true |
d482a95c67b48bfccd4397d9379723d20b4513fc | PHP | G-Adrien/atelier_objet | /exercices/exercice_5/clio.php | UTF-8 | 1,150 | 3.5 | 4 | [] | no_license | <?php
class Clio{
//propriété de l'objet
protected int $nbDoor;
protected string $color;
private static $price = 15000;
const FIVEDOORS = 5;
const THREEDOORS = 3;
const colors = [
"red"=>10215455,
"green"=>131533541,
"purple"=>76513684,
"yellow... | true |
a09b6dcddf28b67a90ed46f760c0a425f5428c00 | PHP | dsvlivon/Programacion-3 | /Clase04/Ejercicio23.php | UTF-8 | 1,083 | 2.90625 | 3 | [] | no_license | <?php
// Aplicación No 23 (Registro JSON)
// Archivo: registro.php
// método:POST
// Recibe los datos del usuario(nombre, clave,mail )por POST ,
// crea un ID autoincremental(emulado, puede ser un random de 1 a 10.000).
// crear un dato con la fecha de registro , toma todos los datos y utilizar sus métodos para
// pode... | true |
552fc3f8f744418b33d1146d46455181d9ae0303 | PHP | asif250/login-system | /login_system/functions.php | UTF-8 | 2,458 | 2.953125 | 3 | [] | no_license | <?php
include "database.php";
class procedure extends DB{
public function setName($name){
$this->name=$name;
}
public function setUser($username){
$this->username=$username;
}
... | true |
08dd5792786140897281875a69f235f260128a99 | PHP | ionutmilica/my-archive | /phpData/src/Container.php | UTF-8 | 4,232 | 3.59375 | 4 | [
"MIT"
] | permissive | <?php
namespace PHPData;
class Container implements \ArrayAccess, \Countable, \SeekableIterator {
/**
* The container storage. Holds all the values
* @var array
*/
protected $data = array();
/**
* The container size
* @var integer
*/
protected $size = 0;
/**
... | true |
7eaf8fe6081c67bf65f0b0a07b1f189d415f246f | PHP | guoyu07/koa-1 | /src/YarServer/Yar.php | UTF-8 | 1,840 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* from https://github.com/stcer/syar.git
* thx
*/
namespace FSth\Koa\YarServer;
class Yar
{
public $headerRaw;
/**
* @var array
* type Header struct {
* Id uint32
* Version uint16
* MagicNum uint32
* Reserved uint32
* Provider [32]byte
* Token [32]... | true |
d199ff886c3374f870d529f128354b33624c58fb | PHP | digitalpulp/starterkit-dp-pattern-lab | /dist/generator/generate_json_pattern_lab.php | UTF-8 | 826 | 2.65625 | 3 | [] | no_license | <?php
function pattern_json_filename($pattern_definition) {
$pattern_json_filename = NULL;
$pattern_name = $pattern_definition['name'];
$pattern_directory = pattern_directory($pattern_definition);
$pattern_json_filename = $pattern_directory . '/' . $pattern_name . '.json';
return $pattern_json_filename;
... | true |
7a07608a8ce5f0e041f8c701f9238591222e0307 | PHP | themoscode/bookingSystem | /admin/php/submitnewstation.php | UTF-8 | 977 | 2.5625 | 3 | [] | no_license | <?php
require ('db.php');
$ergebnis = array(
"message" => "",
"result" => ""
);
$searchArr['name'] = trim($_POST['name']);
$searchArr['cityID'] = $_POST['cityID'];
$sql = 'SELECT name FROM station WHERE name=:name AND cityID=:cityID';
$PDOStatement = $myPDO->prepare($sql);
$PDOStatement->execute($searchArr);
$PD... | true |
64d0c4e64f091144ee8b4694522be1a9ace31862 | PHP | kabirbaidhya/Inspector | /src/Analysis/Checker/CheckerInterface.php | UTF-8 | 465 | 2.6875 | 3 | [] | no_license | <?php
namespace Inspector\Analysis\Checker;
use PhpParser\Node;
use Inspector\Application\Exception\Exception;
use Inspector\Analysis\Exception\AnalysisException;
interface CheckerInterface
{
/**
* Checks to make sure the classes, methods, and functions are up to the standards
* and don't use bad prac... | true |
02d3238cb82b5ca85d5cfd93b2dfe086dc73d61b | PHP | rbrouwer/dewin | /application/tests/Recipe.php | UTF-8 | 3,136 | 2.671875 | 3 | [] | no_license | <?php
class Test_Recipe {
public function pack() {
echo 'Testing Model Recipe:' . PHP_EOL;
$oldConfig = Zend_Registry::get('config');
$config = new Zend_Config(array('directories' => array('buildscript' => APPLICATION_PATH.'/tests/files/buildscripts/')));
Zend_Registry::set('config', $config);
$this->const... | true |
9a9daaa3eee9f5f74e7fed8d3a6b6780bda953e5 | PHP | Frediispkttt/pw_tubes_203040076 | /pw_tubes_203040076/index.php | UTF-8 | 2,123 | 2.734375 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION['login'])) {
header("Location: login.php");
exit;
}
require 'functions.php';
$motor = query("SELECT * FROM motor");
// ketika tombol cari diklik
if (isset($_POST['cari'])) {
$motor = cari($_POST['keyword']);
}
?>
<!DOCTYPE html>
<html lang="en"... | true |
8f7d4d91b3971059948b23709a302a6ed0998650 | PHP | rethinkphp/haproxy-router | /src/migrations/2017_08_05_154814_create_challenges_table.php | UTF-8 | 976 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateChallengesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
capsule_schema()->create('challenges', function (Blueprint $table) ... | true |
7821a1f52714e78d49934f8dfd332ba9e7b19eaa | PHP | kadmProjects/laravel_app_02 | /app/Http/Controllers/TownController.php | UTF-8 | 2,427 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Town;
use Illuminate\Http\Request;
class TownController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$towns = Town::all();
return view('to... | true |
154a615ef80c6368d3075ad6b011642895659d13 | PHP | mgrshn/php-project-lvl1 | /src/Engine.php | UTF-8 | 1,092 | 3.3125 | 3 | [] | no_license | <?php
namespace Brain\Games\Engine;
use function cli\line;
use function cli\prompt;
function greeting(): string
{
line('Welcome to the Brain Games!');
$name = prompt('May I have your name?');
line('Hello, %s!', $name);
return $name;
}
function askQuestion(string $question): void
{
line("Question... | true |
8aafdc016861b6b87ffb54e09ae760f3ded57fef | PHP | r4free/ceres | /src/Ceres/Route.php | UTF-8 | 1,959 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Rafa
* Date: 18/05/2017
* Time: 12:44
*/
namespace Ceres;
use Ceres\Helpers;
class Route
{
public $config;
public function __construct($config)
{
$this->config = $config;
$this->run();
}
public function getUrl()
{
retur... | true |
05f7d3959fa5eea6c679828086e86c0b16384e96 | PHP | 877933/job | /classes/widgets/class_opening_hours.php | UTF-8 | 21,016 | 2.765625 | 3 | [] | no_license | <?php
/**
* @ Contact info widget Class
*
*
*/
if(!class_exists('jobcareer_opening_hours')){
class jobcareer_opening_hours extends WP_Widget {
/**
* Outputs the content of the widget
*
* @param array $args
* @param array $instance
*/
/**
* @init Contact Info Module
... | true |
2a2afb86ccf457528882b581d3df604b3a98a9e1 | PHP | asleep-in-the-deep/task-calendar | /classes/Day.php | UTF-8 | 506 | 2.828125 | 3 | [] | no_license | <?php
class Day extends DatabaseModel {
public function __construct($data) {
$this->data = $data;
parent::__construct();
}
public static function getTableName() {
return "days";
}
public static function getFields() {
return ["date" => "primary|date|not_null",
... | true |
f3658a09a887ccd68b46c7b42121272a47bd1a20 | PHP | matthieuleorat/bankAccount | /tests/BankStatementParser/Model/HomeLoanTest.php | UTF-8 | 1,230 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace App\Tests\BankStatementParser\Model;
use BankStatementParser\Model\HomeLoan;
use PHPUnit\Framework\TestCase;
class HomeLoanTest extends TestCase
{
const MODEL_1 = "ECHEANCE PRET N°817104468917".
"\nCAPITAL AMORTI : 870,28".
"\nINTERETS : 174,67".
"\nASSURANCE ... | true |
69fddde0b72a9602119261dbb7c7254940750d7a | PHP | fossabot/laravel-query-builder | /src/Concerns/WithFilters.php | UTF-8 | 1,450 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Zing\QueryBuilder\Concerns;
use Zing\QueryBuilder\Filter;
trait WithFilters
{
protected $filters;
public function enableFilters($filters)
{
$filters = is_array($filters) ? $filters : func_get_args();
$this->filters = $this->formatFilters($filters... | true |
2062e934ee3691f206059cf7336f5bcb1d32f023 | PHP | SusieWitch/dz5 | /app/Http/Controllers/UsersController.php | UTF-8 | 1,205 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Susie Witch
* Date: 21.07.2017
* Time: 20:44
*/
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
class UsersController extends Controller
{
public function getAllUsers() {
if (session('role') === 'admin'){
... | true |
fe2ccb283512dbdaf9bce5c34213601c1dcdaf90 | PHP | azizahmed45/courseManagementSystemLaravel | /database/migrations/2020_12_28_064308_create_attendances_table.php | UTF-8 | 1,032 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAttendancesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('attendances... | true |
2ff15e4743831ce9b47e9897f11903add7b6f517 | PHP | start-code-dev/startcode.dev.commando | /src/Value.php | UTF-8 | 941 | 3.125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Startcode\Commando;
class Value
{
private array $options;
private array $optionValues;
private array $values;
public function __construct(array $options, array $optionValues)
{
$this->options = $options;
$this->optionValues = $optionValues;
$this->val... | true |
c2eb0c236f1c894116ade19af5a5cf00fd2ac1ae | PHP | ChildrenOfTek/Project | /EHS/src/UserBundle/Entity/User.php | UTF-8 | 12,814 | 2.625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace UserBundle\Entity;
use \Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\Role\RoleInterface;
use Doctrine\Commo... | true |
1b84869e8bdf7bb6f48d6c157272dd8196429ba4 | PHP | bet0x/piwik-chat | /ChatTracker.php | UTF-8 | 4,372 | 2.59375 | 3 | [] | no_license | <?php
/**
* Piwik - Open source web analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
* @category Piwik_Plugins
* @package Chat
*/
namespace Piwik\Plugins\Chat;
use Piwik\Common;
use Piwik\Piwik;
use Piwik\Tracker;
use Piwik\Tracker\Request;
class ChatT... | true |
d0dc03297898a35cb25d669f252a93cdb64be296 | PHP | has-well/php-sdk-v2 | /lib/Exception/MainException.php | UTF-8 | 1,029 | 3.03125 | 3 | [] | no_license | <?php
namespace Cloudipsp\Exception;
use Exception;
abstract class MainException extends Exception
{
private $fondyCode;
private $httpBody;
private $json;
private $requestId;
public function __construct(
$message,
$httpStatus = null,
$json = null
)
{
$this-... | true |
d293b286766eb223454e76cf2bd4b7e61ac929a6 | PHP | funeralzone/valueobject-generator | /src/Definitions/Models/ModelNamespaceFactory.php | UTF-8 | 337 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Funeralzone\ValueObjectGenerator\Definitions\Models;
final class ModelNamespaceFactory
{
public function makeFromString(string $path): ModelNamespace
{
$elements = explode('\\', $path);
return new ModelNamespace(
$elements,
[]
... | true |
9a7d8b56170af5c8bd10c81174570a420c13d04d | PHP | NicolasKvat/Exercices-PHP-partie2 | /exercice-4-p2-php/index.php | UTF-8 | 2,459 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
... | true |
29152d1694282bfd847148b6878fcf80470e6db4 | PHP | oaugustus/wow | /backend/system/application/models/UserTable.php | UTF-8 | 1,069 | 2.8125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* UserTable
*
* This class has been auto-generated by the Doctrine ORM Framework
*/
class UserTable extends Doctrine_Table
{
/**
* Returns an instance of this class.
*
* @return object UserTable
*/
public static function getInstance()
{
return Doctrine_Core::g... | true |
a3ce85434a1497252c4ffb2c124b00c81dca14f5 | PHP | cyberspectrum/php-transifex | /src/ApiClient/Generated/Model/PostTmxAsyncUploadsRequestBodyDataRelationships.php | UTF-8 | 1,737 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* NOTE: This file is auto generated.
*
* DO NOT EDIT MANUALLY.
*/
namespace CyberSpectrum\PhpTransifex\ApiClient\Generated\Model;
class PostTmxAsyncUploadsRequestBodyDataRelationships
{
/**
* @var array<string, bool>
*/
protected array $initialized = [];
/... | true |