conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update Sami theme as default.\n" }, { "from": "human", "value": "<?php\n\nuse Sami\\Sami;\nuse Sami\\Version\\GitVersionCollection;\nuse Symfony\\Component\\Finder\\Finder;\n\n$iterator = Finder::create()\n ->files()\n ->name('*.php')\n ->exclude('Resources...
php
chosen
[ { "from": "system", "value": "Set content title for photo uploader.\n" }, { "from": "human", "value": "<?php\r\n include_once(\"../includes/start.php\");\r\n $title = 'Photo Uploader';\r\n $tpl->set('title', $title);\r\n $tpl->set('js', 'uploader.js');\r\n\r\n $tpl->set('previous', false, t...
php
chosen
[ { "from": "system", "value": "Comment the msisdn query data\n" }, { "from": "human", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\C...
php
chosen
[ { "from": "system", "value": "Sort hierarchy tree by $orderColumn" }, { "from": "human", "value": "<?php\nnamespace Baum\\Extensions\\Eloquent;\n\nuse Illuminate\\Database\\Eloquent\\Collection as BaseCollection;\n\nclass Collection extends BaseCollection {\n\n public function toHierarchy() {\n...
php
chosen
[ { "from": "system", "value": "Add todo to expand the validation exception content.\n" }, { "from": "human", "value": "<?php\n/**\n * php-binary\n * A PHP library for parsing structured binary streams\n *\n * @package php-binary\n * @author Damien Walsh <me@damow.net>\n */\nnamespace Binary\\Exc...
php
chosen
[ { "from": "system", "value": "Update placeholder in translation string.\n" }, { "from": "human", "value": "<?php\nnamespace Crud\\Error\\Exception;\n\nuse Cake\\Error\\Exception;\nuse Cake\\ORM\\Entity;\nuse Cake\\Utility\\Hash;\n\n/**\n * Exception containing validation errors from the model. U...
php
chosen
[ { "from": "system", "value": "Use an easier to parse test double.\n\nThis fixes an issue that fredemmott/definition-finder has with parsing\nconstructor promotion callbacks.\n" }, { "from": "human", "value": "<?hh // strict\n\nnamespace HackPack\\HackUnit\\Tests\\Doubles;\n\nuse HackPack\\HackUn...
php
chosen
[ { "from": "system", "value": "Add write cache to build log (improve speed)\n" }, { "from": "human", "value": "<?php\n\nnamespace PHPCensor\\Logging;\n\nuse b8\\Store\\Factory;\nuse Monolog\\Handler\\AbstractProcessingHandler;\nuse PHPCensor\\Model\\Build;\nuse Psr\\Log\\LogLevel;\n\n/**\n * Clas...
php
chosen
[ { "from": "system", "value": "Improve path resolution on test" }, { "from": "human", "value": "<?php\n\n// Autoload files using Composer autoload\nrequire_once __DIR__ . '/../vendor/autoload.php';\nrequire_once __DIR__ . '/../aliases.php';\n\n// Create application\n$config_path = realpath('confi...
php
chosen
[ { "from": "system", "value": "Update tests to use refactored path()\n" }, { "from": "human", "value": "<?php\nrequire_once 'minim/plugins/tests/tests.php';\nrequire_once 'minim/minim.php';\n\nclass Minim_TestCase extends TestCase\n{\n function test_minim_get_plugin()\n {\n $minim = ...
php
chosen
[ { "from": "system", "value": "Remove some more unecessary @property doc comments" }, { "from": "human", "value": "<?php\n\nnamespace PhpParser\\Node\\Expr;\n\nuse PhpParser\\Node\\Expr;\n\n/**\n * @property Expr $var Variable reference is assigned to\n * @property Expr $expr Variable which is r...
php
chosen
[ { "from": "system", "value": "Update test and make work\n" }, { "from": "human", "value": "<?php\r\n\r\nnamespace Radebatz\\Assetic\\Tests;\r\n\r\nuse Assetic\\Asset\\AssetCollection;\r\nuse Assetic\\Cache\\ArrayCache;\r\nuse Radebatz\\Assetic\\Factory\\Worker\\CacheWorker;\r\nuse Radebatz\\Asse...
php
chosen
[ { "from": "system", "value": "Use `the_title()` instead of `Titles\\title()` for entry titles\n" }, { "from": "human", "value": "<?php\n/**\n * Default entry title template.\n *\n * @package BLR\\Base_Theme\\Templates\n */\n\nuse BLR\\Base_Theme\\Titles;\n?>\n\n<?php if ( is_singular() ) : ?>\n\...
php
chosen
[ { "from": "system", "value": "Set maintaince mode when updating an app from the app store\n" }, { "from": "human", "value": "<?php\n/**\n * Copyright (c) 2013 Georg Ehrke georg@ownCloud.com\n * This file is licensed under the Affero General Public License version 3 or\n * later.\n * See the COPY...
php
chosen
[ { "from": "system", "value": "Split validation checks for more precise error output\n" }, { "from": "human", "value": "<?php\n\nnamespace Archibald;\n\nuse Archibald\\Request;\n\nclass Api\n{\n\tprivate $slashToken = SLASHCOMMAND_TOKEN;\n\tprivate $commandName = '/archie';\n\n\tpublic function _...
php
chosen
[ { "from": "system", "value": "Fix typo causing fatal error.\n" }, { "from": "human", "value": "<?php\n\nuse Cake\\Core\\Plugin;\nuse Cake\\Routing\\Router;\n\nRouter::scope('/', fnction($routes) {\n\n/**\n * Here, we are connecting '/' (base path) to controller called 'Pages',\n * its action cal...
php
chosen
[ { "from": "system", "value": "Create log folder if not exists\n" }, { "from": "human", "value": "<?php\n\nnamespace Freshwork\\Transbank\\Log;\n\n\nclass TransbankCertificationLogger implements LoggerInterface\n{\n\t/**\n\t * The logs directory. You need write permissions on that folder.\n\t * @...
php
chosen
[ { "from": "system", "value": "Make loader use the url service\n" }, { "from": "human", "value": "<?php\r\nnamespace Simox;\r\n\r\nclass Loader\r\n{\r\n private $registered_directories;\r\n \r\n public function __construct()\r\n {\r\n $this->registered_directories = array();\r\...
php
chosen
[ { "from": "system", "value": "Return a copy of the collection.\n\nBecause the collection is re-used, we want to return a copy of it.\n" }, { "from": "human", "value": "<?php\n\nnamespace Air\\Mapper;\n\nuse Air\\Database;\nuse Doctrine\\Common\\Collections\\Collection;\nuse Doctrine\\DBAL\\Query...
php
chosen
[ { "from": "system", "value": "Complete the integration of Console Scheduling\n" }, { "from": "human", "value": "<?php\n\nnamespace Nova\\Foundation\\Providers;\n\nuse Nova\\Support\\AggregateServiceProvider;\n\n\nclass ConsoleSupportServiceProvider extends AggregateServiceProvider\n{\n\t/**\n\t ...
php
chosen
[ { "from": "system", "value": "Make default available as a queue name\n" }, { "from": "human", "value": "<?php\n/**\n * Created by mcfedr on 08/06/2016 23:37\n */\n\nnamespace Mcfedr\\SqsQueueDriverBundle\\Manager;\n\nuse Aws\\Sqs\\SqsClient;\n\ntrait SqsClientTrait\n{\n /**\n * @var strin...
php
chosen
[ { "from": "system", "value": "Document another possible argument type\n\nThis class is sometimes instanciated in the codebase with objects rather\nthan strings, and used in phpspec by php functions able to deal with\nboth types.\n\nSee #369\nSee https://github.com/phpspec/phpspec/pull/1180\n" }, { "...
php
chosen
[ { "from": "system", "value": "Enable \"Customize\" button for only the currently active theme\n\nSigned-off-by: Sam Poyigi <ccc2dd82f84c4106203d3b58d5938b70cab9f94a@users.noreply.github.com>\n" }, { "from": "human", "value": "{!! $this->makePartial('lists/list_button', ['record' => $theme, 'colu...
php
chosen
[ { "from": "system", "value": "Migrate to Dropbox API v2" }, { "from": "human", "value": "<?php\n\nnamespace Stevenmaguire\\OAuth2\\Client\\Provider;\n\nuse League\\OAuth2\\Client\\Provider\\ResourceOwnerInterface;\n\nclass DropboxResourceOwner implements ResourceOwnerInterface\n{\n /**\n ...
php
chosen
[ { "from": "system", "value": "Fix error when logging in\n\n" }, { "from": "human", "value": "<?php\n\n\nnamespace App;\n\n\nuse Carbon\\Carbon;\n\nclass UserRepository {\n\n public function getUser($request) {\n $user = $request->user;\n $expiresIn = Carbon::now();\n $exp...
php
chosen
[ { "from": "system", "value": "Remove unused route in Api module" }, { "from": "human", "value": "<?php\n/**\n * @author Patsura Dmitry https://github.com/ovr <talk@dmtry.me>\n */\n\nnamespace Api;\n\nuse Phalcon\\DiInterface;\nuse Phalcony\\Rest\\Dispatcher;\n\nclass Module implements \\Phalcon\...
php
chosen
[ { "from": "system", "value": "Fix the method name of the Email class\n" }, { "from": "human", "value": "<?php\n\nuse Sunlight\\Email;\n\ndefined('_root') or exit;\n\nreturn function ($email = \"\") {\n return Email::generate($email);\n};\n" }, { "from": "gpt", "value": "<?php\n\nu...
php
chosen
[ { "from": "system", "value": "Add test for uppercade keywords\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace Rector\\NodeValueResolver\\Tests;\n\nuse PhpParser\\BuilderHelpers;\nuse PhpParser\\Node\\Expr\\Array_;\nuse PhpParser\\Node\\Expr\\ArrayItem;\nuse PhpPars...
php
chosen
[ { "from": "system", "value": "Change use statement to ASFEntityManager\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of the Artscore Studio Framework package.\n *\n * (c) Nicolas Claverie <info@artscore-studio.fr>\n *\n * For the full copyright and license information, pleas...
php
chosen
[ { "from": "system", "value": "Fix typo on apiKey Variable\n" }, { "from": "human", "value": "<?php\n\nnamespace Benwilkins\\FCM;\n\nuse GuzzleHttp\\Client;\nuse Illuminate\\Notifications\\Notification;\n\n/**\n * Class FcmChannel.\n */\nclass FcmChannel\n{\n /**\n * @const The API URL for...
php
chosen
[ { "from": "system", "value": "Use user instead of username\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Slim HTTP Basic Authentication middleware\n *\n * Copyright (c) 2013-2014 Mika Tuupola\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licens...
php
chosen
[ { "from": "system", "value": "Remove fromRepo as its not needed anymore\n" }, { "from": "human", "value": "<?php\nnamespace Criterion\\Helper;\n\nclass Project extends \\Criterion\\Helper\n{\n public static function fromRepo($repo)\n {\n $project = array();\n $project['repo']...
php
chosen
[ { "from": "system", "value": "Set the application object into the controller too.\n" }, { "from": "human", "value": "<?php\n\nnamespace App;\n\nclass Slim extends \\Slim\\Slim\n{\n public function mapRoute($args)\n {\n $callable = array_pop($args);\n if (is_string($callable) ...
php
chosen
[ { "from": "system", "value": "Use Eqoquent to build query\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse Illuminate\\Http\\Request;\nuse App\\Http\\Controllers\\Controller;\nuse DB;\n\n\nclass AlertsController extends Controller\n{\n /**\n *\n */\n pub...
php
chosen
[ { "from": "system", "value": "Add necessary behaviors and validation rules.\n" }, { "from": "human", "value": "<?php\n\nnamespace common\\models\\comments;\n\nuse yii\\db\\ActiveRecord;\n\nabstract class Comment extends ActiveRecord\n{\n public static function instantiate($row)\n {\n ...
php
chosen
[ { "from": "system", "value": "Fix some bugs and better blueprint view\n" }, { "from": "human", "value": "@extends('layouts.user.main')\n\n@section('title')\n {{trans('layout.zagros')}}::{{trans('layout.prjs')}}\n@stop\n\n@section('projects-navbar')active @stop\n\n@section('content')\n <div...
php
chosen
[ { "from": "system", "value": "Change default password to nothing\n" }, { "from": "human", "value": "<?php\n// Mysql info\n$host = \"localhost\";\n$user = \"root\";\n$pass = \"vertrigo\";\n$db = \"beeshort\";\n\n// Put the website URL here, with http:// or https://\n$weburl = \"http://localhost/\...
php
chosen
[ { "from": "system", "value": "Update Tasks - Date : 25/10/2016\n" }, { "from": "human", "value": "<?php\n$pdo = new PDO('mysql:host=mysql.hostinger.co.uk;dbname=u897984522_immo', 'u897984522_asdev', 'RevoK2016I');" }, { "from": "gpt", "value": "<?php\n$pdo = new PDO('mysql:host=local...
php
chosen
[ { "from": "system", "value": "Update index for sensitive fields.\n" }, { "from": "human", "value": "<table id=\"user-table\" class=\"table\">\n\t<thead>\n\t\t<tr class=\"row table-header\">\n\t\t\t<th class=\"table-cell\">User</th>\n\t\t\t<th class=\"table-cell\">Email</th>\n\t\t\t<th class=\"ta...
php
chosen
[ { "from": "system", "value": "Add attribute only public for further usage in frontend" }, { "from": "human", "value": "<?php namespace Modules\\Menu\\Database\\Models;\n \nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Menu extends Model {\n\n\tpublic $table = 'menu';\n\n\tpublic $timesta...
php
chosen
[ { "from": "system", "value": "Test messages created from data arrays\n" }, { "from": "human", "value": "<?php\n\nnamespace Alchemy\\Queue\\Tests;\n\nuse Alchemy\\Queue\\Message;\n\nclass MessageTest extends \\PHPUnit_Framework_TestCase\n{\n\n public function testMessageHasBody()\n {\n ...
php
chosen
[ { "from": "system", "value": "Fix error on requesting forgot-link mail\n" }, { "from": "human", "value": "<?php\n\nnamespace Intracto\\SecretSantaBundle\\Entity;\n\nuse Doctrine\\ORM\\EntityRepository;\n\nclass PoolRepository extends EntityRepository\n{\n public function findAllAdminPools($em...
php
chosen
[ { "from": "system", "value": "Add static and default routes\n" }, { "from": "human", "value": "<?php\n\n// Load composer dependencies\nrequire 'vendor/autoload.php';\nrequire 'src/coffee.php';\n\n// Settings\n$settings = require 'config.php';\n\n// Create a new app\n$app = new \\Slim\\App($setti...
php
chosen
[ { "from": "system", "value": "Check if the vendor path is missing and complain about it\n" }, { "from": "human", "value": "<?php\n/**\n * @file index.php\n * Friendica\n */\n\nrequire __DIR__ . '/vendor/autoload.php';\n\n// We assume that the index.php is called by a frontend process\n// The val...
php
chosen
[ { "from": "system", "value": "Fix touch event of relation, not updating updated_by.\n" }, { "from": "human", "value": "<?php\n\nnamespace Yajra\\Auditable;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AuditableTraitObserver\n{\n /**\n *...
php
chosen
[ { "from": "system", "value": "Allow for returning full headers object\n" }, { "from": "human", "value": "<?php\n\tnamespace Bolt\\Api\\Request;\n\n\tuse Bolt\\Base;\n\n\tclass Headers extends Base\n\t{\n\t\tprivate $headers;\n\n\t\tpublic function __construct($auto = false)\n\t\t{\n\t\t\tif ($au...
php
chosen
[ { "from": "system", "value": "Add docblock for specifying input and return type\n" }, { "from": "human", "value": "<?php\nnamespace StrategyValidator\\Strategy;\n\ninterface StrategyInterface {\n\n public function isValid($value);\n\n}\n" }, { "from": "gpt", "value": "<?php\nnames...
php
chosen
[ { "from": "system", "value": "Move redundant code into private method\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace Vision\\DataStructures\\Arrays\\Mutator;\n\nuse Vision\\DataStructures\\Arrays\\ArrayObject;\n\nclass SquareBracketNotation extends ArrayObject\n{...
php
chosen
[ { "from": "system", "value": "Check for disabled function parse_ini_file\n" }, { "from": "human", "value": "<?php\r\nnamespace core;\r\n\r\nuse InvalidArgumentException;\r\n\r\nclass Config\r\n{\r\n /** @var array $settings */\r\n private static $settings;\r\n\r\n /**\r\n * @param ...
php
chosen
[ { "from": "system", "value": "Fix incorrect entity assignment in Role policy\n" }, { "from": "human", "value": "<?php namespace GeneaLabs\\LaravelGovernor\\Policies;\n\nuse GeneaLabs\\LaravelGovernor\\Role;\n\nclass RolePolicy extends LaravelGovernorPolicy\n{\n public function create($user, R...
php
chosen
[ { "from": "system", "value": "Check if post exists before applying foriiegn key constraint\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Schema\\Builder;\n\nreturn [\n 'up' => function (Builder $schema) {\n $schema->...
php
chosen
[ { "from": "system", "value": "Remove SSL warning on CC image\n" }, { "from": "human", "value": "<?php\n/**\n * The template for displaying the footer\n *\n * Contains footer content and the closing of the #main and #page div elements.\n *\n * @package WordPress\n * @subpackage Twenty_Fourteen\n ...
php
chosen
[ { "from": "system", "value": "Remove trailing line at end of file\n" }, { "from": "human", "value": "<?php\n\ndate_default_timezone_set('UTC');\n\nrequire_once __DIR__.'/../vendor/autoload.php';\n\n$app = new Silex\\Application();\n\nrequire __DIR__.'/../app/config/dev.php';\nrequire __DIR__.'/....
php
chosen
[ { "from": "system", "value": "Update featured image Interchange queries\n\nRemoved 'default' named media query which\ndoes not exist in Foundation 6.\n\nhttp://foundation.zurb.com/sites/docs/interchange.html#named-media-queries\n" }, { "from": "human", "value": "<?php\n\n// If a feature image is...
php
chosen
[ { "from": "system", "value": "Fix redis environment variable overwriting\n\nOn production environments, this command seems to fail\n" }, { "from": "human", "value": "<?php\n\nrequire('../vendor/autoload.php');\n\n$max_data_length = 20010;\n// ^ Calculated like so: len(\"789cae03b53fe955bc6746e7e...
php
chosen
[ { "from": "system", "value": "Add test about multibyte max length\n" }, { "from": "human", "value": "<?php\n\nclass CM_Usertext_Filter_MaxLengthTest extends CMTest_TestCase {\n\n\tpublic static function tearDownAfterClass() {\n\t\tCMTest_TH::clearEnv();\n\t}\n\n\tpublic function testProcess() {\...
php
chosen
[ { "from": "system", "value": "Remove unused imports from ProducerQueue\n" }, { "from": "human", "value": "<?php\n\nnamespace Hodor\\MessageQueue;\n\nuse Exception;\nuse Hodor\\MessageQueue\\Adapter\\Testing\\Config;\nuse Hodor\\MessageQueue\\Adapter\\Testing\\Factory;\nuse PHPUnit_Framework_Test...
php
chosen
[ { "from": "system", "value": "Apply coding standard fixes for namespace imports\n" }, { "from": "human", "value": "<?php\n\nuse Widmogrod\\Monad\\Maybe\\Just;\nuse Widmogrod\\Primitive\\Listt;\n\nclass MaybeMonoidTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @dataProvider provide...
php
chosen
[ { "from": "system", "value": "Remove extraneous colon from url(...) regex\n" }, { "from": "human", "value": "<?php\n\nnamespace Kibo\\Phast\\Filters\\HTML;\n\nuse Kibo\\Phast\\ValueObjects\\URL;\n\nclass CSSImagesOptimizationServiceHTMLFilter extends ImagesOptimizationServiceHTMLFilter {\n\n ...
php
chosen
[ { "from": "system", "value": "Remove unused middleware stuff and add model events\n" }, { "from": "human", "value": "<?php\n\nreturn [\n 'route' => 'warden',\n 'auth' => [\n /*\n * Set this to your own custom middleware, just please know that it\n * should ensure tha...
php
chosen
[ { "from": "system", "value": "Refactor the project from SimpleRouter to Routify\n" }, { "from": "human", "value": "<?php\n\nnamespace Routify;\n\n\nabstract class Method {\n const GET = \"GET\";\n const POST = \"POST\";\n const PUT = \"PUT\";\n const DELETE = \"DELETE\";\n} " }, ...
php
chosen
[ { "from": "system", "value": "Support class injection of elasticsearch" }, { "from": "human", "value": "<?php namespace Cviebrock\\LaravelElasticsearch;\n\nuse Illuminate\\Support\\ServiceProvider as BaseServiceProvider;\n\n\n/**\n * Class ServiceProvider\n *\n * @package Cviebrock\\LaravelElast...
php
chosen
[ { "from": "system", "value": "Add success message on build\n" }, { "from": "human", "value": "<?php namespace Jigsaw\\Jigsaw\\Console;\n\nuse Illuminate\\Contracts\\View\\Factory;\nuse Illuminate\\Filesystem\\Filesystem;\nuse Jigsaw\\Jigsaw\\Jigsaw;\nuse Jigsaw\\Jigsaw\\Template;\nuse Symfony\\C...
php
chosen
[ { "from": "system", "value": "Replace the echo with return\n" }, { "from": "human", "value": "<?php\n\nnamespace Pocs\\View;\n\nclass ViewHelper\n{\n /**\n * @param $bytes\n * @return string\n */\n public function sizeForHumans($bytes)\n {\n if ($bytes > 1048576) {\n ...
php
chosen
[ { "from": "system", "value": "Update to use new schema\n" }, { "from": "human", "value": "<?php\n\nnamespace Rogue\\Http\\Transformers;\n\nuse Rogue\\Models\\Post;\nuse League\\Fractal\\TransformerAbstract;\n\nclass PhoenixGalleryTransformer extends TransformerAbstract\n{\n /**\n * Transf...
php
chosen
[ { "from": "system", "value": "Fix typo in migration file\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass MakeTeamNameNullable extends Migration\n{\n /...
php
chosen
[ { "from": "system", "value": "Fix override of ArtworkCatalogue's transform\n\nThe model has an outbound structure that mimics the other pivot models,\nbut this outbound transformer was overwriting that output.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Transformers;\n\nuse ...
php
chosen
[ { "from": "system", "value": "Fix test that took the spacing into account\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Tests\\Action;\n\nuse Common\\WebTestCase;\n\nclass AddTest extends WebTestCase\n{\n public function testAuthenticationIsNeeded(): v...
php
chosen
[ { "from": "system", "value": "Use Config constructor instead of deprecated named one\n" }, { "from": "human", "value": "<?php\n\nreturn PhpCsFixer\\Config::create()\n ->setRiskyAllowed(true)\n ->setRules([\n '@Symfony' => true,\n '@Symfony:risky' => true,\n 'array_synt...
php
chosen
[ { "from": "system", "value": "Add php-cs-fixer config for test annotations\n" }, { "from": "human", "value": "<?php\n\n$rules = [\n '@Symfony' => true,\n 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced'],\n 'phpdoc_to_comment' => false,\n ...
php
chosen
[ { "from": "system", "value": "Add assertions for the Http client response\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests;\n\nuse Illuminate\\Support\\Facades\\Artisan;\nuse Illuminate\\Support\\Facades\\Http;\nuse LaravelZero\\Framework\\Contracts\\Provid...
php
chosen
[ { "from": "system", "value": "Add reset method on the data collector (sf4)\n" }, { "from": "human", "value": "<?php\nnamespace Wisembly\\AmqpBundle\\DataCollector;\n\nuse Exception;\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\nuse Symf...
php
chosen
[ { "from": "system", "value": "Fix duplicate unique index issue\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateSessions...
php
chosen
[ { "from": "system", "value": "Use array for search columns\n" }, { "from": "human", "value": "<?php\n\nnamespace WP_CLI\\Fetchers;\n\nuse WP_User;\n\n/**\n * Fetch a WordPress user based on one of its attributes.\n */\nclass User extends Base {\n\n\t/**\n\t * The message to display when an item ...
php
chosen
[ { "from": "system", "value": "Use verbose array syntax for PHP 5.3\n" }, { "from": "human", "value": "<?php\n\nnamespace Stripe;\n\nclass BankAccountTest extends TestCase\n{\n public function testVerify()\n {\n self::authorizeFromEnv();\n\n $customer = self::createTestCustome...
php
chosen
[ { "from": "system", "value": "Use setUp method for cache\n" }, { "from": "human", "value": "<?php\n\nuse Flintstone\\Cache\\ArrayCache;\n\nclass ArrayCacheTest extends PHPUnit_Framework_TestCase\n{\n public function testGetAndSet()\n {\n $cache = new ArrayCache();\n $cache->s...
php
chosen
[ { "from": "system", "value": "Add a bunch of incomplete test to shut up the CIs\n" }, { "from": "human", "value": "<?php\n/**\n * Swiss Payment Slip TCPDF\n *\n * @license http://www.opensource.org/licenses/mit-license.php MIT License\n * @copyright 2012-2015 Some nice Swiss guys\n * @author Mar...
php
chosen
[ { "from": "system", "value": "Fix TicketedEventType import to not flush search\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Console\\Commands\\Import;\n\nuse App\\Models\\Membership\\TicketedEventType;\n\nclass ImportTicketedEventTypesFull extends AbstractImportCommand\n{\n\n pr...
php
chosen
[ { "from": "system", "value": "Use BrokerAwareExtension instead of deprecated BrokerAwareClassReflectionExtension\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace SaschaEgerer\\PhpstanTypo3\\Reflection;\n\nuse PHPStan\\Broker\\Broker;\nuse PHPStan\\Reflection\\Broke...
php
chosen
[ { "from": "system", "value": "Add API URL to import:web\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Console\\Commands;\n\nuse Carbon\\Carbon;\n\nclass ImportWeb extends ImportWebFull\n{\n\n protected $signature = 'import:web';\n\n protected $description = \"Import web CMS da...
php
chosen
[ { "from": "system", "value": "Set link failedCount to zero on success\n" }, { "from": "human", "value": "<?php\n\nclass Denkmal_Maintenance_Cli extends CM_Maintenance_Cli {\n\n /**\n * @synchronized\n */\n protected function _registerCallbacks() {\n parent::_registerCallback...
php
chosen
[ { "from": "system", "value": "Make parameters use to create a query string from it\n" }, { "from": "human", "value": "<?php\nnamespace keeko\\framework\\utils;\n\nuse Tobscure\\JsonApi\\Parameters as BaseParameters;\n\nclass Parameters extends BaseParameters {\n\t\n\tpublic function getPage($key...
php
chosen
[ { "from": "system", "value": "[CONSISTENCY] Add newline between different phpdoc tag in docBlock\n" }, { "from": "human", "value": "<?php\n/**\n * @author Pierre-Henry Soria <hello@ph7cms.com>\n * @copyright (c) 2018-2019, Pierre-Henry Soria. All Rights Reserved.\n * @license ...
php
chosen
[ { "from": "system", "value": "Add the type column for votes table\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateVotesTable extends Migration\n{\n /**\n * Run the migrations.\n *...
php
chosen
[ { "from": "system", "value": "Add extra assertion for cancel timer\n" }, { "from": "human", "value": "<?php\n\nnamespace WyriHaximus\\React\\Tests\\Inspector;\n\nuse Phake;\nuse React\\EventLoop\\Timer\\Timer;\nuse WyriHaximus\\React\\Inspector\\LoopDecorator;\nuse WyriHaximus\\React\\Inspector\...
php
chosen
[ { "from": "system", "value": "Add codeception framework for E2E tests [wip]\n" }, { "from": "human", "value": "<?php\n\n/** @var \\Codeception\\Scenario $scenario $I */\n$I = new FunctionalTester($scenario);\n$I->wantTo('perform analysis and see svg results');\n\n$configFolder = codecept_data_di...
php
chosen
[ { "from": "system", "value": "Set up the instance of SLIR as a property of the object so it can be used by test cases if we want to.\n" }, { "from": "human", "value": "<?php\nrequire_once 'core/slir.class.php';\n\nabstract class SLIRTestCase extends PHPUnit_Framework_TestCase\n{\n protected fun...
php
chosen
[ { "from": "system", "value": "Create setup script for database creation\n" }, { "from": "human", "value": "<?php\n\n\t$dbh = new PDO('mysql:host=xxx;port=xxx;dbname=xxx', 'xxx', 'xxx', array( PDO::ATTR_PERSISTENT => false));\n\n\n\n\n?>" }, { "from": "gpt", "value": "<?php\n\trequire...
php
chosen
[ { "from": "system", "value": "Delete commented-out tests for image handling\n\nThe data hub will not be used for image upload for the foreseeable\nfuture. I wanted to make this a dedicated commit, so that its easier\nto reference (and potentially reverse) later.\n" }, { "from": "human", "value":...
php
chosen
[ { "from": "system", "value": "Remove resolution specification to allow cache\n" }, { "from": "human", "value": "<?php\nnamespace Avatar;\n\nclass Hooks {\n\n\tpublic static function onGetPreferences($user, &$preferences) {\n\t\tglobal $wgDefaultAvatarRes;\n\t\t$link = \\Linker::link(\\SpecialPag...
php
chosen
[ { "from": "system", "value": "Fix compatibility with SecurityBundle 5.2\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the SymfonyConnect package.\n *\n * (c) Symfony <support@symfony.com>\n *\n * For the full copyright and license information, please view the LICENSE\n ...
php
chosen
[ { "from": "system", "value": "Check whether object has weakrefs, not whether he was ever refcounted\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the pinepain/php-weak PHP extension.\n *\n * Copyright (c) 2016 Bogdan Padalko <zaq178miami@gmail.com>\n *\n * Licensed unde...
php
chosen
[ { "from": "system", "value": "Clean up page index test\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Modules\\Pages\\Tests\\Actions;\n\nuse Backend\\Core\\Tests\\BackendWebTestCase;\nuse Symfony\\Bundle\\FrameworkBundle\\Client;\n\nfinal class IndexTest extends BackendWebTestCas...
php
chosen
[ { "from": "system", "value": "Fix a bug with menu inheritance\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace LAG\\AdminBundle\\Event\\Listener\\Menu;\n\nuse LAG\\AdminBundle\\Admin\\Helper\\AdminHelperInterface;\nuse LAG\\AdminBundle\\Event\\Events\\Configurati...
php
chosen
[ { "from": "system", "value": "Simplify some of the console boot code\n" }, { "from": "human", "value": "<?php\n\nnamespace Spark\\Core;\n\nclass Cli\n{\n protected $console;\n protected $application;\n\n function __construct()\n {\n if ($bootstrap = $this->findApplicationBoots...
php
chosen
[ { "from": "system", "value": "Move test definitions into PHPUnit setUp method\n" }, { "from": "human", "value": "<?php\n\nnamespace adLDAP\\Tests;\n\nuse Mockery;\n\n// Set constants for testing without LDAP support\nif( ! defined('LDAP_OPT_PROTOCOL_VERSION')) define('LDAP_OPT_PROTOCOL_VERSION',...
php
chosen
[ { "from": "system", "value": "Replace YAML parse function to parseFile\n" }, { "from": "human", "value": "<?php\n\nnamespace Misantron\\Silex\\Provider\\Adapter;\n\n\nuse Misantron\\Silex\\Provider\\ConfigAdapter;\nuse Symfony\\Component\\Yaml\\Exception\\ParseException;\nuse Symfony\\Component\...
php
chosen
[ { "from": "system", "value": "Remove fixme, problem is solved already\n" }, { "from": "human", "value": "<?php\n\t// FIXME: this should start a secure session if forcessl is enabled\n\t// see lib/base.php for an example\n\t//session_start();\n\t$_SESSION['timezone'] = $_GET['time'];\n" }, { ...
php
chosen
[ { "from": "system", "value": "Add get registration count to service" }, { "from": "human", "value": "<?php\n\nnamespace Shaygan\\AffiliateBundle\\Entity;\n\nuse Doctrine\\ORM\\EntityRepository;\n\n/**\n * ReferralRegistrationRepository\n *\n * This class was generated by the Doctrine ORM. Add yo...
php
chosen
[ { "from": "system", "value": "Add a browse photo button to the modal-header\n" }, { "from": "human", "value": "<div class=\"modal fade\" id=\"img-modal\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n ...
php
chosen