conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix tests of webserver ext.\n" }, { "from": "human", "value": "--TEST--\nTest response\n--FILE--\n<?php\n\nuse php\\io\\Stream;\nuse php\\net\\ServerSocket;\nuse php\\webserver\\WebServer;\n\nclass Foobar {\n\n}\n\nspl_autoload_register(function ($class) {\n var_...
php
chosen
[ { "from": "system", "value": "Fix test for Laravel 7\n" }, { "from": "human", "value": "<?php\n\nnamespace Code16\\Sharp\\Tests\\Feature;\n\nuse Code16\\Sharp\\Tests\\Feature\\Api\\BaseApiTest;\n\nclass AssetViewComposerTest extends BaseApiTest\n{\n /** @test */\n public function we_can_de...
php
chosen
[ { "from": "system", "value": "Add items types to settings\n" }, { "from": "human", "value": "<?php\ndate_default_timezone_set('Europe/Rome');\n\n$settings = array(\n 'displayErrorDetails' => true,\n\n 'db' => array(\n 'host' => 'CHOOSE_YOUR_SOURCE_HOST',\n 'user' => 'CHOOSE_Y...
php
chosen
[ { "from": "system", "value": "Make Reset button a warning button.\n" }, { "from": "human", "value": "<?php\n\n/**\n * @file\n * template.php\n */\n\n/**\n * Implements hook_preprocess_HOOK().\n */\nfunction bootstrap_serchilo_preprocess_block(&$vars) {\n \n switch ($vars['block_html_id']) {\n\...
php
chosen
[ { "from": "system", "value": "Add Metafield property and method to docblock\n\nSmartCollection has Metafield support, but static analysis will complain unless it is described in the docblock." }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * @author Tareq Mahmood <tareqtms...
php
chosen
[ { "from": "system", "value": "Change path instead of dbName for SQLite driver\n\nSQLite does not have `dbname` parameter (in fact, SQLite databases do not have names - it's always one database per 1 file). So, if useing sqlite, you should\r\n\r\n```\r\n\r\ndoctrine:\r\n dbal:\r\n driver: pdo_sql...
php
chosen
[ { "from": "system", "value": "Fix some bugs - Date : 04/07/2017\n" }, { "from": "human", "value": "<?php\ninclude('classLoad.php');\n//classes loading end\nsession_start();\n//post input processing\n$action = htmlentities($_POST['action']);//this parameter's used to let the dispatcher decide the...
php
chosen
[ { "from": "system", "value": "Update CSS Selector to Match ExHentai Changes" }, { "from": "human", "value": "<?php\n\nclass ExPage_Index extends ExPage_Abstract\n{\n public function isLastPage()\n {\n return (count($this->find('td.ptds + td.ptdd')) > 0);\n }\n\n public functio...
php
chosen
[ { "from": "system", "value": "Increase taskList performance by reducing queries" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Repository;\n\nuse Doctrine\\ORM\\EntityRepository;\n\n/**\n * TaskListsRepository\n *\n * This class was generated by the Doctrine ORM. Add your own cus...
php
chosen
[ { "from": "system", "value": "Revert \"translate via api call\"\n" }, { "from": "human", "value": "<?php\n/**\n * Created by IntelliJ IDEA.\n * User: nikolayyotsov\n * Date: 5/21/17\n * Time: 3:40 PM\n */\n\nnamespace App\\Http\\Controllers;\n\nuse App\\Http\\Client\\TransltrClient;\nuse App\\Wo...
php
chosen
[ { "from": "system", "value": "Set User-Agent to fix gist imports\n" }, { "from": "human", "value": "<?php\nif (!isset($_GET['url'])) die();\n$url = urldecode($_GET['url']);\nif (strpos($url, 'http://', 0) !== 0 && strpos($url, 'https://', 0) !== 0) die();\n\n$ch = curl_init($url);\ncurl_setopt($...
php
chosen
[ { "from": "system", "value": "Fix admin table on mobile devices\n" }, { "from": "human", "value": "@extends('layouts.master')\n\n@section('title', 'Admin Dashboard')\n\n@section('content')\n <div class=\"row justify-content-center mt-2\">\n <div class=\"col-8\">\n <div class...
php
chosen
[ { "from": "system", "value": "Fix - filename not showed for current_page\n" }, { "from": "human", "value": "<?php\n\n/**\n * Call pages by their filename like:\n * {{ pages['page2'].title }}\n *\n * @author James Doyle\n * @link http://ohdoylerules.com/\n * @license http://opensource.org/license...
php
chosen
[ { "from": "system", "value": "Allow CAPTCHA from config file\n" }, { "from": "human", "value": "<?php\n\n$credentials = require __DIR__.'/credentials.php';\n\nforeach (glob(__DIR__.'/includes/*.php') as $file) {\n\trequire_once $file;\n}\n\n$config = [\n\t'rootDir' => __DIR__,\n\t'password...
php
chosen
[ { "from": "system", "value": "Remove spaces that are between > and <\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of HtmlCompress.\n *\n ** (c) 2014 Cees-Jan Kiewiet\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distribu...
php
chosen
[ { "from": "system", "value": "Mark as commented explicitly all encrypted types by default\n" }, { "from": "human", "value": "<?php\n\n/**\n * LICENSE: This file is subject to the terms and conditions defined in\n * file 'LICENSE', which is part of this source code package.\n *\n * @copyright 201...
php
chosen
[ { "from": "system", "value": "Use IntlLocales to get the localized country name\n\nUse IntlLocales to get the localized country name. This saves having to keep a file with translated country names." }, { "from": "human", "value": "<?php\n\nnamespace SilverShop\\ORM\\FieldType;\n\nuse SilverShop\...
php
chosen
[ { "from": "system", "value": "Add locale to tree node event.\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Tadcka package.\n *\n * (c) Tadas Gliaubicas <tadcka89@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that...
php
chosen
[ { "from": "system", "value": "Use just \"jsonDecode\" instead of \"decode\"\n" }, { "from": "human", "value": "<?php\n\nclass CM_Clockwork_Storage_FileSystem extends CM_Clockwork_Storage_Abstract implements CM_Service_ManagerAwareInterface {\n\n use CM_Service_ManagerAwareTrait;\n\n protec...
php
chosen
[ { "from": "system", "value": "Correct docblock for __invoke method\n" }, { "from": "human", "value": "<?php\n\nnamespace DelayedJobs\\Worker;\n\nuse Cake\\Console\\Shell;\nuse DelayedJobs\\DelayedJob\\DelayedJob;\n\n/**\n * Interface for delayed job workers\n */\ninterface JobWorkerInterface\n{\...
php
chosen
[ { "from": "system", "value": "Add details to price calculator interface deprecation annotation\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENS...
php
chosen
[ { "from": "system", "value": "Use user em in list users command\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Command;\n\n\nuse AppBundle\\Service\\DBVersion;\nuse Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand;\nuse Symfony\\Component\\Console\\Helper\\Table...
php
chosen
[ { "from": "system", "value": "Fix path prefixing on unix\n" }, { "from": "human", "value": "<?php\n\nnamespace Isaac\\Services\\Filesystem;\n\nuse League\\Flysystem\\Adapter\\Local;\n\n/**\n * A fork of the Local adapter that grants us permissions to any absolute path\n * instead of working with...
php
chosen
[ { "from": "system", "value": "Change port from argument to option\n" }, { "from": "human", "value": "<?php namespace TightenCo\\Jigsaw\\Console;\n\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\In...
php
chosen
[ { "from": "system", "value": "Add \"prise de note\" subject fixture\n" }, { "from": "human", "value": "<?php\n\nnamespace Ifensl\\Bundle\\PadManagerBundle\\DataFixtures\\ORM;\n\nuse Doctrine\\Common\\DataFixtures\\FixtureInterface;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\nuse Ifensl\\...
php
chosen
[ { "from": "system", "value": "Check if scholarship is open before rendering cta block\n" }, { "from": "human", "value": "{{-- Block Type: Call To Action --}}\n\n<section {{ output_id($block->block_title) }} class=\"segment segment--cta\">\n\n @if (!empty($block->block_title))\n <h1 class=\"h...
php
chosen
[ { "from": "system", "value": "Migrate to usage Mapper aliases\n" }, { "from": "human", "value": "<?php\n/**\n * Complex example of REST controller\n *\n * @category Example\n *\n * @author Anton Shevchuk\n * @created 19.02.15 16:27\n */\nnamespace Application;\n\nuse Application\\Test;\nuse B...
php
chosen
[ { "from": "system", "value": "Update routing table for new Router" }, { "from": "human", "value": "<?php\n\n/**\n * Your Project\n *\n * @copyright 2014 YourCompany\n * @package \\YourCompany\\YourProject\n * @license All Rights Reserved\n */\n\n// Load Escher\nrequire \"escher.php\";\n\n// ...
php
chosen
[ { "from": "system", "value": "Add method to extract unique cities from locations array\n\n" }, { "from": "human", "value": "<?php\nnamespace SepomexPhp;\n\nclass Locations implements \\IteratorAggregate, \\Countable\n{\n /** @var Location[] */\n private $collection;\n\n public function ...
php
chosen
[ { "from": "system", "value": "Fix echo to print SOURCE_NAME\n" }, { "from": "human", "value": "<?php\n\n define(\"SECONDS_BETWEEN_ALERTS\", rand(10, 60));\n define(\"SOURCE_NAME\", \"David's Alerts\");\n\n $alerts = array(\n \"Coldest Air of the Season Sweeping Through Central an...
php
chosen
[ { "from": "system", "value": "Tweak argument unpacking for rendering decorator.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php\n\nnamespace Orchestra\\View;\n\nuse BadMethodCallException;\n\nclass Decorator\n{\n /**\n ...
php
chosen
[ { "from": "system", "value": "Fix issue with logger not having logQuery method" }, { "from": "human", "value": "<?php\n\nnamespace FOS\\ElasticaBundle;\n\nuse Elastica\\Client as ElasticaClient;\nuse Elastica\\Request;\n\n/**\n * @author Gordon Franke <info@nevalon.de>\n */\nclass Client extends...
php
chosen
[ { "from": "system", "value": "Add coverage of generate method\n" }, { "from": "human", "value": "<?php\n\nnamespace Ramsey\\Uuid\\Test\\Generator;\n\nuse Ramsey\\Uuid\\Generator\\RandomLibAdapter;\nuse Ramsey\\Uuid\\Test\\TestCase;\nuse Mockery;\n\nclass RandomLibAdapterTest extends TestCase\n{\...
php
chosen
[ { "from": "system", "value": "Read locale from the environment\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\n\nuse Symfony\\Component\\Console\\Application;\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\ndate_default_timezone_set('Europe/Madrid');\n\n$loader = new \\Ontic\\...
php
chosen
[ { "from": "system", "value": "Add correct debugging text. Fetch and reeturn CPU and WA CPU\n" }, { "from": "human", "value": "<?php\n\nfunction collect_cpuUsage($debug, $log) {\n $usage = explode(\" \", exec('vmstat 1 2'));\n\t\n\tprint_r($usage);\n\n if ($debug == TRUE) {\n debug(...
php
chosen
[ { "from": "system", "value": "Add assert for uni code charactor of JoBeet\n" }, { "from": "human", "value": "<?php\n// src/JoBeetBundle/Tests/Utils/JoBeetTest.php\n\nnamespace JoBeetBundle\\Tests\\Utils;\nuse JoBeetBundle\\Utils\\JoBeet;\n\nclass JoBeetTest extends \\PHPUnit_Framework_TestCase\n...
php
chosen
[ { "from": "system", "value": "Implemented: Test for anonymizing error messages.\n" }, { "from": "human", "value": "<?php\n\nnamespace QafooLabs\\Profiler;\n\nclass SqlAnonymizerTest extends \\PHPUnit_Framework_TestCase\n{\n static public function dataSqlQuotes()\n {\n return array(\...
php
chosen
[ { "from": "system", "value": "Add a description & documentation URL\n\nFor Craft 2.5 and above.\n" }, { "from": "human", "value": "<?php\nnamespace Craft;\n\nclass RouterPlugin extends BasePlugin\n{\n function getName()\n {\n return Craft::t('Router');\n }\n \n function getVersion()\n...
php
chosen
[ { "from": "system", "value": "Use proper description of what gets transferred\n\nSigned-off-by: Julius Härtl <bf353fa4999f2f148afcc6d8ee6cb1ee74cc07c3@bitgrid.net>\n" }, { "from": "human", "value": "<?php\n\nnamespace OCA\\Deck\\Command;\n\nuse OCA\\Deck\\Service\\BoardService;\nuse Symfony\\Com...
php
chosen
[ { "from": "system", "value": "Add a default value to sessionGet\n" }, { "from": "human", "value": "<?php\n\nnamespace PragmaRX\\Google2FALaravel\\Support;\n\ntrait Session\n{\n /**\n * Make a session var name for.\n *\n * @param null $name\n *\n * @return mixed\n */\n ...
php
chosen
[ { "from": "system", "value": "Remove `@throws` annotation from interface docblock\n" }, { "from": "human", "value": "<?php\n\nnamespace OpenConext\\EngineBlock\\CompatibilityBundle\\Bridge;\n\ninterface MailSenderInterface\n{\n /**\n * @param MailMessage $message\n * @return void\n ...
php
chosen
[ { "from": "system", "value": "Add a missing strict type declaration\n" }, { "from": "human", "value": "<?php\n\nnamespace Regis\\Domain\\Event;\n\nuse Regis\\Domain\\Model\\Github\\PullRequest;\n\nclass PullRequestOpened\n{\n private $pullRequest;\n\n public function __construct(PullReques...
php
chosen
[ { "from": "system", "value": "Revert \"Some add lines to new file\"\n\nThis reverts commit 292a1d1e1b3fd13dcbb2904a11b53dfea0dd3027.\n" }, { "from": "human", "value": "<?php\n\n\techo \"Adding this new php file to the project to see how it works\";\n\techo \"Oops forgot to add this line! Brendan...
php
chosen
[ { "from": "system", "value": "Update error controller to work with twig\n" }, { "from": "human", "value": "<?php \n\nnamespace App;\n\nclass ErrorController\n{\n /**\n * Array of error template filenames\n * \n * @var string[]\n */\n protected $templates = [\n 'error...
php
chosen
[ { "from": "system", "value": "Fix small typo in BTV nowplaying adapter.\n" }, { "from": "human", "value": "<?php\nnamespace PVL\\NowPlayingAdapter;\n\nuse \\Entity\\Station;\n\nclass BronyTV extends AdapterAbstract\n{\n /* Process a nowplaying record. */\n protected function _process(&$np)...
php
chosen
[ { "from": "system", "value": "Update controller instantiation system to match Bolt updates\n" }, { "from": "human", "value": "<?php\n\trequire(\"vendor/autoload.php\");\n\n\tdefine(\"ROOT_SERVER\", __DIR__ . \"/\");\n\n\trequire_once(ROOT_SERVER . \"library/config.php\");\n\n\tset_error_handler(...
php
chosen
[ { "from": "system", "value": "Add shift field to exported csv\n" }, { "from": "human", "value": "<!DOCTYPE html>\n<html>\n<table>\n <tr>\n <th>Course ID</th>\n <th>Course</th>\n <th>Student ID</th>\n <th>Student Name</th>\n <th>Student E-mail</th>\n <...
php
chosen
[ { "from": "system", "value": "Fix version number and remove obsolete importexport service which is now part of the main aws-sdk-php\n" }, { "from": "human", "value": "<?php\n\nnamespace MvbCoding\\Silex;\n\nuse Aws\\ImportExport\\ImportExportClient;\nuse Aws\\SimpleDb\\SimpleDbClient;\nuse Silex...
php
chosen
[ { "from": "system", "value": "Make group member delete button red!\n" }, { "from": "human", "value": "\r\n<h2>Confirm deletion</h2>\r\n<form action=\"<?php echo URL::base(true,true);?>manage/group/removeMember/<?php echo $id; ?>\" method=\"POST\">\r\n\t<input type=\"hidden\" value=\"1\" name=\"c...
php
chosen
[ { "from": "system", "value": "Update cms image display name\n" }, { "from": "human", "value": "<?php\r\n\r\nnamespace ATPCms\\Model;\r\n\r\nclass Image extends \\ATP\\ActiveRecord\r\n{\r\n}\r\nImage::init();" }, { "from": "gpt", "value": "<?php\r\n\r\nnamespace ATPCms\\Model;\r\n\r\n...
php
chosen
[ { "from": "system", "value": "Append random number to the image URL, make test a bit less CPU intensive\n" }, { "from": "human", "value": "<?php\n\ndate_default_timezone_set('America/New_York');\n\nini_set('zlib.output_compression', 1024);\nini_set('zlib.output_compression_level', 6);\nheader('C...
php
chosen
[ { "from": "system", "value": "Use appropriate key if isMultiple is true\n" }, { "from": "human", "value": "<?php\n\nnamespace Nails\\GeoIp\\Settings;\n\nuse Nails\\GeoIp\\Service\\Driver;\nuse Nails\\Common\\Helper\\Form;\nuse Nails\\Common\\Interfaces;\nuse Nails\\Common\\Service\\FormValidatio...
php
chosen
[ { "from": "system", "value": "Use error response description if available\n" }, { "from": "human", "value": "<?php namespace Ordercloud\\Support\\Http;\n\nuse Exception;\nuse Ordercloud\\OrdercloudException;\n\nclass OrdercloudHttpException extends OrdercloudException\n{\n /**\n * @var Re...
php
chosen
[ { "from": "system", "value": "Use concrete instance of the hash to create an instance\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Phpcq\\Runner\\Updater\\Task;\n\nuse Phpcq\\RepositoryDefinition\\AbstractHash;\nuse Phpcq\\Runner\\Exception\\RuntimeException;...
php
chosen
[ { "from": "system", "value": "Change database load proprity after the page is loaded\n" }, { "from": "human", "value": "<?php\n\n require (SYSTEM_PATH . 'core/Common.php');\n\n $config =& loadClass('Config', 'Core');\n $vendor =& loadClass('Vendor', 'Core');\n\n $input =& loadClass('...
php
chosen
[ { "from": "system", "value": "Update assertion of trait type number\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests\\AppBundle\\API\\Listing;\n\nuse AppBundle\\User\\FennecUser;\nuse Symfony\\Component\\HttpFoundation\\ParameterBag;\nuse Tests\\AppBundle\\API\\WebserviceTestCase;\n\n...
php
chosen
[ { "from": "system", "value": "Include php files in root of project in phpcs check.\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\nchdir(__DIR__);\n\n$returnStatus = null;\npassthru('composer install --dev', $returnStatus);\nif ($returnStatus !== 0) {\n exit(1);\n}\n\npassthru('...
php
chosen
[ { "from": "system", "value": "Add has value check method on carrier interface.\n" }, { "from": "human", "value": "<?php\n\nnamespace Enzyme\\Axiom\\Carriers;\n\n/**\n * Holds a collection of read-only data for instance creation.\n */\ninterface CarrierInterface\n{\n /**\n * Get the associ...
php
chosen
[ { "from": "system", "value": "Add abstract method from interface\n" }, { "from": "human", "value": "<?php\n\nnamespace Larium\\Pay\\Transaction;\n\nuse Larium\\Pay\\TransactionException;\n\ntrait Commit\n{\n /**\n * @var bool\n */\n private $committed = false;\n\n /**\n * {@...
php
chosen
[ { "from": "system", "value": "Fix for HHVM < 3.4 where STDOUT is not defined and \\STDOUT is.\n" }, { "from": "human", "value": "<?php\n\nnamespace League\\CLImate\\Util\\Writer;\n\nclass StdOut implements WriterInterface\n{\n /**\n * Write the content to the stream\n *\n * @param...
php
chosen
[ { "from": "system", "value": "Remove not used extConfig setting\n\nthis gets changed few lines below and defined class doesn't even\nexist.\n" }, { "from": "human", "value": "<?php\nclass Kwc_Advanced_IntegratorTemplate_Component extends Kwc_Abstract\n{\n public static function getSettings($p...
php
chosen
[ { "from": "system", "value": "Add a check for AzureAdapter existance\n" }, { "from": "human", "value": "<?php\n\nnamespace BsbFlysystem\\Adapter\\Factory;\n\nuse WindowsAzure\\Common\\ServicesBuilder;\nuse League\\Flysystem\\Azure\\AzureAdapter as Adapter;\nuse UnexpectedValueException;\nuse Zen...
php
chosen
[ { "from": "system", "value": "Add presenter as last argument(?)\n" }, { "from": "human", "value": "<?php\n\nif (is_dir($vendor = __DIR__ . '/../vendor')) {\n require_once($vendor . '/autoload.php');\n} elseif (is_dir($vendor = __DIR__ . '/../../../vendor')) {\n require_once($vendor . '/aut...
php
chosen
[ { "from": "system", "value": "Fix null error when there's no data\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse App\\Services\\Ranking;\nuse App\\Services\\Slack;\nuse App\\SlackProp;\nuse App\\SlackUser;\n\nclass DashboardController extends Controller\n{\n...
php
chosen
[ { "from": "system", "value": "Add TODO to test mail\n" }, { "from": "human", "value": "<?php\n\nnamespace Myjob\\Http\\Controllers;\n\nuse Auth;\nuse Input;\nuse Myjob\\Models\\Publisher;\nuse Session;\nuse Validator;\nuse Mail;\n\nclass PublishersController extends Controller {\n\n public fu...
php
chosen
[ { "from": "system", "value": "Use new version of js files\n" }, { "from": "human", "value": " <footer>\n <div class=\"row colors\">\n <div class=\"three columns mobile-one yellow\"> </div>\n <div class=\"three columns mobile-one light-blue\"> </div>\n <div class=\"three column...
php
chosen
[ { "from": "system", "value": "Adjust controller classifier to support lumen\n\n" }, { "from": "human", "value": "<?php\n\nnamespace Wnx\\LaravelStats\\Classifiers;\n\nuse Illuminate\\Routing\\Router;\nuse Wnx\\LaravelStats\\ReflectionClass;\nuse Wnx\\LaravelStats\\Contracts\\Classifier;\n\nclass...
php
chosen
[ { "from": "system", "value": "Update service provider to use tags for publish\n" }, { "from": "human", "value": "<?php\r\n\r\nnamespace Conner\\Tagging\\Providers;\r\n\r\nuse Illuminate\\Support\\ServiceProvider;\r\nuse Conner\\Tagging\\Contracts\\TaggingUtility;\r\nuse Conner\\Tagging\\Util;\r\...
php
chosen
[ { "from": "system", "value": "Fix xss issue with search synonym datagrids\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Modules\\Search\\Actions;\n\nuse Backend\\Core\\Engine\\Base\\Action;\nuse Backend\\Core\\Engine\\Authentication as BackendAuthentication;\nuse Backend\\Core\\...
php
chosen
[ { "from": "system", "value": "Comment out test assertions to allow travis build to pass to examine logs after\n" }, { "from": "human", "value": "<?php\n\nnamespace SimplyTestable\\WorkerBundle\\Tests\\Command;\n\nuse SimplyTestable\\WorkerBundle\\Tests\\Command\\ConsoleCommandBaseTestCase;\n\ncl...
php
chosen
[ { "from": "system", "value": "Improve the readability of this SQL\n" }, { "from": "human", "value": "<?php\n\t#\n\t# $Id: ports-expired.php,v 1.2 2006-12-17 12:06:14 dan Exp $\n\t#\n\t# Copyright (c) 1998-2004 DVL Software Limited\n\t#\n\n\trequire_once($_SERVER['DOCUMENT_ROOT'] . '/../include/c...
php
chosen
[ { "from": "system", "value": "Remove unneeded and risky stub parsing\n\nPHPStan already reads these stubs, but in a controlled and safe why. It\ndoes not seem to read global constants yet, which is why we define\nOCI_NO_AUTO_COMMIT if undefined. Might be unneeded in the future too.\n" }, { "from": "...
php
chosen
[ { "from": "system", "value": "Remove requirement to explicitly finish/terminate orchestra/memory\nduring console command.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Extension\\Console;\n\nuse Illu...
php
chosen
[ { "from": "system", "value": "Correct IP when behind proxy\n" }, { "from": "human", "value": "<?php\n\nclass Reportdata extends Model {\n \n function __construct($serial='')\n {\n parent::__construct('id','reportdata'); //primary key, tablename\n\t\t$this->rs['id'] = '';\n\t\t$th...
php
chosen
[ { "from": "system", "value": "Add hooks before and after Controller\n" }, { "from": "human", "value": "<?\nrequire_once (STINGLE_PATH . \"configs/config.inc.php\");\nrequire_once (SITE_CONFIGS_PATH . \"config.inc.php\");\n\nrequire_once (STINGLE_PATH . \"init/init.php\");\n\nHookManager::callHoo...
php
chosen
[ { "from": "system", "value": "[Test] Change testTypeInvalid: string to integer\n" }, { "from": "human", "value": "<?php\n\ninclude 'plan.php';\n\nclass PlanTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @covers ScalarValidator::__invoke\n */\n public function testScalar()\n...
php
chosen
[ { "from": "system", "value": "Fix travis CI build errors\n" }, { "from": "human", "value": "<?php\n\nnamespace Omnipay\\PayPal\\Message;\n\nuse Omnipay\\Common\\CreditCard;\nuse Omnipay\\Tests\\TestCase;\n\nclass RestDeleteCardRequestTest extends TestCase\n{\n /** @var RestDeleteCardRequest *...
php
chosen
[ { "from": "system", "value": "Change more detailed dev exception message\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\nnamespace Onion\\Framework\\Http\\Middleware;\n\nuse Interop\\Http\\Middleware\\DelegateInterface;\nuse Interop\\Http\\Middleware\\ServerMiddlewareInterfac...
php
chosen
[ { "from": "system", "value": "Remove options var\nBoot parent service with credentials\nChange url\n" }, { "from": "human", "value": "<?php\r\nnamespace PhpWatson\\Sdk\\Language\\ToneAnalyser\\V3;\r\n\r\nuse PhpWatson\\Sdk\\Service;\r\n\r\nclass ToneAnalyserService extends Service\r\n{\r\n /*...
php
chosen
[ { "from": "system", "value": "Add the ability to specify public api endpoints in Module's HTTP/Controllers/ApiController\n" }, { "from": "human", "value": "<?php\n\nnamespace TypiCMS\\Modules\\Core\\Http\\Controllers;\n\nuse Illuminate\\Routing\\Controller;\n\nabstract class BaseApiController ex...
php
chosen
[ { "from": "system", "value": "FIX Handle edge case where controller does not have a url_segment defined\n" }, { "from": "human", "value": "<?php\n\nnamespace SilverStripe\\ShareDraftContent\\Extensions;\n\nuse SilverStripe\\Core\\Extension;\nuse SilverStripe\\Security\\Member;\nuse SilverStripe\...
php
chosen
[ { "from": "system", "value": "Switch condition order to support PHP 8" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace Invoker\\ParameterResolver;\n\nuse ReflectionFunctionAbstract;\nuse ReflectionNamedType;\n\n/**\n * Inject entries using type-hints.\n *\n * Tries to...
php
chosen
[ { "from": "system", "value": "Fix Phinx configuration loading settings.\n" }, { "from": "human", "value": "<?php\n/**\n * Phinx Configuration\n * @author John Kloor <kloor@bgsu.edu>\n * @copyright 2016 Bowling Green State University Libraries\n * @license MIT\n * @package Shortener\n */\n\nuse \...
php
chosen
[ { "from": "system", "value": "Fix replying to admin box messages\n\nThis was failing since #861 due to `$senderAccount` not being defined\nwhen there were no ban points.\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\n$message = trim(Request::get('message'));\n$banPoints = R...
php
chosen
[ { "from": "system", "value": "Fix autoload require fatal if installed via composer\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\n/**\n * @author Mougrim <rinat@mougrim.ru>\n */\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\nuse Mougrim\\Deployer\\Kernel\\Request;\nuse Moug...
php
chosen
[ { "from": "system", "value": "Fix a Typo Class Name from Some PHP CS Fixes\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace TestMigrations;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\nuse Doctrine\\Migrations\\AbstractMigration;\n\nclass Version1ResetVversions extend...
php
chosen
[ { "from": "system", "value": "[http-client] Simplify client, remove getters/setters for connectors\n" }, { "from": "human", "value": "<?php\n\nnamespace React\\HttpClient;\n\nuse Guzzle\\Http\\Message\\Request as GuzzleRequest;\nuse React\\EventLoop\\LoopInterface;\nuse React\\HttpClient\\Reques...
php
chosen
[ { "from": "system", "value": "feat(mobile-theme): Set mobile theme on install\n" }, { "from": "human", "value": "<?php defined('APPLICATION') or die();\n/**\n * Sample implementation of a theme hooks class to show\n * the use of custom Smarty plugins.\n */\nclass SanmyakuThemeHooks implements Gd...
php
chosen
[ { "from": "system", "value": "Fix loading for Symfony 3 projects\n\nIn Symfony 3 the autoload file should always be loaded, and then the\ncache file\nThis still works for Symfony 2 projects as the bootstrap uses\nrequire_once for autoload\n" }, { "from": "human", "value": "<?php\n\nnamespace Bor...
php
chosen
[ { "from": "system", "value": "Add initial structure to authenticate and parse arguments\n" }, { "from": "human", "value": "<?php\n\nrequire_once('functions.php');\n\necho $_SERVER['QUERY_STRING'];\n\n// Split query string and perform actions based on it with conditional includes\n\n?>\n" }, ...
php
chosen
[ { "from": "system", "value": "Set paths tmp to development.\nNeed to write a env fix for that.\n" }, { "from": "human", "value": "<?php\n\nnamespace jorenvanhocht\\Blogify\\Commands;\n\nuse Illuminate\\Console\\Command;\n\nclass BlogifyMigrateCommand extends Command\n{\n\n /**\n * The con...
php
chosen
[ { "from": "system", "value": "Fix the icons of menu.\n" }, { "from": "human", "value": "<?php\n\nnamespace app\\components;\n\nuse app\\models\\Subscription;\nuse Yii;\n\n/**\n * Description of FavMenuHelper\n *\n * @author charles\n */\nclass FavMenuHelper\n{\n\n public static function getFa...
php
chosen
[ { "from": "system", "value": "Set some spread times for tasks.\n" }, { "from": "human", "value": "<?php\n\nnamespace Siggy\\Console;\n\nuse Illuminate\\Console\\Scheduling\\Schedule;\nuse Illuminate\\Foundation\\Console\\Kernel as ConsoleKernel;\n\nclass Kernel extends ConsoleKernel\n{\n\t/**\n\...
php
chosen
[ { "from": "system", "value": "Add a test to verify service name-based transformers.\n" }, { "from": "human", "value": "<?php\n\nnamespace Crell\\TransformerBundle\\Tests;\n\nuse Crell\\Transformer\\Tests\\MethodConverterTest;\nuse Crell\\Transformer\\Tests\\TestA;\nuse Crell\\Transformer\\Tests\...
php
chosen
[ { "from": "system", "value": "Add exception when mysql is not support for fulltext index\n" }, { "from": "human", "value": "<?php namespace Octommerce\\Octommerce\\Updates;\n\nuse DB;\nuse Schema;\nuse October\\Rain\\Database\\Updates\\Migration;\n\nclass AddFulltextIndexToProductsTable extends ...
php
chosen
[ { "from": "system", "value": "Make this slightly less as simple as possible\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n/*\n * This file is part of PHPUnit.\n *\n * (c) Sebastian Bergmann <sebastian@phpunit.de>\n *\n * For the full copyright and license information, please...
php
chosen
[ { "from": "system", "value": "Remove unused code (codavy issue)\n" }, { "from": "human", "value": "<?php\n\nnamespace Bauhaus\\DependencyInjection;\n\nclass FakeService\n{\n private $privAttr1 = 'someValue';\n private $privAttr2 = null;\n private $privAttr3 = null;\n public $pubAttr1...
php
chosen
[ { "from": "system", "value": "Allow a controller to accept non-json data by setting route attribute\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Contao Manager.\n *\n * (c) Contao Association\n *\n * @license LGPL-3.0-or-later\n */\n\nnamespace Contao\\ManagerApi\\Even...
php
chosen
[ { "from": "system", "value": "Return json from all schema controller paths\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse App\\Repositories\\SchemaRepository;\nuse Illuminate\\Contracts\\Filesystem\\FileNotFoundException;\nuse Illuminate\\Contracts\\Filesyst...
php
chosen
[ { "from": "system", "value": "Fix auth, using Europe/Prague timezone to get right hour for auth\n" }, { "from": "human", "value": "<?php\nnamespace Lubos\\Wedos\\Shell;\n\nuse Cake\\Console\\Shell;\nuse Cake\\Core\\Configure;\nuse Cake\\Network\\Http\\Client;\n\nclass WedosShell extends Shell\n{...
php
chosen