conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add Hybrid\\Auth::is() to check if user has a given role\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Hybrid;\n\n/**\n * Auth class\n *\n * @package Hybrid\n * @category Auth...
php
chosen
[ { "from": "system", "value": "Rebuild generation of shortcodes araay\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\n\nfunction normalizeShortcode($shortcode) {\n return str_replace('-', '_', strtolower($shortcode));\n}\n\n$data = json_decode(file_get_contents(__DIR__ . '/../ven...
php
chosen
[ { "from": "system", "value": "Increase security loading the .env.testing file\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Blackfire SDK package.\n *\n * (c) Blackfire <support@blackfire.io>\n *\n * For the full copyright and license information, please view the LI...
php
chosen
[ { "from": "system", "value": "test: Adjust test bootstrap file for new autoloader structure\n" }, { "from": "human", "value": "<?php\n\n$base = dirname(__FILE__) . \"/..\";\n\nset_include_path(\n $base . \"/config:\" .\n $base . \"/system/config:\" .\n $base . \"/system:\" .\n $base ...
php
chosen
[ { "from": "system", "value": "Use civiExit() instead of die.\n" }, { "from": "human", "value": "<?php\n\nclass CRM_Monetico_Page_Monetico extends CRM_Core_Page {\n function run() {\n /**\n * NEEDS REVIEW\n *\n * The CMC_IC extension used this class to generate a mini-form,\n ...
php
chosen
[ { "from": "system", "value": "Fix data field for Mailgun" }, { "from": "human", "value": "<?php\n\nnamespace Swm\\Bundle\\MailHookBundle\\ApiService;\n\nuse Swm\\Bundle\\MailHookBundle\\Hook\\DefaultHook;\nuse Swm\\Bundle\\MailHookBundle\\SwmMailHookEvent;\n\nclass MailgunApiService extends Base...
php
chosen
[ { "from": "system", "value": "Update default icon for Twitter\n" }, { "from": "human", "value": "<?php\nnamespace HomoChecker\\Model;\n\nuse GuzzleHttp\\Promise;\nuse GuzzleHttp\\ClientInterface;\n\nclass Icon implements IconInterface\n{\n public static $default = 'https://abs.twimg.com/stick...
php
chosen
[ { "from": "system", "value": "[HttpKernel] Fix missing use for request and response classes\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, ple...
php
chosen
[ { "from": "system", "value": "Add horizontal line element to header\n" }, { "from": "human", "value": "<h2 class=\"govuk-heading-l\">Search results for <?php the_search_query(); ?> </h2>\n\n<?php if (have_posts()) { ?>\n \n <?php while (have_posts()) : the_post() ?>\n <article <?php post_cl...
php
chosen
[ { "from": "system", "value": "Add a dismiss button to the alert\n" }, { "from": "human", "value": "@extends('larapress.layouts.master')\n\n@section('head.extension')\n {{ HTML::style('larapress/assets/css/pages/home/login.css') }}\n@stop\n\n@section('body')\n <div id=\"wrapper\">\n ...
php
chosen
[ { "from": "system", "value": "FIX Update logger injector alias in example code" }, { "from": "human", "value": "<?php\n\nnamespace SilverLeague\\LogViewer\\Task;\n\nuse SilverStripe\\Core\\Injector\\Injector;\nuse SilverStripe\\Dev\\BuildTask;\n\n/**\n * This is purely for demo purposes, and wil...
php
chosen
[ { "from": "system", "value": "Tweak whitespace for DocuSign acknowledgement email\n" }, { "from": "human", "value": "Hi {{ $envelope->signedBy->preferred_first_name }},\n\nWe received your Travel Authority Request for {{ $envelope->signable->travel->name }}. Once everyone has submitted their doc...
php
chosen
[ { "from": "system", "value": "Remove unnecessary check of php version\n\nThe minimum php version required in composer is 7.1 and the code\nwas checking with version 5\n" }, { "from": "human", "value": "<?php\n\nnamespace Doctrine\\Instantiator\\Exception;\n\nuse InvalidArgumentException as BaseI...
php
chosen
[ { "from": "system", "value": "Fix test for TravisCi Strategy\n" }, { "from": "human", "value": "<?php\n\nnamespace Joli\\JoliCi;\n\nuse org\\bovigo\\vfs\\vfsStream;\nuse Joli\\JoliCi\\BuildStrategy\\TravisCiBuildStrategy;\n\nclass TravisCiBuildStrategyTest extends \\PHPUnit_Framework_TestCase\n{...
php
chosen
[ { "from": "system", "value": "Update avatar when is changed" }, { "from": "human", "value": "<?php\r\n/**\r\n * Created by PhpStorm.\r\n * User: Catalin\r\n * Date: 03-Jun-17\r\n * Time: 13:59\r\n */\r\n\r\ninclude (\"../../BACK/conectare_db.php\");\r\n\r\n$username = $_SESSION[\"username\"];\r\...
php
chosen
[ { "from": "system", "value": "Fix base path for file-like urls (i.e. thumbnails, file viewing/editing on backend UI, etc.) for built-in php server.\n" }, { "from": "human", "value": "<?php\n/*\n * This could be loaded on a very old version of PHP so no syntax/methods over 5.2 in this file.\n */\...
php
chosen
[ { "from": "system", "value": "Remove unpublished posts from latest posts list sidebar\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Providers;\n\nuse App\\Post;\nuse Illuminate\\Support\\Facades\\View;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass ComposerServiceProvider exten...
php
chosen
[ { "from": "system", "value": "Fix hard coded site URL in @username mention\n" }, { "from": "human", "value": "<?php\n\nnamespace Phosphorum\\Markdown;\n\nuse Ciconia\\Common\\Text;\nuse Ciconia\\Extension\\ExtensionInterface;\nuse Ciconia\\Markdown;\n\n/**\n * Class MentionExtension\n *\n * @pac...
php
chosen
[ { "from": "system", "value": "Allow characters/length to be overriden in the generator.\n" }, { "from": "human", "value": "<?php\nnamespace Nubs\\PwMan;\n\nuse RandomLib\\Factory as RandomFactory;\n\n/**\n * Generate random passwords.\n */\nclass PasswordGenerator\n{\n /** @type string The ch...
php
chosen
[ { "from": "system", "value": "Add skip argument to `bulk:all`\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Console\\Commands\\Bulk;\n\nuse Aic\\Hub\\Foundation\\AbstractCommand as BaseCommand;\n\nclass BulkAll extends BaseCommand\n{\n\n protected $signature = 'bulk:all';\n\n ...
php
chosen
[ { "from": "system", "value": "Mark migration 20181112211702 as repeatable\n" }, { "from": "human", "value": "<?php\n\nnamespace Concrete\\Core\\Updater\\Migrations\\Migrations;\n\nuse Concrete\\Core\\Updater\\Migrations\\AbstractMigration;\n\nclass Version20181112211702 extends AbstractMigration...
php
chosen
[ { "from": "system", "value": "Use interface as return type\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace phpDocumentor\\Reflection\\Php;\n\nuse phpDocumentor\\Reflection\\Exception;\n\ntrait MetadataContainerTest\n{\n /**\n * @covers ::addMetadata\n ...
php
chosen
[ { "from": "system", "value": "Add API routes for Nanny\n\n#57\n" }, { "from": "human", "value": "<?php\n\nrequire_once APP_LIB_PATH . '/AppResponse.php';\n\n$app->group('/nannies', function() use ($app, $nannyDB) {\n\n});" }, { "from": "gpt", "value": "<?php\n\nrequire_once APP_LIB_P...
php
chosen
[ { "from": "system", "value": "Remove deprecated calls (Loader --> View)\n" }, { "from": "human", "value": "<?\ndefined('C5_EXECUTE') or die(\"Access Denied.\");\n\n$c = Page::getCurrentPage();\nif (is_object($c)) {\n $cp = new Permissions($c);\n Loader::element('page_controls_footer', arra...
php
chosen
[ { "from": "system", "value": "Fix crash if config value is not set\n" }, { "from": "human", "value": "<?php\n\nnamespace PragmaRX\\Google2FALaravel\\Support;\n\nuse Illuminate\\Support\\MessageBag;\nuse Symfony\\Component\\HttpFoundation\\Response as SymfonyResponse;\n\ntrait ErrorBag\n{\n /*...
php
chosen
[ { "from": "system", "value": "Remove get_r => print_r(..., true). Add array_flatten.\n" }, { "from": "human", "value": "<?php\n\nfunction startswith($haystack, $needle) {\n return substr($haystack, 0, strlen($needle)) === $needle;\n}\n\nfunction endswith($haystack, $needle) {\n return substr($...
php
chosen
[ { "from": "system", "value": "Copy our login page to the auth endpoints\n" }, { "from": "human", "value": "@extends('layouts.default')\n\n@section('content')\n<div class=\"container-fluid\">\n\t<div class=\"row\">\n\t\t<div class=\"col-md-8 col-md-offset-2\">\n\t\t\t<div class=\"panel panel-defa...
php
chosen
[ { "from": "system", "value": "Fix migration refering to different column type (unsigned/signed)\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreatePar...
php
chosen
[ { "from": "system", "value": "Allow widget installation using the path.\n" }, { "from": "human", "value": "<?php\n\nnamespace Yajra\\CMS\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Yajra\\CMS\\Repositories\\Extension\\Repository;\n\nclass WidgetPublishCommand extends Command\n{\n /**\...
php
chosen
[ { "from": "system", "value": "Add ability to get an object's creating client\n" }, { "from": "human", "value": "<?php\nnamespace Slack;\n\n/**\n * An object fetched from the Slack API.\n */\nabstract class ClientObject\n{\n /**\n * @var ApiClient The API client the object belongs to.\n ...
php
chosen
[ { "from": "system", "value": "Update compilerOutputFormatting value in the unit test\n" }, { "from": "human", "value": "<?php\n\nclass SassHandlerTest extends PHPUnit_Framework_TestCase \n{\n /**\n * @var SassHandler\n */\n private $sassHandler;\n\n /**\n * Path to the direc...
php
chosen
[ { "from": "system", "value": "[wiki:DbFinderPlugin] Allow for easier testing with sf 1.1\n" }, { "from": "human", "value": "<?php\n\n// Autofind the first available app environment\n$sf_root_dir = realpath(dirname(__FILE__).'/../../../');\n$apps_dir = glob($sf_root_dir.'/apps/*', GLOB_ONLYDIR);\...
php
chosen
[ { "from": "system", "value": "Fix php warnings on phpunit test failures.\n" }, { "from": "human", "value": "<?php\n\nrequire __DIR__ . '/../vendor/autoload.php';\n" }, { "from": "gpt", "value": "<?php\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\n// avoiding of Yii Framework cla...
php
chosen
[ { "from": "system", "value": "Add Field and Searchable to annotations\n" }, { "from": "human", "value": "<?php\n/*\n * $Id$\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMP...
php
chosen
[ { "from": "system", "value": "Use reset() instead of clean()\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace Moka\\Traits;\n\nuse Moka\\Moka;\n\n/**\n * Trait MokaCleanerTrait\n * @package Moka\\Traits\n */\ntrait MokaCleanerTrait\n{\n /**\n * @return void\...
php
chosen
[ { "from": "system", "value": "Fix invalid class name, and implement abstract method.\n" }, { "from": "human", "value": "<?php\n\nnamespace R\\Hive\\Commands;\n\nuse Illuminate\\Console\\GeneratorCommand;\n\nclass MakeValidatorCommand extends GeneratorCommand\n{\n protected function getPath($n...
php
chosen
[ { "from": "system", "value": "[BUGFIX] Make shuffle() a non-final operation\n\nChange-Id: I675ee102d9f799c023c07f7abcbf839b48656429\nReleases: master\nReviewed-on: https://review.typo3.org/27584\nReviewed-by: Karsten Dambekalns\nTested-by: Karsten Dambekalns\nReviewed-by: Christopher Hlubek\nOriginal-Commit...
php
chosen
[ { "from": "system", "value": "Fix font table to set parent of child elements\n" }, { "from": "human", "value": "<?php\n\nnamespace Jstewmc\\Rtf\\Element\\HeaderTable;\n\n/**\n * Declares fonts for use throughout the document\n */\nclass FontTable extends HeaderTable\n{\n public function __con...
php
chosen
[ { "from": "system", "value": "Allow extended class to access $options" }, { "from": "human", "value": "<?php\n\nnamespace Phug\\Util\\Partial;\n\ntrait OptionTrait\n{\n\n private $options = [];\n\n public function getOptions()\n {\n\n return $this->options;\n }\n\n public f...
php
chosen
[ { "from": "system", "value": "Update test for phpunit 6.*\n" }, { "from": "human", "value": "<?php\n\nnamespace Stati\\Tests;\n\nuse PHPUnit_Framework_TestCase;\n\nabstract class TestCase extends PHPUnit_Framework_TestCase\n{\n}\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Sta...
php
chosen
[ { "from": "system", "value": "Fix page ID for sanity check page...\n\ngit-svn-id: a243b28a2a52d65555a829a95c8c333076d39ae1@1730 44740490-163a-0410-bde0-09ae8108e29a\n" }, { "from": "human", "value": "<?php\n\n\n$config = SimpleSAML_Configuration::getInstance();\n$sconfig = SimpleSAML_Configurati...
php
chosen
[ { "from": "system", "value": "Remove obsolete reference to RouterInterface\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\nnamespace Onion\\Framework\\Http\\Middleware\\Factory;\n\nuse Onion\\Framework\\Router\\Route;\nuse Psr\\Container\\ContainerInterface;\nuse Onion\\Framew...
php
chosen
[ { "from": "system", "value": "Add type safety to the url parameters\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Api;\n\nuse Backend\\Modules\\ContentBlocks\\Domain\\ContentBlock\\ContentBlock;\nuse Backend\\Modules\\ContentBlocks\\Domain\\ContentBlock\\...
php
chosen
[ { "from": "system", "value": "Replace out-of-place h3 with a p styled as heading\n\nResolves: https://trello.com/c/ZpypHwAa/526-fix-banner-styling\n" }, { "from": "human", "value": "<?php\n$showBannerOnNetwork = get_site_option('banner_setting');\n$showBannerBySite = get_field('show_banner', 'op...
php
chosen
[ { "from": "system", "value": "Add group_id to the previous page link\n" }, { "from": "human", "value": "<div id=\"items-paging\">\n<?php if ($offset > 0): ?>\n <a id=\"previous-page\" href=\"?action=<?= $menu ?>&amp;offset=<?= ($offset - $items_per_page) ?>&amp;order=<?= $order ?>&amp;directi...
php
chosen
[ { "from": "system", "value": "Allow UnkonwRemoteEntityException to be thrown based on previous\n" }, { "from": "human", "value": "<?php\n\nclass EngineBlock_Corto_ProxyServer_UnknownRemoteEntityException extends EngineBlock_Corto_ProxyServer_Exception\n{\n protected $_entityId;\n\n public ...
php
chosen
[ { "from": "system", "value": "Make sure the relations are also created when we install a module\n" }, { "from": "human", "value": "<?php\n\nnamespace Common\\Doctrine\\Entity;\n\nuse Doctrine\\DBAL\\Exception\\TableExistsException;\nuse Doctrine\\ORM\\EntityManager;\nuse Doctrine\\ORM\\Tools\\Sc...
php
chosen
[ { "from": "system", "value": "Convert array to traditional syntax\n" }, { "from": "human", "value": "<?php\nnamespace Composer\\Installers;\n\nclass RadPHPInstaller extends BaseInstaller\n{\n protected $locations = [\n 'bundle' => 'bundles/{$name}/'\n ];\n\n /**\n * Format pa...
php
chosen
[ { "from": "system", "value": "Add 'force' option to core autoload & activate artisan command calls\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Cortex\\Foundation\\Console\\Commands;\n\nuse Illuminate\\Console\\Command;\n\nclass CoreInstallCommand extends Com...
php
chosen
[ { "from": "system", "value": "Set default limit for blog to 6.\n" }, { "from": "human", "value": "<?php\n\nnamespace Yajra\\CMS\\Http\\Controllers;\n\nuse App\\Http\\Controllers\\Controller;\nuse Illuminate\\Http\\Request;\nuse Yajra\\CMS\\Entities\\Category;\nuse Yajra\\CMS\\Events\\CategoryWas...
php
chosen
[ { "from": "system", "value": "Use NameResolver for including namespace\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Ray\\Aop;\n\nuse PhpParser\\NodeTraverser;\nuse PhpParser\\Parser;\nuse Ray\\Aop\\Exception\\InvalidSourceClassException;\nuse ReflectionClass;...
php
chosen
[ { "from": "system", "value": "Simplify and add boolean return\n" }, { "from": "human", "value": "<?php\n\nnamespace TwinDigital\\WPTools;\n\n/**\n * Class Filter\n */\nclass Filter {\n\n /**\n * Remove active filter from $wp_filter\n * @param string $hook Hook on which the original filter...
php
chosen
[ { "from": "system", "value": "Fix issue with Service Provider\n" }, { "from": "human", "value": "<?php\n\nnamespace KeyCDN;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse KeyCDN\\Facades\\KeyCDN;\nuse KeyCDN\\Facades\\KeyCDNFacade;\n\n/**\n * Class KeyCDNServiceProvider\n * @package KeyCDN\n ...
php
chosen
[ { "from": "system", "value": "Split item search into its own function\n" }, { "from": "human", "value": "<?php\nnamespace Scat;\n\nuse OE\\Lukas\\Parser\\QueryParser;\nuse OE\\Lukas\\Visitor\\QueryItemPrinter;\n\nclass SearchService\n{\n public function __construct() {\n }\n\n public function...
php
chosen
[ { "from": "system", "value": "Allow route option when creating a table 110" }, { "from": "human", "value": "<script type=\"text/javascript\">\n jQuery(document).ready(function () {\n // dynamic table\n oTable = jQuery('#{{ $id }}').DataTable({\n \"processing\": true,\...
php
chosen
[ { "from": "system", "value": "Append app name to title\n" }, { "from": "human", "value": "<!-- Twitter sharing -->\n<meta name=\"twitter:card\" content=\"summary_large_image\" />\n<meta name=\"twitter:title\" content=\"{{ $title ?? config('app.name') }}\">\n<meta name=\"twitter:creator\" content...
php
chosen
[ { "from": "system", "value": "Add Google Style 2 key shortcuts for main pages" }, { "from": "human", "value": "<div class=\"alert alert-normal\" id=\"shortcuts\">\n <h3><?= t('Keyboard shortcuts') ?></h3>\n <ul>\n <li><?= t('Download content') ?> = <strong>d</strong></li>\n <...
php
chosen
[ { "from": "system", "value": "Add optional parameter to optional()\n" }, { "from": "human", "value": "<?php\n\nnamespace Structr\\Tree\\Composite;\n\nuse Structr\\Tree\\Base\\PrototypeNode;\n\nuse Structr\\Exception;\n\nclass MapKeyNode extends PrototypeNode\n{\n private $_required = true;\n ...
php
chosen
[ { "from": "system", "value": "Change output for algorithm list to service name instead of class name\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the PcdxParameterEncryptionBundle package.\n *\n * (c) picodexter <https://picodexter.io/>\n *\n * For the full copyright a...
php
chosen
[ { "from": "system", "value": "Make data URI in a separate method and remove some litter\n\n" }, { "from": "human", "value": "<?php\r\nclass Layout\r\n{\r\n\tprivate $cache;\r\n\r\n\tprivate function mime($path)\r\n\t{\r\n\t\tswitch(pathinfo($path, PATHINFO_EXTENSION))\r\n\t\t{\r\n\t\tcase 'css':...
php
chosen
[ { "from": "system", "value": "Update path to webservice in test\n" }, { "from": "human", "value": "<?php\nrequire_once __DIR__ . DIRECTORY_SEPARATOR . 'config.php';\n\n/**\n * @backupGlobals disabled\n */\nclass DetailsTest extends PHPUnit_Framework_TestCase\n{\n public function testExecute()...
php
chosen
[ { "from": "system", "value": "Fix `@package` annotation in ClearCache command\n" }, { "from": "human", "value": "<?php\n\nnamespace wcf\\system\\cache\\command;\n\nuse wcf\\data\\option\\OptionEditor;\nuse wcf\\data\\package\\update\\server\\PackageUpdateServer;\nuse wcf\\system\\cache\\CacheHan...
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": "Add assertAttribute macro for Dusk testing\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Providers;\n\nuse Facebook\\WebDriver\\WebDriverBy;\nuse Illuminate\\Support\\ServiceProvider;\nuse Laravel\\Dusk\\Browser;\n\nclass DuskServiceProvider extends Ser...
php
chosen
[ { "from": "system", "value": "Update test to psr4autoload. Before it was testing ps0autoload due to copy pasting shit.\n" }, { "from": "human", "value": "<?php\ninclude __DIR__ . '/../src/psr4autoload.php';\nclass Psr4AutoloaderTest extends PHPUnit_Framework_TestCase\n{\n public static funct...
php
chosen
[ { "from": "system", "value": "Add a compatibility layer for symfony/config < 4.2\n\nBased on https://github.com/symfony/maker-bundle/pull/324\n" }, { "from": "human", "value": "<?php\n\nnamespace SymfonyBundles\\JsonRequestBundle\\DependencyInjection;\n\nuse Symfony\\Component\\Config\\Definitio...
php
chosen
[ { "from": "system", "value": "Fix carousel next and prev buttons" }, { "from": "human", "value": "<div {!! $attributes !!}>\n <ol class=\"carousel-indicators\">\n\n @foreach($items as $key => $item)\n <li data-target=\"#carousel-example-generic\" data-slide-to=\"{{$key}}\" class...
php
chosen
[ { "from": "system", "value": "Return all Users for testing purposes\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Http\\Request;\nuse App\\Job;\n\n\n/*\n|--------------------------------------------------------------------------\n| API Routes\n|-------------------------------------...
php
chosen
[ { "from": "system", "value": "Add the seed of athomes\n" }, { "from": "human", "value": "<?php\n\nclass DatabaseSeeder extends Seeder {\n\n\t/**\n\t * Run the database seeds.\n\t *\n\t * @return void\n\t */\n\tpublic function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('UserTableS...
php
chosen
[ { "from": "system", "value": "Update status validation to allow for new voter-reg statuses\n" }, { "from": "human", "value": "<?php\n\nnamespace Rogue\\Http\\Requests;\n\nclass PostRequest extends Request\n{\n /**\n * Determine if the user is authorized to make this request.\n *\n ...
php
chosen
[ { "from": "system", "value": "Set the component name through the documentable behavior\n" }, { "from": "human", "value": "<?php\n/**\n * Kodekit Component - http://www.timble.net/kodekit\n *\n * @copyright\tCopyright (C) 2011 - 2016 Johan Janssens and Timble CVBA. (http://www.timble.net)\n * @li...
php
chosen
[ { "from": "system", "value": "Add more test cases for sync\n" }, { "from": "human", "value": "<?php\n\n/**\n * This file is part of the Tarantool Client package.\n *\n * (c) Eugene Leonovich <gen.work@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * ...
php
chosen
[ { "from": "system", "value": "Allow create card request to use parameter action = Purchase\n" }, { "from": "human", "value": "<?php\n\n/**\n * BluePay Create Credit Card Request.\n */\nnamespace Omnipay\\BluePay\\Message;\n\n/**\n * BluePay Create Credit Card Request.\n *\n * We do this by runni...
php
chosen
[ { "from": "system", "value": "Add `getBody()` on all responses\n" }, { "from": "human", "value": "<?php\n\nnamespace Algolia\\AlgoliaSearch\\Response;\n\nabstract class AbstractResponse implements \\ArrayAccess\n{\n /**\n * @var array Full response from Algolia API\n */\n protected...
php
chosen
[ { "from": "system", "value": "Change cached file extension to .json.tmp\n" }, { "from": "human", "value": "<?php\n\nclass Cache {\n private static $_config = false;\n\n private static function getConfig() {\n if(static::$_config)\n return static::$_config;\n\n stat...
php
chosen
[ { "from": "system", "value": "Use $request->server information for more precision\n" }, { "from": "human", "value": "<?php\n\nnamespace Liuggio\\StatsDClientBundle\\StatsCollector;\n\nuse Liuggio\\StatsdClient\\Factory\\StatsdDataFactoryInterface;\nuse Symfony\\Component\\HttpFoundation\\Request...
php
chosen
[ { "from": "system", "value": "III-461: Test XmlString construction with invalid xml\n" }, { "from": "human", "value": "<?php\n/**\n * @file\n */\n\nnamespace CultuurNet\\UDB3;\n\n\nclass XmlStringTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @test\n */\n public function it...
php
chosen
[ { "from": "system", "value": "[Cms] Use query cache for find page by route.\n" }, { "from": "human", "value": "<?php\n\nnamespace Ekyna\\Bundle\\CmsBundle\\Entity;\n\nuse Ekyna\\Component\\Resource\\Doctrine\\ORM\\TranslatableResourceRepositoryInterface;\nuse Ekyna\\Component\\Resource\\Doctrine...
php
chosen
[ { "from": "system", "value": "Modify one of the indexes on the appointments table.\n" }, { "from": "human", "value": "<?php\n\nclass Create_Appointments_Table {\n\n\t/**\n\t * Make changes to the database.\n\t *\n\t * @return void\n\t */\n\tpublic function up()\n\t{\n\t\t//\n\t\tSchema::table('a...
php
chosen
[ { "from": "system", "value": "Revert \"delete un needed route\"\n\nThis reverts commit a58cbd7a9dc531e38bc2ec6425bd76ad9ff16c6d.\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Application Routes\n|-------------------...
php
chosen
[ { "from": "system", "value": "Replace for loop with foreach\n" }, { "from": "human", "value": "<?php\n\nnamespace BinSoul\\Net\\Mqtt;\n\n/**\n * Matches a topic filter with an actual topic.\n *\n * @author Alin Eugen Deac <ade@vestergaardcompany.com>\n */\nclass TopicMatcher\n{\n /**\n *...
php
chosen
[ { "from": "system", "value": "Check for the class of the member as opposed to the toplevel name of the member\n" }, { "from": "human", "value": "<?php\n\nnamespace Refinery29\\ApiOutput;\n\nuse Refinery29\\ApiOutput\\Resource\\TopLevelResource;\nuse Refinery29\\ApiOutput\\Serializer\\Serializer;...
php
chosen
[ { "from": "system", "value": "Disable redirects when using Live Preview\n" }, { "from": "human", "value": "<?php\n\nnamespace Craft;\n\nclass RedirectmanagerPlugin extends BasePlugin\n{\n\tpublic function getName()\n\t{\n\t\treturn Craft::t('Redirect Manager');\n\t}\n\n\tpublic function getVersi...
php
chosen
[ { "from": "system", "value": "Remove custom compiler extension class\n" }, { "from": "human", "value": "<?php\r\n/**\r\n * Created by PhpStorm.\r\n * User: Michal\r\n * Date: 8.1.14\r\n * Time: 19:02\r\n */\r\n\r\nnamespace AnnotateCms\\Themes\\DI;\r\n\r\n\r\nuse AnnotateCms\\Framework\\DI\\Comp...
php
chosen
[ { "from": "system", "value": "Remove closures from Expression language\n" }, { "from": "human", "value": "<?php\n\nnamespace Heyday\\CacheInclude;\n\nuse Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage as SymfonyExpressionLanguage;\n\n/**\n * Class ExpressionLanguage\n * @package Heyd...
php
chosen
[ { "from": "system", "value": "Fix integer formatter to accept zero value\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types = 1);\n\nnamespace DASPRiD\\Formidable\\Mapping\\Formatter;\n\nuse Assert\\Assertion;\nuse DASPRiD\\Formidable\\Data;\nuse DASPRiD\\Formidable\\FormError\\FormE...
php
chosen
[ { "from": "system", "value": "Update UUID type to BINARY(16)\n" }, { "from": "human", "value": "<?php\n\nnamespace Maghead\\Schema\\Column;\n\nuse Maghead\\Schema\\DeclareColumn;\nuse Maghead\\Schema\\DeclareSchema;\n\nclass UUIDPrimaryKeyColumn extends DeclareColumn\n{\n /**\n * TODO: th...
php
chosen
[ { "from": "system", "value": "Add links to download JSON and go to summary page\n" }, { "from": "human", "value": "<!DOCTYPE HTML>\n<html>\n\t<?php\n\tinclude(\"config.php\");\n\tif ('Production' != constant('DEPLOY_MODE')) {\n\t\techo '<h3>Site is running in ' . constant('DEPLOY_MODE') . ': all...
php
chosen
[ { "from": "system", "value": "Allow smaller pictures to be declared as valid pictures\n" }, { "from": "human", "value": "<?php\nnamespace Movim\\Task;\n\nuse Clue\\React\\Buzz\\Browser;\nuse Psr\\Http\\Message\\ResponseInterface;\n\nclass CheckSmallPicture extends Engine {\n\n private $_clien...
php
chosen
[ { "from": "system", "value": "Clear cache when installing a widget.\n" }, { "from": "human", "value": "<?php\n\nnamespace Yajra\\CMS\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Yajra\\CMS\\Repositories\\Extension\\Repository;\n\nclass WidgetPublishCommand extends Command\n{\n /**\n ...
php
chosen
[ { "from": "system", "value": "Add cURL exception handler to CM preview URL fetcher\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Models;\nuse App\\DeviantArt;\n\nclass Cutiemark extends AbstractFillable {\n\t/** @var int */\n\tpublic $cmid, $ponyid;\n\t/** @var string */\n\tpublic $...
php
chosen
[ { "from": "system", "value": "Return in instance of a recurrence type from the recurrence factory rather than a class path.\n" }, { "from": "human", "value": "<?php\n\nnamespace Plummer\\Calendarful\\Recurrence;\n\nclass RecurrenceFactory implements RecurrenceFactoryInterface\n{\n\tprotected $re...
php
chosen
[ { "from": "system", "value": "Return JSON for /badges to make test pass\n" }, { "from": "human", "value": "<?php\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\n$app = new Silex\\Application();\n\n$app->get('/issuers/{id}', function($id) use ($app) {\n\n});\n\n$app->get('/badges', functi...
php
chosen
[ { "from": "system", "value": "Set the base application path\n" }, { "from": "human", "value": "<?php namespace Modules\\Workshop\\Tests;\n\nuse Orchestra\\Testbench\\TestCase;\n\nabstract class BaseTestCase extends TestCase\n{\n public function setUp()\n {\n parent::setUp();\n }\...
php
chosen
[ { "from": "system", "value": "Fix theme changer.\nUse cms-theme as query param.\nSet default theme on config.\n" }, { "from": "human", "value": "<?php\n\nnamespace Yajra\\CMS\\Themes;\n\nuse Closure;\n\nclass ThemeChanger\n{\n /**\n * Handle an incoming request.\n *\n * @param \\...
php
chosen
[ { "from": "system", "value": "Fix mconsole options array values\n" }, { "from": "human", "value": "<?php\n\nnamespace Milax\\Mconsole\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass MconsoleOption extends Model\n{\n use \\Cacheable;\n \n protected $fillable = ['group', '...
php
chosen
[ { "from": "system", "value": "Test something with the mailer.\n" }, { "from": "human", "value": "<?php\nrequire_once(\"libs/sendgrid-php/sendgrid-php.php\");\n\n// Simple class to send email notifications.\nclass Mailer {\n\n public static function sendMail($clientAddress, $body) {\n $...
php
chosen
[ { "from": "system", "value": "Create array in old manner (PHP 5.3)" }, { "from": "human", "value": "<?php\nnamespace Ratchet\\Session\\Serialize;\n\nclass PhpHandler implements HandlerInterface {\n /**\n * Simply reverse behaviour of unserialize method.\n * {@inheritdoc}\n */\n ...
php
chosen
[ { "from": "system", "value": "CRM-2199: Create search handler for A/CI field autocomplete\n -revert changes\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\MigrationBundle\\Migration;\n\nuse Doctrine\\Common\\DataFixtures\\AbstractFixture;\nuse Doctrine\\Common\\Persistence\...
php
chosen
[ { "from": "system", "value": "Support anonymous requests, but with a warning\n" }, { "from": "human", "value": "<?php\n\nuse ApiClients\\Client\\Github\\Authentication\\Token;\n\n$keyFile = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'token.php';\n\nif (!file_exists($keyFile)) {\n echo 'No key f...
php
chosen