conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add empty alt tag to slack logo.\n\nAs per http://webaim.org/techniques/alttext/#decorative\n\nDecorative images should have empty alt tags, which indicates that the\nimage is decorative and should not be read aloud by assistive\ntechnologies.\n" }, { "from": "human", ...
php
chosen
[ { "from": "system", "value": "Add method to test the API URL\n" }, { "from": "human", "value": "<?php\n\nnamespace Cerbero\\FluentApi;\n\n/**\n * Dummy class for testing AbstractApi.\n *\n * @author Andrea Marco Sartori\n */\nclass ConcreteApi extends AbstractApi\n{\n //\n}\n" }, { ...
php
chosen
[ { "from": "system", "value": "Update order description in remote test\n" }, { "from": "human", "value": "<?php\n\nnamespace GoPay;\n\nclass WhenApiSucceedTest extends GivenGoPay\n{\n public function testCreatePaymentAndGetItsStatus()\n {\n $this->givenCustomer();\n $this->whe...
php
chosen
[ { "from": "system", "value": "Remove double implementation of doctrine interfaces\n" }, { "from": "human", "value": "<?php\n\nnamespace Happyr\\DoctrineSpecification;\n\nuse Doctrine\\ORM\\EntityRepository;\nuse Doctrine\\Common\\Collections\\Selectable;\nuse Doctrine\\Common\\Persistence\\Objec...
php
chosen
[ { "from": "system", "value": "Update to correct metadata values.\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| LazyStrings Routes\n|--------------------------------------------------------------------------\n|\n| Ro...
php
chosen
[ { "from": "system", "value": "Add default command name 'search' it nothing was given" }, { "from": "human", "value": "<?php\n\nnamespace Clue\\PharComposer;\n\nuse Symfony\\Component\\Console\\Application as BaseApplication;\n\nclass App extends BaseApplication\n{\n public function __construc...
php
chosen
[ { "from": "system", "value": "Allow hyphens in referenced key names\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner <toby.zerner@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was dist...
php
chosen
[ { "from": "system", "value": "Handle null as cell value through factory\n" }, { "from": "human", "value": "<?php\n\nnamespace ChartBlocks\\DataSet;\n\nclass CellFactory {\n\n public function createService($parameters) {\n if (is_scalar($parameters)) {\n $parameters = array(\...
php
chosen
[ { "from": "system", "value": "Make controller add the php extention\n" }, { "from": "human", "value": "<?php\n class TestrunController extends ControllerBase {\n public function create( $name ) {\n include_once 'tests/base.php';\n $path = 'tests/' . $name;\n ...
php
chosen
[ { "from": "system", "value": "Add attribution for macro used\n" }, { "from": "human", "value": "<?php\n\nHTML::macro('nav_item', function($url, $text, $a_attr = [], $active_class = 'active', $li_attrs = [])\n{\n $href = HTML::link($url, $text, $a_attr);\n $response = '';\n \n if( Req...
php
chosen
[ { "from": "system", "value": "Move \"\\Illuminate\\Contracts\\Http\\Kernel\" to \"use\" section\n" }, { "from": "human", "value": "<?php\n\nnamespace Juy\\CharacterSolver;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass CharacterSolverServiceProvider extends ServiceProvider\n{\n /**\n ...
php
chosen
[ { "from": "system", "value": "Allow modification of the prohibited keys array, via class methods\n" }, { "from": "human", "value": "<?php\n\nnamespace Silktide\\LazyBoy\\Controller;\n\nuse Symfony\\Component\\HttpFoundation\\JsonResponse;\n\n/**\n * RestControllerTrait\n */\ntrait RestController...
php
chosen
[ { "from": "system", "value": "Use formatted log values instead of raw values when emitting to Socket.io, to avoid errors when exceptions are thrown and Socket.io tries to pack them\n" }, { "from": "human", "value": "<?php\n/**\n * @file\n */\n\nnamespace CultuurNet\\UDB3\\Monolog;\n\nuse Monolog...
php
chosen
[ { "from": "system", "value": "Add missing ocs resource for user workflows\n\nSigned-off-by: Julius Härtl <bf353fa4999f2f148afcc6d8ee6cb1ee74cc07c3@bitgrid.net>\n" }, { "from": "human", "value": "<?php\n/**\n * @copyright Copyright (c) 2016 Morris Jobke <hey@morrisjobke.de>\n *\n * @license GNU A...
php
chosen
[ { "from": "system", "value": "Remove more ingredients from primary ingredient loop\n" }, { "from": "human", "value": "<div id=\"ingredients_matrix\" class=\"row\">\n\t<?php foreach ($ingredients as $key => $ingredient) { ?>\n\t\t<?php foreach ($ingredient['secondary'] as $secondary) { ?>\n\t\t\t...
php
chosen
[ { "from": "system", "value": "Fix using the WordPress version instead of the theme version" }, { "from": "human", "value": "<?php\n\n/*\n\tPlugin Name: WP Sentry\n\tPlugin URI: http://git.alboweb.nl/devalex/wp-sentry\n\tDescription: Send all exceptions & errors to an external tracker, tracks on ...
php
chosen
[ { "from": "system", "value": "MINOR: Include SS autoloader for use in test cases\n" }, { "from": "human", "value": "<?php\n\ndefine('HASH_PATH_RELATIVE_PATH', basename(dirname(__FILE__)));\n\nObject::add_extension('ContentController', 'HashPathExtension');\n" }, { "from": "gpt", "val...
php
chosen
[ { "from": "system", "value": "Add zh-tw translation for \"Switch language\"\n" }, { "from": "human", "value": "<?php\n/*\nSection: global\nLanguage: Traditional Chinese 繁體中文\nTranslator: Trey Lin\n*/\n\n$translations = array(\n 'sitetitle1' => 'db4free.net',\n\n 'sitetitle2' => '免費的 MySQL ...
php
chosen
[ { "from": "system", "value": "Fix form - shouldnt have any of that junk in there.\n" }, { "from": "human", "value": "<?php namespace Anomaly\\VariablesModule\\Group\\Form;\n\nuse Anomaly\\Streams\\Platform\\Stream\\Form\\StreamFormBuilder;\n\n/**\n * Class GroupFormBuilder\n *\n * @link ...
php
chosen
[ { "from": "system", "value": "Change from Oc Sms ---> SMS\n\nLooks cleaner and more like the design." }, { "from": "human", "value": "<?php\n/**\n * ownCloud - ocsms\n *\n * This file is licensed under the Affero General Public License version 3 or\n * later. See the COPYING file.\n *\n * @autho...
php
chosen
[ { "from": "system", "value": "Define $bg_url variable for header" }, { "from": "human", "value": "<?php\r\n// get page thumbnail image if it is a page\r\nif ( is_home() ) {\r\n $bg = mbtheme_get_option( 'header-bg-blog', array() );\r\n $bg_url = $bg[ 'url' ];\r\n} elseif ( is_page() ) ...
php
chosen
[ { "from": "system", "value": "Fix broken test due to version update\n" }, { "from": "human", "value": "<?php\n\nnamespace Stripe;\n\nclass BankAccountTest extends TestCase\n{\n public function testVerify()\n {\n self::authorizeFromEnv();\n\n $customer = self::createTestCustom...
php
chosen
[ { "from": "system", "value": "Add a few routes for PHP 5\n" }, { "from": "human", "value": "<?php\n\nnamespace Koseu\\Core;\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException...
php
chosen
[ { "from": "system", "value": "Make Sure the Article ID is an Integer\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of pmg/three-repositories\n *\n * Copyright (c) PMG <https://www.pmg.com>\n *\n * For full copyright information see the LICENSE file distributed\n * with this ...
php
chosen
[ { "from": "system", "value": "Fix order filter to work with PageViews\n" }, { "from": "human", "value": "<?php\n\nnamespace allejo\\stakx\\Twig;\n\nuse allejo\\stakx\\Object\\ContentItem;\n\nclass OrderFilter\n{\n public function __invoke ($array, $key, $order = \"ASC\")\n {\n if (!...
php
chosen
[ { "from": "system", "value": "Add si_single to conditional controlling display of featured image\n" }, { "from": "human", "value": "<?php\nif (is_single() || is_home()){\n the_date('F j, Y', '<p class=\"date\">', '</p>');\n}\n?>\n<h3><?php the_title() ?></h3>\n<?php\nif ((is_single() || is_ho...
php
chosen
[ { "from": "system", "value": "Revert template change so that the live snippets work\n" }, { "from": "human", "value": "<?php\n\n$loader = new Twig_Loader_Filesystem(__DIR__ . DIRECTORY_SEPARATOR . 'templates');\n$twig = new Twig_Environment($loader);\nif (getenv('TEMPLATE_CACHE_ENABLED') && gete...
php
chosen
[ { "from": "system", "value": "Use the Fully Qualified Namespace\n" }, { "from": "human", "value": "<?php\nnamespace Hostnet\\Bundle\\EntityTrackerBundle\\Services\\Blamable;\n\nuse Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorageInterface;\nuse Symfony\\Component\...
php
chosen
[ { "from": "system", "value": "Fix thing where methods sometimes aren't found in subclasses\n" }, { "from": "human", "value": "<?php\n\nnamespace Laracasts\\Integrated;\n\nuse Laracasts\\Integrated\\Str;\nuse ReflectionClass;\n\nclass AnnotationReader\n{\n /**\n * Create a new AnnotationRe...
php
chosen
[ { "from": "system", "value": "Add an option to retrieve all fields, not only visible" }, { "from": "human", "value": "<?php\n\nnamespace Gloomy\\PagerBundle\\DataGrid;\n\nuse Gloomy\\PagerBundle\\Pager\\Wrapper;\n\nclass DataGrid\n{\n protected $_request;\n\n protected $_router;\n\n pro...
php
chosen
[ { "from": "system", "value": "Add placeholder buttons for actions (edit, delete)\n" }, { "from": "human", "value": "@extends('crudapi::layouts.master')\n\n@section('content')\n <h1>{{ $model }}</h1>\n\n <table class=\"table\">\n <tr>\n @foreach($fields as $f)\n <th>{{ ...
php
chosen
[ { "from": "system", "value": "Revert \"modifica permissão de criação e deleção de avaliadores para permitir gerentes colocarem avaliadores sem a necessidade de aprovação pelo avaliador\"\n\nThis reverts commit c6f23dcfd0bd2308a2b612741da5e9158e2a707b.\n" }, { "from": "human", "value": "<?php\nna...
php
chosen
[ { "from": "system", "value": "Make sure current sprint returns something if there are sprints for the project.\n" }, { "from": "human", "value": "<?php\n\nclass Project extends Eloquent {\n\n\tprotected $fillable = ['title', 'slug'];\n\n\tpublic function sprints()\n\t{\n\t\treturn $this->hasMany...
php
chosen
[ { "from": "system", "value": "Disable station administrator role for demo account.\n\n" }, { "from": "human", "value": "<?php\nnamespace App\\Entity\\Fixture;\n\nuse Doctrine\\Common\\DataFixtures\\AbstractFixture;\nuse Doctrine\\Common\\DataFixtures\\DependentFixtureInterface;\nuse Doctrine\\Co...
php
chosen
[ { "from": "system", "value": "Fix ServiceProvider registerCommands method compatibility\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Rinvex\\Auth\\Providers;\n\nuse Illuminate\\Routing\\Router;\nuse Illuminate\\Support\\ServiceProvider;\nuse Rinvex\\Support\\...
php
chosen
[ { "from": "system", "value": "Use properly published asset paths instead of hardcoded paths.\n" }, { "from": "human", "value": "<!DOCTYPE html>\r\n<html lang=\"en\" dir=\"ltr\">\r\n<head>\r\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n\t<link rel=\"stylesheet\"...
php
chosen
[ { "from": "system", "value": "Fix foreign key name in relationships\n" }, { "from": "human", "value": "<?php\n\nnamespace RadDB;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass SurveyScheduleView extends Model\n{\n /**\n * The table associated with the model.\n *\n * @var s...
php
chosen
[ { "from": "system", "value": "Add paste plugin and set it to remove formatting\n" }, { "from": "human", "value": "<script src=\"http://cdn.tinymce.com/4/tinymce.min.js\"></script>\n<script>\ntinymce.init(\n{\n selector: \".has_editor\",\n menubar: false,\n plugins: [\n \"lists link ima...
php
chosen
[ { "from": "system", "value": "Allow for multiple mappings by dbxref\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\API\\Mapping;\n\nuse AppBundle\\API\\Webservice;\nuse AppBundle\\User\\FennecUser;\nuse Symfony\\Component\\HttpFoundation\\ParameterBag;\n\nclass ByDbxrefId exten...
php
chosen
[ { "from": "system", "value": "Use Request instead of input comment out examples\n" }, { "from": "human", "value": "<?php\n\nnamespace Kordy\\Ticketit\\Controllers;\n\nuse App\\Http\\Controllers\\Controller;\nuse Input;\nuse App\\User;\n\nclass UserSearchController extends Controller {\n\n pub...
php
chosen
[ { "from": "system", "value": "Fix resource support for work with SplObjectStorage\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types = 1);\n\n/*\n * This file is part of the FiveLab Resource package\n *\n * (c) FiveLab\n *\n * For the full copyright and license information, please ...
php
chosen
[ { "from": "system", "value": "Make JSON parameter middleware a bit more generic\n" }, { "from": "human", "value": "<?php namespace Flarum\\Api\\Middleware;\n\nuse Psr\\Http\\Message\\ResponseInterface as Response;\nuse Psr\\Http\\Message\\ServerRequestInterface as Request;\nuse Zend\\Stratigilit...
php
chosen
[ { "from": "system", "value": "Fix jquery error in template\n\ngit-svn-id: 245d8f85226f8eeeaacc1269b037bb4851d63c96@727 54a900ba-8191-11dd-a5c9-f1483cedc3eb\n" }, { "from": "human", "value": "\n<!-- Jquery Calls Specific to this page -->\n\t<script type=\"text/javascript\">\n\t\t\n\t\t$(document)...
php
chosen
[ { "from": "system", "value": "Remove error statement, add guzzle.debug options in shortcut\n" }, { "from": "human", "value": "<?php\n\n\nnamespace SilexGuzzle;\n\nuse Silex\\Application;\nuse Silex\\ServiceProviderInterface;\nuse GuzzleHttp\\Client;\n\nclass GuzzleServiceProvider implements Serv...
php
chosen
[ { "from": "system", "value": "Remove `LIKE` and raw from viewUserList rename" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Flarum.\n *\n * For detailed copyright and license information, please view the\n * LICENSE file that was distributed with this source code.\n */\n\n...
php
chosen
[ { "from": "system", "value": "Add missin character in define.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Define Constants.\n */\ndefine('TEMPLATE_DIR', get_template_directory());\ndefine('TEMPLATE_URI', get_template_directory_uri());\ndefine('ADMIN_DIR', TEMPLATE_DIR.'/admin');\ndefine(...
php
chosen
[ { "from": "system", "value": "Add separate methods for creating streams\n" }, { "from": "human", "value": "<?php\n\nnamespace Http\\Factory\\Diactoros;\n\nuse Interop\\Http\\Factory\\StreamFactoryInterface;\nuse Zend\\Diactoros\\Stream;\n\nclass StreamFactory implements StreamFactoryInterface\n{...
php
chosen
[ { "from": "system", "value": "Use unit test data for admin tests\n" }, { "from": "human", "value": "<?php\n\nclass AdminControllerTest extends AimeosTestAbstract\n{\n\tpublic function setUp()\n\t{\n\t\tparent::setUp();\n\t\trequire dirname(dirname(__DIR__)).'/src/routes_admin.php';\n\t}\n\n\n\tp...
php
chosen
[ { "from": "system", "value": "Revert the last commit\nDo not actually want to use the reseller ID for this test. We\nshould create a sub reseller for this\n" }, { "from": "human", "value": "<?php\n\n$callArray = array (\n 'func' => 'subresGet',\n 'data' => array (\n ...
php
chosen
[ { "from": "system", "value": "[Payment] Make classes with states and transitions static\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 * f...
php
chosen
[ { "from": "system", "value": "Disable Kint if display_errors is false\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Package\\KintDebug;\n\nuse Illuminate\\Filesystem\\Filesystem;;\nuse Concrete\\Core\\Package\\Package;\nuse View;\n\ndefined('C5_EXECUTE') or die(_('Access Denied.'...
php
chosen
[ { "from": "system", "value": "Call to config helper function instead of an instance of the container\n" }, { "from": "human", "value": "<?php\n\nnamespace GearHub\\LaravelEnhancementSuite\\Repositories;\n\nuse GearHub\\LaravelEnhancementSuite\\Contracts\\Repositories\\RepositoryFactory as Reposi...
php
chosen
[ { "from": "system", "value": "Use correct field for address formatting\n" }, { "from": "human", "value": "<?php\n\nnamespace HbgEventImporter;\n\nclass Location extends \\HbgEventImporter\\Entity\\PostManager\n{\n public $post_type = 'location';\n\n public function afterSave()\n {\n ...
php
chosen
[ { "from": "system", "value": "Use the right object for ACL validation\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sonata project.\n *\n * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>\n *\n * For the full copyright and license information, please view the L...
php
chosen
[ { "from": "system", "value": "Replace PHP_EOL with \\n to make it work under Win OS\n" }, { "from": "human", "value": "<?php\n\nnamespace Hitmeister\\Component\\Api\\Helper;\n\n/**\n * Class Security\n *\n * @category PHP-SDK\n * @package Hitmeister\\Component\\Api\\Helper\n * @author Maksim ...
php
chosen
[ { "from": "system", "value": "Update to dev config check\n" }, { "from": "human", "value": "<?php\n// define environment\ndefine('ENV', 'dev');\nob_start();\nsession_start();\n// define absolute server path\ndefine('ABS_PATH', $_SERVER['DOCUMENT_ROOT']);\n// include configuration file\nif(ENV ==...
php
chosen
[ { "from": "system", "value": "Remove the redundant db, lb static cache layer\n\nThey are already cached in db and lb object\n\nChange-Id: I3e4db98a3eecdf184db64274b3914eec076af905\n" }, { "from": "human", "value": "<?php\n\n/**\n * Database factory class, this will determine whether to use the m...
php
chosen
[ { "from": "system", "value": "Remove Meta on archive pages that aren't articles.\n" }, { "from": "human", "value": "<article <?php post_class(); ?>>\n <header>\n <h2 class=\"entry-title\"><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></h2>\n <?php get_template_part('templ...
php
chosen
[ { "from": "system", "value": "Add minimal shutdown signal handling\n" }, { "from": "human", "value": "<?php\r\n\r\nnamespace Aerys\\Watch;\r\n\r\nuse Aerys\\Server,\r\n Aerys\\BinOptions,\r\n Aerys\\Bootstrapper;\r\n\r\nclass DebugWatcher {\r\n public function watch(BinOptions $binOptio...
php
chosen
[ { "from": "system", "value": "Use PHP5.3 compat array syntax\n" }, { "from": "human", "value": "<?php\n/**\n * Created by JetBrains PhpStorm.\n * User: Doug\n * Date: 28/07/13\n * Time: 12:58\n * To change this template use File | Settings | File Templates.\n */\n\n namespace DVDoug\\BoxPacker;...
php
chosen
[ { "from": "system", "value": "Revert \"Dashboard API routes are not meant for the browser\"\n\nThis reverts commit 8fcef7b711423816260aba7669283fe2840f7893.\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Cachet.\n *\n * (c) Alt Three Services Limited\n *\n * For the full...
php
chosen
[ { "from": "system", "value": "Use Route::model instead of URL::model\n" }, { "from": "human", "value": "<?php defined('SYSPATH') or die('No direct access allowed.');\n/**\n * Roles list\n *\n * @package Anqh\n * @author Antti Qvickström\n * @copyright (c) 2010 Antti Qvickström\n * @licen...
php
chosen
[ { "from": "system", "value": "Add methods to delete a connection\n" }, { "from": "human", "value": "<?php\n\nnamespace Forestry\\Orm;\n\nclass Storage {\n\n\t/**\n\t * @var array\n\t */\n\tprivate static $instances = ['default' => []];\n\n /**\n * Set a new connection with the given name....
php
chosen
[ { "from": "system", "value": "Fix version (which, of course, has no effect on the tag/release)\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n/*\n * This file is part of phpunit/php-code-coverage.\n *\n * (c) Sebastian Bergmann <sebastian@phpunit.de>\n *\n * For the full copy...
php
chosen
[ { "from": "system", "value": "Fix class reference error :rage:\n" }, { "from": "human", "value": "<?php defined('SYSPATH') or die('No direct script access.');\n\nclass Auth_CrowdmapID extends Pingapp_Auth_CrowdmapID { }" }, { "from": "gpt", "value": "<?php defined('SYSPATH') or die('...
php
chosen
[ { "from": "system", "value": "Refactor BasicAuth to extend the abstract client\n" }, { "from": "human", "value": "<?php\nnamespace Intercom;\n\nuse InvalidArgumentException;\nuse Guzzle\\Common\\Collection;\nuse Guzzle\\Service\\Client;\nuse Guzzle\\Service\\Description\\ServiceDescription;\n\nc...
php
chosen
[ { "from": "system", "value": "Switch to new 0.2 netbed CDROM.\n" }, { "from": "human", "value": "<?php\n#\n# EMULAB-COPYRIGHT\n# Copyright (c) 2000-2002 University of Utah and the Flux Group.\n# All rights reserved.\n#\nrequire(\"defs.php3\");\n\n#\n# Anyone can run this page. No login is needed...
php
chosen
[ { "from": "system", "value": "Use Eloquent::getMorphClass() instead of get_class() for Morph Map support.\n" }, { "from": "human", "value": "<?php\n\nnamespace Trexology\\Pointable\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Transaction extends Model\n{\n /**\n * @var ...
php
chosen
[ { "from": "system", "value": "Allow integers to be converted into floats\n" }, { "from": "human", "value": "<?php\n\nnamespace Agento;\n\nclass Message {\n\tprotected $identifier;\n\tprotected $probability;\n\n\tpublic function __construct($identifier, $probability) {\n\t\t$this->identifier = $i...
php
chosen
[ { "from": "system", "value": "Make validate() protected and incorporate into isValid()\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of Yolk - Gamer Network's PHP Framework.\n *\n * Copyright (c) 2015 Gamer Network Ltd.\n * \n * Distributed under the MIT License, a copy of w...
php
chosen
[ { "from": "system", "value": "Add polyfill.js to iron out missing features in browsers\n" }, { "from": "human", "value": "@extends('app')\n\n@section('aimeos_styles')\n <link type=\"text/css\" rel=\"stylesheet\" href=\"{{ asset('packages/aimeos/shop/themes/elegance/common.css') }}\" />\n <...
php
chosen
[ { "from": "system", "value": "Make sure the fetch date is only returned as date if there's a date\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Model;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Endpoint extends Model\n{\n protected $fillable = [\n...
php
chosen
[ { "from": "system", "value": "Use posts page for search, if set\n\nWordPress allows setting the \"posts\" page to be a page other than the\nfront page, something we use to host the blog at /blog.\n\nAdd a switch in the search form template which detects if this setting\nis configured, and if so changes the ...
php
chosen
[ { "from": "system", "value": "Fix array declaration for old php" }, { "from": "human", "value": "<?php\n\nclass RandomTest extends \\PHPUnit\\Framework\\TestCase\n{\n public function testBytes()\n {\n $len = 10;\n\n $m = \\Dcrypt\\Random::bytes($len);\n \n $this...
php
chosen
[ { "from": "system", "value": "Fix vendor path for tests\n" }, { "from": "human", "value": "<?php\n\ndefine('YII_ENABLE_ERROR_HANDLER', false);\ndefine('YII_DEBUG', true);\n$_SERVER['SCRIPT_NAME'] = '/' . __DIR__;\n$_SERVER['SCRIPT_FILENAME'] = __FILE__;\n\nrequire_once(__DIR__ . '/../../../yiiso...
php
chosen
[ { "from": "system", "value": "Move to 100% of Testing Code Coverage for Isbn::CheckDigit\n" }, { "from": "human", "value": "<?php\n\nclass CheckDigitTest extends PHPUnit_Framework_TestCase\n{\n\n public function testIsbn10()\n {\n $this->assertEquals('8', Isbn\\CheckDigit::make10('8...
php
chosen
[ { "from": "system", "value": "Add named 'login' route for auth middleware.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Here is where you can register web routes for your application. These\n * routes are loaded by the RouteServiceProvider within a group which\n * contains the \"web\" mid...
php
chosen
[ { "from": "system", "value": "[BUGFIX] Remove space between foo and bar\n" }, { "from": "human", "value": "<?php\nclass FooBar\n{\n public function test() \n {\n echo 'foo bar';\n }\n}\n" }, { "from": "gpt", "value": "<?php\nclass FooBar\n{\n public function test()...
php
chosen
[ { "from": "system", "value": "Return PSR-7 response by default\n" }, { "from": "human", "value": "<?php\n\nnamespace GlideModule;\n\nuse Interop\\Container\\ContainerInterface;\nuse Interop\\Container\\ServiceProvider\\ServiceProvider;\nuse League\\Glide\\Server;\nuse League\\Glide\\ServerFactor...
php
chosen
[ { "from": "system", "value": "Revert \"feat(queue): add buffer queue name factory\"\n\nThis reverts commit 7570be26b320e796da1225dc34d8c180f78f58bb.\n\nThe commit message and date for this commit was wrong.\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\n\nrequire_once __DIR__ . '/...
php
chosen
[ { "from": "system", "value": "Remove invite code check on user registration\n" }, { "from": "human", "value": "<?php\n\nnamespace Knot\\Http\\Controllers;\n\nuse Illuminate\\Http\\Request;\nuse Knot\\Models\\User;\nuse Doorman;\n\nclass AuthController extends Controller\n{\n public function _...
php
chosen
[ { "from": "system", "value": "Rewrite render string method to support newer Twig engine\n" }, { "from": "human", "value": "<?php\nnamespace CodeGen;\nuse Twig_Loader_String;\nuse Twig_Environment;\nuse Closure;\n\nclass Utils\n{\n static $stringloader = null;\n static $twig;\n\n static ...
php
chosen
[ { "from": "system", "value": "Copy over the tracers as well\n" }, { "from": "human", "value": "<?php\nnamespace Hoopak;\n\nuse Hoopak\\Annotation;\n\nclass Trace\n{\n /**\n * Create a Trace.\n */\n public function __construct($name, $traceId=null, $spanId=null, $parentSpanId=null, ...
php
chosen
[ { "from": "system", "value": "Add static method to extract post from post id\n" }, { "from": "human", "value": "<?php\nnamespace WPCore;\n\nuse WPCore\\admin\\WPpostSaveable;\n\nclass WPcustomPost implements WPpostSaveable\n{\n protected $postId;\n protected $post;\n protected $meta = a...
php
chosen
[ { "from": "system", "value": "Fix some models not resolving issue\n" }, { "from": "human", "value": "<?php\n\nreturn [\n 'using' => [\n 'csrf' => true,\n 'framework' => 'bootstrap',\n 'custom-framework' => function () {\n return new Path\\To\...
php
chosen
[ { "from": "system", "value": "Add --show option to key:generate.\n" }, { "from": "human", "value": "<?php namespace Illuminate\\Foundation\\Console;\n\nuse Illuminate\\Support\\Str;\nuse Illuminate\\Console\\Command;\n\nclass KeyGenerateCommand extends Command {\n\n\t/**\n\t * The console comman...
php
chosen
[ { "from": "system", "value": "Support for floating admin controls\n" }, { "from": "human", "value": "<?=form_open_multipart()?>\n<p>\n <strong>1. CSV File</strong>\n</p>\n<p>\n This should be a *.csv file which contains 3 columns: old URL, new URL, type of redirect (301 or 302).\n</p>\n<p>...
php
chosen
[ { "from": "system", "value": "Add missing tests for Verdict\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Albert221\\Validation;\n\nuse PHPUnit\\Framework\\TestCase;\n\nclass VerdictTest extends TestCase\n{\n public function testCreate()\n {\n $ru...
php
chosen
[ { "from": "system", "value": "Allow setting the color scheme via the constructor\n" }, { "from": "human", "value": "<?php\n\nnamespace Bramus\\Monolog\\Formatter;\n\nuse Bramus\\Monolog\\Formatter\\ColorSchemes\\ColorSchemeInterface;\n\n/**\n * A Colored Line Formatter for Monolog\n */\nclass Co...
php
chosen
[ { "from": "system", "value": "Use reference list to print fibonacci series in command.\n" }, { "from": "human", "value": "<?php\n\nnamespace Storo\\Command;\n\nuse Storo\\Math\\Fibonacci;\n\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Input\\InputArgument...
php
chosen
[ { "from": "system", "value": "Fix typo in latest change for Base Controller Autoload.\n" }, { "from": "human", "value": "<?php if (!defined('BASEPATH')) exit('No direct script access allowed');\n\n/**\n * Authenticated Controller\n *\n * Provides a base class for all controllers that must check ...
php
chosen
[ { "from": "system", "value": "Add template section for page menu.\n" }, { "from": "human", "value": "<?php\n$website_name = (isset($page_title)) ? $page_title . ' - ' . lang('website_name') : lang('website_name');\n?>\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<t...
php
chosen
[ { "from": "system", "value": "[new] Add function updateElastic, deleteElastic\nДобавлен каркас функция для обновления и удаления записей всего индекса ElasticSearch\n" }, { "from": "human", "value": "<?php\nnamespace app\\commands;\n\nuse app\\models\\Language;\nuse budyaga\\users\\models\\User;...
php
chosen
[ { "from": "system", "value": "Add methods to critical parameter" }, { "from": "human", "value": "<?php\n\nnamespace JWX\\JWT\\Parameter;\n\n\n/**\n * Critical parameter\n *\n * @link https://tools.ietf.org/html/rfc7515#section-4.1.11\n */\nclass CriticalParameter extends RegisteredJWTParameter\n...
php
chosen
[ { "from": "system", "value": "Implement lazy continuation rule for block quotes.\n" }, { "from": "human", "value": "<?php\n\nnamespace FluxBB\\CommonMark\\Parser\\Block;\n\nuse FluxBB\\CommonMark\\Common\\Text;\nuse FluxBB\\CommonMark\\Node\\Blockquote;\nuse FluxBB\\CommonMark\\Node\\Container;\...
php
chosen
[ { "from": "system", "value": "Remove global prefix in use statements\n" }, { "from": "human", "value": "<?php\n/**\n * Zend Framework (http://framework.zend.com/)\n *\n * @link http://github.com/zendframework/zf2 for the canonical source repository\n * @copyright Copyright (c) 2005-2012 Zen...
php
chosen
[ { "from": "system", "value": "Add instance reference to update method.\n" }, { "from": "human", "value": "<?php\n\nnamespace R3O\\Hive\\Contracts\\Factories;\n\ninterface GenericArbiter\n{\n public function create($attributes = []);\n\n public function update($attributes = []);\n}\n" }, ...
php
chosen
[ { "from": "system", "value": "Return types in repositories & dataset\n" }, { "from": "human", "value": "<?php\n/*\n * WellCommerce Open-Source E-Commerce Platform\n *\n * This file is part of the WellCommerce package.\n *\n * (c) Adam Piotrowski <adam@wellcommerce.org>\n *\n * For the full copyr...
php
chosen
[ { "from": "system", "value": "Add docblock to singleton test" }, { "from": "human", "value": "<?php \ninclude 'autoload.php';\n\nclass singletonTest extends PHPUnit_Framework_TestCase {\n\t\n\tprivate $voucherInstance;\n\n\tpublic function testGetVoucher() {\n\t $this->voucherInstance = new V...
php
chosen
[ { "from": "system", "value": "Remove call to deprecated Controller::getRequest()\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\Security\\Core\\SecurityContext;\n\nclass SecurityCont...
php
chosen