conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Check that env variables are present\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nuse Discord\\Discord;\nuse Monolog\\Logger;\nuse PHPUnit\\Framework\\TestCase;\nuse React\\EventLoop\\Factory;\nuse React\\EventLoop\\LoopInterface;\n\nfinal cl...
php
chosen
[ { "from": "system", "value": "Remove unused arguments from test\n" }, { "from": "human", "value": "<?php\n\nnamespace Emarref\\Namer\\Detector;\n\nclass ArrayDetectorTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @array\n */\n private static $pool = [\n 'Apple',\n ...
php
chosen
[ { "from": "system", "value": "Handle socket_create not being available\n" }, { "from": "human", "value": "<?php\n\nfunction pole_display_price($label, $price) {\n $sock= socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n /* Set 1 sec timeout to avoid getting stuck, should be plenty long enough */...
php
chosen
[ { "from": "system", "value": "Fix wrong path to library dir" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Theme url\n|--------------------------------------------------------------------------\n|\n| Set the url for th...
php
chosen
[ { "from": "system", "value": "Delete ZnZendFlashMessages view helper - ZF2 has own helper now" }, { "from": "human", "value": "<?php\nreturn array(\n 'controller_plugins' => array(\n 'invokables' => array(\n 'znZendDataTables' => 'ZnZend\\Mvc\\Controller\\Plugin\\ZnZendDataT...
php
chosen
[ { "from": "system", "value": "Define test assertion for content of response\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests;\n\nuse Illuminate\\Foundation\\Testing\\TestResponse;\nuse Illuminate\\Foundation\\Testing\\TestCase as BaseTestCase;\n\nabstract class TestCase extends BaseTe...
php
chosen
[ { "from": "system", "value": "Fix page ID for sanity check page..." }, { "from": "human", "value": "<?php\n\n\n$config = SimpleSAML_Configuration::getInstance();\n$sconfig = SimpleSAML_Configuration::getConfig('config-sanitycheck.php');\n\n$info = array();\n$errors = array();\n$hookinfo = array(...
php
chosen
[ { "from": "system", "value": "Fix apptest - minimal code to run an Architect application" }, { "from": "human", "value": "<?php\n\n// Autoload files using Composer autoload\nrequire_once realpath(__DIR__ . '/../vendor/autoload.php');\nrequire_once realpath(__DIR__ . '/../aliases.php');\n\n// Cre...
php
chosen
[ { "from": "system", "value": "Use sqlite to store collected data.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Receives data from post/get requests and stores it\n * in a database\n */\n\n$aUid \t= isset($_REQUEST['uid']) ? $_REQUEST['uid'] : '';\n$aData \t= isset($_REQUEST['data']) ? $_R...
php
chosen
[ { "from": "system", "value": "Replace London Welsh with Bristol\n" }, { "from": "human", "value": "<?php\n\nnamespace Punkstar\\RugbyFeed\\League;\n\nclass Aviva extends AbstractLeague\n{\n protected $calendar_url = 'http://www.premiershiprugby.com/tools/calendars/premier-premiership.ics?v=14...
php
chosen
[ { "from": "system", "value": "Remove explicitly set q value\n" }, { "from": "human", "value": "<?php\n/**\n * @file\n */\n\nnamespace CultuurNet\\UDB3\\SearchAPI2;\n\nuse CultuurNet\\Auth\\Guzzle\\OAuthProtectedService;\nuse CultuurNet\\Search\\Guzzle\\Parameter\\Collector;\n\n/**\n * Search API...
php
chosen
[ { "from": "system", "value": "Resolve the authenticated user out of the IoC.\n" }, { "from": "human", "value": "<?php namespace Illuminate\\Auth;\r\n\r\nuse Illuminate\\Support\\ServiceProvider;\r\n\r\nclass AuthServiceProvider extends ServiceProvider {\r\n\r\n\t/**\r\n\t * Indicates if loading ...
php
chosen
[ { "from": "system", "value": "Fix path to where views are published.\n\nLarval will automatically pick up overwrites from\n`resources/views/vendor/<package-name>/` (where `<package-name>` is set\nas the second parameter of `$this->loadViewsFrom()`).\n\nSigned-off-by: Micheal Mand <4a52646cf58d42dd1882775751...
php
chosen
[ { "from": "system", "value": "FIX: Remove deprecated include and don't override env\n" }, { "from": "human", "value": "<?php\n\nglobal $project;\n$project = 'mysite';\n\nglobal $database;\n$database = 'dna_recipetest';\n\n// Use _ss_environment.php file for configuration\nrequire_once(\"conf/Con...
php
chosen
[ { "from": "system", "value": "Remove force slug update due to special-characters bug.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Custom login logo.\n *\n * @return void\n */\nadd_action('login_head', function()\n{\n\t$path = ADMIN_URL.'/images/admin-login-logo.png';\n\techo \"<style> h1...
php
chosen
[ { "from": "system", "value": "Fix typo in ifLess helper docs\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of Handlebars.php Helpers Set\n *\n * (c) Dmitriy Simushev <simushevds@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * fi...
php
chosen
[ { "from": "system", "value": "Remove class CS (cannot find spec, not IANA registered)\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace DaveRandom\\LibDNS\\Records;\n\nuse DaveRandom\\Enum\\Enum;\n\nabstract class ResourceClasses extends Enum\n{\n const IN = 1;\n ...
php
chosen
[ { "from": "system", "value": "Add campaign field, as campain is grammatically wrong\n" }, { "from": "human", "value": "<?php\n\nnamespace MssPhp\\Schema\\Request;\n\nuse JMS\\Serializer\\Annotation\\Type;\n\nclass Tracking {\n /**\n * @Type(\"string\")\n */\n public $partner;\n\n ...
php
chosen
[ { "from": "system", "value": "api: Add master_addr and geosub to config\n" }, { "from": "human", "value": "<?php\n\nclass ManagementApiController {\n\tpublic function request($func) {\n\t\t\n\t\t$method = \"\";\n\t\tswitch ($func['method']) {\n\t\t\tcase null:\n\t\t\tcase 'get':\n\t\t\tcase 'pul...
php
chosen
[ { "from": "system", "value": "Update exchange for latest RabbitMQ 3" }, { "from": "human", "value": "<?php\n\nnamespace RabbitMQ\\Management\\Entity;\n\nclass Exchange extends AbstractEntity\n{\n public $name;\n public $vhost;\n public $type;\n public $incoming;\n public $message_...
php
chosen
[ { "from": "system", "value": "Add details on Android getCountry API.\n" }, { "from": "human", "value": "<?php\n\nnamespace MainBundle\\Controller\\AndroidApi\\v1;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse JMS\\Seriali...
php
chosen
[ { "from": "system", "value": "Update to laravel 5.4 guidelines\n" }, { "from": "human", "value": "<?php\n\nnamespace Milax\\Mconsole\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass ViewComposersServiceProvider extends ServiceProvider\n{\n /**\n * Bootstrap the applicatio...
php
chosen
[ { "from": "system", "value": "Enhance GAE compat by removing some realpath()\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 the LI...
php
chosen
[ { "from": "system", "value": "Fix test, text it not outputted anymore - assert class value instead\n" }, { "from": "human", "value": "<?php\n/**\n * @group Advanced_SocialBookmarks\n */\nclass Kwc_Advanced_SocialBookmarks_Test extends Kwc_TestAbstract\n{\n public function testIt()\n {\n ...
php
chosen
[ { "from": "system", "value": "Index page: title tag must contain \"Identicons\".\n" }, { "from": "human", "value": "<?php\n\nnamespace Identicon\\Tests;\n\nuse Silex\\WebTestCase;\n\nclass IndexTest extends WebTestCase\n{\n public function createApplication()\n {\n return require __...
php
chosen
[ { "from": "system", "value": "Return a boolean instead of void\n\nSigned-off-by: Rick Kerkhof <77953cd64cc4736aae27fa116356e02d2d97f7ce@gmail.com>\n" }, { "from": "human", "value": "<?php\n\n/**\n * Copyright 2018 The WildPHP Team\n *\n * You should have received a copy of the MIT license with t...
php
chosen
[ { "from": "system", "value": "Throw ValidatorExceptions instead of vanilla Exceptions for validation failures.\n" }, { "from": "human", "value": "<?php\n/**\n * php-binary\n * A PHP library for parsing structured binary streams\n *\n * @package php-binary\n * @author Damien Walsh <me@damow.net>...
php
chosen
[ { "from": "system", "value": "Add private and protected Methods to stubs\n" }, { "from": "human", "value": "<?php\n\nnamespace Wnx\\LaravelStats\\Tests\\Stubs\\Controllers;\n\nclass UsersController extends Controller\n{\n public function index()\n {\n return [];\n }\n\n public...
php
chosen
[ { "from": "system", "value": "Replace requestNamespace by xmlNamespace method\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the Zimbra API in PHP library.\n *\n * © Nguyen Van Nguyen <nguyennv1981@gmail.com>\n *\n * For the full copyright and license information, please ...
php
chosen
[ { "from": "system", "value": "Adjust permission check order logic\n" }, { "from": "human", "value": "<?php\n\nnamespace LaravelDoctrine\\ACL\\Permissions;\n\nuse LaravelDoctrine\\ACL\\Contracts\\HasPermissions as HasPermissionsContract;\nuse LaravelDoctrine\\ACL\\Contracts\\HasRoles as HasRolesH...
php
chosen
[ { "from": "system", "value": "Make sure the cloud_federation_api routes are loaded\n\nSigned-off-by: Joas Schilling <ab43a7c9cb5b2380afc4ddf8b3e2583169b39a02@schilljs.com>\n" }, { "from": "human", "value": "<?php\n/**\n * @copyright Copyright (c) 2018 Bjoern Schiessle <bjoern@schiessle.org>\n *\...
php
chosen
[ { "from": "system", "value": "Test creating a mirror with a bad directory.\n" }, { "from": "human", "value": "<?php\n\nnamespace Orbt\\ResourceMirror\\Tests;\n\nuse Orbt\\ResourceMirror\\ResourceMirror;\nuse Symfony\\Component\\EventDispatcher\\EventDispatcher;\n\nclass ResourceMirrorTest extend...
php
chosen
[ { "from": "system", "value": "Fix title+artists check in event-add-form\n" }, { "from": "human", "value": "<?php\n\nclass Denkmal_FormAction_EventAdd_Create extends CM_FormAction_Abstract {\n\n protected function _getRequiredFields() {\n return array('venue', 'date', 'fromTime');\n ...
php
chosen
[ { "from": "system", "value": "Support for yet another subdomain\n\ngit-svn-id: b87969873ac19977fdb5a8c3be815cbc91ff9758@242 276ae292-bfe3-402f-8c0b-7b64386c5c79\n" }, { "from": "human", "value": "<?\n $url = $_SERVER['HTTP_HOST'];\n if($url == \"map.project-osrm.org\") {\n \t$file = fil...
php
chosen
[ { "from": "system", "value": "Apply PHP CS Fixer changes\n" }, { "from": "human", "value": "<?php\n\nnamespace Telegram\\Bot\\Tests\\Traits;\n\nuse Illuminate\\Support\\Collection;\nuse Telegram\\Bot\\Commands\\Command;\n\ntrait CommandGenerator\n{\n /**\n * @param int $numberRequired\n ...
php
chosen
[ { "from": "system", "value": "AP-6: Fix check for email and password.\n" }, { "from": "human", "value": "<?php\n\nnamespace Application\\Module {\n\n class User extends \\Application\\Module {\n public function Index() {\n return $this->Login();\n }\n\n public ...
php
chosen
[ { "from": "system", "value": "Switch to gate for permission check\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Closure;\nuse Config;\nuse Route;\n\nclass CheckPermissions\n{\n /**\n * Handle the ACLs for permissions.\n *\n * @param \\Illuminate\\Htt...
php
chosen
[ { "from": "system", "value": "Fix codegen template typo for app dll generation\n" }, { "from": "human", "value": "<?php\nrequire_once($argv[1]); // type.php\nrequire_once($argv[2]); // program.php\n$file_prefix = $argv[3];\n$idl_type = $argv[4];\n?>\n// apps\n# include \"<?=$file_prefix?>.app.ex...
php
chosen
[ { "from": "system", "value": "Add permission to manage mailblock.\n" }, { "from": "human", "value": "<?php\n/**\n * TODO\n *\n * @package silverstripe-mailblock\n * @subpackage extensions\n */\n\nclass MailblockSiteConfig extends DataExtension {\n\n\tprivate static $db = array(\n\t\t'MailblockEn...
php
chosen
[ { "from": "system", "value": "Add test to check cvs format with two options\n\n" }, { "from": "human", "value": "<?php\n\nnamespace Sirius\\Validation\\Rule;\n\nuse Sirius\\Validation\\Rule\\GreaterThan as Rule;\n\nclass GreaterThanTest extends \\PHPUnit_Framework_TestCase\n{\n\n function set...
php
chosen
[ { "from": "system", "value": "Add files from passed attachment paths.\n" }, { "from": "human", "value": "<?php\n\nnamespace ElasticEmail\\Email;\n\nuse ElasticEmail\\Client;\nuse ElasticEmail\\Response;\n\n/**\n * @see http://api.elasticemail.com/public/help#Email_Send\n */\nclass Send extends R...
php
chosen
[ { "from": "system", "value": "Chore: Remove url function should be abstracted per filesystem disk.\n" }, { "from": "human", "value": "<?php\n\nnamespace Just\\PosterGenerator;\n\nuse Illuminate\\Contracts\\Config\\Repository as ConfigRepository;\nuse Illuminate\\Filesystem\\FilesystemManager;\nu...
php
chosen
[ { "from": "system", "value": "Add example post in home page\n" }, { "from": "human", "value": "<h1>Posts</h1>" }, { "from": "gpt", "value": "<div id=\"main-content\">\n <div class=\"articles\">\n <div class=\"content-body article image-article\">\n <div class=\"i...
php
chosen
[ { "from": "system", "value": "Check if MSI is enabled (could be disabled afterwards)\n" }, { "from": "human", "value": "<?php\n/**\n * Copyright © 2019 Magmodules.eu. All rights reserved.\n * See COPYING.txt for license details.\n */\n\nnamespace Magmodules\\Channable\\Service\\Product;\n\nuse M...
php
chosen
[ { "from": "system", "value": "Add more details about what the class should do\n\nAnd remove extra line..\n" }, { "from": "human", "value": "<?php\n/**\n * @title Import Class\n * @desc Generic Importer Class for the pH7CMS.\n *\n * @author Pierre-Henry Soria <ph7...
php
chosen
[ { "from": "system", "value": "Update code to add namespace and Facade pattern\n" }, { "from": "human", "value": "<?php\n/**\n * @package\t\tphpmvc\n * @author\t\tNTKSoft Team\n * @copyright Copyright (C) 2014 NTKSoft, Inc. All rights reserved.\n * @license GNU General Public License versio...
php
chosen
[ { "from": "system", "value": "Add the new tags at the end\n" }, { "from": "human", "value": "<?php\n\nnamespace PMT\\WebBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Route;\nuse Sensio\\Bundle\\Frame...
php
chosen
[ { "from": "system", "value": "Update for new jar and dynamic demo" }, { "from": "human", "value": " <?php\n\n$url1 = $_GET[\"url1\"];\n$url2 = $_GET[\"url2\"];\n$type = $_GET[\"type\"];\n$pagelyze=\"DISPLAY=:98 java -jar /var/lib/pagelyzer/jPagelyzer.jar -get score -cmode \";\n\n\n$descriptors...
php
chosen
[ { "from": "system", "value": "Add purchase functionality in back-end.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse App\\Invoice;\nuse App\\Book;\nuse Illuminate\\Http\\Request;\nuse App\\Http\\Requests;\nuse App\\Services\\Purchase;\n\nclass Purchases exte...
php
chosen
[ { "from": "system", "value": "Test against generated table object\n" }, { "from": "human", "value": "<?php\n\nnamespace WyriHaximus\\React\\Tests\\Cake\\Orm;\n\nuse WyriHaximus\\React\\Cake\\Orm\\AsyncTableGenerator;\nuse WyriHaximus\\React\\TestApp\\Cake\\Orm\\Table\\ScreenshotsTable;\n\nclass ...
php
chosen
[ { "from": "system", "value": "Add tests of Change edit\n" }, { "from": "human", "value": "<?php\nnamespace Tests\\Integration;\n\nuse Cache;\nuse Carbon\\Carbon;\nuse Decoy;\nuse Tests\\TestCase;\n\nclass ChangesTest extends TestCase\n{\n\n /**\n * Common init\n *\n * @return void...
php
chosen
[ { "from": "system", "value": "Update laravel 4 store test\n" }, { "from": "human", "value": "<?php\n\nnamespace Michaeljennings\\Carpenter\\Tests\\Store;\n\nuse Michaeljennings\\Carpenter\\Store\\Laravel4\\Eloquent;\nuse Michaeljennings\\Carpenter\\Tests\\TestCase;\n\nclass Laravel4StoreTest ext...
php
chosen
[ { "from": "system", "value": "Fix PHPDoc wrong type annotation\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the PhpTabs package.\n *\n * Copyright (c) landrok at github.com/landrok\n *\n * For the full copyright and license information, please see\n * <https://github.c...
php
chosen
[ { "from": "system", "value": "BUGFIX: Extend URL length from 50 to 2048 chars\n" }, { "from": "human", "value": "<?php\n\nclass TrackBackPing extends DataObject {\n\tstatic $db = array(\n\t\t'Title' => 'Varchar',\n\t\t'Excerpt' => 'Text',\n\t\t'Url' => 'Varchar',\n\t\t'BlogName' => 'Varchar'\n\t...
php
chosen
[ { "from": "system", "value": "Convert DiscordSync route to POST\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| API Routes\n|--------------------------------------------------------------------------\n|\n| Here is whe...
php
chosen
[ { "from": "system", "value": "Switch logic of if statement\n" }, { "from": "human", "value": "<?php\n\nnamespace Distil;\n\nuse Distil\\Exceptions\\CannotCreateCriterion;\n\nfinal class CriterionFactory\n{\n /**\n * @var array\n */\n private $criteriaResolvers;\n\n public functi...
php
chosen
[ { "from": "system", "value": "Fix of loading chosen options on Lead timeline filter without need to refresh the page\n" }, { "from": "human", "value": "<?php\n/**\n * @package Mautic\n * @copyright 2014 Mautic Contributors. All rights reserved.\n * @author Mautic\n * @link http...
php
chosen
[ { "from": "system", "value": "Add methods to get upcoming events based on date range\n" }, { "from": "human", "value": "<?php\n\nnamespace Memvents;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Facades\\Storage;\nclass Event extends Model\n{\n\n protected $table = '...
php
chosen
[ { "from": "system", "value": "Revert \"PodioItemDif revert return fixed;\"\n\nThis reverts commit b5d0dc1efac82ce06a3e82106bb82f110dbc1087.\n" }, { "from": "human", "value": "<?php\n/**\n * @see https://developers.podio.com/doc/items\n */\nclass PodioItemDiff extends PodioObject {\n public func...
php
chosen
[ { "from": "system", "value": "Update API v2 version info to 2.1.0\n\nThe documentation already refers to 2.1.0 and lists a new feature of\nthe file/history endpoint, but requests for 2.1.0 are not yet accepted\nbecause the server doesn't know that it actually supports this version.\n\nSigned-off-by: Florian...
php
chosen
[ { "from": "system", "value": "Revert cameratag version. Dont want to mess with it!\n" }, { "from": "human", "value": "<script src=\"/js/script.js\" type=\"text/javascript\"></script>\n<script src='//www.cameratag.com/v15/js/cameratag.min.js' type='text/javascript'></script>\n<link rel='styleshee...
php
chosen
[ { "from": "system", "value": "Fix missing synchronized read access\n" }, { "from": "human", "value": "<?php\nrequire dirname(__DIR__).'/vendor/autoload.php';\n\nuse Icicle\\Concurrent\\Forking\\ForkContext;\nuse Icicle\\Coroutine\\Coroutine;\nuse Icicle\\Loop;\n\nclass Test extends ForkContext\n...
php
chosen
[ { "from": "system", "value": "Add support for Laravel 5.4" }, { "from": "human", "value": "<?php\n\nnamespace Casinelli\\CampaignMonitor;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass CampaignMonitorServiceProvider extends ServiceProvider\n{\n protected $defer = true;\n\n public fu...
php
chosen
[ { "from": "system", "value": "Cover case we have an error exception\n" }, { "from": "human", "value": "<?php\n\nnamespace PhpSpec\\Wrapper\\Subject\\Expectation;\n\nuse Exception;\nuse PhpSpec\\Util\\Instantiator;\nuse PhpSpec\\Wrapper\\Subject\\WrappedObject;\nuse PhpSpec\\Wrapper\\Unwrapper;\n...
php
chosen
[ { "from": "system", "value": "Change admin middleware to reflect 5.3 changes\n\nGenerated resource route for groupController now calls the variable group, not groupId" }, { "from": "human", "value": "<?php namespace JamylBot\\Http\\Middleware;\n\nuse Closure;\nuse Illuminate\\Contracts\\Auth\\Gu...
php
chosen
[ { "from": "system", "value": "Revert \"zmiana rozmiaru loga firm\"\n\nThis reverts commit 04e5107\n" }, { "from": "human", "value": "<?php\n\nnamespace Coyote\\Services\\Media\\Filters;\n\nclass Logo extends Thumbnail\n{\n /**\n * @var int\n */\n protected $width = 600;\n\n /**\...
php
chosen
[ { "from": "system", "value": "Update phpdoc for last commit\n" }, { "from": "human", "value": "<?php namespace duxet\\Rethinkdb\\Eloquent;\n\nuse Carbon\\Carbon;\nuse duxet\\Rethinkdb\\Query\\Builder as QueryBuilder;\n\nclass Model extends \\Illuminate\\Database\\Eloquent\\Model {\n\n /**\n ...
php
chosen
[ { "from": "system", "value": "Revert \"Addon bundles should extend IntegrationBundleBase\" - This breaks a lot of stuff if you don't have a full installation already, back to the drawing board...\n\nThis reverts commit b315f095f702cdef9fd342844323eaefd1eb8539.\n" }, { "from": "human", "value": "...
php
chosen
[ { "from": "system", "value": "Simplify code block content storage.\n" }, { "from": "human", "value": "<?php\n\nnamespace FluxBB\\Markdown\\Node;\n\nuse FluxBB\\Markdown\\Common\\Collection;\nuse FluxBB\\Markdown\\Common\\Text;\n\nclass CodeBlock extends Node implements NodeAcceptorInterface\n{\n...
php
chosen
[ { "from": "system", "value": "Add jsonApiResources method to add multiple resource route sets\n" }, { "from": "human", "value": "<?php\n\nnamespace Huntie\\JsonApi\\Routing;\n\nclass Router extends \\Illuminate\\Routing\\Router\n{\n /**\n * Route a JSON API resource to a controller.\n ...
php
chosen
[ { "from": "system", "value": "Fix publicPath in to allow php artisan serve\n" }, { "from": "human", "value": "<?php\n\nnamespace App;\n\nuse Illuminate\\Foundation\\Application as IlluminateApplication;\nuse InvalidArgumentException;\n\n/**\n * Extends \\Illuminate\\Foundation\\Application to ov...
php
chosen
[ { "from": "system", "value": "Add API endpoint for getting tasks from a list\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Application Routes\n|-----------------------------------------------------------------------...
php
chosen
[ { "from": "system", "value": "BB-4074: Create a new Website Search system in the WebsiteSearchBundle\n - cs fixes\n - fix pr comments\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\SearchBundle\\Engine;\n\nuse Oro\\Bundle\\SearchBundle\\Query\\Query;\nuse Oro\\Bundle\\SearchB...
php
chosen
[ { "from": "system", "value": "Fix code block detection for empty block\n" }, { "from": "human", "value": "<?php\n\nnamespace Phug\\Formatter\\Element;\n\nuse Phug\\Formatter\\AbstractValueElement;\n\nclass CodeElement extends AbstractValueElement\n{\n public function isCodeBlock()\n {\n ...
php
chosen
[ { "from": "system", "value": "Use the ::class notation to reference the module repository.\n" }, { "from": "human", "value": "<?php\n\nnamespace Nwidart\\Modules\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass BootstrapServiceProvider extends ServiceProvider\n{\n /**\n *...
php
chosen
[ { "from": "system", "value": "Make FormUI text fields output their classes properly. As the formcontrol class is always set, we can probably take out the test entirely, which would make the templates much more readable.\n\ngit-svn-id: d0e296eae3c99886147898d36662a67893ae90b2@3638 653ae4dd-d31e-0410-96ef-6bf...
php
chosen
[ { "from": "system", "value": "Update the minimum name and slug length for Businesses (3->4)\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Requests;\n\nuse App\\Http\\Requests\\Request;\n\nclass BusinessFormRequest extends Request\n{\n /**\n * Determine if the user is au...
php
chosen
[ { "from": "system", "value": "Abort logs screens when logs are disabled\n" }, { "from": "human", "value": "<?php\n\nnamespace Sebastienheyd\\Boilerplate\\Controllers\\Logs;\n\nuse Arcanedev\\LogViewer\\Contracts\\LogViewer as LogViewerContract;\nuse Arcanedev\\LogViewer\\Http\\Controllers\\LogVi...
php
chosen
[ { "from": "system", "value": "Replace f_SimpleCache usage by f_DataCacheService\n" }, { "from": "human", "value": "<?php\nclass uixul_InitializeAction extends f_action_BaseAction\n{\n /**\n\t * @param Context $context\n\t * @param Request $request\n\t */\n public function _execute($context...
php
chosen
[ { "from": "system", "value": "FIX Augment sql lookup of error page because it's referenced DataObject::get_one('ErrorPage') which makes it impossible to hook which site to load from\n" }, { "from": "human", "value": "<?php\n/**\n * Publishes separate static error pages for each site.\n *\n * @pa...
php
chosen
[ { "from": "system", "value": "Remove unused variable from `about` view\n" }, { "from": "human", "value": "<?php\n\nnamespace app\\controllers;\n\nuse Yii;\nuse yii\\web\\Controller;\nuse app\\models\\ContactForm;\n\nclass SiteController extends Controller\n{\n public function actions()\n {...
php
chosen
[ { "from": "system", "value": "Fix bug in __get method\n" }, { "from": "human", "value": "<?php\n\nnamespace Galahad\\LaravelAddressing;\n\n/**\n * Class Entity\n *\n * @package Galahad\\LaravelAddressing\n * @author Junior Grossi <juniorgro@gmail.com>\n */\nclass Entity\n{\n /**\n * Get p...
php
chosen
[ { "from": "system", "value": "Fix base path for WIN so paths don't start with /\n" }, { "from": "human", "value": "<?php\n\nnamespace BrianReeve\\AssetProxy;\n\n//use BrianReeve\\AssetProxy\\Asset;\n\nclass AssetLoader\n{\n\tprotected $_basePath = '/';\n\n\tpublic function __construct($basePath ...
php
chosen
[ { "from": "system", "value": "Exit instead of die for ending json return\n" }, { "from": "human", "value": "<?php\ndefined('BASEPATH') OR exit('No direct script access allowed');\n\nclass MY_Controller extends CI_Controller\n{\n public function __construct()\n {\n parent::__construc...
php
chosen
[ { "from": "system", "value": "Add publish method for assets to ServiceProvider for L5\n" }, { "from": "human", "value": "<?php namespace Yaim\\Mitter;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass MitterServiceProvider extends ServiceProvider {\n\n\t/**\n\t * Indicates if loading of the ...
php
chosen
[ { "from": "system", "value": "Add support for middleware callables\n" }, { "from": "human", "value": "<?php\n\nuse Interop\\Container\\ContainerInterface;\nuse Relay\\RelayBuilder;\nuse Zend\\Diactoros\\Response\\EmitterInterface;\nuse Zend\\Diactoros\\Response\\SapiEmitter;\n\nreturn [\n Rel...
php
chosen
[ { "from": "system", "value": "Use librairies at the beginning\n" }, { "from": "human", "value": "<?php \n\nnamespace Core;\n\nclass Controller\n{\n\tprotected $session;\n\tprotected $view;\n\tprotected $auth;\n\tprotected $redirect;\n\tprotected $flash;\n\tprotected $validation;\n\n\t/**\n\t * D...
php
chosen
[ { "from": "system", "value": "Add logo to payment method\n" }, { "from": "human", "value": "<?php\n\nclass Sign2pay_Payment_Block_Form_Sign2pay extends Mage_Payment_Block_Form\n{\n protected function _construct()\n {\n parent::_construct();\n $this->setTemplate('sign2pay/form...
php
chosen
[ { "from": "system", "value": "Improve controller actions for form.\n" }, { "from": "human", "value": "<?php\n\nuse \\Symfony\\Component\\HttpFoundation\\Response;\nuse \\Symfony\\Component\\HttpFoundation\\Request;\nuse Identicon\\Identicon;\nuse Identicon\\Identity\\Identity;\n\n/* @var \\Silex...
php
chosen
[ { "from": "system", "value": "Make a sub request to generate homepage\n" }, { "from": "human", "value": "<?php\n\nuse Gitiki\\Exception\\PageNotFoundException;\n\nuse Symfony\\Component\\HttpFoundation\\Request,\n Symfony\\Component\\HttpKernel\\Exception\\HttpException;\n\n$app->get('/', fun...
php
chosen
[ { "from": "system", "value": "Use DIC to get home route from config\n" }, { "from": "human", "value": "<?php\n\nnamespace Libs;\n\nuse \\Core\\Config;\nuse \\Libs\\interfaces\\SessionInterface;\n\nclass Redirect\n{\n\tprotected $session;\n\t\n\tpublic function __construct(SessionInterface $sessi...
php
chosen
[ { "from": "system", "value": "Feature: Remove deprecated reference + always cleanup the <style> block\n" }, { "from": "human", "value": "<?php\n\nnamespace Fedeisas\\LaravelMailCssInliner;\n\nuse TijsVerkoyen\\CssToInlineStyles\\CssToInlineStyles;\n\nclass CssInlinerPlugin implements \\Swift_Eve...
php
chosen
[ { "from": "system", "value": "Mark internal classes final where possible\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 the LICENS...
php
chosen
[ { "from": "system", "value": "Put try-catch on the example snippet.\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\nuse \\ParagonIE\\Halite\\HiddenString;\nuse \\ParagonIE\\Halite\\Password;\nuse \\ParagonIE\\Halite\\KeyFactory;\n\n// First, manage the keys\nif (!\\file_exist...
php
chosen
[ { "from": "system", "value": "Update boostrap to allow running the test suite outside a dummy project\n" }, { "from": "human", "value": "<?php\n\nsystem(sprintf('php %s/bin/vendors', escapeshellarg(__DIR__)));\n\nrequire_once __DIR__.'/'.$_SERVER['SYMFONY'].'/Symfony/Component/ClassLoader/Univer...
php
chosen
[ { "from": "system", "value": "Fix bug introduced with CompilerPass refactoring\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 the LI...
php
chosen
[ { "from": "system", "value": "Revert \"Fix merging engine/template vars\"\n\nThis reverts commit 5e734479094e270bc3abb7d6ebf752fad95576b0.\n" }, { "from": "human", "value": "<?php\nnamespace Colorium\\Templating;\n\nclass Templater implements Contract\\TemplaterInterface\n{\n\n /** @var strin...
php
chosen
[ { "from": "system", "value": "Refactor (Dashbord): add prefix to dashbord route\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Controller;\n\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Route;\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symf...
php
chosen
[ { "from": "system", "value": "Make the example more realistic ..." }, { "from": "human", "value": "<?php\n\n\t/*\n\t * Inquire all SYSTEM queues from queuemanager PIGEON.\n\t * MQWeb runs on localhost and is listening on port 8081. \n\t */\n\t$url = \"http://localhost:8081/api/queue/inquire/PIGE...
php
chosen
[ { "from": "system", "value": "Update sorting sponsors by orderSort\n" }, { "from": "human", "value": "<?php\n\nnamespace Stfalcon\\Bundle\\SponsorBundle\\Repository;\n\nuse Doctrine\\ORM\\EntityRepository;\nuse Stfalcon\\Bundle\\EventBundle\\Entity\\Event as Event;\n\n/**\n * SponsorRepository\n...
php
chosen