conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "FIX return format of client\n\nFixed a bug which ignored the 'fmt' parameter. Therefore the response of this interface were always json." }, { "from": "human", "value": "<?php\n\nnamespace xeased\\giphy;\n\n/**\n * The Client sends the request to the giphy api. If n...
php
chosen
[ { "from": "system", "value": "Fix list of posts breaking\n" }, { "from": "human", "value": "<div id=\"confirm-delete\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-body\">\n <p>Are you su...
php
chosen
[ { "from": "system", "value": "Fix Catchable fatal error en objetos null al llamar a __toString()\n" }, { "from": "human", "value": "<?php\nfunction imc_parse_text($str,$obj){\n preg_match_all(\"|%(.*)%|U\", $str, $match, PREG_PATTERN_ORDER);\n foreach($match[1] AS $field){\n if(!isset($obj[...
php
chosen
[ { "from": "system", "value": "Prepare PasswordUpgraderInterface implementations for 6.0 signatures\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 informati...
php
chosen
[ { "from": "system", "value": "Add opt-in checkbox to session form.\n" }, { "from": "human", "value": " {{ Form::label('first_name', 'First Name') }}\n {{ form_error('first_name', $errors) }}\n {{ Form::text('first_name', null, ['placeholder' => 'What\\'s your name?']) }}\n\n {{ Form::label('...
php
chosen
[ { "from": "system", "value": "Fix Update Script: clear view cache correctly if memcache isn't used\n" }, { "from": "human", "value": "<?php\nclass Kwf_Update_20150728Legacy38017 extends Kwf_Update\n{\n protected $_tags = array('kwc');\n\n public function update()\n {\n //clear al...
php
chosen
[ { "from": "system", "value": "Add basic getting started test\n" }, { "from": "human", "value": "<?php\n\nnamespace Elastica\\Test;\n\nuse Elastica\\Client;\nuse Elastica\\Document;\nuse Elastica\\Test\\Base as BaseTest;\n\n/**\n * Tests the example code\n */\nclass ExampleTest extends BaseTest\n...
php
chosen
[ { "from": "system", "value": "Update the main database seeder class\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Bens Penhorados, an undergraduate capstone project.\n *\n * (c) Fábio Santos <ffsantos92@gmail.com>\n *\n * For the full copyright and license information, ...
php
chosen
[ { "from": "system", "value": "Update dynamic IFrame size support settings.\n" }, { "from": "human", "value": "<!-- <<< IFrame Resize Attributes -->\n<script src=\"iframeResizer/iframeResizer.min.js\"></script>\n<script type=\"text/javascript\">\n iFrameResize({\n log: false, ...
php
chosen
[ { "from": "system", "value": "Add subscribe() test to PubNub\n" }, { "from": "human", "value": "<?php namespace duxet\\Tests\\Realtime\\Connections; \n\nuse duxet\\Realtime\\Connections\\PubNubConnection;\nuse duxet\\Tests\\Realtime\\TestCase;\nuse Mockery;\n\nclass PubNubConnectionTest extends ...
php
chosen
[ { "from": "system", "value": "Make disp_options() definitnion more concise" }, { "from": "human", "value": "/**\n * Turns an array into an HTML seletion box for use in a form\n * @param $options keys are values for the option elements; values are what gets displayed\n * @param $default if this m...
php
chosen
[ { "from": "system", "value": "Check for mime type and not extension\n" }, { "from": "human", "value": "<?php\nnamespace AssetManager\\Service;\n\nuse PHPUnit_Framework_TestCase;\n\nclass MimeResolverTest extends PHPUnit_Framework_TestCase\n{\n public function testGetMimeType()\n {\n ...
php
chosen
[ { "from": "system", "value": "Test exception on queue plugin manager validation\n" }, { "from": "human", "value": "<?php\n\nnamespace SlmQueueTest\\Queue;\n\nuse PHPUnit_Framework_TestCase as TestCase;\nuse SlmQueueTest\\Util\\ServiceManagerFactory;\nuse Zend\\ServiceManager\\ServiceManager;\n\n...
php
chosen
[ { "from": "system", "value": "Fix typo and parse error\n" }, { "from": "human", "value": "<?php\n/**\n * Custom translation strings for Cambio Rural\n */\n$spanish = array(\n\t\t\t\t # 15: change tags to palabras claves\n\t\t\t\t 'tag' => 'palabra clave',\n\t\t\t\t 'tags' => 'Palabras c...
php
chosen
[ { "from": "system", "value": "Update Feed Story page for newPage\n\nSummary: Cleans up Feed Story individual page\n\nTest Plan: View an individual story by clicking on date.\n\nReviewers: epriestley\n\nReviewed By: epriestley\n\nSubscribers: Korvin\n\nDifferential Revision: https://secure.phabricator.com/D1...
php
chosen
[ { "from": "system", "value": "Implement webservice which returns a project according to the projects id\n" }, { "from": "human", "value": "<?php\n\nnamespace fennecweb\\ajax\\details;\n\nuse \\PDO as PDO;\n\n/**\n * Web Service.\n * Returns a project according to the project ID.\n */\nclass Proj...
php
chosen
[ { "from": "system", "value": "Add program name to system-wide variables\n\ngit-svn-id: 236d1da889b004185c53d75d23fb6bdc6a50cecb@492 54a900ba-8191-11dd-a5c9-f1483cedc3eb\n" }, { "from": "human", "value": "<?php\n// SETS SYSTEM-WIDE CONFIG PREFERNENCES\n\n//Information to access your mysql databas...
php
chosen
[ { "from": "system", "value": "Use correct Exception class to catch\n" }, { "from": "human", "value": "<?php\n\nnamespace CedricZiel\\ShariffBundle\\Service;\n\nuse CedricZiel\\ShariffBundle\\ShariffConfig;\nuse Heise\\Shariff\\Backend;\n\n/**\n * @package CedricZiel\\ShariffBundle\\Service\n */\...
php
chosen
[ { "from": "system", "value": "Add about/phpinfo for debugging (admin only)" }, { "from": "human", "value": "<?php\nclass aboutActions extends sfActions\n{\n public function executeIndex()\n {\n $this->forward('about', 'about');\n }\n\n public function executeAbout()\n {\n $response = ...
php
chosen
[ { "from": "system", "value": "Add placeholder for template class\n" }, { "from": "human", "value": "<?php\n\n/*\n * Mustache PHP Compiler\n *\n * (c) July 2011 - Manuel Odendahl - wesen@ruinwesen.com\n */\n\n?>" }, { "from": "gpt", "value": "<?php\n\n/*\n * Mustache PHP Compiler\n *\...
php
chosen
[ { "from": "system", "value": "Set the locale for Carbon, so diffForHumans is translated\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Closure;\n\nclass SetLocale {\n public function handle($request, Closure $next) {\n if (\\Auth::check()) {\n ...
php
chosen
[ { "from": "system", "value": "Enable to use env variable.\n\nSigned-off-by: Mior Muhammad Zaki <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php\n\nreturn [\n\n /*\n |----------------------------------------------------------------------\n | D...
php
chosen
[ { "from": "system", "value": "Fix logic for displaying pending survey info\n" }, { "from": "human", "value": "<h2><span class=\"label label-default\">Pending surveys</span></h2>\n<table class=\"table table-striped table-hover\">\n\t<thead>\n\t\t<tr>\n\t\t\t<th>Survey ID</th>\n <th>Des...
php
chosen
[ { "from": "system", "value": "ADD url_push to redirect url model" }, { "from": "human", "value": "<?php\n\nnamespace SecucardConnect\\Product\\Payment\\Model;\n\n/**\n * RedirectUrl Data Model class\n *\n */\nclass RedirectUrl\n{\n /**\n * The url for redirect the customer back to the sho...
php
chosen
[ { "from": "system", "value": "Trim whitespace on category tags\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Helpers\\BBCode\\Tags;\n \nclass WikiCategoryTag extends LinkTag {\n\n function __construct()\n {\n $this->token = false;\n $this->element = '';\n }\n\...
php
chosen
[ { "from": "system", "value": "Add return to method (corrected typo)" }, { "from": "human", "value": "<?php\n\nnamespace Coreplex\\Meta\\Eloquent;\n\nuse Coreplex\\Meta\\Contracts\\Variant;\n\ntrait HasMetaData\n{\n /**\n * Retrieve the meta data for this model\n *\n * @param Varia...
php
chosen
[ { "from": "system", "value": "Use Drupal's content language detection instead of interface detection.\n" }, { "from": "human", "value": "<?php\n\nnamespace Prophets\\DrupalJsonApi\\Scopes;\n\nuse Prophets\\DrupalJsonApi\\Contracts\\DrupalScope;\nuse Prophets\\DrupalJsonApi\\Request\\DrupalJsonAp...
php
chosen
[ { "from": "system", "value": "Fix a bug on business model\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Antvel Shop package.\n *\n * (c) Gustavo Ocanto <gustavoocanto@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file...
php
chosen
[ { "from": "system", "value": "Stop sharing the query builder, this was a bad idea\n" }, { "from": "human", "value": "<?php\nnamespace ZerobRSS;\n\nuse \\Auryn\\Injector;\n\nclass Middlewares\n{\n /** @var Injector */\n private $injector;\n\n public function __construct(Injector $injecto...
php
chosen
[ { "from": "system", "value": "Make loop() and loop_until() return a Generator\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Funktions;\n\nuse Exception;\nuse Generator;\n\n/**\n * Return a value based on a test\n *\n * @param boolean $test\n * @param callable ...
php
chosen
[ { "from": "system", "value": "Add dividers to radiolist demo.\n\nsvn commit r16811\n" }, { "from": "human", "value": "<?php\n\n/* vim: set noexpandtab tabstop=4 shiftwidth=4 foldmethod=marker: */\n\nrequire_once 'Demo.php';\n\n/**\n * A demo using a radiolist\n *\n * @package SwatDemo\n * @cop...
php
chosen
[ { "from": "system", "value": "Remove guid getter, the id (like a guid) is now required." }, { "from": "human", "value": "<?php\n\nnamespace Nekland\\FeedBundle\\Item;\n\ninterface FullRssItemInterface extends RssItemInterface {\n /**\n * Somethink like \"NickName (Real Name)\"\n * @re...
php
chosen
[ { "from": "system", "value": "Use the message bag contract\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Alt Three Validator.\n *\n * (c) Alt Three Services Limited\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distrib...
php
chosen
[ { "from": "system", "value": "Change column to `integer` to match `artist_tracks` table spec\n" }, { "from": "human", "value": "<?php\n\n// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.\n// See the LICENCE file in the repository root for f...
php
chosen
[ { "from": "system", "value": "Add two methods for verifying the two different auth states\n" }, { "from": "human", "value": "<?php\n\nnamespace JPB\\WpBehatExtension\\Context;\n\nuse Behat\\MinkExtension\\Context\\RawMinkContext;\n\nclass AuthenticationContext extends RawMinkContext {\n\n\t/**\n...
php
chosen
[ { "from": "system", "value": "Increase coordinate in building fixtures\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\DataFixtures\\ORM;\n\nuse AppBundle\\Entity\\Building;\nuse AppBundle\\Entity\\Category;\nuse Doctrine\\Common\\DataFixtures\\AbstractFixture;\nuse Doctrine\\Co...
php
chosen
[ { "from": "system", "value": "Define PREG_BAD_UTF8_OFFSET_ERROR if it doesn't exist for HHVM\n" }, { "from": "human", "value": "<?php\n\nnamespace Gobie\\Regex\\Drivers\\Pcre;\n\nuse Gobie\\Regex\\RegexException;\n\nclass PcreRegexException extends RegexException\n{\n\n public static $message...
php
chosen
[ { "from": "system", "value": "Fix result as array parsing\n" }, { "from": "human", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Entity;\n\nuse Doctrine\\ORM\\EntityRepository;\nuse Doctrine\\ORM\\NoResultException;\n\n/**\n * VoterRepository\n *\n * This class was generat...
php
chosen
[ { "from": "system", "value": "Add use financial resource in ObjectUpdater" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Tests\\Services;\n\nuse AppBundle\\Tests\\Controller\\AbstractApiTest;\nuse AppBundle\\Document\\Dream;\n\nclass ObjectUpdaterTest extends AbstractApiTest\n{\n...
php
chosen
[ { "from": "system", "value": "Add QOS setting to support parallel processing\n" }, { "from": "human", "value": "<?php\n/**\n * mbc-user-digest.php\n *\n * A consumer to process entries in the registrationMobileQueue via the\n * transactionalExchange. The mbp-registration-mobile application produ...
php
chosen
[ { "from": "system", "value": "Use more secure PHP 7.0 random_int() function if available\n" }, { "from": "human", "value": "<?php\n\nnamespace TQ\\Shamir\\Random;\n\n/**\n * Class PhpGenerator\n *\n * @package TQ\\Shamir\\Random\n */\nclass PhpGenerator implements Generator\n{\n\n /**\n *...
php
chosen
[ { "from": "system", "value": "Adjust saving of test taxons\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests\\SitemapPlugin\\Controller;\n\nuse Lakion\\ApiTestCase\\XmlApiTestCase;\nuse Sylius\\Component\\Core\\Model\\Product;\nuse Sylius\\Component\\Core\\Model\\Taxon;\n\n/**\n * @aut...
php
chosen
[ { "from": "system", "value": "Handle files without a clip path\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the Imbo package\n *\n * (c) Christer Edvartsen <cogo@starzinger.net>\n *\n * For the full copyright and license information, please view the LICENSE file that wa...
php
chosen
[ { "from": "system", "value": "Add component path to config\n" }, { "from": "human", "value": "<?php\nreturn [\n /*\n |--------------------------------------------------------------------------\n | Building settings.\n |-----------------------------------------------------------------...
php
chosen
[ { "from": "system", "value": "Test Fake - new user interface." }, { "from": "human", "value": "<?php\n\nnamespace Ibillmaker\\Hub\\CoreBundle\\Entity;\n\nuse Sylius\\Component\\Core\\Model\\User as BaseUser;\nuse Sylius\\Component\\Core\\Model\\UserInterface;\nclass User extends BaseUser {\n\n ...
php
chosen
[ { "from": "system", "value": "Remove unused \"use statement\" from the test\n" }, { "from": "human", "value": "<?php\n\nnamespace Asmaster\\EquipTwig\\Tests;\n\nuse Asmaster\\EquipTwig\\TwigFormatter;\nuse Equip\\Adr\\PayloadInterface;\nuse Lukasoppermann\\Httpstatus\\Httpstatus;\nuse PHPUnit_Fr...
php
chosen
[ { "from": "system", "value": "Fix array notation to support PHP 5.3\n" }, { "from": "human", "value": "<?php\n\nnamespace Omnipay\\Stripe\\Message;\n\nuse Mockery as m;\nuse Omnipay\\Tests\\TestCase;\n\nclass AbstractRequestTest extends TestCase\n{\n public function testSendDataSetsApiVersion...
php
chosen
[ { "from": "system", "value": "Remove specs from suite (separate)\n" }, { "from": "human", "value": "<?php\n\nrequire_once(dirname(__FILE__).'/../vendor/simpletest/autorun.php');\nrequire_once(dirname(__FILE__).'/../Mustache.php');\n\nclass MustacheTestSuite extends TestSuite {\n function Mustac...
php
chosen
[ { "from": "system", "value": "Add invoice pay and update methods\n" }, { "from": "human", "value": "<?php\n\nclass Stripe_Invoice extends Stripe_ApiResource\n{\n public static function constructFrom($values, $apiKey=null)\n {\n $class = get_class();\n return self::scopedConstructFrom($cl...
php
chosen
[ { "from": "system", "value": "Fix welcome page when MySQL runs in strict mode\n\n\nFormer-commit-id: 114dac4d40341024aafe17506d0e1b2a2a0eec18\nFormer-commit-id: 0fb454a27efc299b184b28e1dd40cdf54105aad8" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Core\\User\\Workflow\\Progress;\n\...
php
chosen
[ { "from": "system", "value": "Add hexdec filter for Twig\n" }, { "from": "human", "value": "<?php\nnamespace Scat;\n\nclass TwigExtension\n extends \\Twig\\Extension\\AbstractExtension\n implements \\Twig\\Extension\\GlobalsInterface\n{\n public function getGlobals() {\n return [\n 'D...
php
chosen
[ { "from": "system", "value": "Check the user is active before displaying password reset\n\nThis would only come into play if an inactive user already received a password reset email and then the system was upgraded to prevent those emails from being sent to inactive users\n" }, { "from": "human", ...
php
chosen
[ { "from": "system", "value": "Use Eloquent ORM and Facades\n" }, { "from": "human", "value": "<?php\n\nrequire_once __DIR__.'/../vendor/autoload.php';\nDotenv::load(__DIR__.'/../');\n\n/*\n|--------------------------------------------------------------------------\n| Create The Application\n|---...
php
chosen
[ { "from": "system", "value": "Use airoute() to ensure redirect works correctly in multi-site setups\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Closure;\nuse Illuminate\\Contracts\\Auth\\MustVerifyEmail;\nuse Illuminate\\Support\\Facades\\Redirect;\nuse Il...
php
chosen
[ { "from": "system", "value": "Use class cache in factory" }, { "from": "human", "value": "<?php\n\nnamespace Jackalope;\n\nuse InvalidArgumentException;\nuse ReflectionClass;\n\n/**\n * Jackalope implementation factory.\n *\n * @license http://www.apache.org/licenses Apache License Version 2.0, ...
php
chosen
[ { "from": "system", "value": "Remove static declartion from Media Module properties\n" }, { "from": "human", "value": "<?php\n\nnamespace LaravelFlare\\Media;\n\nuse LaravelFlare\\Flare\\Admin\\Modules\\ModuleAdmin;\n\nclass MediaModule extends ModuleAdmin\n{\n /**\n * Admin Section Icon....
php
chosen
[ { "from": "system", "value": "Add default request instance to IoC/DI container\n" }, { "from": "human", "value": "<?php \nnamespace Concrete\\Core\\Http;\nuse \\Concrete\\Core\\Foundation\\Service\\Provider as ServiceProvider;\n\nclass HttpServiceProvider extends ServiceProvider {\n\n\tpublic fu...
php
chosen
[ { "from": "system", "value": "Allow easier testing of light vs dark.\n" }, { "from": "human", "value": "<?php\n\n\nnamespace Blog\\Site;\n\nuse ScriptHelper\\ScriptInclude;\nuse Psr\\Http\\Message\\ServerRequestInterface as ServerRequest;\n\nclass ThemeCSS\n{\n private $scriptInclude;\n pr...
php
chosen
[ { "from": "system", "value": "Use file path to manifest.json\n" }, { "from": "human", "value": "<?php\n\n/**\n * Debug helper\n *\n * Dumps the variable and ends the execution of the app\n *\n * @since 1.0.0\n *\n * @param $data\n */\nfunction dd($data)\n{\n die(dump($data));\n}\n\n/**\n * Re...
php
chosen
[ { "from": "system", "value": "Remove call to deprecated method\n\nThis will break in symfony 5.0, it has an easy replacement though.\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\EventListener;\n\nuse App\\Service\\Config;\nuse Symfony\\Component\\HttpKer...
php
chosen
[ { "from": "system", "value": "Add functionality in order to reload in-place\n" }, { "from": "human", "value": "<?php\n\nnamespace atk4\\ui;\n\n/**\n * This class generates action, that will be able to loop-back to the callback method.\n */\nclass jsReload implements jsExpressionable\n{\n publ...
php
chosen
[ { "from": "system", "value": "Update sample code using custom logger\n" }, { "from": "human", "value": "<?php\n\n/*\n * Example: interactive_search_callsign\n *\n * Downloads necessary statistics from one of the availble\n * data servers if local content is expired.\n *\n * Note: Not advised to ...
php
chosen
[ { "from": "system", "value": "Check if file exists before reading.\n" }, { "from": "human", "value": "<?php\nrequire __DIR__ . '/../vendor/autoload.php';\n\n$config = json_decode(file_get_contents(__DIR__.'/config.json'), true);\nif ($config == false) {\n $user = getenv('CP_USER');\n $pass...
php
chosen
[ { "from": "system", "value": "Trim contents of ATX headers.\n" }, { "from": "human", "value": "<?php\n\nnamespace FluxBB\\Markdown\\Parser;\n\nuse FluxBB\\Markdown\\Common\\Text;\nuse FluxBB\\Markdown\\Node\\Heading;\nuse FluxBB\\Markdown\\Node\\Node;\n\nclass HeaderParser implements ParserInter...
php
chosen
[ { "from": "system", "value": "Return null if object doesn't exist\n" }, { "from": "human", "value": "<?php\n\nnamespace Parziphal\\Parse\\Relations;\n\nuse Parziphal\\Parse\\ObjectModel;\n\nclass BelongsTo extends Relation\n{\n protected $embeddedClass;\n\n protected $keyName;\n\n prote...
php
chosen
[ { "from": "system", "value": "Change soap client to single instance\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the Zimbra API in PHP library.\n *\n * © Nguyen Van Nguyen <nguyennv1981@gmail.com>\n *\n * For the full copyright and license information, please view the L...
php
chosen
[ { "from": "system", "value": "Use the factory to get the loop\n" }, { "from": "human", "value": "<?php\n\nnamespace WyriHaximus\\React\\Tests\\AsyncInteropLoop;\n\nuse Interop\\Async\\Loop\\Test;\nuse React\\EventLoop\\StreamSelectLoop;\nuse WyriHaximus\\React\\AsyncInteropLoop\\ReactDriverFacto...
php
chosen
[ { "from": "system", "value": "Check if $board is set" }, { "from": "human", "value": "<div id=\"milestone_<?php echo $milestone->getID(); ?>\" class=\"milestone_box <?php echo ($milestone->isVisibleRoadmap()) ? ' available' : ' unavailable'; ?> <?php echo ($milestone->isReached()) ? 'closed' : '...
php
chosen
[ { "from": "system", "value": "Enforce consistent artisan command tag namespacing\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Rinvex\\Auth\\Console\\Commands;\n\nuse Illuminate\\Console\\Command;\n\nclass PublishCommand extends Command\n{\n /**\n * The...
php
chosen
[ { "from": "system", "value": "Include mock classes in test class file\n" }, { "from": "human", "value": "<?php\n/**\n * Definition of class DICTest\n *\n * @copyright 2015-today Justso GmbH\n * @author j.schirrmacher@justso.de\n * @package justso\\justapi\\test\n */\n\nnamespace justso\\...
php
chosen
[ { "from": "system", "value": "Replace all occurances of $graph->getNumberOfEdges()\nreplaced with count($graph->getEdges())" }, { "from": "human", "value": "<?php\n\nuse Fhaculty\\Graph\\Algorithm\\Complete;\n\nuse Fhaculty\\Graph\\Algorithm\\Directed;\n\nuse Fhaculty\\Graph\\Graph;\n\nuse Fhacu...
php
chosen
[ { "from": "system", "value": "Fix JSON serialization error on PHP 7\n\nCloses #685.\n\nThanks to @sijad.\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner <toby.zerner@gmail.com>\n *\n * For the full copyright and license information, please vi...
php
chosen
[ { "from": "system", "value": "Disable row rendering for embedded field sets.\n" }, { "from": "human", "value": "<?php\r\n\r\n\tclass FieldSetRenderer extends Renderer\r\n\t{\r\n\t\tuse RenderableFields;\r\n\t\t\r\n\t\tpublic function render()\r\n\t\t{\r\n\t\t\treturn $this->getParam(\"tag\") ?\r...
php
chosen
[ { "from": "system", "value": "Declare exceptions that are already thrown by implementations\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": "Make the home page redirect to its category URL.\n" }, { "from": "human", "value": "<?php\n\nnamespace FluxBB\\Actions;\n\nuse FluxBB\\Core\\Action;\nuse FluxBB\\Models\\CategoryRepository;\n\nclass Home extends Action\n{\n /**\n * The category repository ins...
php
chosen
[ { "from": "system", "value": "Update to the newest version of Markbot\n" }, { "from": "human", "value": "<?php\n\n$config = [\n // Turn on extra output during request & response\n 'DEBUG' => false,\n\n // Used to access Canvas\n 'canvas_base_url' => 'CANVAS_SUB_DOMAIN', // example: algonquin...
php
chosen
[ { "from": "system", "value": "Add @method annotations for cron entity" }, { "from": "human", "value": "<?php\nnamespace Bolt\\Storage\\Entity;\n\n/**\n * Entity for cron jobs.\n */\nclass Cron extends Entity\n{\n protected $id;\n protected $lastrun;\n protected $interim;\n}\n" }, { ...
php
chosen
[ { "from": "system", "value": "Use helper method to get attribute\n" }, { "from": "human", "value": "<?php\n\nnamespace Hmaus\\Reynaldo\\Elements;\n\nclass HttpTransitionElement extends BaseElement\n{\n /**\n * @return HttpTransactionElement[]\n */\n public function getHttpTransacti...
php
chosen
[ { "from": "system", "value": "Use Faker's lexify and str_repeat to generate a string to a specific length\n" }, { "from": "human", "value": "<?php\n\nnamespace Zizaco\\FactoryMuff\\Kind;\n\nuse Zizaco\\FactoryMuff\\Kind;\n\nclass String extends Kind\n{\n public function generate()\n {\n ...
php
chosen
[ { "from": "system", "value": "Allow Form::checkboxes() to customize output separator.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Html;\n\nclass FormBuilder extends \\Illuminate\\Html\\FormBuilder\...
php
chosen
[ { "from": "system", "value": "Stop mail transport after sending\n" }, { "from": "human", "value": "<?php\n\nclass CM_Mail_Mailer extends Swift_Mailer implements CM_Service_ManagerAwareInterface {\n\n use CM_Service_ManagerAwareTrait;\n\n public function __construct(Swift_Transport $transpo...
php
chosen
[ { "from": "system", "value": "Convert HTTP redirect to 301 Moved Permanently\n\nWhen issuing a redirect, make it a Permanent one so we can give the browser\nanother indicator that this change is permanent and it should not try to use\nHTTP again for this resource.\n" }, { "from": "human", "value...
php
chosen
[ { "from": "system", "value": "Fix amount type (updated in mongo-odm BETA 13)" }, { "from": "human", "value": "<?php\n\n$metadata->isEmbeddedDocument = true;\n\n$metadata->mapField(array(\n 'fieldName' => 'amount',\n 'type' => 'integer',\n 'nullable' => true\n));\n\n$metadata->mapField(a...
php
chosen
[ { "from": "system", "value": "Throw exception if sequence generator not found\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": "Set default if includeXferAsWithdrawn is not set\n" }, { "from": "human", "value": "<?php namespace TmlpStats\\Reports\\Arrangements;\n\nclass TeamMembersByQuarter extends BaseArrangement\n{\n /*\n * Builds an array of TDO attendance for each team member\n ...
php
chosen
[ { "from": "system", "value": "Switch type and value in contact detail form\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the CSBill package.\n *\n * (c) Pierre du Plessis <info@customscripts.co.za>\n *\n * For the full copyright and license information, please view the ...
php
chosen
[ { "from": "system", "value": "Fix undefined `self` in the i18n example." }, { "from": "human", "value": "<?php\n\nclass I18n extends Mustache {\n\n // Variable to be interpolated\n public $name = 'Bob';\n\n // Add a {{#__}} lambda for i18n\n public $__ = array(self, '__trans');\n\n ...
php
chosen
[ { "from": "system", "value": "Add a details field in the events table.\n" }, { "from": "human", "value": "<?php\r\nnamespace Application\\Model;\r\n\r\n// This class contains all data of an entity of the view referencing all event's properties.\r\nclass ViewEvent\r\n{\r\n public $type;\r\n p...
php
chosen
[ { "from": "system", "value": "Revert \"Redundant information is redundant.\"\n\nThis reverts commit ed9224a57ac396f62d75d1111d4a3be2927b1695.\n" }, { "from": "human", "value": "<?php\n\n//connect to the database\n$dbconn = pg_Connect(\"host=capstone06.cs.pdx.edu dbname=real user=postgres passwor...
php
chosen
[ { "from": "system", "value": "Fix typeahead component ignoring search results.\n" }, { "from": "human", "value": "<script type=\"text/javascript\">\n $(function () {\n let baseUrl = '{{ \\URL::to('/manga') }}';\n\n $('#searchbar').typeahead({\n delay: 250,\n ...
php
chosen
[ { "from": "system", "value": "Extend validator with VAT number validation.\n" }, { "from": "human", "value": "<?php\n\nnamespace DvK\\Laravel\\Vat;\n\nuse Illuminate\\Contracts\\Container\\Container;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass VatServiceProvider extends ServiceProvider\n...
php
chosen
[ { "from": "system", "value": "Use $container instead of deprecated/removed $app\n\n$app was deprecated and finally removed in Laravel 8 \r\nhttps://laravel.com/docs/8.x/upgrade" }, { "from": "human", "value": "<?php\nnamespace Rairlie\\LockingSession;\n\nuse Illuminate\\Session\\SessionManager a...
php
chosen
[ { "from": "system", "value": "Add getByName() method in locality collection class\n" }, { "from": "human", "value": "<?php\n\nnamespace Galahad\\LaravelAddressing;\n\n/**\n * Class LocalityCollection\n *\n * @package Galahad\\LaravelAddressing\n * @author Junior Grossi <juniorgro@gmail.com>\n */...
php
chosen
[ { "from": "system", "value": "Add more helpful error message\n\nShould provide more detailed error message for diagnosing #57" }, { "from": "human", "value": "<?php\nnamespace PivotLibre\\Tideman;\n\nuse \\InvalidArgumentException;\n\nclass MarginRegistry\n{\n private $registry = array();\n\n...
php
chosen
[ { "from": "system", "value": "Fix typo in v2 Gateway resource class and remove unnecessary namespace declaration\n" }, { "from": "human", "value": "<?php\n\nnamespace Moltin\\Resources;\n\nuse Moltin\\Resource as Resource;\nuse Moltin\\Exceptions\\FileNotFoundException;\n\nclass GAteways extends...
php
chosen
[ { "from": "system", "value": "Clean up ACL code for axo 20483\n" }, { "from": "human", "value": "<?php\n\nnamespace Rcm\\Acl\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * @ORM\\Entity\n * @ORM\\Table(\n * name=\"rcm_acl_user_group\",\n * indexes={@ORM\\Index(name=\"userIdInde...
php
chosen
[ { "from": "system", "value": "Make waiting message more precise" }, { "from": "human", "value": "<?php\nerror_reporting(E_ALL);\nini_set('display_errors', 1);\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\n$connected = false;\nwhile (!$connected) {\n try {\n $app = \\eCampApp:...
php
chosen
[ { "from": "system", "value": "Add trailing newline to output\n\nSigned-off-by: Lewis Marshall <748e1641a368164906d4a0c0e3965345453dcc93@lmars.net>\n" }, { "from": "human", "value": "<?php\n\nrequire('../vendor/autoload.php');\n\n$app = new \\Slim\\Slim();\n\n$app->get('/', function () {\n ech...
php
chosen
[ { "from": "system", "value": "Add mute param to generate mute video\n" }, { "from": "human", "value": "<?php\r\nini_set(\"display_errors\", 0);\r\n\r\n$thumbdir = 'clip/';\r\n$uuid = uniqid();\r\n$start = floatval($_GET['t']) - 0.9;\r\n$duration = 3;\r\n$anilistID = rawurldecode($_GET['anilist_i...
php
chosen
[ { "from": "system", "value": "Add branding and spanish wording" }, { "from": "human", "value": "<html>\n <head>\n <link href='//fonts.googleapis.com/css?family=Lato:100' rel='stylesheet' type='text/css'>\n\n <style>\n body {\n margin: 0;\n ...
php
chosen