conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add data-field-name attribute to admin form field container\n" }, { "from": "human", "value": "<?php\n$fieldError = form_error($field->fieldName);\n?>\n<div\n class=\"form-group<?=\n $this->previewMode ? ' form-group-preview' : ''\n ?><?= ($fieldError != ''...
php
chosen
[ { "from": "system", "value": "Add overwriting of set methods.\n" }, { "from": "human", "value": "<?PHP\n\n/**\n * An Uri value object.\n * This is just a wrapper for Zend Uri.\n *\n * @link https://github.com/zendframework/zend-uri\n *\n * @todo This has to be a Guzzle Uri or https://github.co...
php
chosen
[ { "from": "system", "value": "Update comments about Bulk Send Job List\n" }, { "from": "human", "value": "<?php\n/**\n * HelloSign PHP SDK (https://github.com/hellosign/hellosign-php-sdk/)\n */\n\n/**\n * The MIT License (MIT)\n *\n * Copyright (C) 2014 hellosign.com\n *\n * Permission is hereby...
php
chosen
[ { "from": "system", "value": "Fix for PHP 7.2 count() function\n\nThis PR MUST be commited along with #1882 .\r\n\r\nThe reason is that is_countable is not defined in PHP < 7.3, so we should \"replicate\" it's functionality for backwards compatibility." }, { "from": "human", "value": "<?php\n\ni...
php
chosen
[ { "from": "system", "value": "Make an old migration a little more robust\n\nSummary: See https://github.com/facebook/phabricator/pull/507\n\nTest Plan: This is hard to test since the migration no longer runs against HEAD, but pull 507 strongly implies this is the correct fix.\n\nReviewers: btrahan\n\nReview...
php
chosen
[ { "from": "system", "value": "Add the locale to the request context when populating the search index\n" }, { "from": "human", "value": "<?php\n\nnamespace Kunstmaan\\NodeBundle\\Entity;\n\nuse Kunstmaan\\NodeBundle\\Entity\\AbstractPage;\n\n/**\n * A StructureNode will always be offline and its ...
php
chosen
[ { "from": "system", "value": "Support key prefixes at the client-level\n" }, { "from": "human", "value": "<?php\n\nnamespace LinkORB\\Component\\ObjectStorage;\n\nuse RuntimeException;\n\nclass Client\n{\n private $driver;\n\n public function __construct($driver)\n {\n $this->dri...
php
chosen
[ { "from": "system", "value": "Make floats something small due to imprecision on large values\n" }, { "from": "human", "value": "<?php\n/**\n * Humbug\n *\n * @category Humbug\n * @package Humbug\n * @copyright Copyright (c) 2015 Pádraic Brady (http://blog.astrumfutura.com)\n * @license ...
php
chosen
[ { "from": "system", "value": "Use a Not Found exception\n" }, { "from": "human", "value": "<?php\n\nnamespace Church\\Controller;\n\nuse Church\\Entity\\User\\User;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Sensio\\Bundle\\Framework...
php
chosen
[ { "from": "system", "value": "Update helptext for `service-level` command\n" }, { "from": "human", "value": "<?php\n\nnamespace Pantheon\\Terminus\\Commands\\ServiceLevel;\n\nuse Pantheon\\Terminus\\Commands\\TerminusCommand;\nuse Pantheon\\Terminus\\Site\\SiteAwareInterface;\nuse Pantheon\\Term...
php
chosen
[ { "from": "system", "value": "Fix Trace ::start -> ::load\n" }, { "from": "human", "value": "<?php\r\n\r\nuse OpenCensus\\Trace\\Tracer;\r\nuse OpenCensus\\Trace\\Exporter\\StackdriverExporter;\r\n\r\nrequire __DIR__ . '/helpers.php';\r\n\r\nif (is_gae() && (php_sapi_name() != 'cli')){\r\n if...
php
chosen
[ { "from": "system", "value": "Revert names to slugs again! SORRY!!\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Cortex\\Foundation\\Transformers;\n\nuse Cortex\\Foundation\\Models\\Log;\nuse Illuminate\\Support\\Facades\\Route;\nuse League\\Fractal\\Transform...
php
chosen
[ { "from": "system", "value": "Change column's name and add a foreign key for the vehicles_colors table\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateVehiclesTable extends Migration\n{\n ...
php
chosen
[ { "from": "system", "value": "Tweak the archives migration to respect the InnoDB key size constraint\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass Crea...
php
chosen
[ { "from": "system", "value": "Remove invalid value of parameter\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types = 1);\n\n/*\n * This file is part of the FiveLab Resource package\n *\n * (c) FiveLab\n *\n * For the full copyright and license information, please view the LICENSE\n...
php
chosen
[ { "from": "system", "value": "Add the stuff needed for page menus. Still needs support in theme\n" }, { "from": "human", "value": "<?php\nnamespace Hawalius\\Controllers;\n\nclass Index extends \\Hawalius\\Controller{\n\tpublic function index($url = ''){\n\t\t$post = $this->app->getModel('post')...
php
chosen
[ { "from": "system", "value": "Add missing Ouzo copyright notice\n" }, { "from": "human", "value": "<?php\n\n\nuse Doctrine\\Common\\Annotations\\AnnotationReader;\nuse Ouzo\\Routing\\Generator\\RouteFileGenerator;\nuse Ouzo\\Routing\\Loader\\AnnotationClassLoader;\nuse Ouzo\\Routing\\Loader\\Ann...
php
chosen
[ { "from": "system", "value": "Add support for defining singular resources\n" }, { "from": "human", "value": "<?php\n\nnamespace Spark\\Controller;\n\nclass ControllerCollection extends \\Silex\\ControllerCollection\n{\n function draw(callable $callback)\n {\n $callback($this);\n ...
php
chosen
[ { "from": "system", "value": "Return types in manager tests\n" }, { "from": "human", "value": "<?php\n/*\n * WellCommerce Open-Source E-Commerce Platform\n * \n * This file is part of the WellCommerce package.\n *\n * (c) Adam Piotrowski <adam@wellcommerce.org>\n * \n * For the full copyright an...
php
chosen
[ { "from": "system", "value": "[REFACTOR] Use the new sortLog method.\n" }, { "from": "human", "value": "<?php\r\n/**\r\n * @package modules.customer\r\n */\r\nclass customer_GetDocumentHistoryAction extends generic_GetDocumentHistoryAction\r\n{\r\n\t/**\r\n\t * @param f_persistentdocument_Persis...
php
chosen
[ { "from": "system", "value": "Change machine model field size validation\n\nMachine model field was changed to 50 chars, but validation wasn't updated for it.\n" }, { "from": "human", "value": "<?php\n\nnamespace RadDB\\Http\\Requests;\n\nuse Illuminate\\Foundation\\Http\\FormRequest;\n\nclass U...
php
chosen
[ { "from": "system", "value": "Move default location to class constant\n" }, { "from": "human", "value": "<?php\n\nnamespace Grav\\Common;\n\n/**\n * Offers composer helper methods.\n *\n * @author eschmar\n * @license MIT\n */\nclass Composer\n{\n /**\n * Returns the location of composer...
php
chosen
[ { "from": "system", "value": "Move get user out of loop\n\nIt's good practice to get not changing data before loop\n" }, { "from": "human", "value": "<?php\nclass Kwc_Editable_ComponentsModel extends Kwf_Model_Data_Abstract\n{\n public function __construct(array $config = array())\n {\n ...
php
chosen
[ { "from": "system", "value": "Add global Eloquent builder macro.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php\n\nnamespace Orchestra\\Database;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse Illuminate\\Database\\Que...
php
chosen
[ { "from": "system", "value": "Fix when no mapped field is available\n" }, { "from": "human", "value": "<?php\nnamespace Tenet\\Filter;\n\nuse Tenet\\FilterInterface;\nuse Tenet\\Accessor;\n\nclass AssociationToOneFilter extends AbstractAssociationFilter implements FilterInterface\n{\n\tpublic fu...
php
chosen
[ { "from": "system", "value": "[OW] Fix bad spelling of reaper and forgetting sombra\n\n - fixes #93\n" }, { "from": "human", "value": "<?php\n\nnamespace Onyx\\Overwatch\\Helpers\\Game;\n/**\n * Class Character\n * @package Onyx\\Overwatch\\Helpers\\Game\n */\nclass Character\n{\n public stat...
php
chosen
[ { "from": "system", "value": "[2.0] Fix for CLI Configuration and PEAR installer\n\ngit-svn-id: 6d62a1918bfbe91cfb3198953e3056b244989dd5@7064 2b2ae520-0f61-44a6-8c59-7e116ffd6265\n" }, { "from": "human", "value": "<?php\n\nrequire_once 'Doctrine/Common/ClassLoader.php';\n\n$classLoader = new \\D...
php
chosen
[ { "from": "system", "value": "Set before render or filter\n" }, { "from": "human", "value": "<?php\n/**\n * Application level Controller\n *\n * This file is application-wide controller file. You can put all\n * application-wide controller-related methods here.\n *\n * CakePHP(tm) : Rapid Develo...
php
chosen
[ { "from": "system", "value": "Update helper to use \\ as prefix for global functions.\n\nSigned-off-by: Mior Muhammad Zaki <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Http\\RedirectResponse;\n\nif (! function_exists('redirect_w...
php
chosen
[ { "from": "system", "value": "Allow for customizing searchable chunk size" }, { "from": "human", "value": "<?php\n\nnamespace Laravel\\Scout;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\Scope;\nuse Laravel\\Scout\\Events\\ModelsImported;\nuse Illuminate\\Da...
php
chosen
[ { "from": "system", "value": "Fix renamed functions in block information\n" }, { "from": "human", "value": "<?php\n/**\n * Copyright (C) 2014 Proximis\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with th...
php
chosen
[ { "from": "system", "value": "Use static content ids in seeder\n" }, { "from": "human", "value": "<?php\n\nclass ContentTableSeeder extends Seeder {\n\n public function run()\n {\n DB::collection('contents')->delete();\n\n // Get list of user and group ids\n $groupIds ...
php
chosen
[ { "from": "system", "value": "Update SuiteCRM Version to 7.4.1.\n" }, { "from": "human", "value": "<?php\n if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');\n\n$suitecrm_version = '7.4';\n$suitecrm_timestamp = '2015-10-30 17:00pm';\n" }, { "from": "gpt", ...
php
chosen
[ { "from": "system", "value": "Update tests to not use deprecated methods as of phpunit 5.7\n" }, { "from": "human", "value": "<?php\n\nnamespace MetaSyntactical\\Mime\\Exception;\n\nclass FileNotFoundExceptionTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @var FileNotFoundExceptio...
php
chosen
[ { "from": "system", "value": "Add `events_all_time` and `batches_all_time` to /api/stats\n" }, { "from": "human", "value": "<?php\nnamespace CodeDay\\Clear\\Controllers\\Api;\n\nuse \\CodeDay\\Clear\\Models;\nuse \\CodeDay\\Clear\\ModelContracts;\n\nclass Stats extends ApiController {\n public ...
php
chosen
[ { "from": "system", "value": "FEATURE: Add a syncAll command to sync all sources at once\n" }, { "from": "human", "value": "<?php\nnamespace DL\\AssetSync\\Command;\n\n/*\n * This file is part of the DL.AssetSync package.\n *\n * (c) Daniel Lienert 2017\n *\n * This package is Open Source Softwa...
php
chosen
[ { "from": "system", "value": "Add the answer ID in\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateDiscussionsTable extends Migration\n{\n publi...
php
chosen
[ { "from": "system", "value": "Return 404 if questionnaire does not exist\n" }, { "from": "human", "value": "<?php\n\nnamespace Api\\Controller;\n\nuse Zend\\View\\Model\\JsonModel;\n\nclass QuestionController extends AbstractRestfulController\n{\n\n protected function getJsonConfig($questionn...
php
chosen
[ { "from": "system", "value": "Add heredoc sql interpolation test\n" }, { "from": "human", "value": "// SYNTAX TEST \"Packages/php-grammar/PHP.tmLanguage\"\n<?php\n\n$double_quotes = \"SELECT * FROM tbl\";\n// ^ source.sql keyword\n// ^ source.sql keyword\n/...
php
chosen
[ { "from": "system", "value": "Remove unreachable breaks, add InvalidAccessException\n" }, { "from": "human", "value": "<?php\n/**\n * \n * PHP.Gt (http://php.gt)\n * @copyright Copyright Ⓒ 2014 Bright Flair Ltd. (http://brightflair.com)\n * @license Apache Version 2.0, January 2004. http://www.a...
php
chosen
[ { "from": "system", "value": "Fix artisan factory make command issue\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Cortex\\Foundation\\Console\\Commands;\n\nuse Illuminate\\Console\\ConfirmableTrait;\nuse Cortex\\Foundation\\Traits\\ConsoleMakeModuleCommand;\n...
php
chosen
[ { "from": "system", "value": "Work on Our Dinosaurs page" }, { "from": "human", "value": "<?php\r\n\r\necho \"An Overview of the Dinosaurs we Offer\";\r\n\r\n?>" }, { "from": "gpt", "value": "<?php\n\necho \"Here at R.A.W.R. we only offer herbivores. We have found that carnivores are...
php
chosen
[ { "from": "system", "value": "Fix obtrusive compiler pass issue\n" }, { "from": "human", "value": "<?php\n\nnamespace SLLH\\IsoCodesValidatorBundle\\DependencyInjection\\Compiler;\n\nuse Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface;\nuse Symfony\\Component\\Dependency...
php
chosen
[ { "from": "system", "value": "Fix for switching languages in documentation\n" }, { "from": "human", "value": "<?PHP // $Id$\n\n require(\"../config.php\");\n\n if (empty($CFG->langmenu)) {\n $langmenu = \"\";\n } else {\n $currlang = current_language();\n $langs ...
php
chosen
[ { "from": "system", "value": "FIX: Set REQUEST_URI to go back to page requested before logging in\n" }, { "from": "human", "value": "<?php\nnamespace phorkie;\n/**\n * security levels + login requirement:\n */\n\nif (!isset($GLOBALS['phorkie']['auth']['secure'])) {\n //not set? highest level ...
php
chosen
[ { "from": "system", "value": "Update category admin page copy.\n" }, { "from": "human", "value": "@extends('app')\n\n@section('content')\n <div class=\"wrapper\">\n <div class=\"row\">\n <h1 class=\"highlighted\">All Categories</h1>\n\n <p>These are all categories...
php
chosen
[ { "from": "system", "value": "Use regex to be more fine grained\n" }, { "from": "human", "value": "<?php\n\nnamespace LonelyPullRequests\\Domain;\n\nuse Assert\\Assertion as Ensure;\n\nfinal class RepositoryName\n{\n /**\n * @var string\n */\n private $repositoryName;\n\n public...
php
chosen
[ { "from": "system", "value": "Load HTML5Shiv and RespondJS conditionally.\n" }, { "from": "human", "value": "<script type=\"text/javascript\" charset=\"utf-8\">\n function loadScript(src) {\n var ref = window.document.getElementsByTagName('script')[0];\n var script = window.docu...
php
chosen
[ { "from": "system", "value": "Select all organisms to a specific trait by its type_cvterm_id\n" }, { "from": "human", "value": "<?php\n\nnamespace ajax\\details;\n\nuse \\PDO as PDO;\n\n/**\n * Web Service.\n * Returns Organisms with given ids\n */\nclass Organisms_to_traits extends \\WebService...
php
chosen
[ { "from": "system", "value": "Change delimiter detection to allow string \"---\" to appear in front matter\n" }, { "from": "human", "value": "<?php\n\nnamespace Spatie\\YamlFrontMatter;\n\nuse Exception;\nuse Symfony\\Component\\Yaml\\Yaml;\n\nclass Parser\n{\n protected $yamlParser;\n\n p...
php
chosen
[ { "from": "system", "value": "Create gcs group for test running\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace League\\Flysystem\\GoogleCloudStorage;\n\nuse Google\\Cloud\\Storage\\StorageClient;\nuse League\\Flysystem\\AdapterTestUtilities\\FilesystemAdapterTe...
php
chosen
[ { "from": "system", "value": "Change round:start to +5 days\n" }, { "from": "human", "value": "<?php\n\nnamespace OpenDominion\\Console\\Commands;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Console\\Command;\nuse OpenDominion\\Models\\Round;\nuse OpenDominion\\Models\\RoundLeague;\n\nclass RoundSta...
php
chosen
[ { "from": "system", "value": "Fix deprecation re nested ternary\n" }, { "from": "human", "value": "<?php class Security_Config_Framework extends Config {\nprotected static $_remoteSetupWhitelist = array(\n\t\"127.0.0.1\"\n);\nprotected static $_allowAllRemoteAdmin = true;\nprotected static $_rem...
php
chosen
[ { "from": "system", "value": "Return types in routing and news bundle\n" }, { "from": "human", "value": "<?php\n/*\n * WellCommerce Open-Source E-Commerce Platform\n *\n * This file is part of the WellCommerce package.\n *\n * (c) Adam Piotrowski <adam@wellcommerce.org>\n *\n * For the full copy...
php
chosen
[ { "from": "system", "value": "Use Settings as default action\n\nFixes #3\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Modules\\Compression;\n\nuse Backend\\Core\\Engine\\Base\\Config as BaseConfig;\n\n/**\n * This is the configuration-object for the Compressor module\n *\n * @a...
php
chosen
[ { "from": "system", "value": "Add lists of provided services\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Html;\n\nclass HtmlServiceProvider extends \\Illuminate\\Html\\HtmlServiceProvider {\n\t\n\t...
php
chosen
[ { "from": "system", "value": "Switch triggerUnti lfunction (deprecated) to trigger function\n" }, { "from": "human", "value": "<?php\n\nnamespace Detail\\Apigility\\Rest\\Resource;\n\nuse ZF\\ApiProblem\\ApiProblem;\nuse ZF\\ApiProblem\\ApiProblemResponse;\nuse ZF\\Rest\\Resource as BaseResource...
php
chosen
[ { "from": "system", "value": "Fix refresh session on navigate" }, { "from": "human", "value": "<?php\r\nclass Session\r\n{\r\n const SESSION_STARTED = TRUE;\r\n const SESSION_STOPED = FALSE;\r\n \r\n private $sessionStatus = self::SESSION_STOPED;\r\n private static $instance;\r\n ...
php
chosen
[ { "from": "system", "value": "Refactor home test method names\n" }, { "from": "human", "value": "<?php\n\nnamespace OpenDominion\\Tests\\Http;\n\nuse CoreDataSeeder;\nuse Illuminate\\Foundation\\Testing\\DatabaseMigrations;\nuse OpenDominion\\Tests\\AbstractHttpTestCase;\n\nclass HomeTest extend...
php
chosen
[ { "from": "system", "value": "Add test cases for optional enums\n\nAdded test cases where required is set as true and false,\nwith the attribute omitted.\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the JsonSchema package.\n *\n * For the full copyright and license inf...
php
chosen
[ { "from": "system", "value": "Fix `type_id` casting on ticketed event import\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Transformers\\Inbound\\Membership;\n\nuse App\\Transformers\\Datum;\nuse App\\Transformers\\Inbound\\MembershipTransformer;\n\nclass TicketedEvent extends Membe...
php
chosen
[ { "from": "system", "value": "Add a basic URL reading test\n" }, { "from": "human", "value": "<?php\n\nnamespace Punkstar\\SslTest;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Punkstar\\Ssl\\Reader;\n\nclass IntegrationTest extends TestCase\n{\n /**\n * @test\n * @dataProvider exampleCe...
php
chosen
[ { "from": "system", "value": "Fix pin input name on authentication challenge page\n" }, { "from": "human", "value": "<?\nrequire_once \"record.inc\";\nprint $_lib['sess']->doctype\n?>\n\n<head>\n <title>Empatix - Altinn lønnslipper</title>\n <? includeinc('head') ?>\n</head>\n<body>\n<? print ...
php
chosen
[ { "from": "system", "value": "Change to simple string manipulation\n" }, { "from": "human", "value": "<?php\n\nnamespace Tighten\\TLint\\Formatters;\n\nuse PhpParser\\Node;\nuse PhpParser\\Lexer;\nuse PhpParser\\Parser;\nuse PhpParser\\NodeTraverser;\nuse PhpParser\\Node\\Expr\\New_;\nuse PhpPar...
php
chosen
[ { "from": "system", "value": "Add is_safe option to Twig \"form\" function for AuraForm\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the BEAR.Package package\n *\n * @license http://opensource.org/licenses/bsd-license.php BSD\n */\nnamespace BEAR\\Package\\Provide\\Temp...
php
chosen
[ { "from": "system", "value": "Create 'Add Task' link on project/view page\n\nReviewed by: epriestley\n\nSee: https://github.com/facebook/phabricator/pull/368\n" }, { "from": "human", "value": "<?php\n\nfinal class ManiphestPeopleMenuEventListener extends PhutilEventListener {\n\n public functio...
php
chosen
[ { "from": "system", "value": "Fix Pimple not loading when running the test suite.\n\nThis is a temporary fix since Pimple does not use Composer autoloading yet.\n\nWe are not going to push a new patch release since it does not affect the\nactual service provider.\n" }, { "from": "human", "value"...
php
chosen
[ { "from": "system", "value": "Add a bunch of actions to the sub-plugin list\n" }, { "from": "human", "value": "<?php # -*- coding: utf-8 -*-\n/**\n * Created by PhpStorm.\n * User: Arbeit\n * Date: 15.08.2014\n * Time: 11:29\n */\n\n\nclass Biont_SubPlugins_PluginsView\n{\n\n private $install...
php
chosen
[ { "from": "system", "value": "Make detection of strict types compatible with PhpParser 4.\n" }, { "from": "human", "value": "<?php\n\nnamespace GrumPHP\\Parser\\Php\\Visitor;\n\nuse PhpParser\\Node;\n\nclass DeclareStrictTypesVisitor extends AbstractVisitor\n{\n /**\n * @var bool\n */...
php
chosen
[ { "from": "system", "value": "Fix test: use latest php\n" }, { "from": "human", "value": "<?php\nuse PhpBrew\\Testing\\CommandTestCase;\n\n/**\n * @large\n * @group command\n */\nclass PathCommandTest extends CommandTestCase\n{\n public function argumentsProvider() {\n\n return array(\...
php
chosen
[ { "from": "system", "value": "Make use of service manager v3\n" }, { "from": "human", "value": "<?php\nnamespace App\\Helper;\n\nuse App\\Options\\SuitwalkOptions;\nuse Interop\\Container\\ContainerInterface;\n\nclass SuitwalkOptionsHelperFactory\n{\n public function __invoke(ContainerInterfa...
php
chosen
[ { "from": "system", "value": "Add method to remove all access tokens from a user.\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: daedeloth\n * Date: 25/12/14\n * Time: 15:55\n */\n\nnamespace CatLab\\OAuth2\\Mappers;\n\nuse Neuron\\DB\\Query;\n\nclass AccessToke...
php
chosen
[ { "from": "system", "value": "Fix JWT auth middleware not catching JWTException's\n\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Api\\Middleware;\n\nuse Closure;\nuse App\\Api\\Controllers\\ApiController;\nuse Tymon\\JWTAuth\\Exceptions\\JWTException;\n\nclass VerifyJWTToken extend...
php
chosen
[ { "from": "system", "value": "Add the reply policy to the auth SP\n" }, { "from": "human", "value": "<?php namespace App\\Providers;\n\nuse Permission;\nuse Illuminate\\Support\\Facades\\Gate;\nuse Illuminate\\Foundation\\Support\\Providers\\AuthServiceProvider as ServiceProvider;\n\nclass AuthS...
php
chosen
[ { "from": "system", "value": "Allow to pass multiple entities to the RemovalBlocked exception\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace Becklyn\\RadBundle\\Exception;\n\n\n/**\n * Generic exception that marks, that the entity removal may be blocked by databas...
php
chosen
[ { "from": "system", "value": "Fix plural rule and change copyright notice.\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner <toby.zerner@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that...
php
chosen
[ { "from": "system", "value": "Fix old values & errors for array fields" }, { "from": "human", "value": "<?php namespace Laraplus\\Form\\DataStores;\n\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\MessageBag;\nuse Laraplus\\Form\\Contracts\\DataStore;\n\nclass LaravelDataStore impleme...
php
chosen
[ { "from": "system", "value": "Document dependency on CakePHP Migration plugin\n" }, { "from": "human", "value": "<?php\n\nnamespace OrcaServices\\Heartbeat\\Heartbeat\\Sensor;\n\nuse Cake\\Core\\Plugin;\nuse Migrations\\Migrations;\nuse OrcaServices\\Heartbeat\\Heartbeat\\Sensor;\n\n/**\n * DB U...
php
chosen
[ { "from": "system", "value": "Use Database Path for Publishing Migrations." }, { "from": "human", "value": "<?php\n\nnamespace Spatie\\MediaLibrary;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse Spatie\\MediaLibrary\\Commands\\RegenerateCommand;\n\nclass MediaLibraryServiceProvider extends S...
php
chosen
[ { "from": "system", "value": "Add \"I don't know anything\" schedule action handler, using date param\n" }, { "from": "human", "value": "<?php\n\nuse iansltx\\DialogflowBridge\\{Question, Answer, Middleware\\DoublePass, Router};\n\nreturn function(\\Pimple\\Container $c, $env) {\n $c[DoublePa...
php
chosen
[ { "from": "system", "value": "Fix email validation; Use php's filter_var() for email field validation\n" }, { "from": "human", "value": "<?php\n\nclass CM_FormField_Email extends CM_FormField_Text {\n\n\tpublic function __construct($name = 'email') {\n\t\tparent::__construct($name);\n\t}\n\n\tpu...
php
chosen
[ { "from": "system", "value": "Remove PSR-0 autoloading for tests\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nuse Doctrine\\Common\\Annotations\\AnnotationRegistry;\nuse JMS\\Serializer\\Tests\\Util\\DeprecationLogger;\n\n(static function () {\n if (!is_file($autolo...
php
chosen
[ { "from": "system", "value": "Use correct js class in first-run template.\n" }, { "from": "human", "value": "<div id=\"appsettings\" class=\"popup bottomleft hidden\"></div>\n<div id=\"firstrun\">\n\t<?php echo $l->t('You have no contacts in your addressbook.') ?>\n\t<div id=\"selections\">\n\t\...
php
chosen
[ { "from": "system", "value": "Fix issue where 0 is treated as null\n" }, { "from": "human", "value": "<?php namespace Anomaly\\SelectFieldType;\n\nuse Anomaly\\Streams\\Platform\\Addon\\FieldType\\FieldTypePresenter;\n\n/**\n * Class SelectFieldTypePresenter\n *\n * @link http://anomaly...
php
chosen
[ { "from": "system", "value": "Revert \"Added ip address in order to access the debug toolbar\"\n\nThis reverts commit 59832b211b7ddefe84f723bac08849a4feda0798.\n" }, { "from": "human", "value": "<?php\nuse Symfony\\Component\\Debug\\Debug;\n$filename = __DIR__.preg_replace('#(\\?.*)$#', '', $_SE...
php
chosen
[ { "from": "system", "value": "Add i18n route and route filter\n" }, { "from": "human", "value": "<?php\n\nRoute::group(['prefix' => Config::get('core::core.admin-prefix'), 'namespace' => 'Modules\\Workshop\\Http\\Controllers'],\n function () {\n Route::get('modules', ['as' => 'dashboar...
php
chosen
[ { "from": "system", "value": "Fix syntax error for PHP 5.3\n" }, { "from": "human", "value": "<?php\n\nnamespace Concise\\Services;\n\nclass TimeFormatter\n{\n protected function pluralize($number, $word)\n {\n return \"{$number} {$word}\" . (($number == 1) ? '' : 's');\n }\n\n ...
php
chosen
[ { "from": "system", "value": "Remove non functioning example code\n" }, { "from": "human", "value": "<?php\n\nuse OrcaServices\\Datatrans\\Xml\\Api\\Factory;\n\n$merchantId = 1000011011;\n$uppTransactionId = 522061;\n\n$authorisationRequest = Factory::authorisation($merchantId, $uppTransactionId...
php
chosen
[ { "from": "system", "value": "Update server site for osmlive reports\n" }, { "from": "human", "value": "<?php \nfunction startsWith($haystack, $needle)\n{\n $length = strlen($needle);\n return (substr($haystack, 0, $length) === $needle);\n}\n\n$c = new Memcached(); \n$c->addServer(\"loca...
php
chosen
[ { "from": "system", "value": "Revert per user API rate limit\n\nIt was changed from per user to per application in ced3e50bca279f5a499a6d513fcdfd2a020c28ce" }, { "from": "human", "value": "<?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Cache\\RateLimiting\\Limit;\nuse Illuminate\\Foundati...
php
chosen
[ { "from": "system", "value": "Remove ‘loading photos from folder’ tempalte code.\n" }, { "from": "human", "value": "<?php snippet_detect('html_head', array(\n\t'criticalcss' => false,\n\t'prev_next' => false,\n\t'prerender' => false\n)); ?>\n\n\t<?php snippet('banner'); ?>\n\n\t<main role=\"main...
php
chosen
[ { "from": "system", "value": "Make test more resilient to countries already existing in test database\n" }, { "from": "human", "value": "<?php\n\nuse App\\Models\\Country;\n\nclass UsersControllerTest extends TestCase\n{\n /**\n * Checks whether an OK status is returned when the\n * p...
php
chosen
[ { "from": "system", "value": "Update package serviceprovider to support laravel 5.2" }, { "from": "human", "value": "<?php\n\n/**\n * This file is part of the laravel url package.\n *\n * For the full copyright and license information,\n * please view the LICENSE file that was distributed with t...
php
chosen
[ { "from": "system", "value": "Fix require path for Pydio password tool\n" }, { "from": "human", "value": "<?php\ndefine('AJXP_EXEC', 1);\n\nparse_str(implode('&', array_slice($argv, 1)), $_GET);\n\n#$utils_path = \"/opt/pydio/core/classes\";\n$utils_path = \"/home/toilal/IdeaProjects/pydio-core/...
php
chosen
[ { "from": "system", "value": "Remove the useless function Orm::query\n" }, { "from": "human", "value": "<?php\n\nnamespace Face;\nuse Face\\Core\\InstancesKeeper;\nuse Face\\Sql\\Result\\ResultSet;\nuse Face\\Util\\OOPUtils;\n\n/**\n * Face\\ORM is a class that interfaces comon calls of the Face...
php
chosen
[ { "from": "system", "value": "Set controller without __invoke method from invokable class\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, pleas...
php
chosen
[ { "from": "system", "value": "Add new constants for One Time Password validation\n" }, { "from": "human", "value": "<?php\n\nnamespace PragmaRX\\Google2FALaravel\\Support;\n\nclass Constants\n{\n const CONFIG_PACKAGE_NAME = 'google2fa';\n\n const SESSION_AUTH_PASSED = 'auth_passed';\n\n ...
php
chosen
[ { "from": "system", "value": "Fix for calling a static method\n" }, { "from": "human", "value": "<?php\nnamespace vsc\\application\\controllers;\n\nuse vsc\\presentation\\requests\\HttpRequestA;\nuse vsc\\presentation\\views\\ExceptionView;\nuse vsc\\presentation\\views\\ViewA;\n\nclass ContentT...
php
chosen
[ { "from": "system", "value": "Comment out site specific functionality by default\n\nPost types, meta boxes, and shortcodes can be uncommented after\nthey've been customized for first use\n" }, { "from": "human", "value": "<?php\n/*\nPlugin Name: Site Specific Functionality\nDescription: Custom...
php
chosen
[ { "from": "system", "value": "Add extra truthy detections for ‘live’ and ‘enabled’\n" }, { "from": "human", "value": "<?php\nnamespace Craft;\n\nclass FeedMeHelper\n{\n // Public Methods\n // =========================================================================\n\n public static fun...
php
chosen