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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4f3c83a83aa577011cf748515da953349146ed7e | PHP | TommyTeaVee/BoltBookeMe | /src/Model/Customer/Handler/CreateCustomerHandler.php | UTF-8 | 3,411 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Bolt\Extension\IComeFromTheNet\BookMe\Model\Customer\Handler;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\DBALException;
use Bolt\Extension\IComeFromTheNet\BookMe\Model\Customer\Command\CreateCustomerCommand;
use Bolt\Extension\IComeFromTheNet\BookMe\Model\Customer\Cus... | true |
13cc1a7597fe8834b596e1a18d18411eb4f3fcc5 | PHP | elaineoliveiraa/projeto | /algumacoisa.php | UTF-8 | 220 | 2.734375 | 3 | [] | no_license | <?php
try{
$pdo = new PDO("mysql:host=localhost;dbname=informacion", "root", '741852');
echo "Connet Successfully.";
}catch(PDOException $e){
die("Deu ruim." . $e->getMessage());
}
?> | true |
c585d4094d62ee177a36c2aeed10e8832b82b991 | PHP | betocaeirojr/Postcards | /mail_quick.php | UTF-8 | 218 | 2.53125 | 3 | [] | no_license | <?php
require 'class.SimpleMail.php';
$postcard = new SimpleMail();
if ($postcard->send("betocaeirojr@gmail.com","Quick message test", "This is a test using SimpleMail::send!"))
{
echo "Quick message sent successfully!";
}
?> | true |
c486f025197eee41da246c297de363ca15528d61 | PHP | Fastfire001/filer_final | /Model/FormManager.php | UTF-8 | 3,467 | 3.109375 | 3 | [
"Unlicense"
] | permissive | <?php
require_once('Model/UserManager.php');
require_once('Model/LogManager.php');
class FormManager
{
public function checkRegister($firstname, $lastname, $username, $email, $password, $password_repeat)
{
$logManager = new LogManager();
if (strlen($firstname) < 2) {
$da... | true |
250b9d6ff6665bcb283011ef08e333d214a44480 | PHP | Shofiul-Alam/magento-app | /src/vendor/vertex/module-tax/Model/Api/Data/InvoiceRequestBuilder/InvoiceProcessorPool.php | UTF-8 | 1,736 | 2.796875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"AFL-2.1",
"AFL-3.0",
"OSL-3.0",
"MIT"
] | permissive | <?php
/**
* @copyright Vertex. All rights reserved. https://www.vertexinc.com/
* @author Mediotype https://www.mediotype.com/
*/
namespace Vertex\Tax\Model\Api\Data\InvoiceRequestBuilder;
use Magento\Sales\Api\Data\InvoiceInterface;
use Vertex\Services\Invoice\RequestInterface;
/**
* Co... | true |
93b4c7e15a95494ce5083b7c614fdd32823a0048 | PHP | argjuan85/sgi | /sgi/application/controllers/Sectores.php | UTF-8 | 4,517 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Sectores extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->library('grocery_CRUD');
$this->load->library('session');
$this->load->model('sedes_model');
$this->load->model('stoc... | true |
0db997ae2a77c1bdc4c852d3d56e01fa34fca2bf | PHP | tradefurniturecompany/site | /app/code/Hotlink/Brightpearl/Workaround/Magento222/Magento/Catalog/Model/Product/Plugin.php | UTF-8 | 5,520 | 2.609375 | 3 | [] | no_license | <?php
namespace Hotlink\Brightpearl\Workaround\Magento222\Magento\Catalog\Model\Product;
class Plugin
{
const KEY = '_hotlink_brightpearl_m222_ScopeOverriddenValue_wrokaround';
function beforeAddAttributeUpdate( $subject, $code, $value, $store )
{
if ( $data = $subject->getData( self::KEY ) )
... | true |
d1b2fbef65c84ff3a5a741e49ef99f50aa2f516d | PHP | Milkhan/pluslms | /app/Bundles/Notifications/Aplication/CommentNotificator.php | UTF-8 | 966 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Bundles\Notifications\Aplication;
use App\Notifications\NewComment;
use App\Repositories\Eloquent\UserRepository;
use App\Repositories\UserRepositoryInterface;
class CommentNotificator
{
private $userRepository;
public function __construct()
{
$this->userRepository = new Us... | true |
71c46dc26422f1205d0688665a57c5bd20b5d752 | PHP | letiennhat/smartbuilding | /Blue_eyes/demo_home/get_person.php | UTF-8 | 581 | 2.71875 | 3 | [] | no_license | <?php
require_once 'connect.php';
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (isset($_GET['room_id'])) {
$roomId = $_GET['room_id'];
$sql = "SELECT * from person where room_id=:room_id";
$query = $dbh->prepare($sql);
$query->bindParam(':room_id',$roomId,PDO::PARAM_STR);
$query->execute()... | true |
e565b39071347ed15e5fd230eddbc15b58d05614 | PHP | riverside/php-orm | /tests/ConfigurationTest.php | UTF-8 | 1,468 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace PhpOrm\Tests;
use PHPUnit\Framework\TestCase;
use PhpOrm\Configuration;
class ConfigurationTest extends TestCase
{
public static function getConfiguration()
{
return new Configuration(
'root',
'secret',
'test',
'localhost',
33... | true |
c21bfeb0596dc63a80272c2f5d06db4fc7a2cf3a | PHP | pilif/sacy | /src/sacy/internal/FileCache.php | UTF-8 | 1,219 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace sacy\internal;
use sacy\Cache;
use sacy\Exception;
class FileCache implements Cache {
private $cache_dir;
function __construct(){
$this->cache_dir = implode(DIRECTORY_SEPARATOR, array(
ASSET_COMPILE_OUTPUT_DIR,
'cache'
));
if (!is_dir($this->cac... | true |
75f82a7cb5919e3402b50b1481271fc8f096d35e | PHP | denga/filament | /src/Http/Components/Dropdown.php | UTF-8 | 886 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Filament\Http\Components;
use Illuminate\View\Component;
class Dropdown extends Component
{
/**
* The classes to apply to the dropdown buton.
*
* @var string
*/
public $buttonClass;
/**
* The classes to apply to the dropdown.
*
* @var string
*/
... | true |
f9cab394a943b91dfa9997bc811b950eb9c94cef | PHP | tonyfarney/CSVReader | /src/CSVReader.php | UTF-8 | 14,429 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace CSVReader;
class CSVReader {
/**
* Loaded lines from CSV content
* @var string[]
*/
protected $_lines = [];
/**
* Column delimiter
* @var string
*/
private $_columnDelimiter = '';
/**
* Enclosure
*/
private $_enclosure = '';
/**
* Escape character
*/
private $_escape = '';
... | true |
1be2c19c6d2a0134c504bd6e16dbc5b9e7faebc5 | PHP | panthervsanyone/PracticeFromZerotoHero | /lesson15.php | UTF-8 | 451 | 3.40625 | 3 | [] | no_license | <?php
$str ='';
for ($i = 1;$i < 10;$i++){
$str .= $i;
}
echo $str.'<br>';
$str1 = '';
for ($i = 9 ; $i >= 1;$i--){
$str1 .= $i;
}
echo $str1.'<br>';
$str2 = '-';
for ($i = 1; $i <= 9; $i++){
$str2 .= $i.'-';
}
echo $str2;
for ($i = 0;$i <= 20;$i++){
echo str_repeat('x',$i).'<br>';
}
for ($i=1,$x=1... | true |
85ad80c15a4b4db5a8869b8e2ceae75aaec8e873 | PHP | ladytmarie/SMS-Email-Relay | /sms_to_email.php | UTF-8 | 6,005 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/************************************************************************/
// SMS To Email
// Take inbound SMS and forward the body as an email
// We are using Mailgun.com to host MX records and handle email for us
// Usage:
// File "contacts.csv" must be in same directory as this script.
// format of CSV is ... | true |
10ee791b0a2be21a5e05fecfdd6b1baf4b00cedd | PHP | willian1996/_Curso-backend-PHP-DankiCode | /2-Modulo-Intermediario/Aula27-Interface_e_implements/interface1.php | UTF-8 | 76 | 3.0625 | 3 | [] | no_license | <?php
interface Interface1{
public function printOnScreen($par);
} | true |
5d9053b58510a77d6f8ffad23a6737d855dcb588 | PHP | Ribic2/Preskok | /index.php | UTF-8 | 3,415 | 2.59375 | 3 | [] | no_license | <?php
require __DIR__ . '/vendor/autoload.php';
$loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/views/HTML/');
$twig = new \Twig\Environment($loader, []);
// create a server request object
$request = Zend\Diactoros\ServerRequestFactory::fromGlobals
(
$_SERVER,
$_GET,
$_POST,
$_COOKIE,
... | true |
bea810f1f394132bebfbe3045ede06afbaf12b5c | PHP | adriang1174/mipanel | /cuenta/inc/data/traff_common.php | UTF-8 | 16,431 | 2.75 | 3 | [] | no_license | <?
require_once( INCLUDE_PATH . "db.php");
class traff_agrupation
{
var $title; // El titulo de la agrupacion.
var $agrupation; // Array de "traff_agrupation".
var $items; // Array de "traff_detail_item" o "traff_summary_item" (dependiendo quien use la agrupacion).
var $count; // Por ejemplo, para un det... | true |
d0b74e654cacaf59bff9a97f87b8b8b9c666a2ec | PHP | gheidorn/simple-dashboard | /getLastFiveStatuses.php | UTF-8 | 1,214 | 2.65625 | 3 | [] | no_license | <?php
if($_REQUEST["resourceId"] != "") {
// open database and retrieve last 5 statuses
include "db.php";
require "mysql_resultset.php";
$link = mysql_connect($server, $user, $pwd);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$database = mysql_select_db("$dbName", $link);
$sql = '... | true |
8edd8a1f24a35ed51733dd7bda0085a73ccaf927 | PHP | dakotak/php2048 | /index.php | UTF-8 | 166 | 2.59375 | 3 | [] | no_license | <?php
/**
* index.php
* Main game page
*/
require 'functions.php';
$gb = emptyGameBoard(4);
for($i=0;$i<10;$i++){
$gb = addRandomTile($gb);
}
print_r($gb); | true |
3e7242087f0affb4d63a48c97be2c099f99cf19b | PHP | sh-ogawa/large-laravel-system-example | /modules/Providers/OwnedUserProvider.php | UTF-8 | 554 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Providers;
use Illuminate\Auth\EloquentUserProvider;
use Modules\Domain\Models\Auth\AuthenticatedUser;
/**
* ログイン後に、独自型をauth()->user()で取れるようにする認証プロバイダ
* @package Modules\Providers
*/
class OwnedUserProvider extends EloquentUserProvider
{
/**
* @inheritDoc
* @override
*/
... | true |
c785c634bb602b91d8822f24f8015c33a502297b | PHP | Rickycezar/phpbrew | /src/PhpBrew/Platform/UnixLikeHardware.php | UTF-8 | 390 | 2.71875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace PhpBrew\Platform;
use PhpBrew\Utils;
class UnixLikeHardware implements Hardware
{
public function is32bit()
{
return $this->detectBitness() === 32;
}
public function is64bit()
{
return $this->detectBitness() === 64;
}
protected function detectBitness()
... | true |
42bc2b2aab3bdbcc4b23fe898a31e2362c1337ce | PHP | tezhm/ultimate-movie-api | /src/Infrastructure/Console/PingDatabase.php | UTF-8 | 1,637 | 2.8125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php declare(strict_types=1);
namespace Uma\Infrastructure\Console;
use Doctrine\DBAL\Driver\PDOConnection;
use Exception;
use Illuminate\Console\Command as IlluminateCommand;
use Illuminate\Contracts\Config\Repository;
use RuntimeException;
/**
* Pings database connections for up to a given timeout.
*
* @package... | true |
2d9866dfeeb4b6764ddf1747574a4184521523ac | PHP | SaillyMaxence/LPDIM-php-smarty | /vote.php | UTF-8 | 1,105 | 2.671875 | 3 | [] | no_license | <?php
include("includes/connexion.inc.php");
if(isset($_GET['id']) && $_GET['id'] != "")
{
$id=$_GET['id'];
$ip = get_ip();
$query="SELECT * FROM messages WHERE id=:id";
$prep=$pdo->prepare($query);
$prep->bindValue(':id', $id);
$prep->execute();
$data=$prep->fetch();
if($ip != $data['ip'])
{
$query="... | true |
b4f70338196ca5ee2352926a6b41162cfca864ff | PHP | Sadowskyyyyy/polonia-in-space | /src/Expeditions/Infrastructure/Doctrine/Repository/DoctrineExpeditionRepository.php | UTF-8 | 1,402 | 2.796875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Expeditions\Infrastructure\Doctrine\Repository;
use App\Expeditions\Domain\Entity\Expedition;
use App\Expeditions\Domain\ExpeditionRepository;
use App\Shared\Domain\Exception\NotFoundException;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
fi... | true |
f3583020f040cc0f0432c1346bb905721cb86efd | PHP | godoakbrutal/core | /src/Middleware/DummyFallbackMiddleware.php | UTF-8 | 568 | 2.515625 | 3 | [] | no_license | <?php
namespace LineMob\Core\Middleware;
use League\Tactician\Middleware;
use LineMob\Core\Command\AbstractCommand;
use LineMob\Core\Command\FallbackCommand;
use LineMob\Core\Storage\CommandStorage;
class DummyFallbackMiddleware implements Middleware
{
/**
* @param AbstractCommand $command
*
* {@i... | true |
abd686f7fd87f2300da08cc6436ab00c9d0c907f | PHP | skylinzz/Task_Phones | /objects/customer.php | UTF-8 | 2,219 | 3.078125 | 3 | [] | no_license | <?php
class Customer {
private $con;
private $table_name = "customer";
private $countries = array(
array("Cameroon", "237", "/\(237\)\ ?[2368]\d{7,8}$/"),
array("Ethiopia", "251", "/\(251\)\ ?[1-59]\d{8}$/"),
array("Morocco", "212", "/\(212\)\ ?[5-9]\d{8}$/"),
array("M... | true |
9e9f59ea3e3699a250971073e00964e7aa24b156 | PHP | BoHeTeachnology/boheyayi | /lumen_online/app/Rop/request/ExternalCrmUserCheckedRequest.php | UTF-8 | 1,218 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class ExternalCrmUserCheckedRequest
{
private $apiParas = array();
private $companyKey;
public function setCompanyKey($companyKey)
{
$this->companyKey = $companyKey;
$this->apiParas["companyKey"] = $companyKey;
}
public function getCompanyKey()
{
return $this->$companyKey;
}
private $shopPl... | true |
ebc86094abcd5fa03b6a16f4b8631061bfd450ed | PHP | djoudi/RESTful-PHP | /helpers/html_image_tag.helper.php | UTF-8 | 664 | 2.796875 | 3 | [] | no_license | <?
function html_image_tag( $params ) {
$src = '';
$alt = '';
$output = '';
if ( is_array( $params ) ) {
if ( isset( $params['src'] ) && !empty( $params['src'] ) ) $src = $params['src'];
else return null;
if ( isset( $params['alt'] ) && !empty( $params['alt'] ) ) $alt = htmlspecialchars( $params['alt'] ... | true |
b875a25d6bbc094947ac2527ffc04621746b8178 | PHP | vilavelha/site-pmvv | /app/Plugin/Tags/Test/Case/Model/TaggedTest.php | UTF-8 | 4,969 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright 2009-2012, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2009-2012, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensourc... | true |
e89275c1d66751563d20d96847eb33fbbb9d46f3 | PHP | ammogcoder/Online-FTP-S3 | /tests/Repositories/DirectoryRepositoryTest.php | UTF-8 | 1,412 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use App\Repositories\DirectoryRepository;
use Illuminate\Filesystem\FilesystemManager;
class DirectoryRepositoryTest extends TestCase
{
public function testListing()
{
$repo = $this->getRepo(function ($mock) {
// Listing should get resorted
$reverseListing = array_reverse... | true |
e83ce23303bd544f37d4d44475ef769137793d06 | PHP | tsioryras/laravel-book_fadm_19 | /database/seeds/PictureSeeder.php | UTF-8 | 641 | 2.703125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Book;
class PictureSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$books = Book::all()->all();
$count = sizeof($books)+1;
shuffle($books);
factory(App\Pictur... | true |
fb916793e5307343e3df2ef1410d13b80a66c746 | PHP | olegbukatchuk/book-php7-for-beginners | /03/arithmetic.php | UTF-8 | 444 | 3.515625 | 4 | [] | no_license | <?php
$a = 5;
$b = 2;
$result = $a + $b;
echo "Сложение: $result<br>";
$result = $a - $b;
echo "Вычитание: $result<br>";
$result = $a * $b;
echo "Умножение: $result<br>";
$result = $a / $b;
echo "Деление: $result<br>";
$result = $a % $b;
echo "Деление по модулю: $result<br>";
$result = ... | true |
cb81514d8b4bcc967a450124b9ff698b6ebb1b80 | PHP | mister-big-b/T.W._Manea_Loredana_Pelcear_Cristian | /Proiect/Admin/createtutorial.php | UTF-8 | 6,805 | 2.859375 | 3 | [] | no_license |
<?php
// Include config file
require_once "../myAccount/config.php";
// Define variables and initialize with empty values
$link1 = $name =$description=$courseType =$icon="";
$link1_err = $name_err =$description_err=$courseType_err =$icon_err="";
if($_SERVER["REQUEST_METHOD"] == "POST"){
// Validate title
... | true |
58268750013674c36a81143e9a1281081445db9f | PHP | maflores98/CursoPHP | /Clase190717/functions.php | UTF-8 | 1,085 | 3.203125 | 3 | [] | no_license | <?php
function dd($arreglo)
{
echo '<pre>';
var_dump($arreglo);
echo '</pre>';
die();
}
function suma($a,$b)
{
return $a + $b;
}
//funcion para conectar a una base de datos
function conectarBD ()
{
try {
$pdo= new PDO('mysql:host=127.0.0.1;dbname=tareas','root','');
return $pdo;
}
catch(PDOExceptio... | true |
f8710ed8fb4e2d7562aa4e00a50d970b6da70870 | PHP | MFori/Sportovni-den-SPS-Web | /src/RestBundle/Controller/ResultsController.php | UTF-8 | 3,305 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Martin Forejt, forejt.martin97@gmail.com
* Date: 30.12.2016
* Time: 12:07
*/
namespace RestBundle\Controller;
use AppBundle\Entity\Scoring;
use AppBundle\Entity\Sport;
use AppBundle\Model\Results\ResultsManager;
use AppBundle\Model\Results\TimeResult;
use RestBundle\Model... | true |
bc1212e6eddfad49a430c026bfde45af628d7a22 | PHP | adas41/gingersnaps | /gingersnaps/php/getQns.php | UTF-8 | 1,671 | 2.859375 | 3 | [] | no_license | <?php
require_once('dbCon.php');
class qn{
public $id;
public $qn_text;
public $options;
public $correct_option;
function __construct($id, $qn_text, $options, $correct_option) {
$this->id = $id;
$this->qn_text = $qn_text;
$this->options = $options;
... | true |
a7b397ed85b8587f2e20fb67e0b7fadbaae78d9a | PHP | Sarthak-Rout/Sandeepana-Academy-Website | /components/apis/library-type.php | UTF-8 | 331 | 2.671875 | 3 | [] | no_license | <?php
echo '<option>Choose</option>';
include("../../../config/db.php");
if (isset($_POST['class'])) {
$class=$_POST['class'];
if ($result=mysqli_query($mysqli,"SELECT DISTINCT type from books where class=$class")) {
while ($row=mysqli_fetch_array($result)) {
echo '<option>'.$row['type'].'</option>';
... | true |
11b2cbf36a578c02d1d5b456f34768608b34f7f8 | PHP | GRID-1599/OnlineBookStore | /booksDisplay.php | UTF-8 | 953 | 2.625 | 3 | [] | no_license |
<?php include('books_header.php');?>
<?php
echo '<div id="booksCont">';
$xml = new DOMDocument("1.0");
$xml->load("XMLs/books.xml");
$books = $xml->getElementsByTagName("book");
foreach ($books as $book) {
$ISBN = $book->getAttribute("ISBN");
$title = $book->getElementsByTagName("title")->item(0)->nodeValue;
... | true |
08fbc4c284e1df9d8e56d98088e77e1d4bf6562d | PHP | bhatpawan/deals | /vendor/mageme/module-webforms-3/Api/Data/FieldsetInterface.php | UTF-8 | 8,378 | 2.59375 | 3 | [] | no_license | <?php
/**
* MageMe
*
* NOTICE OF LICENSE
*
* This source file is subject to the MageMe.com license that is
* available through the world-wide-web at this URL:
* https://mageme.com/license
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this extension to a newer
* version in the fut... | true |
54070465551e9ea68bacafbdae8788745d043d73 | PHP | chenshuox/frame | /system/core/controller/controller.php | UTF-8 | 1,193 | 2.71875 | 3 | [] | no_license | <?php
namespace simple\system\core\controller;
use simple\system\core\request;
class Controller
{
public $data = array();
public function __construct() {
}
public function assign($key, $value) {
$this->data[$key] = $value;
}
public function view($dir, $file) {
extract($this->data);
$path = new request... | true |
c30e8d132ea3bb5fa89575c11a6e3a06a5405162 | PHP | abetterstory/abetter-wordpress | /plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/upgrade/InstallerPlugins.php | UTF-8 | 1,694 | 2.75 | 3 | [
"GPL-3.0-only",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace OTGS\Installer\Upgrade;
class InstallerPlugins {
/**
* @var \WP_Installer $installer
*/
private $installer;
/**
* @var array
*/
private $filteredInstallerPlugins;
public function __construct( \WP_Installer $installer, \OTGS_Installer_Plugin_Finder $installerPluginsFinder ) {
$this->i... | true |
f7574b3e7294e3887a4a5dfca24b2f8febfe5e09 | PHP | miguelciego1/vacacion | /src/AdminVacacionBundle/Entity/Usuario.php | UTF-8 | 7,076 | 2.53125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace AdminVacacionBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
use Symfony\Component\Security\Core\User\EquatableInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntit... | true |
77f98d7b9492a959bd3a1eb41f4f538ff6d6497d | PHP | matowens/platform | /src/Oro/Component/Layout/Loader/Generator/GeneratorData.php | UTF-8 | 926 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Oro\Component\Layout\Loader\Generator;
class GeneratorData
{
/** @var array|string */
protected $source;
/** @var string */
protected $filename;
/**
* @param array|string $source
* @param string $filename
*/
public function __construct($source, $filename ... | true |
d44591ab3b78400552ff1dc9ff50f77e8b347d42 | PHP | BGCX067/f0110abdd74447aa81880248fa8830b6-svn-to-git | /trunk/nopublic/lib/Common/Zend/Controller/Action.php | UTF-8 | 2,655 | 2.546875 | 3 | [] | no_license | <?php
class Common_Zend_Controller_Action extends Zend_Controller_Action implements Common_Data {
/**
* 控制器捕获的请求对象
*
* @var Zend_Controller_Request_Abstract
*/
protected $request = null;
/**
* 控制器捕获的响应对象
*
* @var Zend_Controller_Response_Abstract
*/
protected $response = null;... | true |
13671fb2c0d5c83377ca0aed876c91cd33a3a669 | PHP | noelboss/deepl.io | /app/admin/library/Test.php | UTF-8 | 1,109 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace noelbosscom;
/* send test request */
class Test {
private $config;
public $response;
function __construct($conf) {
$this->config = $conf;
// sending testdata...
$options = array(
'http' => array(
'method'=> 'POST',
'content' => json_encode( json_decode($_POST['req']) ),
'head... | true |
30e8234a8f9a1aa555dbec31846499b84772cecb | PHP | AhmedAfifi1999/sponsorsMangment | /app/Http/Middleware/PersonalSponsor.php | UTF-8 | 600 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
class PersonalSponsor extends Middleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
... | true |
13e0b50859385abd130c822e02a41cab20b9ce0a | PHP | doojin/phpunit-examples | /examples/Data-Provider-CSV-File-Iterator-Example/NumberMultiplier.php | UTF-8 | 413 | 3.8125 | 4 | [] | no_license | <?php
class NumberMultiplier
{
private $numbers = array();
/**
* @param int|float $number
*/
public function addNumber($number)
{
$this->numbers[] = $number;
}
/**
* @return int
*/
public function multiply()
{
$result = 1;
foreach ($this->nu... | true |
54d7f5dc54d3308a96f9fc901994a788daf3886d | PHP | HUCapstone2018/capstone | /Plugin/Assets/Model/Behavior/LinkedAssetsBehavior.php | UTF-8 | 4,640 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
App::uses('ModelBehavior', 'Model');
class LinkedAssetsBehavior extends ModelBehavior {
public function setup(Model $model, $config = array()) {
$config = Hash::merge(array(
'key' => 'LinkedAsset',
), $config);
$this->settings[$model->alias] = $config;
$model->bindModel(array(
'hasMany' => arra... | true |
cc628d2562085ab39fc9b79d8f6ff4dffc80974a | PHP | Goufoux/Blog-V3 | /lib/Form/PostForm.php | UTF-8 | 716 | 2.546875 | 3 | [] | no_license | <?php
namespace Form;
use Core\Form;
class PostForm extends Form
{
const data = [
'title' => [
'required' => true,
'length' => [3, 20]
],
'chapo' => [
'length' => [0, 1000]
],
'seo_title' => [
'length' => [0, 85]
],
... | true |
c1c571f8137eeb8e779871f213d361fe9646c42e | PHP | wumix/evolution | /app/model/RankingManager.php | UTF-8 | 872 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Model;
/**
* Model pro správu uživatelů v systému.
*/
class RankingManager extends DatabaseManager {
/** Konstanty pro práci s databází. */
const
TABLE_NAME = 'gubernats',
COLUMN_ID = 'gubernats_fk',
COLUMN_LAND = 'land',
COL... | true |
cbd01b95ab4f96d6c52e8f970149b7e9af610b0b | PHP | laqlaq/study | /mywebtext/php/introduction.php | UTF-8 | 2,728 | 2.8125 | 3 | [] | no_license | <?php
session_start();
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<?php
//连接数据库
$con=mysql_connect("localhost","root","mysqlpasswd");
if(!$con){
die("Cuold not connect:".mysql_error());
}else{
mysql_query("set names utf8");
}
//判断是否有info数据库,如果没有就创建一个
$data_b... | true |
007c8be80b8492a46737bbb456ab596d5a2f0d9c | PHP | hoanp-dtn/zell | /application/models/admin/permit_model.php | UTF-8 | 632 | 2.546875 | 3 | [] | no_license | <?php
/**
* Anh
*/
class Permit_model extends MY_Model
{
function __construct()
{
parent::__construct();
}
function getINFO($userID)
{
if((int)$userID > 0)
{
$query = "SELECT * FROM utt_users WHERE id = '".$userID."'";
$data = $this->getRows($query);
return isset($data[0])?$data[0]:NULL;
}
... | true |
b9997480d3dd316f81b7fc3fead12ec747dcfca0 | PHP | zodream/zodream | /src/Infrastructure/Contracts/ArrayAble.php | UTF-8 | 298 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Zodream\Infrastructure\Contracts;
/**
* Created by PhpStorm.
* User: zx648
* Date: 2016/12/6
* Time: 12:27
*/
interface ArrayAble {
/**
* Get the instance as an array.
*
* @return array
*/
public function toArray(): array;
} | true |
a3588dbad1053765909d5ea77bfeeec13bbe4bba | PHP | bll44/earbuzz | /app/Earbuzz/Billing/StripeBilling.php | UTF-8 | 1,220 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Earbuzz\Billing;
use Stripe;
use Stripe_Charge;
use Stripe_Customer;
use Stripe_InvalidRequestError;
use Stripe_CardError;
use Config;
use Exception;
class StripeBilling implements BillingInterface {
public function __construct()
{
Stripe::setApiKey(Config::get('services.stripe.secre... | true |
753ea1737d003febbfb17034a09f0bd2e310705f | PHP | juanse33/pruebaBackNuvu | /logica/tarjeta.php | UTF-8 | 2,129 | 2.90625 | 3 | [] | no_license | <?php
require_once '../persistencia/tarjetaDAO.php';
require_once '../persistencia/conexion.php';
class Tarjeta {
private $conexion;
private $idTarjeta;
private $ccv_id;
private $fecha_vencimiento;
private $idCliente;
private $tarjetaDAO;
function Tarjeta($idTarjeta="", $ccv_id="", $fecha... | true |
5e23942c72570cb496b95125f12dc44bad8d59a1 | PHP | joydm/zf2-shopping-cart | /module/Product/src/Product/Model/Product.php | UTF-8 | 1,406 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: daren.d
* Date: 4/29/2016
* Time: 8:52 PM
*/
namespace Product\Model;
class Product
{
public $product_id;
public $product_name;
public $product_desc;
public $product_image;
public $product_thumbnail;
public $weight;
public $price;
p... | true |
3af55d863fca6841df42136e49466b8cdaad82ab | PHP | pulipulichen/conference-host | /adm/reviewlist.php | UTF-8 | 7,953 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php require_once('../Connections/conn.php');
$currentPage = $_SERVER["PHP_SELF"];
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;
switch ($theType) {
case "text":
$t... | true |
80b295e55a6656ebe790786e19139b9e86090b3e | PHP | kdmnk/mars | /app/Models/EducationalInformation.php | UTF-8 | 1,012 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use App\Utils\DataCompresser;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class EducationalInformation extends Model
{
use HasFactory;
public $timestamps = false;
protected $fillable = [
'user_id',
'year_of_g... | true |
b60481367662a246a056f6de0ea054c4679597f5 | PHP | Gemorroj/ginfo | /src/OS/Windows.php | UTF-8 | 17,109 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Ginfo\OS;
use Ginfo\Info\Cpu;
use Ginfo\Info\Disk\Drive;
use Ginfo\Info\Disk\Mount;
use Ginfo\Info\Memory;
use Ginfo\Info\Network;
use Ginfo\Info\Pci;
use Ginfo\Info\Process;
use Ginfo\Info\Samba;
use Ginfo\Info\Selinux;
use Ginfo\Info\Service;
use Ginfo\Info\SoundCard;
use Ginfo\Info\Ups;
use Ginfo\I... | true |
735704477067952a905c97b9ba87f216ddd16854 | PHP | InnoMachine/JuniorYear_Notes | /old/web/katar-master/katar-master/src/Tokenizer.php | UTF-8 | 5,433 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace Katar;
/**
* Katar tokenizer class, used to generate an array of tokens from a string.
*
* The array is in the format [type, value], the type is always a string, the
* value can change, it is either a string or an array.
*/
class Tokenizer
{
private $tokenList;
public function __construct... | true |
aa9f6452d259a0921983bc1e1f73d90739e206d9 | PHP | AdrianDCA-Dev/back-P0s-Gr | /database/seeds/PersonaSeed.php | UTF-8 | 2,213 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class PersonaSeed extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//DB::table('users')->truncate();
$academico = new \App\Persona();
$academico->dni = "10203040-tj";
$acad... | true |
57f63a8edc2df4de29596708cdff1c694fc3c8f9 | PHP | DKE-Data/agrirouter-sdk-php | /tests/Service/Common/CertificateServiceTest.php | UTF-8 | 3,001 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Lib\Tests\Service\Common {
use App\Dto\Onboard\Authentication;
use App\Dto\Onboard\OnboardResponse;
use App\Service\Common\CertificateService;
use App\Service\Common\UuidService;
use Error;
use PHPUnit\Framework\TestCase;
use TypeError;
use function PHPUnit\Framework\as... | true |
15b0252d54bd04e8b3046637a27983d9b090dcfd | PHP | jacob-grahn/platform-racing-2-server | /functions/http_fns/pages/admin/guild_deep_info_fns.php | UTF-8 | 1,080 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
function output_objects($objs)
{
if ($objs !== false) {
foreach ($objs as $obj) {
output_object($obj, ', ');
echo '<br/>';
}
}
}
function output_object($obj, $sep = '<br/>')
{
if ($obj !== false) {
foreach ($obj as $var => $val) {
if ($va... | true |
c2528f1ac967a13e1011f4ae65e8275dc5969744 | PHP | Porquepix/Hackatech | /app/Http/Requests/Organization/UpdateOrganizationRequest.php | UTF-8 | 896 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Organization;
use App\Http\Requests\Request;
use JWTAuth;
use App\Organization;
class UpdateOrganizationRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
... | true |
c0f36839fc50c29612ac54fc46c54bd054e1f5b9 | PHP | hjtshort/pccm | /Lib/xuly_khgd.php | UTF-8 | 3,098 | 2.71875 | 3 | [] | no_license | <?php
require_once 'Classes/PHPExcel.php';
class xuly
{
public $name;
public function __construct($filename)
{
$this->name = $filename;
}
public function mother_of_xl(){
if(isset($this->name))
{
$objFile = PHPExcel_IOFactory::identify($this->nam... | true |
f017de7cf116bdd155911d2c6a1e0872b60ce6d0 | PHP | univeros/framework | /src/Altair/Http/Validator/ArrayIdentityValidator.php | UTF-8 | 1,123 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
/*
* This file is part of the univeros/framework
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Altair\Http\Validator;
use Altair\Http\Contracts\IdentityValidatorInterface;
class ArrayIde... | true |
93fcae8e9fbed080e5526f68e93020a540f92521 | PHP | aloframework/session | /src/MySQLNoEventSession.php | UTF-8 | 2,184 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright (c) Arturas Molcanovas <a.molcanovas@gmail.com> 2016.
* https://github.com/aloframework/session
*
* 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
... | true |
546a477dab4160f171110b9c9893f76ccd2b9205 | PHP | fabiopaiva/PDOSimpleMigration | /src/Command/MigrationExecuteCommand.php | UTF-8 | 3,461 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace PDOSimpleMigration\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 PDOSimpleMigration\Library\AbstractMigration;
use Exception;
cl... | true |
278a3c5577ca321316e8df008babfa09d390fa92 | PHP | zoopcommerce/shard | /lib/Zoop/Shard/Crypt/AnnotationSubscriber.php | UTF-8 | 2,049 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @link http://zoopcommerce.github.io/shard
* @package Zoop
* @license MIT
*/
namespace Zoop\Shard\Crypt;
use Doctrine\Common\EventSubscriber;
use Zoop\Shard\Annotation\Annotations as Shard;
use Zoop\Shard\Annotation\AnnotationEventArgs;
/**
* Listener hashes fields marked with CryptHash an... | true |
d71c46673cbc7f5da7f61b8ee4b33508f19b133c | PHP | rabbaniqibar2302/PHP-WPU | /8.asosiatifarray/latihan1.php | UTF-8 | 285 | 3.21875 | 3 | [] | no_license | <?php
//array
//membuat array
$hari = array("Senin","Selasa","Rabu");
$bulan = ["Januari","Februari","Maret"];
$arr = [100, "teks", true];
// menampilkan array
// versi debugging ( dev )
var_dump($hari);
echo"<br>";
print_r($bulan);
//versi user
//menampilkan 1 elemen pada array
| true |
dc97e2381a82948cb38b2fc8b91ce6f12bec0174 | PHP | hwaunhwan/PHPIntermediate | /Inclass/fall-2015/module-2/Classes.php | UTF-8 | 1,620 | 3.765625 | 4 | [] | no_license | <?php
/*
class Father
{
public $firstName = 'Samir';
protected $favoriteColor = 'Orange'; //extended class can see but not acess
private $socialSecurityNumber = '325-34-8724';//only Father class can see
}
class Child extends Father
{
public function testAccess()
{
// public properties ca... | true |
6ec7efeec91e982a1881e360a0a6e5f2467831cb | PHP | Poniav/p4-louvre | /src/Entity/Tickets.php | UTF-8 | 4,346 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use App\Validator\Tickets as CVTAssert;
/**
* @ORM\Entity(repositoryClass="App\Repository\TicketsRepository")
*/
class Tickets
{
/**
* @const int
*/
public const FULLDAY = 10;
... | true |
82c6b9c3d404f2a6f4c2448f16defe293db24afa | PHP | nathanieldw/PHP-BASIC | /3-Arrays/taak02/index.php | UTF-8 | 451 | 3.0625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<?php
$myCatNames = ['tijger', 'mickey', 'tijger'];
echo "<ul>" . "<li>" . $myCatNames[0] . "</li><li>" . $myCatNames[1] . "</li><li>" . $myCatNames[2] . "</li>" . "</ul>";
$myCatNames[0] = 'panter';
$myCatNames[1] = 'kater';
$myCatNames[2] = 'papagaai';
echo "<br>" . "<ul>" . ... | true |
f58e6b7098d382c64d809f2dd6a1c1343d732d6d | PHP | hexito/php-clamav | /src/Driver/DriverFactory.php | UTF-8 | 933 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Avasil\ClamAv\Driver;
use Avasil\ClamAv\Exception\ConfigurationException;
class DriverFactory
{
const DRIVERS = [
'clamscan' => ClamscanDriver::class,
'clamd_local' => ClamdDriver::class,
'clamd_remote' => ClamdRemoteDriver::class,
'defaul... | true |
f89615fd7e39bcd61691b0a901137576b11f8b33 | PHP | imvkmark/laravel-coverage | /vendor/poppy/faker/src/Provider/Image.php | UTF-8 | 4,795 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Poppy\Faker\Provider;
use InvalidArgumentException;
use RuntimeException;
/**
* Depends on image generation from http://fakeimg.pl/
*/
class Image extends Base
{
/**
* Generate the URL that will return a random image
*
* Set randomize to false to remove the random GET parameter ... | true |
0a7d25709d7aac84ad83b1dc36588aa70e0e2df1 | PHP | AzGonMC/MyGYMManagement_Web | /MyGYMManagement/models/database.class.php | UTF-8 | 2,415 | 3.390625 | 3 | [] | no_license | <?php
require_once "configdb.php";
/*
* Esta clase se encarga de realizar y gestionar la conexión con la base de datos y nos ofrece algunos métodos básicos para trabajar con esta
*/
class Database {
/*
* Estas propiedades guardan los valores de las constantes que hemos incluído para conectarnos a l... | true |
f9e9a5924eab1a0c3f678bbbef117b0b522a588f | PHP | alazarte/simpleCsvParser | /src/ParseCsv.php | UTF-8 | 3,818 | 3.1875 | 3 | [] | no_license | <?php
class ParseCsv
{
private $timestamp, $header;
function __construct()
{
$this->timestamp = array();
$this->header = array();
}
private function adds($data)
{
if(isset($this->timestamp[$data[3]]["sums"][$data[0].",synthetic".$data[1]]))
$this->timestamp[... | true |
85a9a983b08408a7131e0aee2fc3b293326412f7 | PHP | LazyShiro/easychat | /app/data/service/RoomService.php | UTF-8 | 1,247 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\data\service;
use app\data\dao\RoomDao;
use app\data\dao\RoomLogDao;
class RoomService
{
protected $roomModel;
public function __construct()
{
$this->roomModel = new RoomDao;
}
public function createRoom(string $name, string $description = '此房间暂无简介', int $memberMax = 1)
{
//暂时废弃
ex... | true |
c7d1f57e0cbc5024e44c7b73b8c076b3b7f28fda | PHP | Seagull-Project-PHP-Framework/seagullframework-cms | /modules/media2/classes/Media2DAO.php | UTF-8 | 7,544 | 2.703125 | 3 | [] | no_license | <?php
/**
* Media data access object.
*
* @package media2
* @author Thomas Goetz
* @author Demian Turner <demian@phpkitchen.com>
* @author Dmitri Lakachauskis <lakiboy83@gmail.com>
*/
class Media2DAO extends SGL_Manager
{
/**
* Returns a singleton Media2DAO instance.
*
* @return Media2DAO
... | true |
830ac4219acaa0b8a5f842ce36bc03001254cbbb | PHP | MadhubanKhatri/student-submission-form-using-PHP | /form.php | UTF-8 | 949 | 2.625 | 3 | [] | no_license | <?php
include("connection.php")
?>
<h1>Student Form Submission</h1>
<form action="" method="GET">
Roll No. <input type="text" name="roll"><br><br>
Name <input type="text" name="name"><br><br>
Class <input type="text" name="class"><br><br>
Phone No. <input type="text" name="phone"><br><br>
Address <input t... | true |
f577f717311fe42ceeb7740aff310d2f24b8eb95 | PHP | gluobe/memegen-webapp-aws | /config.php | UTF-8 | 895 | 2.53125 | 3 | [] | no_license | <?php
#####################
## Global Settings ##
#####################
$yourId = "<your_ID>";
$awsRegion = "eu-west-1"; # Ireland
#$awsRegion = "us-east-2"; # Ohio
$dynamoDBTable = "lab-images-table-$yourId"; # not using cloudformation
#$dynamoDBTable = "lab-cf-images-table-$yourId"; # using cloudformation
$s3Buc... | true |
b00465f9ead797e2715a693b0d93e92ebe7976ac | PHP | kperkhurov/drawing-package | /src/DrawingPackageBundle/Operation/Draw/Service/Service.php | UTF-8 | 1,571 | 2.625 | 3 | [] | no_license | <?php
namespace DrawingPackageBundle\Operation\Draw\Service;
use CommonBundle\Dto\ApiRequestInterface;
use CommonBundle\Dto\ApiResponseInterface;
use CommonBundle\Service\ServiceInterface;
use DrawingPackageBundle\Operation\Draw\DrawingBuilder\DrawingBuilderInterface;
use DrawingPackageBundle\Operation\Draw\DrawingBu... | true |
34a2dde53009af5656da59aa3db6df1cfc47caba | PHP | PG-Momik/MVC-Framework | /core/Request.php | UTF-8 | 1,744 | 2.984375 | 3 | [] | no_license | <?php
namespace momik\simplemvc\core;
class Request
{
/**
* @return string
*/
public function getPath(): string
{
$path = $_SERVER['REQUEST_URI'] ?? "/";
$position = strpos($path, "?");
if ( !$position ) {
return $path;
}
return substr($p... | true |
864f3bb7a1b60c8c0b2be2f51e3747a136b55c03 | PHP | marko-lazic/patterns-php | /composite-units/Unit.php | UTF-8 | 241 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: set.rs
* Date: 18-Apr-17
* Time: 8:16 AM
*/
abstract class Unit
{
public function getComposite()
{
return null;
}
abstract public function bombardStrength(): int;
} | true |
2c74d4bb64e8f404f519a31e2af9662816b232a8 | PHP | k-tomar/AngularTestApp | /search.php | UTF-8 | 394 | 2.5625 | 3 | [] | no_license | <?php
define('SERVICEBASEURL', 'http://itunes.apple.com');
if ($_GET['term'] && $_GET['limit']) {
$opts = array('http'=>array('method'=>"GET"));
$context = stream_context_create($opts);
// Open the file using the HTTP headers set above
$url = SERVICEBASEURL."/search?term={$_GET['term']}&limit={$_GET['limit']}";... | true |
b78eb119cc1b4fdb6e3152797e70735029515592 | PHP | pierrererot/symfony | /src/DataFixtures/CheckpointFixtures.php | UTF-8 | 1,418 | 2.5625 | 3 | [] | no_license | <?php
namespace App\DataFixtures;
use App\Entity\Checkpoint;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
class CheckpointFixtures extends Fixture implements DependentFixtureInterface
{
const REF_PREFIX = "... | true |
13f71face086402658c21fd2838f0551d5e89ed3 | PHP | soarescbm/e-cidade | /e-cidade/src/V3/Modification/Data/Modification.php | UTF-8 | 2,666 | 2.828125 | 3 | [] | no_license | <?php
namespace ECidade\V3\Modification\Data;
use \ECidade\V3\Extension\PackageMetadata;
/**
* @package modification
*/
class Modification extends PackageMetadata {
/**
* @var string
*/
private $group;
/**
* @var array
*/
private $operations = array();
/**
* @var array
*/
private $f... | true |
5fbacaeebfeddbd0901de6375b1eaa0e956030bb | PHP | developer-run/catalog-module | /src/Devrun/CatalogModule/Listeners/FeedListener.php | UTF-8 | 2,511 | 2.65625 | 3 | [] | no_license | <?php
namespace Devrun\CatalogModule\Listeners;
use Devrun\CmsModule\CatalogModule\Facades\FeedFacade;
use Kdyby\Events\Subscriber;
use Nette;
use Nette\Mail\IMailer;
use Nette\Mail\Message;
class FeedListener implements Subscriber
{
/** @var IMailer */
private $mailer;
/** @var Nette\Application\Link... | true |
b3e72e4d789dca2fd1da7532bd0e4660363f2c44 | PHP | mohdqabbani/up-system | /includes/payment_method.php | UTF-8 | 2,152 | 2.828125 | 3 | [] | no_license | <?php
require_once 'connection.php';
class payment_method extends connection {
public $payment_id;
public $reg_id;
public $payment_date;
public $payment_amount;
public $admin_id;
public $received_from;
public $check_no;
public $bank;
public function fetchAll() {
$sql = "SE... | true |
92f61245a99973f0ee0a2ceba54cd841b5a8e148 | PHP | justfachry/fpapl | /apps/modules/loweffortgooglecalendar/domain/repository/UserRepository.php | UTF-8 | 246 | 2.703125 | 3 | [] | no_license | <?php
namespace loweffortgooglecalendar\Domain\Repository;
use loweffortgooglecalendar\Domain\Model\User;
interface UserRepository
{
public function findUser($email, $password):User;
public function register($name, $email, $password);
} | true |
440e26a5b5d709159f3b1e1f25fa7f6f28a431c7 | PHP | gderderian/simpleton | /Upload/simpleton/functions.php | UTF-8 | 4,565 | 2.53125 | 3 | [] | no_license | <?php
// Specify that this theme uses the WP thumbnail feature and we'll say how big the default thumbnail is
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 185, 185 );
// Specify that this theme supports Wordpress 3.0's new menu system (awesome!) and make a menu
add_theme_support( 'nav-menus' );
... | true |
f874dde4cdf6ab9e411759232272c207295cdbce | PHP | edfx5o/Real-Estate-Web-App-API | /app/Http/Controllers/CountryController.php | UTF-8 | 1,190 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Country;
use Illuminate\Http\Request;
class CountryController extends Controller
{
public function create (Request $request) {
$this->validate($request, [
'sortname' => 'required',
'name' => 'required',
'phonecode' => 'req... | true |
17cf7610ac44dd6a19023554f38b923c1d9fa1a5 | PHP | newnoahark/financepro | /finance/qeephp/library/db/cond.php | UTF-8 | 9,293 | 3.296875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
// $Id: cond.php 2282 2009-03-04 13:55:35Z dualface $
/**
* 定义 QDB_Cond 类
*
* @link http://qeephp.com/
* @copyright Copyright (c) 2006-2009 Qeeyuan Inc. {@link http://www.qeeyuan.com}
* @license New BSD License {@link http://qeephp.com/license/}
* @version $Id: cond.php 2282 2009-03-04 13:55:35Z dualface $... | true |
0e86668b7758f39d13af021f80cb6fdd2535e162 | PHP | pkycho92/laravelcoffee | /app/Models/About.php | UTF-8 | 616 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by Reliese Model.
* Date: Tue, 11 Jun 2019 23:16:12 +0000.
*/
namespace App\Models;
use Reliese\Database\Eloquent\Model as Eloquent;
/**
* Class About
*
* @property int $id
* @property string $description
* @property string $image
* @property string $name
* @property int $position
*
... | true |
0e10634fc464ff3cfd1ccff948eacbf2adeff2f7 | PHP | stweiss/FileBasedMiniDMS | /FileBasedMiniDMS.php | UTF-8 | 18,809 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
FileBasedMiniDMS.php by Stefan Weiss (2017-2023)
*/
$version = "0.18";
// set some defaults
$setfiletime = true;
if (is_file(dirname(__FILE__) . "/config.php")) {
include dirname(__FILE__) . "/config.php";
} else {
fwrite(STDERR, "ERROR: Configu... | true |
7b49216f6046fa290e6609a7c2e9e4f8f5b9ad71 | PHP | I70l0teN4ik/kinetiseWP_plugin | /src/KinetiseApi/View.php | UTF-8 | 1,323 | 2.625 | 3 | [] | no_license | <?php
namespace KinetiseApi;
use KinetiseApi\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
class View
{
private $templateDir;
private $template;
private $view;
public function __construct(AbstractController $controller)
{
$this->view = new \stdClass();
... | true |
db746ac874398473a1b49688fa379e87c18d4ea1 | PHP | Husniddin/tz | /console/migrations/m171212_031524_create_promotional_code_table.php | UTF-8 | 1,710 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `promotional_code`.
* Has foreign keys to the tables:
*
* - `tariff_zone`
*/
class m171212_031524_create_promotional_code_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('promoti... | true |
588680cc7abe672edd8b887f607c4d04641e56c5 | PHP | justngobs/Learning-Management-System | /teacher.php | UTF-8 | 4,085 | 2.53125 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
session_start();
if(!isset($_SESSION['loggedin'])){
header('Location: login.php');
exit();
}
$cantcatchme = 0;
if($_SESSION['ulevel'] == 2){
$cantcatchme += 1;
}
if($cantcatchme == 1){
}
else{
echo "You do not have permission to view this page on this server";
exit();
}
?>
<!DOCTYPE html>
<html>
<head... | true |
e59c403c80055ad80683199024b78ba6f31f9e41 | PHP | ohid/eduboard | /database/factories/ModelFactory.php | UTF-8 | 1,916 | 2.578125 | 3 | [] | no_license | <?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding yo... | true |