conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove country and script specifications from languages\n\nA language is only 'en', a locale is 'en_US': remove country codes from\ngetLanguageList so that we have only languages and not locales.\n\nFurthermore we don't need to tell Punic which is the active locale:\nLocalizati...
php
chosen
[ { "from": "system", "value": "Use alter table to rename tables\n\nFor some strange reason using \"rename table\" causes an exception in\nsystem/database/DB_driver.php:query() because\nit trys to call num_rows() on a boolean. Using \"alter table\" works.\n\nAccording to the php manpage mysqli::query() it sho...
php
chosen
[ { "from": "system", "value": "Fix failing Zend\\Session test under 5.3.3\n\n- bad import\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 Copyrig...
php
chosen
[ { "from": "system", "value": "Add skip test when Memcache not defined\n" }, { "from": "human", "value": "<?php\n\nnamespace Test\\Type\\Functional;\n\nuse Bcol\\Component\\Type\\Cache;\n\n/**\n * Class MemcachedStub\n *\n * @author Brice Colucci <brice.colucci@gmail.com>\n */\nclass MemcachedStu...
php
chosen
[ { "from": "system", "value": "Remove remote access check for development needs\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\HttpFoundation\\Request;\n\n// If you don't want to setup permissions the proper way, just uncomment the following PHP line\n// read http://symfony.c...
php
chosen
[ { "from": "system", "value": "Add the ability for the mock model to have it's cast array updated\n" }, { "from": "human", "value": "<?php\n\nclass MockJsonModel extends Illuminate\\Database\\Eloquent\\Model\n{\n use \\ModelJsonColumn\\JsonColumnTrait;\n\n protected $json_columns;\n\n pu...
php
chosen
[ { "from": "system", "value": "Change serializer format to be more specific to add in debug or introspection\n" }, { "from": "human", "value": "<?php\n\nnamespace Raekke\\Serializer;\n\nuse Raekke\\Message\\MessageInterface;\n\n/**\n * @package Raekke\n */\nclass Serializer\n{\n /**\n * @p...
php
chosen
[ { "from": "system", "value": "fix: Handle json-request in request factory\n" }, { "from": "human", "value": "<?php\n/**\n * HTTP request object factory\n *\n * This factory should be used in index.php for request object initialization.\n * Example:\n *\n * $validator = (new Validator)->setAdapte...
php
chosen
[ { "from": "system", "value": "Rename method for setting a hook\n" }, { "from": "human", "value": "<?php\nuse \\SlaxWeb\\Hooks\\Hooks;\n\n/**\n * Example hook\n */\nHooks::setHook([\"name\" => \"Hook name\", \"class\" => \"\\\\Hooks\\\\Sample\"]);\n" }, { "from": "gpt", "value": "<?ph...
php
chosen
[ { "from": "system", "value": "Update properties taxonomy type meta data\n" }, { "from": "human", "value": "<?php\n\nclass Properties_Taxonomy_Type extends Papi_Taxonomy_Type {\n\n\t/**\n\t * Define our Page Type meta data.\n\t *\n\t * @return array\n\t */\n\tpublic function meta() {\n\t\treturn ...
php
chosen
[ { "from": "system", "value": "Add leading slash to `JsonSerializable` on docblock\n\nCo-Authored-By: rodrigopedra <9ab0a48cbad7071f1c06b52d0c74cf226c5339e9@gmail.com>" }, { "from": "human", "value": "<?php\n\nnamespace Illuminate\\Http\\Resources;\n\nuse JsonSerializable;\nuse Illuminate\\Suppor...
php
chosen
[ { "from": "system", "value": "Remove ability to set different charset\n" }, { "from": "human", "value": "<?php\n\n/**\n * This file is part of the Krystal Framework\n * \n * Copyright (c) 2015 David Yang <daworld.ny@gmail.com>\n * \n * For the full copyright and license information, please view\...
php
chosen
[ { "from": "system", "value": "Set defaults on group table\n\nFixes #6\n" }, { "from": "human", "value": "<?php\n\n/*\n * Copyright © 2017 Jesse Nicholson\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with thi...
php
chosen
[ { "from": "system", "value": "Improve the internalCallException to use Exception chaining\n" }, { "from": "human", "value": "<?php\n\nnamespace Napp\\Core\\Api\\Exceptions\\Exceptions;\n\nuse Symfony\\Component\\HttpFoundation\\Response;\n\nclass ApiInternalCallException extends \\RuntimeExcepti...
php
chosen
[ { "from": "system", "value": "Add namespace for test autoloader\n\nUseful to allow loading of classes in test package that are not test\ncases (mocks, dummy implementations, etc.)." }, { "from": "human", "value": "<?php\n/*\n * Copyright (c) 2014-2016 Nicolas Braquart\n *\n * Permission is hereb...
php
chosen
[ { "from": "system", "value": "[BUGFIX] Build failed. Constants are not available in magento 1.4.2.0\n" }, { "from": "human", "value": "<?php\n\nnamespace N98\\Magento\\Command\\Cache;\n\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputInterfac...
php
chosen
[ { "from": "system", "value": "Create a transaction ID from a string UUID\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace PerFi\\Domain\\Transaction;\n\nuse Ramsey\\Uuid\\Uuid;\n\nclass TransactionId\n{\n /**\n * @var Uuid\n */\n private $id;\n\n /...
php
chosen
[ { "from": "system", "value": "Fix rating types updated message\n\nNow we save all the rating types (before we were saving one type at once).\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Controller\\SinglePage\\Dashboard\\System\\Conversations;\nuse \\Concrete\\Core\\Page\\Contro...
php
chosen
[ { "from": "system", "value": "Add licencing info after captions\n" }, { "from": "human", "value": "<?php\n\nglobal $gds_image_licences;\n\n$gds_image_licences = [\n 'ogl' => 'OGL',\n 'cc-by' => 'Attribution',\n 'cc-by-sa' => 'Attribution-ShareAlike',\n 'cc-by-nd' => 'Attribution-NoDerivs',\n...
php
chosen
[ { "from": "system", "value": "Disable Mix for page load tests\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Feature;\n\nuse Illuminate\\Testing\\Fluent\\AssertableJson;\nuse Tests\\TestCase;\n\nclass SimpleRequestsTest extends TestCase\n{\n /**\n ...
php
chosen
[ { "from": "system", "value": "Add ModelNotFound Exception in exception handler\n" }, { "from": "human", "value": "<?php namespace App\\Exceptions;\n\nuse Exception;\nuse Laravel\\Lumen\\Exceptions\\Handler as ExceptionHandler;\n\nclass Handler extends ExceptionHandler {\n\n /**\n * A list...
php
chosen
[ { "from": "system", "value": "Update onRequestError for handling generic errors\n" }, { "from": "human", "value": "<?php\n\n/**\n * @file\n * Contains \\Eloqua\\HttpClient\\Listener\\ErrorListener.\n */\n\nnamespace Eloqua\\HttpClient\\Listener;\n\nuse Eloqua\\HttpClient\\Message\\ResponseMediat...
php
chosen
[ { "from": "system", "value": "Add a 'use' statement for PHP 5.3 bug.\n" }, { "from": "human", "value": "<?php\nnamespace PureMachine\\Bundle\\WebServiceBundle\\WebService;\n\nuse Symfony\\Component\\DependencyInjection\\ContainerAwareInterface;\nuse JMS\\DiExtraBundle\\Annotation\\Inject;\nuse J...
php
chosen
[ { "from": "system", "value": "Add constructor for module tags\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Modules\\Tags\\Domain\\ModuleTag;\n\nuse Backend\\Modules\\Tags\\Domain\\Tag\\Tag;\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * @ORM\\Entity(repositoryClass=\"Backend\\M...
php
chosen
[ { "from": "system", "value": "Change textarea vaule t output raw data\n" }, { "from": "human", "value": "@php\n //php here\n@endphp\n<div class=\"note\">\n\n <div class=\"smart-editor\">\n <p>\n <input name=\"notes_title\" class=\"col-fluid {{ $errors->first('notes_title'...
php
chosen
[ { "from": "system", "value": "Allow to overwrite default Laravel parameters" }, { "from": "human", "value": "<?php\nnamespace Eusonlito\\LaravelPacker;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass PackerServiceProvider extends ServiceProvider\n{\n /**\n\t * Indicates if loading of th...
php
chosen
[ { "from": "system", "value": "BB-562: Add possibility to inject code into forms and view templates\n\n- CR fixes" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\UIBundle\\Event;\n\nuse Symfony\\Component\\EventDispatcher\\Event;\nuse Symfony\\Component\\Form\\FormView;\n\nuse Tw...
php
chosen
[ { "from": "system", "value": "Remove wrongly overridden \"load()\" method but preserve the logic\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the php-phantomjs.\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distribute...
php
chosen
[ { "from": "system", "value": "Fix the invPrices table to actually contain the needed data..\n" }, { "from": "human", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass InvPrices extends AbstractMigration\n{\n /**\n * Change Method.\n *\n * Write your reversible m...
php
chosen
[ { "from": "system", "value": "Add CSRF token to domain-creating form and add spacers.\n" }, { "from": "human", "value": "@extends('layouts.app')\n\n@section('content')\n <form action=\"{{ route('domain.store') }}\" method=\"post\">\n <div class=\"row\">\n <div class=\"col-sm...
php
chosen
[ { "from": "system", "value": "Revert \"Function is used statically, changed function definition to fix error\"\n\nThis reverts commit d4bfa121e6a028f0a8d239e8a4806e44b553e737.\n" }, { "from": "human", "value": "<?php\nclass Kwf_View_Helper_FileSize\n{\n public static function fileSize($filesi...
php
chosen
[ { "from": "system", "value": "Add missing order save after state change before payment redirect\n" }, { "from": "human", "value": "<?php\n\nclass Sign2pay_Payment_Model_Sign2pay extends Mage_Payment_Model_Method_Abstract\n{\n protected $_code = 'sign2pay';\n protected $_formBlockType = 'si...
php
chosen
[ { "from": "system", "value": "Prepend base URL to assets\n" }, { "from": "human", "value": "<!doctype html>\n<html>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <title>{{ $title }}</title>\n <meta name=\"description\" content=\"\"...
php
chosen
[ { "from": "system", "value": "Fix name of step method of a behat test\n" }, { "from": "human", "value": "<?php\n\nnamespace Bauhaus\\Container;\n\nrequire __DIR__ . '/../bootstrap.php';\n\nclass RegistrableContainerUserContext extends ContainerUserBaseContext\n{\n /**\n * @When I register...
php
chosen
[ { "from": "system", "value": "Fix reason for logging blacklist\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Closure;\n\nuse App\\IpBlacklist;\nuse Log;\n\nclass IPBasedBlacklist\n{\n /**\n * Handle an incoming request.\n *\n * @param \\Illum...
php
chosen
[ { "from": "system", "value": "Move to postUpdate, like in non-trl\n" }, { "from": "human", "value": "<?php\nclass Kwc_Root_Category_Trl_Update_20151116UpdatePageNames extends Kwf_Update\n{\n public function update()\n {\n $root = Kwf_Component_Data_Root::getInstance();\n $mod...
php
chosen
[ { "from": "system", "value": "Add index on time field\n" }, { "from": "human", "value": "<?php\n\nclass EnsureIndexes extends Seeder\n{\n public function run()\n {\n Log::ensureIndex(array(\n 'text' => 'text'\n ));\n }\n}\n" }, { "from": "gpt", "value": "<?php\n\nclass ...
php
chosen
[ { "from": "system", "value": "OEE-1164: Add multi-curency validator to available currency form\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\CurrencyBundle\\Provider;\n\nuse Oro\\Bundle\\OrganizationBundle\\Entity\\Organization;\n\ninterface RepositoryCurrencyProviderInterfa...
php
chosen
[ { "from": "system", "value": "Add getInstance method for symfony kernel\n\nthis allows us using symfony services everywhere.\n" }, { "from": "human", "value": "<?php\nuse Symfony\\Component\\HttpKernel\\Kernel;\nuse Doctrine\\Common\\Annotations\\AnnotationRegistry;\n\nabstract class Kwf_Symfony...
php
chosen
[ { "from": "system", "value": "Fix for new entity repository implementation\n" }, { "from": "human", "value": "<?php\r\n\r\nnamespace Plinth\\Entity;\r\n\r\nuse Plinth\\Connector;\r\nuse Plinth\\Exception\\PlinthException;\r\n\r\nclass EntityRepository extends Connector\r\n{\r\n\t/**\r\n\t * @var...
php
chosen
[ { "from": "system", "value": "Add redirectTo - user -> user/profile\n" }, { "from": "human", "value": "<?php\n\nuse Rudolf\\Component\\Routing;\nuse Rudolf\\Component\\Modules;\n\n$module = new Modules\\Module('dashboard');\n$config = $module->getConfig();\n\n$collection->add('user/login', new R...
php
chosen
[ { "from": "system", "value": "Remove attempts to force corrections on the gradient.\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace mcordingley\\Regression\\Linkings;\n\nuse InvalidArgumentException;\nuse mcordingley\\Regression\\Helpers;\n\nfinal class Logistic...
php
chosen
[ { "from": "system", "value": "FIX Ensure that if the dataChangeTracker gets serialized, it can still be string converted later\n" }, { "from": "human", "value": "<?php\n\n/**\n * Description of DataChangeTrackService\n *\n * @author Stephen McMahon <stephen@silverstripe.com.au>\n */\nclass DataC...
php
chosen
[ { "from": "system", "value": "Update Orchestra\\Mail to follow latest update on Messages bundle\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra;\n\nuse \\Closure, \\IoC;\n\nclass Mail {\n\n\t/**\n\t * M...
php
chosen
[ { "from": "system", "value": "Remove use of mocks since we can use functions on their own now\n" }, { "from": "human", "value": "<?php\n\nnamespace Lily\\Test\\Application;\n\nuse Lily\\Application\\MiddlewareApplication;\nuse Lily\\Mock\\Application;\nuse Lily\\Mock\\Middleware;\n\nclass Middle...
php
chosen
[ { "from": "system", "value": "Use EntryRepository\nBetter error messages\n" }, { "from": "human", "value": "<?php\r\n/**\r\n * Created by PhpStorm.\r\n * User: bmeism\r\n * Date: 13.05.2015\r\n * Time: 16:44\r\n */\r\n\r\nnamespace ThePost\\Controller\\Output;\r\n\r\nuse ThePost\\View\\EntryErro...
php
chosen
[ { "from": "system", "value": "Fix DI container when using console controller\n" }, { "from": "human", "value": "<?php\n\nnamespace haqqi\\storm;\n\n\nuse yii\\base\\Application;\nuse yii\\base\\BootstrapInterface;\nuse yii\\base\\Event;\nuse yii\\console\\Controller;\nuse yii\\web\\View;\n\nclas...
php
chosen
[ { "from": "system", "value": "Fix compatibilitp with PHP <7\n" }, { "from": "human", "value": "<?php // vim:ts=4:sw=4:et:fdm=marker\n\nnamespace atk4\\core;\n\n/**\n * All exceptions generated by Agile Toolkti will use this class\n *\n * @license MIT\n * @copyright Agile Toolkit (c) http://agile...
php
chosen
[ { "from": "system", "value": "Use '' instead of null\n" }, { "from": "human", "value": "<?php\n/**\n * @author USAMI Kenta\n * @copyright 2016 USAMI Kenta\n * @license WTFPL\n */\n\n/**\n * @return \\PDO\n */\nfunction db()\n{\n static $db;\n\n if (!$db) {\n $db = new \\PDO(get...
php
chosen
[ { "from": "system", "value": "Sort fields in alphabetical order\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the kompakt/b3d package.\n *\n * (c) Christian Hoegl <chrigu@sirprize.me>\n *\n */\n\nrequire sprintf('%s/bootstrap.php', dirname(__DIR__));\n\nuse Kompakt\\B3d...
php
chosen
[ { "from": "system", "value": "Save data to database whats are submitted by index.ctp form\n" }, { "from": "human", "value": "<?php\nclass UsersController extends AppController {\n\n public function index()\n {\n $this->loadModel('User');\n// $result = $this->User->find('count...
php
chosen
[ { "from": "system", "value": "Fix observer compatybility for magento 1.7.0.2 or less\n" }, { "from": "human", "value": "<?php\n\nclass Sign2pay_Payment_Model_Observer\n{\n /**\n * Modifies block html.\n *\n * @event core_block_abstract_to_html_after\n */\n public function a...
php
chosen
[ { "from": "system", "value": "Fix XSS Issue in preview\n\nfixes #337\n" }, { "from": "human", "value": "<?php\nclass Kwf_Controller_Action_Component_PreviewController extends Kwf_Controller_Action\n{\n public function indexAction()\n {\n $this->view->config = Kwf_Registry::get('conf...
php
chosen
[ { "from": "system", "value": "Add caminho do script js" }, { "from": "human", "value": "<footer class=\"text-center\">\n\t\t\t <div class=\"container\">\n\t\t\t\t\t <p>\n\n\t\t\t\t\t\t\t IFSP\n\t\t\t\t\t </p>\n\t\t\t\t\t <p>\n\t\t\t\t\t\t\t 123 - CEP: 15161-216 - Telefone: +55 (16) 5122-0626\n\t...
php
chosen
[ { "from": "system", "value": "Allow 'ignore' as valid vendor extension severity level\n" }, { "from": "human", "value": "<?php\n\nnamespace webignition\\CssValidatorWrapper\\Configuration;\n\nclass VendorExtensionSeverityLevel {\n \n const LEVEL_ERROR = 'error';\n const LEVEL_WARN = 'wa...
php
chosen
[ { "from": "system", "value": "Redefine order direction constants as native sort constants for convenience\n" }, { "from": "human", "value": "<?php\n\nnamespace Pinq;\n\n/**\n * Enum for ordering direction\n *\n * @author Elliot Levin <elliot@aanet.com.au>\n */\nfinal class Direction\n{\n priv...
php
chosen
[ { "from": "system", "value": "Add error checking to the JsonPost service provider after decoding request content\n" }, { "from": "human", "value": "<?php\n/**\n * Silktide Nibbler. Copyright 2013-2014 Silktide Ltd. All Rights Reserved.\n */\nnamespace Silktide\\LazyBoy\\Provider;\nuse Pimple\\Co...
php
chosen
[ { "from": "system", "value": "Move encode call to template\n" }, { "from": "human", "value": "<?php\n\nnamespace Templates;\n\nuse \\Diarmuidie\\ImageRack\\Image\\TemplateInterface;\n\n/**\n * Sample template to fit and image to 300px x 240px\n */\nclass Small implements TemplateInterface\n{\n ...
php
chosen
[ { "from": "system", "value": "Replace dots with something else on user create and edit screens\n\n" }, { "from": "human", "value": "\n<div class=\"toggle-switch-list dual-column-content\">\n @foreach($roles as $role)\n <div>\n @include('components.custom-checkbox', [\n ...
php
chosen
[ { "from": "system", "value": "Use non default args for proc_open" }, { "from": "human", "value": "<?php\n\nnamespace Aztech\\Process;\n\nclass ProcessBuilder\n{\n\n private $command;\n\n private $args = [];\n\n private $env = null;\n\n public function setCommand($executablePath)\n ...
php
chosen
[ { "from": "system", "value": "Use relative paths for previews to support sites in sub dirs\n\nThe use of an absolute path caused the dataobject previewer iframe to\npoint to an incorrect path when a site was not located directly in the\ndocument root. A 404 page would display in all preview iframes instead\...
php
chosen
[ { "from": "system", "value": "Use the new PingPongModule Repository class\n" }, { "from": "human", "value": "<?php namespace Modules\\Media\\Image;\n\nuse Illuminate\\Contracts\\Config\\Repository;\nuse Pingpong\\Modules\\Module;\n\nclass ThumbnailsManager\n{\n /**\n * @var Module\n *...
php
chosen
[ { "from": "system", "value": "Support all integer types on postgres\n" }, { "from": "human", "value": "<?php\n\nnamespace Nin\\Database\\Results;\n\nuse Nin\\Database\\Result;\n\nclass Postgres extends Result\n{\n\tprivate $res;\n\n\tpublic function __construct($res)\n\t{\n\t\t$this->res = $res;...
php
chosen
[ { "from": "system", "value": "Move the generic session tests in photon to share the code with others backend\n" }, { "from": "human", "value": "<?php\n\nuse \\photon\\config\\Container as Conf;\n\nclass SessionTest extends \\photon\\test\\TestCase\n{\n protected $conf;\n\n public function ...
php
chosen
[ { "from": "system", "value": "Fix relative part of test include path\n" }, { "from": "human", "value": "<?php\n$vxml_library = __DIR__ . '/../' . 'library';\n$vxml_tests = __DIR__;\nset_include_path(get_include_path() . PATH_SEPARATOR . $vxml_library . PATH_SEPARATOR . $vxml_library);\n\nrequire...
php
chosen
[ { "from": "system", "value": "Switch dependencies test to pretend mode\n" }, { "from": "human", "value": "<?php\nnamespace Rocketeer\\Strategies\\Dependencies;\n\nuse Rocketeer\\TestCases\\RocketeerTestCase;\n\nclass PolyglotStrategyTest extends RocketeerTestCase\n{\n\tpublic function testCanIns...
php
chosen
[ { "from": "system", "value": "Mark a new set of tests as incomplete\n" }, { "from": "human", "value": "<?php\n\n/* \n * Functional tests for viewing the profile page\n */\nclass ProfileViewTest extends TestCase\n{\n /**\n * Checks that the username is suitably reflected in the page subhea...
php
chosen
[ { "from": "system", "value": "Add FontAwesome icons to the tool registration.\n" }, { "from": "human", "value": "<?php\n\n$REGISTER_LTI2 = array(\n\"name\" => \"Participant Map using Google\",\n\"short_name\" => \"Course Map\",\n\"description\" => \"This provides a simple Google map for a course...
php
chosen
[ { "from": "system", "value": "ADD passphrase to config file\n" }, { "from": "human", "value": "<?php\n\nreturn\n\n/*\n|--------------------------------------------------------------------------\n| Merchant Settings\n|--------------------------------------------------------------------------\n| A...
php
chosen
[ { "from": "system", "value": "Set some versions to 'alpha'\n" }, { "from": "human", "value": "<?php\n\nnamespace Sabre\\VObject;\n\n/**\n * This class contains the version number for the VObject package\n *\n * @package Sabre\n * @subpackage VObject\n * @copyright Copyright (C) 2007-2012 Rooftop...
php
chosen
[ { "from": "system", "value": "Update also transaction for v4\n" }, { "from": "human", "value": "<?php\n\nnamespace Billplz\\Three\\Bill;\n\nuse Billplz\\Three\\Request;\n\nclass Transaction extends Request\n{\n /**\n * Version namespace.\n *\n * @var string\n */\n protected...
php
chosen
[ { "from": "system", "value": "Use System.get instead of System.import\n\nAll of the modules we import should already be loaded, and we don't\nwant to ever attempt to import them anyway because we do not include a\nPromise polyfill.\n" }, { "from": "human", "value": "<!doctype html>\n<html>\n <h...
php
chosen
[ { "from": "system", "value": "Edit Failure logging to auto-expire, and rename key to a more searchable one\n" }, { "from": "human", "value": "<?php\n/**\n * Redis backend for storing failed Resque jobs.\n *\n * @package\t\tResque/Failure\n * @author\t\tChris Boulton <chris.boulton@interspire.com...
php
chosen
[ { "from": "system", "value": "Add artwork type to LA output [API-280]\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse Illuminate\\Http\\Request;\nuse App\\Models\\Collections\\Artwork;\n\nuse App\\Http\\Controllers\\Controller as BaseController;\n\nclass Link...
php
chosen
[ { "from": "system", "value": "Store values from array to database\n" }, { "from": "human", "value": "<?php\n // $directory = \"nfsshare/audiofiles/\" //directory from where to read file\n $directory = \"C:/Users/sus/Desktop/voicemail/device/999/INBOX/\";\n // get all text files with a ....
php
chosen
[ { "from": "system", "value": "Remove the need to define a default validator\n" }, { "from": "human", "value": "<?php\n\nnamespace Knplabs\\MarkupValidatorBundle\\DependencyInjection\\Compiler;\n\nuse Symfony\\Component\\DependencyInjection\\Reference;\nuse Symfony\\Component\\DependencyInjection...
php
chosen
[ { "from": "system", "value": "Fix order of default index directories\n\nWhen attempting to \"extend\" scaffolds, local required scaffolds might be\noverwritten in the index if they exists in both local and global vendor.\nThis created unwanted situations.\n" }, { "from": "human", "value": "<?php...
php
chosen
[ { "from": "system", "value": "Break bucle cuando encuentra una coincidencia\n" }, { "from": "human", "value": "<?php\nnamespace Aluc\\Tools;\n\nclass Urls {\n private static function get_url() {\n $base_url = static::get_current_uri();\n return $base_url;\n // $routes = a...
php
chosen
[ { "from": "system", "value": "Add temporary class alias for Debugger.\n" }, { "from": "human", "value": "<?php\n/**\n * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)\n * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)\n *\n * Licensed under The MIT Licen...
php
chosen
[ { "from": "system", "value": "Fix highlighting of modules by László (encoding)\n" }, { "from": "human", "value": "<?php\ndefine('CLEANHOME', '/opt/clean');\nerror_reporting(E_ALL);\nini_set('display_errors', 1);\n\nif (!isset($_REQUEST['lib']) || !isset($_REQUEST['mod'])) {\n\tdie('Add ?lib and ...
php
chosen
[ { "from": "system", "value": "Clean parameters from regex named groups\n" }, { "from": "human", "value": "<?php\nnamespace MicroFW\\Routing;\n\nuse MicroFW\\Http\\Response;\n\nclass Router\n{\n /** @var array */\n private $routes;\n\n public function __construct($routes)\n {\n ...
php
chosen
[ { "from": "system", "value": "Check user role in policy.\n\nIf a user is an admin or staff, we want to allow them to see/edit\neverything!\n" }, { "from": "human", "value": "<?php\n\nnamespace Northstar\\Policies;\n\nuse Illuminate\\Auth\\Access\\HandlesAuthorization;\nuse Northstar\\Models\\Use...
php
chosen
[ { "from": "system", "value": "Use simple get \"database connection\"\n" }, { "from": "human", "value": "<?php\n\nnamespace Politix\\PolitikportalBundle\\Model;\n\n// use Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\n\nuse Doctrine\\DBAL\\Connection;\n\n\nclass SourceModel extends Co...
php
chosen
[ { "from": "system", "value": "Add (UN)LINK support to admin group\n" }, { "from": "human", "value": "<?php\n\nnamespace Admin\\Controller;\n\nclass GroupController extends DefaultController\n{\n\n}\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Admin\\Controller;\n\nuse Admin\\C...
php
chosen
[ { "from": "system", "value": "Clarify exception message + add a strict mode switch\n" }, { "from": "human", "value": "<?php\nnamespace Plitz\\Bindings\\Blitz;\n\nclass TemplateFunctions\n{\n /**\n * Helper method which reduces a variable to its requested properties.\n *\n * This f...
php
chosen
[ { "from": "system", "value": "Add return type to `conduit.query`\n\nSummary: Fixes T6950. Adds the return type of Conduit API methods to the `conduit.query` call.\n\nTest Plan: Called `echo '{}' | arc call-conduit conduit.query` and verified that the return types were present in the response.\n\nReviewers: ...
php
chosen
[ { "from": "system", "value": "Add fennecweb namespace to call of webservice in smarty plugin\n" }, { "from": "human", "value": "<?php\nfunction smarty_function_call_webservice($params, &$smarty) {\n $service = WebService::factory($params['path']);\n if ($service[0] != null) {\n $ret...
php
chosen
[ { "from": "system", "value": "Fix path to dist files\n" }, { "from": "human", "value": "<?php\n/**\n * @link https://github.com/nezhelskoy/yii2-highlight\n * @copyright Copyright (c) 2014 Dmitry Nezhelskoy\n * @license \"BSD-3-Clause\"\n */\n\nnamespace nezhelskoy\\highlight;\n\nuse yii\\web\\As...
php
chosen
[ { "from": "system", "value": "Set default component group view to 1" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Cachet.\n *\n * (c) Alt Three Services Limited\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed w...
php
chosen
[ { "from": "system", "value": "Add comment to main plugin file\n" }, { "from": "human", "value": "<?php\nnamespace Craft;\n\nclass WistiaPlugin extends BasePlugin\n{\n\tpublic function getName()\n\t{\n\t\treturn 'Wistia';\n\t}\n\n\tpublic function getDescription()\n\t{\n\t\treturn 'Manage videos ...
php
chosen
[ { "from": "system", "value": "Add default parameter limits to distribution to be overridden by implementing classes.\n" }, { "from": "human", "value": "<?php\nnamespace MathPHP\\Probability\\Distribution;\n\nuse MathPHP\\Functions\\Support;\n\nabstract class Distribution\n{\n /**\n * Cons...
php
chosen
[ { "from": "system", "value": "[2.7][DX] Use constant message contextualisation for deprecations\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,...
php
chosen
[ { "from": "system", "value": "Remove not needed stuff from PHPUnit bootstrap\n" }, { "from": "human", "value": "<?php\n/*\n * This file bootstraps the test environment.\n */\nnamespace Doctrine\\Tests;\n\nerror_reporting(E_ALL | E_STRICT);\n\nif (file_exists(__DIR__ . '/../../../vendor/autoload....
php
chosen
[ { "from": "system", "value": "Fix static db connection. Singleton pattern.\n" }, { "from": "human", "value": "<?php\n/**\n * DronePHP (http://www.dronephp.com)\n *\n * @link http://github.com/Pleets/DronePHP\n * @copyright Copyright (c) 2016 DronePHP. (http://www.dronephp.com)\n * @license ...
php
chosen
[ { "from": "system", "value": "Remove unnecessary default parameter values\n" }, { "from": "human", "value": "<?php\n\nnamespace Amp\\Internal;\n\nuse Interop\\Async\\Loop;\n\n/**\n * Stores a set of functions to be invoked when an awaitable is resolved.\n *\n * @internal\n */\nclass WhenQueue {\...
php
chosen
[ { "from": "system", "value": "Sort the staff by their order attr\n" }, { "from": "human", "value": "<?php \ndefined('C5_EXECUTE') or die(\"Access Denied.\");\nLoader::model('user_list');\n$av = Loader::helper('concrete/avatar');\n$ul = new UserList();\n$ul->filterByGroup('Staff');\n$ul->sortBy('...
php
chosen
[ { "from": "system", "value": "Make the example more realistic ..." }, { "from": "human", "value": "<?php\n\n\t/*\n\t * Inquire all SYSTEM channels from queuemanager PIGEON.\n\t * MQWeb runs on localhost and is listening on port 8081. \n\t */\n\t$url = \"http://localhost:8081/api/channel/inquire/...
php
chosen
[ { "from": "system", "value": "Add Pages to Refresh Tables for Upgrade\n\nAdd Pages to Refresh Tables for Upgrade\n" }, { "from": "human", "value": "<?\n\ndefined('C5_EXECUTE') or die(\"Access Denied.\");\nclass ConcreteUpgradeVersion562Helper {\n\n\t\n\tpublic $dbRefreshTables = array(\n\t\t'Que...
php
chosen
[ { "from": "system", "value": "Generalize database component to work in dev and in prod\n" }, { "from": "human", "value": "<?php\n\n function getDb() {\n $mongoClient = new MongoClient();\n $db = $mongoClient->actuary;\n return $db;\n }\n\n?>" }, { "from": "gpt", "value": "...
php
chosen
[ { "from": "system", "value": "Use singular table naming in Many To Many migration\n" }, { "from": "human", "value": "use Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass {{ucfirst($first)}}{{ucfirst($second)}} extends Migration\n{\n /**\n ...
php
chosen