conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove duplicate assertion. We aren't the Department of Redundancy Department." }, { "from": "human", "value": "<?php\nclass RandomIntTest extends PHPUnit_Framework_TestCase\n{\n public function testFuncExists()\n {\n $this->assertTrue(function_exists('...
php
chosen
[ { "from": "system", "value": "Change variable name defining path to ChromeDriver executable\n\n1. Why is this change necessary?\nCurrent environment variable in ChromeDriver.php uses '.', whilst valid according to the specification, this will not work using a bash shell (probably the most commonly used)\n\n...
php
chosen
[ { "from": "system", "value": "Add `@meta` and `@metas` directives\n" }, { "from": "human", "value": "<?php\nnamespace Eusonlito\\LaravelMeta;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass MetaServiceProvider extends ServiceProvider\n{\n /**\n * Indicates if loading of the provider...
php
chosen
[ { "from": "system", "value": "Fix wrong varname in provider class.\n" }, { "from": "human", "value": "<?php\n\nnamespace Rych\\Silex\\Provider;\n\nuse Silex\\Application;\nuse Silex\\ServiceProviderInterface;\nuse Rych\\Plates\\Extension\\RoutingExtension;\nuse Rych\\Plates\\Extension\\SecurityE...
php
chosen
[ { "from": "system", "value": "Add quotes for filename in \"Content-Disposition\" header\n" }, { "from": "human", "value": "<?php namespace Anomaly\\FilesModule\\File;\n\nuse Anomaly\\FilesModule\\File\\Contract\\FileInterface;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\n/**\n * Class F...
php
chosen
[ { "from": "system", "value": "Fix fatal error when using CssMin filter.\n" }, { "from": "human", "value": "<?php\nnamespace AssetCompress\\Filter;\n\nuse AssetCompress\\AssetFilter;\n/**\n * CssMin filter.\n *\n * Allows you to filter Css files through CssMin. You need to put CssMin in your appl...
php
chosen
[ { "from": "system", "value": "Fix model binding of article when publishing.\n" }, { "from": "human", "value": "<?php\n/**\n * Content (Article, Category) routes registration.\n *\n * @var \\Illuminate\\Routing\\Router $router\n */\n\nuse Yajra\\CMS\\Http\\Controllers\\ArticlesController;\nuse Ya...
php
chosen
[ { "from": "system", "value": "Fix after an API modification" }, { "from": "human", "value": "<?php\n\n$vca_page_title = _('Server Virtual Control Admin');\n\n$paquet = new Paquet();\n\nif(!empty($_GET['server'])) {\n\tif(!empty($_POST['name'])) {\n\t\t$para = array('name', 'address', 'key','desc...
php
chosen
[ { "from": "system", "value": "Fix the tinyInteger default value on MySQL\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateIncidentsTable extends Migration {\n\n\t/**\n\t * Run the migrations....
php
chosen
[ { "from": "system", "value": "Fix bug in allowed block type selection\n" }, { "from": "human", "value": "<?php\n/**\n * Gutenberg related settings\n */\n\nnamespace Air_Light;\n\n/**\n * Restrict blocks to only allowed blocks in the settings\n */\nfunction allowed_block_types( $allowed_blocks, $...
php
chosen
[ { "from": "system", "value": "Add needed constant for SearchImage tests\n" }, { "from": "human", "value": "<?php\n/**\n * @author Pierre-Henry Soria <hello@ph7cms.com>\n * @copyright (c) 2017, Pierre-Henry Soria. All Rights Reserved.\n * @license GNU General Public Lice...
php
chosen
[ { "from": "system", "value": "Support group_by, em and query_builder options in entity filter\n\nAdd support for group_by, em and query_builder options in DatagridFilterTypeEntity.\r\nAllows custom sorting and grouping of data into the DatagridFilterTypeEntity filter type." }, { "from": "human", ...
php
chosen
[ { "from": "system", "value": "Remove the error suppression operator\n" }, { "from": "human", "value": "<?php\nnamespace Disque\\Queue\\Marshal;\n\nuse Disque\\Queue\\Job;\nuse Disque\\Queue\\JobInterface;\n\n/**\n * Serialize and deserialize the job body\n *\n * Serialize the job body when addin...
php
chosen
[ { "from": "system", "value": "Add output when clearing the full log cache\n" }, { "from": "human", "value": "<?php\n\nnamespace Korobi\\WebBundle\\Console;\n\nuse Korobi\\WebBundle\\Util\\FileCache;\nuse Korobi\\WebBundle\\Util\\FileUtil;\nuse Symfony\\Bundle\\FrameworkBundle\\Command\\Container...
php
chosen
[ { "from": "system", "value": "Fix plugin manager with phar\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Automate package.\n *\n * (c) Julien Jacottet <jjacottet@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that...
php
chosen
[ { "from": "system", "value": "Add error logging level methods\n" }, { "from": "human", "value": "<?php namespace LaravelDecouplr\\Log;\r\n\r\nuse Decouplr\\Decouplr;\r\nuse Illuminate\\Log\\Writer;\r\n\r\nabstract class LaravelLogDecouplr extends Decouplr {\r\n\r\n public function __construct...
php
chosen
[ { "from": "system", "value": "Set up bootstrap in Entry Controller Test.\n" }, { "from": "human", "value": "<?php\n\nrequire_once 'PHPUnit/Framework/TestCase.php';\n\nclass EntryControllerTest extends Zend_Test_PHPUnit_ControllerTestCase\n{\n\n public function setUp()\n {\n /* Setup...
php
chosen
[ { "from": "system", "value": "Use plugin language and prepare for save/update action\n" }, { "from": "human", "value": "<?php\n\nnamespace ContentTranslator;\n\nclass Meta Extends Entity\\Translate\n{\n\n protected $lang;\n\n public function __construct()\n {\n\n $this->lang = \"...
php
chosen
[ { "from": "system", "value": "Fix Notice when exchange type not provided\n" }, { "from": "human", "value": "<?php\n\nnamespace M6Web\\Bundle\\AmqpBundle\\Factory;\n\n/**\n * Common code for both producer and consumer factories (channel, exchange declaration and binding)\n */\nabstract class AMQP...
php
chosen
[ { "from": "system", "value": "Fix warning for foreign key detection\n" }, { "from": "human", "value": "<?php\n/**\n * PHP version 7.1\n *\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\nnamespace ComPHPPuebla\\Fixtures\\Processors;\n\nc...
php
chosen
[ { "from": "system", "value": "Test the new enforce method\n" }, { "from": "human", "value": "<?php\n\nnamespace PhpAbac\\Test;\n\nuse PhpAbac\\Abac;\n\nclass AbacTest extends AbacTestCase {\n /** @var Abac **/\n protected $abac;\n \n public function setUp() {\n $this->abac = n...
php
chosen
[ { "from": "system", "value": "Add a new method in interface also\n" }, { "from": "human", "value": "<?php\n\n/*\n * @author Mirel Nicu Mitache <mirel.mitache@gmail.com>\n * @package MPF Framework\n * @link http://www.mpfframework.com\n * @category core package\n * @version 1.0\n * @since MPF ...
php
chosen
[ { "from": "system", "value": "Use well-white class for the login square\n" }, { "from": "human", "value": "<?php use_helper('Javascript') ?>\n\n<div class=\"row\">\n\n <div class=\"span4 offset4 well\">\n\n <?php if ('user' != $sf_request->module || 'login' != $sf_request->action): ?>\n ...
php
chosen
[ { "from": "system", "value": "Put a override to check if it's admin and put the correct design path\n" }, { "from": "human", "value": "<?php\n\n\n\n\nclass WizardsFugue_Core_Model_Design_Package extends Mage_Core_Model_Design_Package\n{\n \n protected function _fallback($file, array &$para...
php
chosen
[ { "from": "system", "value": "Use new shortcuts for migrations\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 distribut...
php
chosen
[ { "from": "system", "value": "Add cascade deletion for Appointments->[Contact|Business] relationships\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateAppointmentsTable extends Migration {\n\...
php
chosen
[ { "from": "system", "value": "Add shortcut prefix for child axis\n" }, { "from": "human", "value": "<?php\n\nnamespace FluentDOM\\PhpCss {\n\n use FluentDOM\\Xpath\\Transformer as TransformerInterface;\n use PhpCss\\Ast\\Visitor\\Xpath;\n\n class Transformer implements TransformerInterface {\...
php
chosen
[ { "from": "system", "value": "Use call_user_func_array so we can pass options to faker\n" }, { "from": "human", "value": "<?php\n\nnamespace League\\FactoryMuffin\\Kind;\n\nuse InvalidArgumentException;\nuse League\\FactoryMuffin\\Kind;\n\n/**\n * Class Generic.\n *\n * @package League\\FactoryM...
php
chosen
[ { "from": "system", "value": "Replace .page-header block with snippet\n" }, { "from": "human", "value": "<?php get_header(); ?>\n\n<div class=\"container\">\n <?php if (!is_front_page()) : ?>\n <header class=\"page-header\">\n <h1 class=\"page-title\"><?php single_post_title...
php
chosen
[ { "from": "system", "value": "Fix when default controller is loaded.\n" }, { "from": "human", "value": "<?php\nnamespace Thulium;\n\nclass ControllerResolver\n{\n function __construct()\n {\n $globalConfig = Config::load()->getConfig('global');\n $this->_defaultController = $...
php
chosen
[ { "from": "system", "value": "Remove use statement not in use.\n" }, { "from": "human", "value": "<?php\nnamespace Respect\\Validation\\Rules;\n\nuse Respect\\Validation\\Exceptions\\ComponentException;\n\nabstract class AbstractRegexRule extends AbstractFilterRule\n{\n abstract protected fun...
php
chosen
[ { "from": "system", "value": "Make form request stuff route parameters on input\n" }, { "from": "human", "value": "<?php\r\n\r\nnamespace PragmaRX\\Sdk\\Core\\Validation;\r\n\r\nuse Illuminate\\Foundation\\Http\\FormRequest as IlluminateFormRequest;\r\n\r\nuse Illuminate\\Http\\Response;\r\nuse ...
php
chosen
[ { "from": "system", "value": "MAke match checking function final\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Chatbot\\Commands;\n\nuse Casperlaitw\\LaravelFbMessenger\\Contracts\\BaseHandler;\nuse Casperlaitw\\LaravelFbMessenger\\Messages\\ReceiveMessage;\n\nabstract class Command...
php
chosen
[ { "from": "system", "value": "Add translation for android app links text\n" }, { "from": "human", "value": "<?php\n$TRANSLATIONS = array(\n\"If you don't know your password, please see below, section <a href=\\\"#user_servervars2\\\">Useful Informations For Connection With Login/Password</a>.\" ...
php
chosen
[ { "from": "system", "value": "Add es translation for \"Switch language\"\n" }, { "from": "human", "value": "<?php\n/*\nSection: global\nLanguage: Spanish Español\nTranslator: Cristiam Mercado <cristiammercadoj@gmail.com>\n*/\n\n$translations = array(\n 'sitetitle1' => 'db4free.net',\n\n 's...
php
chosen
[ { "from": "system", "value": "Use normal without extra libs\n" }, { "from": "human", "value": "<?php\ndefined('BASEPATH') OR exit('No direct script access allowed');\n?>\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <...
php
chosen
[ { "from": "system", "value": "[REF] Add exptected variable for test case\n" }, { "from": "human", "value": "<?php namespace Odoo\\Client\\Test\\Output;\n\nuse Odoo\\Client\\Output\\UrlOutput;\n\nclass UrlOutputTest extends \\PHPUnit_Framework_TestCase\n{\n public function testCreateUrl()\n ...
php
chosen
[ { "from": "system", "value": "Refactor parser tests to split out checks\n" }, { "from": "human", "value": "<?php\n\n/**\n * PHP Version 5.3\n *\n * @copyright (c) 2014-2015 brian ridley\n * @author brian ridley <ptlis@ptlis.net>\n * @license http://opensource.org/licenses/MIT MIT\n *\...
php
chosen
[ { "from": "system", "value": "Change route implementation using League/Route\n" }, { "from": "human", "value": "<?php\n\nnamespace Blasting\\Http;\n\nuse Phroute\\Phroute\\RouteCollector;\n\n/**\n * Routes\n */\nfinal class Routes\n{\n public $router;\n\n public function __construct()\n ...
php
chosen
[ { "from": "system", "value": "Use name side1 for sidebar slot\n" }, { "from": "human", "value": "<?php\n/**\n * This comment block is used just to make IDE suggestions to work\n * @var $this \\Ip\\View\n */\n?>\n<?php echo $this->subview('_header.php'); ?>\n\n<?php\n\nif ('search' == $site->getC...
php
chosen
[ { "from": "system", "value": "Fix primary key for version column\n" }, { "from": "human", "value": "<?php\n\nnamespace ProAI\\Datamapper\\Support\\Traits;\n\nuse ProAI\\Datamapper\\Annotations as ORM;\n\ntrait Versionable\n{\n /**\n * @ORM\\Column(type=\"integer\", unsigned=true)\n */...
php
chosen
[ { "from": "system", "value": "BB-1334: Add STI for audit\n- fix migrations\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\DataAuditBundle\\Migrations\\Schema\\v1_6;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\n\nuse Doctrine\\DBAL\\Types\\Type;\nuse Oro\\Bundle\\MigrationBundle\\M...
php
chosen
[ { "from": "system", "value": "CRM-6121: Disable email as a feature\n- Updated unit tests for navigation history builder\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\FeatureToggleBundle\\Checker;\n\ntrait FeatureCheckerHolderTrait\n{\n /**\n * @var FeatureChecker\n ...
php
chosen
[ { "from": "system", "value": "Add middleware group option and populate 'web' group.\n\nCloses #104.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Testbench\\Http;\n\nuse Exception;\n\nclass Kernel ex...
php
chosen
[ { "from": "system", "value": "Make CMS default interface language install correctly.\n\nWe could have a situation where:\n* Language == Interface languages (so SameInterfaceLanguages is true)\n* Default language != Default Interface language.\n\nThis wasn't possible anymore. This changes makes sure the\n'sa...
php
chosen
[ { "from": "system", "value": "Add guard for orphaned references\n" }, { "from": "human", "value": "<?php\n\nnamespace TeiEditionBundle\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n *\n *\n */\ntrait ArticleReferencesTrait\n{\n /* Currently simple sort by article title */\n protec...
php
chosen
[ { "from": "system", "value": "Use longtext instead of text in mysql and mariadb\n\nText is too short for some objects .. so this pull request is a proposal to use longtext instead of text in mysql and mariadb" }, { "from": "human", "value": "<?php\n\nuse yii\\db\\Migration;\n\nclass m160516_0959...
php
chosen
[ { "from": "system", "value": "Add metadata/query/result cache flush to \"cache:clear\" CLI command.\n" }, { "from": "human", "value": "<?php\nuse \\DF\\Phalcon\\Cli\\Task;\nuse \\PVL\\SyncManager;\n\nclass CacheTask extends Task\n{\n public function clearAction()\n {\n // Flush loca...
php
chosen
[ { "from": "system", "value": "Add parameter to service controller example\n" }, { "from": "human", "value": "<?php\n\nrequire __DIR__.'/../vendor/autoload.php';\n\nclass HelloController\n{\n public function worldAction($request)\n {\n return \"Hallo welt, got swag yo!\\n\";\n }\n...
php
chosen
[ { "from": "system", "value": "Update description to mention order field" }, { "from": "human", "value": "<?php\n/*\nPlugin Name: ZnWP Taxonomy Color and Image Plugin\nPlugin URI: https://github.com/zionsg/ZnWP-Taxonomy-Color-Image-Plugin\nDescription: This plugin allows multiple 3rd party plugi...
php
chosen
[ { "from": "system", "value": "Fix for [User Error] Uncaught Exception: Object->__call(): the method 'onmobiledomain' does not exist on 'Security' occurred after new install of Silverstripe 2.4.5 and Silverstripe-Mobile." }, { "from": "human", "value": "<?php\n/**\n * @package mobile\n */\nclass ...
php
chosen
[ { "from": "system", "value": "Fix displaying console menu in separated tab\n" }, { "from": "human", "value": "<?php\n\nchdir('../../');\ninclude_once(\"./include/auth.php\");\ninclude_once(\"./plugins/intropage/display.php\");\n\nset_default_action();\n\n\n$lopts = db_fetch_cell('SELECT intropag...
php
chosen
[ { "from": "system", "value": "Complete api service creation model\n" }, { "from": "human", "value": "<!-- Modal -->\n<div class=\"modal fade\" id=\"myModal\" role=\"dialog\">\n <div class=\"modal-dialog\">\n\n <!-- Modal content-->\n <div class=\"modal-content\">\n <d...
php
chosen
[ { "from": "system", "value": "Remove the last occurence of PHP_EOL in a commented test and enabling it\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 * @cop...
php
chosen
[ { "from": "system", "value": "Remove foreign keys as Laravel cant detect class\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Laravel CrowdAuth\n *\n * (c) Daniel McAssey <hello@glokon.me>\n *\n * For the full copyright and license information, please view the LICENSE\n ...
php
chosen
[ { "from": "system", "value": "Add an id to the help\n\n" }, { "from": "human", "value": "<?php if (!empty($help)): ?>\n <p class=\"help-text\"><?php echo $view->escape(false !== $translation_domain ? $view['translator']->trans($help, array(), $translation_domain) : $help) ?></p>\n<?php endif ...
php
chosen
[ { "from": "system", "value": "Remove formatting issues with CI." }, { "from": "human", "value": "<?php\n\nnamespace League\\HTMLToMarkdown\\Converter;\n\nuse League\\HTMLToMarkdown\\Configuration;\nuse League\\HTMLToMarkdown\\ConfigurationAwareInterface;\nuse League\\HTMLToMarkdown\\ElementInter...
php
chosen
[ { "from": "system", "value": "Implement functionality of webservice which should return users projects. Make the failing test pass\n" }, { "from": "human", "value": "<?php\n\nnamespace fennecweb\\ajax\\listing;\n\nuse \\PDO as PDO;\n\n/**\n * Web Service.\n * Returns information of all users pro...
php
chosen
[ { "from": "system", "value": "Fix the issue with not generating slugs\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distr...
php
chosen
[ { "from": "system", "value": "Fix ACL check and redirect in RightDeleteAction\n\nRefs #7742\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Access to Memory (AtoM) software.\n *\n * Access to Memory (AtoM) is free software: you can redistribute it and/or modify\n * it...
php
chosen
[ { "from": "system", "value": "Fix set null by default for ArrayCollection\n" }, { "from": "human", "value": "<?php\n\nnamespace LapaLabs\\BlogBundle\\Model;\n\nuse Doctrine\\Common\\Collections\\ArrayCollection;\n\n/**\n * Interface PostCategoryInterface\n */\ninterface PostCategoryInterface\n{\...
php
chosen
[ { "from": "system", "value": "Update service provider to reflect changes in Laravel.\n" }, { "from": "human", "value": "<?php namespace Krucas\\Notification;\r\n\r\nuse Illuminate\\Support\\ServiceProvider;\r\n\r\nclass NotificationServiceProvider extends ServiceProvider {\r\n\r\n\t/**\r\n\t * I...
php
chosen
[ { "from": "system", "value": "Configure composer - working edition\n" }, { "from": "human", "value": "<?php\nrequire_once __DIR__ . '/deployer/recipe/configure.php';\nrequire_once __DIR__ . '/deployer/recipe/yii2-app-basic.php';\n\nserverList(__DIR__ . '/stage/servers.yml');\nset('repository', '...
php
chosen
[ { "from": "system", "value": "Add array of sheet types\n" }, { "from": "human", "value": "<?php\n\nnamespace RadDB\\Console\\Commands;\n\nuse Illuminate\\Console\\Command;\n\nclass ImportDataPage extends Command\n{\n /**\n * The name and signature of the console command.\n *\n * @...
php
chosen
[ { "from": "system", "value": "Make sure we limit the /calendar events to just those that are marked as active.\n" }, { "from": "human", "value": "<?php\n\nclass CalendarsController extends BaseController {\n\n public function index()\n {\n $events = Events::with('calendar')->orderBy('start_...
php
chosen
[ { "from": "system", "value": "Make remove first array element logic less complex than it needs to be\n" }, { "from": "human", "value": "<?php\n\n\nfunction var_export_callback($object) {\n\treturn var_export($object, true);\n}\n\nfunction backTrace($backtrace)\n{\n\trequire_once 'plugins/sourcet...
php
chosen
[ { "from": "system", "value": "Fix debug messages appearing in rss.\n" }, { "from": "human", "value": "<?\nclass RssesController extends AppController {\n\n//var $name = 'Rss';\nvar $components = array('RequestHandler');\nvar $helpers = array ('Rss','Text');\n\nfunction index() {\n\n //Configure...
php
chosen
[ { "from": "system", "value": "Add admin links when an admin logs in\n" }, { "from": "human", "value": "<?php\n\nclass LoginPage extends Page {\n\n public function get_page_title(Website $oWebsite) {\n return $oWebsite->t(\"main.log_in\") . '...';\n }\n\n public function get_short...
php
chosen
[ { "from": "system", "value": "Change to require_once so we dont have duplicate function errors.\n\n" }, { "from": "human", "value": "<?php\n# tocsv.php - OSDial\n# \n# Copyright (C) 2010 Lott Caskey <lottcaskey@gmail.com> LICENSE: AGPLv3\n#\n# This file is part of OSDial.\n#\n# OSDi...
php
chosen
[ { "from": "system", "value": "Remove redundant class loader register call\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Evenement.\n *\n * Copyright (c) 2011 Igor Wiedler\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this so...
php
chosen
[ { "from": "system", "value": "Remove check if int in setId\n\nLed to id not being set from HTML forms. Will leave without checking ID for now.\n" }, { "from": "human", "value": "<?php\n class LogsheetComponent {\n protected $db;\n protected $id;\n \n public functio...
php
chosen
[ { "from": "system", "value": "Disable test for Collection resource\n" }, { "from": "human", "value": "<?php\n\nnamespace PHPShopify;\n\nclass CollectionTest extends TestSimpleResource\n{\n\n}" }, { "from": "gpt", "value": "<?php\n\nnamespace PHPShopify;\n\nclass CollectionTest extend...
php
chosen
[ { "from": "system", "value": "Test against interface instead of concrete class\n" }, { "from": "human", "value": "<?php\n\nnamespace Twig;\n\nuse Webfactory\\Bundle\\PiwikBundle\\Twig\\Extension;\n\nclass ExtensionTest extends \\PHPUnit_Framework_TestCase\n{\n\n public function testPiwikCodeR...
php
chosen
[ { "from": "system", "value": "Revert change for lower versions to still work.\n" }, { "from": "human", "value": "<?php\n\nnamespace Ambta\\DoctrineEncryptBundle\\Encryptors;\n\nuse \\ParagonIE\\HiddenString\\HiddenString;\nuse \\ParagonIE\\Halite\\KeyFactory;\n\n/**\n * Class for encrypting and ...
php
chosen
[ { "from": "system", "value": "Add update method to factory interface.\n" }, { "from": "human", "value": "<?php\n\nnamespace Enzyme\\Axiom\\Factories;\n\nuse Enzyme\\Axiom\\Carriers\\CarrierInterface;\n\n/**\n * Makes instances from the given data.\n */\ninterface FactoryInterface\n{\n /**\n ...
php
chosen
[ { "from": "system", "value": "BUGFIX: Allow mapFieldByClassName to be authoritative\n" }, { "from": "human", "value": "<?php\n\n\nnamespace SilverStripe\\GraphQL\\Schema\\DataObject;\n\nuse GraphQL\\Type\\Definition\\ResolveInfo;\nuse SilverStripe\\GraphQL\\QueryHandler\\SchemaContextProvider;\n...
php
chosen
[ { "from": "system", "value": "Mark batch syncs as such to help with caching\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\n// phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter,SlevomatCodingStandard.Functions.UnusedParameter\n\nnamespace App\\Nova\\Actions;\n\nu...
php
chosen
[ { "from": "system", "value": "Test PHP 5.3 - 7.x compatibility" }, { "from": "human", "value": "<?php\n\nclass Test extends PHPUnit_Framework_TestCase\n{\n\tpublic function testOnePlusOne() {\n\t\t$this->assertEquals(1+1, 2);\n \t}\n}\n\n?>\n" }, { "from": "gpt", "value": "<?php\n\n...
php
chosen
[ { "from": "system", "value": "Fix nombre de los campos\n" }, { "from": "human", "value": "<?php\n\n include_once $_SERVER[\"DOCUMENT_ROOT\"].'/system/utils/UserHelper.php';\n\n Use \\App\\System\\Helpers\\UserHelper as UserHelper;\n\n if ( !isset($_POST['username-modal']) && !isset($_P...
php
chosen
[ { "from": "system", "value": "Define default value for `$processors`\n\nThis makes it possible to initialize a `ConfigProcessor` that has no processors.\r\n\r\nSolves this error:\r\n\r\nTyped property Overblog\\GraphQLBundle\\Definition\\ConfigProcessor::$processors must not be accessed before initializatio...
php
chosen
[ { "from": "system", "value": "Remove form delete_empty legacy BC\n" }, { "from": "human", "value": "<?php\n\nnamespace EasyCorp\\Bundle\\EasyAdminBundle\\Form\\Type\\Configurator;\n\nuse EasyCorp\\Bundle\\EasyAdminBundle\\Form\\Util\\LegacyFormHelper;\nuse Symfony\\Component\\Form\\FormConfigInt...
php
chosen
[ { "from": "system", "value": "Use correct types in doctrine annotations\n" }, { "from": "human", "value": "<?php\n\nnamespace Becklyn\\SearchBundle\\Mapping;\n\n\n/**\n * Marks the property or method as a field of an searchable item\n *\n * @Annotation\n * @Target({\"METHOD\", \"PROPERTY\"})\n *...
php
chosen
[ { "from": "system", "value": "Update component class to take foundation contract\n" }, { "from": "human", "value": "<?php\n\nnamespace Xu\\Components;\n\nuse Xu\\Foundation\\Foundation;\n\n/**\n * Component class.\n */\nabstract class Component {\n\n /**\n * xu instance.\n *\n * @...
php
chosen
[ { "from": "system", "value": "Add default to boolean field and add timestamps\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateLaratoolsMetaInformationTable extends Migration\n{\n public f...
php
chosen
[ { "from": "system", "value": "Add sprints and tasks relationships to project model\n" }, { "from": "human", "value": "<?php\n\nnamespace App;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nuse App\\Client;\n\nclass Project extends Model\n{\n protected $fillable = [\n 'name',\n ...
php
chosen
[ { "from": "system", "value": "Change inline char syntax to array\n" }, { "from": "human", "value": "<?php\n\nnamespace vektah\\parser_combinator\\parser;\n\nclass CharRangeParser extends CharParser\n{\n public function __construct(array $ranges, $min = null, $max = null, $capture = true)\n ...
php
chosen
[ { "from": "system", "value": "Allow to set specific parameters per instance\n" }, { "from": "human", "value": "<?php\nnamespace Ensepar\\Html2pdfBundle\\Service;\n\nclass Html2pdf\n{\n protected $html2pdf;\n\n public function __construct($mode, $format, $lang,$unicode,$encoding,$margin)\n ...
php
chosen
[ { "from": "system", "value": "Move up/down votes from the far right to just before the title\n\nNow that it's only two icons (and will be only 1 soon), it makes more sense to put it here.\n" }, { "from": "human", "value": "<?php\r\nuse yii\\helpers\\Html;\r\n\r\n/* @var $model ShortCirquit\\Link...
php
chosen
[ { "from": "system", "value": "Add tests for Maybe's Equal and Alternative implementations.\n" }, { "from": "human", "value": "<?php\n\nclass MaybeTest extends \\PHPUnit_Framework_TestCase\n{\n public function testFunctorLaws()\n {\n $x = new Some(42);\n $f = function ($n) {\n ...
php
chosen
[ { "from": "system", "value": "Allow the live test wait to be skipped\n" }, { "from": "human", "value": "<?php\n\nrequire __DIR__ . \"/../vendor/autoload.php\";\n\nif (in_array(\"--live-tests\", $_SERVER[\"argv\"])) {\n echo \"\\nWARNING: These tests will make changes to the Sonos devices on t...
php
chosen
[ { "from": "system", "value": "Update database connection to 7.1\n\nUpdate database connection. Refactor variables with visibility constant." }, { "from": "human", "value": "<?php\n\nclass Connection\n{\n public function getDatabase() {\n $dbh = NULL;\n\n $host = \"localhost\";\n...
php
chosen
[ { "from": "system", "value": "[Notifier][WebProfilerBundle][FrameworkBundle] Add notifier section to profiler\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 licens...
php
chosen
[ { "from": "system", "value": "Update comment of images table migration\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateImagesTable extends Migratio...
php
chosen
[ { "from": "system", "value": "Fix badge support for FCM and GCM via channel\n" }, { "from": "human", "value": "<?php\n\nnamespace Edujugon\\PushNotification\\Channels;\n\nuse Edujugon\\PushNotification\\Messages\\PushMessage;\n\nclass GcmChannel extends PushChannel\n{\n /**\n * {@inheritd...
php
chosen
[ { "from": "system", "value": "Reorder header location so that it's not already sent out\n" }, { "from": "human", "value": "<?php\n $title = 'Latest Issue';\n include('includes/header.php');\n $latest = $archive->getLatest();\n\n if (array_key_exists('thumb', $_GET)) {\n header(\"Location...
php
chosen
[ { "from": "system", "value": "Update store method to save/create notes\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: studio-book\n * Date: 12/6/16\n * Time: 6:36 PM\n */\n\nnamespace ShawnSandy\\Summernote\\App\\Controllers;\n\n\nuse Illuminate\\Http\\Request;\...
php
chosen
[ { "from": "system", "value": "Add type to import method\n" }, { "from": "human", "value": "<?php\nnamespace CfdiUtils\\Nodes;\n\nuse DOMElement;\n\nclass XmlNodeImporter\n{\n /**\n * Local record for registered namespaces to avoid set the namespace declaration in every children\n * @v...
php
chosen
[ { "from": "system", "value": "Set event subscriber priority for failure events" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Codeception\\Subscriber;\n\nuse Codeception\\Event\\TestEvent;\nuse Codeception\\Events;\nuse Codeception\\ResultAggregator;\nuse Symfony...
php
chosen
[ { "from": "system", "value": "Refactor publish command and allow multiple resource values\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Rinvex\\Attributes\\Console\\Commands;\n\nuse Illuminate\\Console\\Command;\n\nclass PublishCommand extends Command\n{\n ...
php
chosen
[ { "from": "system", "value": "Add basic table to main page\n" }, { "from": "human", "value": "<?php\n\trequire_once('php/session.php');\n\trequire_once('php/header.php');\n?>\n\t\t<hr>\n\n\t\t<div class=\"footer\">\n\t\t\t<p><center>&copy; Champlain College LCDI 2013</center></p>\n\t\t</div>\n\n...
php
chosen