conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Set default config on after each test class.\n" }, { "from": "human", "value": "<?php\n\ntrait TestHelperTrait {\n \n public function wire($name = 'wire')\n {\n return \\ProcessWire\\wire($name);\n }\n\n public function module()\n {\n return $this->wire(...
php
chosen
[ { "from": "system", "value": "Fix url encoding in query builder\n" }, { "from": "human", "value": "<?php\n\nnamespace SearchApi\\Builders;\n\nuse SearchApi\\Builders\\QueryBuilder;\n\n/**\n * Responsible for building a query string for SolrSearch\n */\nclass SolrQueryBuilder implements QueryBuil...
php
chosen
[ { "from": "system", "value": "Use Config at the beginning\n" }, { "from": "human", "value": "<?php\n\nnamespace Libs;\n\nclass Redirect\n{\n\tprotected $session;\n\t\n\tpublic function __construct(\\Libs\\interfaces\\SessionInterface $session)\n\t{\n\t\t$this->session = $session;\n\t}\n\t\n\tpub...
php
chosen
[ { "from": "system", "value": "Add reference to php streams\n" }, { "from": "human", "value": "<?php\nnamespace \\Saft\\Data;\n\ninterface ParserInterface\n{\n /**\n * @note We have to decide how the ParserInterface should be implemented. One option\n * could be that a parser can accep...
php
chosen
[ { "from": "system", "value": "Add soft deletes to domain model\n" }, { "from": "human", "value": "<?php namespace App\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\SoftDeletes;\nuse App\\User;\n\n/**\n * Class Domain\n * @package app\\Models\n */\ncl...
php
chosen
[ { "from": "system", "value": "BAP-10771: Migrate data audit command to be executed in new message queue. Sort entities in data audit grid filter alphabetically\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\DataAuditBundle\\Datagrid;\n\nuse Oro\\Bundle\\DataAuditBundle\\Provi...
php
chosen
[ { "from": "system", "value": "Support ` for delimiting monospaced text in Remarkup\n\nSummary:\nCommand line commands are often denoted by ` in plain text. It is natural to convert them to monospaced text in formatted text.\nOther tools (such as GitHub flavored Markdown) use the same delimiter.\nDelimiter #...
php
chosen
[ { "from": "system", "value": "Fix test that depended on previous high school name in demo data set\n" }, { "from": "human", "value": "<?php\n\nclass CleverQueryParamTest extends PHPUnit_Framework_TestCase\n{\n public function testWhere()\n {\n authorizeFromEnv();\n\n $validQueries = arra...
php
chosen
[ { "from": "system", "value": "Remove out of date comment\n" }, { "from": "human", "value": "<?php\n/**\n * Box packing (3D bin packing, knapsack problem)\n * @package BoxPacker\n * @author Doug Wright\n */\nnamespace DVDoug\\BoxPacker;\n\n/**\n * An item to be packed\n * @author Doug Wright\n * ...
php
chosen
[ { "from": "system", "value": "Add link helper on markdown formatter\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the WizadDoctrineDocBundle.\n *\n * (c) William POTTIER <developer@william-pottier.fr>\n *\n * For the full copyright and license information, please view t...
php
chosen
[ { "from": "system", "value": "Add end for api output\n" }, { "from": "human", "value": "<?php\n\nuse Pagon\\Route\\Rest;\nuse Pagon\\Url;\nuse Pagon\\View;\n\nclass Api extends Rest\n{\n protected $data = array();\n\n /**\n * Show error error message\n *\n * @param $message\n ...
php
chosen
[ { "from": "system", "value": "[TASK] Change name of uuid to fingerprint in command\n" }, { "from": "human", "value": "<?php\nnamespace Flowpack\\SingleSignOn\\Client\\Command;\n\n/* *\n * This script belongs to the TYP...
php
chosen
[ { "from": "system", "value": "Add script for js file and update html tags\n" }, { "from": "human", "value": "<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"utf-8\">\n <title><?php echo WEBSITE_NAME; ?></title>\n <link rel=\"search\" type=\"application/opensearchdescription+xml\" hr...
php
chosen
[ { "from": "system", "value": "Remove the closing php tag ?> to fix the broken RSS feed problem\n" }, { "from": "human", "value": "<?php\n\n\t/**\n\t * Register Twitter Feed and widgetized areas.\n\t *\n\t */\n\tfunction twitter_feed_widgets_init() {\n\t register_sidebar( array(\n\t 'name' =>...
php
chosen
[ { "from": "system", "value": "Remove unnecessary code from `hexRgbColor()` rule\n" }, { "from": "human", "value": "<?php\nnamespace Respect\\Validation\\Rules;\n\nuse Respect\\Validation\\Validator as v;\n\nclass HexRgbColor extends AbstractRule\n{\n public function validate($input)\n {\n ...
php
chosen
[ { "from": "system", "value": "Fix overrides enabled check to stop getting exceptions\n\n\ngit-svn-id: 28fe03dfd74dd77dcc8ecfe99fabcec8eed81bba@3461 8555b757-d854-4b86-925a-82fd84c90ff4\n" }, { "from": "human", "value": "<div class=\"box\">\n <h1>{tr:admin_page}</h1>\n \n <?php\n \n ...
php
chosen
[ { "from": "system", "value": "Set default coordinate to -90, 0(antarctica) since mysql refuses to index coordinates if there exists empty or null value.\n" }, { "from": "human", "value": "<?php\n\nclass Db_model extends CI_Model {\n \n function __construct()\n {\n // Call the Model constru...
php
chosen
[ { "from": "system", "value": "Disable less tests on php 7.4+\n" }, { "from": "human", "value": "<?php\n\nnamespace Minify\\Test;\n\nuse Minify_HTML_Helper;\n\nclass LessSourceTest extends TestCase\n{\n public function setUp()\n {\n $this->realDocRoot = $_SERVER['DOCUMENT_ROOT'];\n ...
php
chosen
[ { "from": "system", "value": "Remove useless property in exception class\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Composer.\n *\n * (c) Nils Adermann <naderman@naderman.de>\n * Jordi Boggiano <j.boggiano@seld.be>\n *\n * For the full copyright and license infor...
php
chosen
[ { "from": "system", "value": "Fix tests for legacy phpunit versions\n\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LICENSE\n *...
php
chosen
[ { "from": "system", "value": "Remove collapsed default for easier migration\n" }, { "from": "human", "value": "<?php\nnamespace Craft;\n\nclass Neo_BlockRecord extends BaseRecord\n{\n\tpublic function getTableName()\n\t{\n\t\treturn 'neoblocks';\n\t}\n\n\tpublic function defineRelations()\n\t{\n...
php
chosen
[ { "from": "system", "value": "Change the styles hook (674)\n" }, { "from": "human", "value": "<?php\n/*\n * Fonts template\n *\n * \t\t1 Google fonts\n */\n\n\n/*\n * 1 GOOGLE FONTS\n * ************************************************************\n */\n\nfunction osea_fonts() {\n\twp_enqueue_sty...
php
chosen
[ { "from": "system", "value": "Remove pending import record after importing the user\n" }, { "from": "human", "value": "<?php\n\nnamespace OkulBilisim\\OjsImportBundle\\Importer\\PKP;\n\nuse Ojs\\JournalBundle\\Entity\\Article;\nuse OkulBilisim\\OjsImportBundle\\Importer\\Importer;\n\nclass Artic...
php
chosen
[ { "from": "system", "value": "Fix typo + add separated method for clearing the cache\n" }, { "from": "human", "value": "<?php\n/**\n * @author Pierre-Henry Soria <ph7software@gmail.com>\n * @copyright (c) 2012-2017, Pierre-Henry Soria. All Rights Reserved.\n * @license GNU Ge...
php
chosen
[ { "from": "system", "value": "Fix and refactor where() mutator\n" }, { "from": "human", "value": "<?php\n\nnamespace Underscore\\Mutator;\n\nuse Underscore\\Collection;\nuse Underscore\\Mutator;\n\n/**\n * Class WhereMutator\n * @package Underscore\\Mutator\n */\nclass WhereMutator extends Mutat...
php
chosen
[ { "from": "system", "value": "Fix attribute serialisation event mutability\n" }, { "from": "human", "value": "<?php namespace Flarum\\Api\\Events;\n\nclass SerializeAttributes\n{\n public $serializer;\n\n public $model;\n\n public $attributes;\n\n public function __construct($seriali...
php
chosen
[ { "from": "system", "value": "Add the ability to get a repo username E.G. git@ from a repo url\n" }, { "from": "human", "value": "<?php\nnamespace Criterion\\Helper;\n\nclass Repo\n{\n public static function provider($url)\n {\n if (strpos($url, 'github.com'))\n {\n ...
php
chosen
[ { "from": "system", "value": "Remove ArrayInterface constraint for Method enums\n" }, { "from": "human", "value": "<?php\n\n\nnamespace BlizzardGalaxy\\ApiSupervisor\\Enum\\Method;\n\nuse BlizzardGalaxy\\ApiSupervisor\\Enum\\ArrayEnumInterface;\n\n/**\n * Keeps a list of all the starcraft method...
php
chosen
[ { "from": "system", "value": "Change reset css option to subpalette\n" }, { "from": "human", "value": "<?php\n/*\n * Copyright NEXPER <info@nexper.de>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n$GLO...
php
chosen
[ { "from": "system", "value": "Add '@' prefix of setAlias('common', ...)\n" }, { "from": "human", "value": "<?php\nYii::setAlias('common', dirname(__DIR__));\nYii::setAlias('frontend', dirname(dirname(__DIR__)) . '/frontend');\nYii::setAlias('backend', dirname(dirname(__DIR__)) . '/backend');\nYi...
php
chosen
[ { "from": "system", "value": "Add the method to require permission or throw an exception.\n" }, { "from": "human", "value": "<?php namespace App\\Http\\Controllers;\n\nuse Illuminate\\Foundation\\Bus\\DispatchesCommands;\nuse Illuminate\\Routing\\Controller as BaseController;\nuse Illuminate\\Fo...
php
chosen
[ { "from": "system", "value": "Remove default values from channels columns\n\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateMusicSettings extends Migration\n{\n /**\n * Run the migrat...
php
chosen
[ { "from": "system", "value": "Change the sequence of parameters\n" }, { "from": "human", "value": "<?php\n\n/**\n * Return a path to the icon.\n * @param integer $size Icon size\n * @param string $context Context for the icon\n * @param string $name Name of the icon\n * @return string Path to th...
php
chosen
[ { "from": "system", "value": "Correct dependency to TYPO3 version to ensure that the correct forms are loaded\n" }, { "from": "human", "value": "<?php\n\n/***************************************************************\n * Extension Manager/Repository config file for ext \"bootstrap_package\".\n...
php
chosen
[ { "from": "system", "value": "Remove Spokane is Reading mini-promo\n" }, { "from": "human", "value": "<div class=\"btn-group btn-group-sm\" role=\"group\" aria-label=\"Social Library Links\">\n<?php if ( !in_array($_SERVER['REMOTE_ADDR'],array('10.14.27.13','10.14.22.162','10.14.22.163')) ):?>\n...
php
chosen
[ { "from": "system", "value": "Read More module: changes to filter logic\n\nAbsence of a post indicates we are previewing content.\n" }, { "from": "human", "value": "<?php\n class ReadMore extends Modules {\n public function __init() {\n # Replace comment codes before markup ...
php
chosen
[ { "from": "system", "value": "Add methods to shopping manager\n" }, { "from": "human", "value": "<?php\n/**\n * Created by enea dhack - 12/06/17 10:54 PM\n */\n\nnamespace Enea\\Cashier\\Facades;\n\n\nuse Enea\\Cashier\\Contracts\\BuyerContract;\nuse Enea\\Cashier\\Contracts\\InvoiceContract;\nu...
php
chosen
[ { "from": "system", "value": "Enable sandbox restrictions on iframe\n" }, { "from": "human", "value": "<?php\ndefined('BASEPATH') OR exit('No direct script access allowed');\n\n/**\n * views/irc.php\n *\n * Render news releases, newest first\n *\n */\n?>\n<div class=\"row\">\n\n\t<div class=\"te...
php
chosen
[ { "from": "system", "value": "Add more function to builder abstract class\n" }, { "from": "human", "value": "<?php\n namespace DB\\Builder;\n\n /**\n * Interface for all SQL Query Builder\n *\n * @package DB\\Driver\n */\n abstract class Builder\n {\n abstract ...
php
chosen
[ { "from": "system", "value": "Fix file read loop logic in hosts file parser\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace DaveRandom\\LibDNS\\HostsFile;\n\nfinal class Parser\n{\n public function parseString(string $data): HostsFile\n {\n $ctx = new ...
php
chosen
[ { "from": "system", "value": "Add default empty returned markup\n" }, { "from": "human", "value": "<?php\n/**\n *\n */\n\nnamespace DoSomething\\MBC_TransactionalDigest;\n \n/**\n *\n */\nclass MB_Toolbox_FBMessenger extends MB_Toolbox_BaseService\n{\n\n /**\n *\n */\n public function __co...
php
chosen
[ { "from": "system", "value": "Add the corresponding interface method\n" }, { "from": "human", "value": "<?php namespace Modules\\Setting\\Repositories;\n\nuse Modules\\Core\\Repositories\\BaseRepository;\n\ninterface SettingRepository extends BaseRepository\n{\n /**\n * Create or update t...
php
chosen
[ { "from": "system", "value": "Update exception copy with function name" }, { "from": "human", "value": "<?php\n\n/*\n * By adding type hints and enabling strict type checking, code can become\n * easier to read, self-documenting and reduce the number of potential bugs.\n * By default, type decla...
php
chosen
[ { "from": "system", "value": "TEST moving rank outside loop\n" }, { "from": "human", "value": "<div class=\"container\">\n\t<div class=\"row\">\n\t\t<div class=\"col-lg-12\">\n\t\t\t<ul class=\"nav nav-pills\">\n \t\t\t\t<li class=\"active\"><a href=\"#\">Top 10</a></li>\n\t\t\t <li><a href=...
php
chosen
[ { "from": "system", "value": "Remove categories from init params.\n" }, { "from": "human", "value": "<?php\n\nnamespace app\\models\\glabs\\sites;\n\n/**\n * Backpage site.\n *\n * @package glabs\n * @author Nikolaj Rudakov <nnrudakov@gmail.com>\n * @copyright 2016\n */\nclass Backpage\n...
php
chosen
[ { "from": "system", "value": "Order scrapersourceresult paging by \"created\"\n" }, { "from": "human", "value": "<?php\n\nclass Denkmal_Paging_ScraperSourceResult_ScraperSource extends Denkmal_Paging_ScraperSourceResult_Abstract {\n\n /**\n * @param Denkmal_Scraper_Source_Abstract $source...
php
chosen
[ { "from": "system", "value": "Use the PHPUnit_Runner_Version class to determine the phpunit version" }, { "from": "human", "value": "<?php\n/**\n * © 2016 Procurios\n */\nnamespace Procurios\\TDD\\PhpunitAdapter;\n\nuse ReflectionClass;\n\n/**\n * Detect the version of PHPUnit we are running on ...
php
chosen
[ { "from": "system", "value": "Add defines so we don't have huge strings stored\n" }, { "from": "human", "value": "<?php\n class Intent {\n public $action;\n public $direction;\n\n public function __construct( $action, $direction ) {\n $this->action = $action;\n...
php
chosen
[ { "from": "system", "value": "Use best practice for array emptiness check\n" }, { "from": "human", "value": "<?php\n\nnamespace Dotenv\\Store;\n\nuse Dotenv\\Exception\\InvalidPathException;\nuse Dotenv\\Store\\File\\Reader;\n\nclass FileStore implements StoreInterface\n{\n /**\n * The fi...
php
chosen
[ { "from": "system", "value": "Use is_null to check if a state isn't available.\n" }, { "from": "human", "value": "<?php \n/**\n * @version $Id$\n * @category\tNooku\n * @package Nooku_Server\n * @subpackage Categories\n * @copyright Copyright (C) 2011 Timble CVBA and Contributors. (ht...
php
chosen
[ { "from": "system", "value": "Duplicate uls routes into versioned path\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Login/ULS Routes\n|--------------------------------------------------------------------------\n|\n...
php
chosen
[ { "from": "system", "value": "Fix bootbox pop on remove\n" }, { "from": "human", "value": "\n\n\n\n</div>\n</div>\n\n<!-- No Element, Can be --->\n\n<script src=\"<?= skin_url(); ?>scripts/jquery.cookie.js\" type=\"text/javascript\"></script>\n<script src=\"<?= skin_url(); ?>scripts/jquery.slims...
php
chosen
[ { "from": "system", "value": "Add offer_id to channel interface\n" }, { "from": "human", "value": "<?php\n\nnamespace MssPhp\\Schema\\Response;\n\nuse JMS\\Serializer\\Annotation\\Type;\n\nclass Channel {\n /**\n * @Type(\"string\")\n */\n public $channel_id;\n\n /**\n * @Ty...
php
chosen
[ { "from": "system", "value": "Add validation before Add To Cart\n" }, { "from": "human", "value": "<?php\n\nnamespace hipanel\\actions;\n\nuse hiqdev\\hiart\\Collection;\nuse Yii;\nuse yii\\base\\Action;\n\nclass AddToCartAction extends Action\n{\n public $productClass;\n\n public $bulkLoa...
php
chosen
[ { "from": "system", "value": "Add popeName property for storing the popeName of a user\n" }, { "from": "human", "value": "<?php\n\nclass FacebookUser extends RedisModel {\n\n public static $_keyPrefix = 'user';\n\n public $name;\n public $perms;\n\n public function afterConstruct() {\n if...
php
chosen
[ { "from": "system", "value": "Fix empty first line in migration\n" }, { "from": "human", "value": "\n<?php\n/**\n * Copyright (C) 2019 Xibo Signage Ltd\n *\n * Xibo - Digital Signage - http://www.xibo.org.uk\n *\n * This file is part of Xibo.\n *\n * Xibo is free software: you can redistribute i...
php
chosen
[ { "from": "system", "value": "Change from default CURL consumer to SOCKET consumer\n\nThis should prevent curl requests blocking each other.\n" }, { "from": "human", "value": "<?php namespace GeneaLabs\\MixPanel;\n\nuse Illuminate\\Support\\Facades\\App;\n\nclass MixPanel extends \\Mixpanel\n{\n...
php
chosen
[ { "from": "system", "value": "Add support for clearing reserved jobs, and delayed jobs on redis" }, { "from": "human", "value": "<?php namespace Morrislaptop\\LaravelQueueClear;\n\nuse Illuminate\\Queue\\QueueManager;\nuse Illuminate\\Contracts\\Queue\\Factory as FactoryContract;\nuse Morrislapt...
php
chosen
[ { "from": "system", "value": "Fix bug with seeding roles for controllers\n" }, { "from": "human", "value": "<?php\n\nnamespace DamianTW\\LaravelRoles\\Services;\n\n/**\n * Class RoleControllerService\n * @package DamianTW\\LaravelRoles\n */\nclass RoleControllerService\n{\n public function bu...
php
chosen
[ { "from": "system", "value": "Fix call for older PHP.\n" }, { "from": "human", "value": "<?php\n\nnamespace Illuminate\\Routing;\n\nuse Exception;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Contracts\\Debug\\ExceptionHandler;\nuse Illuminate\\Pipeline\\Pipeline as BasePipeline;\nuse Symfon...
php
chosen
[ { "from": "system", "value": "Define tests for non-explicit fitment ux.\n" }, { "from": "human", "value": "<?php\n/**\n *\n *\n * @author Sam Schmidt <samuel@dersam.net>\n * @since 2016-03-15\n */\n\nnamespace LinusShops\\Prophet\\Context;\n\ntrait Magento\n{\n\n}\n" }, { "from": "gpt", ...
php
chosen
[ { "from": "system", "value": "Allow users to edit their own record\n" }, { "from": "human", "value": "<?php\n\nRoute::filter('basicAuth', function()\n{\n if(!Sentry::check()) \n {\n return Redirect::route('getLogin');\n }\n\n View::share('currentUser', Sentry::getUser());\n});...
php
chosen
[ { "from": "system", "value": "Add optional path parameter to module_path helper\n\n" }, { "from": "human", "value": "<?php\n\nif (! function_exists('module_path')) {\n function module_path($name)\n {\n $module = app('modules')->find($name);\n\n return $module->getPath();\n ...
php
chosen
[ { "from": "system", "value": "Load composer only if container class dont exists\n" }, { "from": "human", "value": "<?php\n\n/**\n * Plugin Name: Papi\n * Description: Page Type API\n * Author: Fredrik Forsmo\n * Author URI: http://forsmo.me\n * Version: 2.3.0-dev\n * Plugin URI: https://wp-papi....
php
chosen
[ { "from": "system", "value": ":bug: Revert Back to BaseTestListener class to support phpunit 5, php 5.6\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the XiideaEasyAuditBundle package.\n *\n * (c) Xiidea <http://www.xiidea.net>\n *\n * This source file is subject to th...
php
chosen
[ { "from": "system", "value": "Make the base test case abstract\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Cache;\nuse Illuminate\\Support\\Facades\\DB;\n\nclass RememberTestCase extends PHPUnit_Framework_TestCase\n{\n const ID = '00000000-0000-0000-0000-0000...
php
chosen
[ { "from": "system", "value": "Add one more Connection Manager test\n" }, { "from": "human", "value": "<?php namespace duxet\\Tests\\Realtime; \n\nuse duxet\\Realtime\\ConnectionManager;\nuse duxet\\Realtime\\Connections\\NullConnection;\nuse Mockery;\n\nclass ConnectionManagerTest extends TestCa...
php
chosen
[ { "from": "system", "value": "Fix validation of \"hidden\" checkbox not working\n" }, { "from": "human", "value": "<?php\n\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...
php
chosen
[ { "from": "system", "value": "Fix double sprintf in exception" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace GrumPHP\\Locator;\n\nuse GrumPHP\\Exception\\ExecutableNotFoundException;\nuse GrumPHP\\Util\\Paths;\nuse Symfony\\Component\\Process\\ExecutableFinder;\n...
php
chosen
[ { "from": "system", "value": "Undo version increment. 1.0.2 was never released/tagged.\n" }, { "from": "human", "value": "<?php\n/**\n * Pines' information.\n *\n * @package Pines\n * @license http://www.gnu.org/licenses/agpl-3.0.html\n * @author Hunter Perrin <hunter@sciactive.com>\n * @copyrig...
php
chosen
[ { "from": "system", "value": "Allow calling methods which use the __call magic method\n\nExample:\n\n (require \"vendor/autoload.php\")\n\n (use <Predis\\Client>)\n\n (define client (<Predis\\Client>))\n\n (var_dump\n ((-> client set) \"foo\" \"bar\"))\n" }, { "from": "human", ...
php
chosen
[ { "from": "human", "value": "Change time to date for updating the transaction to shipped" }, { "from": "gpt", "value": "<?php\n\n//autoload\nrequire_once dirname(__FILE__) . \"/../models/API/Autoloader.php\";\n\n//load config\nif (file_exists(\"config/config.php\")) {\n include(\"config/config....
php
chosen
[ { "from": "system", "value": "Bring sort criteria parsing in line with the spec\n\n- Support multiple sort criteria separated by ,\n- Ignore sort criteria unless it starts with a + or -\n" }, { "from": "human", "value": "<?php namespace Tobscure\\JsonApi;\n\nclass Criteria\n{\n protected $inp...
php
chosen
[ { "from": "system", "value": "Fix test for Travis env\n" }, { "from": "human", "value": "<?php\n\nnamespace Code16\\Sharp\\Tests\\Feature\\Api;\n\nuse Carbon\\Carbon;\n\nclass SetLocaleTest extends BaseApiTest\n{\n protected function setUp()\n {\n parent::setUp();\n\n $this->...
php
chosen
[ { "from": "system", "value": "Fix dumb error in travis php version\n" }, { "from": "human", "value": "<?php\n\nnamespace ChainableTest\\Fixtures;\n\nuse Chainable\\ChainableInterface;\nuse Chainable\\Result\\ChainResult;\nuse Chainable\\Result\\ChainResultInterface;\n\nabstract class AbstractRes...
php
chosen
[ { "from": "system", "value": "Add tests for the countryByName() method\n" }, { "from": "human", "value": "<?php\n\nuse Galahad\\LaravelAddressing\\Entity\\Country;\nuse Galahad\\LaravelAddressing\\LaravelAddressing;\n\n/**\n * Class LaravelAddressingTest\n *\n * @author Junior Grossi <juniorgro@...
php
chosen
[ { "from": "system", "value": "Add empty utf string test\n" }, { "from": "human", "value": "<?php\n\nnamespace Zerg\\Field;\n\nuse Zerg\\Stream\\StringStream;\n\nclass StringTest extends \\PHPUnit_Framework_TestCase\n{\n public function testRead()\n {\n $string = new String(2);\n ...
php
chosen
[ { "from": "system", "value": "Add configuration so the sole test passes\n" }, { "from": "human", "value": "<?php\n/**\n * Phergie plugin for displaying data from tweets (https://github.com/phergie/phergie-irc-plugin-react-twitter)\n *\n * @link https://github.com/phergie/phergie-irc-plugin-react...
php
chosen
[ { "from": "system", "value": "Fix the name in an error message\n" }, { "from": "human", "value": "<?php\n\n/*\nPlugin Name: Opauth\nPlugin URI: http://labculturadigital.org/\nDescription: Adds Opauth (opauth.org) support\nAuthor: Laboratório de Cultura Digital - Flávio Zavan\nVersion: 0.01\nText...
php
chosen
[ { "from": "system", "value": "Switch to preg_replace in Something Positive plugin\n" }, { "from": "human", "value": "<?php\nclass Af_SomethingPositive extends Plugin {\n\n function about() {\n return array(0.1, \"Fetch image from Something Positive webcomic\", \"Markus Wiik\");\n\n ...
php
chosen
[ { "from": "system", "value": "Enable strict interpretation of scalar type declarations\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of PHPUnit.\n *\n * (c) Sebastian Bergmann <sebastian@phpunit.de>\n *\n * For the full copyright and license information, please view the LICE...
php
chosen
[ { "from": "system", "value": "Add note about modified regex\n" }, { "from": "human", "value": "<?php\n\nnamespace GuzzleHttp\\Psr7;\n\nfinal class Rfc7230\n{\n /**\n * Header related regular expressions (copied from amphp/http package)\n * (Note: once we require PHP 7.x we could just ...
php
chosen
[ { "from": "system", "value": "Fix parameter order and rename params\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace Zubr;\n\n/**\n * \\Zubr\\array_key_exists()\n *\n * @link https://secure.php.net/array_key_exists\n *\n * NOTES: same as \\array_key_exists()\n*/\nf...
php
chosen
[ { "from": "system", "value": "Remove setting of 'alert' property\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 Message;\n\n /...
php
chosen
[ { "from": "system", "value": "Fix nearest stops on iOS\n" }, { "from": "human", "value": "<?php\nrequire_once __DIR__.'/../../config.inc.php';\nuse TPGwidget\\Data\\Stops;\n\n$file = 'https://prod.ivtr-od.tpg.ch/v1/GetStops.xml?key='.getenv('TPG_API_KEY').'&latitude='.($_GET['latitude'] ?? '').'...
php
chosen
[ { "from": "system", "value": "Support oembed code from provider or raw file\n" }, { "from": "human", "value": "<?php\n\n/**\n * @example\n * FastForward::Helpers()\n * ->renderImage(142, 'full');\n */\nclass FastForward_Helpers {\n public function renderImage($id, $size = 'thumbnail') {\n...
php
chosen
[ { "from": "system", "value": "CRM-3483: Change origin syncs (IMAP/EWS) to use origin\n- Fix migration for oro_email_origin\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\UserBundle\\Migrations\\Schema\\v1_15;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\n\nuse Oro\\Bundle\\Migratio...
php
chosen
[ { "from": "system", "value": "Send event author in webhook notification\n\n" }, { "from": "human", "value": "<?php\n\nnamespace Kanboard\\Notification;\n\nuse Kanboard\\Core\\Base;\nuse Kanboard\\Core\\Notification\\NotificationInterface;\n\n/**\n * Webhook Notification\n *\n * @package Kanboar...
php
chosen
[ { "from": "system", "value": "Update test document mapping annotations\n" }, { "from": "human", "value": "<?php\n\nnamespace Bundle\\DoctrinePaginatorBundle\\Document;\n\n/**\n * @Document(collection=\"doctrine_paginator_test\")\n */\nclass Test\n{\n /**\n * @Id\n */\n public $id;\...
php
chosen
[ { "from": "system", "value": "Allow redirecting when not logged in\n\nSummary:\nWithout this, the https redirect doesn't work if you're not logged in, because\nthe login check in willBeginExecution happens before the redirect controller\ncan redirect. This also has the unpleasant effect of the login page on...
php
chosen
[ { "from": "system", "value": "Load the stream wrapper at build\n\nThe stream wrapper should also be available when building the container.\n" }, { "from": "human", "value": "<?php\n\nnamespace ConnectHolland\\Sulu\\BlockBundle;\n\nuse Nijens\\ProtocolStream\\Stream\\Stream;\nuse Nijens\\Protocol...
php
chosen
[ { "from": "system", "value": "Update conversation editor's redactor config to include c5 specific settings\n\n\nFormer-commit-id: 138509255a479ed280d18bbb43272d6cb3248777" }, { "from": "human", "value": "<?php defined('C5_EXECUTE') or die(\"Access Denied.\");\n$form = Loader::helper('form');\npr...
php
chosen
[ { "from": "system", "value": "Fix not loggin on empty routes\n" }, { "from": "human", "value": "<?php\r\n\r\n/**\r\n * Part of the Tracker package.\r\n *\r\n * NOTICE OF LICENSE\r\n *\r\n * Licensed under the 3-clause BSD License.\r\n *\r\n * This source file is subject to the 3-clause BSD Licen...
php
chosen
[ { "from": "system", "value": "Update zarin pal service provider\n" }, { "from": "human", "value": "<?php\n\nnamespace Rasulian\\ZarinPal;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass ZarinPalServiceProvider extends ServiceProvider\n{\n /**\n * Bootstrap the application services.\...
php
chosen
[ { "from": "system", "value": "Mark log files mode 666 when creating them\n" }, { "from": "human", "value": "<?php\n\nclass Octopus_Logger_File {\n\n function __construct($file) {\n $this->file = $file;\n $this->_handle = null;\n }\n\n function _open() {\n\n if (!$th...
php
chosen
[ { "from": "system", "value": "Remove \"/\" that caused errors on remote host" }, { "from": "human", "value": "<?php\n\nrequire_once ('/includes/functions/init.php'); // Initial theme setup and constants\nrequire_once ('/includes/functions/menus.php'); // Register Menus\nrequire_once ('/includes/...
php
chosen
[ { "from": "system", "value": "Fix an issue with rendering some commit hovercards\n\nSummary: This logic wasn't quite right.\n\nTest Plan: Hovered over a recognized commit, got a valid hovercard\n\nReviewers: chad\n\nReviewed By: chad\n\nDifferential Revision: https://secure.phabricator.com/D14925\n" }, ...
php
chosen
[ { "from": "system", "value": "Increase the timeout for connecting to html5test.com\n" }, { "from": "human", "value": "<?php\n\nnamespace HTML5test\\Automate;\n\nuse GuzzleHttp\\Client;\n\nclass HTML5test {\n\n public function __construct($config) {\n $this->config = $config;\n\n ...
php
chosen
[ { "from": "system", "value": "[BetterPhpDocParser] Fix doc block printer for last node space\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace Symplify\\BetterPhpDocParser\\Attributes\\Ast\\PhpDoc;\n\nuse PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocChildNode;\nuse PHPS...
php
chosen
[ { "from": "system", "value": "Remove deprecated usage of tree builder where possible\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of JoliTypo - a project by JoliCode.\n *\n * This software consists of voluntary contributions made by many individuals\n * and is licensed un...
php
chosen