conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Return 400 status on bad parameters\n" }, { "from": "human", "value": "<?php\nnamespace Http;\n\nrequire_once('Rest/class.RestAPI.php');\n\nclass WebErrorHandler\n{\n public function __invoke($request, $response, $exception)\n {\n if($exception->getCode...
php
chosen
[ { "from": "system", "value": "Mark notification tests as incomplete until we can find a way to mock emails\n" }, { "from": "human", "value": "<?php\n\nnamespace Criterion\\Test\\Helper;\n\nclass NotificationsHelperTest extends \\Criterion\\Test\\TestCase\n{\n public function testEmail()\n ...
php
chosen
[ { "from": "system", "value": "Add message when input-checkboxes has no values\n" }, { "from": "human", "value": "<ul class=\"checkboxes\">\n\t<?php foreach ($values as $v => $l) { ?>\n\t\t<li class=\"checkboxes_i\">\n\t\t\t<input\n\t\t\t\ttype=\"hidden\"\n\t\t\t\tname=\"<?= \"{$name}[{$this->esc...
php
chosen
[ { "from": "system", "value": "Fix bug showing create post categories view\n" }, { "from": "human", "value": "<?php\n\nnamespace Atsys\\Blog\\Http\\Controllers;\n\nuse App\\Http\\Controllers\\Controller;\nuse Atsys\\Blog\\PostCategory;\nuse Atsys\\Blog\\Http\\Requests\\PostCategoryRequest;\nuse I...
php
chosen
[ { "from": "system", "value": "ADD path getter for the wrong file path.\n\nSigned-off-by: Richard Lea <5e20e57f18b15612bae274c2aef7dc395ee6b2a1@zoho.com>\n" }, { "from": "human", "value": "<?php\n\nnamespace Chigi\\Sublime\\Exception;\n\nuse Chigi\\Sublime\\Settings\\Environment;\n\n/**\n * Throw...
php
chosen
[ { "from": "system", "value": "Add test case to parameter parselet test\n" }, { "from": "human", "value": "<?php\n\nnamespace PhpBench\\Tests\\Unit\\Expression\\Parselet;\n\nuse Generator;\nuse PhpBench\\Expression\\Ast\\ParameterNode;\nuse PhpBench\\Tests\\Unit\\Expression\\ParseletTestCase;\n\n...
php
chosen
[ { "from": "system", "value": "[Consistency] Move namespace import after defined or exit() code\n" }, { "from": "human", "value": "<?php\n/**\n * @author Pierre-Henry Soria <hello@ph7cms.com>\n * @copyright (c) 2018, Pierre-Henry Soria. All Rights Reserved.\n * @license GNU Ge...
php
chosen
[ { "from": "system", "value": "Add a test to ensure the logger method is working\n" }, { "from": "human", "value": "<?php\n\nnamespace josegonzalez\\Queuesadilla;\n\nuse josegonzalez\\Queuesadilla\\Engine\\NullEngine;\nuse josegonzalez\\Queuesadilla\\Worker\\TestWorker;\nuse josegonzalez\\Queuesa...
php
chosen
[ { "from": "system", "value": "Update deps, fix Espresso, add test\n\n" }, { "from": "human", "value": "<?php\n\nnamespace React\\Espresso;\n\nuse React\\Http\\Request;\nuse React\\Http\\Response;\nuse Silex\\Application as BaseApplication;\nuse Symfony\\Component\\HttpFoundation\\Request as Symf...
php
chosen
[ { "from": "system", "value": "Remove own Events assets package, use inherited News\n\nFixes problem when a web uses News and Events, where child components of detail (eg. MetaTags) would be in two packages.\n" }, { "from": "human", "value": "<?php\nclass Kwc_Events_Directory_Component extends Kw...
php
chosen
[ { "from": "system", "value": "Move text block inside slider div\n" }, { "from": "human", "value": "@if ($slide['image_use'] !== false)\n<div class=\"slider-image slider-image-desktop {{ apply_filters('Modularity/slider/desktop_image_hidden', 'hidden-xs hidden-sm') }}\" style=\"background-image:u...
php
chosen
[ { "from": "system", "value": "Revert \"[Upg] update command : add publishing config\"\n\nThis reverts commit 18a09131fb71ede93c47547d7e3d185abf0b16bd.\n" }, { "from": "human", "value": "<?php\n\nnamespace MrJuliuss\\Syntara\\Commands;\n\nuse Illuminate\\Console\\Command;\nuse Symfony\\Component\...
php
chosen
[ { "from": "system", "value": "Use new Application class in prod\n" }, { "from": "human", "value": "<?php\n\nsession_start();\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\n$app = new Slim\\App([\n 'env' => 'prod',\n 'root_dir' => dirname(__DIR__)\n]);\n$container = $app->getContainer()...
php
chosen
[ { "from": "system", "value": "Hotfix: Allow nested form error messages" }, { "from": "human", "value": "\n{{--Translated fields show errors in the container, not per field--}}\n@if ( ! isset($translated) || ! $translated)\n\n <span id=\"{{ $key }}-errors\" class=\"help-block\">\n\n @if...
php
chosen
[ { "from": "system", "value": "Make one failing test pass\n" }, { "from": "human", "value": "<?php\n\nnamespace fennecweb\\ajax\\details;\n\nuse \\fennecweb\\WebService as WebService;\n\nclass TraitsOfOrganismsTest extends \\PHPUnit_Framework_TestCase\n{\n\n public function testExecute()\n ...
php
chosen
[ { "from": "system", "value": "Improve geo ip string decoding" }, { "from": "human", "value": "<?php\n// JUser/View/Helper/UserWithIp.php\n\nnamespace JUser\\View\\Helper;\n\nuse Zend\\View\\Helper\\AbstractHelper;\n\nclass UserWithIp extends AbstractHelper\n{\n public function __invoke($usern...
php
chosen
[ { "from": "system", "value": "Check on default controler if the user has a profile, if not redirect for creation\n" }, { "from": "human", "value": "<?php\n\nnamespace Neblion\\BaseAppBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Sensio\\Bundle\\Framewo...
php
chosen
[ { "from": "system", "value": "Fix encoding of numeric arrays in XMLRPC->JSON conversion\n" }, { "from": "human", "value": "<?php\n/* Copyright (C) NAVER <http://www.navercorp.com> */\n\nclass JSONDisplayHandler\n{\n\n\t/**\n\t * Produce JSON compliant content given a module object.\\n\n\t * @par...
php
chosen
[ { "from": "system", "value": "Enforce consistent artisan command tag namespacing\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Rinvex\\Tags\\Console\\Commands;\n\nuse Illuminate\\Console\\Command;\n\nclass PublishCommand extends Command\n{\n /**\n * The...
php
chosen
[ { "from": "system", "value": "Make sure we 301 redirect to the slug URL.\n" }, { "from": "human", "value": "<?php\n\nclass Controller_Post extends Controller_Abstract\n{\n public function get($postId, $slug = null)\n {\n $post = $this->_getContainer()->Post()->load($postId);\n\n ...
php
chosen
[ { "from": "system", "value": "Add some priorities on listeners\n" }, { "from": "human", "value": "<?php\nnamespace Behapi\\Extension\\EventListener;\n\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\n\nuse Behat\\Behat\\EventDispatcher\\Event\\OutlineTested;\nuse Behat\\Behat...
php
chosen
[ { "from": "system", "value": "Remove --dev from composer install.\n\n--dev is the default.\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\nchdir(__DIR__);\n\n$returnStatus = null;\npassthru('composer install --dev', $returnStatus);\nif ($returnStatus !== 0) {\n exit(1);\n}\n\nre...
php
chosen
[ { "from": "system", "value": "Fix deprecated Twig class usage\n" }, { "from": "human", "value": "<?php\nnamespace Devture\\Bundle\\UserBundle\\Twig;\n\nuse Devture\\Bundle\\UserBundle\\AccessControl\\AccessControl;\n\nclass UserExtension extends \\Twig_Extension {\n\n\tprivate $control;\n\n\tpub...
php
chosen
[ { "from": "system", "value": "Simplify and optimize the code\n\ngit-svn-id: 14496471c1e7f47aed4ccd4e743787d9efef7a8c@586 2772adf2-ac07-0410-9d30-e29d8120292e\n" }, { "from": "human", "value": "<?php\n\nrequire_once(dirname(__FILE__).\"/../pfccommand.class.php\");\n\nclass pfcCommand_connect exte...
php
chosen
[ { "from": "system", "value": "Return proper response if redis is not available\n" }, { "from": "human", "value": "<?php\n\nnamespace Alcohol\\PasteBundle\\EventListener;\n\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\HttpKernel\\Event\\GetResponseForExceptionEvent;...
php
chosen
[ { "from": "system", "value": "Fix incorrectly named property \"data\" to be \"attributes\"\n" }, { "from": "human", "value": "<?php\n\nnamespace Chrisgeary92\\Pagespeed;\n\nclass Response\n{\n /**\n * PageSpeed API response data\n *\n * @var array\n */\n protected $attribut...
php
chosen
[ { "from": "system", "value": "Use 9999 as default site\n" }, { "from": "human", "value": "<?php\nclass JSiteConfig extends JConfig\n{\n\tvar $sitename = 'Nooku Server - Default';\n}\n?>" }, { "from": "gpt", "value": "<?php\nclass JSiteConfig extends JConfig\n{\n\tvar $sitename = 'Ope...
php
chosen
[ { "from": "system", "value": "t257: Remove unneeded params-argument for Render::getTranslation()\n" }, { "from": "human", "value": "<?php\n\nfunction smarty_compiler_translateStatic($params, Smarty $smarty) {\n\t/** @var CM_Render $render */\n\t$render = $smarty->getTemplateVars('render');\n\t$k...
php
chosen
[ { "from": "system", "value": "Add all-krajee.js to Select2 Assets\n" }, { "from": "human", "value": "<?php\n\n/**\n * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015\n * @package yii2-widgets\n * @subpackage yii2-widget-select2\n * @version 2.0.2\n */\n\nnamespace kartik\...
php
chosen
[ { "from": "system", "value": "Declare schema class should be abstract\n" }, { "from": "human", "value": "<?php\nnamespace LazyRecord\\Schema;\n\n// a class alias of SchemaDeclare\n// SchemaDeclare should be deprecated now.\nclass DeclareSchema extends SchemaDeclare { }\n\n" }, { "from": ...
php
chosen
[ { "from": "system", "value": "Make the PEP pass the actual SP to the PDP in case of a trusted proxy.\n" }, { "from": "human", "value": "<?php\n\nclass EngineBlock_Corto_Filter_Command_PolicyDecisionPoint extends EngineBlock_Corto_Filter_Command_Abstract\n{\n /**\n * This command may modif...
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": "Make assigned-password migration script more robust\n" }, { "from": "human", "value": "<?php\n\n// skip if people table not generated yet\nif (!DB::oneRecord('SELECT 1 FROM information_schema.TABLES WHERE TABLE_SCHEMA = SCHEMA() AND TABLE_NAME = \"people\"')) {\n ...
php
chosen
[ { "from": "system", "value": "Fix broken spec tests in Laravel Session implementation\n" }, { "from": "human", "value": "<?php\n\nnamespace spec\\Omniphx\\Forrest\\Providers\\Laravel;\n\nuse Illuminate\\Config\\Repository as Config;\nuse Symfony\\Component\\HttpFoundation\\Session\\SessionInterf...
php
chosen
[ { "from": "system", "value": "Set $useSecureSearch to false to allow full-functional client testing\n" }, { "from": "human", "value": "<?php\nnamespace app\\controllers;\n\nuse fproject\\rest\\ActiveController;\nuse yii\\db\\ActiveQuery;\n\nclass UserController extends ActiveController{\n pub...
php
chosen
[ { "from": "system", "value": "Fix missing parameter in docs of setChannel function\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 * file t...
php
chosen
[ { "from": "system", "value": "Fix notification preferences not being enabled by default\n" }, { "from": "human", "value": "<?php namespace Flarum\\Extend;\n\nuse Illuminate\\Foundation\\Application;\nuse Flarum\\Core\\Models\\Notification;\nuse Flarum\\Core\\Models\\User;\n\nclass NotificationTy...
php
chosen
[ { "from": "system", "value": "Remove a couple unused variables.\n" }, { "from": "human", "value": "<?php\n\nclass CRM_Logviewer_Page_LogViewer extends CRM_Core_Page {\n\n public function run() {\n $this->assign('currentTime', date('Y-m-d H:i:s'));\n $config = CRM_Core_Config::singleton();...
php
chosen
[ { "from": "system", "value": "[API][Product] Remove custom product collection data provider in favour of custom product extension\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 ...
php
chosen
[ { "from": "system", "value": "Extend the admin theme layout\n" }, { "from": "human", "value": "@extends('core::layouts.master')\n\n@section('content-header')\n<h1>\n Dashboard\n</h1>\n<ol class=\"breadcrumb\">\n <li><a href=\"#\"><i class=\"fa fa-dashboard\"></i> {{ trans('core::core.bread...
php
chosen
[ { "from": "system", "value": "Change function name to not interfere with another\n" }, { "from": "human", "value": "<?php\n\nnamespace TomIrons\\Tuxedo\\Mailables;\n\nuse TomIrons\\Tuxedo\\Message;\nuse TomIrons\\Tuxedo\\TuxedoMailable;\n\nclass AlertMailable extends TuxedoMailable\n{\n use M...
php
chosen
[ { "from": "system", "value": "[FrameworkBundle] Allow to use the BrowserKit assertions with Panther and API Platform's test client\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...
php
chosen
[ { "from": "system", "value": "Fix scripting for remote web services.\n" }, { "from": "human", "value": "<?php\n\nnamespace DreamFactory\\Core\\Events;\n\nuse DreamFactory\\Core\\Contracts\\ServiceRequestInterface;\nuse DreamFactory\\Core\\Contracts\\ServiceResponseInterface;\nuse Symfony\\Compon...
php
chosen
[ { "from": "system", "value": "Fix issue with Windows file paths\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of phpnsc.\n *\n * (c) ResearchGate GmbH <bastian.hofmann@researchgate.net>\n *\n * For the full copyright and license information, please view the LICENSE\n * file ...
php
chosen
[ { "from": "system", "value": "application: Add error() function to Output class\n" }, { "from": "human", "value": "<?php\n\n/**\n * Output library\n * @author M2Mobi, Heinz Wiesinger\n */\nclass Output\n{\n\n /**\n * Constructor\n */\n public function __construct()\n {\n\n }\...
php
chosen
[ { "from": "system", "value": "Fix bug OSC-1094 - Incorrect spelling of database\n" }, { "from": "human", "value": "<?php\n/*\n $Id$\n\n osCommerce, Open Source E-Commerce Solutions\n http://www.oscommerce.com\n\n Copyright (c) 2002 osCommerce\n\n Released under the GNU General Public Licens...
php
chosen
[ { "from": "system", "value": "Fix Document class unknown in migration" }, { "from": "human", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AddUidToDocuments extends AbstractMigration\n{\n\t\tpublic function change()\n\t\t{\n\t\t\t$strategy = defined('ORM_UID_STRATEGY') && ...
php
chosen
[ { "from": "system", "value": "Modify some charge action messages" }, { "from": "human", "value": "<?php\n\n/**\n * @package Billing\n * @copyright Copyright (C) 2012-2016 BillRun Technologies Ltd. All rights reserved.\n * @license GNU Affero General Public License Version 3...
php
chosen
[ { "from": "system", "value": "Add create() method to give recommended config\n" }, { "from": "human", "value": "<?php\n\nnamespace TomPHP\\HalClient;\n\nuse TomPHP\\HalClient\\Exception\\UnknownContentTypeException;\nuse Assert\\Assertion;\n\nfinal class Client implements ResourceFetcher\n{\n ...
php
chosen
[ { "from": "system", "value": "Remove day 25 part 2 link\n" }, { "from": "human", "value": "<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>Advent of Code</title>\n </head>\n <body>\n <h1>Advent of Code Solutions</h1>\n <ol>\n<?php for($i ...
php
chosen
[ { "from": "system", "value": "Add PHPDoc to file import processor interface\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Core\\File\\ImportProcessor;\n\nuse Concrete\\Core\\Entity\\File\\Version;\n\ninterface ProcessorInterface\n{\n public function shouldProcess(Version $vers...
php
chosen
[ { "from": "system", "value": "Select all fields from from table in song type\n" }, { "from": "human", "value": "<?php\n\nclass Denkmal_Elasticsearch_Type_Song extends CM_Elastica_Type_Abstract {\n\n const INDEX_NAME = 'song';\n\n protected $_mapping = array(\n 'label' => array('type...
php
chosen
[ { "from": "system", "value": "Add Error title if Service does not register success.\n" }, { "from": "human", "value": "<?php\n\nnamespace Daruwanov\\Provider;\n\nuse Silex\\Application;\nuse Silex\\ServiceProviderInterface;\nuse Mandrill;\nuse Mandrill_Messages;\n\n/*\n * MandrillServiceProvider...
php
chosen
[ { "from": "system", "value": "Use ArrayCache for integration tests\n" }, { "from": "human", "value": "<?php\n\nnamespace Radebatz\\ACache\\Tests\\Decorators\\Psr;\n\nuse Cache\\IntegrationTests\\CachePoolTest;\nuse Radebatz\\ACache\\ApcCache;\nuse Radebatz\\ACache\\ArrayCache;\nuse Radebatz\\ACa...
php
chosen
[ { "from": "system", "value": "Fix deprecation warning in Symfony 4.2\n\nThis addresses `Not implementing the static getExtendedTypes() method in Limenius\\Liform\\Form\\Extension\\AddLiformExtension when implementing the Symfony\\Component\\Form\\FormTypeExtensionInterface is deprecated since Symfony 4.2. T...
php
chosen
[ { "from": "system", "value": "Add birthdate localized format input validation\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Requests;\n\nclass ContactFormRequest extends Request\n{\n /**\n * Determine if the user is authorized to make this request.\n *\n * @retu...
php
chosen
[ { "from": "system", "value": "Add return type to functions\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Libraries\\Parser;\n\ninterface ParserInterface\n{\n public function __construct(array $request);\n\n public function parse();\n\n public function getEvent();\n\n pub...
php
chosen
[ { "from": "system", "value": "PIM-4035: Fix deprecated use of extension property (doctrine 2.5)\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\SecurityBundle\\Acl\\Cache;\n\nuse Doctrine\\Common\\Cache\\FilesystemCache as BaseFilesystemCache;\n\n/**\n * The aim of this class ...
php
chosen
[ { "from": "system", "value": "Update output to render HTML\n\nFixes #2" }, { "from": "human", "value": "@if (Session::has('flashNotification.message'))\n@if (Session::has('flashNotification.modal'))\n@include('partials.modal', ['modalClass' => 'flashModal', 'title' => 'Notice', 'body' => Session...
php
chosen
[ { "from": "system", "value": "Add class to body tag to mark user status\n" }, { "from": "human", "value": "<!DOCTYPE html>\n<html lang=\"<?php echo $sf_user->getCulture() ?>\"<?php if ('rtl' == sfCultureInfo::getInstance($sf_user->getCulture())->direction): ?> dir=\"rtl\"<?php endif; ?>>\n <hea...
php
chosen
[ { "from": "system", "value": "Improve error message in phpspec inline matcher.\n" }, { "from": "human", "value": "<?php\n/**\n * PHP version 5.6\n *\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\nnamespace Ewallet\\Bridges\\Tests;\n\nu...
php
chosen
[ { "from": "system", "value": "Update native renderer to be less risky\n" }, { "from": "human", "value": "<?php\n\nnamespace Michaeljennings\\Carpenter\\View;\n\nuse Michaeljennings\\Carpenter\\Contracts\\View;\nuse Michaeljennings\\Carpenter\\Exceptions\\ViewNotFoundException;\n\nclass Native im...
php
chosen
[ { "from": "system", "value": "Fix HTML escaping issue on html display fields\n" }, { "from": "human", "value": "<div class=\"dms-display-html\" data-value=\"{{ $value }}\">\n <button class=\"dms-view-more-button btn btn-info\">\n View More <i class=\"fa fa-plus\"></i>\n </button>\n\...
php
chosen
[ { "from": "system", "value": "Correct rendering of \"Another Herald Rule\" conditions in Herald\n\nSummary: Fixes T8920. These are semi-magical and need to be slightly special cased, now.\n\nTest Plan: {F654502}\n\nReviewers: chad, btrahan\n\nReviewed By: btrahan\n\nSubscribers: epriestley\n\nManiphest Task...
php
chosen
[ { "from": "system", "value": "Change default CSS classes for rendered activities\n" }, { "from": "human", "value": "<?php\n\nnamespace Honeybee\\Ui\\Renderer\\Html\\Honeybee\\Ui\\Activity;\n\nuse Honeybee\\Ui\\Renderer\\ActivityRenderer;\n\nclass HtmlActivityRenderer extends ActivityRenderer\n{\...
php
chosen
[ { "from": "system", "value": "Fix issue with separating variables\n" }, { "from": "human", "value": "<?php\n\nnamespace Naterweb\\Routing\\Urls;\n\nuse Naterweb\\Engine\\Configuration;\n\nclass UrlBuilder {\n\n\tprivate $urlParams;\n\n\tpublic function __construct($params)\n\t{\n\t\t$this->urlPa...
php
chosen
[ { "from": "system", "value": "Add type-hints to Controller-related classes\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace AlgoWeb\\PODataLaravel\\Controllers;\n\nclass MetadataControllerContainer\n{\n private $metadata;\n\n /**\n * @param array $meta\...
php
chosen
[ { "from": "system", "value": "Allow us to limit the amount of returned results\n" }, { "from": "human", "value": "<?php\nnamespace MindOfMicah\\LaravelDatatables;\n\nuse Illuminate\\Http\\JsonResponse;\n\nclass Datatable\n{\n protected $model;\n protected $columns;\n\n\tpublic function __c...
php
chosen
[ { "from": "system", "value": "Hide user-activity after 10 (instead of 7) days\n" }, { "from": "human", "value": "<?php\n\nfunction smarty_function_user_activity(array $params, Smarty_Internal_Template $template) {\n\t$force_display = isset($params['force_display']);\n\t/** @var CM_Model_User $us...
php
chosen
[ { "from": "system", "value": "Use TextReporter when in cli mode.\n\n\n" }, { "from": "human", "value": "<?php\r\n require_once('simpletest/unit_tester.php');\r\n require_once('simpletest/reporter.php');\r\n \r\n require_once(dirname(__FILE__).'/acceptance_test.php');\r\n require_o...
php
chosen
[ { "from": "system", "value": "Fix running single PHPUnit test" }, { "from": "human", "value": "<?php\n/*\n * Copyright (c) Ouzo contributors, http://ouzoframework.org\n * This file is made available under the MIT License (view the LICENSE file for more information).\n */\n\nnamespace Ouzo\\Tests...
php
chosen
[ { "from": "system", "value": "Update case of autoload class\n" }, { "from": "human", "value": "<?php\nnamespace Joindin;\n\nrequire_once '../src/Joindin/Service/Autoload.php';\n\nspl_autoload_register('Joindin\\Service\\autoload::autoload');\n\nsession_cache_limiter(false);\nsession_start();\nin...
php
chosen
[ { "from": "system", "value": "Update to extend Model instead of BaseModel" }, { "from": "human", "value": "<?php namespace GeneaLabs\\Bones\\Marshal;\n\n\nuse GeneaLabs\\Bones\\Marshal\\Events\\EventGenerator;\nuse Watson\\Validating\\ValidatingTrait;\n\nclass BonesMarshalBaseModel extends \\Bas...
php
chosen
[ { "from": "system", "value": "Move assets to workspace folder" }, { "from": "human", "value": "<?php\n\n\tClass extension_admin_css_override extends Extension{\n\n\t\tpublic function getSubscribedDelegates(){\n\t\t\treturn array(\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/backend/',\n\t\t\t\t\t'...
php
chosen
[ { "from": "system", "value": "Allow email verification middleware to work with API routes\n\nCurrently if you apply the email verification middleware to an API route (XHR) you get strange/broken behaviour because of the redirect.\nSo, when the request expects JSON, just return a 403. This solves my issues.\...
php
chosen
[ { "from": "system", "value": ":wrench: Add reference on comment fixtures\n" }, { "from": "human", "value": "<?php\n\nnamespace OAuthBundle\\DataFixtures\\ORM;\n\nuse Doctrine\\Common\\DataFixtures\\AbstractFixture;\nuse Doctrine\\Common\\DataFixtures\\FixtureInterface;\nuse Doctrine\\Common\\Per...
php
chosen
[ { "from": "system", "value": "Set schema default string length to 128\n" }, { "from": "human", "value": "<?php\n\nnamespace Igniter\\Flame\\Database;\n\nuse Illuminate\\Database\\DatabaseServiceProvider as BaseDatabaseServiceProvider;\n\nclass DatabaseServiceProvider extends BaseDatabaseServiceP...
php
chosen
[ { "from": "system", "value": "Update db config for PDO\n" }, { "from": "human", "value": "<?php defined('SYSPATH') or die('No direct access allowed.');\n\nreturn array\n(\n 'default' => array\n (\n 'type' => 'MySQL',\n 'connection' => array(\n /**\n ...
php
chosen
[ { "from": "system", "value": "Make migration rerunable (just for simplicity's sake)\n" }, { "from": "human", "value": "<?php\n\n// Check to ensure this file is included in Joomla!\ndefined('_JEXEC') or die('Restricted access');\n\n/**\n * Migration script for ...\n **/\nclass Migration2013071511...
php
chosen
[ { "from": "system", "value": "Implement function for getting categorical trait values\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Repository;\n\nuse Doctrine\\ORM\\EntityRepository;\n\n/**\n * TraitCategoricalEntryRepository\n *\n * This class was generated by the PhpStorm \...
php
chosen
[ { "from": "system", "value": "Create key if not exists.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Services;\n\nuse App\\Hospital;\nuse Illuminate\\Database\\Eloquent\\Collection;\nuse App\\Key;\n\nclass KeyService\n{\n public function generateKey(): string\n {\n ...
php
chosen
[ { "from": "system", "value": "Use the attribute getter, not the property. Declare the getter abstract.\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the LdapTools package.\n *\n * (c) Chad Sikorra <Chad.Sikorra@gmail.com>\n *\n * For the full copyright and license inform...
php
chosen
[ { "from": "system", "value": "Add new quotes for alliance" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace WyriMaps\\XHeaders;\n\nfinal class Alliance\n{\n public static function headers()\n {\n return [\n 'X-Stormwind-Guard' => 'King\\'s honor...
php
chosen
[ { "from": "human", "value": "Add google analytics for languageforge.org\n" }, { "from": "gpt", "value": "<?php if (strstr($_SERVER['HTTP_HOST'], 'languageforge.org')): ?>\n<script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(argumen...
php
chosen
[ { "from": "system", "value": "Throw an exception when APC is not loaded but cache is enabled in app config" }, { "from": "human", "value": "<?php\n\nnamespace Symfony\\Component\\Validator\\Mapping\\Cache;\n\nuse Symfony\\Component\\Validator\\Mapping\\ClassMetadata;\n\nclass ApcCache implements...
php
chosen
[ { "from": "system", "value": "Replace magic number with symbolic constant\n" }, { "from": "human", "value": "<?php\n\nnamespace Bauhaus\\Http;\n\nuse Psr\\Http\\Message\\ResponseInterface;\nuse Bauhaus\\Http\\Message;\nuse Bauhaus\\Http\\Response\\Status;\nuse Bauhaus\\Http\\Response\\StatusInte...
php
chosen
[ { "from": "system", "value": "Set the view content based on the response content.\n" }, { "from": "human", "value": "<?php\n/**\n * @version\t\t$Id$\n * @package Nooku_Server\n * @subpackage Application\n * @copyright\tCopyright (C) 2011 - 2012 Timble CVBA and Contributors. (http://www.timb...
php
chosen
[ { "from": "system", "value": "Update default target to 10\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddDefaultTarget extends Migration\n{\n protected $tableName;\n protected $keyColumn;\n protected $valueColumn;\n\n public f...
php
chosen
[ { "from": "system", "value": "Fix URL parameters being wrongly routed.\n" }, { "from": "human", "value": "<?php\n\n$requestURI = $_SERVER['REQUEST_URI'];\n$documentRoot = $_SERVER['DOCUMENT_ROOT'];\n\nif($requestURI !== '/' && file_exists($documentRoot . '/' . $requestURI))\n{\n\treturn false;...
php
chosen
[ { "from": "system", "value": "Update media migration to include all needed meta fields by default + changing column names.\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Mi...
php
chosen
[ { "from": "system", "value": "Add explicit visibility for method getOrder\n\nAdd explicit visibility following PSR-2" }, { "from": "human", "value": "<?php\n/*\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, ...
php
chosen
[ { "from": "system", "value": "Fix migration table class name\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreatePluginsTable extends Migration\n{\n ...
php
chosen
[ { "from": "system", "value": "Change report for advised fund letter\n" }, { "from": "human", "value": "<?php\n/**\n * Write a custom report to a letter (PDF).\n */\nclass CRM_Customreports_Form_Task_ContributionLetterAdvisedFund extends CRM_Customreports_Form_Task_ContributeBase {\n protected $...
php
chosen
[ { "from": "system", "value": "Revert \"Add author to doctrine migrations\"\n\nThis reverts commit bd227b32da43419226f3003dc2c4d98966adb25c.\n" }, { "from": "human", "value": "<?php\n\nnamespace Application\\Migrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL\\Sc...
php
chosen
[ { "from": "system", "value": "Fix stub test for sharness\n" }, { "from": "human", "value": "<?php\n\nnamespace Stubs;\n\n\nclass Test\n{\n\n /**\n * @param string $key\n * @return mixed|null\n */\n public function getVar(string $key) {}\n\n}\n" }, { "from": "gpt", "...
php
chosen
[ { "from": "system", "value": "Add language line for inheriting user permissions.\n\nSigned-off-by: Micheal Mand <4a52646cf58d42dd1882775751ea450b8cf7f96f@kmdwebdesigns.com>\n" }, { "from": "human", "value": "<?php\n\nreturn [\n 'button' => [\n 'new-role' => 'New role',\n ],\n 'ti...
php
chosen
[ { "from": "system", "value": "[ChangelogLinker] Fix verbosity forced by Kernel\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace Symplify\\ChangelogLinker\\DependencyInjection;\n\nuse Psr\\Container\\ContainerInterface;\n\nfinal class ContainerFactory\n{\n public ...
php
chosen
[ { "from": "system", "value": "Add new blog-post input form\n" }, { "from": "human", "value": "<?php\necho \"!!!\";" }, { "from": "gpt", "value": "<?php\n?>\n\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <title>Blog admin panel</title>\n <link rel...
php
chosen
[ { "from": "system", "value": "BAP-11622: Optimize email body cleanup process\n - Add migration message queue\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\EmailBundle\\Migrations\\Schema\\v1_28;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\n\nuse Symfony\\Component\\DependencyInj...
php
chosen
[ { "from": "system", "value": "Add a filter to disable moving checked category items\n" }, { "from": "human", "value": "<?php\n/**\n * Clean up the_excerpt()\n */\nfunction roots_excerpt_more() {\n return ' &hellip; <a href=\"' . get_permalink() . '\">' . __('Continued', 'roots') . '</a>';\n}\na...
php
chosen