conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Move development fixtures to Tests directory\n" }, { "from": "human", "value": "<?php\n\nnamespace Afup\\Bundle\\MemberBundle\\Tests\\DataFixtures\\ORM;\n\nuse Doctrine\\Common\\DataFixtures\\FixtureInterface;\nuse Doctrine\\Common\\Persistence\\ObjectManager;\n\nus...
php
chosen
[ { "from": "system", "value": "Repair php's giving error from BoradInfoController\n" }, { "from": "human", "value": "<?php\r\nclass BoardInfoController extends Controller {\r\n\t\r\n\tpublic function execute($request) {\r\n\t\ttry {\r\n\t\t\tparent::execute($request);\r\n\t\t\t\r\n\t\t\t$id = $re...
php
chosen
[ { "from": "system", "value": "Read config, in preparation for configurable behaviour\n" }, { "from": "human", "value": "<?php\n\n\t@ini_set('display_errors', 'off');\n\n\tdefine('DOCROOT', rtrim(realpath(dirname(__FILE__) . '/../../../'), '/'));\n\tdefine('DOMAIN', rtrim(rtrim($_SERVER['HTTP_HOS...
php
chosen
[ { "from": "system", "value": "Add function to convert wkt point to coordinates.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Implements convenient methods for conversion of JSON to and from WKT.\n */\n\nfunction json_to_wkt($json) {\n $geometry = json_decode($json)->{\"features\"}[0]->...
php
chosen
[ { "from": "system", "value": "Fix WP_SENTRY_VERSION already defined error\n" }, { "from": "human", "value": "<?php\n\n/*\n\tPlugin Name: WordPress Sentry\n\tPlugin URI: https://github.com/stayallive/wp-sentry\n\tDescription: A (unofficial) WordPress plugin to report PHP errors and JavaScript err...
php
chosen
[ { "from": "system", "value": "Refactor the repository generator so we can reuse its methods\n" }, { "from": "human", "value": "<?php\n\nnamespace ModuleGenerator\\CLI\\Console\\Generate\\Domain;\n\nuse ModuleGenerator\\CLI\\Console\\GenerateCommand;\nuse ModuleGenerator\\Domain\\Repository\\Repo...
php
chosen
[ { "from": "system", "value": "[Form] Allow setting different options to repeating fields" }, { "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 vie...
php
chosen
[ { "from": "system", "value": "Fix repository name, add helper funcion\n" }, { "from": "human", "value": "<?php\n\nnamespace Korobi\\WebBundle\\Repository;\n\nuse Doctrine\\ODM\\MongoDB\\DocumentRepository;\n\nclass ChannelConfigRepository extends DocumentRepository {\n\n}\n" }, { "from":...
php
chosen
[ { "from": "system", "value": "Prepend library/ to the include_path to help prevent testing other copies of the framework.\n\ngit-svn-id: b6e219894c353fb1d215c78b2075057d8daadfba@604 44c647ce-9c0f-0410-b52a-842ac1e357ba\n" }, { "from": "human", "value": "<?php\nif (!defined('PHPUnit2_MAIN_METHOD'...
php
chosen
[ { "from": "system", "value": "Clean up what we pass to the serializer\n\nNormalizers and encoders are different and should be passed in their own\nblocks. Symfony 4.2 deprecated passing both together.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Service;\n\nuse App\\Normalizer\\DTO...
php
chosen
[ { "from": "system", "value": "Add renderer for Composite_Cc getTemplateVars\n\nfixes Cc html component (which needs renderer)\n" }, { "from": "human", "value": "<?php\nclass Kwc_Abstract_Composite_Cc_Component extends Kwc_Chained_Cc_Component\n{\n public function getTemplateVars()\n {\n ...
php
chosen
[ { "from": "system", "value": "Add CACHE constant to Provider interface\n" }, { "from": "human", "value": "<?php\n\n/**\n * @package interface\n */\n/**\n * This interface is to be implemented by Extensions who wish to provide\n * objects for Symphony to use.\n *\n * @since Symphony 2.3.1\n */\ni...
php
chosen
[ { "from": "system", "value": "Update server site for osmlive reports\n" }, { "from": "human", "value": "<?php \nfunction startsWith($haystack, $needle)\n{\n $length = strlen($needle);\n return (substr($haystack, 0, $length) === $needle);\n}\n\n$c = new Memcached(); \n$c->addServer(\"loca...
php
chosen
[ { "from": "system", "value": "Fix php renderer binding not working\n" }, { "from": "human", "value": "<?php\n\nnamespace Nin\\Renderers;\n\nuse Nin\\Renderer;\n\nclass PhpRenderer extends Renderer\n{\n\tprotected $controller;\n\n\tpublic function __construct($controller)\n\t{\n\t\t$this->control...
php
chosen
[ { "from": "system", "value": "[CatalogPromotion] Remove final from catalog promotion updated event\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 LI...
php
chosen
[ { "from": "system", "value": "Update Sami theme as default.\n" }, { "from": "human", "value": "<?php\n\nuse Sami\\Sami;\nuse Sami\\Version\\GitVersionCollection;\nuse Symfony\\Component\\Finder\\Finder;\n\n$iterator = Finder::create()\n ->files()\n ->name('*.php')\n ->exclude('Resources...
php
chosen
[ { "from": "system", "value": "Fix navigation ACL issue when db is not initialized\n" }, { "from": "human", "value": "<?php\n/**\n * Zend Framework (http://framework.zend.com/)\n *\n * @link http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository\n * @copy...
php
chosen
[ { "from": "system", "value": "Clean up: Remove unused property and function call parameter\n\nIntroduced in 1058f244fe6b478a26b02bef8100b943a0cb76d7, the implementation was changed in 2c129ef69a3d408973be66ac85309514355e95b4, however, the now superfluous property and function call parameter were not removed...
php
chosen
[ { "from": "system", "value": "Change team method to teams method for convention consistency\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Application Routes\n|--------------------------------------------------------...
php
chosen
[ { "from": "system", "value": "Reorder inputs and use unsignedInteger() in migration\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass ChangeDominionsWizard...
php
chosen
[ { "from": "system", "value": "Fix BC with setCode -> setStatusCode\n" }, { "from": "human", "value": "<?php\n/**\n * @author Patsura Dmitry http://github.com/ovr <talk@dmtry.me>\n */\n\nnamespace RestApp\\Api\\Controller;\n\nuse Exception;\nuse ReflectionExtension;\n\n/**\n * Class IndexControll...
php
chosen
[ { "from": "system", "value": "[API] Add missing inStock field to swagger\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Sylius\\Bundle\\ApiBundle\\Swagger;\n\nuse Symfony\\Component\\Serializer\\Normalizer\\NormalizerInterface;\n\n/** @experimental */\nfinal cl...
php
chosen
[ { "from": "system", "value": "Fix markup on XHtml Outlet" }, { "from": "human", "value": "<html>\n\t<style>\n\t\tbody\n\t\t{\n\t\t\tfont-family: Verdana, Arial, Sans-Serif;\n\t\t\tfont-size: 95%;\n\t\t\twidth: 500px;\n\t\t\tmargin: 10px auto;\n\t\t}\n\t</style>\n\t<title>\n\t\t<?php echo $page_d...
php
chosen
[ { "from": "system", "value": "Remove unnecessary issurer test code\n" }, { "from": "human", "value": "<?php\n\nnamespace UoMCS\\OpenBadges\\Backend;\n\nclass IssuerTest extends \\PHPUnit_Framework_TestCase\n{\n public function testConstructor()\n {\n $data = array(\n 'id' => null,\n ...
php
chosen
[ { "from": "system", "value": "Add the signature for compose()\n" }, { "from": "human", "value": "<?php\n\nnamespace F;\n\nfunction curry($f, array $args)\n{\n $meta = new \\ReflectionFunction($f);\n return curryN($meta->getNumberOfParameters(), $f, $args);\n}\n\nfunction curryN($arity, $f,...
php
chosen
[ { "from": "system", "value": "Use proper syntax for User-Agent header\n" }, { "from": "human", "value": "<?php\n\nnamespace Kyranb\\Footprints;\n\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Facades\\Cookie;\nuse Illuminate\\Support\\Str;\n\nclass Footprinter implements FootprinterI...
php
chosen
[ { "from": "system", "value": "Switch to new ACF format\n" }, { "from": "human", "value": "<?php namespace Leean\\Endpoints\\Inc;\n\nuse Leean\\Acf\\All as Acf;\n\n/**\n * Class Content\n *\n * @package Leean\\Endpoints\\Inc\n */\nclass Content\n{\n\t/**\n\t * Get the content\n\t *\n\t * @param I...
php
chosen
[ { "from": "system", "value": "Use Line::EOL for line detection\n" }, { "from": "human", "value": "<?php\n\nnamespace WyriHaximus\\React\\ChildProcess\\Messenger;\n\n/**\n * @todo code smell with $source\n */\ntrait OnDataTrait\n{\n /**\n * @var string[]\n */\n protected $buffers = ...
php
chosen
[ { "from": "system", "value": "Fix for spaces in user queries\n" }, { "from": "human", "value": "<?php\n\nnamespace Scriptotek\\Alma\\Users;\n\nuse Scriptotek\\Alma\\ResourceList;\n\nclass Users extends ResourceList\n{\n protected $resourceName = User::class;\n\n /**\n * Iterates over a...
php
chosen
[ { "from": "system", "value": "Change Ip address in website file\n\nIp Addresss" }, { "from": "human", "value": "<?php\n\ndefine(\"DB_Hostname\", \"148.72.232.125\");\n\t\tdefine(\"DB_Username\", \"studio_gsp2015\");\n\t\tdefine(\"DB_Password\", \"Studio@123\");\n\t\tdefine(\"DB_databasename\", \...
php
chosen
[ { "from": "system", "value": "Set 'required' to true in inflate\n" }, { "from": "human", "value": "<?php\n\tnamespace Bolt\\Api\\Request;\n\n\tuse Bolt\\Base;\n\tuse Bolt\\Arrays;\n\tuse function Cruxoft\\dump;\n\n\tclass InputMask extends Base\n\t{\n\t\tpublic $name;\n\t\tpublic $type;\n\t\tpub...
php
chosen
[ { "from": "system", "value": "Fix format constant for PHP 7.1\n" }, { "from": "human", "value": "<?php namespace Limoncello\\Flute\\Types;\n\n/**\n * Copyright 2015-2017 info@neomerx.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file excep...
php
chosen
[ { "from": "system", "value": "Add a real prime number test\n" }, { "from": "human", "value": "<?php\n\nnamespace Calendar\\Controller;\n \nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Scarlett\\Controller\\Controller;\nuse Calendar\\Mod...
php
chosen
[ { "from": "system", "value": "Add inflection of package names for TYPO3 Flow / Neos. Closes GH-56.\n" }, { "from": "human", "value": "<?php\nnamespace Composer\\Installers;\n\n/**\n * An installer to handle TYPO3 Flow specifics when installing packages.\n */\nclass TYPO3FlowInstaller extends Bas...
php
chosen
[ { "from": "system", "value": "Format time and date according to WordPress settings.\n\nRemoved the hardcoded time formatting, to make the theme honor the time and date settings set in the WordPress Admin" }, { "from": "human", "value": "<?php\nif(!function_exists('FoundationPress_entry_meta')) :...
php
chosen
[ { "from": "system", "value": "Rename private variable to $handler" }, { "from": "human", "value": "<?php\n\nnamespace Lily\\Application;\n\nclass MiddlewareApplication\n{\n private $application;\n private $middleware;\n\n public function __construct(array $pipeline)\n {\n $thi...
php
chosen
[ { "from": "system", "value": "Fix for PSR2 spacing around foreach keyword\n" }, { "from": "human", "value": "<?php\n\nnamespace League\\Event;\n\nclass BufferedEmitter extends Emitter\n{\n /**\n * @var EventInterface[]\n */\n protected $bufferedEvents = [];\n\n /**\n * @inhe...
php
chosen
[ { "from": "system", "value": "Correct variables, and have it add to number given in get request." }, { "from": "human", "value": "<html>\n<head>\n<title>Number Counter</title>\n</head>\n<body>\n<?php\n\n $date = $_GET['date'];\n \n\tif (!isset($num)) die(\"Give me a number boo\");\n\tif ($num ...
php
chosen
[ { "from": "system", "value": "Include services and pass to bootstrapper\n" }, { "from": "human", "value": "<?php\n// Path constants\ndefine('DS', DIRECTORY_SEPARATOR);\ndefine('PS', PATH_SEPARATOR);\ndefine('BP', dirname(__FILE__));\n\n// Display errors\nini_set('display_errors', 1);\n\n// Set e...
php
chosen
[ { "from": "system", "value": "Fix inclusion when embedding the file from outside world." }, { "from": "human", "value": "<?php include(\"lib/index.php\");\r\n\r\n//Load layout for displaying single image\r\nif($layout->isImage()) {\r\n\t$f = \"themes/\".$layout->getTheme().\"/single.php\";\r\n\r...
php
chosen
[ { "from": "system", "value": "Make pagination wrappers conditional for author template\n" }, { "from": "human", "value": "<?php\n\nget_header();\n\nif (!is_front_page()) :\n\n if (have_posts()) :\n\n ?>\n <div class=\"container\">\n <div id=\"primary\" class=\"content...
php
chosen
[ { "from": "system", "value": "Annotate $app type in front controller\n" }, { "from": "human", "value": "<?php\n\n$app = require_once __DIR__ . '/app/load.php';\n\n$app->run();\n" }, { "from": "gpt", "value": "<?php\n\n/** @var \\Bolt\\Application $app */\n$app = require_once __DIR__ ...
php
chosen
[ { "from": "system", "value": "Make create tag group more compatible with older laravel\n" }, { "from": "human", "value": "<?php\n\nnamespace Conner\\Tagging\\Console\\Commands;\n\nuse Conner\\Tagging\\TaggingUtility;\nuse Conner\\Tagging\\Model\\TagGroup;\nuse Illuminate\\Console\\Command;\n\ncl...
php
chosen
[ { "from": "system", "value": "Make get permissions protected static (probably updated package)\n" }, { "from": "human", "value": "<?php\n\nnamespace Despark\\Cms\\Models;\n\nuse Despark\\Cms\\Admin\\Traits\\AdminModelTrait;\nuse Spatie\\Permission\\Models\\Role as RoleModel;\n\nclass Role extend...
php
chosen
[ { "from": "system", "value": "Fix the Habari Trac link so it doesn't include a hardcoded date.\n" }, { "from": "human", "value": "<?php if ( !defined( 'HABARI_PATH' ) ) { die('No direct access'); } ?>\n<div id=\"social-icons\" class=\"\">\n\t\n\t<div class=\"wrap\">\n\t\n\t\t<a href=\"https://gi...
php
chosen
[ { "from": "system", "value": "Add third person declarative to phpdoc" }, { "from": "human", "value": "<?php namespace php\\decoratorPattern;\n\nclass Keyboard extends HardwareDecorator{\n\tprotected $hardware;\n\n\tpublic function __construct(Hardware $hardware){\n\t\t$this->hardware = $hardwar...
php
chosen
[ { "from": "system", "value": "Remove logs and useless variables\n\ngit-svn-id: 67b257ddc67a36dd158497794aa97a8ea033a564@929598 b8457f37-d9ea-0310-8a92-e5e31aec5664\n" }, { "from": "human", "value": "<?php\r\n/*\r\nPlugin Name: TypoFR\r\nPlugin URI: https://github.com/borisschapira/typofr\r\nDesc...
php
chosen
[ { "from": "system", "value": "BAP-12479: Create new widget controller buttonsAction\n- Removed unnecessary options.\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\ActionBundle\\Controller;\n\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Route;\nuse Sensio\\Bundle\...
php
chosen
[ { "from": "system", "value": "Convert model not found exceptions to 404 not found exceptions.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Exceptions;\n\nuse Exception;\nuse Illuminate\\Http\\Response;\nuse Illuminate\\Validation\\ValidationException;\nuse Illuminate\\Auth\\Access\...
php
chosen
[ { "from": "system", "value": "Implement new methods for entify phone verified\n" }, { "from": "human", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * PhoneVerified\n */\nclass PhoneVerified\n{\n /**\n * @var in...
php
chosen
[ { "from": "system", "value": "Fix error on discussion page\n" }, { "from": "human", "value": "<?php namespace Flarum\\Extend;\n\nuse Illuminate\\Foundation\\Application;\nuse Closure;\n\nclass Relationship implements ExtenderInterface\n{\n protected $parent;\n\n protected $type;\n\n pro...
php
chosen
[ { "from": "system", "value": "Update formmodel with plain using case\n" }, { "from": "human", "value": "<?php\n\nnamespace Kregel\\FormModel;\n\nclass FormModel\n{\n public static function using($string)\n {\n switch ($string) {\n case 'bootstrap':\n return...
php
chosen
[ { "from": "system", "value": "Fix Audio component parameter issue.\n" }, { "from": "human", "value": "<?php\n\n/**\n * @file\n * An Apple News Document Music.\n */\n\nnamespace ChapterThree\\AppleNews\\Document\\Components;\n\n/**\n * An Apple News Document Music.\n */\nclass Music extends Audio...
php
chosen
[ { "from": "system", "value": "Add check for valid location\n" }, { "from": "human", "value": "<?php\n\nnamespace PoGoPHP\\Location;\n\nuse GuzzleHttp\\Exception\\GuzzleException;\nuse PoGoPHP\\Http\\HttpClientAwareInterface;\nuse PoGoPHP\\Http\\HttpClientAwareTrait;\n\nclass LocationSearcher imp...
php
chosen
[ { "from": "system", "value": "Read flags before standard input\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\n\nrequire __DIR__ . '/vendor/autoload.php';\n\n$jql = file_get_contents('php://stdin');\n\n$flags = new donatj\\Flags;\n$drop =& $flags->bool('drop', false,...
php
chosen
[ { "from": "system", "value": "Add response types for controllers and an option to not include the header and footer.\n" }, { "from": "human", "value": "<?php\n\nob_start();\n\n/**\n * Initialize some variables\n */\n$view_data = array();\n$title = '';\n$description = '';\n$css_files = array('hea...
php
chosen
[ { "from": "system", "value": "Load config file from root in /src or /\n" }, { "from": "human", "value": "<?php\nnamespace MongoMonitoring;\n\nrequire dirname(__DIR__) . '/vendor/autoload.php';\n\nuse Icicle\\Awaitable;\nuse Icicle\\Coroutine;\nuse Icicle\\Loop;\nuse Icicle\\Socket;\nuse Icicle\\...
php
chosen
[ { "from": "system", "value": "Add comment block to unit helper method\n" }, { "from": "human", "value": "<?php namespace Worldpay;\n\nclass Translate {\n\n /**\n * Set Test Mode\n *\n * Convert WorldPay environment from string to integer\n *\n * @var $input string\n * @return intege...
php
chosen
[ { "from": "system", "value": "Add the CreateServiceCommand to the Menu\n" }, { "from": "human", "value": "<?php\n\n/**\n * Copyright 2017 SURFnet B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n ...
php
chosen
[ { "from": "system", "value": "Use proper PSR4 in example" }, { "from": "human", "value": "<?php\n\nclass ExampleCPT extends LRCPT{\n\n public $name;\n public $labels = array('name' => 'Blaa');\n\n public $args = array();\n\n public $metaboxes = array();\n\n /**\n * Call the par...
php
chosen
[ { "from": "system", "value": "Add test for __get magic method in Locality class\n" }, { "from": "human", "value": "<?php\n\nuse Galahad\\LaravelAddressing\\Country;\nuse Galahad\\LaravelAddressing\\Locality;\n\n/**\n * Class LocalityTest\n *\n * @author Junior Grossi <juniorgro@gmail.com>\n */\n...
php
chosen
[ { "from": "system", "value": "Set default timezone for unit tests\n" }, { "from": "human", "value": "<?php\nset_include_path(dirname(__FILE__) . '/../' . PATH_SEPARATOR . get_include_path());\n\nrequire_once 'Slim/Slim.php';\n\n// Register Slim's autoloader\n\\Slim\\Slim::registerAutoloader();\n...
php
chosen
[ { "from": "system", "value": "TASK: Add test fixture for nullable fully qualified class property" }, { "from": "human", "value": "<?php\nnamespace Neos\\Flow\\Tests\\Functional\\Reflection\\Fixtures\\Model;\n\n/*\n * This file is part of the Neos.Flow package.\n *\n * (c) Contributors of the Neo...
php
chosen
[ { "from": "system", "value": "Change success message text-language to german\n" }, { "from": "human", "value": "<?php\n// Check for empty fields\nif(empty($_POST['name']) \t\t||\n empty($_POST['email']) \t\t||\n empty($_POST['phone']) \t\t||\n empty($_POST['message'])\t||\n !filter_var(...
php
chosen
[ { "from": "system", "value": "Make the thing work, for now\n" }, { "from": "human", "value": "<?php\n\nnamespace Mini\\Model\\TypeCrawler;\n\nuse \\Mini\\Model\\TypeCrawler\\Storage\\StorageFactory;\n\nclass TypeCrawlerController {\n /** @var array */\n private $crawlers;\n /** @var Sto...
php
chosen
[ { "from": "system", "value": "Test return in create() method" }, { "from": "human", "value": "<?php\r\n\r\nnamespace Uploadify;\r\n\r\nuse Illuminate\\Contracts\\Filesystem\\Factory as Storage;\r\nuse Illuminate\\Http\\UploadedFile;\r\nuse Intervention\\Image\\Image as InterventionImage;\r\nuse ...
php
chosen
[ { "from": "system", "value": "Fix toastr npm asset path\n" }, { "from": "human", "value": "<?php\n\nnamespace CottaCush\\Yii2\\Assets;\n\n/**\n * Class ToastrAsset\n * Asset for Toastr.js\n * @author Olajide Oye <jide@cottacush.com>\n * @package CottaCush\\Yii2\\Assets\n */\nclass ToastrAsset ex...
php
chosen
[ { "from": "system", "value": "Rename the interface for workflow runners\n" }, { "from": "human", "value": "<?php namespace Cerbero\\Workflow;\n\n/**\n * Interface for classes that run workflow.\n *\n * @author\tAndrea Marco Sartori\n */\ninterface WorkflowRunnerInterface {\n\n\t/**\n\t * Set the...
php
chosen
[ { "from": "system", "value": "Add support for creating and deleting variables\n" }, { "from": "human", "value": "<?php\nrequire_once('Autoload.php');\n\nclass TicketSystemSettings extends Singleton\n{\n protected $cache;\n protected $datatable;\n\n protected function __construct()\n ...
php
chosen
[ { "from": "system", "value": "Change version link to the project homepage\n" }, { "from": "human", "value": "<!-- Main Footer -->\n<footer class=\"main-footer\">\n\t<!-- To the right -->\n\t<div class=\"pull-right hidden-xs\">\n\t\t<a href=\"?page=about\">\n\t\t<strong>Version</strong> <?php ech...
php
chosen
[ { "from": "system", "value": "Fix \"Unused method, property, variable or parameter \"\n" }, { "from": "human", "value": "<?php\n\nnamespace Wanjee\\Shuwee\\AdminBundle\\Menu;\n\nuse Knp\\Menu\\FactoryInterface;\nuse Symfony\\Component\\EventDispatcher\\EventDispatcherInterface;\nuse Wanjee\\Shuw...
php
chosen
[ { "from": "system", "value": "Fix testing expected exception in php 5.4\n\n" }, { "from": "human", "value": "<?php\n\nnamespace Edge\\QA;\n\nclass ConfigTest extends \\PHPUnit_Framework_TestCase\n{\n public function testLoadDefaultConfig()\n {\n $config = new Config();\n asse...
php
chosen
[ { "from": "system", "value": "T7646: Fix buildplan ac on Herald.\n\nSummary: Fixes T7646.\n\nTest Plan: Repeat steps described in T7646 and expect disabled build plans not displayed.\n\nReviewers: epriestley, #blessed_reviewers\n\nReviewed By: epriestley, #blessed_reviewers\n\nSubscribers: Korvin, epriestle...
php
chosen
[ { "from": "system", "value": "Update PHP parser to add file extension\n" }, { "from": "human", "value": "<?php\nnamespace Nueve\\ViewPresenter;\n\n/**\n * PhpParser\n */\nclass PhpParser implements ParserInterface\n{\n private $templateDirectory;\n private $fileExt = '.php';\n\n public ...
php
chosen
[ { "from": "system", "value": "Fix wording for remote shares in settings page\n" }, { "from": "human", "value": "<div class=\"section\" id=\"fileSharingSettings\" >\n\n\t<h2><?php p($l->t('File Sharing'));?></h2>\n\n\t<input type=\"checkbox\" name=\"outgoing_server2server_share_enabled\" id=\"out...
php
chosen
[ { "from": "system", "value": "Change timestamps columns to protected" }, { "from": "human", "value": "<?php namespace Maatwebsite\\Usher\\Traits;\n\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Maatwebsite\\Usher\\Domain\\Shared\\Embeddables\\CreatedAt;\nuse Maatwebsite\\Usher\\Domain\\Shared\\Embedd...
php
chosen
[ { "from": "system", "value": "Add item maintenance in progess\n" }, { "from": "human", "value": "<?php\r\n\r\nclass Tasks extends MY_Model {\r\n \r\n public function __construct() {\r\n parent::__construct('tasks', 'id');\r\n }\r\n}\r\n\r\n" }, { "from": "gpt", "value...
php
chosen
[ { "from": "system", "value": "Attach prefix path resolver at end of chain of aggregate resolver\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 * @copyright ...
php
chosen
[ { "from": "system", "value": "Allow other docroots in documentation router\n" }, { "from": "human", "value": "<?php\n\n$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n$file = basename($path);\n\nif (false !== strpos($file, '.')) {\n return false;\n}\n\n$content = @file_get_contents...
php
chosen
[ { "from": "system", "value": "Fix for asset log incorrectly using soft deletes\n" }, { "from": "human", "value": "<?php\n\nclass Actionlog extends Eloquent\n{\n\tuse SoftDeletingTrait;\n protected $dates = ['deleted_at'];\n\n protected $table = 'asset_logs';\n public $timestamps = false...
php
chosen
[ { "from": "system", "value": "Allow running Diviner on Windows\n\nSummary: Also print error if libphutil is not found.\n\nTest Plan: Ran it on Windows twice.\n\nReviewers: epriestley\n\nReviewed By: epriestley\n\nCC: aran, Korvin\n\nDifferential Revision: https://secure.phabricator.com/D6504\n" }, { ...
php
chosen
[ { "from": "system", "value": "Remove forgoten pieces of configuration, which not in use anymore.\n" }, { "from": "human", "value": "<?php\nreturn [\n \\Sarcofag\\View\\Renderer\\RendererInterface::class =>\n DI\\get('Renderer'),\n\n \\Sarcofag\\View\\Renderer\\PsrHttpRendererInterfa...
php
chosen
[ { "from": "system", "value": "Fix `migrate:reset` args as it doesn't accept --step\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Cortex\\Foundation\\Console\\Commands;\n\nuse Illuminate\\Console\\Command;\n\nclass RollbackCommand extends Command\n{\n /**\n ...
php
chosen
[ { "from": "system", "value": "Add en_GB mobile phone number option\n" }, { "from": "human", "value": "<?php\n\nnamespace Faker\\Provider\\en_GB;\n\nclass PhoneNumber extends \\Faker\\Provider\\PhoneNumber\n{\n protected static $formats = array(\n '+44(0)##########',\n '+44(0)###...
php
chosen
[ { "from": "system", "value": "Set default username, realname, email for UHD\n" }, { "from": "human", "value": "<?php\n\nfinal class PhutilAuthAdapterRemoteUser extends PhutilAuthAdapter {\n\n public function getProviderName() {\n return pht('Uni Heidelberg - UniID');\n }\n\n public functio...
php
chosen
[ { "from": "system", "value": ":zap: Use generator even if `$that` is an array\n" }, { "from": "human", "value": "<?php\n/**\n * Copyright (c) 2017 shogogg <shogo@studiofly.net>\n *\n * This software is released under the MIT License.\n * http://opensource.org/licenses/mit-license.php\n */\ndecla...
php
chosen
[ { "from": "system", "value": "Change class cache extension in dev env\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\Debug\\Debug;\n\n// If you don't want to setup permissions the proper way, just uncomment the following PHP ...
php
chosen
[ { "from": "system", "value": "Add API route for pbbg.site\n" }, { "from": "human", "value": "<?php\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Routing\\Router;\n\n/** @var Router $router */\n$router->group(['prefix' => 'v1'], function (Router $router) {\n\n $router->...
php
chosen
[ { "from": "system", "value": "Update spec to use real class, DateTime comes back as false size.\n" }, { "from": "human", "value": "<?php\n\nnamespace spec\\Elfiggo\\Brobdingnagian\\Detector;\n\nuse PhpSpec\\Event\\SpecificationEvent;\nuse PhpSpec\\Loader\\Node\\SpecificationNode;\nuse PhpSpec\\O...
php
chosen
[ { "from": "system", "value": "Change reminder interval to 2 hours\n" }, { "from": "human", "value": "<?php\n\nuse \\Moat\\Models;\n\n/**\n * \n * \n * @author Tyler Menezes <tylermenezes@gmail.com>\n * @copyright Copyright (c) Tyler Menezes. Released under the BSD license.\n *\n */\nclass...
php
chosen
[ { "from": "system", "value": "Use array_reduce() to generate pipeline of callbacks.\n" }, { "from": "human", "value": "<?php\n\nnamespace estvoyage\\statsd;\n\nuse\n\testvoyage\\statsd\\world as statsd\n;\n\nclass packet implements statsd\\packet\n{\n\tprivate\n\t\t$metrics\n\t;\n\n\tfunction __...
php
chosen
[ { "from": "system", "value": "Fix build on PHP 7" }, { "from": "human", "value": "<?php\n\n/**\n * @license http://opensource.org/licenses/mit-license.php MIT\n * @link https://github.com/nicoSWD\n * @since 0.3.4\n * @author Nicolas Oelgart <nico@oelgart.com>\n */\nnamespac...
php
chosen
[ { "from": "system", "value": "Add buzzapi_job create reason text to the breakdown\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Nova\\Metrics;\n\nuse App\\Models\\User;\nuse Illuminate\\Http\\Request;\nuse Laravel\\Nova\\Metrics\\Partition;\nuse Laravel\\...
php
chosen
[ { "from": "system", "value": "Add new plugin hooks in view switcher\n\n" }, { "from": "human", "value": "<ul class=\"views\">\n <li <?= $this->app->checkMenuSelection('ProjectOverviewController') ?>>\n <?= $this->url->icon('eye', t('Overview'), 'ProjectOverviewController', 'show', arra...
php
chosen
[ { "from": "system", "value": "Use new progressba interface, fixed console error, changed severity to notice, fixed error which caused empty urls to get fetched\n" }, { "from": "human", "value": "<?php namespace Crawler\\Flickr;\n\nuse Crawler\\Crawler;\nuse Console\\Console;\nuse Console\\Progre...
php
chosen
[ { "from": "system", "value": "Revert \"Start indices at zero.\"\nWrong Branch\n\nThis reverts commit fc5e21b30f4084a5375647049ddd76ae76c6f31b.\n" }, { "from": "human", "value": "<?php\n\n//determine graph size\n\n$count = 20;\n\nif (isset($_GET[\"size\"])) {\n $size = $_GET[\"size\"];\n\n if (...
php
chosen
[ { "from": "system", "value": "Remove unnecessary provider stuff from tests\n" }, { "from": "human", "value": "<?php\n\nnamespace Donquixote\\Nicetrace\\Tests;\n\nuse Donquixote\\Nicetrace\\Util\\NicetraceUtil;\n\nclass NicetraceTest extends \\PHPUnit_Framework_TestCase {\n\n /**\n * @dataProv...
php
chosen
[ { "from": "system", "value": "Add mobile-web-app-capable meta to head\n" }, { "from": "human", "value": " <!DOCTYPE html> \n\n<html>\n<head>\n<?php include('functions.php')?>\n<title>Title</title>\n\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n<link href=\"<?php e...
php
chosen
[ { "from": "system", "value": "Remove the use of `__DIR__` constant.\n" }, { "from": "human", "value": "<?php\n\nnamespace SerendipityHQ\\Bundle\\QueuesBundle;\n\nuse Doctrine\\Bundle\\DoctrineBundle\\DependencyInjection\\Compiler\\DoctrineOrmMappingsPass;\nuse SerendipityHQ\\Bundle\\QueuesBundle...
php
chosen
[ { "from": "system", "value": "Use traits and MBID value in the model of an area.\n" }, { "from": "human", "value": "<?php\n\nnamespace MusicBrainz\\Value;\n\n/**\n * An area\n */\nclass Area\n{\n /**\n * The MusikBrainz Identifier for the area\n *\n * @var string\n */\n pri...
php
chosen