conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Rename database migration for compatibility\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateImages extends Migration {\n\n\t/**\n\t * Run the migrations.\n\t *\...
php
chosen
[ { "from": "system", "value": "Fix 500 error on Category show page.\n" }, { "from": "human", "value": "<?php namespace VotingApp\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse DB;\n\nclass Winner extends Model\n{\n\n /**\n * The attributes which may be mass-assigned.\n *\n...
php
chosen
[ { "from": "system", "value": "Add the company to the main controller" }, { "from": "human", "value": "<?php\nnamespace frontend\\controllers;\n\nuse Yii;\nuse yii\\web\\Controller;\n\nclass MainController extends Controller\n{\t\n public function init()\n {\n parent::init();\n ...
php
chosen
[ { "from": "system", "value": "Allow identity strings to be created statically\n" }, { "from": "human", "value": "<?php\n\nnamespace Pheasant;\n\nclass Identity implements \\IteratorAggregate\n{\n private $_class, $_properties, $_object;\n\n public function __construct($class, $properties, ...
php
chosen
[ { "from": "system", "value": "Make directory listing exclude LICENSE file and IntelliJ project files\n" }, { "from": "human", "value": "<?php\n\nreturn array(\n\n // Basic settings\n 'hide_dot_files' => true,\n 'list_folders_first' => true,\n 'list_sort_order' ...
php
chosen
[ { "from": "system", "value": "Set final configuration for agent transport\n" }, { "from": "human", "value": "<?php\n\nnamespace Stackify\\Log\\Transport\\Config;\n\n// @TODO set release values\nclass Agent\n{\n const SOCKET_PROTOCOL = 'tcp';\n const SOCKET_HOST = '127.0.0.1';\n const SO...
php
chosen
[ { "from": "system", "value": "Fix the order payments validation of 0 amount.\n" }, { "from": "human", "value": "<?php\n\nnamespace WickedReports\\Api\\Item;\n\nuse Respect\\Validation\\Validator as v;\n\nclass OrderPayment extends BaseItem {\n\n /**\n * @var array\n */\n protected ...
php
chosen
[ { "from": "system", "value": "Add customizable sorting for child list.\n" }, { "from": "human", "value": "<?php\n\nclass ElementChildrenList extends BaseElement {\n\n\tprivate static $db = array();\n\n\tprivate static $has_one = array(\n\t\t'ParentPage' => 'SiteTree'\n\t);\n\n\tprivate static $t...
php
chosen
[ { "from": "system", "value": "Add post date on search results\n" }, { "from": "human", "value": "<header class=\"entry-header\">\n <?php\n\n\tif ( is_sticky() && ! is_single() ) :\n\t\tprintf( '<p class=\"sticky-title-sm\">%s</p>', __( 'Must read', 'keitaro' ) );\n\tendif;\n\n\tif ( is_singul...
php
chosen
[ { "from": "system", "value": "Revert \"set 0000-00-00 00:00:00 to expires default instead of CURRENT_TIMESTAMP\"\n\nThis reverts commit 939da875a5dd6b20dbc3d940b2e540a9154f2766.\n\nrefs #4\n" }, { "from": "human", "value": "<?php\n\nuse Migrations\\AbstractMigration;\n\nclass CreateRememberMeTok...
php
chosen
[ { "from": "system", "value": "Return asset path without \"?\" if getting the version fails.\n" }, { "from": "human", "value": "<?php\n\nnamespace Bolt\\Asset;\n\nuse Bolt\\Filesystem\\Exception\\IOException;\nuse Bolt\\Filesystem\\FilesystemInterface;\nuse Symfony\\Component\\Asset\\VersionStrat...
php
chosen
[ { "from": "system", "value": "Add optional selector argument support.\n" }, { "from": "human", "value": "<?php\n\nnamespace ProcessWire\\GraphQL\\Field\\Page;\n\nuse Youshido\\GraphQL\\Field\\AbstractField;\nuse Youshido\\GraphQL\\Execution\\ResolveInfo;\nuse ProcessWire\\GraphQL\\Type\\Object\\...
php
chosen
[ { "from": "system", "value": "Add setter for id in interface\n" }, { "from": "human", "value": "<?php\n\nnamespace SlmQueue\\Job;\n\ninterface JobInterface\n{\n public function __invoke();\n public function setOptions (array $options);\n public function getOptions ();\n public functi...
php
chosen
[ { "from": "system", "value": "Replace non-word charactor into space\n" }, { "from": "human", "value": "<?php\nnamespace CodeGen\\Frameworks\\PHPUnit;\nuse CodeGen\\UserClass;\nuse Doctrine\\Common\\Inflector\\Inflector;\nuse CodeGen\\ClassMethod;\n\nclass PHPUnitFrameworkTestCase extends UserCla...
php
chosen
[ { "from": "system", "value": "Make test for MARK support HHVM compatible\n" }, { "from": "human", "value": "<?php\n\nnamespace FastRoute\\Dispatcher;\n\nclass MarkBasedTest extends DispatcherTest {\n public function setUp() {\n if (version_compare(PHP_VERSION, '5.6.0-beta1', '<')) {\n ...
php
chosen
[ { "from": "system", "value": "Add test for the TypeError exception on Product map construct\n" }, { "from": "human", "value": "<?php\n\nnamespace KickAss\\Commerce\\Product\\Map;\n\nuse PHPUnit\\Framework\\TestCase;\n\nfinal class ProductTest extends TestCase\n{\n public function testGetSku()...
php
chosen
[ { "from": "system", "value": "Remove unused statements from API controller\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\Config\\Definition\\Exception\\Exception;\nuse Symfony...
php
chosen
[ { "from": "system", "value": "Remove File from method names\n" }, { "from": "human", "value": "<?php\n\nnamespace Vaffel\\Tuski\\Interfaces;\n\ninterface StorageServiceInterface\n{\n public function storeFileChunk($resourceId, $offset, $length);\n\n public function getFileChunk($resourceId...
php
chosen
[ { "from": "system", "value": "Delete useless username at link\n\nNow that the image upload is at the edit page username isn't needed as a\nmethod.\n" }, { "from": "human", "value": "<?php\n class ImageController {\n public static function create( $image ) {\n include_once 'm...
php
chosen
[ { "from": "system", "value": "Fix exception message due to wrong rebase\n" }, { "from": "human", "value": "<?php\n\nnamespace Marmelab\\Multifetch;\n\nuse KzykHys\\Parallel\\Parallel;\n\nclass Multifetcher\n{\n public function fetch(array $parameters, $renderer, $parallelize = false)\n {\n...
php
chosen
[ { "from": "system", "value": "Fix cache.store does not exist when using in Lumen 5.1.\n" }, { "from": "human", "value": "<?php\n\nnamespace Rymanalu\\LaravelCircuitBreaker;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass CircuitBreakerServiceProvider extends ServiceProvider\n{\n /**\n ...
php
chosen
[ { "from": "system", "value": "Allow any logger implementing `LoggerInterface` to be passed\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is apart of the DiscordPHP project.\n *\n * Copyright (c) 2016-2020 David Cole <david.cole1340@gmail.com>\n *\n * This source file is subject to...
php
chosen
[ { "from": "system", "value": "Use Database class instead of variable.\n" }, { "from": "human", "value": "<?php\n\nnamespace ProcessWire\\GraphQL\\Field\\Debug;\n\nuse Youshido\\GraphQL\\Field\\AbstractField;\nuse Youshido\\GraphQL\\Type\\Scalar\\IntType;\nuse Youshido\\GraphQL\\Execution\\Resolv...
php
chosen
[ { "from": "system", "value": "Allow instantiating a Metadata Factory if one is not passed in the constructor to simplify instantiating the metadata registry\n" }, { "from": "human", "value": "<?php\n\nnamespace Tystr\\RestOrm\\Metadata;\n\n/**\n * @author Tyler Stroud <tyler@tylerstroud.com>\n *...
php
chosen
[ { "from": "system", "value": "Include a nonce in the reply address.\n\nWe'll probably want to use just hashes here instead of nonces. Actually, come to think of it, we don't need time-based hashes at all, since email is presumed secure and we're not preventing CSRF.\n\nI'll change this. :)\n" }, { "...
php
chosen
[ { "from": "system", "value": "Fix for php < 5.5\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Jedrzej\\Searchable\\Constraint;\n\nclass TestModelWithRelations extends TestModel\n{\n protected $searchable = ['relationA:field'];\n\n public func...
php
chosen
[ { "from": "system", "value": "Revert \"Ariel - Avances de \"La borra del cafe xD\"\"\n\nThis reverts commit 4704215bc41caff095986f67d317d1d1d02d07b1." }, { "from": "human", "value": "<?php\ndefined('BASEPATH') OR exit('No direct script access allowed');\n\nclass API extends CI_Controller {\n ...
php
chosen
[ { "from": "system", "value": "Set github link size to 10\n" }, { "from": "human", "value": "<?php\n/**\n * @license http://opensource.org/licenses/BSD-2-Clause BSD-2-Clause\n * @copyright Copyright (c) Matthew Weier O'Phinney\n */\n\nnamespace Mwop\\Github;\n\nuse Mwop\\Collection;\nuse Zend\\Fe...
php
chosen
[ { "from": "system", "value": "Allow creating from a collection\n" }, { "from": "human", "value": "<?php\n\nnamespace Underscore\\Initializer;\n\nuse Underscore\\Collection;\nuse Underscore\\Initializer;\nuse Underscore\\Underscore;\n\nclass FromInitializer extends Initializer\n{\n /**\n *...
php
chosen
[ { "from": "system", "value": "Add Address schema reference on delete action\n" }, { "from": "human", "value": "<?php\nnamespace AuthorBooks\\Model;\nuse LazyRecord\\Schema;\n\nclass AddressSchema extends Schema\n{\n public function schema()\n {\n $this->column('author_id')\n ...
php
chosen
[ { "from": "system", "value": "Add success test for product of str.\n" }, { "from": "human", "value": "<?php\n\nclass ParserTest extends \\PHPUnit_Framework_TestCase\n{\n public function testStr() {\n $this->assertTrue(\n Parser::str('abc')->run('abcdef')->equal(new Good('abc', 3))...
php
chosen
[ { "from": "system", "value": "Fix bug where array arguments are dumped instead of returned\n" }, { "from": "human", "value": "<?php\nnamespace AspectMock\\Util;\n\nclass ArgumentsFormatter\n{\n\n static function toString($args)\n {\n return implode(',',array_map('self::format', $arg...
php
chosen
[ { "from": "system", "value": "Remove env method from Application Contract.\n" }, { "from": "human", "value": "<?php\n\nnamespace Nerd\\Framework;\n\nuse Nerd\\Framework\\Http\\Request\\RequestContract;\nuse Nerd\\Framework\\Http\\Response\\ResponseContract;\n\ninterface ApplicationContract exten...
php
chosen
[ { "from": "human", "value": "Add NSM Addon Updater integration\n" }, { "from": "gpt", "value": "<?php\n\n// Info for NSM Addon Updater\n$config['name']='VZ Url';\n$config['version']='2.0.0';\n$config['nsm_addon_updater']['versions_xml']='http://elivz.com/versions.xml';" } ]
php
chosen
[ { "from": "system", "value": "Use Blade's helper to check for the first row" }, { "from": "human", "value": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <title>Print Table</title>\n <meta charset=\"UTF-8\">\n <meta name=description content=\"\">\n <meta name=\"v...
php
chosen
[ { "from": "system", "value": "Remove failing test (BC break in symfony 2.8)\n" }, { "from": "human", "value": "<?php\n\nnamespace Symnedi\\Security\\Tests\\Core\\Authorization;\n\nuse InvalidArgumentException;\nuse PHPUnit_Framework_TestCase;\nuse Symfony\\Component\\Security\\Core\\Authorizatio...
php
chosen
[ { "from": "system", "value": "Use suffix attribute on text columns" }, { "from": "human", "value": "{{-- regular object attribute --}}\n<td>{{ (array_key_exists('prefix', $column) ? $column['prefix'] : '').str_limit(strip_tags($entry->{$column['name']}), array_key_exists('limit', $column) ? $col...
php
chosen
[ { "from": "system", "value": "Add OffsetLimit to Paginated Response\n" }, { "from": "human", "value": "<?php\n\nnamespace Refinery29\\Piston\\Http;\n\ntrait PaginatedResponse\n{\n protected $pagination;\n\n public function setPaginationCursors(array $cursor)\n {\n $this->paginati...
php
chosen
[ { "from": "system", "value": "Add Zend_Db Test - fetchAll\n" }, { "from": "human", "value": "<?php\n\nclass ZendDbTest extends \\PHPUnit_Framework_TestCase\n{\n public function testInstantiateDbAdapter()\n {\n $adapter = \\Zend_Db::factory(\n 'Pdo_Sqlite',\n ar...
php
chosen
[ { "from": "system", "value": "Fix slug to be lowercase\n" }, { "from": "human", "value": "<?php\nnamespace Grav\\Common\\GPM\\Local;\n\nuse Grav\\Common\\Data\\Data;\nuse Grav\\Common\\GPM\\Common\\Package as BasePackage;\n\nclass Package extends BasePackage\n{\n protected $settings;\n\n p...
php
chosen
[ { "from": "system", "value": "baculum: Support for web servers which do not provide direct info about HTTP Basic auth\n" }, { "from": "human", "value": "<?php\n/**\n * Bacula® - The Network Backup Solution\n * Baculum - Bacula web interface\n *\n * Copyright (C) 2013-2014 Marcin Haba\n *\n * The...
php
chosen
[ { "from": "system", "value": "Add test case and update changelog.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Support\\Traits;\n\nuse Illuminate\\Support\\Facades\\File;\nuse Symfony\\Component\\Ht...
php
chosen
[ { "from": "system", "value": "Disable all test's @covers annotations\n" }, { "from": "human", "value": "<?php\nnamespace Axstrad\\DoctrineExtensions\\Tests\\Activatable\\ActivatableListener;\n\nuse Axstrad\\DoctrineExtensions\\Activatable\\ActivatableListener;\n\n/**\n * Axstrad\\DoctrineExtensi...
php
chosen
[ { "from": "system", "value": "[TASK] Disable registering of non-existing TextImagePreviewRenderer\n" }, { "from": "human", "value": "<?php\nif (!defined('TYPO3_MODE')) {\n die('Access denied.');\n}\n\n/*\n * Mark the delivered TypoScript templates as \"content rendering template\"\n */\n$GLOB...
php
chosen
[ { "from": "system", "value": "Fix merge array Ancestors (RBAC)\n" }, { "from": "human", "value": "<?php\n/**\n * @link http://www.letyii.com/\n * @copyright Copyright (c) 2014 Let.,ltd\n * @license https://github.com/letyii/cms/blob/master/LICENSE\n * @author Ngua Go <nguago@let.vn>, CongTS <con...
php
chosen
[ { "from": "system", "value": "Maintain subsite id on before write if already set\n" }, { "from": "human", "value": "<?php\n\nnamespace Guttmann\\SilverStripe;\n\nuse DataExtension;\nuse FieldList;\nuse HiddenField;\nuse Subsite;\n\nclass MenuItemExtension extends DataExtension\n{\n\n private ...
php
chosen
[ { "from": "system", "value": "Correct file so it correctly verifies user in db\n" }, { "from": "human", "value": "<?php \n\t\t\techo \"HELLO!\\n\";\n\t\t\techo $_GET['email'];\n\t\t\techo $_GET['hash'];\n\t\t\techo isset($_GET['email']);\n\t\t\techo !empty($_GET['email']);\n\t\t\techo isset($_GE...
php
chosen
[ { "from": "system", "value": "Upgrade script from 13.0.0-B1 to 13.0.0-B2\n" }, { "from": "human", "value": "<?php\n\n$mixCheckResult = 'Update can not be applied';\n\n$sVer = $this->oDb->getOne(\"SELECT `version` FROM `sys_modules` WHERE `name` = 'system'\");\nif ('13.0.0.B1' == $sVer || '13.0.0...
php
chosen
[ { "from": "system", "value": "Fix typo in the image size fixer script\n" }, { "from": "human", "value": "<?php\n/**\n * Fix missing image width/height\n */\n\nif(php_sapi_name() !== 'cli') {\n\tdie('CLI only');\n}\n\ndate_default_timezone_set('Europe/London');\n\nrequire dirname(__FILE__) . '/.....
php
chosen
[ { "from": "system", "value": "Make inserts in mongo safe\n" }, { "from": "human", "value": "<?php\nnamespace MASchoolManagement\\Persistence;\n\nuse MASchoolManagement\\Subscriptions\\SubscriptionFactory;\n\nuse MASchoolManagement\\Subscriptions\\UserSubscriptions;\n\nuse \\MASchoolManagement\\S...
php
chosen
[ { "from": "system", "value": "Put use declaration on two lines\n" }, { "from": "human", "value": "<?php\nnamespace Hipay\\MiraklConnector\\Api\\Hipay;\n\nuse Hipay\\MiraklConnector\\Api\\ConfigurationInterface as BaseConfigurationInterface;\n/**\n * File Config.php\n *\n * @author Ivanis Koua...
php
chosen
[ { "from": "system", "value": "Rename recursive method to snake_case\n" }, { "from": "human", "value": "<?php\nif (!function_exists('load_directory')) {\n /**\n * Load all files in directory\n *\n * @author Morten Rugaard <moru@nodes.dk>\n *\n * @access public\n * @para...
php
chosen
[ { "from": "system", "value": "Create the charge with authorize and capture by using the key from DB\n\nCreate the charge with authorize and capture. The public key and secret\nkey will be used from the initialize of parent class.\n\nAdd a parameter, capture, and set the value to be true.\n\nAlthough, withou...
php
chosen
[ { "from": "system", "value": "Throw Invalid Argument Exception when no args passed through to push and unshift\n" }, { "from": "human", "value": "<?php\n\nnamespace Stack;\n\nuse Symfony\\Component\\HttpKernel\\HttpKernelInterface;\n\nclass Builder\n{\n private $specs;\n\n public function ...
php
chosen
[ { "from": "system", "value": "Allow API access from anywhere\n" }, { "from": "human", "value": "<?php\nrequire_once(\"../../lib/dao/DrugDAO.class.php\");\n\nheader(\"Content-Type: application/json; charset=UTF-8\");\n\nif (isset($_REQUEST['n'])) {\n $num = max($_REQUEST['n'], 1);\n} else {\n ...
php
chosen
[ { "from": "system", "value": "Add min.php to skip sessions list\n" }, { "from": "human", "value": "<?php\n\n// these resolved paths will skip initializing a user session\nSite::$skipSessionPaths[] = 'thumbnail.php';" }, { "from": "gpt", "value": "<?php\n\n// these resolved paths will...
php
chosen
[ { "from": "system", "value": "Fix padding error in sample app view data\n" }, { "from": "human", "value": "<?php\n\nclass ViewData\n{\n /**\n * @var int $time\n */\n private $time;\n\n /**\n * @var float $distance\n */\n private $distance;\n\n const SPEED_PRECISION...
php
chosen
[ { "from": "system", "value": "Fix CS failure for docblock line length\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpSchool\\PhpWorkshop\\Result;\n\nuse PhpSchool\\PhpWorkshop\\Check\\CheckInterface;\n\n/**\n * A failure result representing the situation whe...
php
chosen
[ { "from": "system", "value": "Return PID of running process in background\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace TMCms\\Background;\n\nuse TMCms\\Traits\\singletonInstanceTrait;\n\ndefined('INC') or exit;\n\n/**\n * Class ProcessQueue\n * @package TMCms\\...
php
chosen
[ { "from": "system", "value": "Use the cool new array syntax\n" }, { "from": "human", "value": "<?php namespace\tSTS\\Tunneler;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse STS\\Tunneler\\Console\\TunnelerCommand;\nuse STS\\Tunneler\\Jobs\\CreateTunnel;\n\n\nclass TunnelerServiceProvider ext...
php
chosen
[ { "from": "system", "value": "Fix code error, static methods can not be abstract.\n" }, { "from": "human", "value": "<?php namespace Flarum\\Core\\Notifications\\Types;\n\nabstract class Notification\n{\n abstract public static function getType();\n}\n" }, { "from": "gpt", "value"...
php
chosen
[ { "from": "system", "value": "Make sure we are compatible with common 0.3\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of php-cache\\apcu-adapter package.\n *\n * (c) 2015-2015 Aaron Scherer <aequasi@gmail.com>, Tobias Nyholm <tobias.nyholm@gmail.com>\n *\n * This source ...
php
chosen
[ { "from": "system", "value": "Add a Paul Graham's note about Python.\n" }, { "from": "human", "value": "<?=$Version;?>\n<p>Home Page: <a href=\"http://www.python.org/\">http://www.python.org/</a></p>\n<p>Download: <a href=\"http://www.python.org/download/\">http://www.python.org/download/</a></p...
php
chosen
[ { "from": "system", "value": "Fix a problem with documents starting with block level elements\n" }, { "from": "human", "value": "<?php\n\nnamespace donatj\\MDDom;\n\nclass DocumentDepth extends AbstractNestingElement {\n\n\tprotected function generateMarkdown( $fragmentLevel = 0 ) {\n\t\t$conten...
php
chosen
[ { "from": "system", "value": "Improve exception for an invalid extension\n" }, { "from": "human", "value": "<?php\n\nnamespace Asmaster\\EquipTwig\\Exception;\n\nuse InvalidArgumentException;\n\nclass ExtensionException extends InvalidArgumentException\n{\n /**\n * @param mixed $extension...
php
chosen
[ { "from": "system", "value": "Test for new twig function\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests\\Becklyn\\AssetsBundle\\Twig;\n\nuse Becklyn\\AssetsBundle\\Html\\AssetHtmlGenerator;\nuse Becklyn\\AssetsBundle\\Loader\\FileLoader;\nuse Becklyn\\AssetsBundle\\Twig\\AssetsTwigE...
php
chosen
[ { "from": "system", "value": "Use IRC style symbols instead of weird mix of IRC symbols and shell symbols.\n" }, { "from": "human", "value": "<?php\n\nfunction ircReport($stuff)\n{\n\t$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\tsocket_connect($sock, Settings::pluginGet(\"host\"), Se...
php
chosen
[ { "from": "system", "value": "Add some phpdoc to the interface.\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 information, please view the LICENSE\n * file...
php
chosen
[ { "from": "system", "value": "Change fillable user_name to name in model\n" }, { "from": "human", "value": "<?php\nnamespace ZaLaravel\\LaravelUser\\Models;\n\nuse Illuminate\\Auth\\Authenticatable;\nuse Illuminate\\Auth\\Passwords\\CanResetPassword;\nuse Illuminate\\Contracts\\Auth\\Authenticat...
php
chosen
[ { "from": "system", "value": "Add method to reset SQL schema and to empty the container\n" }, { "from": "human", "value": "<?php\n\nnamespace PhpAbac;\n\nclass Abac {\n /** @var array **/\n private static $container;\n \n /**\n * @param \\PDO $connection\n */\n public func...
php
chosen
[ { "from": "system", "value": "Add small title specifically for Sticky posts and restructure if-else blocks\n" }, { "from": "human", "value": "<header class=\"entry-header\">\n <?php\n\n if (is_singular()) {\n the_title('<h1 class=\"entry-title\"><a href=\"' . esc_url(get_permalink()...
php
chosen
[ { "from": "system", "value": "Fix template name for this event" }, { "from": "human", "value": "<?php\n\nnamespace App\\Handlers\\Events;\n\nuse App\\Events\\NewUserWasRegistered;\nuse App\\TransMail;\n\nclass SendMailUserWelcome\n{\n private $transmail;\n\n public function __construct(Tra...
php
chosen
[ { "from": "system", "value": "Use imgsrc plugin/snippet for background example.\n" }, { "from": "human", "value": "<?php snippet_detect('html_head', array(\n\t'criticalcss' => 'home',\n\t'prev_next' => false,\n\t'prerender' => false\n)); ?>\n\n\t<?php snippet('banner'); ?>\n\n\t<div class=\"Cove...
php
chosen
[ { "from": "system", "value": "CI: Modify test case to include correct information\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Foundation\\Testing\\WithoutMiddleware;\nuse Illuminate\\Foundation\\Testing\\DatabaseMigrations;\nuse Illuminate\\Foundation\\Testing\\DatabaseTransactio...
php
chosen
[ { "from": "system", "value": "Add some tests for GitTree\n" }, { "from": "human", "value": "<?php\n\nuse Git4p\\Git;\nuse Git4p\\GitObject;\nuse Git4p\\GitTree;\n\nclass GitTreeTest extends PHPUnit_Framework_TestCase {\n\n protected $git = false;\n protected $gittree = false;\n\n pu...
php
chosen
[ { "from": "system", "value": "BAP-9408: Fix API requests for B2B instance\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\TestFrameworkBundle\\Provider;\n\nuse Oro\\Bundle\\EntityBundle\\Provider\\EntityAliasProviderInterface;\n\n/**\n * This alias provider excludes aliases ge...
php
chosen
[ { "from": "system", "value": "[5.4] Fix issue in php5.6 when generate fake images for testing\n" }, { "from": "human", "value": "<?php\n\nnamespace Illuminate\\Http\\Testing;\n\nclass FileFactory\n{\n /**\n * Create a new fake file.\n *\n * @param string $name\n * @param in...
php
chosen
[ { "from": "system", "value": "Fix unit test to pass Guzzle as a dependency\n" }, { "from": "human", "value": "<?php\n\nnamespace MusicBrainz\\Tests;\n\nuse MusicBrainz\\MusicBrainz;\n\n/**\n * @covers MusicBrainz\\MusicBrainz\n */\nclass MusicBrainzTest extends \\PHPUnit_Framework_TestCase\n{\n ...
php
chosen
[ { "from": "system", "value": "Fix dimension integers being cast to strings for no good reason\n" }, { "from": "human", "value": "<?php namespace App;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Input;\nuse DB;\nuse Log;\n\nclass ChartDimension extends Model {\n\tpublic $timestamps = false...
php
chosen
[ { "from": "system", "value": "Make the material repository cache behave like the other caches.\n" }, { "from": "human", "value": "<?php\n\nclass MaterialRepositoryCache extends MaterialRepository\n{\n const CACHE_KEY = \"materialRepository\";\n public function parse()\n {\n if(Cache::has(s...
php
chosen
[ { "from": "system", "value": "Set streams too since it's the same\n" }, { "from": "human", "value": "<?php namespace Anomaly\\PreferencesModule\\Http\\Middleware\\Command;\n\nuse Anomaly\\PreferencesModule\\Preference\\Contract\\PreferenceRepositoryInterface;\nuse Illuminate\\Config\\Repository;...
php
chosen
[ { "from": "system", "value": "Test apcu config loader second fallback\n" }, { "from": "human", "value": "<?php\n\nnamespace Maghead\\Runtime\\Config;\n\nuse PHPUnit\\Framework\\TestCase;\n\nclass ApcuConfigLoaderTest extends TestCase\n{\n public function setUp() {\n parent::setUp();\n ...
php
chosen
[ { "from": "system", "value": "Cover the set faker method\n" }, { "from": "human", "value": "<?php\n\nuse League\\FactoryMuffin\\Facade as FactoryMuffin;\n\nabstract class AbstractTestCase extends PHPUnit_Framework_TestCase\n{\n public static function setupBeforeClass()\n {\n Factory...
php
chosen
[ { "from": "system", "value": "Fix transform call to Michelf\\MarkdownExtra\n\nAs per the documentation here:\n\n https://michelf.ca/projects/php-markdown/configuration/#configure\n\nCalling defaultTransform() will use the default options, thus ignoring\nthe \"hard_wrap\" option. Calling transform() instead...
php
chosen
[ { "from": "system", "value": "feat(shopassignment): Create relationship for shopassignment table\n\nCreate relationship for shopassignment table\n\nsee #138\n" }, { "from": "human", "value": "<?php\n\nnamespace App;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass ShopAssignment extends Mo...
php
chosen
[ { "from": "system", "value": "Add role assignments foreign keys to db\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateRoleAssignmentsTable extends ...
php
chosen
[ { "from": "system", "value": "Fix generated migration class name.\n" }, { "from": "human", "value": "<?php\nnamespace Baum\\Generators;\n\nclass MigrationGenerator extends Generator {\n\n /**\n * Create a new migration at the given path.\n *\n * @param string $name\n * @param string ...
php
chosen
[ { "from": "system", "value": "Add 'format' argument to built-in fields 'created' & 'modified'.\n" }, { "from": "human", "value": "<?php\n\nnamespace ProcessWire\\GraphQL\\Field\\Traits;\n\nuse Youshido\\GraphQL\\Config\\Field\\FieldConfig;\nuse Youshido\\GraphQL\\Execution\\ResolveInfo;\nuse You...
php
chosen
[ { "from": "system", "value": "Fix primary key column for pgsql\n" }, { "from": "human", "value": "<?php\nnamespace LazyRecord\\SqlBuilder;\nuse LazyRecord\\Schema;\nuse LazyRecord\\Schema\\DeclareSchema;\nuse LazyRecord\\Schema\\SchemaInterface;\nuse LazyRecord\\Schema\\RuntimeColumn;\nuse LazyR...
php
chosen
[ { "from": "system", "value": "Fix access to one exam page\n\nnow is only for logged users\n" }, { "from": "human", "value": "<?php\n\nnamespace Egzaminer\\Exam;\n\nuse Exception;\nuse Egzaminer\\Question\\Questions;\nuse Egzaminer\\Question\\Answers;\nuse Egzaminer\\Admin\\Dashboard as Controlle...
php
chosen
[ { "from": "system", "value": "Fix tracker disabled state when using middleware\n" }, { "from": "human", "value": "<?php\n\nnamespace PragmaRX\\Tracker\\Vendor\\Laravel\\Middlewares;\n\nuse Closure;\n\nclass Tracker\n{\n /**\n * Handle an incoming request.\n *\n * @param \\Illumina...
php
chosen
[ { "from": "system", "value": "Use email as foreign key\n" }, { "from": "human", "value": "<?php\n\nuse yii\\db\\Migration;\n\n/**\n * Handles the creation for table `profile`.\n */\nclass m160622_095150_create_profile extends Migration\n{\n /**\n * @inheritdoc\n */\n public functio...
php
chosen
[ { "from": "system", "value": "[fix] Use middleware db for the query\n" }, { "from": "human", "value": "<?php\n\nuse Hubzero\\Content\\Migration\\Base;\n\n/**\n * Migration script for com_tools to specify display ranges assigned to a hub,\n * i.e., the range used on an execution host. \n **/\n\n...
php
chosen
[ { "from": "system", "value": "Update local config cache settings.\n" }, { "from": "human", "value": "<?php\n\n// direct access protection\nif(!defined('KIRBY')) die('Direct access is not allowed');\n\n/* -----------------------------------------------------------------------------\nTroubleshooti...
php
chosen
[ { "from": "system", "value": "Load the state before checking whether the state values match.\n" }, { "from": "human", "value": "<?php\nnamespace MartinBean\\Facebook\\Laravel;\n\nuse Facebook\\FacebookRedirectLoginHelper as BaseFacebookRedirectLoginHelper;\nuse Request;\nuse Session;\n\nclass Fa...
php
chosen
[ { "from": "system", "value": "Change priority of output converters\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the Imbo package\n *\n * (c) Christer Edvartsen <cogo@starzinger.net>\n *\n * For the full copyright and license information, please view the LICENSE file tha...
php
chosen
[ { "from": "system", "value": "Revert \"The login handler now returns a response\"\n\nThis reverts commit 90c53eebeece07cb7e8f54b757c509a364502022.\n" }, { "from": "human", "value": "<?php\n\nnamespace Aureka\\VBBundle\\Handler;\n\nuse Symfony\\Component\\Security\\Core\\Authentication\\Token\\To...
php
chosen
[ { "from": "system", "value": "Add canOnlyBe values for alignment\n" }, { "from": "human", "value": "<?php\n\nnamespace Common\\BlockEditor\\Blocks;\n\nfinal class QuoteBlock extends AbstractBlock\n{\n public function getConfig(): array\n {\n return [\n 'class' => 'BlockEd...
php
chosen
[ { "from": "system", "value": "Make this slightly less as simple as possible\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\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...
php
chosen
[ { "from": "system", "value": "Make Go and Apply button a primary button.\n" }, { "from": "human", "value": "<?php\n\n/**\n * @file\n * template.php\n */\n\n/**\n * Implements hook_preprocess_HOOK().\n */\nfunction bootstrap_serchilo_preprocess_block(&$vars) {\n \n switch ($vars['block_html_id'...
php
chosen