conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update script file name.\nLaravel Elixir now outputs scripts using their source name, rather than\nrenaming to `bundle.js`, so we need to update our script tag.\n" }, { "from": "human", "value": "<script type=\"text/javascript\" charset=\"utf-8\">\n function load...
php
chosen
[ { "from": "system", "value": "Fix group by for mysql 5.7\n" }, { "from": "human", "value": "<?php namespace Mja\\Mail\\Controllers;\n\nuse BackendMenu;\nuse Backend\\Classes\\Controller;\nuse Mja\\Mail\\Models\\Email;\nuse Mja\\Mail\\Models\\EmailOpens;\n\n/**\n * Back-end Controller\n */\nclass...
php
chosen
[ { "from": "system", "value": "Add new line at the end\n" }, { "from": "human", "value": "<?php\n\n/**\n * This file is part of lcms.\n * \n * Plugin Manager.\n * \n * @author Mikołaj Pich <m.pich@outlook.com>\n * @package lcms\\Plugins\n * @version 0.1\n */\n\nnamespace lcms\\Plugins;\n\nclass P...
php
chosen
[ { "from": "system", "value": "Update changed activity type Fill out pum CV label\n" }, { "from": "human", "value": "<?php\n\n/**\n * Collection of upgrade steps.\n */\nclass CRM_Expertapplication_Upgrader extends CRM_Expertapplication_Upgrader_Base {\n\n public function upgrade_1001() {\n $t...
php
chosen
[ { "from": "system", "value": "Add karma bot to inline data whitelist\n" }, { "from": "human", "value": "<?php\nnamespace App\\Middlewares;\n\nuse App\\Message;\nuse App\\Gitter\\Middleware\\MiddlewareInterface;\n\n/**\n * Class InlineDataMiddleware\n * @package App\\Gitter\\Middleware\n */\nclas...
php
chosen
[ { "from": "system", "value": "Add helper method for parsing post text\n" }, { "from": "human", "value": "<?php\n\nnamespace WPAL\\Wordpress;\n\nclass Helpers\n{\n\tpublic function stripSlashesDeep($value)\n\t{\n\t\treturn stripslashes_deep($value);\n\t}\n\n\tpublic function numberFormatI18n($num...
php
chosen
[ { "from": "system", "value": "Add newline for migration of charges type\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass ModifyChargeIdType extends Migrat...
php
chosen
[ { "from": "system", "value": "Allow URL import of photos containing a question mark\n" }, { "from": "human", "value": "<?php\n\n/**\n * Returns the extension of the filename (path or URI) or an empty string.\n * @return string Extension of the filename starting with a dot.\n */\nfunction getExte...
php
chosen
[ { "from": "system", "value": "Sort using the display_order when we present the fields from a group\n" }, { "from": "human", "value": "<?php\n\nnamespace MyBB\\Core\\Presenters;\n\nuse Illuminate\\Support\\Facades\\App;\nuse McCool\\LaravelAutoPresenter\\BasePresenter;\n\nclass ProfileFieldGroup ...
php
chosen
[ { "from": "system", "value": "Make possible to have no folder without returnig weird errors\n" }, { "from": "human", "value": "<?php\n\nclass SourceController extends BaseController {\n\n public function show($path = null)\n {\n if(is_dir(base_path() . \"/query/\" . $path)) // Check...
php
chosen
[ { "from": "system", "value": "Change dependencies to load only in backend\n" }, { "from": "human", "value": "<?php\nclass Kwc_Basic_Link_Trl_Component extends Kwc_Abstract_Composite_Trl_Component\n{\n public static function getSettings($mainComponentClass)\n {\n $ret = parent::getSe...
php
chosen
[ { "from": "system", "value": "Make configuration available in layout\n" }, { "from": "human", "value": "<?php\n\n\tnamespace ChickenWire;\n\n\tuse ChickenWire\\Core\\Mime;\n\n\tclass Layout\n\t{\n\n\t\tprivate $_content;\n\n\t\tprotected $controller;\n\n\t\tpublic function __construct($layout, $...
php
chosen
[ { "from": "system", "value": "Remove unneeded abstract method implementation\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sonata project.\n *\n * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>\n *\n * For the full copyright and license information, please vie...
php
chosen
[ { "from": "system", "value": "Use $this instead of self when accessing const\n" }, { "from": "human", "value": "<?php\n/**\n * Class for a dice session\n *\n * Encapsulates the saving and restoring of dice\n */\nclass CDiceSession\n{\n const SESS_VAR = 'dice';\n\n private $dice;\n\n public fu...
php
chosen
[ { "from": "system", "value": "Change in the acme command\n" }, { "from": "human", "value": "<?php\n\nnamespace Ketmo\\Command;\n\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nu...
php
chosen
[ { "from": "system", "value": "Add new meta field for healthy hearing, add id attribute to heading.\n\n" }, { "from": "human", "value": "<?php\n/**\n * Single Re Google Review\n *\n * @package Google Review\n */\n\nget_header();\n\n$google_review = get_post_meta( $post->ID, 're-google-review-go...
php
chosen
[ { "from": "system", "value": "Edit page urls to remove .php\n" }, { "from": "human", "value": "<?php \ndefine('ENVIRONMENT_LOCAL', 0);\ndefine('ENVIRONMENT_CURRENT', ENVIRONMENT_LOCAL);\n\ndefine('DOMAIN', getenv('MULTISITE_DOMAIN'));\ndefine('BASE_URL','http://movies.'.DOMAIN.'/');\ndefine('SUP...
php
chosen
[ { "from": "system", "value": "Add labels to input fields\n" }, { "from": "human", "value": "@extends('home.master')\n\n@section('title')\n Login\n@stop\n\n@section('content')\n <div class=\"row\">\n \t<div class=\"col-md-8 col-md-offset-2\">\n \t\t<form action=\"\" me...
php
chosen
[ { "from": "system", "value": "Return this for chaining methods\n" }, { "from": "human", "value": "<?php\nnamespace Aluc\\Views;\n\n\nuse Aluc\\Service\\Laboratorio;\nuse Aluc\\Service\\Moderador;\nuse Aluc\\Tools\\TemplateGenerator;\n\nclass ModeradoresView {\n private $data;\n private $te...
php
chosen
[ { "from": "system", "value": "Fix null xsd schema on config xml reading\n" }, { "from": "human", "value": "<?php\n\nnamespace CtiDigital\\Configurator\\Model\\Configurator\\Config;\n\nuse Magento\\Framework\\Config\\SchemaLocatorInterface;\nuse Magento\\Framework\\Module\\Dir;\n\nclass SchemaLoc...
php
chosen
[ { "from": "system", "value": "Check if Skill is found in Skill block\n" }, { "from": "human", "value": "\n<?php if ($skill): ?>\n\n <?php foreach ($skill['photos'] as $photo): ?>\n <img src=\"<?php echo h($photo['thumbnail']); ?>_small\" class=\"img-responsive\" alt=\"\">\n <?ph...
php
chosen
[ { "from": "system", "value": "Connect with MongoClient if exists. Class found in driver >=1.3.0. Mongo class deprecated\n" }, { "from": "human", "value": "<?php\n\nnamespace PhlyMongo;\n\nuse Mongo;\nuse Zend\\ServiceManager\\FactoryInterface;\nuse Zend\\ServiceManager\\ServiceLocatorInterface;\...
php
chosen
[ { "from": "system", "value": "Add QOS setting to blocking call to support parallel processing\n" }, { "from": "human", "value": "<?php\n/**\n * mbc-logging-gateway\n *\n * Collect user import activity from the userImportExistingLoggingQueue. Update\n * the LoggingAPI / database with import activ...
php
chosen
[ { "from": "system", "value": "Fix dependency injection in Facebook command\n" }, { "from": "human", "value": "<?php\n\nnamespace Stratedge\\PassportFacebook\\Console;\n\nuse Illuminate\\Console\\Command;\n\nclass FacebookCommand extends Command\n{\n /**\n * The name and signature of the c...
php
chosen
[ { "from": "system", "value": "Correct background image manipulation doc" }, { "from": "human", "value": "<?php\n\nnamespace League\\Glide\\Manipulators;\n\nuse Intervention\\Image\\Image;\nuse League\\Glide\\Manipulators\\Helpers\\Color;\n\n/**\n * @property string $bg\n */\nclass Background ext...
php
chosen
[ { "from": "system", "value": "Fix path to autoload file\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Contracts\\Console\\Kernel;\nuse Symfony\\Component\\Console\\Output\\ConsoleOutput;\n\nrequire __DIR__ . '/autoload.php';\n\n$app = require __DIR__ . '/app.php';\n\n/** @var \\Pte...
php
chosen
[ { "from": "system", "value": "Add phpdoc-style comments to SearchTerm\n" }, { "from": "human", "value": "<?php\n\nnamespace SearchApi\\Models;\n\n/**\n * Class SearchTerm - A search term is a basic unit that will be used to build a query for\n * Search providers.\n */\nclass SearchTerm {\n publ...
php
chosen
[ { "from": "system", "value": "Add tra to plugin info\n\ngit-svn-id: 9bac41f8ebc9458fc3e28d41abfab39641e8bd1c@31052 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "human", "value": "<?php\n// (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project\n// \n// All Rights Reser...
php
chosen
[ { "from": "system", "value": "[DoctrineBridge] Fix log of non utf8 data\n\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LICENSE...
php
chosen
[ { "from": "system", "value": "Change Twilio message from French to English.\n" }, { "from": "human", "value": "<Response>\n <Say voice=\"woman\" language=\"fr\" >\n Ne quittez pas, s'il vous plaît.\n </Say>\n <Dial>\n <Conference\n waitUrl=\"http://twimlets.com/...
php
chosen
[ { "from": "system", "value": "Use attributesToArray instead of getAttributes\n" }, { "from": "human", "value": "<?php\n\nnamespace Chromabits\\Illuminated\\Database\\Articulate;\n\nuse Chromabits\\Nucleus\\Foundation\\BaseObject;\nuse Chromabits\\Nucleus\\Meditation\\Exceptions\\FailedCheckExcep...
php
chosen
[ { "from": "system", "value": "Fix id column in migration\n" }, { "from": "human", "value": "<?php\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreatePhpdebugbarStorageTable extends Migration\n{...
php
chosen
[ { "from": "system", "value": "Add setUP and tearDown return type\n" }, { "from": "human", "value": "<?php\n\n/**\n * Testcase_Promotions definition\n *\n * @package Functest\n * @author Ivan Kerin\n * @author Yasen Yanev\n * @copyright (c) 2011-2013 Despark Ltd.\n */\nabstract class Testcase_Pr...
php
chosen
[ { "from": "system", "value": "Add a link to the user profile\n" }, { "from": "human", "value": "@extends('layouts.app')\n\n@section('title', 'Leaderboard')\n\n@section('content')\n\t<h1>Leaderboard</h1>\n\n\t<div class=\"row\">\n\t@foreach ($users as $user)\n\t\t<div class=\"col-lg-6\">\n\t\t\t<...
php
chosen
[ { "from": "system", "value": "Support table custom table prefix\n\nLaravel automatically adds a table prefix to any table names, so we\nneed to wrap our aliased table in DB::raw.\n" }, { "from": "human", "value": "<?php namespace Flarum\\Core\\Notifications;\n\nuse Flarum\\Core\\Users\\User;\n\n...
php
chosen
[ { "from": "system", "value": "Add button for creating earning to earnings' index view\n" }, { "from": "human", "value": "@extends('layout')\n\n@section('title', __('general.earnings'))\n\n@section('body')\n <div class=\"wrapper my-3\">\n <h2>{{ __('general.earnings') }}</h2>\n <...
php
chosen
[ { "from": "system", "value": "View: Remove array_key_exists from flash partial\n" }, { "from": "human", "value": "@foreach (session('flash_notification', collect())->toArray() as $message)\n @if ($loop->first)\n <div class=\"container\">\n @endif\n @if ($message['overlay'])\n @include('part...
php
chosen
[ { "from": "system", "value": "Create resource Tag and Task\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Application Routes\n|--------------------------------------------------------------------------\n|\n| Here is...
php
chosen
[ { "from": "system", "value": "Implement interface & Adding Authorizable Trait.\n" }, { "from": "human", "value": "<?php namespace App\\Models;\n\nuse App\\Bases\\Model;\nuse Illuminate\\Auth\\Authenticatable;\nuse Illuminate\\Auth\\Passwords\\CanResetPassword;\nuse Illuminate\\Contracts\\Auth\\A...
php
chosen
[ { "from": "system", "value": "Disable model events when saving extra properties in Media::updated event\n" }, { "from": "human", "value": "<?php\n\nnamespace Spatie\\MediaLibrary;\n\nuse Spatie\\MediaLibrary\\Models\\Media;\nuse Illuminate\\Database\\Eloquent\\SoftDeletes;\nuse Spatie\\MediaLibr...
php
chosen
[ { "from": "system", "value": "Change default listening port to 9812\n" }, { "from": "human", "value": "<?php\nreturn [\n 'class' => '\\blink\\server\\SwServer',\n 'bootstrap' => __DIR__ . '/../bootstrap.php',\n 'host' => '0.0.0.0',\n 'port' => 7788,\n];\n" }, { "from": "gpt",...
php
chosen
[ { "from": "system", "value": "Use request dependency injection instead of Input facade to retrieve request POST parameters\n" }, { "from": "human", "value": "<?php\n\nRoute::post('laralytics', function (\\Bsharp\\Laralytics\\Laralytics $laralytics) {\n\n dd(Input::all());\n $laralytics->pa...
php
chosen
[ { "from": "system", "value": "Remove final to constructor to allow constructor overloading\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Phraseanet SDK.\n *\n * (c) Alchemy <info@alchemy.fr>\n *\n * For the full copyright and license information, please view the LICENSE...
php
chosen
[ { "from": "system", "value": "Add a link icon to the individual bookmark\n" }, { "from": "human", "value": "@extends('master')\n\n@section('title')\nBookmarks «\n@stop\n\n@section('content')\n<div class=\"h-feed\">\n@foreach($bookmarks as $bookmark)\n <div class=\"h-entry\">\n <a class=\"u-b...
php
chosen
[ { "from": "system", "value": "Update Conversation's form : add field recipients\n" }, { "from": "human", "value": "<?php\n\nnamespace FireDIY\\PrivateMessageBundle\\Form;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\Extension\\Core\\Type\\SubmitType;\nuse Symfony...
php
chosen
[ { "from": "system", "value": "[INT-205] Add deprecation error for using `addLicenseKey` after Shopware 5.5.\n" }, { "from": "human", "value": "<?php\n\nnamespace K10rProject\\Helpers;\n\nuse Shopware\\Bundle\\PluginInstallerBundle\\Service\\PluginLicenceService;\nuse Shopware\\Components\\Model\...
php
chosen
[ { "from": "system", "value": "Use Route instead of $router\n" }, { "from": "human", "value": "<?php\n\nuse Bausch\\LaravelCornerstone\\Http\\Controllers\\KeepAliveController;\n\n$router->get('lbausch/laravel-cornerstone/keepalive', KeepAliveController::class.'@keepalive');\n" }, { "from"...
php
chosen
[ { "from": "system", "value": "Fix class mapping for ShippingAddress field in PayPal entity\n" }, { "from": "human", "value": "<?php\nnamespace MangoPay;\n/**\n * Class represents PayPal type for mean of payment in PayIn entity\n */\nclass PayInPaymentDetailsPaypal extends Libraries\\Dto implemen...
php
chosen
[ { "from": "system", "value": "Add auto detedt url from model scenario\n" }, { "from": "human", "value": "<?php\n\n/*\n * X-editable extension for Yii2\n *\n * @link https://github.com/hiqdev/yii2-x-editable\n * @package yii2-x-editable\n * @license BSD-3-Clause\n * @copyright Copyright ...
php
chosen
[ { "from": "system", "value": "Change title to 'Popular Posts'\n" }, { "from": "human", "value": "<?php\nclass com_meego_planet_controllers_top\n{\n public function __construct(midgardmvc_core_request $request)\n {\n $this->request = $request;\n }\n\n public function get_items(...
php
chosen
[ { "from": "system", "value": "Set searchableEntity Id in constructor\nIn order to break earlier if there is no primary key\n" }, { "from": "human", "value": "<?php\n\nnamespace Algolia\\SearchBundle\\Searchable;\n\nuse Algolia\\SearchBundle\\Normalizer\\SearchableArrayNormalizer;\nuse Symfony\\C...
php
chosen
[ { "from": "system", "value": "Fix author when creating new article\n" }, { "from": "human", "value": "<?php\n/*\n * Copyright 2017 Jack Sleight <http://jacksleight.com/>\n * This source file is subject to the MIT license that is bundled with this package in the file LICENCE.md. \n */\n\nnamespac...
php
chosen
[ { "from": "system", "value": "Update provider for Silex 2.0\n" }, { "from": "human", "value": "<?php\n\nnamespace TM\\Provider;\n\nuse Silex\\Application;\nuse Silex\\ServiceProviderInterface;\nuse TM\\Service\\SitemapGenerator;\n\n/**\n * @package TM\\Provider\n */\nclass SitemapServiceProvider...
php
chosen
[ { "from": "system", "value": "Fix array syntax for PHP5.3\n" }, { "from": "human", "value": "<?php\n\nnamespace spec\\GrumPHP\\Runner;\n\nuse GrumPHP\\Runner\\TaskResult;\nuse GrumPHP\\Task\\Context\\ContextInterface;\nuse GrumPHP\\Task\\TaskInterface;\nuse PhpSpec\\ObjectBehavior;\n\nclass Task...
php
chosen
[ { "from": "system", "value": "Add construction counts to the qualities catalog.\n" }, { "from": "human", "value": "@section('title')\nQualities - Cataclysm: Dark Days Ahead\n@endsection\n<h1>Qualities</h1>\n\n<div class=\"row\">\n <div class=\"col-md-3\">\n<ul class=\"nav nav-pills nav-stacked\...
php
chosen
[ { "from": "system", "value": "Allow get or post for callback\n" }, { "from": "human", "value": "<?php\n\nRoute::group(['middleware' => ['web'], 'namespace' => '\\\\Konsulting\\\\Butler\\\\Controllers'], function () {\n Route::get('/auth/provider/confirm/{token}', 'AuthController@confirm')->na...
php
chosen
[ { "from": "system", "value": "Remove redundant routes that are now implemented using annotations.\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Web Routes\n|----------------------------------------------------------...
php
chosen
[ { "from": "system", "value": "Disable most Nova functions for DuesTransactions\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Policies;\n\nuse App\\User;\nuse App\\DuesTransaction;\nuse Illuminate\\Auth\\Access\\HandlesAuthorization;\n\nclass DuesTransactionPolicy\n{\n use Handles...
php
chosen
[ { "from": "system", "value": "Use some PHP 5.4 constants unconditionally\n\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LICENS...
php
chosen
[ { "from": "system", "value": "Add an option to the c5:clear-cache CLI command to keep/delete thumbnails\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Core\\Console\\Command;\n\nuse Concrete\\Core\\Console\\Command;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Sym...
php
chosen
[ { "from": "system", "value": "Add soap mapper exception if action was invalid name\n" }, { "from": "human", "value": "<?php\nnamespace GusApi\\Client;\n\n/**\n * Class SoapActionMapper\n * @package GusApi\\Client\n */\nclass SoapActionMapper\n{\n public const PUBLIC_NAMESPACE = 'http://CIS/BI...
php
chosen
[ { "from": "system", "value": "Update jwtauth service provider @ fix namespace error.\n" }, { "from": "human", "value": "<?php namespace JwtAuth;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass JwtAuthServiceProvider extends ServiceProvider\n{\n\n /**\n * Indicates if loading of the ...
php
chosen
[ { "from": "system", "value": "Add input arguments to password_hash function to protect from internal changes\n\n[#167682628]\n\nCo-authored-by: David Freilich <0106e5ee349bb58d7c51800b6acf5b57cf80aef6@pivotal.io>\n" }, { "from": "human", "value": "hI<?php\n print('password hash of \"hello-world...
php
chosen
[ { "from": "system", "value": "Check that .env file was generate as part of install\n" }, { "from": "human", "value": "<?php\nnamespace Tests\\Unit;\n\nuse \\Dotenv;\n/**\n * Dotenv Test\n * \n * @author Leonid Mamchenkov <l.mamchenkov@qobo.biz>\n */\nclass DotenvTest extends \\PHPUnit_Framework_...
php
chosen
[ { "from": "system", "value": "Update service to use new IoC container.\n" }, { "from": "human", "value": "<?php namespace Craft;\n\nclass SmartdownService extends BaseApplicationComponent\n{\n protected $parser;\n\n /**\n * Initialises the parser instance.\n */\n public function...
php
chosen
[ { "from": "system", "value": "Improve performance by prefixing all global functions calls with \\ to\nskip the look up and resolve process and go straight to the global\nfunction\n\nSigned-off-by: Mior Muhammad Zaki <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "v...
php
chosen
[ { "from": "system", "value": "Set to busy when terminating so we don't accidently use it\n" }, { "from": "human", "value": "<?php\n\nnamespace WyriHaximus\\React\\ChildProcess\\Pool;\n\nuse Evenement\\EventEmitterTrait;\nuse React\\Promise\\PromiseInterface;\nuse WyriHaximus\\React\\ChildProcess...
php
chosen
[ { "from": "system", "value": "Add regex validation for the id when editing movies\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Modules\\MediaLibrary\\Domain\\MediaItem;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\Extension\\Core\\Type\\TextType...
php
chosen
[ { "from": "system", "value": "Set verification image height and width in html\n" }, { "from": "human", "value": "<?php\n\nclass CaptchaField extends TextField {\n\n\tfunction __construct($name, $title = null, $value = \"\", $form = null){\n\t\tparent::__construct($name, $title, $value, $form);\n...
php
chosen
[ { "from": "system", "value": "Add support for \"-\" in find expressions.\n" }, { "from": "human", "value": "<?php\nnamespace Tzander\\PageFactory;\n\n/*\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n *\n * @copyr...
php
chosen
[ { "from": "system", "value": "Add siteUrl Twig global var\n" }, { "from": "human", "value": "<?php\r\n\r\nuse Slim\\Http\\Uri;\r\nuse Slim\\Views\\Twig;\r\n\r\n$container['view'] = function ($container) {\r\n\t$view = new Twig(__DIR__ . '/../resources/views', [\r\n\t\t'cache' => $container->sett...
php
chosen
[ { "from": "system", "value": "Edit file config to connect database\n" }, { "from": "human", "value": "<?php\n\tclass Config{\n\t\t// Config database \n\t\tpublic static $host='localhost';\n\t\tpublic static $db_user='root';\n\t\tpublic static $db_password='';\n\t\tpublic static $db_name='project...
php
chosen
[ { "from": "system", "value": "Fix reference to class property\n" }, { "from": "human", "value": "<?php\n\nnamespace BryanCrowe\\Growl;\n\nclass Growl\n{\n protected $builder;\n\n protected $args = array();\n\n public function __construct($builder)\n {\n $this->builder = $build...
php
chosen
[ { "from": "system", "value": "Fix default value for `get_short_url`\n" }, { "from": "human", "value": "<?php\n\n/**\n * Get short url from a post.\n *\n * @param int $post_id\n * @param bool $only_short_url Default false\n *\n * @return string|null\n */\nfunction get_short_url( $post_id, $only_s...
php
chosen
[ { "from": "system", "value": "Add some docs to the sessions interface.\n" }, { "from": "human", "value": "<?php\n/**\n * Copyright (c) 2013 Thomas Tanghus (thomas@tanghus.net)\n * @author Thomas Tanghus\n * @author Robin Appelman\n * This file is licensed under the Affero General Public License ...
php
chosen
[ { "from": "system", "value": "Remove (for now) metadat validation of objectType fields (metadataEntry)" }, { "from": "human", "value": "<?php\n/**\n * @package plugins.metadata\n * @subpackage model\n */\nclass MetadataEntryPeer extends entryPeer implements IMetadataPeer\n{\n public static fu...
php
chosen
[ { "from": "system", "value": "Set release version to 0.8.2\n" }, { "from": "human", "value": "<?php\n\nrequire_once __DIR__ . '/Zigra/Core.php';\n/**\n * This class only exists for backwards compatability. All code was moved to\n * Zigra_Core and this class extends Zigra_Core\n *\n * @author Ma...
php
chosen
[ { "from": "system", "value": "Update shop factory to reflect new schema [WEB-2002]\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Shop Factory\n|-----------------------------------------------------------------------...
php
chosen
[ { "from": "system", "value": "Replace InvocationCounter class with basic Closure.\n" }, { "from": "human", "value": "<?php\nnamespace RetryHandler;\n\nuse \\RetryHandler\\Proc;\n\nuse \\Exception;\n\nclass InvocationCounter\n{\n protected $_count = 0;\n\n protected $_proc;\n\n public fu...
php
chosen
[ { "from": "system", "value": "Fix blog page when no image is set\n" }, { "from": "human", "value": "<?php defined('C5_EXECUTE') or die(\"Access Denied.\");\n$dh = Loader::helper('concrete/dashboard');\n$im = Loader::helper('image');\n$this->inc('elements/header.php'); \n$headImage = $c->getAttr...
php
chosen
[ { "from": "system", "value": "Fix PHPdoc that was causing PhpStorm warnings in AdapterFactory\n" }, { "from": "human", "value": "<?php\n\nnamespace Hodor\\MessageQueue\\Adapter;\n\ninterface ConfigInterface\n{\n /**\n * @return string\n */\n public function getAdapterFactoryConfig(...
php
chosen
[ { "from": "system", "value": "Improve the exception message for JSON parsing exceptions.\n\nSummary: Provide contextual information relating to JSON parser exceptions.\n\nTest Plan: See D9679.\n\nReviewers: epriestley, #blessed_reviewers\n\nReviewed By: epriestley, #blessed_reviewers\n\nSubscribers: epriest...
php
chosen
[ { "from": "system", "value": "Order articles by recently updated.\n" }, { "from": "human", "value": "<?php namespace App\\Http\\Controllers;\n\nclass DashboardController extends BaseController {\n\n\tpublic function __construct()\n\t{\n\t\t$this->middleware('auth');\n\n parent::__construc...
php
chosen
[ { "from": "system", "value": "Add Go Back in User Creation From\n" }, { "from": "human", "value": "<?php\n\nuse yii\\helpers\\Html;\nuse yii\\widgets\\ActiveForm;\n\n/* @var $this yii\\web\\View */\n/* @var $model common\\models\\UserInfo */\n\n$this->title = 'Create User Info';\n$this->params['...
php
chosen
[ { "from": "system", "value": "Fix logo path and markup\n" }, { "from": "human", "value": "<!doctype html>\n<html>\n <head>\n <link rel=\"stylesheet\" href=\"<?php echo $my_url; ?>/static/pure-min.css\">\n <link rel=\"stylesheet\" href=\"<?php echo $my_url; ?>/static/grids-respon...
php
chosen
[ { "from": "system", "value": "Enable functional tests to retrieve config\n" }, { "from": "human", "value": "<?php\nrequire 'vendor/autoload.php';\n" }, { "from": "gpt", "value": "<?php\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\nfunction getConfig(): array\n{\n return requi...
php
chosen
[ { "from": "system", "value": "Remove $RUNTIME_NOAPPS - setting to false was not enough" }, { "from": "human", "value": "<?php\n\nglobal $RUNTIME_NOAPPS;\n$RUNTIME_NOAPPS = false;\n\ndefine('PHPUNIT_RUN', 1);\n\nrequire_once __DIR__.'/../lib/base.php';\n\nif(!class_exists('PHPUnit_Framework_TestC...
php
chosen
[ { "from": "system", "value": "Make sure that PHPUNIT_COMPOSER_INSTALL is always defined, even in tests that are run in isolation from a PHPT test\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n/*\n * This file is part of PHPUnit.\n *\n * (c) Sebastian Bergmann <sebastian@phpu...
php
chosen
[ { "from": "system", "value": "Fix double library in include path instead of tests folder\n" }, { "from": "human", "value": "<?php\n$vxml_library = dirname(__DIR__) . '/library';\n$vxml_tests = __DIR__;\nset_include_path(get_include_path() . PATH_SEPARATOR . $vxml_library . PATH_SEPARATOR . $vxml...
php
chosen
[ { "from": "system", "value": "Fix header for CSV downloads\n" }, { "from": "human", "value": "<?php\nnamespace CodeDay\\Clear\\Http\\Controllers\\Manage\\Batch;\n\nuse \\CodeDay\\Clear\\Models;\nuse \\CodeDay\\Clear\\Services;\n\nclass CsvController extends \\CodeDay\\Clear\\Http\\Controller {\n...
php
chosen
[ { "from": "system", "value": "MenuApi: Fix link-intern on invisible page\n" }, { "from": "human", "value": "<?php\nclass Kwc_Basic_LinkTag_Intern_ApiContent implements Kwf_Component_ApiContent_Interface\n{\n public function getContent(Kwf_Component_Data $data)\n {\n $targetData = $d...
php
chosen
[ { "from": "system", "value": "Add require for global installation\n" }, { "from": "human", "value": "<?php\n\nif ( !defined( 'WP_CLI' ) ) return;\n\nglobal $argv;\n\n$env = $argv[1];\n\n$config = array();\n\n$config_path = getenv( 'HOME' ) . '/.wp-cli/config.yml';\n\nif ( is_readable( $config_pa...
php
chosen
[ { "from": "system", "value": "Improve wording of german translation file" }, { "from": "human", "value": "<?php\n\nreturn [\n 'Load more items' => 'Weitere eintrge laden',\n 'You reached the end' => 'Sie sind am Ende angekommen'\n];" }, { "from": "gpt", "value": "<?php\n\nretur...
php
chosen
[ { "from": "system", "value": "Simplify indexes for managed installs\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Capsule\\Manager as Capsule;\n\nclass Managedinstalls extends ...
php
chosen
[ { "from": "system", "value": "Handle case of client closing conn before worker replies\n" }, { "from": "human", "value": "<?php\n\nrequire 'vendor/autoload.php';\n\n$loop = new React\\EventLoop\\StreamSelectLoop();\n$socket = new React\\Socket\\Server($loop);\n$http = new React\\Http\\Server($so...
php
chosen
[ { "from": "system", "value": "Reduce the size of the jamendo album cover images requested since we don't use them for anything larger than 160x160 at the moment\n" }, { "from": "human", "value": "<?php\nfunction resolve_external_url($url) {\n\tif (substr($url, 0, 10) == \"jamendo://\") {\n\t\tre...
php
chosen
[ { "from": "system", "value": "Use prod env in prod, and .env.docker as base. Also call migrations and seed\n" }, { "from": "human", "value": "@servers(['web' => 'root@162.243.246.75'])\n\n@task('deploy', ['on' => 'web'])\n cd /var/www/nestor-qa/public_html\n git fetch --all\n git reset...
php
chosen
[ { "from": "system", "value": "Add credit for Map Icons Collection" }, { "from": "human", "value": "<h3>Map Demo</h3>\n<div id=\"map1\" style=\"width: 100%; height: 300px\"></div>\n<em>Powered by LeafletJS and Google API</em>\n<h4>PHP</h4>\n<pre>\n$map = app()->createMap()->set('lon', 0)->set('la...
php
chosen
[ { "from": "system", "value": "Change name of post type\n" }, { "from": "human", "value": "<?php\nadd_action('init', 'register_post_types');\nfunction register_post_types() {\n/**** NEWSLETTER POST TYPE ****/\n\t$labels = array(\n\t\t'name' => _x('Newsletters', 'post type general name'),\n\t\t'si...
php
chosen
[ { "from": "system", "value": "Allow caller to define log level for listener\n\nThe current implementation always uses debug as log level. This makes\nthe logger less flexible as it requires the caller to use debug log\nlevel for all logging to see the output.\n\nThis change allows the caller to set the desi...
php
chosen