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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
18d5d9bf347c7836d842e05744b970dd8197f0f3 | PHP | SRMNsol/srmtest | /src/App/Console/PopshopsMerchantIdCommand.php | UTF-8 | 1,135 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Console;
use Knp\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\DomCrawler\Crawler;
class PopshopsM... | true |
63b03a01366d930257c4aac21df7a983dea6a537 | PHP | 1Rico/candy-land | /app/Http/Controllers/User/MeasurementController.php | UTF-8 | 2,927 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\User;
use App\Models\Measurement;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Models;
use Auth;
class MeasurementController extends Controller
{
public function getMeasurements()
{
$user = Auth::guard('web')->User();
// ... | true |
2ebb20afdbcf45a21e50ed72280c3bafec659578 | PHP | ohugonnot/arcalib | /src/AppBundle/Entity/Patient.php | UTF-8 | 11,396 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Entity;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* Patient
*
* @ORM\Table(name="patient")
* @UniqueEntity(
* fields... | true |
917597e683c533585e952753dde8e7d86f4f144e | PHP | mirodietiker/d8modulestatus | /parse_results.php | UTF-8 | 2,748 | 2.609375 | 3 | [] | no_license | <?php
require_once 'vendor/autoload.php';
$loader = new Twig_Loader_Filesystem('templates');
$twig = new Twig_Environment($loader);
$projects = parse_results('results');
if (is_dir('results-old')) {
$projects_old = parse_results('results-old');
}
foreach ($projects as $name => &$project) {
if (!isset($projects_... | true |
9659906b4051bc36b3c20153d390179790157528 | PHP | ryansanjaya3434/transisiphpdasar | /encrypt.php | UTF-8 | 780 | 2.953125 | 3 | [] | no_license | <html>
<head>
<title>Test PT. Transisi</title>
</head>
<body>
<br />
<?php
function huruf($input){
$huruf = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
$input = strtoupper($input);
$arr_input = str_split($inpu... | true |
2c010cdf3474b8e780231d0dd24b6e9fc09be682 | PHP | rudegent/rudegent.github.io | /plugins/spot/shipment/updates/builder_table_create_spot_shipment_status.php | UTF-8 | 653 | 2.609375 | 3 | [] | no_license | <?php namespace Spot\Shipment\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableCreateSpotShipmentStatus extends Migration
{
public function up()
{
Schema::create('spot_shipment_status', function($table)
{
$table->engine = 'InnoDB';
$ta... | true |
1c7da99936b03d57aaef8fca934078b777960604 | PHP | aternosorg/sherlock | /src/ObfuscatedString.php | UTF-8 | 1,942 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Aternos\Sherlock;
use Aternos\Sherlock\Maps\ObfuscationMap;
class ObfuscatedString
{
protected ?string $deobfuscatedContent = null;
public function __construct(protected string $content, protected ObfuscationMap $obfuscationMap)
{
}
/**
* @return string
*/
public f... | true |
7f19e0596e24a182f839359202e03751902edf49 | PHP | claudiulodro/hello-death | /hello.php | UTF-8 | 825 | 2.578125 | 3 | [] | no_license | <?php
/**
* @package Hello_Death
* @version 1.0
*/
/*
Plugin Name: Hello Death
Plugin URI:
Description: The Bhutanese say think about death 5 times a day and you will be happy. Now you can do that while managing your WordPress site.
Author: Matt Mullenweg, Claudiu Lodromanean
Version: 1.0
*/
function hello_death()... | true |
6d680978ea1de67ef1057681b70ef6cc08f8dcc1 | PHP | kuteteen/moyizhuang-7.23 | /lianxi/laravel-vue-zd-master/app/Excels/Facades/ExcelAbstract.php | UTF-8 | 1,946 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Excels\Facades;
use App\Excels\Exceptions\ExcelsException;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithMapping;
use Maatwebsite\Excel\Concerns\WithHeadings;
use luffyzhao\laravelTools\Repositories\Facades\RepositoryIn... | true |
99342f12e52b0b00dafb56d27d4f89d4de3fd967 | PHP | baozongzi/test | /application/api/controller/Token.php | UTF-8 | 2,633 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\api\controller;
use app\extra\zgysbase\JWT;
use think\Controller;
class Token extends Controller
{
public static $key = "";
/**
* 创建token
* @param $account 账户
* @param $type 账户类型
* @return \think\response\Json
*/
public function create($ac... | true |
3f6bdb6637874728f87f3a1cf99b9fc1072b63f4 | PHP | MaximKorzhov/Search_and_analysis | /cacheInfo.php | UTF-8 | 521 | 2.96875 | 3 | [] | no_license | <?php
class cacheData
{
public function writeToCache($filePaths, $pathToCache)
{
foreach ($filePaths as $filePath)
{
$resultSearch = $filePath."\n";
// $arrayString = implode("", $resultSearch);
file_put_contents($pathToCache, $resultSearch, FILE_A... | true |
edfa3953e6c31c12cb469bd7c96374e298d0134f | PHP | iDOVICSA/school_manager | /controller/eleve_controller.php | UTF-8 | 1,044 | 2.5625 | 3 | [] | no_license | <?php
require_once('./model/eleve_model.php') ;
require_once('./view/eleve_view.php') ;
class eleve_controller {
public function get_eleve_infos_controller($eleve_id)
{
$mtf = new eleve_model() ;
return $mtf->get_eleve_infos_model($eleve_id) ;
}
public function get_eleve_notes_cont... | true |
8d19bc87fbacc717d8a56dadef81c1f0995549fd | PHP | vanbrabantf/php-news | /src/Service/UnPublishedBlogPostsService.php | UTF-8 | 628 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Domain\Blog\Author;
use App\Domain\Blog\Post;
use App\Entity\BlogPost;
use App\Repository\BlogPostRepository;
class UnPublishedBlogPostsService
{
/**
* @var BlogPostRepository
*/
private $repository;
/**
* UnPublishedBlogPostsService constructor.
... | true |
d08c98fc8cc4d3b8404cb755b4c1cd8efdc7ace0 | PHP | kozlovsv/onlinetest | /helpers/TestTaskHtmlHelper.php | UTF-8 | 1,480 | 2.546875 | 3 | [] | no_license | <?php
namespace app\helpers;
use app\models\TestTask;
use Exception;
use yii\bootstrap\Progress;
class TestTaskHtmlHelper
{
/**
* @param int $grade
* @return string
*/
public static function getGradeColor($grade)
{
switch ($grade) {
case 5:
return 'suc... | true |
cbe89dc98bb9805910fa00dc02fe52ad4ffe4c44 | PHP | ilestis/currency | /app/Http/Controllers/RateController.php | UTF-8 | 1,465 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Currency;
use App\Models\ExchangeRate;
use Illuminate\Http\Request;
/**
* Class RateController
* @package App\Http\Controllers
*/
class RateController extends Controller
{
/**
* Save a new exchange rate
*
* @param Request $request
* @ret... | true |
b86829eaca775869063c8e77aaab6c2c30912f4e | PHP | FondosAFP/website | /src/Shell/UpdateUuidShell.php | UTF-8 | 803 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Shell;
use Cake\Console\Shell;
use Cake\Log\Log;
/**
* Importar shell command.
*/
class UpdateUuidShell extends Shell
{
public function main()
{
ini_set('max_execution_time', 0);
$this->loadModel('Users');
$this->out("Starting update");
$users =... | true |
a5de6da97709c97ea227a84901e7f8a485fe3c1c | PHP | danielbradley/PageCentric | /libpagecentric/source/php/pagecentric.files.page/DownloadPage.php | UTF-8 | 937 | 2.6875 | 3 | [] | no_license | <?php
// Copyright (c) 2012 Daniel Robert Bradley. All rights reserved.
?>
<?php
class DownloadPage extends Page
{
function __construct()
{
parent::__construct();
$sid = $this->getRequest( "sid" );
$token = $this->getRequest( "token" );
if ( $token )
{
$file = FilesController::retrieve( $sid, $toke... | true |
849d2d2f038e4634bfe5d3d80d46b545593d98d4 | PHP | tassoevan/prototype | /tests/PrototypeTest.php | UTF-8 | 4,658 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
use TassoEvan\Prototype\Prototype;
class PrototypeTest extends PHPUnit_Framework_TestCase
{
private function _expectException($exceptionClass, \Closure $test) {
$ok = false;
try {
$test($this);
$ok = true;
}
catch ( Exception $e ) {
if ( !is_a($e, $exceptionClass) )
$this->fail("The expecte... | true |
e72d877fb916952ca6769427770cd16dca8430ef | PHP | haa1010/Web-Programming | /week6/add_biz.php | UTF-8 | 7,075 | 2.75 | 3 | [] | no_license | <?php
$insert = 0;
$name = null;
$addr = null;
$tel = null;
$url = null;
$city = null;
function fetch_data($connect, $mydb)
{
$SQLcmd = "Select * from Categories";
mysqli_select_db($connect, $mydb);
$results_id = mysqli_query($connect, $SQLcmd);
if ($results_id) {
while ($row = mysqli_fetch_r... | true |
5a88f26d208fbe7284043d2fe51cc00c18054aa0 | PHP | ashpjin/LeafingOut-Manual-Classifier | /db_accessor.php | UTF-8 | 5,556 | 3.21875 | 3 | [] | no_license | <?php
class db_accessor{
//connection information
private $database; // twitter
private $username;
private $password;
private $host;
//keep the index
private $index;
// db connection
private $conn;
// open the db connection
public function __construct(... | true |
1dbc90fb9affbf530e30a079ca5e5aec7d8b5480 | PHP | sangatDvikram/transwise-client-app | /system/class/class.Process.php | UTF-8 | 169 | 2.828125 | 3 | [] | no_license | <?php
class ProcessForm
{
static function gettimestamp($time)
{
list($day, $month, $year) = explode('/', $time);
return mktime(0, 0, 0, $month, $day, $year);
}
} | true |
69a32d2b7c1feb11e4f0b8eedaf3ec9c39f0e866 | PHP | jeranders/Jeranders | /admin/pages/ajout_categorie-form.php | UTF-8 | 1,600 | 2.59375 | 3 | [] | no_license | <?php
if (isset($_POST['send'])) {
$c_nom = ucfirst(securisation($_POST['c_nom']));
$c_description = htmlentities($_POST['c_description']);
$c_ref = strtoupper(securisation($_POST['c_ref']));
$c_active = securisation($_POST['c_active']);
$id_membre = (int)$_SESSION['id_membre'];
if ($c_nom != "") {
... | true |
db6739b2fcfe4d06a24545f5b0853be74b054cbf | PHP | stewartlord/chronicle | /sites/all/modules/url/Route.php | UTF-8 | 3,909 | 2.84375 | 3 | [
"MIT",
"BSD-2-Clause"
] | permissive | <?php
/**
* A route that matches/assembles url paths using custom url records.
*
* @copyright 2011 Perforce Software. All rights reserved.
* @license Please see LICENSE.txt in top-level folder of this distribution.
* @version <release>/<patch>
*/
class Url_Route implements Zend_Controller_Router_Route_I... | true |
80234d55c761ba56cdeac3c87968cc788972e50f | PHP | srilindays/PABW-6701193062-Sri-Linda-Yuliana-Sambas--Assesment-3 | /app/Models/MemberModel.php | UTF-8 | 549 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use CodeIgniter\Model;
class MemberModel extends Model
{
protected $table = 'member';
protected $primaryKey = 'id_member';
protected $useTimestamps = true;
protected $allowedFields = ['nama', 'nama_lengkap', 'alamat', 'jenis_kelamin', 'email', 'username', 'no_hp', 'pict'];... | true |
cdb5598018524ca4d50daa2ce591f9a0d4feec15 | PHP | sakib3/bbnmlaravel | /routes/api.php | UTF-8 | 2,184 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServicePr... | true |
a12930990a285c34d86b99b241ee0e130d07e7bf | PHP | sreedharmb/ContactsApp | /php/laravel/app/controllers/ContactNumberController.php | UTF-8 | 1,348 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
class ContactNumberController extends \BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
//
}
/**
* Store a newly cr... | true |
3de03d099ecd1b8a5c17dbef73546a0527b087ea | PHP | mindtrust/lucid | /src/Console/Commands/InitMicroCommand.php | UTF-8 | 1,064 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Lucid\Console\Commands;
use Lucid\Finder;
use Lucid\Filesystem;
use Lucid\Console\Command;
use Lucid\Generators\MicroGenerator;
use Symfony\Component\Console\Command\Command as SymfonyCommand;
class InitMicroCommand extends SymfonyCommand
{
use Finder;
use Command;
use Filesystem;
use... | true |
fbf48dda2fafcb18b9a7704a2421f8ec3d155f11 | PHP | jefferssongalvao/design-patterns-php | /src/Behavioral/Strategy/Taxes/IssTax.php | UTF-8 | 295 | 2.6875 | 3 | [] | no_license | <?php
namespace DesignPattern\Behavioral\Strategy\Taxes;
use DesignPattern\Structural\Composite\Budget;
use DesignPattern\Structural\Decorator\Tax;
class IssTax extends Tax
{
public function taxSpecificCalculation(Budget $budget): float
{
return $budget->value * 0.06;
}
} | true |
44800f454b31462986737a6f52c2df243930c3b4 | PHP | eam9891/eSec | /framework/blog/AdminWriter.php | UTF-8 | 1,874 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Ethan
* Date: 3/4/2017
* Time: 2:46 PM
*/
namespace framework\blog {
use framework\libs\Authenticate;
class AdminWriter implements IBlogWriter {
public function __construct(Article &$obj) {
$auth = new Authenticate("admin");
if ($... | true |
916bf7dbaf1bee556912770c49133f2db74dd2bc | PHP | adehikmatiana/materi-laravel-haltev | /Week3/Day1/code/for_vs_foreach.php | UTF-8 | 337 | 3.609375 | 4 | [] | no_license | <?php
// Array dengan FOR
// $bulan = array("jan", "feb", "mar", "apr", "mei");
// for ($i = 0; $i < 5; $i++) {
// echo "<option value = $bulan[$i] > $bulan[$i] </option>";
// }
// Array dengan FOREACH
$nama = array("tiana", "indra", "dandi", "halim", "febby");
foreach ($nama as $murid) {
echo "$... | true |
343a83d0d6226477d94f31efedcee50f0377648e | PHP | Pierrot727/PHP-OpenClassrooms-CDPM-Dev-Projet-4-Le-Louvre | /src/Manager/DataManager.php | UTF-8 | 990 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Manager;
use App\Repository\DataCarouselRepository;
use App\Repository\DataRepository;
class DataManager
{
private $carousel;
private $dataCarousel;
private $dataRepo;
private $data;
public function __construct(DataCarouselRepository $dataCarouselRepository, D... | true |
99924ebb4e053e77a2d05a901615954ea9ec1fa2 | PHP | cliu74/newchangchang | /app/application/controllers/Welcome.php | UTF-8 | 4,857 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this contro... | true |
4867c64f108e7a6b15dcd5ab529d01376c7da2c2 | PHP | comptech-soft/quizz | /comptech/Navigation/Sidebaritem.php | UTF-8 | 1,416 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Comptech\Navigation;
use Illuminate\Support\Collection;
class Sidebaritem
{
protected $icon = NULL;
protected $caption = NULL;
protected $options = NULL;
protected $component = NULL;
public function __construct()
{
$this->options = new Collection();
}
public function setIcon($icon)
{
... | true |
52c38ef1946c14430876e55db77a13c47ef5cd3a | PHP | fabi47/php | /wa.php | UTF-8 | 244 | 3.796875 | 4 | [] | no_license | <?php
echo "1~10の和\n";
$sum = 0;
for($i = 1; $i < 11; $i++) {
$sum += $i;
}
echo $sum;
/*20〜100までの和*/
echo "\n20~100の和\n";
$sum = 0;
for($i = 20; $i < 101; $i++) {
$sum += $i;
}
echo $sum;
?>
| true |
0dd44c8cf83bbb3f96e8f702fdacfd78f6da7caf | PHP | jaspeee/eChed | /app/Jobs/VerifierApprove.php | UTF-8 | 2,145 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
use App\Complete;
... | true |
a451a0421703d62e8a328382649ed5b143684534 | PHP | lvivduncan/duncan-vitol_to_oc2 | /index.php | UTF-8 | 7,438 | 2.640625 | 3 | [] | no_license | <?php
$start = microtime(true);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Upload and converter</title>
</head>
<body>
<form enctype="multipart/form-data" method="post">
<input type="file" name="fil... | true |
51f5411f8e38ad0f894d6e45901cec9b7b6e069e | PHP | SebWebDevelopment/examPHP | /admin/layouts/admin.php | UTF-8 | 1,129 | 2.5625 | 3 | [] | no_license | <?php
$players=getAllPlayers($bdd);
echo('<div class="mb-2">Il y a actuellement '.count($players).' joueur(s) dans l\'équipe</div>')
?>
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Prénom</th>
<th scope="col">Nom</th>
<th scope="co... | true |
784d88bbf2111666ad069a11ece9551ca1a097ba | PHP | gigatesseract/RT-loc-batcars | /login.php | UTF-8 | 2,021 | 2.640625 | 3 | [] | no_license | <?php
include 'sqlconnect.php';
include 'functions.php';
?>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>dd</title>
</head>
<body>
<form class="login" action= <?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?> method="post">
<label for="type">Log in as:- </lab... | true |
6da6e8ce084699b519ea9c7fb5adabbfebc517a4 | PHP | varunsridharan/action-apigen | /apigen/vendor/andrewsville/php-token-reflection/TokenReflection/ReflectionElement.php | UTF-8 | 8,473 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHP Token Reflection
*
* Version 1.4.0
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this library in the file LICENSE.md.
*
* @author Ondřej Nešpor
* @author Jaroslav Hanslík
*/
namespace TokenReflection;
use TokenReflection\Exception, TokenReflectio... | true |
3fe233ffb9bacd7a7c0f4cc434fae590b1bfd89a | PHP | pavlin-policar/TPO-zdravstveni-is | /features/bootstrap/FeatureContext.php | UTF-8 | 8,416 | 2.78125 | 3 | [] | no_license | <?php
use App\Models\Code;
use App\Models\Postcode;
use App\Models\User;
use Behat\Behat\Context\Context;
use Behat\Behat\Context\SnippetAcceptingContext;
use Behat\MinkExtension\Context\MinkContext;
use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;
use Laracasts\Behat\Context\Services\MailTrap;
use PHPUnit_Fram... | true |
dfd69656766c87d3c26aba38c39a70338b13b2b1 | PHP | BelkinJr/e-commerce-mvc | /app/src/controller/Controller.php | UTF-8 | 468 | 2.6875 | 3 | [] | no_license | <?php
namespace vbelkin\a3\controller;
/**
* Class Controller
*
* @package veblkin/a3
* @author Vitaly Belkin <belkin.jr.nvk@gmail.com>
*/
class Controller
{
/**
* Redirect to another route
*
* @param $route
* @param array $params
*/
public function redirect($route, $params = []... | true |
2049b16ce14abb4e963762cdf4e5703b9453bef1 | PHP | kayzore/smart-php | /src/KAY/Framework/Component/Session/Session.php | UTF-8 | 834 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace KAY\Framework\Component\Session;
class Session
{
/**
* @var array $session
*/
private $session;
public function __construct(array $parameters)
{
session_start();
$session_name = str_replace(' ', '-', strtolower($parameters['project_name']));
if (isset... | true |
030e4546c16f8a70c991689e1bf9bce819d5857b | PHP | amsrafid/asl-simple-web-accounting | /lib/function.php | UTF-8 | 637 | 2.796875 | 3 | [] | no_license | <?php
function route() {
return trim(current(array_keys($_GET)), '/');
}
function url($file = ''){
$root = str_replace("index.php", "", $_SERVER['PHP_SELF']);
return $root.$file;
}
function get_header() {
include 'pages/header.php';
}
function get_footer() {
include 'pages/footer.php';
}
function get_nav() {
i... | true |
acde6dcff80d2599645d87da70fb85a3dc8e684f | PHP | kholoudayman/laravel_nti | /app/Http/Controllers/admin/product/productController.php | UTF-8 | 3,898 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\admin\product;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\traits\generalTrait;
class productController extends Controller
{
use generalTrait;
public function index()
{
$products = DB::table('pro... | true |
92bd22836117542809b09ce21a1bbad0162f8491 | PHP | TDMU/contingent5_statserver | /application/modules/site/controllers/ErrorController.php | UTF-8 | 2,022 | 2.734375 | 3 | [] | no_license | <?php
/**
* ErrorController - The default error controller class
*
* @author
* @version
*/
require_once 'Zend/Controller/Action.php';
class ErrorController extends Zend_Controller_Action
{
/**
* This action handles
* - Application errors
* - Errors in the controller chain arising f... | true |
127774431f087e780b6e383df3709c62da34d095 | PHP | griidc/pelagos | /src/Message/DatasetSubmissionFiler.php | UTF-8 | 729 | 2.9375 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace App\Message;
/**
* The message for dataset submission processing files.
*/
class DatasetSubmissionFiler
{
/**
* The dataset submission ID of the dataset.
*
* @var string
*/
protected $datasetSubmissionId;
/**
* Constructor.
*
* @param int $datasetSubmi... | true |
6cb47d2f1842481d54088960ab05cea9923d9126 | PHP | icelake0/CredApp | /app/Http/Controllers/Api/V1/ExchangeController.php | UTF-8 | 2,762 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api\V1;
use App\Http\Controllers\Controller;
use App\Http\Requests\Api\V1\Exchange\CalculateRepaymentRequest;
use App\Http\Requests\Api\V1\Exchange\SetAlertThresholdRequest;
use App\Http\Requests\Api\V1\Exchange\SetBaseCurrencyRequest;
use App\Http\Responser;
use App\Services\Exch... | true |
b7da1be5e2002176fa6d7814ac1d0f3571907bb5 | PHP | lexand/micro-api-framework | /src/event/Event.php | UTF-8 | 322 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by IntelliJ IDEA.
* User: alex
* Date: 17.07.17
* Time: 18:30
*/
declare(strict_types=1);
namespace microapi\event;
class Event {
private $stopped = false;
public function setStopped(): void { $this->stopped = true; }
public function isStopped(): bool { return $this->stopped; }... | true |
eacf7e8b2269dc3e7438dae0206ddb73070e21e1 | PHP | hngda01/social_network_laravel | /app/Http/Controllers/FriendController.php | UTF-8 | 1,568 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
use App\User;
class FriendController extends Controller
{
public function getIndex() {
$friends = Auth::user()->friends();
$requests = Auth::user()->friendRequests();
return view('friend.index',compact('friends','requests... | true |
de3783ae1b5ba942cca4333e645192475c4d8d21 | PHP | korabspahija/Project_Gr9_ProgramimiNeInternet | /4.PHP/Detyra te zgjedhura/DetyraVleraMaximale3Array.php | UTF-8 | 614 | 3.03125 | 3 | [] | no_license | <?php
$x = array(360,310,310,330,313,375,456,111,256);
$y = array(350,340,356,330,321);
$z = array(630,340,570,635,434,255,298);
$maxX = $x[3];
foreach ($x as $value) {
if($value > $maxX) {
$maxX = $value;
}
}
$maxY = $y[3];
foreach ($y as $value) {
if($value > $maxY) {
$maxY = $value;
}
}
$maxZ = $z[1];
fo... | true |
e4181ccc0b485b3096832c250327cf364dd847ce | PHP | ekyna/Commerce | /Tests/Common/Currency/ArrayExchangeRateProviderTest.php | UTF-8 | 1,897 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Ekyna\Component\Commerce\Tests\Common\Currency;
use Ekyna\Component\Commerce\Common\Currency\ArrayExchangeRateProvider;
use Ekyna\Component\Commerce\Common\Currency\ExchangeRateProviderInterface;
use Ekyna\Component\Commerce\Tests\Fixture;
use PHPUnit\Framework\TestCase;
/**
* Class ArrayExchangeRat... | true |
76c1c69ad6af2781d3ffd0b5edd6cc89fb4404af | PHP | hello-omny/simple-ci | /core/git/CloneAction.php | UTF-8 | 1,167 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace core\git;
use Exception;
/**
* Class CloneAction
* @package core\git
*/
class CloneAction extends AbstractAction
{
private const CLONE_TEMPLATE = 'cd %s && %s clone --mirror %s %s 2>&1';
/** @var array */
public $repository;
/**
* @throws Exception
*/
public functio... | true |
43f652109a41a934ab597d852bacc294b3e258df | PHP | silverorange/blorgy | /conversion/wordpress/Converter.php | UTF-8 | 14,224 | 2.828125 | 3 | [] | no_license | <?php
/**
* Converts a Blörgy blog instance to a Wordpress Extended RSS file
*
* This allows you to export your Blörgy blog to Wordpress.
*
* PHP version 7.1
*
* @package Blörgy
* @copyright 2022 silverorange
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
*/
class Converter
{
c... | true |
05d995ba876dbee5b5af30d266460debb858c10b | PHP | cuongdoan17/Testimonial | /Api/BlogRepositoryInterface.php | UTF-8 | 891 | 2.609375 | 3 | [] | no_license | <?php
namespace AHT\Testimonial\Api;
interface BlogRepositoryInterface
{
/**
* Save Blog
*
* @param AHT\Testimonial\Api\Data\BlogInterface $blog
* @return \AHT\Testimonial\Api\Data\BlogInterface
*/
public function save(\AHT\Testimonial\Api\Data\BlogInterface $blog);
/**
* ge... | true |
f6c5b9a1823a0e414a96e6afd0bd14b31aa5aa2a | PHP | Ryangr0/headfirst-design-patterns-php | /src/DecoratorPattern/Beverages/DarkRoast.php | UTF-8 | 249 | 3.046875 | 3 | [] | no_license | <?php
namespace HeadFirst\DecoratorPattern\Beverages;
class DarkRoast extends Beverage
{
public function __construct()
{
$this->description = 'Dark Roast';
}
public function cost(): float
{
return 2.90;
}
} | true |
058ac90f44474678f450cc7f3b4e1ab625324954 | PHP | jawainc/points | /app/Http/Controllers/Admin/StudentsController.php | UTF-8 | 6,332 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use App\Course;
use App\CourseEnrollment;
use App\Point;
use App\Student;
use App\StudentGroup;
use Carbon\Carbon;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Requests\Student as StudentValidate;
class StudentsController extends Controller... | true |
5d39a736a75399b9ccc76c735eff0b09fe891a68 | PHP | adimiron-tape/netpeak_test | /application/classes/Engine.php | UTF-8 | 1,856 | 2.875 | 3 | [] | no_license | <?php
namespace application\classes;
class Engine {
private static $php_input;
public static function Init () {
session_start();
}
public static function Echo ($a) {
if (isset($a))
echo $a;
else
echo "";
}
public static function Controller ($name) {
$class = '... | true |
47fdb41da59e2a21c5d83308574bf1b3446e6407 | PHP | peacefulcraft-network/api-router | /test/tests/units/enum/EnumTest.php | UTF-8 | 1,674 | 2.78125 | 3 | [] | no_license | <?php
use net\peacefulcraft\apirouter\test\enums\TestEnum;
use PHPUnit\Framework\TestCase;
class EnumTest extends TestCase {
public function testEnumDelcaration() {
$testEnum = new TestEnum(TestEnum::VAL1);
$this->assertEquals(TestEnum::VAL1, $testEnum->_value);
$this->expectException(RuntimeException::class)... | true |
0d76b9cdc96bd8fca8e248883c6dbdf86a0525b4 | PHP | asimo124/HawleyWebDesign_API | /models/UploadShowImage.php | UTF-8 | 969 | 2.765625 | 3 | [] | permissive | <?php
namespace app\models;
use yii\base\Model;
use yii\web\UploadedFile;
class UploadShowImage extends Model
{
/**
* @var UploadedFile
*/
public $imageFile;
public function rules()
{
return [
[['imageFile'], 'file', 'skipOnEmpty' => true, 'extensions' => 'png, jpg'],
... | true |
94f9d09e5e42bce9e66d04d40b7e2fd23bf78dbb | PHP | diogobernardelli/gadoaqui | /pacotes/controller/CotacaoController.php | UTF-8 | 1,207 | 2.578125 | 3 | [] | no_license | <?php
require_once ('pacotes/controller/ControllerGeral.php');
require_once ('pacotes/dao/CotacaoDAO.php');
/**
* @author Eduardo
*
*
*/
class CotacaoController extends ControllerGeral {
private $CotacaoDAO;
function __construct() {
parent::__construct ();
$this->CotacaoDAO = new CotacaoDAO ( $this->co... | true |
99b5bb62a0c778065cd5fad7cdffc3bb3783f85d | PHP | PhanThiSu/DAtotnghiep | /models/dashboard_model.php | UTF-8 | 4,230 | 2.59375 | 3 | [] | no_license | <?php
class dashboard_model extends vendor_frap_model
{
/* backup the db OR just a table */
public function backup_tables($tables = '*'){
$return = "";
$date_string = date("Y-m-d");
$database_name = DB_NAME;
define("BACKUP_PATH", RootURI."media/backup/");
$this->con = new mysqli(DB_HOST,DB_USER,DB_... | true |
b6ff8a2b5974886f7c84948c20aa6966f21e8352 | PHP | marianomastronardi/ProgramacionIII-3C | /Ejercicios/UnitTest/utAlumno.php | UTF-8 | 1,691 | 3.125 | 3 | [] | no_license | <?php
require_once '../clases/alumno.php';
require_once '../files/fileHandler.php';
/*
$alumno = new Alumno('Mariano', 'Mastronardi', '22334455', "1980-03-26", 108050);
$alumno->_delimiter = ';';
//echo $alumno;
//Archivos
//creo un archivo
$filename = 'alumnos.txt';
$listAlumnos = array();
array_push($listAlumnos,$... | true |
65a677e708f576fea64299be22cc7be91caa3793 | PHP | felixding/LonelyThinker | /vendors/flashchart/ofc_x_axis_labels.php | UTF-8 | 426 | 2.75 | 3 | [] | no_license | <?php
class x_axis_labels
{
function x_axis_labels(){}
function set_steps( $steps )
{
$this->steps = $steps;
}
//
// An array of [x_axis_label or string]
//
function set_labels( $labels )
{
$this->labels = $labels;
}
function set_colour( $colour )
{
$this->colour = $colour;
}
function set_s... | true |
c0be7b9651ecc4f2540bd35ec4d0ade906e5b427 | PHP | huyhoang1995/laravel-reactjs | /app/Http/Middleware/checkRole.php | UTF-8 | 935 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
class checkRole
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next, $role, $isAdmin = 0)
{
$u... | true |
a7eb4ee3af887c76fc39b1c4a810db24073dbe45 | PHP | EmmaBlixt/category-sidebar-plugin | /show-product-subcategories/showProductCategories.php | UTF-8 | 2,155 | 2.6875 | 3 | [] | no_license | <?php
/*
Plugin Name: Show Product Categories
Plugin URI:
description: Display WooCommerce product main category and it's subcategories in a cute sidebar next to the product image
Author: Emma Blixt
Author URI: https://standout.se
*/
defined('ABSPATH') or die('No script kiddies please!');
require_once 'includes... | true |
3cb1dc03fb7cd44a4123f3a5e89d593951e148b5 | PHP | gonzalogabriel3/web2-tp4 | /formularioVista.php | UTF-8 | 3,408 | 2.59375 | 3 | [] | no_license | <?php require_once 'cabecera.php';
require 'validarSesion.php';
?>
<center><h2 style="color: green"><b>Registro Cliente</b></h2></center>
<form method="post" action="ProcesarFormulario.php">
<?php
/*Si mi formulario contiene errores los notificos
*/
if($miFormulario->tieneError... | true |
b4bb5a8b20d7ea50346cf30e9392ad3ed40bf646 | PHP | virusphp/lemon-juice | /old/src2/Bot/Telegram/Traits/Command.php | UTF-8 | 30,610 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Bot\Telegram\Traits;
use IceTeaSystem\Curl;
use App\WhatAnime\WhatAnime;
use App\MyAnimeList\MyAnimeList;
/**
* @author Ammar Faizi <ammarfaizi2@gmail.com>
* @package Bot\Telegram\Traits
* @since 0.0.1
*/
trait Command
{
/**
* Parse Command
*/
private function parseCommand()
... | true |
0eeb3730110b19777391fbde883974df31f7139f | PHP | KaranamVijayKumar/gdp-laurel-review | /Code/Source Code/app/Project/Models/UserRole.php | UTF-8 | 1,582 | 2.75 | 3 | [] | no_license | <?php
/**
* File: UserRole.php
* Created: 05-08-2014
*
* Description
*
* @author Arpad Olasz <arpi@wingsline.com>
*/
namespace Project\Models;
use Story\Error;
use Story\ORM;
/**
* Class UserRole
*
* @package Project\Models
*/
class UserRole extends ORM
{
/**
* @var bool
*/
public sta... | true |
a4957d9071597139e0a54ed13c2aa3024560a109 | PHP | artisannayan/LaravelProject-01 | /app/Http/Controllers/Backend/ProductsController.php | UTF-8 | 4,754 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Backend;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Products;
use Image;
use App\Models\ProductImage;
class ProductsController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Resp... | true |
bc568bdcc744f147cf11c92c3a8e18e4874fd3d6 | PHP | MarcomInteractive/PrismPollBundle | /Entity/BaseOpinion.php | UTF-8 | 4,170 | 2.546875 | 3 | [] | no_license | <?php
namespace Prism\PollBundle\Entity;
use Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
/**
* Prism\PollBundle\Entity\BaseOpinion
*/
abstract class BaseOpinion
{
use Timestampable;
/**
* db
* @var integer $id
*/
protected $id;
/**
* db
* @var string $nam... | true |
74a287794d2da43875ed3c82ea87ffb10e671dea | PHP | chrisu001/piwik_marketplace | /lib/Cache.php | UTF-8 | 4,854 | 2.578125 | 3 | [] | no_license | <?php
/**
*
* PluginMarketplace
*
* Copyright (c) 2012-2013, Christian Suenkel <info@suenkel.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code... | true |
27b948cd78564868241c9b11014dd1d00d20c9f2 | PHP | xPh3n0m/nfc_project_web | /deliverables/B.php | UTF-8 | 345 | 2.5625 | 3 | [] | no_license | <?php
$header = "B. Print the names of gold medalists in sports which appeared only once at the Olympics.";
$sql = "select a.name
from athletes a
where a.aid in (select m.aid
from medals m
where m.medal like 'Gold%'
and m.sport in (select sport
from events
group by sport
having count(*)=1
)
)";
$co... | true |
243dc74806f2a618c79b858785cccb6adc4624fe | PHP | mjmonagh/whiterosetattoosupply | /static/contact.php | UTF-8 | 565 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
$contactName = $_POST['contactName'];
$contactEmail = $_POST['contactEmail'];
$message = $_POST['message'];
$from = 'From: whiterosetattoosupply.com';
$to = 'matthew.j.monaghan@vanderbilt.edu';
$subject = 'Contact us';
$human = $_POST['human'];
$body = "From: $contactName\n E... | true |
18c86d3bdae84a291cfe846d4869c0a428aa36b9 | PHP | fahrulputra40/framework | /src/Neutrino/Database/Schema/Definition.php | UTF-8 | 890 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Neutrino\Database\Schema;
use Neutrino\Support\Fluent;
/**
* Provide IDE auto-completion
*
* Class Definition
*
* @package Neutrino\Database\Schema\Fluents
*
* Column modifier methods
* @method $this default(\mixed $value)
* @method $this nullable($nullable = true)
* @method $this unsigned(... | true |
feaaa0994e164a46be0fbe4fb6e86779d1daa3db | PHP | rajkovrga/herbs-back | /app/Services/ImageService.php | UTF-8 | 1,711 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use Carbon\Carbon;
use Illuminate\Contracts\Filesystem\FileExistsException;
use Illuminate\Support\Facades\Storage;
use Intervention\Image\ImageManager;
class ImageService
{
protected $image;
public function __construct(ImageManager $image)
{
$this->image = $image;... | true |
28661de2c05870951acd36e5ab06d7ecf6d976c2 | PHP | wangyulin1991/wangyulin | /api/common.php | UTF-8 | 1,343 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Admin
* Date: 2019/1/28 0028
* Time: 14:01
*/
/**
* 发送请求
*
* @param string $url 请求地址
* @param array $dataObj 请求内容
* @param integer $type 请求类型
* @return string 应答json字符串
*/
function sendCurl($url, $type = 0, $dataObj=array())
{
$curl = curl_init();
... | true |
257b0bb11c860b9658ee1c2738a21f9b718da12d | PHP | phamhieu2212/test | /pagination.php | UTF-8 | 1,413 | 2.96875 | 3 | [] | no_license | <?php
class pagination extends user{
protected $page;
protected $totalRows;
protected $rowsPerpage;
protected $perRow;
protected $totalPages;
protected $listPages;
function __construct(){
$this->connect();
}
// Phương thức tính tổng số mẩu tin
function totalRows($tableName){
... | true |
8c2b2a2b7c2a77b4ac773a419b1c17a70cc5a9fa | PHP | Miliooo/MilioUserBundle | /Controller/RegisterUserController.php | UTF-8 | 3,550 | 2.515625 | 3 | [] | no_license | <?php
namespace Milio\UserBundle\Controller;
use Milio\User\Domain\ValueObjects\BasicUsername;
use Milio\User\Domain\ValueObjects\Password;
use Milio\User\Domain\Write\Command\RegisterUserCommand;
use Milio\UserBundle\Form\Type\RegisterUserFormType;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Bundle\... | true |
9489311787e447b16afe94d9de88208413c9613e | PHP | ProfectusDev/HouseKeeperAdminPortal | /register.php | UTF-8 | 5,207 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: johnfiorentino
* Date: 4/14/17
* Time: 12:29 AM
*/
session_start();
global $con;
include "config.php";
include "functions.php";
?>
<html>
<head>
<title>HouseKeeper Web Portal - Account Registration</title>
<link rel="stylesheet" type="text/css" href="css/main.css"... | true |
25dda83749d6755cf2d9a4336cf92153b6533af8 | PHP | therealadespina/Camagru_21 | /Camagru/verify.php | UTF-8 | 1,101 | 2.640625 | 3 | [] | no_license | <?php
header('Location: index.php');
include_once 'config/database.php';
try {
$dbh = new PDO($DB_DSN, $DB_USER, $DB_PASSWORD);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sth = $dbh->prepare('SELECT COUNT(*) FROM users WHERE mail = :mail AND state = :hash');
$sth->bi... | true |
f0591bc4b18f5cec2e8f04c97a13277825c1bfd0 | PHP | enlightn/security-checker | /src/AdvisoryParser.php | UTF-8 | 1,125 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Enlightn\SecurityChecker;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Yaml\Yaml;
class AdvisoryParser
{
/**
* @var string
*/
private $advisoriesDirectory;
private $advisories = [];
public function __construct($advisoriesDirectory)
{
$this->adviso... | true |
da4c529a7a7e1f5111256a2d9bb7bd6fd97e9e3b | PHP | mkoveni/anglo | /app/Http/Controllers/RoleController.php | UTF-8 | 514 | 2.53125 | 3 | [] | no_license | <?php
namespace Anglo\Http\Controllers;
use Anglo\Models\Roles;
use Psr\Http\Message\RequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
class RoleController extends Controller
{
public function store(Request $request, Response $response)
{
$role = new Roles();
$... | true |
59103eee867c7ddea52d9a786c97ffddee4966a8 | PHP | franciscobizi/task-management | /app/controllers/AdminController.php | UTF-8 | 2,959 | 2.78125 | 3 | [] | no_license | <?php
namespace FB\controllers;
use FB\src\{View, Auth, Validator};
use FB\models\Task;
/**
* AdminController
*
* PHP Version 7+
*
* Methods : userAuth, userAccount, editTask
* @author Francisco Bizi <taylorsoft28@gmail.com>
*
*/
final class AdminController extends Controller
{
/**
*
* Method that... | true |
118bc706877ce710ac6740b73ecccefe2e7f6e7c | PHP | thamtech/yii2-scheduler | /src/actions/IndexAction.php | UTF-8 | 1,125 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* @copyright Copyright(c) 2016 Webtools Ltd
* @copyright Copyright(c) 2018 Thamtech, LLC
* @link https://github.com/thamtech/yii2-scheduler
* @license https://opensource.org/licenses/MIT
**/
namespace thamtech\scheduler\actions;
use Yii;
use yii\base\Action;
use thamtech\scheduler\models\SchedulerTask;
... | true |
b3cec43716bf402eeb34b1530625ac036ad15e93 | PHP | umar-ahmed/Organization | /models/Role.php | UTF-8 | 1,037 | 2.5625 | 3 | [] | no_license | <?php namespace UMAR\Organization\Models;
use Model;
/**
* Role Model
*/
class Role extends Model
{
use \October\Rain\Database\Traits\Validation;
/**
* @var array Validation rules
*/
public $rules = [
'name' => 'required',
'executive' => 'required',
];
/**
... | true |
4c6ec54f635168d930e1766c4bd82ecd0fef94d7 | PHP | Brainnos/PHP | /pdo/post-article.php | UTF-8 | 1,494 | 3.078125 | 3 | [] | no_license | <?php
include('include/pdo-handler.php');
//Récupération des variables issues de $_POST
$id = filter_input(INPUT_POST, "id", FILTER_SANITIZE_NUMBER_INT) ?? 0;
$titre = filter_input(INPUT_POST, "titre", FILTER_SANITIZE_STRING) ?? "Article sans titre";
$corps = filter_input(INPUT_POST, "corps", FILTER_SANITIZE_STRING) ... | true |
381baca887053cceda4dc9991629f16b0dd79139 | PHP | russelldelgado/marcadores2 | /src/Repository/MarcadorRepository.php | UTF-8 | 5,436 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Entity\Marcador;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\Tools\Pagination\Paginator;
use Doctrine\Persistence\ManagerRegistry;
/**
* @method Marcador|null find($id, $lockMode = null, $lockVersion = null)
* @method Marcador|null... | true |
43c7147248580887a569d89d8af3e2c2973248a9 | PHP | matheusmauricio/perfect-test-backend | /app/Http/Services/ClienteService.php | UTF-8 | 5,549 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Services;
use App\Http\Helper;
use App\Http\Resources\ClienteResource;
use App\Repositories\ClienteRepository;
use Exception;
class ClienteService
{
protected $repository;
protected $helper;
public function __construct(ClienteRepository $repository){
$this->repository ... | true |
d4d572c6ca8187719519e4f6ac35b46ef9ff703e | PHP | ma7salem/tracker | /src/controls/Http/Controllers/TrackerController.php | UTF-8 | 1,333 | 2.609375 | 3 | [] | no_license | <?php
namespace Salem\Tracker\Controls\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Salem\Tracker\Controls\Repositories\TrackerRepo;
class TrackerController extends Controller
{
public $repo;
public function __construct(TrackerRepo $repo)
{
$this->repo ... | true |
3cdecc270b1a5e543202d16c449c7b8879dc9665 | PHP | ananya2812/PHP_Basics | /a20-session1.php | UTF-8 | 214 | 2.953125 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>SESSION</title>
</head>
<body>
<?php
$_SESSION["name"]="ananya";
$_SESSION["Age"]=22;
echo "Session Variables are set <br>";
?>
</body>
</html> | true |
b3c788ffde197f3ad38606e29f33dda3ed41267f | PHP | RuiOliveirarc/at9 | /at9_e6.php | UTF-8 | 92 | 3.125 | 3 | [] | no_license | <?php
$num=rand(1,50);
while ($num!=37) {
$num=rand(1,50);
echo $num. '<br>';
}
?>
| true |
690c8e7ac75dd09d94401eaa3625e86e6f98e1c0 | PHP | all-ride/ride-lib-event | /src/ride/library/event/EventManager.php | UTF-8 | 1,779 | 3.109375 | 3 | [] | no_license | <?php
namespace ride\library\event;
/**
* Interface for a manager of dynamic events
*/
interface EventManager {
/**
* Adds a new event listener
* @param string $event Name of the event
* @param string|array| \ride\library\reflection\Callback $callback Callback
* of the event listener
*... | true |
b1804ce2a72c60cb4cfc6be66f25430a8fdf7bd6 | PHP | sweifan/clientdsp | /ui/libraries/UploadTools.php | UTF-8 | 1,731 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* 账户信息
*/
class UploadTools {
public function __construct() {
$this->CI =& get_instance();
$this->CI->config->load('upload');
$this->CI->load->helper(['form', 'url']);
}
/**
* @param array $arrUdpConf
... | true |
8a3d047c8a05e15f1b1d658ad610a87355de41c1 | PHP | someApprentice/VideoURLRecognizer | /src/Factory/YouTubeFactory.php | UTF-8 | 1,101 | 3.078125 | 3 | [] | no_license | <?php
namespace RecognitionVideoUrl\Factory;
use RecognitionVideoUrl\Factory\AbstractFactory;
use RecognitionVideoUrl\Entity\AbstractURL;
use RecognitionVideoUrl\Entity\YouTubeURL;
class YouTubeFactory extends AbstractFactory
{
public function createEntityFromURL(string $url): AbstractURL
{
$matches =... | true |
8f35129432bab0ba3e1bf9eaf27a770810b827fb | PHP | karthikuk/messiserver | /Moly/Foundation/Core/Server/Handlers/ServerHandler.php | UTF-8 | 1,719 | 2.65625 | 3 | [] | no_license | <?php
namespace Moly\Server\Handler;
use Moly\Server\Facades\MServer;
use Moly\Server\Facades\Client;
use Moly\Server\Facades\HandleResponse;
use Moly\Server\MakeClient;
use Moly\Supports\Facades\Request;
class ServerHandler implements ServerHandlerInterface
{
protected $_socket = null;
protected $_clientHa... | true |
fb2096161c4cbd3d5722a84b393b9ef01ac597ed | PHP | carlochess/uvshop | /_Documentacion/json/index2.php | UTF-8 | 2,769 | 2.75 | 3 | [] | no_license | <?php
function /* String */ leerArchivo($ruta) {
if (file_exists($ruta))
return file_get_contents($ruta);
}
function insertarBD($str) {
$json = json_decode(utf8_encode($str), true);
foreach ($json as $key => $value) {
// Imagen
$url = $value["imagen"];
$temp = en... | true |
46cd63ac1c7e9884e6e1734ee4dc8215ed05bac0 | PHP | cdenervaux/Yootag | /en/user/checkreg.php | UTF-8 | 1,453 | 2.640625 | 3 | [] | no_license | <?php
include ("../lib/conf/config.php");
$reg_email = trim($_POST["reg_email"]); // strip any white space
$response = array();
// if the email is blank
if (!$reg_email) {
$response = array(
'status' => false,
'msg' => "<img src=\"".ABSPATH_IMG."cross_circle_frame.png\"> The email valu... | true |
413897dcd4401f318f762803545e67acfcaa4709 | PHP | hftomler/twitter | /twits/editar_tuit.php | UTF-8 | 3,749 | 2.65625 | 3 | [] | no_license | <?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="tuits.css">
<title>Insertar un twit</title>
</head>
<body><?php
require '../comunes/auxiliar.php';
// COMPROBACIONES DE DATOS RECIBIDOS POR POST
$usuario_id= (isset($_POST['usuar... | true |
6dc58b84ba6850698b6513aa6c75979675498671 | PHP | json-nan/tukichallenge | /database/seeders/SummonerSeeder.php | UTF-8 | 561 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use File;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class SummonerSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('summoners')->insert($this->getArrayFromFil... | true |
7dd77897ff86087cde4f2f05bb87feee9e64d68b | PHP | nemundo/recommendation | /www/src/Nemundo/Srf/Site/SrfEpisodeSite.php | UTF-8 | 1,115 | 2.515625 | 3 | [] | no_license | <?php
namespace Nemundo\Srf\Site;
use Nemundo\Dev\App\Factory\DefaultTemplateFactory;
use Nemundo\Process\App\Share\Content\ShareContentType;
use Nemundo\Srf\Content\Episode\SrfEpisodeContentType;
use Nemundo\Srf\Page\EpisodePage;
use Nemundo\Srf\Parameter\EpisodeParameter;
use Nemundo\Web\Site\AbstractSite;
class... | true |