conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add the correct classname to the view button in the browse template to be consistent with the other buttons.\n" }, { "from": "human", "value": "<?php\n\nnamespace TCG\\Voyager\\Actions;\n\nclass ViewAction extends AbstractAction\n{\n public function getTitle()\n ...
php
chosen
[ { "from": "system", "value": "Correct the handle URI for build steps\n\nSummary: Fixes T9674. This was wrong to start with (URI is `/edit/X/`, not `/X/edit/`) but we have a new view page anyway.\n\nTest Plan:\n - Visited an exmaple URI in my browser.\n - Followed a build step link from \"Authorized By: .....
php
chosen
[ { "from": "system", "value": "Add the table name that the eloquent model points to\n" }, { "from": "human", "value": "<?php\n\nnamespace Begin;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Task extends Model\n{\n}\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Begin;\n...
php
chosen
[ { "from": "system", "value": "[Core] Make shopper context extend nested context interfaces\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 LICENSE\n ...
php
chosen
[ { "from": "system", "value": "Update Content Grenes -> Genres\n" }, { "from": "human", "value": "use Assely\\Taxonomy\\Taxonomy;\n\nclass Grenes extends Taxonomy\n{\n public $slug = 'grenes';\n\n /**\n * Describe taxonomy relationships.\n */\n public function relation()\n {\n...
php
chosen
[ { "from": "system", "value": "Improve exception handling of webservice\n" }, { "from": "human", "value": "<?php\n\nnamespace fennecweb;\n\nheader('Cache-Control: no-cache, must-revalidate');\nheader('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\nheader('Content-type: application/json');\n\nrequire_...
php
chosen
[ { "from": "system", "value": "Fix the array object test, since you cant access array data as property\n\nArray Data is only accessible via array-access.\n" }, { "from": "human", "value": "<?php\n\n/*\n +--------------------------------------------------------------------------+\n | Zephir Langua...
php
chosen
[ { "from": "system", "value": "Add new menu section names\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n\n 'resources' => 'Resources',\n 'tools' => 'Tools',\n\n];\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nreturn [\n...
php
chosen
[ { "from": "system", "value": "openidProvider: Change the default directory for the data store.\n\nThe default configuration uses a directory in /tmp, which may allow\nan user to create this directory before simpleSAMLphp attempts to\ncreate it. This can allow the user to overwrite files the webserver has\na...
php
chosen
[ { "from": "system", "value": "Allow links to have query srtings\n" }, { "from": "human", "value": "<?php\n\nnamespace Croogo\\Core;\n\nuse ArrayObject;\nuse Croogo\\Core\\Utility\\StringConverter;\n\nclass Link extends ArrayObject\n{\n\n public static function createFromLinkString($link)\n ...
php
chosen
[ { "from": "system", "value": "Revert change to foreach order and use an isset() call instead.\n" }, { "from": "human", "value": "<?php\n\nnamespace li3_fake_model\\extensions\\data\\relationships;\n\nclass HasOne extends Relation {\n\n\tpublic function appendData() {\n\t\t$foreignField = current...
php
chosen
[ { "from": "system", "value": "Remove explicit sizes from adsense ads\n" }, { "from": "human", "value": "<?php\r\n\r\nnamespace ATPAdvertising\\View\\Helper;\r\n\r\nclass Adsense extends \\ATP\\View\\Helper\r\n{\r\n\tpublic function __invoke($id)\r\n\t{\r\n\t\t$ad = new \\ATPAdvertising\\Model\\A...
php
chosen
[ { "from": "system", "value": "Remove code available in upstream.\n\nSigned-off-by: Mior Muhammad Zaki <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php\n\nnamespace Orchestra\\View;\n\nuse Illuminate\\Support\\Collection;\nuse Illuminate\\View\\FileVie...
php
chosen
[ { "from": "system", "value": "Add language parameter to get all route\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Api;\n\nuse Backend\\Modules\\ContentBlocks\\Domain\\ContentBlock\\ContentBlock;\nuse Backend\\Modules\\ContentBlocks\\Domain\\ContentBlock...
php
chosen
[ { "from": "system", "value": "Add binding and singleton method\n" }, { "from": "human", "value": "<?php\n\nreturn [\n Systemblast\\Interfaces\\View::class => \\Systemblast\\Engine\\Template\\Twig::class,\n];\n" }, { "from": "gpt", "value": "<?php\n\nreturn [\n /**\n * Regis...
php
chosen
[ { "from": "system", "value": "Return this object in setName.\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Entity;\n\nuse Doctrine\\Common\\Collections\\ArrayCollection;\nuse Doctrine\\ORM\\Mapping as ORM;\nuse FOS\\UserBundle\\Model\\User as BaseUser;\n\n/**\n * @ORM\\Entity\...
php
chosen
[ { "from": "system", "value": "Add string and json representations of all Job instances\n" }, { "from": "human", "value": "<?php\n\nnamespace josegonzalez\\Queuesadilla\\Job;\n\nclass Base\n{\n const LOW = 4;\n const NORMAL = 3;\n const MEDIUM = 2;\n const HIGH = 1;\n const CRITICA...
php
chosen
[ { "from": "system", "value": "Fix another doc string type.\n" }, { "from": "human", "value": "<?php\n/**\n * MiniAsset\n * Copyright (c) Mark Story (http://mark-story.com)\n *\n * Licensed under The MIT License\n * For full copyright and license information, please see the LICENSE.txt\n * Redist...
php
chosen
[ { "from": "system", "value": "Fix home link also for trl\n\nlike 2ac6daa865ac81e79ca40d432b22402a70db6dc2\n" }, { "from": "human", "value": "<?php\nclass Kwc_Box_HomeLink_Trl_Component extends Kwc_Abstract_Composite_Trl_Component\n{\n public function getTemplateVars()\n {\n $ret = p...
php
chosen
[ { "from": "system", "value": "Fix alert change type controller test\n" }, { "from": "human", "value": "<?php\n\nnamespace Ilios\\CoreBundle\\Tests\\DataLoader;\n\nclass AlertChangeTypeData extends AbstractDataLoader\n{\n protected function getData()\n {\n $arr = array();\n\n ...
php
chosen
[ { "from": "system", "value": "Add key type to refresh token model\n" }, { "from": "human", "value": "<?php\n\nnamespace Laravel\\Passport;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass RefreshToken extends Model\n{\n /**\n * The database table used by the model.\n *\n * @...
php
chosen
[ { "from": "system", "value": "Add test cases for ExitPass\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Psy Shell.\n *\n * (c) 2012-2017 Justin Hileman\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with thi...
php
chosen
[ { "from": "system", "value": "Fix authorization when permission was used multiple times.\n" }, { "from": "human", "value": "<?php\n\nnamespace Yajra\\Acl\\Traits;\n\ntrait AuthorizesPermissionResources\n{\n /**\n * Permission resource ability mapping.\n *\n * @var array\n */\n...
php
chosen
[ { "from": "system", "value": "Fix for case insensitive string comparison assertion in checkbox group field test\n\nIn SilverStripe 4.4 field labels are sentence cased. This changes the assertion to be flexible\nand pass in 4.4+ as well as <=4.3\n" }, { "from": "human", "value": "<?php\n\nnamespa...
php
chosen
[ { "from": "system", "value": "Add tests for getting raw certificate data\n" }, { "from": "human", "value": "<?php\n\nnamespace Punkstar\\SslTest;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Punkstar\\Ssl\\Reader;\n\nclass IntegrationTest extends TestCase\n{\n /**\n * @test\n * @dataProv...
php
chosen
[ { "from": "system", "value": "BAP-4210: Add EntityExtendBundle dumper extension to generate activity association entities. Refactoring\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\EntityExtendBundle\\Tools;\n\nuse Oro\\Bundle\\EntityConfigBundle\\Config\\ConfigInterface;\n\...
php
chosen
[ { "from": "system", "value": "Update the genSessionToken to avoid conflicts.\n" }, { "from": "human", "value": "<?php\n/**\n * File: util.php\n * User: zacharydubois\n * Date: 2015-12-07\n * Time: 11:58\n * Project: Digital-Footprint-Profile\n */\n\nnamespace DFP;\n\n\nclass util {\n /**\n ...
php
chosen
[ { "from": "system", "value": "Add primary key to create migrations\n" }, { "from": "human", "value": "<?php namespace Way\\Generators\\Syntax;\n\nclass CreateTable extends Table {\n\n /**\n * Build string for creating a\n * table and columns\n *\n * @param $migrationData\n ...
php
chosen
[ { "from": "system", "value": "Disable CSRF Token in API\n" }, { "from": "human", "value": "<?php namespace Strimoid\\Http\\Middleware;\n\nuse Closure;\nuse Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken as IlluminateCsrf;\nuse Illuminate\\Session\\TokenMismatchException;\n\nclass Veri...
php
chosen
[ { "from": "system", "value": "Add the favourites method to the inteface definition\n" }, { "from": "human", "value": "<?php\n\nnamespace Mintbridge\\EloquentFavourites;\n\ninterface FavouritableInterface\n{\n\n}\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Mintbridge\\Eloquent...
php
chosen
[ { "from": "system", "value": "Make sure config merging takes place" }, { "from": "human", "value": "<?php\n\nnamespace Laravel\\Tinker;\n\nuse Illuminate\\Foundation\\Application as LaravelApplication;\nuse Illuminate\\Support\\ServiceProvider;\nuse Laravel\\Lumen\\Application as LumenApplicatio...
php
chosen
[ { "from": "system", "value": "Set default nomination limit to 5\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddNominationLimit extends Migration\n{\n /**\n * Run the migrations.\n *...
php
chosen
[ { "from": "system", "value": "Make sure that we reference the config file using an absolute path... just in case...\n\ngit-svn-id: 8a2b0a969c74f87a9c14cf35f460fb9b394f82c6@1775 a333f486-631f-4898-b8df-5754b55c2be0\n" }, { "from": "human", "value": "<?php\r\n$sConfigFile = 'conf/production/config...
php
chosen
[ { "from": "system", "value": "Add most basic settings to global settings page.\n" }, { "from": "human", "value": "@extends('fluxbb::admin.layout.main')\n\n@section('main')\n\n<h2>Global settings</h2>\n\n<div class=\"setting\" data-key=\"description\">\n\t<label>Description</label>\n\t<input type...
php
chosen
[ { "from": "system", "value": "Add name on register form submit input. Is usefull to select it in unit test.\n" }, { "from": "human", "value": "@extends('app')\n\n@section('content')\n\n <div class=\"container-fluid\">\n\n @include('partials/hero')\n\n <div class=\"row\">\n ...
php
chosen
[ { "from": "system", "value": "Fix bootstrap js ref at guest layout" }, { "from": "human", "value": "<!doctype html>\n<html>\n<head> \n\t@include('includes.head')\n</head>\n<body>\n <div id=\"wrapper\">\n @include('includes.header')\n @include('includes.sidebar')\n\n <!-- P...
php
chosen
[ { "from": "system", "value": "Add an admin flag to the settings index view.\n" }, { "from": "human", "value": "<div class=\"col-md-4 col-sm-6\">\n <a href=\"{{ route('settings.user.edit', ['userId' => $user->getId()]) }}\">\n <div class=\"content-card animated pulse-hover\">\n ...
php
chosen
[ { "from": "system", "value": "Add `_RESOURCE_ROOT_` const for themes and plugins paths\n\nUseful for multisite or some server configuration.\n" }, { "from": "human", "value": "<?php\n\n// Define some useful constants\nif (!defined('_ROOT_')) {\n\tdefine('_ROOT_', '');\n}\nif (!defined('_USER_ROO...
php
chosen
[ { "from": "system", "value": "Add Drivers/PostgreSQL to the list of autoloaded paths" }, { "from": "human", "value": "<?php\n\n/*\n * Autoload controllers and modules\n */\nfunction autoload($className) {\n foreach (array(\n 'include/resto/',\n 'include/resto/Drivers/',\n ...
php
chosen
[ { "from": "system", "value": "Set paths with roots class\n" }, { "from": "human", "value": "<?php\n\n/**\n * Start Kirby CMS\n */\n\nif ( ! defined('DS') ) define( 'DS', DIRECTORY_SEPARATOR );\n\nrequire_once( __DIR__ . '/bootstrap.php' );\n\necho kirby::start( array(\n\t'root' => __DIR_...
php
chosen
[ { "from": "system", "value": "Add index.php to page rest controller\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: GeoMash\n * Date: 3/17/14\n * Time: 1:19 PM\n */ " }, { "from": "gpt", "value": "<?php\nnamespace application\\nutsNBolts\\controller\\...
php
chosen
[ { "from": "system", "value": "Remove deferred to load command\n" }, { "from": "human", "value": "<?php\nnamespace Laranix\\Installer;\n\nuse Illuminate\\Support\\ServiceProvider as BaseServiceProvider;\n\nclass ServiceProvider extends BaseServiceProvider\n{\n /**\n * Indicates if loading ...
php
chosen
[ { "from": "system", "value": "Fix Application providers container contract" }, { "from": "human", "value": "<?php\n\nnamespace Articstudio\\IcebergApp\\Provider;\n\nuse Psr\\Container\\ContainerInterface as ContainerContract;\nuse Articstudio\\IcebergApp\\Support\\Collection;\nuse Articstudio\\I...
php
chosen
[ { "from": "system", "value": "Return something to identify file not found." }, { "from": "human", "value": "<?php\r\n/**\r\n * This file script is used to provide the data stored for some user\r\n * in a server side storage.\r\n * \r\n * Expects an uid as a POST parameter, returns a file with th...
php
chosen
[ { "from": "system", "value": "Add contrainst to candidacy step 1 type form\n" }, { "from": "human", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\C...
php
chosen
[ { "from": "system", "value": "Add link to a11y statement\n\nThis is a legal requirement for the client.\n\nResolves: https://dxw.zendesk.com/agent/tickets/10049\nResolves: https://trello.com/c/SJFUZtxT\n" }, { "from": "human", "value": "<nav>\n <ul id=\"menu-footer\" class=\"menu\">\n <li cl...
php
chosen
[ { "from": "system", "value": "Add more information to Topic API.\n" }, { "from": "human", "value": "<?php\nif (!defined('InternalAccess')) exit('{\"Status\": 0,\"ErrorMessage\": \"403\"}');\n?>\n{\n\t\"Status\": 1,\n\t\"Page\": \"<?php echo $Page;?>\",\n\t\"TotalPage\": \"<?php echo $TotalPage;?...
php
chosen
[ { "from": "system", "value": "Make sure all ORM-related tests are skipped if sqlite3 isn't available.\n" }, { "from": "human", "value": "<?php\n\nnamespace Parable\\Tests\\Components\\ORM;\n\nclass Base extends \\Parable\\Tests\\Base\n{\n /** @var \\Parable\\ORM\\Database */\n protected $d...
php
chosen
[ { "from": "system", "value": "Duplicate block instance if we should copy it instead of aliasing from master collection\n" }, { "from": "human", "value": "<?php\n\nnamespace Concrete\\Core\\Block\\Command;\n\nuse Concrete\\Core\\Block\\Block;\nuse Concrete\\Core\\Block\\Command\\DeleteBlockComman...
php
chosen
[ { "from": "system", "value": "APICHANGE: Rename DPSHarness class to Harness and move it out from DPSPayment, use it as a Harness general interface \n" }, { "from": "human", "value": "<?php\n\nDirector::addRules(50, array(\n\tWorldpayPayment_Handler::$URLSegment . '/$Action/$ID' => 'WorldpayPayme...
php
chosen
[ { "from": "system", "value": "Use a reserve for withdrawing bitcoins.\n" }, { "from": "human", "value": "<?php\nrequire '../www/config.php';\nrequire '../util.php';\n\nfunction update_req($reqid, $status)\n{\n $query = \"\n UPDATE requests\n SET status='$status'\n WHERE\n...
php
chosen
[ { "from": "system", "value": "Revert \"Last codestyle fix (I hope)\"\n\nThis reverts commit 79c42c9bff7390fbc649578b89dcbef93633f33c.\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 *\...
php
chosen
[ { "from": "system", "value": "Allow callable():T to cast to callable\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\nnamespace Phan\\Language\\Type;\n\nfinal class CallableType extends NativeType\n{\n /** @phan-override */\n const NAME = 'callable';\n\n /**\n * @r...
php
chosen
[ { "from": "system", "value": "Allow to have separate DB instances for each server\n" }, { "from": "human", "value": "<?php\nfinal class Db\n{\n protected static $_instances = Array();\n\n public static function factory($driver = Null, $config)\n {\n $driver = isset($driver) ? $dr...
php
chosen
[ { "from": "system", "value": "Check route pointing to bound interfaces\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Tests\\Core\\Routing;\n\nuse PHPUnit_Framework_TestCase;\nuse Concrete\\Core\\Support\\Facade\\Application;\n\nclass CheckRoutesTest extends PHPUnit_Framework_Test...
php
chosen
[ { "from": "system", "value": "Add active to post fillable.\n" }, { "from": "human", "value": "<?php namespace Wardrobe;\n\nclass Post extends \\Eloquent {\n\n\t/**\n\t * The table associated with the model.\n\t *\n\t * @var string\n\t */\n\tprotected $table = 'posts';\n\n\t/**\n\t * The attribut...
php
chosen
[ { "from": "system", "value": "Fix path for app-load in tests\n" }, { "from": "human", "value": "<?php\ndefine('APP_ENV', 'UNIT_TESTS');\nrequire(__DIR__.'/../core/app-load.php');\n" }, { "from": "gpt", "value": "<?php\ndefine('APP_ENV', 'UNIT_TESTS');\nrequire(__DIR__.'/../app/core/a...
php
chosen
[ { "from": "system", "value": "Disable database setup for now\n" }, { "from": "human", "value": "<?php namespace Nwidart\\Modules\\Tests;\n\nuse Nwidart\\Modules\\LaravelModulesServiceProvider;\nuse Orchestra\\Testbench\\TestCase as OrchestraTestCase;\n\nabstract class BaseTestCase extends Orches...
php
chosen
[ { "from": "system", "value": "Return empty link if no foreign object\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\DataGridBundle\\Extension\\Formatter\\Property;\n\nuse Symfony\\Component\\Routing\\RouterInterface;\n\nuse Oro\\Bundle\\DataGridBundle\\Datasource\\ResultRecor...
php
chosen
[ { "from": "system", "value": "Apply \"visibility_required\" CS rule to constants\n\nphp-cs-fixer fix --rules='{\"visibility_required\": [\"property\", \"method\", \"const\"]}'\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencie...
php
chosen
[ { "from": "system", "value": "Add test rules for Images\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types = 1);\n\nnamespace Helldar\\Helpers\\Tests;\n\nuse GrahamCampbell\\TestBench\\AbstractTestCase;\nuse Helldar\\Helpers\\Support\\Images;\n\nclass ImagesTest extends AbstractTes...
php
chosen
[ { "from": "system", "value": "Replace @link with @see PHPDoc tag\n\nAs per proposed PSR-5, usage of @see PHPDoc tag is recommended instead\nof @link PHPDoc tag.\n" }, { "from": "human", "value": "<?php\n\nnamespace Berrybird\\Cerberus\\Credential;\n\n/**\n * Compares two credentials in a length-...
php
chosen
[ { "from": "system", "value": "Add type-hints to Artisan Facade methods props\n" }, { "from": "human", "value": "<?php\n\nnamespace Illuminate\\Support\\Facades;\n\n/**\n * @method static void compile($path = null)\n * @method static string getPath()\n * @method static void setPath($path)\n * @me...
php
chosen
[ { "from": "system", "value": ":lipstick: Set proper config for inherited repo\n" }, { "from": "human", "value": "<?php\n\nnamespace Harp\\Core\\Test\\Repo;\n\nuse Harp\\Core\\Test\\Model;\nuse Harp\\Core\\Test\\Rel;\n\n/**\n * @author Ivan Kerin\n * @copyright (c) 2014 Clippings Ltd.\n * @l...
php
chosen
[ { "from": "system", "value": "Use KDatabaseTableAbstract::getBehavior() to create behaviors using the behavior name instead of the full identifier. Component specific behaviors can now also be loaded using behavior names instead of identifier strings.\n" }, { "from": "human", "value": "<?php\n/*...
php
chosen
[ { "from": "system", "value": "Simplify the condition to check for a callable type\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nuse Booking\\Domain\\Operator\\OperatorInterface;\nuse Symfony\\Component\\DependencyInjection\\ContainerInterface;\n\nfinal class DumbOperator ...
php
chosen
[ { "from": "system", "value": "Use regex instead of explode\n" }, { "from": "human", "value": "<?php\n# Copyright © 2012 Martin Ueding <dev@martin-ueding.de>\n\nclass BookmarkHelper extends AppHelper {\n\tvar $helpers = array('Html');\n\n\tfunction print_bookmark($bookmark) {\n\t\techo $this->fav...
php
chosen
[ { "from": "system", "value": "Fix batch assignment add so it shows the current subject." }, { "from": "human", "value": "<?php\n\ndefined('BASEPATH') or exit('No direct script access allowed');\n\n// row.php Chris Dart Jan 28, 2015 4:24:29 PM chrisdart@cerebratorium.com\n\n?>\n<tr class=\"assign...
php
chosen
[ { "from": "system", "value": "Add fallback to key option\n" }, { "from": "human", "value": "<?php\nnamespace Cujo\\Content;\n\nabstract class Content implements \\ArrayAccess\n{\n public function __get($offset)\n {\n return $this->offsetGet($offset);\n }\n\n public function __...
php
chosen
[ { "from": "system", "value": "Remove dropIndex on foreign keys from migration\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass RemoveInfoOpsSourceRealmTar...
php
chosen
[ { "from": "system", "value": "Remove redirect in Hook, and make it \"doBackground\"\n" }, { "from": "human", "value": "<?php\nnamespace CI\\UI\\Controller;\n\nclass HookController\n{\n public function hook(\\Silex\\Application $app)\n {\n \t$client= new \\GearmanClient();\n\t\t$client->...
php
chosen
[ { "from": "system", "value": "Fix Memcachestat. Using wrong classname\n" }, { "from": "human", "value": "<?php\n\nrequire_once('../_include.php');\n\ntry {\n\n\t$config = SimpleSAML_Configuration::getInstance();\n\t$session = SimpleSAML_Session::getInstance();\n\n\t/* Make sure that the user has...
php
chosen
[ { "from": "system", "value": "Add form validation message for is_numeric\n" }, { "from": "human", "value": "<?php\n\n// Custom form validation messages\n$lang['form_validation_alpha_dot_dash'] = 'The {field} field may only contain alphanumeric characters, periods, underscores and dashes.';\n$lan...
php
chosen
[ { "from": "system", "value": "Add even more error checking...\n" }, { "from": "human", "value": "<?php\n\necho \"<pre>\\n\";\necho 'display_errors = ' . ini_get('display_errors') . \"\\n\";\n\nif ( ini_get('display_errors') == 1 ) {\n echo(\"It is all good...\\n\");\n echo \"</pre>\\n\";\n...
php
chosen
[ { "from": "system", "value": "Correct file name in include()\n" }, { "from": "human", "value": "<?php\nif (NULL !== @$urlParams[1]){\n\tinclude(\"pages/detail-encadrant.php\");\n} else {\n?>\n<div class=\"page les-encadrants\">\n\t<h1>Liste des encadrants</h1>\n\t<?php\n\t$res = $db->query('SELE...
php
chosen
[ { "from": "system", "value": "Make sure config returns proper value.\n" }, { "from": "human", "value": "<?php\n/**\n * File: Config.php\n * User: zacharydubois\n * Date: 2015-12-30\n * Time: 20:33\n * Project: Digital-Footprint-Profile\n */\n\nnamespace dfp;\n\n\nclass Config {\n private\n ...
php
chosen
[ { "from": "system", "value": "Remove comment from service provider file.\n" }, { "from": "human", "value": "<?php\r\nnamespace Baum;\r\n\r\nuse Illuminate\\Support\\ServiceProvider;\r\n\r\nclass BaumServiceProvider extends ServiceProvider {\r\n\r\n\t/**\r\n\t * Indicates if loading of the provid...
php
chosen
[ { "from": "system", "value": "Add timeout to tinymce.init to fix issues with dynamically loaded items.\n" }, { "from": "human", "value": "<?=$tinymce_script?>\r\n<textarea <?=$attributes?>><?=$value?></textarea>\r\n<script>tinymce.init(<?=$tinymce_config?>);</script>" }, { "from": "gpt",...
php
chosen
[ { "from": "system", "value": "Adjust the install complete message\n" }, { "from": "human", "value": "@extends('admin.layout')\n\n@section('title')\n Installer | Complete\n@stop\n\n@section('content')\n <div id=\"install-region\">\n <h1>Success</h1>\n <p>Install complete.</p>\n <p>Then...
php
chosen
[ { "from": "system", "value": "Update Master Corps - Index" }, { "from": "human", "value": "<?php\n\nif (!defined('BASEPATH'))\n exit('No direct script access allowed');\n\nclass Mscorps extends Back_end {\n\n public $model = 'model_master_corps';\n\n public function __construct() {\n ...
php
chosen
[ { "from": "system", "value": "Change implementation of store url in session\n" }, { "from": "human", "value": "<?php\n/**\n * @link https://github.com/nezhelskoy/yii2-return-url\n * @copyright Copyright (c) 2014 Dmitry Nezhelskoy\n * @license \"BSD-3-Clause\"\n */\n\nnamespace nezhelskoy\\return...
php
chosen
[ { "from": "system", "value": "Fix Lexer [else with subject] exception\n" }, { "from": "human", "value": "<?php\n\nnamespace Phug\\Lexer\\Scanner;\n\nuse Phug\\Lexer\\State;\nuse Phug\\Lexer\\Token\\ConditionalToken;\n\nclass ConditionalScanner extends ControlStatementScanner\n{\n public funct...
php
chosen
[ { "from": "system", "value": "Replace deprecated custom function call\n" }, { "from": "human", "value": "<?php\n\nnamespace Lmc\\Steward\\Component;\n\nabstract class AbstractComponent\n{\n /** @var \\Lmc\\Steward\\Test\\AbstractTestCaseBase */\n protected $tc;\n\n /** @var string */\n ...
php
chosen
[ { "from": "system", "value": "Add extra line and algorithm description\n" }, { "from": "human", "value": "<?php\n\nclass Palindrome\n{\n public static function isPalindrome($word)\n {\n return strtolower(strrev($word)) == strtolower($word);\n }\n}\n\necho Palindrome::isPalindrome...
php
chosen
[ { "from": "system", "value": "Change to current dir at start for relative paths\n" }, { "from": "human", "value": "<?php\n\n/**\n * Game Server Monitor\n *\n * Posts notifications when one of the monitored servers has players on it\n *\n * @version 1.0\n */\n\nrequire_once 'vendor/autoload.php';...
php
chosen
[ { "from": "system", "value": "Remove const expression to attain php 5.5 support\n\n" }, { "from": "human", "value": "<?php\n\nnamespace Asvae\\ApiTester\\Http\\Controllers;\n\nuse DateTime;\nuse Illuminate\\Routing\\Controller;\n\nclass AssetsController extends Controller\n{\n const SECONDS_I...
php
chosen
[ { "from": "system", "value": "Use the table alias in the visibility behaviour\n" }, { "from": "human", "value": "<?php\n\nnamespace Croogo\\Core\\Model\\Behavior;\n\nuse Cake\\Database\\Query;\nuse Cake\\ORM\\Behavior;\n\nclass VisibilityBehavior extends Behavior\n{\n\n\tpublic function findVisi...
php
chosen
[ { "from": "system", "value": "Set CURLOPT_RETURNTRANSFER to true so that the string value of the transfer is returned rather than outputting it directly.\n" }, { "from": "human", "value": "<?php\n\nnamespace Zipkin\\Reporters\\Http;\n\nuse BadFunctionCallException;\nuse RuntimeException;\n\nfina...
php
chosen
[ { "from": "system", "value": "Allow more symbols in authorization token\n" }, { "from": "human", "value": "<?php\n\nnamespace hiapi\\Core\\Auth;\n\nuse Psr\\Http\\Message\\ResponseInterface;\nuse Psr\\Http\\Message\\ServerRequestInterface;\nuse Psr\\Http\\Server\\MiddlewareInterface;\nuse Psr\\H...
php
chosen
[ { "from": "system", "value": "Fix declaring extra constants when `intl` is loaded\n\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view t...
php
chosen
[ { "from": "system", "value": "Use MySQLi interface for example\n" }, { "from": "human", "value": "<?php\n\nrequire('json-rpc/json-rpc.php');\n\nif (function_exists('xdebug_disable')) {\n xdebug_disable();\n}\n\n@mysql_connect('localhost', 'user', 'password');\n@mysql_select_db('database_name'...
php
chosen
[ { "from": "system", "value": "Remove service binding console service provider\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Cachet.\n *\n * (c) Alt Three Services Limited\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was d...
php
chosen
[ { "from": "system", "value": "Fix method in dni validator\n" }, { "from": "human", "value": "<?php\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Validator\\Constraints;\n\nuse Symfony\\Component\\Validator\\Constraint;\nuse Symfony\\Component\\Validator\\ConstraintValidator;\n\nclass DNIVal...
php
chosen
[ { "from": "system", "value": "BAP-13308: Upgrade CRM EE from 1.12 to 2.0 is out of service\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\DataAuditBundle\\Migrations\\Schema\\v1_8;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\nuse Oro\\Bundle\\MigrationBundle\\Migration\\Migration;...
php
chosen
[ { "from": "system", "value": "Fix method name in wait() test\n" }, { "from": "human", "value": "<?php declare(strict_types = 1);\n\nnamespace Amp\\Test;\n\nuse Amp;\nuse Amp\\{ Deferred, Failure, Pause, Success };\nuse Interop\\Async\\Loop;\n\nclass WaitTest extends \\PHPUnit_Framework_TestCase ...
php
chosen
[ { "from": "system", "value": "Fix parse error in nl translations\n" }, { "from": "human", "value": "<?php\n\nreturn [\n\t\"minute\" => \":t minuut|:t minuten\",\n\t\"hour\" => \":t uur\",\n\t\"day\" => \":t dag|:t dagen\",\n\t\"week\" => \":t week|:t weken \",\n\t\"timeago\" => \": geleden\",\n\...
php
chosen
[ { "from": "system", "value": "Adjust example to new solution\n" }, { "from": "human", "value": "<?php\nrequire __DIR__ . '/../vendor/autoload.php';\n\nuse KM\\Saffron\\Request;\nuse KM\\Saffron\\Executor;\n\n$router = require __DIR__ . '/router.compiled.php';\n$request = Request::createFromGloba...
php
chosen
[ { "from": "system", "value": "Make the firefox comment slightly more verbose\n" }, { "from": "human", "value": "@extends('layout')\n\n@section('content')\n @include('partials.standardHeader')\n\n <section class=\"section home\">\n <div class=\"container\">\n <div class=\"...
php
chosen
[ { "from": "system", "value": "Revert \"Force boolean as not all set to true/false some are 1/0\"\n\nThis reverts commit b80e83192363f6f77f70bc7a663cae9ff6ef40cd.\n" }, { "from": "human", "value": "<?php\nnamespace DBAL\\Tests\\Caching;\n\nuse PHPUnit\\Framework\\TestCase;\n\nabstract class Cache...
php
chosen
[ { "from": "system", "value": "Make MetadataCollection Model from Factory\n" }, { "from": "human", "value": "<?php\nnamespace Kunnu\\Dropbox\\Models;\n\nclass ModelFactory\n{\n\n /**\n * Make a Model Factory\n * @param array $data Model Data\n * @return \\Kunnu\\Dropbox\\Models\\...
php
chosen