conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "WIP: Change reference from google map to be generic\n" }, { "from": "human", "value": "<?php\n\n/*\n * Provides a GoogleMap() function to DataObject objects.\n *\n * @author Uncle Cheese\n * @package mappable\n */\nclass MappableDataObjectSet extends Extension {\n\n...
php
chosen
[ { "from": "system", "value": "Replace dir separator for windows\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of phpDocumentor.\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n *\n * @c...
php
chosen
[ { "from": "system", "value": "Add development ip to allowed ips\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\Debug\\Debug;\n\n// If you don't want to setup permissions the proper way, just uncomment the following PHP line\n...
php
chosen
[ { "from": "system", "value": "Use the exit code constant" }, { "from": "human", "value": "<?php\n\nnamespace Padam87\\CronBundle\\Command;\n\nuse Doctrine\\Common\\Annotations\\AnnotationReader;\nuse Padam87\\CronBundle\\Util\\Helper;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse...
php
chosen
[ { "from": "system", "value": "Reset config to default values\n" }, { "from": "human", "value": "<?php\n\nreturn [\n\n /*\n |--------------------------------------------------------------------------\n | Namespace Tablenames\n |---------------------------------------------------------...
php
chosen
[ { "from": "system", "value": "Clarify how to force Basic Auth\n" }, { "from": "human", "value": "<?php\n\nuse GuzzleHttp\\Client;\nuse VDB\\Spider\\RequestHandler\\GuzzleRequestHandler;\nuse VDB\\Spider\\Spider;\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\n// Create Spider\n$spider = ...
php
chosen
[ { "from": "system", "value": "Revert typed property to retain php 7.3 compatibility\n" }, { "from": "human", "value": "<?php\n\n/**\n * @package ConLayout\n * @author Cornelius Adams (conlabz GmbH) <cornelius.adams@conlabz.de>\n */\n\nnamespace ConLayout\\Filter;\n\nuse Laminas\\Filter\\FilterIn...
php
chosen
[ { "from": "system", "value": "Remove waitForText in Save function.\n\nIt doesn't work quite right.\n" }, { "from": "human", "value": "<?php\n\nnamespace Step\\Acceptance;\n\nuse \\AcceptanceTester as Tester;\n\nclass EditView extends Tester\n{\n /**\n * Wait for for the edit view to becom...
php
chosen
[ { "from": "system", "value": "Disable the registration portal for now\n" }, { "from": "human", "value": "<?php\n// Copyright 2019 Peter Beverloo. All rights reserved.\n// Use of this source code is governed by the MIT license, a copy of which can\n// be found in the LICENSE file.\n\nerror_report...
php
chosen
[ { "from": "system", "value": "Drop default value from `paid_at` column in Conversions table\n\nremp/remp#739\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AlterConversionsRemoveOnUpdateFromPaidAtColumn extends Migration\n{\n public funct...
php
chosen
[ { "from": "system", "value": "Add the route to get a specific task created by the authenticated user\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Application Routes\n|-----------------------------------------------...
php
chosen
[ { "from": "system", "value": "Add reference to CollectionItems by singular collection name, if possible\n" }, { "from": "human", "value": "<?php namespace TightenCo\\Jigsaw;\n\nuse Exception;\nuse TightenCo\\Jigsaw\\IterableObject;\n\nclass ViewData extends IterableObject\n{\n private $data;\...
php
chosen
[ { "from": "system", "value": "Use preg_replace instead of ereg_replace\n" }, { "from": "human", "value": "<?php\n\n/**\n * Autoload register file.\n * \n * @copyright Copyright (c) 2015 Hervé Guenot\n * @license https://github.com/hguenot/phpstream/blob/master/LICENSE The MIT License (MIT)\n * @...
php
chosen
[ { "from": "system", "value": "Remove duplicate version number and stability.\n" }, { "from": "human", "value": "<?php\n// Set the title for the main template\n$parent->context->page_title = $context->name.' | pear2.php.net';\n?>\n<div class=\"package\">\n <div class=\"grid_8 left\">\n ...
php
chosen
[ { "from": "system", "value": "Remove excessive padding from footer elements\n" }, { "from": "human", "value": "<footer class=\"container margin-top-xl\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n \n <nav class=\"nav nav-inline\">\n {!! For...
php
chosen
[ { "from": "system", "value": "Make Artisan service provider be deferred.\n" }, { "from": "human", "value": "<?php namespace App\\Providers;\n\nuse InspireCommand;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass ArtisanServiceProvider extends ServiceProvider {\n\n\t/**\n\t * Register the serv...
php
chosen
[ { "from": "system", "value": "OEE-54: Modify ACL. Refactor ACL Walker.\n - Add set organization listener\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\SecurityBundle\\Http\\Firewall;\n\nuse Oro\\Bundle\\OrganizationBundle\\Entity\\Manager\\OrganizationManager;\nuse Oro\\Bu...
php
chosen
[ { "from": "system", "value": "Check success exists before using it" }, { "from": "human", "value": "<?php\n\nnamespace Isotop\\Cargo\\Pusher;\n\nclass HTTP extends Abstract_Pusher {\n\n\t/**\n\t * Send data to receiver.\n\t *\n\t * @param mixed $data\n\t *\n\t * @return mixed\n\t */\n\tpublic f...
php
chosen
[ { "from": "system", "value": "Add jsonSerialize() and implement JsonSerializable\n" }, { "from": "human", "value": "<?php /* vim: set colorcolumn= expandtab shiftwidth=2 softtabstop=2 tabstop=4 smarttab: */\nnamespace BNETDocs\\Models\\Packet;\nclass Form extends \\BNETDocs\\Models\\ActiveUser\n...
php
chosen
[ { "from": "system", "value": "Add 'build' task to build PHAR\n" }, { "from": "human", "value": "<?php\n\nnamespace Bob\\BuildConfig;\n\ntask(\"default\", array(\"test\"));\n\ndesc('Sets up development dependencies');\ntask('dev', array('deps', 'composer.json'));\n\ntask('deps', function() {\n ...
php
chosen
[ { "from": "system", "value": "[Readability] Store SQL query into variable\n" }, { "from": "human", "value": "<?php\n/**\n * @title Advertisement Model Class.\n *\n * @author Pierre-Henry Soria <hello@ph7cms.com>\n * @copyright (c) 2013-2018, Pierre-Henry Soria. All Ri...
php
chosen
[ { "from": "system", "value": "Make use of outputcontroller for caching js resonse\n" }, { "from": "human", "value": "<?php\n\nnamespace MyTravel\\Core\\Controller;\n\nuse Patchwork\\JSqueeze;\nuse Symfony\\Component\\Finder\\Finder;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony...
php
chosen
[ { "from": "system", "value": "Update function name to be more accurate\n" }, { "from": "human", "value": "<?php\n/* ------------------------------------------------------------------------ *\\\n * Functions: Rewrites\n\\* ------------------------------------------------------------------------ *...
php
chosen
[ { "from": "system", "value": "Fix bug in ipay config sample\n" }, { "from": "human", "value": "<?php\n\nreturn array(\n\n //-------------------------------\n // Timezone for insert dates in database\n // If you want IPay not set timezone, just leave it empty\n //---------------------...
php
chosen
[ { "from": "system", "value": "Use dynamically updated cents value if available (total may change as shipping methods are changed, etc)\n" }, { "from": "human", "value": "<?php defined('C5_EXECUTE') or die(_(\"Access Denied.\"));?>\n<script src=\"https://checkout.stripe.com/checkout.js\"></script...
php
chosen
[ { "from": "system", "value": "Make 'name' a property rather than a function\n" }, { "from": "human", "value": "<?php\n\nnamespace GeoIP2\\Record;\n\nabstract class AbstractPlaceRecord extends AbstractRecord\n{\n private $languages;\n\n public function __construct($record, $languages){\n $th...
php
chosen
[ { "from": "system", "value": "Use 2 spaces indents in Yaml file\n" }, { "from": "human", "value": "<?php\n\nnamespace Craft;\n\nuse Symfony\\Component\\Yaml\\Yaml;\n\n/**\n * Schematic Data Model.\n *\n * Encapsulates data that has been exported via schematic.\n *\n * @author Itmundi\n * @cop...
php
chosen
[ { "from": "system", "value": "Use TestCase instead of WP_UnitTestCase\n" }, { "from": "human", "value": "<?php\n\nuse PHPUnit\\Framework\\TestCase;\nuse TwinDigital\\WPTools\\PluginTools;\n\nclass PluginToolsTest extends WP_UnitTestCase {\n\n /**\n * Instance of the class.\n *\n * @var \\...
php
chosen
[ { "from": "system", "value": "Set array type for PHPStan\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Budgegeria\\Bundle\\IntlFormatBundle\\DependencyInjection;\n\nuse Symfony\\Component\\DependencyInjection\\ContainerBuilder;\nuse Symfony\\Component\\Depende...
php
chosen
[ { "from": "system", "value": "Use real path for views instead of alias\n" }, { "from": "human", "value": "<?php\n/**\n * README plugin for HiDev\n *\n * @link https://github.com/hiqdev/hidev-readme\n * @package hidev-readme\n * @license BSD-3-Clause\n * @copyright Copyright (c) 2015-201...
php
chosen
[ { "from": "system", "value": "Use version_compare for PHP version verification.\n" }, { "from": "human", "value": "<?php\r\n/*\r\nPlugin Name: Comment Timeout\r\nPlugin URI: http://www.jamesmckay.net/code/comment-timeout/\r\nDescription: Automatically closes comments on blog entries after a user...
php
chosen
[ { "from": "system", "value": "Remove message from queue only if callback return not false\n" }, { "from": "human", "value": "<?php\n\nnamespace OldSound\\RabbitMqBundle\\RabbitMq;\n\nuse OldSound\\RabbitMqBundle\\RabbitMq\\BaseConsumer;\nuse PhpAmqpLib\\Message\\AMQPMessage;\n\nclass Consumer ex...
php
chosen
[ { "from": "system", "value": "Fix deprecation notice: The method bindCallback will require a new argument in next major version\n\nback_consumer_1 | consumer1 | [2019-05-24 12:57:13] php.INFO: User\nDeprecated: The \"Enqueue\\Consumption\\QueueConsumer::bindCallback()\"\nmethod will require a new \"string...
php
chosen
[ { "from": "system", "value": "Fix email and password validation.\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 funct...
php
chosen
[ { "from": "system", "value": "Refactor children initialisation in constructor\n" }, { "from": "human", "value": "<?php\n\nnamespace Symfony\\Cmf\\Bundle\\BlockBundle\\Document;\n\nuse Doctrine\\ODM\\PHPCR\\Mapping\\Annotations as PHPCRODM;\nuse Doctrine\\ODM\\PHPCR\\ChildrenCollection;\nuse Doct...
php
chosen
[ { "from": "system", "value": "Create internal.js config for javascript library test\n" }, { "from": "human", "value": "<?php\n\nclass CM_Response_Resource_Javascript_LibraryTest extends CMTest_TestCase {\n\n protected function setUp() {\n CMTest_TH::createLanguage();\n }\n\n prot...
php
chosen
[ { "from": "system", "value": "Use binary zip adapter prior to ZIpExtension" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Zippy.\n *\n * (c) Alchemy <info@alchemy.fr>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distribu...
php
chosen
[ { "from": "system", "value": "Fix blocking all options except OptionValues\n\n" }, { "from": "human", "value": "<?php\n\n\nnamespace WP_Migrations\\OptionVersions;\n\n\nclass Provider\n{\n protected $repository;\n\n public function __construct(Repository $optionVersionRepository)\n {\n ...
php
chosen
[ { "from": "system", "value": "Implement method injection to fetch the query.\n" }, { "from": "human", "value": "<?php\n\nnamespace Yajra\\CMS\\DataTables;\n\nuse Yajra\\Acl\\Models\\Role;\nuse Yajra\\DataTables\\EloquentDataTable;\nuse Yajra\\DataTables\\Services\\DataTable;\n\nclass RolesDataTa...
php
chosen
[ { "from": "system", "value": "Make a SnytaxException a 400 error code." }, { "from": "human", "value": "<?php\n/**\n * @author Todd Burry <todd@vanillaforums.com>\n * @copyright 2010-2013 Justin Hileman\n * @copyright Modifications are Copyright (c) 2013-2014 Vanilla Forums Inc.\n * @license MIT...
php
chosen
[ { "from": "system", "value": "Make email lower case before checking exclusions\n" }, { "from": "human", "value": "<?php\n\ninclude(\"file.php\");\n\n$experiment = new Experiment($_REQUEST['exp']);\n\n$page_header = $experiment->getName();\n\nif ($experiment->getStatus() != 'open') {\n $page = '...
php
chosen
[ { "from": "system", "value": "Add trailing slash using the parameter\n" }, { "from": "human", "value": "<header class=\"banner\" role=\"banner\">\n <div class=\"container\">\n <a class=\"brand\" href=\"<?php echo home_url(); ?>/\"><?php bloginfo('name'); ?></a>\n <nav class=\"nav-main\" ...
php
chosen
[ { "from": "system", "value": "Add simple stub for GitHub Webhooks\n" }, { "from": "human", "value": "<?php\n\nrequire_once 'lib/Config.php';\nrequire_once 'lib/Session.php';\nrequire_once 'lib/functions.php';\n\nrequire_once 'lib/Slim/Slim.php';\n\n\\Slim\\Slim::registerAutoloader();\n\n$db = ne...
php
chosen
[ { "from": "system", "value": "Update theming for select month view\n" }, { "from": "human", "value": "<?php\n\ndefined('BASEPATH') or exit('No direct script access allowed');\n\n// select_month.php Chris Dart Dec 29, 2013 5:04:43 PM\n// chrisdart@cerebratorium.com\n$buttons[] = array(\n \...
php
chosen
[ { "from": "system", "value": "Check the h2 has the blog title in it\n" }, { "from": "human", "value": "<?php\n\nnamespace Blogger\\BlogBundle\\Tests\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\n\nclass PageControllerTest extends WebTestCase\n{\n public function te...
php
chosen
[ { "from": "system", "value": "Add some boilerplate checks to the exception context integration\n" }, { "from": "human", "value": "<?php\n\nnamespace Sentry\\Laravel\\Integration;\n\nuse Sentry\\Event;\nuse Sentry\\EventHint;\nuse Sentry\\State\\Scope;\nuse Sentry\\Integration\\IntegrationInterfa...
php
chosen
[ { "from": "system", "value": "[FIX] Fix typo should be since not size\n\n\ngit-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@63771 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "human", "value": "<?php\n// (c) Copyright 2002-2017 by authors of the Tiki Wiki CMS Groupware Project\n//\n/...
php
chosen
[ { "from": "system", "value": "Change api endpoints due to undocumented breaking changes\n" }, { "from": "human", "value": "<?php namespace Dxi\\Commands\\Dataset\\Contact;\n\nuse Dxi\\Commands\\Command;\n\nclass Create extends Command {\n\n /**\n * Get the payload for the command\n *\...
php
chosen
[ { "from": "system", "value": "Fix a minor typo inside comment block\n" }, { "from": "human", "value": "<?php\n\n/**\n * @file\n * Contains \\Eloqua\\Api\\DestroyableInterface\n */\n\nnamespace Eloqua\\Api;\n\ninterface DestroyableInterface {\n\n /**\n * Delete a record of this type.\n *\n ...
php
chosen
[ { "from": "system", "value": "Fix php warning on LinearRing creation with invalid params\n" }, { "from": "human", "value": "<?php\n\nnamespace GeoJson\\Geometry;\n\n/**\n * Polygon geometry object.\n *\n * Coordinates consist of an array of LinearRing coordinates.\n *\n * @see http://www.geojson...
php
chosen
[ { "from": "system", "value": "Fix new line on while and for statements.\n" }, { "from": "human", "value": "<?php\n\nnamespace Vinkla\\Base62;\n\nclass Base62\n{\n\t/**\n\t * The base string.\n\t *\n\t * @var string\n\t */\n\tprotected $base;\n\n\t/**\n\t * @param $base\n\t */\n\tfunction __const...
php
chosen
[ { "from": "system", "value": "BUGFIX: Check that the MenuSet gridfield exists before filtering\n" }, { "from": "human", "value": "<?php\n\nnamespace Guttmann\\SilverStripe;\n\nuse Extension;\nuse Subsite;\n\nclass MenuAdminExtension extends Extension\n{\n\n public function updateEditForm($for...
php
chosen
[ { "from": "system", "value": "Fix PSR-2 for language file(s)\n" }, { "from": "human", "value": "<?php return [\n\n\t'listing.pending_save' => '<span class=\"glyphicon glyphicon-info-sign\"></span> You must save before you can add <b title=\":description\" class=\"js-tooltip\">:model</b>.',\n\n\t...
php
chosen
[ { "from": "system", "value": "Fix setting of configuration on custom Users table\n" }, { "from": "human", "value": "<?php\nnamespace App\\Model\\Table;\n\nuse CakeDC\\Users\\Model\\Table\\UsersTable as Table;\nuse CsvMigrations\\ConfigurationTrait;\nuse CsvMigrations\\FieldTrait;\n\n/**\n * User...
php
chosen
[ { "from": "system", "value": "Correct column name in migration\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass UpdateForumTableCategories extends Migration\n{\n /**\n * Run the migrations.\...
php
chosen
[ { "from": "system", "value": "Fix deleting all webhooks for a list\n" }, { "from": "human", "value": "<?php namespace JohnRivs\\Wunderlist;\r\n\r\ntrait Webhook {\r\n\r\n /**\r\n * Show all the webhooks for a list.\r\n *\r\n * @param array $attributes\r\n * @return array\r\n ...
php
chosen
[ { "from": "system", "value": "Fix bug wrong pageId in showAction\n" }, { "from": "human", "value": "<?php\n\nnamespace Akhann\\StaticPageBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\n\nabstract class DefaultController extends Controller\n{\n abstract pu...
php
chosen
[ { "from": "system", "value": "Make type-hinting in function signature mathc in subclass.\n\nIs this going to be problem for system scripts too?\n\n\nsvn commit r13063\n" }, { "from": "human", "value": "<?php\n\nrequire_once 'Site/exceptions/SiteNotFoundException.php';\nrequire_once 'Site/layouts...
php
chosen
[ { "from": "system", "value": "Update test because the css class has changes by updating to Bootstrap5\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Tests\\Action;\n\nuse Backend\\Core\\Tests\\BackendWebTestCase;\nuse Symfony\\Bundle\\FrameworkBundle\\Clie...
php
chosen
[ { "from": "system", "value": "Add methods for convert responses\n" }, { "from": "human", "value": "<?php\n\nnamespace Artesaos\\Zenvia\\Contracts;\n\nuse Artesaos\\Zenvia\\Exceptions\\ZenviaResponseException;\nuse Psr\\Http\\Message\\ResponseInterface;\n\ninterface ResponseHandlerInterface\n{\n\...
php
chosen
[ { "from": "system", "value": "Update after rebase to use array approach\n" }, { "from": "human", "value": "<?php\n// This file patches test case files containing setUp and tearDown methods.\n// It's a hacky workaround needed until we drop support of PHP < 7.2.\n// Cause: newer PHPUnit has added ...
php
chosen
[ { "from": "system", "value": "Add more security to the mock system who simulates Eloquent's constructor method.\n" }, { "from": "human", "value": "<?php\n\nuse Mockery as m;\n\nclass AcTestCase extends Orchestra\\Testbench\\TestCase\n{\n protected $app;\n protected $router;\n\n public f...
php
chosen
[ { "from": "system", "value": "Add the web middleware stack\n\nCouple of people on gitter have noticed the new `custom.php` does not load the `web` middleware, so login sessions don't work.\r\n\r\nMaybe this was an oversight or intentional?\r\n\r\nEither way either documentation clarification is needed, or a...
php
chosen
[ { "from": "system", "value": "[async-command] Fix service definition to apply the timeout\n\naddArgument add only one argument at a time to the construtor, right now the timeout configured by the user is never applied and it's always the default (60) value, this fixes it." }, { "from": "human", ...
php
chosen
[ { "from": "system", "value": "Make sure to run test command tests\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace ApiClients\\Tests\\Foundation\\Transport\\CommandBus\\Command;\n\nuse ApiClients\\Foundation\\Transport\\CommandBus\\Command\\SimpleRequestCommand;\nus...
php
chosen
[ { "from": "system", "value": "Add possibility for defining the composer_cmd in the global config.\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of the Magallanes package.\n*\n* (c) Andrés Montañez <andres@andresmontanez.com>\n*\n* For the full copyright and license informati...
php
chosen
[ { "from": "system", "value": "Add conditional check for allowing ZF2_PATH env variable to be used\n" }, { "from": "human", "value": "<?php\nuse Zend\\ServiceManager\\ServiceManager,\n Zend\\Mvc\\Service\\ServiceManagerConfiguration;\n\nchdir(dirname(__DIR__));\n\n// Composer autoloading\nif (...
php
chosen
[ { "from": "system", "value": "Fix an issue where concrete.permissions.forward_to_login didn't work\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Controller\\SinglePage;\n\nuse PageController;\nuse User;\nuse Config;\n\nclass PageForbidden extends PageController\n{\n protected ...
php
chosen
[ { "from": "system", "value": "Set short open tags to on by default\n" }, { "from": "human", "value": "<?php\nclass PhpTemplate\n{\n protected $_dir = Null;\n protected $_data = Array();\n protected $_headers = Array();\n\n public $app = Null;\n public $router = Null;\n\n...
php
chosen
[ { "from": "system", "value": "Fix unnecessary incompatibility with old PHP versions" }, { "from": "human", "value": "<?php\r\n\r\n\trequire_once __DIR__ . '/autoloader.php';\r\n\r\n\t$files\t\t= ['Example.class.php'];\r\n\r\n\t$SwaggerGen = new \\SwaggerGen\\SwaggerGen($_SERVER['HTTP_HOST'], di...
php
chosen
[ { "from": "system", "value": "Test for file info fields in Manifest test\n" }, { "from": "human", "value": "<?php\n\nnamespace Pipe\\Test;\n\nuse Pipe\\Manifest;\nuse Pipe\\Environment;\nuse org\\bovigo\\vfs\\vfsStream;\n\nclass ManifestTest extends \\PHPUnit_Framework_TestCase\n{\n function ...
php
chosen
[ { "from": "system", "value": "Add shouldPassHttpClientInterfaceToConstructor test and mock function\n" }, { "from": "human", "value": "<?php\nnamespace phpSmug\\Tests;\n\nuse phpSmug\\Client;\n\nclass ClientTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @test\n */\n public ...
php
chosen
[ { "from": "system", "value": "Fix missing json encoding for support of large text chunks\n" }, { "from": "human", "value": "<?php header('Content-Type: application/ld+json'); ?>\n<?php header('Access-Control-Allow-Origin: *'); ?>\n{\n \"@context\": \"<?php echo get_option('ldp_context', 'http...
php
chosen
[ { "from": "system", "value": "Convert comment ID to int" }, { "from": "human", "value": "<?php\n\nclass B3_Heartbeat_Comments {\n\n public function get_last_updated() {\n $comments = get_comments(\n array(\n 'date_query' => $this->get_date_query()\n ...
php
chosen
[ { "from": "system", "value": "Check whether to retrieve all items or filter them based on params.\n" }, { "from": "human", "value": "<?php\n\nnamespace Plummer\\Calendar;\n\nclass CalendarFactory\n{\n\tpublic static function fromRegistry(CalendarAbstract $calendar, RegistryInterface $eventsRegis...
php
chosen
[ { "from": "system", "value": "Remove restrictions for dev front controller.\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\Debug\\Debug;\n\n// If you don't want to setup permissions the proper way, just uncomment the followin...
php
chosen
[ { "from": "system", "value": "Add call static helper method to service context\n" }, { "from": "human", "value": "<?php\n/**\n *\n */\n\nnamespace Mvc5\\Service;\n\nuse Mvc5\\Exception;\n\nfinal class Context\n{\n /**\n * @var Service\n */\n protected static $service;\n\n /**\n ...
php
chosen
[ { "from": "system", "value": "Create \"Register configurations\" method and move config codes\n" }, { "from": "human", "value": "<?php\n\nnamespace Juy\\ActiveMenu;\n\nuse Illuminate\\Support\\ServiceProvider as IlluminateServiceProvider;\n\nclass ServiceProvider extends IlluminateServiceProvide...
php
chosen
[ { "from": "system", "value": "Remove route defenitions from controllers\n" }, { "from": "human", "value": "<?php\n/**\n * @link https://github.com/sydes/framework\n * @copyright 2011-2017, ArtyGrand <artygrand.ru>\n * @license MIT license; see LICENSE\n */\nnamespace Sydes\\Router;\n\ncla...
php
chosen
[ { "from": "system", "value": "Replace Base64 with low quality placeholder\n\nThat should also fix MMV" }, { "from": "human", "value": "<?php\n/**\n * Lazyload class\n */\n\nclass Lazyload {\n public static function LinkerMakeExternalImage(&$url, &$alt, &$img) {\n global $wgRequest;\n ...
php
chosen
[ { "from": "system", "value": "Revert bad changes to the exception handler" }, { "from": "human", "value": "<?php\n\nnamespace App\\Exceptions;\n\nuse Exception;\nuse Illuminate\\Auth\\Access\\AuthorizationException;\nuse Illuminate\\Database\\Eloquent\\ModelNotFoundException;\nuse Symfony\\Compo...
php
chosen
[ { "from": "system", "value": " Add check whether $cancellable is an object" }, { "from": "human", "value": "<?php\n\nnamespace React\\Promise\\Internal;\n\n/**\n * @internal\n */\nfinal class CancellationQueue\n{\n private $started = false;\n private $queue = [];\n\n public function __i...
php
chosen
[ { "from": "system", "value": "Remove \"use\" statement. No point for it when the entire file just includes a file and executes one static method.\n" }, { "from": "human", "value": "<?php\n\n /**\n * PHPerian: PHP library for Experian's Web Services\n *\n * This is a convinience fi...
php
chosen
[ { "from": "system", "value": "Remove unnecessary use on verification controller" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Routing\\Controller;\nuse Illuminate\\Foundation\\Auth\\VerifiesEmails;\n\nclass Ve...
php
chosen
[ { "from": "system", "value": "Allow exception to be thrown in `elixir` helper\n" }, { "from": "human", "value": "<?php\n\nif (! function_exists('public_path')) {\n /**\n * Get the path to the public folder.\n *\n * @param string $path\n * @return string\n */\n functio...
php
chosen
[ { "from": "system", "value": "Use clientScript->registerScript to register the javascript otherwise it gives problems on pages where other javascript files are included.\n\n" }, { "from": "human", "value": "<script type=\"text/javascript\">\n // initializiation of counters for new elements\n ...
php
chosen
[ { "from": "system", "value": "UPDATE age of account now printing out\n" }, { "from": "human", "value": "<h2>My Regular Savings Accounts</h2>\n<hr>\n<?php\nif (isset($records)) : foreach ($records as $row) : ?>\n\n <h2>Account Name</h2>\n <p><?php echo $row->bank_name; ?></p>\n\n <h2>Int...
php
chosen
[ { "from": "system", "value": "Define STATUS_MOVED constant ahead of its implementation\n\nSummary: I landed some patches out of order and we haven't landed the one which actually implements this yet. Define the constant for now.\n\nTest Plan: Deleted a page in Phriction without issue.\n\nReviewers: AnhNhan\...
php
chosen
[ { "from": "system", "value": "Make search a search input instead of text\n" }, { "from": "human", "value": "<?php namespace ProcessWire; ?>\n<header class=\"stripe stripe--fluid header header--reduced\">\n <div layout=\"column\" layout-gt-sm=\"row\" layout-align=\"start stretch\">\n <a...
php
chosen
[ { "from": "system", "value": "Set default timezone according to the configuration.\n" }, { "from": "human", "value": "<?php\n/**\n * Arvici App Bootstrap.\n *\n * @author Tom Valk <tomvalk@lt-box.info>\n * @copyright 2016 Tom Valk\n */\n\n/**\n * Define the base directory containing the 'Ap...
php
chosen
[ { "from": "system", "value": "Fix loading from xar file\n" }, { "from": "human", "value": "<?php namespace xp;\n\nif (version_compare(PHP_VERSION, '5.4.0', '<')) {\n trigger_error('This version of the XP Framework requires PHP 5.4.0+, have PHP '.PHP_VERSION, E_USER_ERROR);\n exit(0x3d);\n}\n\n...
php
chosen
[ { "from": "system", "value": "Handle 404 when user doesn't exist in SIS\n" }, { "from": "human", "value": "<?php\n\n\nnamespace UBC\\Exam\\MainBundle\\EventListener;\n\n\nuse Symfony\\Component\\HttpFoundation\\Session\\Session;\nuse Symfony\\Component\\Security\\Http\\Event\\InteractiveLoginEve...
php
chosen
[ { "from": "system", "value": "BUGFIX: Fix deprecated e modifier in preg_replace\n\nWith PHP 7, Faker issued the following warning:\npreg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead\n" }, { "from": "human", "value": "<?php\nnamespace KDambekalns\\Faker;\n\...
php
chosen
[ { "from": "system", "value": "Change data provider name for add email test\n" }, { "from": "human", "value": "<?php\n\nclass AddMailTest extends PHPUnit_Extensions_Selenium2TestCase\n{\n protected function setUp()\n {\n $this->setHost('127.0.0.1');\n $this->setBrowser('firefo...
php
chosen
[ { "from": "system", "value": " Increase length of logged request responses in `HTTPException`\n" }, { "from": "human", "value": "<?php\nnamespace wcf\\util\\exception;\nuse wcf\\system\\exception\\IExtraInformationException;\nuse wcf\\system\\exception\\SystemException;\nuse wcf\\util\\HTTPReque...
php
chosen
[ { "from": "system", "value": "Refactor unit test to use data provider\n" }, { "from": "human", "value": "<?php\nrequire_once(dirname(dirname(__FILE__)) . '/src/t1st3/JSONMin/JSONMin.php');\nuse t1st3\\JSONMin\\JSONMin as jsonMin;\n\nclass JSONMinTest extends PHPUnit_Framework_TestCase\n{\n\n pu...
php
chosen
[ { "from": "system", "value": "Fix configType to check only for array\n" }, { "from": "human", "value": "<?php\n\nnamespace NyroDev\\UtilityBundle\\Form\\Type;\n\nuse Symfony\\Component\\OptionsResolver\\OptionsResolver;\nuse Symfony\\Component\\Form\\Extension\\Core\\Type\\TextareaType;\nuse Sym...
php
chosen
[ { "from": "system", "value": "Update task to start queuedjob as per previous request...\n" }, { "from": "human", "value": "<?php\n\n/**\n * An example build task that publishes a bunch of pages - this demonstrates a realworld example of how the\n * queued jobs project can be used\n * \n *\n * @a...
php
chosen
[ { "from": "system", "value": "Fix wrong path in footer include of profiling file\n" }, { "from": "human", "value": " </div>\n <footer id=\"footer\" class=\"panel-footer\">\n <?php\n include 'footer/profiling.php';\n ?>\n </footer>\n </...
php
chosen
[ { "from": "system", "value": "Add setToken to the service" }, { "from": "human", "value": "<?php\n\n/**\n * Description of TelegramBotApi\n *\n * @author iman\n */\n\nnamespace Shaygan\\TelegramBotApiBundle;\n\nuse Symfony\\Component\\DependencyInjection\\Container;\nuse TelegramBot\\Api\\BotApi...
php
chosen