conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add trace info for debug mode on throwing an ErrorException\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: Alex\n * Date: 14/04/2019\n * Time: 12:48\n */\n\nnamespace vr\\api\\components;\n\nuse vr\\core\\ErrorsException;\n\n/**\n *...
php
chosen
[ { "from": "system", "value": "Add alias for the update so you can run self:update\n" }, { "from": "human", "value": "<?php\n\nnamespace ModuleGenerator\\CLI\\Console\\ModuleGenerator;\n\nuse Symfony\\Component\\Console\\Command\\Command;\nuse ModuleGenerator\\CLI\\Service\\ModuleGenerator\\Updat...
php
chosen
[ { "from": "system", "value": "Make Laravel service provider deferred\n" }, { "from": "human", "value": "<?php\n\nnamespace Jenssegers\\Agent;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass AgentServiceProvider extends ServiceProvider\n{\n /**\n * Indicates if loading of the provide...
php
chosen
[ { "from": "system", "value": "Change to using assert instead of if\n\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\nnamespace Onion\\Framework\\Http\\Middleware;\n\nuse Interop\\Http\\Middleware\\DelegateInterface;\nuse Interop\\Http\\Middleware\\ServerMiddlewareInterface;\n...
php
chosen
[ { "from": "system", "value": "Change route to food list to make it REST compliant\n" }, { "from": "human", "value": "<?php\nnamespace Foodtrack\\Controller\\Provider;\n\nuse Silex\\ControllerProviderInterface;\nuse Silex\\ServiceProviderInterface;\nuse Silex\\Application;\nuse Foodtrack\\Control...
php
chosen
[ { "from": "system", "value": "Update to using Request::current() method\n" }, { "from": "human", "value": "<?php defined('SYSPATH') or die('No direct script access.');\n\nclass Prophet {\n \n public static function exception_handler(Exception $e)\n {\n if (Kohana::$environment ==...
php
chosen
[ { "from": "system", "value": "Add provides since this service is deferred.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Auth;\n\nclass AuthServiceProvider extends \\Illuminate\\Auth\\AuthServiceProv...
php
chosen
[ { "from": "system", "value": "Use our own custom ConsoleSupportServiceProvider\n" }, { "from": "human", "value": "<?php\n\n/*\n * NOTICE OF LICENSE\n *\n * Part of the Cortex Foundation Module.\n *\n * This source file is subject to The MIT License (MIT)\n * that is bundled with this package in ...
php
chosen
[ { "from": "system", "value": "Add language strings for mention's scheduled task\n" }, { "from": "human", "value": "<?php\n/**\n * Language file for mentions\n *\n * @author Shitiz Garg <mail@dragooon.net>\n * @copyright 2014 Shitiz Garg\n * @license Simplified BSD (2-Clause) License\n */\n\nglob...
php
chosen
[ { "from": "system", "value": "[Socket] Read raw stream when using Socket server (no stream)\n" }, { "from": "human", "value": "<?php\n\nnamespace React\\Socket;\n\nuse Evenement\\EventEmitter;\nuse React\\EventLoop\\LoopInterface;\nuse React\\Stream\\WritableStreamInterface;\nuse React\\Stream\\...
php
chosen
[ { "from": "system", "value": "Fix for path to Public DB in controller. Now you can include the controller everywhere.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Landing CMS\n *\n * A simple CMS for Landing Pages.\n *\n * @package Landing CMS\n * @author Ilia Chernykh <landingcms@...
php
chosen
[ { "from": "system", "value": "BAP-3230: Add chart configuration\n- add missed loading of services.yml\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\ChartBundle\\DependencyInjection;\n\nuse Symfony\\Component\\DependencyInjection\\ContainerBuilder;\nuse Symfony\\Component\\De...
php
chosen
[ { "from": "system", "value": "Fix cache dir in Kernel\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\HttpKernel\\Kernel;\nuse Symfony\\Component\\Config\\Loader\\LoaderInterface;\n\nclass AppKernel extends Kernel\n{\n public function registerBundles()\n {\n $bun...
php
chosen
[ { "from": "system", "value": "Update admin middleware to fix permissions for adding users etc\n\nChanged the wrong variable in the last fix." }, { "from": "human", "value": "<?php namespace JamylBot\\Http\\Middleware;\n\nuse Closure;\nuse Illuminate\\Contracts\\Auth\\Guard;\nuse JamylBot\\Group;...
php
chosen
[ { "from": "system", "value": "Fix \"Too Many Connections\" error during testing\n\nSee laravel/framework#20340" }, { "from": "human", "value": "<?php\n\nnamespace Laravel\\Lumen\\Testing;\n\ntrait DatabaseTransactions\n{\n /**\n * Handle database transactions on the specified connections....
php
chosen
[ { "from": "system", "value": "Change title of history page depend on the current page\n" }, { "from": "human", "value": "<div class=\"panel <?php echo (isset($single)?'single':''); ?>\">\n <div class=\"warp\">\n <b>My Reading History</b>\n </div>\n <div class=\"<?php echo (isset(...
php
chosen
[ { "from": "system", "value": "Add monster symbols on the search results.\n" }, { "from": "human", "value": "@section('title')\nSearching for {{$search}} - Cataclysm: Dark Days Ahead Item Browser\n@stop\n<h3>Search: {{ $search }} </h3>\n@if (!empty($items))\n<h3>Items matches:</h3>\n@foreach ($it...
php
chosen
[ { "from": "system", "value": "Use __DIR__ as PHP < 5.3 is not supported\n" }, { "from": "human", "value": "<?php\n\nrequire dirname(__FILE__) . '/../vendor/autoload.php';\n\nclass JadePHPTest extends PHPUnit_Framework_TestCase {\n\n static private $skipped = array(\n // Here is the rem...
php
chosen
[ { "from": "system", "value": "Add UTF-8 charset to the db connection\n" }, { "from": "human", "value": "<?php\n/**\n * This helper package makes a database connection for package Kola\\PotatoOrm\\Model.\n *\n * @package Kola\\PotatoOrm\\Helper\\DbConn\n * @author Kolawole ERINOSO <kola.erinoso@...
php
chosen
[ { "from": "system", "value": "MDL-34067: Change default to on for text feedback comments in assignment\n\nThis is the \"default default\" setting.\n" }, { "from": "human", "value": "<?php\n// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute i...
php
chosen
[ { "from": "system", "value": "Add tokens and seconds as private members\n\nThese members shouldn't be accessible other than being specified in the\nconstructor. If they were updated after the fact then the rate wouldn't\nrepresent the chnage.\n" }, { "from": "human", "value": "<?\n\nnamespace iF...
php
chosen
[ { "from": "system", "value": "Add two more AttemptWrite*() methods, for convenience.\n" }, { "from": "human", "value": "<?php\n\nnamespace Frozone;\n\n/**\n * Trait implementing Freezable.\n *\n * Include in your classes for sweet, chilly magic.\n */\ntrait Freeze /* implements FreezableInterfac...
php
chosen
[ { "from": "system", "value": "Call parent::__construct(); in the command.\n" }, { "from": "human", "value": "<?php\nnamespace Staf\\Generator;\n\nuse Illuminate\\Console\\Command;\n\nclass PublishCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n...
php
chosen
[ { "from": "system", "value": "Disable automatic setting of created and modified by columns\n" }, { "from": "human", "value": "<?php\n\n/**\n * This model contains all methods for interacting with user emails.\n *\n * @package Nails\n * @subpackage module-auth\n * @category Model\n * @author...
php
chosen
[ { "from": "system", "value": "Change ObjectMap to new class name\n" }, { "from": "human", "value": "<?php\n\nuse Allsop\\ObjectMap;\n\n/**\n * Theme initialization.\n */\n\n/**\n * Hide the 'Custom Fields' menu in production mode.\n */\nif (defined('USE_PRODUCTION_ACF'))\n{\n define('ACF_LITE...
php
chosen
[ { "from": "system", "value": "Change active input to a boolean format instead of integer" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Requests\\Api;\n\nuse Illuminate\\Foundation\\Http\\FormRequest;\n\nclass InstallationModel extends FormRequest\n{\n /**\n * Determine if...
php
chosen
[ { "from": "system", "value": "Fix to use proper file element for session uploads\n" }, { "from": "human", "value": "<?php\n\nnamespace ZF2FileUploadExamples\\Form;\n\nuse Zend\\InputFilter;\nuse Zend\\Form\\Form;\nuse Zend\\Form\\Element;\n\nclass ProgressUpload extends Form\n{\n public funct...
php
chosen
[ { "from": "system", "value": "Exit after sending a 404\n" }, { "from": "human", "value": "<?php\n\n/*\n * Show debug code.\n */\nerror_reporting(E_ALL);\nini_set('display_errors', 1);\n\n/*\n * Establish our routing table.\n */\n$router = array();\n$router['registrars'] = 'registrars';\n$router[...
php
chosen
[ { "from": "system", "value": "Check coding standard against bin directory as well.\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\nrequire 'vendor/autoload.php';\n\n$phpcsCLI = new PHP_CodeSniffer_CLI();\n$phpcsViolations = $phpcsCLI->process(array('standard' => array('PSR1'), 'fil...
php
chosen
[ { "from": "system", "value": "Undo ctor changes to derived class of AbstractModelCollection\n\nThese will be moved to a different branch\n" }, { "from": "human", "value": "<?php\n\n/**\n * Container for multiple TwitterRequestTokenModel objects, also handles\n * collection metadata such as pagin...
php
chosen
[ { "from": "system", "value": "Remove title attribute from Subscribe links\n" }, { "from": "human", "value": "<div class=\"calendar\">\n <?php echo $savvy->render($context->getMonthWidget()); ?>\n</div>\n\n<div id=\"subscribe\">\n <span>Subscribe to this calendar</span>\n <ul id=\"dropli...
php
chosen
[ { "from": "system", "value": "Fix french sentence in en lang file\n" }, { "from": "human", "value": "<?php\nreturn [\n 'vendor' => 'Log viewer by <a href=\"https://github.com/ARCANEDEV/LogViewer\">Arcanedev</a>',\n 'menu' => [\n 'category' => \"Logs\",\n 'stats' => 'S...
php
chosen
[ { "from": "system", "value": "Include request and nonce test\n" }, { "from": "human", "value": "<?php\n/**\n * Plugin Name: Example Success\n * Plugin URI:\n * Description: An example with wordpress-validator\n * Version: 1.0.0\n * Author: labodudev\n * Author URI: http://labodudev.fr\n * Requir...
php
chosen
[ { "from": "system", "value": "Update the additonal fields form so the appliesto field is a select with the values lsitem, lsassociation, and lsdoc.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Form\\Type;\n\nuse App\\Entity\\Framework\\AdditionalField;\nuse Symfony\\Component\\Form...
php
chosen
[ { "from": "system", "value": "Add StatementDescriptor field for direct debits\n\nCloses #138\n" }, { "from": "human", "value": "<?php\nnamespace MangoPay;\n\n/**\n * Class represents direct debit type for mean of payment in PayIn entity\n */\nclass PayInPaymentDetailsDirectDebit extends Librarie...
php
chosen
[ { "from": "system", "value": "Add setting to set the failed table\n" }, { "from": "human", "value": "<?php\n\nreturn [\n\n /*\n |--------------------------------------------------------------------------\n | Beanstalkd UI Configuration\n |---------------------------------------------...
php
chosen
[ { "from": "system", "value": "Add a subtle gradient to the header\n" }, { "from": "human", "value": "<section class=\"hero {{ $theme }}\">\n <div class=\"hero-body\">\n <div class=\"container\">\n <div class=\"columns is-mobile\">\n <div class=\"column is-3 ha...
php
chosen
[ { "from": "system", "value": "Upgrade Patch 8.0.0-A9 to 8.0.0-A10\n" }, { "from": "human", "value": "<?php\n\n$aFilesDelete = array(\n 'inc/classes/BxDolConfig.php',\n 'inc/js/editor.cleditor.js',\n 'modules/base/text/template/entry-location.html',\n 'plugins/OAuth/OAuth1/Service/Dol...
php
chosen
[ { "from": "system", "value": "Fix the name of arguments for PHP 8\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\n * f...
php
chosen
[ { "from": "system", "value": "Add some tests on the distribution of random values." }, { "from": "human", "value": "<?php\nclass RandomIntTest extends PHPUnit_Framework_TestCase\n{\n public function testFuncExists()\n {\n $this->assertTrue(function_exists('random_int'));\n }\n ...
php
chosen
[ { "from": "system", "value": "Test asset that causes a `TypeError` to be raised (on purpose)\n" }, { "from": "human", "value": "<?php\n\nnamespace Bernard\\Tests\\Fixtures;\n\nclass Service\n{\n public $importUsers = false;\n\n public function failSendNewsletter()\n {\n throw new...
php
chosen
[ { "from": "system", "value": "Add 'inversedBy' attribute on ManyToOne association with Tag entity\n\nWithout this attribute the entity mapping information won't be considered valid." }, { "from": "human", "value": "<?php\n\nnamespace Fogs\\TaggingBundle\\Entity;\r\n\r\nuse \\FPN\\TagBundle\\Enti...
php
chosen
[ { "from": "system", "value": "Add a draft method on spoolerbatch to draft to several email in one call\n" }, { "from": "human", "value": "<?php\n/*\n * Copyright (c) 2015, Dalenys\n *\n * Permission to use, copy, modify, and distribute this software for any\n * purpose with or without fee is her...
php
chosen
[ { "from": "system", "value": "Index module\n - add use of components in index module\n" }, { "from": "human", "value": "<div class=\"grid\" data-equal-container>\n @if (!$hideTitle && !empty($post_title))\n <div class=\"grid-xs-12\">\n <h2>{!! apply_filters('the_title', $post_title)...
php
chosen
[ { "from": "system", "value": "Put exception class in message\n" }, { "from": "human", "value": "<?php\n/**\n * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>\n * This file is licensed under the Licensed under the MIT license:\n * http://opensource.org/licenses/MIT\n */\n\nnamespace Ice...
php
chosen
[ { "from": "system", "value": "Make sure that you are logged out at the end of a backend test\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Core\\Tests;\n\nuse Common\\WebTestCase;\nuse Symfony\\Bundle\\FrameworkBundle\\Client;\n\nabstract class BackendWebTestCase extends WebTest...
php
chosen
[ { "from": "system", "value": "Document the application name parameter.\n" }, { "from": "human", "value": "<?php\nnamespace Nubs\\PwMan;\n\nuse Exception;\n\n/**\n * Manage the collection of passwords.\n */\nclass PasswordManager\n{\n /** @type array<array> The passwords. */\n private $_pas...
php
chosen
[ { "from": "system", "value": "Fix events with wrong constructor.\n" }, { "from": "human", "value": "<?php\n\nnamespace Sandertv\\BlockSniper\\events;\n\nuse pocketmine\\event\\plugin\\PluginEvent;\nuse Sandertv\\BlockSniper\\Loader;\n\nabstract class BaseEvent extends PluginEvent {\n\t\n\tpublic...
php
chosen
[ { "from": "system", "value": "Check your damn code before you commit it. Fixes home route\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Application Routes\n|----------------------------------------------------------...
php
chosen
[ { "from": "system", "value": "Fix Symfony 4.2 deprecations for TreeBuilder\n" }, { "from": "human", "value": "<?php\n\nnamespace Burgov\\Bundle\\KeyValueFormBundle\\DependencyInjection;\n\nuse Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder;\nuse Symfony\\Component\\Config\\Definiti...
php
chosen
[ { "from": "human", "value": "Test native array behaviour of collection\n" }, { "from": "gpt", "value": "<?php\n\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayableNodeCollectionTest extends TestCase\n{\n /** @test */\n function it_can_count_the_values()\n {\n $collection = $thi...
php
chosen
[ { "from": "system", "value": "Fix has colliding constructor definitions coming from traits\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the Zimbra API in PHP library.\n *\n * © Nguyen Van Nguyen <nguyennv1981@gmail.com>\n *\n * For the full copyright and license informa...
php
chosen
[ { "from": "system", "value": "Update noscript method to output rather than return.\n" }, { "from": "human", "value": "<?php\n/**\n * Trait Google\\Site_Kit\\Core\\Util\\Requires_Javascript_Trait\n *\n * @package Google\\Site_Kit\\Core\\Util\n * @copyright 2020 Google LLC\n * @license https:/...
php
chosen
[ { "from": "system", "value": "Add futher tests to SkipNulls filter.\n" }, { "from": "human", "value": "<?php\n\nuse Enzyme\\Loopy\\Filters\\SkipNulls;\n\nclass SkipNullsFilterTest extends PHPUnit_Framework_TestCase\n{\n public function testPassesThroughFilterSuccess()\n {\n $filter ...
php
chosen
[ { "from": "system", "value": "Put back set error (now in correct place)\n" }, { "from": "human", "value": "<?php\n\n// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.\n// See the LICENCE file in the repository root for full licence text.\n\n...
php
chosen
[ { "from": "system", "value": "Update to JMS Serializer to allow manual override\n" }, { "from": "human", "value": "<?php\n\nnamespace Doctrine\\Search\\Serializer;\n\nuse Doctrine\\Search\\SerializerInterface;\nuse JMS\\Serializer\\SerializerBuilder;\nuse JMS\\Serializer\\SerializationContext;\n...
php
chosen
[ { "from": "system", "value": "Update all configurations to include factories\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 wa...
php
chosen
[ { "from": "system", "value": "Store every single request for debug and security purposes\n" }, { "from": "human", "value": "<?php\nrequire_once('vendor/autoload.php');\n\nif (!PRODUCTION)\n{\n error_reporting(E_ALL);\n ini_set('display_errors','On');\n}\n\nfunction phoxy_conf()\n{\n $ret = ph...
php
chosen
[ { "from": "system", "value": "Upgrade to yii2 version 2.0.16\n\nsee https://github.com/yiisoft/yii2/blob/2.0.16/framework/UPGRADE.md#upgrade-from-yii-207" }, { "from": "human", "value": "<?php\n\n/**\n * @link http://foundationize.com\n * @package foundationize/yii2-foundation\n * @version...
php
chosen
[ { "from": "system", "value": "Add a bunch of things for ContentItem support\n" }, { "from": "human", "value": "<?php\n\n$REGISTER_LTI2 = array(\n\"name\" => \"Peer-Graded Dropbox\",\n\"FontAwesome\" => \"fa-code-fork\",\n\"short_name\" => \"Peer Grader\",\n\"description\" => \"This tool provides...
php
chosen
[ { "from": "system", "value": "Remove number of talks variable from pages that dont use it.\n\nThe speaker package and the talk ideas pages didn't use the\nnumber_of_talks variable, so it had no sense to give it to them.\nSince it is now only used in one place it makes more sense to inline it\n" }, { ...
php
chosen
[ { "from": "system", "value": "Use new default user models path.\n" }, { "from": "human", "value": "<?php\n\nreturn [\n /**\n * User class used for ACL.\n */\n 'user' => App\\User::class,\n\n /**\n * Role class used for ACL.\n */\n 'role' => Yajra\\Acl\\Mod...
php
chosen
[ { "from": "system", "value": "Modify cookie test to work with new cookies\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests;\n\nuse \\Mockery as m;\nuse Rosio\\EncryptedCookie\\EncryptedCookie;\nuse Rosio\\EncryptedCookie\\CookieStorage;\nuse Rosio\\EncryptedCookie\\CryptoSystem\\MOCK_...
php
chosen
[ { "from": "system", "value": "Add support of custom data\n" }, { "from": "human", "value": "<?php\n\n/**\n* This custom class must be placed in the folder /AlloPass/Hipay/Helper\n* You have to personalize the method getCustomData and return an json of your choice.\n* \n*/\ncla...
php
chosen
[ { "from": "system", "value": "Fix spec compliance of error title\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace WoohooLabs\\Yin\\JsonApi\\Exception;\n\nuse WoohooLabs\\Yin\\JsonApi\\Schema\\Error\\Error;\n\nclass RelationshipNotExists extends AbstractJsonApiExcep...
php
chosen
[ { "from": "system", "value": "Add widget title on plain template.\n" }, { "from": "human", "value": "<ul class=\"{{$widget->param('menu_class', 'nav navbar-nav')}}\">\n @include('system.menu.bootstrap', ['menu' => $$menu])\n</ul>\n" }, { "from": "gpt", "value": "@if($widget->show_...
php
chosen
[ { "from": "system", "value": "Fix missing return (phpstan error)\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace DI\\Definition\\Resolver;\n\nuse DI\\Definition\\Definition;\nuse DI\\Definition\\InstanceDefinition;\nuse DI\\DependencyException;\nuse Psr\\Contain...
php
chosen
[ { "from": "system", "value": "Fix sorter for fields with null sortable property\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...
php
chosen
[ { "from": "system", "value": "Update the LICENCE on the main file of the plugin\n" }, { "from": "human", "value": "<?php\n/**\n * Plugin Name: Simple Random Image\n * Plugin URI: https://github.com/mitogh/Simple-Random-Image\n * Description: Generate a random image from the attachements file.\n ...
php
chosen
[ { "from": "system", "value": "Set subject and body in 'too many recipients' test\n\nSubject and body are tested first, so if they are not set the 'too many\nrecipients' exception will never be triggered.\n" }, { "from": "human", "value": "<?php\n\ndate_default_timezone_set('Europe/London');\n\nr...
php
chosen
[ { "from": "system", "value": "Improve search form rendering by using Bootstrap\n\nFixes #57\n" }, { "from": "human", "value": "<?php\n\n// search-form same behavior as genesis with additional classes\n// for bootstrap styling\n\nadd_filter( 'genesis_search_form', 'bsg_search_form', 10, 4);\n\nfu...
php
chosen
[ { "from": "system", "value": "Allow removing CORS headers without editing the middleware class\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Middleware;\n\nuse Slim\\Http\\Request;\nuse Slim\\Http\\Response;\n\nclass Cors implements MiddlewareInterface\n{\n /**\n * @var array...
php
chosen
[ { "from": "system", "value": "Fix support for positional parameters in Doctrine ORM\n" }, { "from": "human", "value": "<?php\n\nnamespace RulerZ\\Target\\DoctrineORM;\n\nuse Hoa\\Ruler\\Model as AST;\n\nuse RulerZ\\Compiler\\Context;\nuse RulerZ\\Exception;\nuse RulerZ\\Model;\nuse RulerZ\\Targe...
php
chosen
[ { "from": "system", "value": "Add a test for entry_before_insert hook\n" }, { "from": "human", "value": "<?php\n\nclass HelloWorldExtension extends Minz_Extension {\n\tpublic function init() {\n\t\tMinz_View::appendStyle($this->getFileUrl('style.css', 'css'));\n\t\tMinz_View::appendScript($this-...
php
chosen
[ { "from": "system", "value": "Simplify logic on the conditional\n" }, { "from": "human", "value": "<?php\n/**\n * Saves in cache using transient function of wordpress a request using callbacks\n * similar as wordpress does. Works only for WP.\n *\n * @package on-cache-please\n * @since 1.0.0\n *...
php
chosen
[ { "from": "system", "value": "Make sure to sort departments by name\n" }, { "from": "human", "value": "<?php\nrequire '../scat.php';\nrequire '../lib/catalog.php';\n\n$parent= (int)$_REQUEST['parent'];\n\n$departments= Model::factory('Department')\n ->where('parent_id', $parent)\n...
php
chosen
[ { "from": "system", "value": "Save role when adding new person\n" }, { "from": "human", "value": "<?\ninclude '../scat.php';\n\n$name= $_REQUEST['name'];\n$company= $_REQUEST['company'];\n$phone= $_REQUEST['phone'];\nif (empty($name) && empty($company) && empty($phone))\n die_jsonp(\"You need t...
php
chosen
[ { "from": "system", "value": "Replace deprecated class (since Symphony 2.6)" }, { "from": "human", "value": "<?php\n\nif (!defined('ENMDIR')) define('ENMDIR', EXTENSIONS . \"/email_newsletter_manager\");\nif (!defined('ENVIEWS')) define('ENVIEWS', ENMDIR . \"/content/templates\");\n\nclass conte...
php
chosen
[ { "from": "system", "value": "Remove useless information from main printing\n" }, { "from": "human", "value": "<?php\n\t/**\n * Documentation, License etc.\n *\n * @package Webserver\n */\n include_once 'Webserver.php';\n $server = new Webserver();\n echo \"{response:\"....
php
chosen
[ { "from": "system", "value": "Add basic markup for posts listing.\n" }, { "from": "human", "value": "<?php get_header(); ?>\n<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>\n <?php the_title(); ?>\n <?php the_content(); ?>\n<?php endwhile; ?>\n<?php else: ?>\n<?php endif; ?...
php
chosen
[ { "from": "system", "value": "Update majors when user is created\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Observers;\n\nuse App\\Jobs\\PushToJedi;\nuse App\\User;\nuse DateTime;\n\nclass UserObserver\n{\n public function saved(User $user): void\n ...
php
chosen
[ { "from": "system", "value": "Update symfony and composer packages\n" }, { "from": "human", "value": "<?php\n\nnamespace Enhavo\\Bundle\\ShopBundle\\Form\\Extension;\n\nuse Sylius\\Bundle\\ResourceBundle\\Form\\Type\\ResourceTranslationsType;\nuse Sylius\\Component\\Resource\\Translation\\Provid...
php
chosen
[ { "from": "system", "value": "Fix the coding standards problems.\n" }, { "from": "human", "value": "<?php\nnamespace Respect\\Validation\\Rules;\n\nclass PrimeNumber extends AbstractRule\n{\n public function validate($input)\n {\n if(!is_numeric($input) || $input <= 1){\n ...
php
chosen
[ { "from": "system", "value": "Fix block class post type prefix" }, { "from": "human", "value": "<?php\n/**\n * Default hero template file.\n *\n * This is the default hero image for page templates, called\n * 'block'. Strictly air specific.\n *\n * @Date: 2019-10-15 12:30:02\n * @Last Modified...
php
chosen
[ { "from": "system", "value": "Allow blanking array properties on users\n" }, { "from": "human", "value": "<?php\nnamespace Auth;\n\ntrait LDAPSettableObject\n{\n protected function setCachedOnlyProp($propName, $value)\n {\n if(in_array($propName, $this->cachedOnlyProps))\n {\...
php
chosen
[ { "from": "system", "value": "Remove forward slash from APP_NAME" }, { "from": "human", "value": "<?php\n/* Note: Create a copy of this file with following name\n \"config.php\" (without quotes) and change your configuration.\n */\n/* If hosted on root like 127.0.0.1/ then\n APP_NAME should ...
php
chosen
[ { "from": "system", "value": "Add test for getContent() method\n" }, { "from": "human", "value": "<?php\n\nclass StoryTest extends TestCase {\n\tuse Way\\Tests\\ModelHelpers;\n\n public function testBelongsToIssue()\n {\n \t$this->assertBelongsTo('issue', 'Story');\n }\n\n public ...
php
chosen
[ { "from": "system", "value": "Remove image size 500, add back when accutally needed.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Load admin dependencies.\n */\n$tempdir = get_template_directory();\nrequire_once($tempdir.'/admin/init.php');\n\n/**\n * Theme set up settings.\n */\nadd_acti...
php
chosen
[ { "from": "system", "value": "Update .dev domain for chrome\n" }, { "from": "human", "value": "<?php \n//paths\ndefine('ROOT_PATH', dirname(__FILE__, 2).'/');\ndefine('INC_PATH', ROOT_PATH.'inc/');\ndefine('VIEWS_PATH', INC_PATH.'views/');\ndefine('ADMIN_VIEWS_PATH', INC_PATH.'views/admin/');\nd...
php
chosen
[ { "from": "system", "value": "Change to require_once to prevent a PHP Fatal error during unit tests.\n" }, { "from": "human", "value": "<?php\n\nrequire __DIR__ . '/../src/functions.php';\n\nspl_autoload_register(function($class) {\n if (strpos($class, 'FastRoute\\\\') === 0) {\n $dir ...
php
chosen
[ { "from": "system", "value": "Change source URL for test.\n\ngit-svn-id: d46fe582d22b46b457d3ac1c55a88da2fbe913a1@1235 baf6b65b-9124-4dc3-b1c0-01155b4af546\n" }, { "from": "human", "value": "<?php\r\n\r\nrequire_library('connectors/HydrothermalVentLarvaeAPI');\r\n\r\nclass test_connector_vent_la...
php
chosen
[ { "from": "system", "value": "Access to the copy time slots page\n\n\ngit-svn-id: 5a113f46df058f8047e288f4f3e948d899353d9a@236 410355f2-c4ea-45de-a5b5-301721f902b9\n" }, { "from": "human", "value": "<?\nrequire_once (\"common.php\");\ncheck_user ();\nhtml_start (\"Manage Playlist Templates\");\n...
php
chosen
[ { "from": "system", "value": "Remove the sudo killall from the CLI script, as it prompts for a password regardless of nopasswd settings. NOTE: if upgrading from a version prior to this version, a reboot may be required!\n" }, { "from": "human", "value": "<?php\nnamespace App\\Console\\Command;\n...
php
chosen
[ { "from": "system", "value": "Fix user image disaplay on navbar\n" }, { "from": "human", "value": "<div class=\"f collapse\" id=\"navbar-collapse-main\">\n <ul class=\"nav navbar-nav st\">\n <li>\n <a href=\"#\">Profile</a>\n </li>\n <li>\n <a data-t...
php
chosen
[ { "from": "system", "value": "Add button class to Comments form\n" }, { "from": "human", "value": "@php\nif (post_password_required()) {\n return;\n}\n@endphp\n\n<section id=\"comments\" class=\"comments\">\n @if (have_comments())\n <h2>\n {!! sprintf(_nx('One response to &ldquo;%2$s&r...
php
chosen
[ { "from": "system", "value": "Fix for unicode characters support\n" }, { "from": "human", "value": "<?php\n\nreturn [\n 'default' => 'fuzzy',\n\n 'fieldName' => 'relevance',\n\n 'drivers' => [\n\n 'fuzzy' => [\n 'class' => 'TomLingham\\Searchy\\SearchDrivers\\FuzzySear...
php
chosen
[ { "from": "system", "value": "Trim tooltip correctly for multibyte chars\n" }, { "from": "human", "value": "<ul>\n<?php\n$c = 0;\nforeach($items as $item) {\n\tif($c > $limit) {\n\t\tbreak;\n\t}\n\t$description = $item->content;\n\tif ($description) {\n\t\t$tooltip = substr(strip_tags($descripti...
php
chosen
[ { "from": "system", "value": "Fix missing use in SliderBundle\n" }, { "from": "human", "value": "<?php\n/**\n * AdminBuilderSubscriber.php\n *\n * @since 15/10/14\n * @author Gerhard Seidel <gseidel.message@googlemail.com>\n */\n\nnamespace esperanto\\SliderBundle\\EventListener;\n\nuse esperant...
php
chosen
[ { "from": "system", "value": "Fix typo in default staging config\n" }, { "from": "human", "value": "<?php\n\nif (file_exists($this->DocPath().\"/config.php\")){\n $defaultConfig = include($this->DocPath().\"/config.php\");\n}else {\n $defaultConfig = array();\n}\n\n$stagingConfig = array(\...
php
chosen
[ { "from": "system", "value": "[TASK] Change name of vhost env vars\n" }, { "from": "human", "value": "<?php\n\nnamespace Deployer;\n\nset('vhost_template', '<VirtualHost *:80>\n\n ServerAdmin webmaster@localhost\n\n DocumentRoot \"{{document_root}}\"\n\n <Directory \"{{document_root}}\"...
php
chosen