conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update code comment for use in PHPStorm.\n" }, { "from": "human", "value": "<?php\n/**\n * ZucchiDoctrine (http://zucchi.co.uk)\n *\n * @link http://github.com/zucchi/ZucchiDoctrine for the canonical source repository\n * @copyright Copyright (c) 2005-2013 Zucc...
php
chosen
[ { "from": "system", "value": "Switch from countable to traversable\n" }, { "from": "human", "value": "<?php\n\nnamespace Shrikeh\\Collection;\n\nuse Countable;\nuse SplFixedArray;\n\ntrait FixedArrayStorageTrait\n{\n public function __construct(Countable $objects)\n {\n $arr = [];\n...
php
chosen
[ { "from": "system", "value": "Create and destroy for comments likes" }, { "from": "human", "value": "<?php\n\nnamespace App;\n\nuse Illuminate\\Auth\\Authenticatable;\nuse Illuminate\\Database\\Eloquent\\Model;\n\nuse \\App\\User;\nuse \\App\\Comments;\nuse PhpParser\\Comment;\n\nclass CommentFa...
php
chosen
[ { "from": "system", "value": "Add input (upload) echo for POST/PUT testing\n" }, { "from": "human", "value": "<?php\n\nif (isset($_GET[\"r\"])) {\n\thttp_response_code($_GET[\"r\"]);\n\tunset($_GET[\"r\"]);\n}\n\nif (count($_GET)) {\n\tforeach ($_GET as $key => $value) {\n\t\techo isset($_SERVER...
php
chosen
[ { "from": "system", "value": "Update phone number formats for tr_TR" }, { "from": "human", "value": "<?php\n\nnamespace Faker\\Provider\\tr_TR;\n\nclass PhoneNumber extends \\Faker\\Provider\\PhoneNumber\n{\n protected static $formats = array(\n '0##########',\n '05#########'\n ...
php
chosen
[ { "from": "system", "value": "Use the proper method signature to prevent another fatal\n" }, { "from": "human", "value": "<?php\n\nnamespace WP_CLI;\n\nuse \\Composer\\IO\\NullIO;\nuse \\WP_CLI;\n\n/**\n * A Composer IO class so we can provide some level of interactivity from WP-CLI\n */\nclass ...
php
chosen
[ { "from": "system", "value": "Add completed message-key to generator command class\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view th...
php
chosen
[ { "from": "system", "value": "Fix doc for non-existing parameter\n" }, { "from": "human", "value": "<?php\n\nnamespace Brick\\Money\\Context;\n\nuse Brick\\Money\\Context;\nuse Brick\\Money\\Currency;\n\nuse Brick\\Math\\BigNumber;\n\n/**\n * Adjusts the scale & step of the result to custom valu...
php
chosen
[ { "from": "system", "value": "Remove aligned '=>' and '='\n\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that...
php
chosen
[ { "from": "system", "value": "Include Laravel 5.5 in Laravel53Worker implementation\n" }, { "from": "human", "value": "<?php\n\nnamespace Dusterio\\AwsWorker\\Integrations;\n\nuse Dusterio\\AwsWorker\\Wrappers\\WorkerInterface;\nuse Dusterio\\AwsWorker\\Wrappers\\DefaultWorker;\nuse Dusterio\\Aw...
php
chosen
[ { "from": "system", "value": "Return empty array on ParseException\n" }, { "from": "human", "value": "<?php\n/**\n * FrontMatterParser.php\n *\n * Created By: jonathan\n * Date: 23/09/2017\n * Time: 00:34\n */\n\nnamespace Stati\\Parser;\n\nuse Symfony\\Component\\Finder\\SplFileInfo;\nuse Symfo...
php
chosen
[ { "from": "system", "value": "Update search:uninstall to work with multiple indexes\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Console\\Commands;\n\nuse Illuminate\\Console\\Command;\nuse Elasticsearch;\n\nclass UninstallSearch extends Command\n{\n\n protected $signature = 'se...
php
chosen
[ { "from": "system", "value": "Work template for showing geodata over\n" }, { "from": "human", "value": "<% _.each(data, function(row) { %>\n\t<a class=\"list-group-item\" onclick=\"commentsToGeodataController(new CommentsToGeodata())\"><%= _.escape(row.metadata.title) %>\n\t<span class=\"badge\"...
php
chosen
[ { "from": "system", "value": "Remove 10-15 keys from retro (replace with green 20 rupees).\n" }, { "from": "human", "value": "<?php\n\nnamespace ALttP\\World;\n\nclass Retro extends Open\n{\n /**\n * Create a new world and initialize all of the Regions within it.\n * In Retro we force...
php
chosen
[ { "from": "system", "value": "Allow user email address to be mass assigned\n" }, { "from": "human", "value": "<?php\n\nnamespace App;\n\nuse Illuminate\\Notifications\\Notifiable;\nuse Illuminate\\Foundation\\Auth\\User as Authenticatable;\n\nclass User extends Authenticatable\n{\n use Notifi...
php
chosen
[ { "from": "system", "value": "Fix critical Image delete observer!!!\n\nUpdate ImageObserver.php" }, { "from": "human", "value": "<?php\n\nnamespace Despark\\Cms\\Admin\\Observers;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Despark\\Cms\\Contracts\\ImageContract;\n\n/**\n * Class ImageObs...
php
chosen
[ { "from": "system", "value": "Add Composer version in about command\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Composer.\n *\n * (c) Nils Adermann <naderman@naderman.de>\n * Jordi Boggiano <j.boggiano@seld.be>\n *\n * For the full copyright and license informatio...
php
chosen
[ { "from": "system", "value": "Use php5.3 syntax for array\n" }, { "from": "human", "value": "<?php\n\nfunction redirect($url = '/') {\n header('HTTP/1.1 302 Found');\n header(\"Location: $url\");\n}\nif($_SERVER['REQUEST_METHOD'] !== 'POST') {\n redirect();\n exit;\n}\n\n$quizJson = ...
php
chosen
[ { "from": "system", "value": "Check match with identity operator against a boolean\n" }, { "from": "human", "value": "<?php\n\nnamespace PHPSpec2\\Matcher;\n\nabstract class BasicMatcher implements MatcherInterface\n{\n final public function positiveMatch($name, $subject, array $arguments)\n ...
php
chosen
[ { "from": "system", "value": "Add annotations to abstract methods\n" }, { "from": "human", "value": "<?php\n/**\n *\n * PHP.Gt (http://php.gt)\n * @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)\n * @license Apache Version 2.0, January 2004. http://www.apache.org/licenses\...
php
chosen
[ { "from": "system", "value": "Add route group that requires auth\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Application Routes\n|--------------------------------------------------------------------------\n|\n| He...
php
chosen
[ { "from": "system", "value": "Fix incompatibility with php 5.5 in tests\n" }, { "from": "human", "value": "<?php\n\nnamespace Eole\\Sandstone\\Tests\\Unit\\Websocket;\n\nuse Eole\\Sandstone\\Serializer\\ServiceProvider as SerializerServiceProvider;\nuse Eole\\Sandstone\\Websocket\\Routing\\Topic...
php
chosen
[ { "from": "system", "value": "Add output path to base integration test\n\nEnsuring that all output goes into a commands directory, because we\nare mainly only going to test the application's commands\n" }, { "from": "human", "value": "<?php\n\n/**\n * Base Integration Test\n *\n * The core test-...
php
chosen
[ { "from": "system", "value": "Make signature of test auth source match that of class it extends\n" }, { "from": "human", "value": "<?php\n\nnamespace SimpleSAML\\Test\\Auth;\n\nuse SimpleSAML\\Auth\\SourceFactory;\nuse SimpleSAML\\Test\\Utils\\ClearStateTestCase;\n\n/**\n * Tests for SimpleSAML_...
php
chosen
[ { "from": "system", "value": "Add correct name of constant variables\n" }, { "from": "human", "value": "<?php\n\nnamespace fennecweb\\ajax\\details;\n\nclass ProjectsTest extends \\PHPUnit_Framework_TestCase\n{\n const NICKNAME = 'listingProjectsTestUser';\n const USERID = 'listingProjects...
php
chosen
[ { "from": "system", "value": "Save connection name in session too\n\n" }, { "from": "human", "value": "<?php\n/**\n * Bareos Reporter\n * Application for managing Bareos Backup Email Reports\n *\n * Dashboard Controller\n *\n * @license The MIT License (MIT) See: LICENSE file\n * @copyright Copy...
php
chosen
[ { "from": "system", "value": "Allow configuration methods to be chained." }, { "from": "human", "value": "<?php\n\nnamespace Howtomakeaturn\\Db2d;\n\nuse Ifsnop\\Mysqldump\\Mysqldump;\nuse Kunnu\\Dropbox\\DropboxApp;\nuse Kunnu\\Dropbox\\Dropbox;\nuse Kunnu\\Dropbox\\DropboxFile;\n\nclass Db2d\n...
php
chosen
[ { "from": "system", "value": "Update the stored hash in the database if it is too old\n" }, { "from": "human", "value": "<?php\n\n\n////////////////////////////////////////////////////////////////////////////////\n//IF WE'RE ALREADY LOGGED IN, JUST REDIRECT PAGE\n////////////////////////////////...
php
chosen
[ { "from": "system", "value": "Refactor and fix string concat typo" }, { "from": "human", "value": "<?php\n/*\n * Plugin Name: LuckyGrids\n * Version: 0.1.0\n * Plugin URI: http://luckygrids.io/wordpress\n * Description: Embed LuckyGrids using a shortcode.\n * Author: Ryan Burnette\n * Author URI...
php
chosen
[ { "from": "system", "value": "Add breadcrumbs to the frontend actions\n\nFixes #11\n" }, { "from": "human", "value": "<?php\n/**\n * Frontend {{ moduleName }} {{ action }} action\n */\nclass Frontend{{ moduleName|capitalize }}{{ action|capitalize }} extends FrontendBaseBlock\n{\n /**\n * ...
php
chosen
[ { "from": "system", "value": "Cover wildcard definitions for the compiled container\n" }, { "from": "human", "value": "<?php\n\nnamespace DI\\Test\\IntegrationTest\\Definitions;\n\nuse DI\\Annotation\\Inject;\nuse DI\\ContainerBuilder;\nuse DI\\Test\\IntegrationTest\\Fixtures\\Implementation1;\n...
php
chosen
[ { "from": "system", "value": "Add explicit foreign keys in countries table.\n" }, { "from": "human", "value": "<?php\nnamespace CrudJsonApi\\Test\\App\\Model\\Table;\n\nuse Cake\\ORM\\Table;\nuse Cake\\Validation\\Validator;\n\nclass CountriesTable extends Table\n{\n public function initializ...
php
chosen
[ { "from": "system", "value": "Hide page header with custom field settings\n" }, { "from": "human", "value": "<?php if(!is_front_page()): ?>\n<div class=\"page-header\">\n <h1>\n <?php echo roots_title(); ?>\n </h1>\n</div>\n<?php endif; ?>\n" }, { "from": "gpt", "value":...
php
chosen
[ { "from": "system", "value": "Correct the hash tag test\n" }, { "from": "human", "value": "<?php\n\nif (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {\n print \"This script must be run from the command line\\n\";\n exit();\n}\n\ndefine('INSTALLDIR', realpath(dirname(__F...
php
chosen
[ { "from": "system", "value": "Add wait() to login test with wrong credentials to fix WebDriver test\n\n" }, { "from": "human", "value": "<?php\n\nuse tests\\_pages\\LoginPage;\n\n$I = new WebGuy($scenario);\n$I->wantTo('ensure that login works');\n\n$loginPage = LoginPage::openBy($I);\n\n$I->see...
php
chosen
[ { "from": "system", "value": "Use the new priority trait in the dummy middle ware\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace ApiClients\\Tests\\Foundation\\Middleware;\n\nuse ApiClients\\Foundation\\Middleware\\MiddlewareInterface;\nuse ApiClients\\Foundation...
php
chosen
[ { "from": "system", "value": "Use of @component for buttons in form\n" }, { "from": "human", "value": "@include('core::admin._buttons-form')\n\n{!! BootForm::hidden('id') !!}\n\n<div class=\"row\">\n\n @if ($model->id)\n <div class=\"col-sm-6 container-menulinks\">\n <p>\n ...
php
chosen
[ { "from": "system", "value": "Use facade for firing events\n" }, { "from": "human", "value": "<?php\n\nnamespace Adldap\\Laravel\\Traits;\n\nuse Adldap\\Models\\User;\nuse Adldap\\Laravel\\Events\\AuthenticatedWithWindows;\nuse Adldap\\Laravel\\Events\\DiscoveredWithCredentials;\nuse Adldap\\Lar...
php
chosen
[ { "from": "system", "value": "Fix cms_page field to have default value\n\nOtherwise when cms page is added via code it will fail with error 'Integrity constraint violation: 1048 Column 'show_in_navigation' cannot be null'" }, { "from": "human", "value": "<?php\n/**\n * Raguvis CmsNavigation\n */...
php
chosen
[ { "from": "system", "value": "Add more tests for GotoCommand\n" }, { "from": "human", "value": "<?php\n\nuse Ockcyp\\WpJsCli\\Command\\GotoCommand;\n\nclass GotoCommandTest extends PHPUnit_Framework_TestCase\n{\n public function setUp()\n {\n $this->gotoCommand = new GotoCommand;\n ...
php
chosen
[ { "from": "system", "value": "Remove rebajado label if product is out of stock\n" }, { "from": "human", "value": "<?php setup_postdata($post); ?>\n\n <figure class=\"product-wrap thumbnail\">\n <?php if ( fik_product_stock_quantity() == 0) { ?>\n <span class=\"label lab...
php
chosen
[ { "from": "system", "value": "Fix of the cosinue test for the negative rounding error.\n" }, { "from": "human", "value": "<?php\n\nuse Litipk\\BigNumbers\\Decimal as Decimal;\n\n/**\n * @group cos\n */\nclass DecimalCosTest extends PHPUnit_Framework_TestCase\n{\n public function cosProvider()...
php
chosen
[ { "from": "system", "value": "Test both functions in the stock object\n" }, { "from": "human", "value": "<?php\n\nnamespace MageTitans\\Workshop\\Domain\\Stock;\n\nuse PHPUnit\\Framework\\TestCase;\n\nfinal class StockTest extends TestCase\n{\n public function testGetInStock()\n {\n ...
php
chosen
[ { "from": "system", "value": "Use php array sugar syntax\n" }, { "from": "human", "value": "<?php\n\nnamespace Rezzza\\RestApiBehatExtension;\n\nabstract class ExpectationFailed extends \\Exception\n{\n abstract function getContextText();\n\n /**\n * Returns exception message with addi...
php
chosen
[ { "from": "system", "value": "Enable Twig and the ControllerServiceProvider\n" }, { "from": "human", "value": "<?php\n\nnamespace Flint;\n\nuse Flint\\Controller\\ControllerResolver;\n\n/**\n * @package Flint\n */\nclass Application extends \\Silex\\Application\n{\n /**\n * Assigns rootDi...
php
chosen
[ { "from": "system", "value": "Fix a PHP strict error\n" }, { "from": "human", "value": "<?php\n\nif (!function_exists('coalesce')) {\n\n /**\n * @return The first non null argument (or null)\n */\n function coalesce() {\n return array_shift(array_filter(func_get_args(), func...
php
chosen
[ { "from": "system", "value": "Add require statement to travis conf\n" }, { "from": "human", "value": "<?php\n// this is the default file\n// please copy to config.php and adjust carefully before executing tests\n// make sure to never set the constants to your production database (otherwise it wi...
php
chosen
[ { "from": "system", "value": "Fix enlace a manual certificación\n" }, { "from": "human", "value": "<h1><?=$title?></h1>\n<div id=\"navpanel\">\n<?php foreach ($nav as $link=>&$info): ?>\n <div class=\"pull-left\">\n <div class=\"icon\">\n <a href=\"<?=$_base,'/',$module,$lin...
php
chosen
[ { "from": "system", "value": "Fix typo in stream_get_contents() call\n" }, { "from": "human", "value": "<?php\n\nnamespace MongoDB\\Tests\\GridFS;\n\nuse MongoDB\\Collection;\nuse MongoDB\\GridFS\\Bucket;\nuse MongoDB\\Tests\\FunctionalTestCase as BaseFunctionalTestCase;\n\n/**\n * Base class fo...
php
chosen
[ { "from": "system", "value": "Fix deprecation warning regarding passing null to parameter of type int\n" }, { "from": "human", "value": "<?php\n\n/**\n * This file is part of the rybakit/msgpack.php package.\n *\n * (c) Eugene Leonovich <gen.work@gmail.com>\n *\n * For the full copyright and lic...
php
chosen
[ { "from": "system", "value": "Add new test case for adding object value\n" }, { "from": "human", "value": "<?php\n\nuse Benrowe\\Laravel\\Config\\Config;\n\n/**\n * Tests to ensure invalid data is not allowed into the config (data that can't be persisted)\n */\nclass InvalidConfigTest extends PH...
php
chosen
[ { "from": "system", "value": "CC-5781: Upgrade script for new storage quota implementation\n" }, { "from": "human", "value": "<?php\n\n// Define path to application directory\ndefined('APPLICATION_PATH')\n || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../../install_minimal/....
php
chosen
[ { "from": "system", "value": "Fix page module index view\n" }, { "from": "human", "value": "<?php\nnamespace Webaholicson\\Minimvc\\Page\\View;\n\n/**\n * Main page controller. Default view for the entire system.\n * \n * @author Antonio Mendes <webaholicson@gmail.com>\n */\nclass Index extends ...
php
chosen
[ { "from": "system", "value": "Update TreeBuilder construction (Compatibility SF4.2+)\n" }, { "from": "human", "value": "<?php\n/**\n * Project: notification-bundle\n * User: Leandro Luccerini <leandro.luccerini@gmail.com>\n * Date: 08/11/18\n * Time: 9.29\n */\n\nnamespace Mgilet\\NotificationBu...
php
chosen
[ { "from": "system", "value": "Add urldecode to query string class\n" }, { "from": "human", "value": "<?\n//Get query string because $_GET does not work with mod rewrite\n//This code should be rewritten at some point... It's ugly\n//\n//Multiple identical keys cannot be passed into pooch. This is...
php
chosen
[ { "from": "system", "value": "[CS] Fix invalid inheritdoc tags in many places\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 w...
php
chosen
[ { "from": "system", "value": "Use NotBlank validator for clearer error messages, allow admin to always submit blanks\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Form\\Type;\n\nuse App\\Entity\\Property;\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\nuse Symfo...
php
chosen
[ { "from": "system", "value": "Add a default filter parameter to API requests to exclude deleted records\n" }, { "from": "human", "value": "<?php\nnamespace Api\\V8\\Param\\Options;\n\nuse Api\\V8\\JsonApi\\Repository\\Filter as FilterRepository;\nuse Symfony\\Component\\OptionsResolver\\Options;...
php
chosen
[ { "from": "system", "value": "Add default config to service provider\n" }, { "from": "human", "value": "<?php\n\nnamespace Fuzz\\ApiServer\\Providers;\n\nuse Illuminate\\Contracts\\Events\\Dispatcher as DispatcherContract;\nuse Fuzz\\ApiServer\\Response\\ResponseFactory;\nuse Illuminate\\Support...
php
chosen
[ { "from": "system", "value": "Make class name transformer internal\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace Becklyn\\RadBundle\\Helper;\n\n\n/**\n * Helps with class name transformations\n */\nclass ClassNameTransformer\n{\n /**\n * Tries to map a mod...
php
chosen
[ { "from": "system", "value": "Fix typo in HTML normalization\n" }, { "from": "human", "value": "<?php\n\n/**\n * @copyright 2018 Vladimir Jimenez\n * @license https://github.com/stakx-io/stakx/blob/master/LICENSE.md MIT\n */\n\nnamespace allejo\\stakx\\Utilities;\n\nabstract class HtmlUtils\n{...
php
chosen
[ { "from": "system", "value": "[AllBundles] Mark classes extending twig final\n" }, { "from": "human", "value": "<?php\n\nnamespace Kunstmaan\\UtilitiesBundle\\Twig;\n\nuse Kunstmaan\\UtilitiesBundle\\Helper\\SlugifierInterface;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFilter;\n\nc...
php
chosen
[ { "from": "system", "value": "Build the *Tester classes before running tests.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Define Robo commands for building and testing Drupal User Registry Codeception module.\n *\n * @see http://robo.li/\n */\nclass RoboFile extends \\Robo\\Tasks\n{\n ...
php
chosen
[ { "from": "system", "value": "Add force slug functions back.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Custom login logo.\n *\n * @return void\n */\nadd_action('login_head', function()\n{\n\t$path = ADMIN_URL.'/images/admin-login-logo.png';\n\techo \"<style> h1 a { background-image:url...
php
chosen
[ { "from": "system", "value": "Fix function parameters to comply interface\n" }, { "from": "human", "value": "<?php\n\nnamespace App;\n\nuse App\\Appointment;\nuse App\\Business;\nuse Carbon\\Carbon;\n\nclass BookingStrategyTimeslot implements BookingStrategyInterface\n{\n public function make...
php
chosen
[ { "from": "system", "value": "Save a good 7 bytes\n" }, { "from": "human", "value": "<?php\n\n$router->group(['prefix' => 'v1'], function () use ($router) {\n $router->post('reverse', ['uses' => 'ApiController@reverse', 'as' => 'strings.reverse']);\n});" }, { "from": "gpt", "value...
php
chosen
[ { "from": "system", "value": "Add 'attendable' and 'visible' scopes for use on the front-end for limiting which teams are displayed\n" }, { "from": "human", "value": "<?php\n\nnamespace App;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\SoftDeletes;\n\nclass ...
php
chosen
[ { "from": "system", "value": "Add execute method so generate command can run.\n" }, { "from": "human", "value": "<?php\n\nnamespace FeatureBrowser\\FeatureBrowser\\Cli;\n\nuse Symfony\\Component\\Console\\Command\\Command as BaseCommand;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\n...
php
chosen
[ { "from": "system", "value": "Stop relying on array [] shorthand\n\nWe want to support PHP 5.3 for now\n" }, { "from": "human", "value": "<?php\n\nnamespace Lstr\\Silex\\Database;\n\nuse PHPUnit_Framework_TestCase;\nuse Silex\\Application;\n\nclass DatabaseServiceTest extends PHPUnit_Framework_T...
php
chosen
[ { "from": "system", "value": "Allow datetime components to omit time\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types = 1);\n\nnamespace Pages\\Components;\n\nuse Pages\\IViewable;\n\nfinal class DateTimeComponent implements IViewable{\n private int $datetime;\n \n public functi...
php
chosen
[ { "from": "system", "value": "Fix answer count for results module list\n" }, { "from": "human", "value": "<?\nrequire \"../../../lib.php\";\nrequire_once \"{$root}/lib/Twig/Autoloader.php\";\n\nTwig_Autoloader::register();\n$loader = new Twig_Loader_Filesystem(\"{$root}/admin/tpl/\");\n$twig = n...
php
chosen
[ { "from": "system", "value": "Check if is image returns true for now until is written\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: mirel\n * Date: 23.03.2015\n * Time: 15:45\n */\n\nnamespace mpf\\helpers;\n\n\nuse mpf\\base\\Helper;\n\nclass FileHelper extend...
php
chosen
[ { "from": "system", "value": "BAP-111: Implement basic filter functionality\n- implemented basic filters in DemoGridBundle\n" }, { "from": "human", "value": "<?php\n\nnamespace Acme\\Bundle\\DemoGridBundle\\Datagrid;\n\nuse Oro\\Bundle\\GridBundle\\Datagrid\\DatagridManager;\nuse Oro\\Bundle\\Gr...
php
chosen
[ { "from": "system", "value": "Change type to shipment in dispatching.\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass EcontDispatching extends Migration\n{\n /**\n * Run the migrations.\n ...
php
chosen
[ { "from": "system", "value": "Add id attribute to posts wrap\n\nThe same id is already added to posts wrap in other templates.\n" }, { "from": "human", "value": "<?php\ndeclare (strict_types = 1);\n\n\\Jentil()->utilities->loader->loadPartial('header');\n\n\\the_post(); ?>\n\n<div class=\"posts-...
php
chosen
[ { "from": "system", "value": "Allow cms authors to define a nice title on answers\n" }, { "from": "human", "value": "<?php\n\n/**\n * @package typeform\n */\nclass TypeformQuestion extends DataObject\n{\n \n private static $db = array(\n 'Reference' => 'Varchar(255)',\n 'Titl...
php
chosen
[ { "from": "system", "value": "Add a basic but still incomplete test for Email.\n" }, { "from": "human", "value": "<?PHP\n\n/**\n * An Email value object.\n *\n * This is inspired by the wowo Email Value Object\n * (https://gist.github.com/wowo/b49ac45b975d5c489214)\n *\n * @package Serendipity...
php
chosen
[ { "from": "system", "value": "Add missing docblocks for markdown engine\n" }, { "from": "human", "value": "<?php\nnamespace OpenCFP\\Markdown;\n\nuse \\Aptoma\\Twig\\Extension\\MarkdownEngineInterface;\nuse Ciconia\\Ciconia;\n\nclass CiconiaEngine implements MarkdownEngineInterface\n{\n prote...
php
chosen
[ { "from": "system", "value": "Add missing return type declaration to Push interface\n" }, { "from": "human", "value": "<?php\n\nnamespace Rhymix\\Framework\\Drivers;\n\n/**\n * The Push driver interface.\n */\ninterface PushInterface\n{\n\t/**\n\t * Create a new instance of the current Push driv...
php
chosen
[ { "from": "system", "value": "Fix parameter for action AuthRevoke\n" }, { "from": "human", "value": "<?php\n///////////////////////////////////////////////////////////////////////////////\n//\n// Copyright f-project.net 2010-present. All Rights Reserved.\n//\n// Licensed under the Apache Licens...
php
chosen
[ { "from": "system", "value": "Implement the job better - minor bugfix\n" }, { "from": "human", "value": "<?php\n/**\n * Composer Update checker job. Runs the check as a queuedjob.\n *\n * @author Peter Thaleikis\n * @license MIT\n */\nclass CheckComposerUpdatesJob extends AbstractQueuedJob imple...
php
chosen
[ { "from": "system", "value": "Add langue selector to router\n\nSigned-off-by: Roman Ondráček <6b7cbc66756660b4790b3af1ec1507653acaa035@centrum.cz>\n" }, { "from": "human", "value": "<?php\n\n/**\n * Copyright 2017 MICRORISC s.r.o.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Lic...
php
chosen
[ { "from": "system", "value": "Throw an exception when a collection is created missing a handler\n" }, { "from": "human", "value": "<?php\n\nnamespace Bolt\\Storage\\Collection;\n\nuse Bolt\\Storage\\EntityManager;\n\n/**\n * Collection Manager class\n *\n * @author Ross Riley <riley.ross@gmail.c...
php
chosen
[ { "from": "system", "value": "Remove trailing php close tag\n" }, { "from": "human", "value": "<?php\n$fields = get_fields($module->ID);\n$imageSrc = $fields['mod_image_image']['url'];\n\nif ($fields['mod_image_crop'] === true) {\n $imageSrc = wp_get_attachment_image_src(\n $fields['mo...
php
chosen
[ { "from": "system", "value": "Deploy on push, test 3\n" }, { "from": "human", "value": "<?php\n // Use in the \"Post-Receive URLs\" section of your GitHub repo.\n if ( $_POST['payload'] && false ) {\n file_put_contents('log/payload.txt', print_r($_POST['payload'], FILE_APPEND);\n\n ...
php
chosen
[ { "from": "system", "value": "Change use statement to ASFEntityManager\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of the Artscore Studio Framework package.\n *\n * (c) Nicolas Claverie <info@artscore-studio.fr>\n *\n * For the full copyright and license information, pleas...
php
chosen
[ { "from": "system", "value": "Fix typo in method name\n" }, { "from": "human", "value": "<?php\n\n/**\n * A singleton handle on the application configuration file.\n *\n * @author Saul Johnson\n * @since 09/07/2015\n */\nclass Configuration\n{\n private static $instance;\n private $config;...
php
chosen
[ { "from": "system", "value": "Simplify email link view widget generator.\n" }, { "from": "human", "value": "<?php\n/**\n * @author Igor Nikolaev <igor.sv.n@gmail.com>\n * @copyright Copyright (c) 2015, Darvin Studio\n * @link https://www.darvin-studio.ru\n *\n * For the full copyright an...
php
chosen
[ { "from": "system", "value": "Add avatar column to users table\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateUsersTable extends Migration\n{\n ...
php
chosen
[ { "from": "system", "value": "Reorder down() for migrate:refresh and migrate:rollback consistency\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass Scaffoldinterfaces extends Migration\n{\n /**\n...
php
chosen
[ { "from": "system", "value": "Index will now just return the player-view\n\nClient IP/MAC and Preview from HTTP-query is everything that the player needs.\r\n(If the requested client don´t exists, maybe it will become available later)" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http...
php
chosen
[ { "from": "system", "value": "Make exception interface actually throwable to be able to catch it\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace LazyProperty\\Exception;\n\n/**\n * Base Exception for LazyProperty\n * This marker interface can be used in a catch-...
php
chosen
[ { "from": "system", "value": "Remove space and add newline at end" }, { "from": "human", "value": "<?php\nnamespace Phroute;\n\ninterface HandlerResolverInterface {\n\t\n\t/**\n\t * Create an instance of the given handler.\n\t *\n\t * @param $handler\n\t * @return array\n\t */\n\t\n\tpublic func...
php
chosen
[ { "from": "system", "value": "Add support for Symfony 5 to process runner\n\nBrought up in #98.\n" }, { "from": "human", "value": "<?php\n\nnamespace Studio\\Shell;\n\nuse RuntimeException;\nuse Symfony\\Component\\Process\\Process;\n\nclass Shell\n{\n public static function run($task, $direc...
php
chosen
[ { "from": "system", "value": "Remove faker include to fix exception\n" }, { "from": "human", "value": "<?php\ndefined('BASEPATH') OR exit('No direct script access allowed');\nrequire_once '/vendor/fzaninotto/faker/src/autoload.php';\n\n/**\n * Author: Mark\n */\nclass Faker extends CI_Controller...
php
chosen
[ { "from": "system", "value": "Add missingParam method to exception class.\n" }, { "from": "human", "value": "<?php\n\nnamespace Telegram\\Bot\\Exceptions;\n\n/**\n * Class CouldNotUploadInputFile.\n */\nclass CouldNotUploadInputFile extends TelegramSDKException\n{\n /**\n * @param $file\n...
php
chosen
[ { "from": "system", "value": "Simplify standard input to allow redirection.\n" }, { "from": "human", "value": "<?php\n\nfunction rewriteHeader($headline, $oldTag, $newTag) {\n\tif (strpos($headline, $oldTag) === 0) {\n\t\t$data = substr($headline, strlen($oldTag));\n\t\t$data = str_replace('\"',...
php
chosen
[ { "from": "system", "value": "Fix exception message to work on Travis\n" }, { "from": "human", "value": "<?php\n\nnamespace MaxMind\\Test\\WebService\\Http;\n\nuse MaxMind\\WebService\\Http\\CurlRequest;\n\n// These tests are totally insufficient, but they do test that most of our\n// curl calls...
php
chosen
[ { "from": "system", "value": "Change show to fade effect on validation errors\n" }, { "from": "human", "value": "@if(isset($errors['original_url']) and count($errors['original_url']))\n $('.form-group-url')\n .addClass('has-error')\n .find('.alert')\n .html('{{ $errors['o...
php
chosen
[ { "from": "system", "value": "Use page-based pagination instead of cursor-based\n" }, { "from": "human", "value": "<?php\n\nnamespace ZfrShopify\\Iterator;\n\nuse Guzzle\\Service\\Command\\CommandInterface;\nuse Guzzle\\Service\\Resource\\ResourceIterator;\n\n/**\n * @author Daniel Gimenes\n */\...
php
chosen