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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
7fd7a34ca9eb6521bc71c6d3a2727e4b616c1bf9 | PHP | aringheadrian/CityAlerts_HackTM_2014 | /admin/add_article.php | UTF-8 | 3,846 | 2.59375 | 3 | [] | no_license | <?php
//Include the common file
require '../common.php';
//Check if the user is logged in
if (!$authentication->loggedIn() || !$authentication->isAdmin()) header("Location: login.php");
//Categories
function categories($parent_id,$language)
{
global $db;
$categories = array();
foreach ($db->query("SELEC... | true |
40f162c51f6070cdb65bbeaca6464e71f60139fd | PHP | smishadhin/SpdU | /vrctyWeb/public/superadmin.php | UTF-8 | 4,655 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php require_once("../includes/functions.php"); ?>
<?php
session_start();
$delsuc = "";
if (!logedin()) {
header("Location: index.php?valid=notlogedin");
exit();
}
if (isset($_SESSION['address'])) {
if ($_SESSION['address'] != "superadmin.php") {
redirect_to($_SESSION['id']);
}
if (isset($... | true |
465095b038295f5e3f770665d75bbc7fc5253784 | PHP | lautarogit/TPFinalLaboratorio4 | /DAO/MoviesXGenresDAOAPI.php | UTF-8 | 3,447 | 3.03125 | 3 | [] | no_license | <?php
namespace DAO;
use Models\MoviesXGenres as MoviesXGenres;
class MoviesXGenresDAOAPI
{
private $genreList = array();
public function add(MoviesXGenres $newGenre)
{
$this->retrieveData();
if(!in_array($newGenre,$this->genreList)){
... | true |
d6853c88cd044a7f3fec66134fdd6ca05f94d7e3 | PHP | DavidGoodwin/Propel | /generator/lib/behavior/archivable/templates/queryUpdateWithoutArchive.php | UTF-8 | 640 | 2.65625 | 3 | [
"MIT"
] | permissive |
/**
* Delete records matching the current query without archiving them.
*
* @param array $values Associative array of keys and values to replace
* @param PropelPDO $con an optional connection object
* @param boolean $forceIndividualSaves If false (default), the resulting call is a BasePeer::doUpdat... | true |
0358e81608a9269ea4fa3d463276cda0d4e7ef48 | PHP | jeandev84/MagmaCore__ | /src/Base/Domain/DomainLogicRules.php | UTF-8 | 1,548 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace MagmaCore\Base\Domain;
//use App\Entity\UserEntity;
use MagmaCore\UserManager\UserEntity;
use MagmaCore\Error\Error;
if (!class_exists(UserEntity::class)) {
die('UserEntity class does not exists within the application');
}
class DomainLogicRules
{
/**
* Ensure... | true |
c3b0e1698be1127c37e6118f340c713566622f76 | PHP | abdelrahmanbadr/race-simulation-backend | /app/Domain/Repositories/EloquentHorseRaceRepository.php | UTF-8 | 1,749 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Domain\Repositories;
class EloquentHorseRaceRepository extends BaseEloquentRepository
{
//@todo benchmark this function and reach a better solution
public function getBestThreeResultForEachLastFiveRaces()
{
$races = $this->entity::where("is_finished", 1)->orderBy("id", "desc"... | true |
bad4a297b0bf8c905548ce78b7cf760468cda4ab | PHP | a11057002/Laravel-blog | /app/Services/RegisterService.php | UTF-8 | 578 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Models\Post;
use App\Models\User;
use App\Models\Category;
class RegisterService
{
public function store()
{
// if failed redriect to previous page
$attributes = request()->validate([
'name' => 'required|max:255',
'username' => 'r... | true |
f37809707df43b73b7aeaf9279cb8a26b03bcad5 | PHP | shgysk8zer0/phpapi | /pdologger.php | UTF-8 | 2,892 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace shgysk8zer0\PHPAPI;
use \shgysk8zer0\PHPAPI\Traits\{
ExceptionLoggerTrait,
LoggerInterpolatorTrait,
LoggerLevelsTrait,
PDOAwareTrait,
SPLObserverLoggerTrait,
};
use \shgysk8zer0\PHPAPI\Abstracts\{AbstractLogger};
use \PDO;
use \SPLObserver;
use \InvalidArgumentException;
class PDOLogger exten... | true |
60c474e0677a65e42c734b46d0ee5c302b601ae8 | PHP | cinling/php-ext-lib | /src/vos/api/wechat/WechatRefreshTokenResponse.php | UTF-8 | 733 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace cin\extLib\vos\api\wechat;
/**
* Class WechatRefreshTokenResponse
* @package cin\extLib\vos\api\wechat
*/
class WechatRefreshTokenResponse extends BaseWechatResponse {
/**
* @var string 网页授权接口调用凭证,注意:此access_token与基础支持的access_token不同
*/
public $access_token;
/**
* @var ... | true |
b2b748c2e1754e81f3016db33c5d07697ad37911 | PHP | hi-iwd/request-a-quote | /Block/Customer/Quotes/Grid.php | UTF-8 | 2,903 | 2.546875 | 3 | [] | no_license | <?php
namespace IWD\CartToQuote\Block\Customer\Quotes;
use IWD\CartToQuote\Model\Api\Error;
use Magento\Framework\View\Element\Template;
use IWD\CartToQuote\Model\Api\Customer;
use Psr\Log\LoggerInterface;
/**
* Class Grid
* @package IWD\CartToQuote\Block\Customer\Quotes
*/
class Grid extends Template
{
/**
... | true |
12da0dafdef07092a3bb092bfdd7ed6dca20b8b5 | PHP | WPSHOPLA/Elisponsor_PAY_Module_WP | /send_confirm_email.php | UTF-8 | 2,220 | 2.5625 | 3 | [] | no_license | <?php
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1'."\r\n";
$headers .= "From: www.chulant.com"."\r\n";
if(isset($_GET['action']) && $_GET['action'] == "confirm_prepare_event")
{
//once caterer confirmed the event, we must send email to Org user and Sponsor... | true |
b5dac5a805841b66265c4f39a84cf3b8d32a77e1 | PHP | leo-demetrio/api-achados-perdidos-lumen | /app/Http/Controllers/BaseController.php | UTF-8 | 1,344 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
abstract class BaseController extends Controller
{
protected $class;
public function index()
{
return $this->class::paginate();
}
public function show(int $id): JsonResponse
{
... | true |
5b25271faa320af207a373dbec1447b0bd98fa34 | PHP | pautiina/Ubilling-openpayz | /frontend/citypay/index.php | UTF-8 | 6,831 | 2.625 | 3 | [] | no_license | <?php
/*
* Фронтенд для получения оплат от CITY-PAY в виде GET запроса
* Версия API: http://store.nightfly.biz/st/1384958270/Protocol_City-Pay_20v.3.03.01.pdf
*/
// подключаем API OpenPayz
include ("../../libs/api.openpayz.php");
/**
*
* Check for GET have needed variables
*
* @param $params a... | true |
1598602d596118ba4640900cd1f15d66d0393079 | PHP | swaggest/php-code-builder | /tests/src/PHPUnit/FunctionTest.php | UTF-8 | 1,025 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Swaggest\PhpCodeBuilder\Tests\PHPUnit;
use Swaggest\PhpCodeBuilder\PhpFlags;
use Swaggest\PhpCodeBuilder\PhpFunction;
use Swaggest\PhpCodeBuilder\PhpNamedVar;
use Swaggest\PhpCodeBuilder\PhpStdType;
class FunctionTest extends \PHPUnit_Framework_TestCase
{
public function testBasic()
{
... | true |
9b1834b876af59903e4772c5b2326f8798fcbcdd | PHP | SkyLightMCPE/TPoff | /src/SkyLightMCPE/Main.php | UTF-8 | 2,614 | 2.734375 | 3 | [] | no_license | <?php
namespace SkyLightMCPE;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\event\Listener;
use pocketmine\Player;
use pocketmine\utils\TextFormat;
use pocketmine\plugin\PluginBase;
use pocketmine\event\player\PlayerCommandPreprocessEvent;
class Main extends PluginBase implemen... | true |
6b6b0506f25d5d04abecc16e8c96c1d0805d41ac | PHP | valentininua/Platform | /app/features/bootstrap/SystemContext.php | UTF-8 | 822 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
use Behat\Behat\Context\Context;
use Sanpi\Behatch\HttpCall\Request;
/**
* Class SystemContext
*/
final class SystemContext implements Context
{
/**
* @var \Sanpi\Behatch\HttpCall\Request
*/
private $request;
/**
* Constructor
*
* @param \Sanpi\Behatch\HttpCall\Request $r... | true |
00c24ab1886fc087f2d4de9e2131bb28a8cb8a1e | PHP | Igor2122/blog | /app/Task.php | UTF-8 | 433 | 2.734375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Task extends Model
{
// Adding query scopes to pull different completed and non completed info for example
// query scopes we prefix the method with scope and regular public method
public function scopeincomplete($query)
{
... | true |
93c706ac63ed65cf8d83caa13ae35213cc0bb677 | PHP | NandoKstroNet/phabricator | /src/applications/diffusion/data/DiffusionCommitRef.php | UTF-8 | 1,796 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
final class DiffusionCommitRef extends Phobject {
private $message;
private $authorName;
private $authorEmail;
private $committerName;
private $committerEmail;
private $hashes = array();
public function setHashes(array $hashes) {
$this->hashes = $hashes;
return $this;
}
public functi... | true |
ffe62f51565ce709b8eaec0bfb8a45eb6935068f | PHP | alesub/shlink | /module/Core/test/Exception/InvalidShortCodeExceptionTest.php | UTF-8 | 1,222 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ShlinkioTest\Shlink\Core\Exception;
use Exception;
use PHPUnit\Framework\TestCase;
use Shlinkio\Shlink\Core\Exception\InvalidShortCodeException;
use Throwable;
class InvalidShortCodeExceptionTest extends TestCase
{
/**
* @test
* @dataProvider providePrevious
... | true |
85b89df7d007c689b0209800d0546d798f6e5da3 | PHP | shouc/corbfuzz | /php/ext/gd/tests/imagexbm_nullbyte_injection.phpt | UTF-8 | 365 | 2.578125 | 3 | [
"MIT",
"GD",
"BSD-3-Clause",
"BSD-4-Clause-UC",
"ISC",
"IJG",
"Zlib",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-other-permissive",
"TCL",
"BSD-2-Clause",
"OLDAP-2.8",
"PHP-3.01",
"Apache-2.0"
] | permissive | --TEST--
Testing null byte injection in imagexbm
--SKIPIF--
<?php
if(!extension_loaded('gd')) die('skip gd extension not available');
?>
--FILE--
<?php
$image = imagecreate(1,1);// 1px image
var_dump(imagexbm($image, "./foo\0bar"));
?>
===DONE===
--EXPECTF--
Warning: imagexbm() expects parameter 2 to be a valid path, s... | true |
56c0737a2345afe509a64dcc5eff5561bc127a99 | PHP | MagangIAP2/TA-bewokk | /app/Imports/TransactionImport.php | UTF-8 | 473 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Imports;
use App\Models\Transaction;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class TransactionImport implements ToModel, WithHeadingRow
{
public function model(array $row)
{
return new Transaction([
'product_id' => $row['p... | true |
74c878aee7d1f678043538e6aaca23242e9c5948 | PHP | ExiteCMS/ExiteCMS7-Modules | /gallery/platform/fs_unix.php | UTF-8 | 4,365 | 2.765625 | 3 | [] | no_license | <?php
/*
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2007 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License... | true |
478a214548703a097beb421601ec7e66b166af48 | PHP | vanshi30/Day5 | /function.php | UTF-8 | 17,110 | 3.75 | 4 | [] | no_license | <html>
<head>
<title>array functions</title>
</head>
<body style="background-color: rgb(189, 241, 141)">
<h1 style="background-color: pink" align="center"><i>ARRAY FUNCTIONS</i></h1>
<?php
echo "<ul>";
echo "<li>";
echo "<h2>count()</h2>";
... | true |
7987c53a13160140f7c2cec99a2792627935ec69 | PHP | MKelm/papaya-cms | /papaya-lib/modules/_base/community/cronjob_clear_oldrequests.php | UTF-8 | 2,455 | 2.515625 | 3 | [] | no_license | <?php
/**
* Cronjob module that deletes old registrations for surfers who never became valid,
* as well as expired change requests.
*
* @copyright 2002-2009 by papaya Software GmbH - All rights reserved.
* @link http://www.papaya-cms.com/
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU General Publ... | true |
dad674a00f1a1d6521375bfecc6ffa1b7d4bad0b | PHP | wanganrao/dbmgmt | /index.php | UTF-8 | 3,697 | 2.859375 | 3 | [] | no_license | <?php
ini_set('max_execution_time', 0); //no limit
/* To manage database */
require_once 'library' . DIRECTORY_SEPARATOR . 'Model.php';
$db = new Model();
echo '<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title></title> </head> <body>';
$question_no = 1;
... | true |
0aad837f0b6615463d601d7b54a255b6da0b65a2 | PHP | patrickgeorge1/HolidayManager | /src/DataFixtures/UserFixture.php | UTF-8 | 2,082 | 2.5625 | 3 | [] | no_license | <?php
namespace App\DataFixtures;
use App\Entity\Demands;
use App\Entity\User;
use App\Repository\UserRepository;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ORM\EntityManagerInterface;
use Faker\Factory;
use Symfony\Component\Form\FormRegistry;
use Symfony... | true |
dfc70cdf19376a7b92d9d1aea64705a7e5d5b8fc | PHP | artsolut/Artigniter_v | /application/models/Configuracion_model_Old.php | UTF-8 | 1,279 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php if ( !defined('BASEPATH') ){ die('Direct access not permited.'); }
<?php
if ( !defined('BASEPATH') ){ die('Direct access not permited.'); }
class Configuracion_model extends CI_Model {
public function exists($key) {
$this->db->from('configuracion');
$this->db->where('configuracion.key', $key );
return ($... | true |
96a94381314e7d15f09b1c40a08a974fef29a480 | PHP | ainode/Building-dynamic-websites | /Bart/Execute_once/latlong_route.php | UTF-8 | 2,040 | 2.78125 | 3 | [] | no_license | <?php
/*
*This code is to be executed once to
*append extra xml elements and text
*nodes from one xml in the address
*http://api.bart.gov....... to
*another xml file on the local hard
* drive.
*
*
*in this case unlike addlatlng.php we are
*adding nodes indicating latitude and
*longitude, fro... | true |
1c51874c3f150368a9f46b6f18b53045c5972542 | PHP | mgsantiagocollado/curso-sistemas-2021 | /2020/8/v2.0/remoteModel.php | UTF-8 | 3,412 | 3.125 | 3 | [] | no_license | <?php
//Conexión al motor de Bases de Datos
$connection = new PDO('mysql:host=127.0.0.1:3306;dbname=abm', 'root', '987654' );
//Ejecutando la conexión en un bloque protegido. En caso de falla X al conectar, se atrapa la excepción
try
{
$connection = new PDO('mysql:host=127.0.0.1:3306;dbname=abm', 'root', '98... | true |
ae4afcb4c853e8adef211a77b545a40ae047ca9a | PHP | lingzhang-lyon/FunTack | /test/index3.php | UTF-8 | 331 | 2.640625 | 3 | [] | no_license | <?php
require_once("../models/database.php");
if(isset($database)) echo "true ";
else echo "false";
global $database;
$sql = "SELECT * ";
$sql .= "FROM users ";
$sql .= "ORDER BY last_name ASC";
$user_set = $database->query($sql);
$user= $database->fetch_array($user_set);
echo $user['last_name'... | true |
2b4bc5e7d9808c1d282734e8e5e8d6fc746a80fe | PHP | ahmetbarut/laravel-full-search | /src/Controllers/FullSearchController.php | UTF-8 | 4,958 | 2.671875 | 3 | [] | no_license | <?php
namespace AhmetBarut\FullSearch\Controllers;
use App\Http\Controllers\Controller;
use Exception;
use Illuminate\Support\Collection;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Gate;
class FullSearchController
{
/**
* stored full-search config
* @var array
*/
protected arr... | true |
c7d2d359bfcfe5e93e7effb976080ff79a4bc1a8 | PHP | gonetil/cpm-programa-jym | /src/Cpm/JovenesBundle/Service/ChapaManager.php | UTF-8 | 10,611 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*
* Created on 04/09/2013
* @author gonetil
* project jym
* Copyleft 2013
*
*/
namespace Cpm\JovenesBundle\Service;
use Cpm\JovenesBundle\Entity\Tanda;
use Cpm\JovenesBundle\Entity\Dia;
use Cpm\JovenesBundle\Entity\AuditorioDia;
use Cpm\JovenesBundle\Entity\Bloque;
use Cpm\JovenesBundle\Entity\Auditorio... | true |
5760f8c2d2335547331d868d21670463989e5555 | PHP | bitobmen/hello | /main/app/Listeners/Bot/NotifyReminderOrder.php | UTF-8 | 522 | 2.75 | 3 | [] | no_license | <?php
namespace App\Listeners\Bot;
use App\Bot\Notifications\NotifyOrderReminder;
use App\Events\Order\ReminderOrder;
/**
* Class NotifyReminderOrder.
*/
class NotifyReminderOrder
{
private NotifyOrderReminder $notifyOrderReminder;
public function __construct(NotifyOrderReminder $notifyOrderReminder)
... | true |
f612b394983080fafe42e303191bbace4a5f361b | PHP | jduvenh/Camagru | /signup2.php | UTF-8 | 2,236 | 2.78125 | 3 | [] | no_license | <?php
require_once "config/setup.php";
if (isset($_POST["submit"]))
{
$email = trim($_POST['email']);
$username = trim($_POST['username']);
$password = sha1(trim($_POST['pass']));
$check = $connection->prepare("SELECT `email` FROM `userinfo` WHERE `email`=?");
$check->bindValue(1, $email);
$check->execut... | true |
28eff077c086978d9efb2cc9f3423057e550dc8e | PHP | alexandrplekhanov/testProj | /tests/RevertFunctionTest.php | UTF-8 | 347 | 2.71875 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
include '../main/RevertFunction.php';
class RevertFunctionTest extends TestCase
{
public function testRevertCharacters()
{
$expected = 'iH! tI si tset-esac.';
$actual = RevertFunction::revertCharacters("Hi! It is test-case.");
$this->assertEquals($... | true |
5158d1a2ab5d76e0867d36ef4df4c7634a616707 | PHP | recoilphp/recoil | /examples/hello-world | UTF-8 | 410 | 2.84375 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env php
<?php
/**
* This example shows how to call one coroutine from another.
*/
declare(strict_types = 1);
require __DIR__ . '/../vendor/autoload.php';
use Recoil\ReferenceKernel\ReferenceKernel;
function hello()
{
echo 'Hello, ';
yield;
}
function world()
{
echo 'world!' . PHP_EOL;
... | true |
ccf42d684a4dc16c475b877ffb3b2a3ba17c36f7 | PHP | soitun/platform-3 | /src/Screen/Components/Cells/Currency.php | UTF-8 | 1,202 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Orchid\Screen\Components\Cells;
use Illuminate\Support\Str;
use Illuminate\View\Component;
class Currency extends Component
{
/**
* Create a new component instance.
*
* @param float $value
* @param int $decimals
* @param string|null $decimal_separator
*... | true |
5cc7e7ce80bd672e9d929e84b5e2af8130df9b06 | PHP | yosefbennywidyo/GoIgniter | /application/core/Module_Migrator.php | UTF-8 | 2,887 | 2.75 | 3 | [
"MIT"
] | permissive | <?php defined('BASEPATH') OR exit('No direct script access allowed');
class Module_Migrator extends CI_Model
{
protected $migration_config;
protected $migration_error;
public function __construct()
{
// get the pre-processed configuration
$this->migration_config = $this->load->get_libr... | true |
2185cd0bcc3e110c74701bc099159af457cbf371 | PHP | bricre/amazon-selling-partner-sdk-fulfillment-outbound | /src/Model/Feature.php | UTF-8 | 555 | 2.515625 | 3 | [] | no_license | <?php
namespace Amz\FulfillmentOutbound\Model;
use OpenAPI\Runtime\AbstractModel as AbstractModel;
/**
* A Multi-Channel Fulfillment feature.
*/
class Feature extends AbstractModel
{
/**
* The feature name.
*
* @var string
*/
public $featureName = null;
/**
* The feature descr... | true |
240081def8e2d2e75dda2e8db2ea49555b933928 | PHP | MartinPerez23/PHP-LibreriaEnigma | /panel/crear_img.php | UTF-8 | 2,178 | 2.6875 | 3 | [] | no_license | <?php
// archivo que procesa los datos mandados desde upload
require_once("../funciones.php");
require_once "../vendor/autoload.php";
//compruebo que exista la variable mandada por POST
if(empty($_POST["nombre"])){
\Clases\Sesion::start();
\Clases\Sesion::set("error","nombre");
header("Location: index.p... | true |
d8efe64ed18b15f3d089440d30b5cf95e1e7389f | PHP | zweisteinexp/NetUnion | /application/models/admin/model_user.php | UTF-8 | 2,427 | 2.53125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Model_User extends MY_Model
{
private $_table = '`union_user`';
private $info_table = '`union_user_data`';
public function __construct()
{
parent::__construct();
}
public function get_user_info($conditions = array(), ... | true |
aa842d076bea8c45a209038d662d316fc58c5e1b | PHP | sou59/php | /N2/Exemples/chapitre3-autres-design-patterns/Iterator/Vehicule.class.php | UTF-8 | 430 | 3.09375 | 3 | [] | no_license | <?php
namespace Iterator;
require_once '..\Outils.class.php';
require_once 'Element.class.php';
class Vehicule extends Element
{
/**
*
* @param string $description
*/
public function __construct($description)
{
parent::__construct($description);
}
public function affiche()... | true |
fa0a30d44d12e09275b65b380074698962cf1f61 | PHP | rrickgauer/JobSearch | /src/functions.php | UTF-8 | 14,333 | 2.921875 | 3 | [] | no_license | <?php
function dbConnect() {
include('db-info.php');
try {
// connect to database
$pdo = new PDO("mysql:host=$host;dbname=$dbName",$user,$password);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
return $pdo;
} catch(PDOexception $e) {
return 0;
}
}
function getAllCompani... | true |
d735634bb4968b6d910adebafc0a0520f7ee7ad0 | PHP | chitraphp/tasks_wednesday | /app/app.php | UTF-8 | 2,424 | 2.828125 | 3 | [] | no_license | <?php
require_once __DIR__."/../vendor/autoload.php";
require_once __DIR__."/../src/Task.php";
session_start();
if(empty($_SESSION['list_of_tasks'])){
$_SESSION['list_of_tasks'] = array();
}
$app = new Silex\Application();
$app->register(new Silex\Provider\TwigServiceProvider(),... | true |
5c130faf8d7ba60488e67fb6ec116d9687ad17f4 | PHP | EidosMedia/cobalt.php-old | /src/Commons/PaginatedResult.php | UTF-8 | 428 | 2.546875 | 3 | [] | no_license | <?php
namespace Eidosmedia\Cobalt\Commons;
class PaginatedResult {
private $result;
private $count;
private $offset;
private $limit;
public function __construct($result, $count, $offset, $limit) {
$this->result = $result;
$this->count = $count;
$this->offset = $offset;
... | true |
a8af48e7179b1b5274808135e24add326db34ec7 | PHP | mosedu/mail01 | /components/OnerequareValidator.php | UTF-8 | 3,367 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: KozminVA
* Date: 13.04.2016
* Time: 15:49
*/
namespace app\components;
use Yii;
use yii\validators\Validator;
use yii\base\InvalidConfigException;
use yii\helpers\Html;
class OnerequareValidator extends Validator {
/**
* @var array
*
* list of attribu... | true |
81d0b8d5bd65369e3755229100cc9df7aa498b31 | PHP | bestope2021/logisticsApi | /src/Common/PackageLabelLogisticsInterface.php | UTF-8 | 633 | 2.703125 | 3 | [] | no_license | <?php
/**
*
* User: blaine
* Date: 2/22/21
*/
namespace smiler\logistics\Common;
/**
* Interface PackageLabelLogisticsInterface
* @package smiler\logistics
* 物流标签
*/
interface PackageLabelLogisticsInterface
{
/**
* 获取订单标签
* @param $params['trackNumber'] 物流运单号、系统单号、物流商单号 todo 以物流商文档为准
* @pa... | true |
1e2986b4571da64df926b77485282f8642388288 | PHP | PocketKiller/SurvivalChests | /src/PocketKiller/SurvivalChests/command/SurvivalChestsCmd.php | UTF-8 | 1,903 | 2.8125 | 3 | [] | no_license | <?php
namespace PocketKiller\SurvivalChests\command;
use PocketKiller\SurvivalChests\Loader;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\utils\Config;
class SurvivalChestsCmd extends Command{
private $plugin;
public function __construct(Loader $plugin){
paren... | true |
34e72452cb0e07f30526baa8acca3e30bd8783c8 | PHP | sivarajankumar/storycards | /pdo/user.php | UTF-8 | 669 | 2.9375 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: kbatchelor
* Date: 10/21/13
* Time: 1:59 PM
*/
class User{
public $username;
public $password;
public $type;
public $datecreated;
public $active;
function __construct($id=null, $username=null, $password=null,$type=type, $datec... | true |
83a46596fb9c12123f7e7c1b6779b861d7a2ae12 | PHP | 4D1B/Restaurant-Management-System | /regi_validate.php | UTF-8 | 2,711 | 2.65625 | 3 | [] | no_license | <?php
$file=fopen('db.txt','a') or die("fle open error");
$c=0;
$name = $email = $gender = $comment = "";
print_r($_POST);
if($_SERVER["REQUEST_METHOD"]=="POST")
{
$name=$_POST["First_Name"];
$ln=$_POST["Last_Name"];
$phone=$_POST["phn"];
//$email=$_POST["email"];
$day=$_POST["day"];
$month=$_POST["month"];
$year... | true |
deed9cea27e0f611ec1ef664b12d07fd5b449bf1 | PHP | zserg84/postgkh-engine | /StoredProcedureStore.php | UTF-8 | 1,196 | 2.96875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: sz
* Date: 05.06.17
* Time: 11:53
*/
namespace postgkhEngine;
use postgkhEngine\db_drivers\DbDriver;
class StoredProcedureStore
{
/**
* @var array
*/
protected static $_instances = [];
/**
* @param $procedure
* @param DbDriver $driver
... | true |
b28367f36055f902c2750c10403fd2dd13e13740 | PHP | neexay/php-forum | /controllers/SecurityController.php | UTF-8 | 4,511 | 2.765625 | 3 | [] | no_license | <?php
require 'models/Model_Users.php';
class SecurityController extends Controller
{
public function actionSignIn()
{
$this->renderView('', 'pages/security/SignIn_Page');
return $this;
}
public function actionSignUp()
{
$this->renderView('', 'pages/security/SignUp_Page');... | true |
1edb067afa70faff807e3894e98f4c8e6c4d48e8 | PHP | AudioVisuaali/Audiovisuaali-Url | /pages/create.php | UTF-8 | 2,890 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
// Error log
//ini_set('display_errors', 1);
//error_reporting(~0);
// _POST
$alias = trim($_GET["create_alias"]);
$url = trim($_GET["create_url"]);
// Create random string
function randomString($length = 8) {
// Allowed characters
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDE... | true |
b1e7517470cb5e83ff555664fbf8d42126365906 | PHP | potter1326/postoffice | /function.php | UTF-8 | 566 | 2.578125 | 3 | [] | no_license | <?php
function displaydate($x) {
$thai_m=array("ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.");
$date_array=explode("-",$x);
$y=$date_array[0];
$m=$date_array[1]-1;
$d=$date_array[2];
$m=$thai_m[$m];
$y=$y+543;
$displaydate="$d $m $y";
return $displaydate;
... | true |
fd8561c254e29627670b70bce576e7da0ad26f29 | PHP | Bachika/midterm | /midterm/view/insert.php | UTF-8 | 666 | 2.59375 | 3 | [] | no_license | <?php
if(isset($_POST['insertbutton'])){
$sityva = $_POST['sityva'];
$targmani = $_POST['targmani'];
$sql = "INSERT INTO words (sityva, targmani)
VALUES ('$sityva',
'$targmani')";
mysqli_query($connection, $sql);
header('Location: ?top=insert');
}
?>
<article>
<h1>IN... | true |
04317b7596847e92499f83cd7a66db459215e887 | PHP | tourniquet/minClass | /registration.php | UTF-8 | 1,407 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
require_once('./private/initialize.php');
require_once('dbc.php');
$data = $_POST;
$email = db_escape($dbc, trim(strtolower($data['email'])));
$password = db_escape($dbc, password_hash($data['password'], PASSWORD_DEFAULT));
$password_confirmation = db_escape($dbc, $data['passwordConfirmation']);
... | true |
91c9ddda69dac8d05a81a7e4959a09c604931b1c | PHP | frankmicro/ci_php | /application/controllers/Login.php | UTF-8 | 1,614 | 2.734375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* This class describes a login.
*/
class Login extends Auth_Controller {
protected $access = ['login.create'];
protected $_except = ['login.logout','login.index'];
/**
* Constructs a new instance.
*/
function __construct()
{
paren... | true |
1c8b4d8e3d2633069b5887d5bd44ca1d375afd03 | PHP | OttoCh/ComicDatabase_PHP | /Pages/Add.php | UTF-8 | 7,105 | 2.609375 | 3 | [] | no_license | <?php
include_once "../config/core.php";
$page_title = "Login";
$require_login = true;
include_once "../User/login_checker.php";
$access_denied = false;
include_once "../config/database.php";
?>
<!DOCTYPE html>
<html>
<head>
<title>
Add new comic and chapter
</title>
<!-- Latest compiled and minified CS... | true |
f637fed8cc52d84653e0edb0d83a909d0926b28d | PHP | CresQuest/Android-apps | /ampache-3.5.4/ampache-3.5.4/lib/class/tmpplaylist.class.php | UTF-8 | 9,178 | 2.78125 | 3 | [] | no_license | <?php
/*
Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License v2
as published by the Free Software Foundation
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARR... | true |
b468172b66f7bf87e4d7194df5f2749719420d14 | PHP | Turboel/E09-Show-do-Bilhao | /dados.inc | UTF-8 | 729 | 2.578125 | 3 | [] | no_license | <?php
global $perguntas;
$perguntas = array("1 + 1 = ?", "Qual a fruta que se seca para fazer a ameixa seca?", "De qual grupo de samba fez parte o humorista \"Mussum\"?", "Qual desses símbolos significa quilômetro?","Qual é o animal que representa o signo de touro?","Como é chamada a doença que clareou a pele do Micha... | true |
177a88b5a5fb960551d387f2e452a16e677937dd | PHP | juuhe/localhost | /lu/library/phpexcel/Classes/PHPExcel/Reader/OOCalc.php | UTF-8 | 10,771 | 2.71875 | 3 | [] | no_license | <?php
if (!defined('PHPEXCEL_ROOT')) {
define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');
require PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php';
PHPExcel_Autoloader::Register();
PHPExcel_Shared_ZipStreamWrapper::register();
if (ini_get('mbstring.func_overload') & 2) {
throw new Exception('Multibyte function o... | true |
77c7e8a2241d81441357c584ae1f48a5d7f3200f | PHP | srainsdon/HackingSim | /classes/HackSim/Database/core.php | UTF-8 | 851 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: srainsdon
* Date: 4/26/2017
* Time: 5:08 AM
*/
namespace HackSim\Database;
use HackSim\Core\Singleton;
class core extends Singleton
{
private $log;
protected $pdo;
protected $dsn;
function __construct()
{
//$this->log = Logger::getLogger(__N... | true |
ac98ef525ba9fc794fc1c6d59ef622b50f13d74b | PHP | Oktopost/Eddy | /tests/Eddy/Engine/Queue/QueueObjectCreatorTest.php | UTF-8 | 1,880 | 2.609375 | 3 | [] | no_license | <?php
namespace Eddy\Engine\Queue;
use Eddy\Scope;
use Eddy\Base\IConfig;
use Eddy\Base\IEddyQueueObject;
use Eddy\Base\Engine\Queue\IQueueProvider;
use Eddy\Base\Engine\Queue\IQueueObjectCreator;
use Eddy\Base\Engine\Queue\IQueueObjectManager;
use Eddy\Objects\EventObject;
use Eddy\Utils\Config;
use Eddy\Utils\Namin... | true |
b42bc942e53dc4c8fa23ae7d574591d9dda28be0 | PHP | callmez/weikit | /app/Models/User.php | UTF-8 | 1,172 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Cache;
use Laravel\Airlock\HasApiTokens;
class User extends Authenticatable
{
use HasApiTokens, Notifiable;
/**
* The attributes that are mass assi... | true |
68f53b783c20c235563b967aea9da7e59f7afc64 | PHP | trinvh/Readable | /database/migrations/2016_05_04_074505_create_s_collections_table.php | UTF-8 | 896 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSCollectionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('s_collections', function($t) {
$t->in... | true |
c2b135b653c09fabca380f3c71199878374a6f8b | PHP | amare16/poec-agefos-php | /lib/functions.php | UTF-8 | 1,692 | 3.359375 | 3 | [] | no_license | <?php
function majusculeInitiale($str) {
// dans la version actuelle, les caractères accentués
// ne sont pas convertis en majuscule
$initiale = $str[0]; // équivalent à substr($str, 0, 1);
$reste = substr($str, 1);
$initialeMajus = strtoupper($initiale);
$resteMinus = strtolower($reste);
return $initi... | true |
974da103a0d8c6017bb5e6d7f456084ccf8d53db | PHP | 00mjk/rdstation-php | /RDStation/RDStation.php | UTF-8 | 14,529 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace RDStation;
/**
* RDStation
* @author Fabiano Lima <facodeli@gmail.com>
*
* RD Station Help
* @link http://ajuda.rdstation.com.br/hc/pt-br
*/
class RDStation
{
/**
* @access private
* @var string
*/
private $__apiBaseUrl = 'https://www.rdstation.com.br/api/';
/**
... | true |
21737480e179caabd0476ceb4d4efe64da2d2bfb | PHP | chemin2bonheur/o | /plugins/rainlab/weather/components/Weather.php | UTF-8 | 2,831 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php namespace RainLab\Weather\Components;
//TouDoLi Overwrite de ce plugin pour:
//- format nombre
//- Clé APPID
use Cache;
use Request;
use ApplicationException;
use Cms\Classes\ComponentBase;
class Weather extends ComponentBase {
public function componentDetails() {
return [
'name' => 'L... | true |
d067aea789d41438cd1a2d89bd46438650e476e9 | PHP | LinkUpWithMe/LinkUpWith.Me | /startbootstrap-business-casual-1.0.4/php/config.1.php | UTF-8 | 885 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* config.php
*
* Computer Science 50
* Problem Set 7
*
* Configures app.
*/
// display errors, warnings, and notices
ini_set("display_errors", true);
error_reporting(E_ALL);
function render($view, $values = [])
{
// if view exists, rende... | true |
0d54b4eb03b1e0469c50eea59e2b8ce9f7f03465 | PHP | bj7908/project | /php200제/015-vardump(배열의 구조보기).php | UTF-8 | 537 | 2.578125 | 3 | [] | no_license | <?php
$dr = array();
$dr['continent'] =array();
$dr['continent']['america'] = array();
$dr['continent']['america'][0] = '애너하임';
$dr['continent']['america'][1] = '올랜도';
$dr['continent']['asia'] = array();
$dr['continent']['asia'][0] = '우라야스';
$dr['continent']['asia'][1] = '홍콩';
... | true |
74dc6a5461b1459b9dddd41aea7034fffd274269 | PHP | christer155/media | /Classes/Thumbnail/ThumbnailProcessorInterface.php | UTF-8 | 1,217 | 2.671875 | 3 | [] | no_license | <?php
namespace Fab\Media\Thumbnail;
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license informatio... | true |
52dc4ee23b512b4c02da77c8169ed53324ecda7b | PHP | VitaliyIlinov/php_basics_tasks | /5.php | UTF-8 | 194 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Илья
* Date: 30.03.2016
* Time: 19:29
*/
$age=59;
if ($age>=18 and $age<60 ){
echo "Вам еще работать и работать";
}
| true |
2bc444a0414bb254db60dade86ed6deef27c9c87 | PHP | Kogol1/Fjoergyns | /app/Ban.php | UTF-8 | 4,196 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Ban extends Model
{
protected $table = 'litebans_bans';
protected $connection = 'mysql_litebans';
/**
* @return BelongsTo
*/
public function player():... | true |
1cd8c9e6eccc1f466b546fdc69baa37c64c561c7 | PHP | LeeStaySmall/learn-php-oop | /LightSwitch.php | UTF-8 | 1,212 | 3.734375 | 4 | [] | no_license | <?php
/**
* desc : 理解封装以及封装的目的
* num : 3
*/
class LightSwitch
{
private $switch = false;
// open light
public function on(){ // 暴露给外部的打开灯的方法 , 用户只需要调用这个方法就OK, 不需要知道具体怎么连接电源操作的。
$this->connect();
}
// close light
public function off() {
$this->unconnect();
}
public ... | true |
0a877ac7077603269202d7382e3320e942f80ee2 | PHP | TrendingUpward/mufflerandgo | /mail/mandrillMail.php | UTF-8 | 2,071 | 2.546875 | 3 | [] | no_license | <?php
include('../inc/config.php');
// Sending Account Settings - replace these details with an email account held on the SMTP server entered above.
// These 2 settings are only required if you choose 'smtp' for emailMethod above.
$sendingAccountUsername = 'leads@mufflerandgo.com';
// Recipient (To:) Details - Ch... | true |
94bb9635f003ac6784eb1ea12842002619a5ec82 | PHP | Maggan22/wbb3addons | /wbb/portal/de.mailman.wbb.portal.box.stickyTopics/files/lib/data/boxes/StickyTopicsBox.class.php | UTF-8 | 1,202 | 2.578125 | 3 | [] | no_license | <?php
/* $Id$ */
class StickyTopicsBox {
protected $StickyTopicsData = array();
public function __construct($data, $boxname = "") {
$this->StickyTopicsData['templatename'] = "stickyTopicsBox";
$this->getBoxStatus($data);
$this->StickyTopicsData['boxID'] = $data['boxID'];
$this->StickyTopicsData['topics'] = a... | true |
586976a83a78698b4bce9c0e963148082e1426b8 | PHP | NarinderSingh-1/AbroadMentor | /app/Http/Controllers/Auth/RegisterController.php | UTF-8 | 2,969 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\UserMeta;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Foundation\Auth\RegistersUsers;
class RegisterController extends Controller
{
/*
|----------------------------... | true |
ed7f0f41a7a32c9f6d02b05dc80c70fe7703141c | PHP | ncux/PHP | /regex preg_match() function.php | UTF-8 | 212 | 2.921875 | 3 | [] | no_license |
<?php
$pattern = "/ca[kf]e/";
$text = "He was eating cake in the cafe.";
$match = preg_match($pattern, $text);
if($match){
echo $match . " Match found!";
} else{
echo "Match not found.";
}
?>
| true |
49c24a8cd24e53b657aeea17f60edfeb8e414978 | PHP | wp-cli/wp-cli | /tests/test-wp-cli.php | UTF-8 | 441 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use WP_CLI\Tests\TestCase;
class WP_CLI_Test extends TestCase {
public function testGetPHPBinary() {
$this->assertSame( WP_CLI\Utils\get_php_binary(), WP_CLI::get_php_binary() );
}
public function testErrorToString() {
$this->expectException( 'InvalidArgumentException' );
$this->expectExceptionMessag... | true |
bedf03c34953ad98fdb0f8868569b3a239ced408 | PHP | KefirchickTod/keperis-core | /Keperis/Core/easyCreateHTML.php | UTF-8 | 5,661 | 2.796875 | 3 | [] | no_license | <?php
namespace Keperis\Core;
use Closure;
class easyCreateHTML
{
public static $toolBar = '';
/** @var array */
protected static $noCloseTags = [
'area',
'base',
'br',
'col',
'frame',
'hr',
'img',
'input',
'link',
'meta',... | true |
a72ef07467031b2fb16def306b314c434a025846 | PHP | falgunlodaya/ShoppingCart | /add to cart/heu.php | UTF-8 | 683 | 2.59375 | 3 | [] | no_license | <?php
echo $heuristic=$_POST['name'];
$arr=explode(' ',$heuristic);
print_r($arr);
$conn=mysqli_connect('localhost','root','','wtlevel2');
if(!$conn)
{
die("connection failed:".mysqli_connect_error());
}
for($i=0;$i<count($arr);$i++)
{
echo $sql="select * from keyword where keyword_word = '$arr[$i]... | true |
5d7310b25ee50bc0477185024ec9f804f30f9542 | PHP | jooorooo/omniship | /src/Traits/Convert.php | UTF-8 | 2,131 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: joro
* Date: 20.6.2017 г.
* Time: 16:34 ч.
*/
namespace Omniship\Traits;
use Crisu83\Conversion\Quantity\Length\Length;
use Crisu83\Conversion\Quantity\Mass\Mass;
use Omniship\Exceptions\InvalidArgumentException;
trait Convert
{
/**
* @param string $key
* ... | true |
3846d1c75e50829ecd7f334c6cbad45c76ad8da8 | PHP | nick-cd/web306 | /lectures/web306-day8-composer-libraries-web306/utilities/AutoLoader.php | UTF-8 | 2,839 | 3.59375 | 4 | [] | no_license | <?php
/**
* Autoloading
*
* In order for our namespaces to work we need to create a class with a method which will ensure that whenever create a new object our object's class will be automatically loaded ino a given file so that we don't need to require it.
*
* This class will be a singleton so it will need to d... | true |
da302db91f7fa96ea34bdb7b85ed149b6ea07a8a | PHP | JQNguyen15/messageboard | /proj/forgot.php | UTF-8 | 2,273 | 2.640625 | 3 | [] | no_license | <?php
require_once('includes/include.php');
generateHeader('Main Page');
logoNav();
//redirect if user is logged in already
if (isset($_SESSION['auth'])){
header("Location: index.php");
}
?>
<div class="well well-lg">
<?php if (isset($_REQUEST['submit']) && (checkEmail($_POST['inputEmail'])==1)) { // email... | true |
b6d57f7c8eb351f0f9caf758f6bf494f549c240c | PHP | barisgunduz/instafeed | /instaself.php | UTF-8 | 556 | 2.625 | 3 | [] | no_license | <?php
$instagram_url = 'https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS_TOKEN';
$instagram_json = file_get_contents($instagram_url);
$instagram_array = json_decode($instagram_json, true);
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
if(!empty($instagram_array))... | true |
16251424c70f48882a2a3429fd5a9896978e7cd7 | PHP | phpbb/dev-hooks | /src/Listener/PullRequestJiraTicket.php | UTF-8 | 3,004 | 2.59375 | 3 | [] | no_license | <?php
/**
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*/
namespace Phpbb\DevHooks\Listener;
use chobie\Jira\Api as JiraClient;
use Phpbb\DevHooks\Helper\GithubHelper;
class PullRequestJiraTicket implements Listener
{
protected $githubHelper;
... | true |
a4f0a751d35ae39d553f793089d3bc46357118f8 | PHP | AdrianRomeroRamirez/Tarea_6_servidor | /obtenerTabla.php | UTF-8 | 723 | 2.84375 | 3 | [] | no_license | <?php
// Archivo que devuelve la lista de productos
include('claseDB.php');
try {
$con = claseDB::conexionBD();
$query = 'SELECT * from producto';
$result = $con->prepare($query);
$result->execute();
$array = array();
while ($row = $result->fetch()) {
$array[] = array(
'cod... | true |
083846d79f294aacf8df847c56a04896cb0829c2 | PHP | db1group/MestreDosCodigosPhpChecker | /test/superglobal/SuperGlobalTest.php | UTF-8 | 1,248 | 3.171875 | 3 | [] | no_license | <?php
namespace Test;
use PHPUnit\Framework\Assert;
use PHPUnit\Framework\TestCase;
class SuperGlobalTest extends TestCase {
const ERROR_MESSAGE_WITHOUT_CORRECT_ANSWERS_CLUE = 'You didn\'t answer correctly the superglobal exercise';
/** @test */
public function givenThePrintedResponse_shouldBeTheCorrectAnswerTo... | true |
f23c2e941a5524b38172bb48dd477063250f23e4 | PHP | selimhehe/gestsup-exemple | /newticket_useradd.php | ISO-8859-2 | 4,135 | 2.625 | 3 | [] | no_license | <?php
/*
Author: Flox
FileName: newticket_useradd.php
Description: add and modify user
Version: 1.2
Last Update: 17/10/2012
*/
//Initialize variables
if(!isset($_GET ['id'])) $_GET['id'] = '';
if(!isset($_POST['Valider'])) $_POST['Valider'] = '';
if(!isset($_POST['Modifier'])) $_POST['Modifier'] = '';
... | true |
789af246b239aea639494d675153d119e5fd67df | PHP | xiebruce/PicUploader | /vendor/microsoft/microsoft-graph/src/Beta/Microsoft/Graph/SecurityNamespace/Model/MetadataAction.php | UTF-8 | 2,695 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
*
* MetadataAction File
* PHP version 7
*
* @category Library
* @package Microsoft.Graph
* @copyright (c) Microsoft Corporation. All rights reserved.
* @l... | true |
053718d1e9102c4828ceb12751275377d5b29afb | PHP | ahmadirfanmaulana/vaccinify | /database/seeders/SpotTableSeeder.php | UTF-8 | 1,765 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use App\Models\Regional;
use App\Models\Spot;
use App\Models\SpotVaccine;
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
class SpotTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
... | true |
a15427b706499d80abbe003f5015b6762a1a4e06 | PHP | roselleebarle04/alliswelloutsourcing-test | /q1/solution.php | UTF-8 | 607 | 3.34375 | 3 | [] | no_license | <?php
function buildDateTime($str){
$year = substr($str, 0, 4);
$month = substr($str, 4, 2);
$day = substr($str, 6, 2);
$hour = substr($str, 8, 2);
$minute = substr($str, 10, 2);
$second = substr($str, 12, 2);
$output = mktime($hour, $minute, $second, $month, $day, $year);
return new DateTime(date("Y-m-d H:i:... | true |
eea4bb1a094a77de0291856873496de98c9a2f50 | PHP | gsnedders/complexpie | /tests/CacheArrayTest.php | UTF-8 | 2,411 | 3.03125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
require_once 'PHPUnit/Framework.php';
require_once '../src/complexpie.php';
class CacheArrayTest extends PHPUnit_Framework_TestCase
{
/**
* This case is simple enough: it just grows to the maximum size.
*/
public function testAppendToMaxSizeWithoutAccess()
{
$array = new \ComplexPi... | true |
9299accf894635362634433f28caf57fbcf6c4d7 | PHP | diegolorenzetti/symfony-etl | /src/Service/ProductExtractor.php | UTF-8 | 674 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Service;
use League\Csv\Reader;
use League\Csv\Statement;
class ProductExtractor
{
/**
*
* @var string
*/
protected $csvFile;
public function __construct(string $csvFile)
{
$this->csvFile = $csvFile;
}
public function extract()
{
$read... | true |
26f0c4005ec38dbec8134ec29383a5c4d28c1a1d | PHP | gervdeleon/Josenian-Inner-Circle | /JIC/softeng/Controller/AccountInfo.php | UTF-8 | 3,515 | 2.890625 | 3 | [] | no_license | <?php
namespace controller;
class AccountInfo{
private $connection;
public function __construct(AccountController $connection){
$this->connection = $connection;
}
public function register($idnum, $username, $password, $firstname, $lastname, $department, $contactnum, $emailadd, $address){
$userTempInfo = a... | true |
4d7bda56997a1c60f2c907db0c4ea745288fa76c | PHP | andrewbess/PhpGtDom | /src/HTMLElement/HTMLInputElement.php | UTF-8 | 22,335 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Gt\Dom\HTMLElement;
use DateTimeImmutable;
use DateTimeInterface;
use Exception;
use Gt\Dom\ClientSide\FileList;
use Gt\Dom\ClientSide\ValidityState;
use Gt\Dom\Exception\ClientSideOnlyFunctionalityException;
use Gt\Dom\Exception\FunctionalityNotAvailableOnServerException;
use Gt\Dom\Facade\NodeListFac... | true |
55a8a375b8cae1403a2c0236f279e3fc77cea214 | PHP | w3apex/PHP-MVC-Blog | /app/Controllers/Front.php | UTF-8 | 566 | 2.625 | 3 | [] | no_license | <?php
/**
* Front Controller
*/
class Front extends Controller {
public function __construct() {
parent::__construct();
}
public function index() {
$data = array();
$catTable = "category";
$catModel = $this->view->model("CatModel");//Model Name // $catModel is an object
$data['cats'] = $catModel->catLi... | true |
7e7bd2c865cfc4fb9f6cceed3fe71635d0bcc2da | PHP | alekstar79/netaggregator | /var/www/netaggregator.ru/src/App/Service/Chat/Photo.php | UTF-8 | 1,433 | 2.625 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace App\Service\Chat;
/**
* Class Photo
* @package App\Service\Chat
*/
class Photo extends Chooser
{
/** @var ChatbotInterface */
private ChatbotInterface $client;
public function __construct(ChatbotInterface $client)
{
$this->mark = self::PHOTO;
$... | true |
97fc651b4326fe2422a640d3cf7319903270ab2d | PHP | jahidhasanshuvo/TextileSolution | /app/Http/Controllers/ColorController.php | UTF-8 | 2,893 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Color;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Session;
class ColorController extends Controller
{
// private $color;
// public function __construct()
// {
//// $this->color = new Color();
// }
... | true |
ad9bd0ac9735b7b1a6f2ce5258add9b2f72521d6 | PHP | neal-an/cas222 | /register/index_.php | UTF-8 | 1,055 | 2.890625 | 3 | [] | no_license | <?php
if (isset($_POST['name']))
{
try {
$pdo = new PDO('mysql:host=localhost;dbname=music', 'music_user', 'mypassword');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->exec('SET NAMES "utf8"');
}
catch (PDOException $e)
{
$error = 'Unable to connec... | true |