conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Return self instead of parent to allow nested resolutions\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\nnamespace Onion\\Framework\\Collection;\n\nclass CallbackCollection extends Collection\n{\n /** @var callable */\n private $callback;\n...
php
chosen
[ { "from": "system", "value": "Add a method to store an unmodified block on the bytecode cache.\n\n" }, { "from": "human", "value": "<?php\ninterface ISugarCache {\n function stamp (SugarRef $ref, $type);\n function load (SugarRef $ref, $type);\n function store (SugarRef $ref, $type, $da...
php
chosen
[ { "from": "system", "value": "Add messages and redirection to task revDelete\n" }, { "from": "human", "value": "<?php\nnamespace AdminAddonRevisions;\n\nclass TaskHandler {\n\n public function __construct($plugin) {\n $this->plugin = $plugin;\n $this->admin = $plugin->grav()['admin'];\n ...
php
chosen
[ { "from": "system", "value": "Add timestamps to pivot table\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateTagsAndPostTagTables extends Migration\n{\n /**\n * Run the migrations.\n ...
php
chosen
[ { "from": "system", "value": "Add new permission instead of updating existing one (avoid down time)" }, { "from": "human", "value": "<?php\nini_set(\"memory_limit\",\"1024M\");\n\nchdir(__DIR__);\nrequire_once (__DIR__ . '/../../bootstrap.php');\n\n$permCrit = new Criteria();\n$permCrit->add(Per...
php
chosen
[ { "from": "system", "value": "Remove hardcoded AddThis ID, made migrations and form changes to store it in database.\n" }, { "from": "human", "value": "<?php namespace app\\Helpers\\Validators;\n\nuse Illuminate\\Validation\\Validator;\n\n/**\n * Class MainMetaValidator\n *\n * A class to handle...
php
chosen
[ { "from": "system", "value": "Add tests for auto field aliasing\n" }, { "from": "human", "value": "<?php\nnamespace Search\\Test\\TestCase\\Model\\Filter;\n\nuse Cake\\TestSuite\\TestCase;\nuse Search\\Manager;\nuse Search\\Model\\Filter\\Base;\n\nclass Filter extends Base\n{\n\n public funct...
php
chosen
[ { "from": "system", "value": "Adjust user roles in migration\n" }, { "from": "human", "value": "<?php\n\n$language = CM_Model_Language::findByAbbreviation('de');\n$language->setTranslation('.internals.role.' . Denkmal_Role::ADMIN, 'Admin');\n$language->setTranslation('.internals.role.' . Denkmal...
php
chosen
[ { "from": "system", "value": "Use new shortcuts for migrations\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner <toby.zerner@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distribut...
php
chosen
[ { "from": "system", "value": "Update to rawurlencode / rawurldecode\n\nDue to [this](https://github.com/paypal/ipn-code-samples/issues/51), the listener will *always* return INVALID unless `raw` methods are used for encoding / decoding." }, { "from": "human", "value": "<?php\n\nnamespace Mdb\\Pa...
php
chosen
[ { "from": "system", "value": "Add pageBy method to return sorted, filtered, paged data\nAgregar el método pageBy para obtener datos ordenados, filtrados y\npaginados" }, { "from": "human", "value": "<?php\nnamespace WiContactAPI\\V1\\Rest\\Contact;\n\nuse Zend\\Paginator\\Paginator;\nuse Doctrin...
php
chosen
[ { "from": "system", "value": "Add set for OrFail functionality.\n" }, { "from": "human", "value": "<?php\n\nnamespace Shim\\Model\\Entity;\n\nuse Cake\\Utility\\Inflector;\nuse RuntimeException;\n\n/**\n * Trait to read/write entity properties in a way that the returned/passed value is ensured (...
php
chosen
[ { "from": "system", "value": "Add api build test for success case.\n" }, { "from": "human", "value": "<?php\n\nnamespace Apixu\\Tests;\n\nuse Apixu\\Apixu;\nuse Apixu\\Config;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ApixuTest extends TestCase\n{\n /**\n * @expectedException \\Apixu\\E...
php
chosen
[ { "from": "system", "value": "Disable the background updates for the moment, because my browser just died.\n\nJavaScript GC sucks" }, { "from": "human", "value": "<?php\nreturn [\n 'settings' => [\n 'debug'=> true,\n 'site-name' => 'OpenDock',\n 'support-mail' => 'opendoc...
php
chosen
[ { "from": "system", "value": "Make the notify interface simpler\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of NotifyMe.\n *\n * (c) Joseph Cohen <joseph.cohen@dinkbit.com>\n * (c) Graham Campbell <graham@mineuk.com>\n *\n * For the full copyright and license information...
php
chosen
[ { "from": "system", "value": "Revert \"Added global middleware support\"\n" }, { "from": "human", "value": "<?php\n\nreturn [\n\n /*\n |--------------------------------------------------------------------------\n | Enable/disable routes\n |--------------------------------------------...
php
chosen
[ { "from": "system", "value": "Disable the APC cache for Ubuntu 14.04. APC is deprecated now so we need a better solution anyways.\n" }, { "from": "human", "value": "<?php\n\nclass Cache\n{\n\n\tprivate function createCacheKey($key, $isUserValue, $userId = null) {\n\n\t\t$CC_CONFIG = Config::getC...
php
chosen
[ { "from": "system", "value": "Use passed in polyglot check\n" }, { "from": "human", "value": "<?php\nnamespace Rocketeer\\Strategies\\Check;\n\nuse Rocketeer\\Abstracts\\Strategies\\AbstractPolyglotStrategy;\nuse Rocketeer\\Interfaces\\Strategies\\CheckStrategyInterface;\n\nclass PolyglotStrateg...
php
chosen
[ { "from": "system", "value": "Add integer compatibility with integer\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of Railt package.\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\nde...
php
chosen
[ { "from": "system", "value": "Add Main class adopt new design pattern instead of IDSL\n" }, { "from": "human", "value": "<?php\n\nnamespace Quran;\n\nuse Exception;\nuse ReflectionClass;\n\nclass Quran extends Base\n{\n protected $fragments;\n\n public static function settings(array $setti...
php
chosen
[ { "from": "system", "value": "Rewrite lambda to work with 7.3" }, { "from": "human", "value": "<?php\n\nnamespace QuickCheck;\n\nuse PHPUnit\\Framework\\TestCase;\nuse QuickCheck\\Generator as Gen;\nuse QuickCheck\\PHPUnit\\PropertyConstraint;\n\nclass PHPUnitIntegrationTest extends TestCase {\n...
php
chosen
[ { "from": "system", "value": "Create empty option result if option result is not set\n" }, { "from": "human", "value": "<?php\nnamespace PhpBrew\\Tasks;\nuse CLIFramework\\Logger;\nuse GetOptionKit\\OptionResult;\n\nabstract class BaseTask\n{\n public $logger;\n\n public $options;\n\n p...
php
chosen
[ { "from": "system", "value": "Use statement + output added\n" }, { "from": "human", "value": "<?php\n\nnamespace KevinVR\\FootbelProcessorBundle\\Command;\n\nuse PhpAmqpLib\\Message\\AMQPMessage;\nuse Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand;\nuse Symfony\\Component\\Cons...
php
chosen
[ { "from": "system", "value": "BAP-2986: Fix business unit assign in user edit page\n - Refactor business unit form type\n" }, { "from": "human", "value": "<?php\nnamespace Oro\\Bundle\\OrganizationBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\F...
php
chosen
[ { "from": "system", "value": "Add google street view object\n" }, { "from": "human", "value": "<?php\n\nnamespace ZpgRtf\\Objects;\n\nclass GoogleStreetViewObject\n{\n\n}\n" }, { "from": "gpt", "value": "<?php\n\nnamespace ZpgRtf\\Objects;\n\nclass GoogleStreetViewObject implements \...
php
chosen
[ { "from": "system", "value": "Remove a useless 'use' directive.\n" }, { "from": "human", "value": "<?php\n\nnamespace Predis;\n\nuse Predis\\Network\\IConnection;\nuse Predis\\Network\\IConnectionCluster;\nuse Predis\\Network\\ConnectionCluster;\n\nclass Utils {\n public static function isClu...
php
chosen
[ { "from": "system", "value": "Update file based on the php:lint task\n" }, { "from": "human", "value": "<?php\nif ( ! function_exists( 'on_cache_please' ) ){\n\t/**\n\t * Function to storage the cache on automatic.\n\t * @since 1.0.0\n\t * @param\n\t */\n\tfunction on_cache_please( array $args =...
php
chosen
[ { "from": "system", "value": "Fix 'In the Media' title\n" }, { "from": "human", "value": "<article id=\"post-<?php the_ID(); ?>\" <?php post_class('index-card'); ?>>\n <header>\n <h2><a href=\"<?php echo esc_attr( get_field('article_url', get_the_ID()) ); ?>\"><?php the_title(); ?></a>...
php
chosen
[ { "from": "system", "value": "Make differential.querydiffs more liberal about arguments\n\nSummary:\nFixes T12092. D17164 made `DiffQuery` more strict about arguments using modern conventions, but `differential.querydiffs` uses bizarre ancient conventions.\n\nGive it more modern conventions instead.\n\nTest...
php
chosen
[ { "from": "system", "value": "Add minimum versions to required dependencies. Add PEAR2_Console_CommandLine as a required dep.\n\ngit-svn-id: 71b65f7ff3646a85e1ba76c778efde6466075005@299668 c90b9560-bf6c-de11-be94-00142212c4b1\n" }, { "from": "human", "value": "<?php\n$package->dependencies['requ...
php
chosen
[ { "from": "system", "value": "Fix PHP warning when submitting new conversation without any recipient\n" }, { "from": "human", "value": "<?php\n\nnamespace FireDIY\\PrivateMessageBundle\\Validator;\n\nuse FireDIY\\PrivateMessageBundle\\Entity\\Conversation;\nuse Symfony\\Component\\Validator\\Con...
php
chosen
[ { "from": "system", "value": "Set static method for test\n" }, { "from": "human", "value": "<?php\n/**\n * CakeCMS Core\n *\n * This file is part of the of the simple cms based on CakePHP 3.\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed...
php
chosen
[ { "from": "system", "value": "Make sure created buckets are stored in database correctly\n" }, { "from": "human", "value": "<?php\n\nnamespace Hoard\\Test\\Bucket;\nuse Hoard\\Test\\TestCase;\nuse Model\\Bucket;\n\nclass CreateTest extends TestCase\n{\n\n public function testCreateBucket()\n ...
php
chosen
[ { "from": "system", "value": "Fix empty Path not removing files correctly\n" }, { "from": "human", "value": "<?php\n\nuse Codeception\\Configuration;\nuse Codeception\\Util\\Debug;\nuse Illuminate\\Filesystem\\Filesystem;\n\n/**\n * Output Path\n *\n * @author Alin Eugen Deac <aedart@gmail.com>\...
php
chosen
[ { "from": "system", "value": "Allow changing the server URL\n\nAllow setting the URL if you are using a self hosted hipchat instance" }, { "from": "human", "value": "<?php\n/* (c) Stephan Wentz <stephan@wentz.it>\n *\n * For the full copyright and license information, please view the LICENSE\n *...
php
chosen
[ { "from": "system", "value": "Update options method to merge new data\n" }, { "from": "human", "value": "<?php\n\tnamespace Bolt\\Api\\Request;\n\n\tuse Bolt\\Base;\n\tuse Bolt\\Arrays;\n\n\tclass InputMask extends Base\n\t{\n\t\tpublic $name;\n\t\tpublic $type;\n\t\tpublic $children = array();\...
php
chosen
[ { "from": "system", "value": "Add hooks to alter relevant assets in the Mosaico interface\n" }, { "from": "human", "value": "<?php\n\nclass CRM_Mosaico_Page_EditorIframe extends CRM_Mosaico_Page_Editor {\n\n}\n" }, { "from": "gpt", "value": "<?php\n\nclass CRM_Mosaico_Page_EditorIfra...
php
chosen
[ { "from": "system", "value": "[Cart] Rework the cart not found exception\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was di...
php
chosen
[ { "from": "system", "value": "Update branch for git updater\n" }, { "from": "human", "value": "<?php\n/**\n * Plugin Name: Culture Object\n * Plugin URI: http://cultureobject.co.uk\n * Description: A framework as a plugin to enable sync of culture objects into WordPress.\n * Version: 3.0.0-beta....
php
chosen
[ { "from": "system", "value": "Change invalid value to InvalidArgException\n" }, { "from": "human", "value": "<?php\nnamespace AppBundle\\Game;\n\n/**\n * A square the contains X or O values.\n * \n * @author Brian Feaver <brian.feaver@gmail.com>\n */\nclass XoSquare implements Square\n{\n /**...
php
chosen
[ { "from": "system", "value": "[Bundle] Make getPath() less error prone by allowing both backward and forward slashes\n\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien.potencier@symfony-project.com>\n *\n * For the ...
php
chosen
[ { "from": "system", "value": "Fix: Update return type in docblock\n" }, { "from": "human", "value": "<?php\n\nnamespace TomPHP\\ContainerConfigurator;\n\nuse TomPHP\\ContainerConfigurator\\Exception\\UnknownContainerException;\n\nfinal class ContainerAdapterFactory\n{\n /**\n * @var array...
php
chosen
[ { "from": "system", "value": "Replace easymailing domain with booking southtyrol\n" }, { "from": "human", "value": "<?php\n\nnamespace MssPhp\\Schema\\Response;\n\nuse JMS\\Serializer\\Annotation\\Type;\n\nclass Picture {\n /**\n * @Type(\"string\")\n */\n public $url;\n\n /**\n...
php
chosen
[ { "from": "system", "value": "Fix root media rewrite rule\n" }, { "from": "human", "value": "<?php\n/* ------------------------------------------------------------------------ *\\\n * Rewrite Rules\n\\* ------------------------------------------------------------------------ */\n\n/**\n * Add va...
php
chosen
[ { "from": "system", "value": "BAP-4209: Add EntityExtendBundle generator extension to generate activity association entities\n- generator extension\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\ActivityBundle\\Tools;\n\nclass ActivityExtendEntityGeneratorExtension\n{\n\n}\n"...
php
chosen
[ { "from": "system", "value": "Remove --dev from composer install.\n\n--dev is the default.\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\nchdir(__DIR__);\n\n$returnStatus = null;\npassthru('composer install --dev', $returnStatus);\nif ($returnStatus !== 0) {\n exit(1);\n}\n\nre...
php
chosen
[ { "from": "system", "value": "Rename the Memcached test to be more accurate\n\nApparently, Memcached is the only Backend that implements expirations,\nso it tests Expirations seperately (and not very well!) outside of\n`AbstractBackendTest`. More more accurate in naming this.\n" }, { "from": "human"...
php
chosen
[ { "from": "system", "value": "Update to work with the last version of twig\n" }, { "from": "human", "value": "<?php\n\nnamespace Bundle\\MarkdownBundle\\Twig\\Extension;\n\nuse Bundle\\MarkdownBundle\\Helper\\MarkdownHelper;\n\nclass MarkdownTwigExtension extends \\Twig_Extension\n{\n protect...
php
chosen
[ { "from": "system", "value": "Add setUser() method to the contract\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Contracts;\n\nuse App\\Entities\\Base\\User;\n\n\n/**\n * An Interface for Entities that are owned by a User, indicated by a $user Entity member, and have the related\n *...
php
chosen
[ { "from": "system", "value": "BAP-769: Create OroJsFormValidationBundle and add dependency on APYJsFormValidationBundle\n- fixed invalid import class name\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\JsFormValidationBundle\\Tests\\Unit\\DependencyInjection;\n\nuse Oro\\Bund...
php
chosen
[ { "from": "system", "value": "Load input directly to simplexml\n" }, { "from": "human", "value": "<?php\n\n include(\"/home/c0smic/secure/data_db_settings.php\");\n\n $body = file_get_contents('php://input');\n $xml = simplexml_load_file($body);\n\n # Read GET variables\n $stime =...
php
chosen
[ { "from": "system", "value": "Fix namespace on search elements\n" }, { "from": "human", "value": "<?php\n// WIP ?>\n<?php $search_query = is_search() ? get_search_query() : \"\"; ?>\n<form class=\"search-form\" action=\"<?php echo home_url(); ?>\" method=\"get\">\n <label class=\"search-form_...
php
chosen
[ { "from": "system", "value": "Add more return types after fixing a typo in my script\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 vie...
php
chosen
[ { "from": "system", "value": "Revert santizing toaddress, because PHPMailer now throws exceptions\n\nConflicts:\n\tapps/files_sharing/ajax/email.php\n" }, { "from": "human", "value": "<?php\nOCP\\JSON::checkLoggedIn();\nOCP\\JSON::checkAppEnabled('files_sharing');\n$user = OCP\\USER::getUser();\...
php
chosen
[ { "from": "system", "value": "[API][Product] Change identifier for shop endpoint from slug to code\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": "Fix so include action is only run if did_action returns false\n" }, { "from": "human", "value": "<?php\n\n/**\n * Delete the property value from the database.\n *\n * @param string $type\n * @param string $slug\n * @param int $post_id\n */\nfunction papi_action_d...
php
chosen
[ { "from": "system", "value": "Add Event_Handler->bind() method accepting closure callbacks\n\n- add bind method\n- use bind method within bindJob method\n" }, { "from": "human", "value": "<?php\n\nfinal class CM_EventHandler_EventHandler {\n\n\t/**\n\t * @var array $_callbacks\n\t */\n\tprivate ...
php
chosen
[ { "from": "system", "value": "Fix redundant open/close php tag\n" }, { "from": "human", "value": "<?php\n echo \"\\n\\n\";\n echo \"================\\n\";\n echo pluralize( count( $unittests ), 'unit test' ) . \"\\n\";\n echo \"================\\n\\n\";\n?>\n<?php\n foreach ( $uni...
php
chosen
[ { "from": "system", "value": "BUGFIX: Fix issue where content controller is not defined\n" }, { "from": "human", "value": "<?php\n\nif (file_exists(__DIR__ . '../vendor/autoload.php')) {\n require_once __DIR__ . '../vendor/autoload.php';\n}\n\nObject::add_extension('ContentController', 'HashP...
php
chosen
[ { "from": "system", "value": "Fix recent changes page not working\n" }, { "from": "human", "value": "{{--\n Copyright 2015-2017 ppy Pty. Ltd.\n\n This file is part of osu!web. osu!web is distributed with the hope of\n attracting more community contributions to the core ecosystem of osu!...
php
chosen
[ { "from": "system", "value": "Add PHP's open and closing tags" }, { "from": "human", "value": "function export_posts_as_csv() {\n\n\t$args = array(\n 'posts_per_page' => -1,\n 'post_type' => 'pages',\n 'post_status' => array( 'publish', 'pending' ),\n ...
php
chosen
[ { "from": "system", "value": "Add a '\\' after XLSXExporter" }, { "from": "human", "value": "<?php\n\nspl_autoload_register(function($classname) {\n if (0 === strpos($classname, \"XLSXExporter\")) {\n require_once dirname(__DIR__).\"/\".str_replace(\"\\\\\", \"/\", $classname).\".php\"...
php
chosen
[ { "from": "system", "value": "Remove \"named\" parameters when calling ImageSVG in class PDFRendere\n" }, { "from": "human", "value": "<?php\n\nnamespace raphiz\\passwordcards;\n\nclass PDFRenderer\n{\n public static function render($front, $back)\n {\n // create new PDF document\n ...
php
chosen
[ { "from": "system", "value": "Use separate cache and log directory per environment\n" }, { "from": "human", "value": "<?php\n\nnamespace App;\n\nuse Matthias\\SymfonyConsoleForm\\Bundle\\SymfonyConsoleFormBundle;\nuse Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle;\nuse Symfony\\Bundle\\TwigB...
php
chosen
[ { "from": "system", "value": "Remove print, pass data to view\n" }, { "from": "human", "value": "<?php\n\nnamespace Taskforcedev\\CrudAPI\\Http\\Controllers;\n\nuse Illuminate\\Http\\Request;\nuse Taskforcedev\\CrudAPI\\Models\\CrudModel;\n\n/**\n * Class AdminController\n *\n * @package Taskfor...
php
chosen
[ { "from": "system", "value": "Put welcome page inside web middleware to allow check user existance and not show Login and Register links when user is logged\n" }, { "from": "human", "value": "<?php\n/*\n * Same configuration as Laravel 5.2:\n * See https://github.com/laravel/framework/blob/5.2/s...
php
chosen
[ { "from": "system", "value": "Fix ancestor next sibling test for DOMIterator.\n" }, { "from": "human", "value": "<?php\nnamespace ComplexPie;\n\nclass DOMIterator implements \\Iterator\n{\n private $root;\n private $node;\n private $position = 0;\n \n public function __construct(\...
php
chosen
[ { "from": "system", "value": "Update to run from site root\n" }, { "from": "human", "value": "#!/usr/bin/php\n<?php\nchdir(dirname(__FILE__).'/..');\nrequire './global.php';\n\n/**\n * Install the schemas in the correct order. Add your own class names to the\n * $third_party_model_classes arra...
php
chosen
[ { "from": "system", "value": "Check that it returns the same class\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Laravel Algolia.\n *\n * (c) Vincent Klaiber <hello@vinkla.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that...
php
chosen
[ { "from": "system", "value": "Update to apc class loader config" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\ClassLoader\\ApcClassLoader;\nuse Symfony\\Component\\HttpFoundation\\Request;\n\n$loader = require_once __DIR__.'/../app/bootstrap.php.cache';\n\n// Use APC for auto...
php
chosen
[ { "from": "system", "value": "Update DOMAIN harusnya http, bukan https." }, { "from": "human", "value": "<?php\r\ndefine(\"DEBUG\", true);\r\ndefine(\"DBNAME\", 'ssbin');\r\ndefine(\"DBUSER\", 'fandi');\r\ndefine(\"DBPASS\", 'borera');\r\ndefine(\"DBPORT\", 34600);\r\n\r\ndefine(\"PHPMAILER_FROM...
php
chosen
[ { "from": "system", "value": "Fix Elk versions for upgrade files\n" }, { "from": "human", "value": "<?php\n\n/**\n * @name ElkArte Forum\n * @copyright ElkArte Forum contributors\n * @license BSD http://opensource.org/licenses/BSD-3-Clause\n *\n * @version 1.1 beta 1\n *\n */\n\n// Versio...
php
chosen
[ { "from": "system", "value": "Use composer autoload file when available\n\nFix task symfony generate:project with sfDoctrinePlugin (GH-10)\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the symfony package.\n * (c) Fabien Potencier <fabien.potencier@symfony-project.com>...
php
chosen
[ { "from": "system", "value": "Fix missing resume file extension\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse App\\Mail\\ResumeDownloaded;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Facades\\Mail;\n\nclass DownloadResumeController extends Con...
php
chosen
[ { "from": "system", "value": "Use hardcoded path for zend\n" }, { "from": "human", "value": "<?php\n\n$zf2Path = realpath(__DIR__ . '/../vendor/zf2/library/');\nset_include_path($zf2Path . PATH_SEPARATOR . get_include_path());\n\n\nrequire 'Zend/Loader/AutoloaderFactory.php';\nuse Zend\\Loader\\...
php
chosen
[ { "from": "system", "value": "Add curly braces around ifs" }, { "from": "human", "value": "<?php\n\nfunction includeIfExists($file) {\n if (file_exists($file))\n return include $file;\n}\n\nif ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) &&\n (!$loader = includeIfExi...
php
chosen
[ { "from": "system", "value": "Update feature: Cleanup admin layout\n" }, { "from": "human", "value": "<div class=\"container-fluid\">\n\t<div class=\"content row\">\n\t\t<?php if ($sidebar_left || $sidebar_right): ?>\n\t\t\t<!-- ########## Sidebar start ########## -->\n\t\t\t<div class=\"col-sm-...
php
chosen
[ { "from": "system", "value": "CRM-4553: Fix undefined index notice and array_pop() PHP Warning in functional tests\n- delete unused use\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\ImapBundle\\Form\\EventListener;\n\nuse Symfony\\Component\\Config\\Definition\\Exception\\Ex...
php
chosen
[ { "from": "system", "value": "Fix bad indices for filtered collection\n\narray_filter returns the indices of the original array which\nmight not be continuous and cause unexpected results when\ntransforming the Collection using toArray().\n" }, { "from": "human", "value": "<?php\n\ndeclare (stri...
php
chosen
[ { "from": "system", "value": "Fix destroy DB hash if user logout\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: jam\n * Date: 11.1.15\n * Time: 20:34\n */\n\nnamespace Trejjam\\Authorization;\n\n\nuse Nette,\n\tTrejjam;\n\nclass User extends Nette\\Security\\Use...
php
chosen
[ { "from": "system", "value": "Make data serializable, so its more than a marker. Useful for queuing.\n" }, { "from": "human", "value": "<?php\nnamespace PHPAPILibrary\\Core\\Data;\n\n/**\n * Interface DataInterface\n * @package PHPAPILibrary\\Core\\Data\n */\ninterface DataInterface\n{\n //Ma...
php
chosen
[ { "from": "system", "value": "Fix issue where the presenter bombs if the entry is not set / exists.\n" }, { "from": "human", "value": "<?php namespace Anomaly\\PagesModule\\Page;\n\nuse Anomaly\\PagesModule\\Page\\Contract\\PageInterface;\nuse Anomaly\\Streams\\Platform\\Entry\\EntryPresenter;\n...
php
chosen
[ { "from": "system", "value": "Fix testcase for Cache dispense\n" }, { "from": "human", "value": "<?php\n/**\n * CacheTest.php.\n */\n\nnamespace Pagon;\n\n\nclass CacheTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @var App\n */\n protected $app;\n\n public function setU...
php
chosen
[ { "from": "system", "value": "Add a Countable unit test for pQuery\n\nJust in case I don’t know PHP." }, { "from": "human", "value": "<?php\n\n/**\n * @author Todd Burry <todd@vanillaforums.com>\n * @copyright 2009-2016 Vanilla Forums Inc.\n * @license LGPLv2\n */\n\n/**\n * Contains tests for g...
php
chosen
[ { "from": "system", "value": "Hide registration button if registration closed." }, { "from": "human", "value": "<div class=\"navbar-custom-menu pull-left\">\n <ul class=\"nav navbar-nav\">\n <!-- =================================================== -->\n <!-- ========== Top menu ...
php
chosen
[ { "from": "system", "value": "Fix typo in provider iterator relating to source document from ES\n" }, { "from": "human", "value": "<?php\n\nnamespace CascadeEnergy\\DistributedOperations\\Elasticsearch;\n\nuse CascadeEnergy\\DistributedOperations\\Operation;\nuse Elasticsearch\\Helper\\Iterators...
php
chosen
[ { "from": "system", "value": "Fix the finder more accurate when requesting a file without adding an extension\n\nFixes #3.\n" }, { "from": "human", "value": "<?php namespace Sprockets;\n\nuse SplFileInfo;\nuse Sprockets\\Exception\\AssetNotFoundException;\n\nclass Finder {\n\tprotected $loadPath...
php
chosen
[ { "from": "system", "value": "Add script to fix mobile menu JS not functioning.\n" }, { "from": "human", "value": "<?php include 'templates/header.php'; ?>\n\t\n<div class=\"col-sm-12 row\">\n\t<div class=\"col-sm-12\">\n\t\t<h2>\n\t\t\tUser Options \n\t\t</h2>\n\t\t\n\t\t<p>\n\t\t\tModify your ...
php
chosen
[ { "from": "system", "value": "Fix comment for Composer autoloading\n" }, { "from": "human", "value": "<?php\n\n# Let Composer autoload Volcano\nrequire 'vendor/autoload.php';\n\n# Require our App to start up\nrequire_once 'app.php';\n" }, { "from": "gpt", "value": "<?php\n\n# Let Com...
php
chosen
[ { "from": "system", "value": "[2.0] Fix for CLI Configuration and PEAR installer\n\ngit-svn-id: c8c49e1140e1cd2a8fb163f3c2b0f6eec231a71d@7064 625475ce-881a-0410-a577-b389adb331d8\n" }, { "from": "human", "value": "<?php\n\nrequire_once 'Doctrine/Common/ClassLoader.php';\n\n$classLoader = new \\D...
php
chosen
[ { "from": "system", "value": "Fix bug where immutable collection was treated like mutable\n" }, { "from": "human", "value": "<?php\n\ndeclare (strict_types = 1);\n\nnamespace Mihaeu\\PhpDependencies;\n\nclass PhpFileFinder\n{\n public function find(\\SplFileInfo $file) : PhpFileCollection\n ...
php
chosen
[ { "from": "system", "value": "Add wizard initializer in service manager" }, { "from": "human", "value": "<?php\nnamespace Wizard;\n\nuse Zend\\ModuleManager\\Feature\\AutoloaderProviderInterface;\nuse Zend\\ModuleManager\\Feature\\ConfigProviderInterface;\n\nclass Module implements\n ConfigPr...
php
chosen
[ { "from": "system", "value": "Drop loading a non-existent EmberDataError" }, { "from": "human", "value": "<?php\n\n// Adds the Serializer object type so serializer objects\n// can be found in conventional places\nApp::build(array(\n\t'Serializer' => array('%s' . 'Serializer' . DS),\n\t'Serialize...
php
chosen
[ { "from": "system", "value": "Add newly created packages to config.\n" }, { "from": "human", "value": "<?php\n\nnamespace Studio\\Console;\n\nuse Studio\\Creator;\nuse Studio\\Package;\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nus...
php
chosen
[ { "from": "system", "value": "Fix php5.5 bug with unsuported boolean or in argument default\n" }, { "from": "human", "value": "<?php\nnamespace Sandhje\\Spanner\\Filesystem;\n\n/**\n * Filesystem wrapper\n *\n * @author Sandhje\n * \n */\nclass Filesystem\n{\n /**\n * is_file wrapp...
php
chosen
[ { "from": "system", "value": "Change NullAdapter from ArrayAdapter default\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace BEAR\\QueryRepository;\n\nuse BEAR\\Resource\\NamedParameter;\nuse BEAR\\Resource\\NamedParameterInterface;\nuse Ray\\Di\\AbstractModule;\n...
php
chosen
[ { "from": "system", "value": "Stop outputting PHP version during testing\n" }, { "from": "human", "value": "<?php\n/**\n * PHPUnit bootstrap file\n *\n * @package WP-Auth0\n */\n\nini_set( 'error_log', '/dev/null' );\necho 'PHP version: ' . phpversion() . \"\\n\";\n\n$_tests_dir = getenv( 'WP_TE...
php
chosen
[ { "from": "system", "value": "Fix height of photo in profile picture edit page\n" }, { "from": "human", "value": "<?\nrequire_once('php/classes/member.php');\n\n$profileEdited = new Member($_GET['member']);\nif (!$currentUser->isAdmin() || !$profileEdited->exists()) {\n $profileEdited = $curren...
php
chosen
[ { "from": "system", "value": "Add test coverage of SimpleWhoisClient class\n" }, { "from": "human", "value": "<?php\n\nnamespace Helge\\Tests;\n\nuse Helge\\Client\\SimpleWhoisClient;\n\nclass SimpleWhoisClientTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @var \\Helge\\Client\\Wh...
php
chosen
[ { "from": "system", "value": "Correct Sqlsrv connection class definition\n" }, { "from": "human", "value": "<?php\n/*\n * $Id$\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE ...
php
chosen