conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix 5.4 error in cell test\n" }, { "from": "human", "value": "<?php\n\nnamespace Michaeljennings\\Carpenter\\Tests\\Components;\n\nuse Michaeljennings\\Carpenter\\Components\\Cell as CellComponent;\nuse Michaeljennings\\Carpenter\\Contracts\\Cell as CellContract;\nu...
php
chosen
[ { "from": "system", "value": "[AllBundles] Fix doctrine common deprecations and resolve doctrine bundle v2 incompatibility\n" }, { "from": "human", "value": "<?php\n\nnamespace Kunstmaan\\PagePartBundle\\Tests\\Form;\n\nuse Kunstmaan\\NodeBundle\\Form\\Type\\URLChooserType;\nuse Symfony\\Bridge\...
php
chosen
[ { "from": "system", "value": "Move test logic into a function for re-use.\n\nChange-Id: I29ad81ee0f15a969a3d7d89b644b8044af4fd1da\n" }, { "from": "human", "value": "<?php\n\n$repo_clone_url = '{ user: \"%1$s\", team: \"%2$s\", project: \"%3$s\" }';\n$user = 'bees';\n$team = 'ABC';\n$project = 'w...
php
chosen
[ { "from": "system", "value": "Fix Controller class not found\n" }, { "from": "human", "value": "<?php\n\nnamespace BuzzwordCompliant\\FAQs\\Controllers;\n\nuse Backend\\Facades\\BackendMenu;\nuse Illuminate\\Http\\Request;\n\nclass FAQs extends Controller\n{\n public function __construct()\n ...
php
chosen
[ { "from": "system", "value": "Fix initialization of Smtp Mailer\n" }, { "from": "human", "value": "<?php\n\nnamespace Remp\\MailerModule\\Mailer;\n\nuse Nette\\Mail\\IMailer;\nuse Nette\\Mail\\Message;\nuse Remp\\MailerModule\\Config\\Config;\nuse Remp\\MailerModule\\Repository\\ConfigsRepositor...
php
chosen
[ { "from": "system", "value": "FIX Base pase constant BLOGGER_DIR\n" }, { "from": "human", "value": "<?php\n\n/**\n * Fetches the name of the current module folder name.\n *\n * @return string\n**/\ndefine('BLOGGER_DIR', dirname(__FILE__));\n" }, { "from": "gpt", "value": "<?php\n\n/*...
php
chosen
[ { "from": "system", "value": "Change how we get election ID" }, { "from": "human", "value": "<?php\r\n\r\nrequire_once('config.php');\r\nglobal $config;\r\n\r\nrequire_once('page_template_dash_head.php');\r\nrequire_once('page_template_dash_sidebar.php');\r\n\r\n$stmt = $pdo->prepare(\"SELECT `n...
php
chosen
[ { "from": "system", "value": "Rename class attribute, method and variable\n" }, { "from": "human", "value": "<?php\n\nnamespace Bauhaus;\n\nuse InvalidArgumentException;\nuse Interop\\Http\\ServerMiddleware\\MiddlewareInterface;\nuse Interop\\Http\\ServerMiddleware\\DelegateInterface;\nuse Psr\\...
php
chosen
[ { "from": "system", "value": "Use wrapped object for presenter\n" }, { "from": "human", "value": "<?php\nnamespace Lio\\Forum\\Replies;\n\nuse App;\nuse Input;\nuse McCool\\LaravelAutoPresenter\\BasePresenter;\nuse Request;\n\nclass ReplyPresenter extends BasePresenter\n{\n public function ur...
php
chosen
[ { "from": "system", "value": "Test script can be run from outside of its own directory\n" }, { "from": "human", "value": "<?php\n\ninclude '../d-bug.php';\n\nclass A {\n\t\n}\n\nclass B extends A {\n\tpublic $a = 'test';\n\tpublic $b = [[1, 2, 3, 4], 2, 3, 4];\n\t\n\tconst C = 42;\n\t\n\tpublic ...
php
chosen
[ { "from": "system", "value": "[SwiftmailerBundle] Fix expected default value in SwiftmailerExtension unit test\n\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien.potencier@symfony-project.com>\n *\n * For the full c...
php
chosen
[ { "from": "system", "value": "Add ignore block of code coverage" }, { "from": "human", "value": "<?php\n/**\n * Zend Framework (http://framework.zend.com/)\n *\n * @link http://github.com/zendframework/BrZend for the canonical source repository\n * @copyright Copyright (c) 2005-2014 Zend Te...
php
chosen
[ { "from": "system", "value": "Use content-none.php instead of no-results.php\n\nRenamed no-results.php to content-none.php for consistency (as done in core: https://core.trac.wordpress.org/ticket/25181); so let's make sure it's used." }, { "from": "human", "value": "<?php\n/**\n * The template f...
php
chosen
[ { "from": "system", "value": "Add newline at end of file\n" }, { "from": "human", "value": "<?php\n\nnamespace Kevinrob\\GuzzleCache\\Storage;\n\nuse Kevinrob\\GuzzleCache\\CacheEntry;\n\n/**\n * This cache class is backed by a PHP Array.\n */\nclass VolatileRuntimeStorage implements CacheStorag...
php
chosen
[ { "from": "system", "value": "Use 'use' keyword for Mailgun\n" }, { "from": "human", "value": "<?hh // strict\n\nclass MailgunEmailClient extends EmailClient {\n private Mailgun\\Mailgun $client;\n public string $domain;\n public string $email;\n\n public function __construct(string $api_key...
php
chosen
[ { "from": "system", "value": "Rebuild the entire ContainerBuilder when getting a new container\n - Getting more than one container from the same ContainerBuilder caused some services to be linked and private services didn't match the registered private names\n" }, { "from": "human", "value": "<?...
php
chosen
[ { "from": "system", "value": "Stop incorrect inspection in PhpStorm (WI-12377)\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Collections library.\n *\n * (c) University of Cambridge\n *\n * For the full copyright and license information, please view the LICENSE\n * ...
php
chosen
[ { "from": "system", "value": "Insert into stat_page_views with LOW_PRIORITY\n" }, { "from": "human", "value": "<?php\n/**\n * ocs-webserver\n *\n * Copyright 2016 by pling GmbH.\n *\n * This file is part of ocs-webserver.\n *\n * This program is free software: you can redistribute it and...
php
chosen
[ { "from": "system", "value": "Add try/catch for state board display\n" }, { "from": "human", "value": "<?php\n\n/*\nCopyright (C) 2010-2016 by the FusionInventory Development Team\nCopyright (C) 2016 Teclib'\n\nThis file is part of Armadito Plugin for GLPI.\n\nArmadito Plugin for GLPI is free so...
php
chosen
[ { "from": "system", "value": "Add route middleware (requires 5.2 laravel+ now to work).\n" }, { "from": "human", "value": "<?php\n\n/**\n * Package Routes\n */\n\nRoute::group(['namespace' => 'Taskforcedev\\CrudAPI\\Http\\Controllers'], function () {\n Route::group(['prefix' => 'api'], functi...
php
chosen
[ { "from": "system", "value": "Fix extra output in tests\n" }, { "from": "human", "value": "<?php\nnamespace Rocketeer\\Abstracts\\Strategies;\n\nuse Mockery\\MockInterface;\nuse Rocketeer\\TestCases\\RocketeerTestCase;\n\nclass AbstractStrategyTest extends RocketeerTestCase\n{\n public functi...
php
chosen
[ { "from": "system", "value": "Use asyncCoroutine instead of manual rethrow + new Coroutine\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\n\nrequire __DIR__ . '/../../vendor/autoload.php';\n\nuse Amp\\Coroutine;\nuse Amp\\Delayed;\nuse Amp\\Emitter;\nuse Amp\\Loop;\nuse Amp\\Promis...
php
chosen
[ { "from": "system", "value": "Fix error when part of profile data is unset\n" }, { "from": "human", "value": "<?php\n\nnamespace BNETDocs\\Models\\User;\n\nuse \\CarlBennett\\MVC\\Libraries\\Model;\n\nclass View extends Model {\n\n public $biography;\n public $contributions;\n public $discord...
php
chosen
[ { "from": "system", "value": "Set UTC as default timezone\n" }, { "from": "human", "value": "<?php\nini_set('display_startup_errors', 1);\nini_set('display_error', 1);\nerror_reporting(E_ALL);\n\n$debug = false; // If true the script prints additional debug lines to video\n$private_key='a258a26f...
php
chosen
[ { "from": "system", "value": "Remove URL support & uses absolute paths for files\n" }, { "from": "human", "value": "<?php\n\nif(isset($_GET['all'])) {\n $files = scandir('fortunes');\n // Removes '.'\n array_shift($files);\n // Removes '..'\n array_shift($files);\n \n $file_...
php
chosen
[ { "from": "system", "value": "Switch to wp_remote_fopen escaped function\n" }, { "from": "human", "value": "<?php\n/**\n * The template for displaying the footer.\n *\n * Contains the closing of the #content div and all content after.\n *\n * @link https://developer.wordpress.org/themes/basics/t...
php
chosen
[ { "from": "system", "value": "Fix PHP OOM error while processing test coverage\n" }, { "from": "human", "value": "<?php\n\nuse Desk\\Test\\Helper\\TestCase;\nuse Guzzle\\Service\\Builder\\ServiceBuilder;\n\nerror_reporting(-1);\n\n$ds = DIRECTORY_SEPARATOR;\n\n$autoloader = dirname(__DIR__) . \"...
php
chosen
[ { "from": "system", "value": "Set correct action for create form. Stupid mistake.\n" }, { "from": "human", "value": "@extends('master')\n\n@section('content')\n\n <h1>Create new blog post</h1>\n\n <hr/>\n\n @include('posts/partials/messages')\n\n {!! Form::open(['url' => 'posts', 'f...
php
chosen
[ { "from": "system", "value": "Remove support for obsolete versions of Symfony in confguration\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the EzCoreExtraBundle package.\n *\n * (c) Jérôme Vieilledent <jerome@vieilledent.fr>\n *\n * For the full copyright and license i...
php
chosen
[ { "from": "system", "value": "Correct error for array list\n" }, { "from": "human", "value": "<?php\n/**\n * Created by EBelair.\n * User: manu\n * Date: 07/03/14\n * Time: 19:20\n */\n\nnamespace SuchTable\\Element;\n\n\nuse SuchTable\\Element;\nuse SuchTable\\Exception\\InvalidArgumentExceptio...
php
chosen
[ { "from": "system", "value": "Move Namespace in first line\n" }, { "from": "human", "value": "<?php \nnamespace Xaamin\\Curl;\n\nuse Illuminate\\Foundation\\AliasLoader as Loader;\nuse Illuminate\\Support\\ServiceProvider;\n\n/**\n * CURL Service provider\n *\n * @package Xaamin\\Curl\n * @autho...
php
chosen
[ { "from": "system", "value": "Fix header content-type for lang file\n" }, { "from": "human", "value": "<?php\n\nnamespace Code16\\Sharp\\Http;\n\nuse Illuminate\\Routing\\Controller;\nuse Illuminate\\Support\\Facades\\Cache;\n\nclass LangController extends Controller\n{\n\n /**\n * Echoes...
php
chosen
[ { "from": "system", "value": "Increase avatar upload max file size\n" }, { "from": "human", "value": "<?php\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 was distr...
php
chosen
[ { "from": "system", "value": "Rename of class, adjust scope\n" }, { "from": "human", "value": "<?php\n/**\n * update\n *\n * Monitor statistics detailing how web servers are currently performing and store those\n * statistics in a database.\n *\n * PHP Thread References\n *\n * MULTITHREADING IN...
php
chosen
[ { "from": "system", "value": "Add output value to test setup.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Created by PhpStorm.\n * User: clemens\n * Date: 21-03-14\n * Time: 11:27\n */\n\nnamespace UmlGeneratorPhp;\n\nuse UmlGeneratorPhp\\OopFilter;\nuse UmlGeneratorPhp\\OopToDot;\n\ncla...
php
chosen
[ { "from": "system", "value": "Add second escape backslash to namespace strings\n" }, { "from": "human", "value": "<?php\nnamespace Gt\\Dom;\n\n/**\n * Represents any web page loaded in the browser and serves as an entry point\n * into the web page's content, the DOM tree (including elements such...
php
chosen
[ { "from": "system", "value": "Switch user type check to acl\n" }, { "from": "human", "value": "<?php\n\n/**\n * Outputs the admin toolbar if the user is an admin,\n * otherwise simply loads jQuery for other scripts that\n * may rely on it.\n */\n\nif ($appconf['Scripts']['jquery_source'] === 'lo...
php
chosen
[ { "from": "system", "value": "Use fully qualified class name instead of string\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse Jenssegers\\Rollbar\\RollbarServiceProvider;\n\nclass AppServiceProvider extends ServiceProvider\...
php
chosen
[ { "from": "system", "value": "Change the year to 2017\n\n" }, { "from": "human", "value": "<!-- Main Footer -->\n<footer class=\"main-footer\">\n\t<!-- To the right -->\n\t<div class=\"pull-right hidden-xs\">\n\t\t <strong class=\"text-red\">IPC Portal</strong>\n\t</div>\n\t<!-- Default to the l...
php
chosen
[ { "from": "system", "value": "Fix deprecated call to constructor\n\nFixes #56\n" }, { "from": "human", "value": "<?php\n\n/**\n * This file is part of the Cron package.\n *\n * (c) Dries De Peuter <dries@nousefreak.be>\n *\n * For the full copyright and license information, please view the LICEN...
php
chosen
[ { "from": "system", "value": "Fix bug affecting non-session based data stores\n" }, { "from": "human", "value": "<?php\nnamespace Kunnu\\Dropbox\\Store;\n\nuse InvalidArgumentException;\nuse Kunnu\\Dropbox\\Exceptions\\DropboxClientException;\n\n/**\n * Thanks to Facebook\n *\n * @link https://d...
php
chosen
[ { "from": "system", "value": "[Fix] Set config to be publish by artisan with vendor:publish\n" }, { "from": "human", "value": "<?php namespace TecBeast\\PreLaunch;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse App;\n\nclass PreLaunchServiceProvider extends ServiceProvider {\n\n\tpublic funct...
php
chosen
[ { "from": "system", "value": "Fix package tag in docblock\n" }, { "from": "human", "value": "<?php\n namespace DB\\Driver;\n\n /**\n * Database driver for MYSQL using MYSQLI rather than default and deprecated\n * MYSQL which is recommended by most PHP developer.\n *\n * @pa...
php
chosen
[ { "from": "system", "value": "Set max nesting level to 200 for tests\n" }, { "from": "human", "value": "<?php\n\n/**\n * Find the auto loader file\n */\n$files = [\n __DIR__ . '/../vendor/autoload.php',\n __DIR__ . '/../../vendor/autoload.php',\n __DIR__ . '/../../../vendor/autoload.php...
php
chosen
[ { "from": "system", "value": "Make Role migration's name field nullable\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass CreateRolesTable extends Migration\n{\n /**\n * Run the migrations.\n...
php
chosen
[ { "from": "system", "value": "Fix BCC Amazon SES Wrapper\n" }, { "from": "human", "value": "<?php\n\nnamespace ByJG\\Mail\\Wrapper;\n\nuse Aws\\Common\\Credentials\\Credentials;\nuse Aws\\Ses\\SesClient;\nuse ByJG\\Mail\\Envelope;\nuse ByJG\\Mail\\MailConnection;\n\nclass AmazonSesWrapper extend...
php
chosen
[ { "from": "system", "value": "Fix more PHPUnitTest backwards incompatibilities" }, { "from": "human", "value": "<?php\n\nspl_autoload_register(function ($classname) {\n\t$file = dirname(__DIR__) . DIRECTORY_SEPARATOR . str_replace('\\\\', DIRECTORY_SEPARATOR, $classname) . '.php';\n\tif (is_file...
php
chosen
[ { "from": "system", "value": "Check that there are no uninstalled modules\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Tests\\Action;\n\nuse Common\\WebTestCase;\n\nclass ModulesTest extends WebTestCase\n{\n public function testAuthenticationIsNeeded(...
php
chosen
[ { "from": "system", "value": "Make the crontab:sync command usable\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Register The Artisan Commands\n|----------------------------------------------------------------------...
php
chosen
[ { "from": "system", "value": "Fix test of assets twig extension\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests\\Becklyn\\AssetsBundle\\Twig;\n\nuse Becklyn\\AssetsBundle\\Html\\AssetHtmlGenerator;\nuse Becklyn\\AssetsBundle\\File\\FileLoader;\nuse Becklyn\\AssetsBundle\\Twig\\Assets...
php
chosen
[ { "from": "system", "value": "Disable debug and trace log when run tests.\n" }, { "from": "human", "value": "<?php\n\nrequire_once __DIR__ . \"/config.php\";\nrequire_once __DIR__ . \"/toolkit/RandStr.php\";\nrequire_once __DIR__ . \"/toolkit/TcpStat.php\";\nrequire_once __DIR__ . \"/toolkit/fu...
php
chosen
[ { "from": "system", "value": "Use PHP 8 constructor property promotion\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types = 1);\n/**\n * /src/EventSubscriber/DoctrineExtensionSubscriber.php\n *\n * @author TLe, Tarmo Leppänen <tarmo.leppanen@pinja.com>\n */\n\nnamespace App\\EventSub...
php
chosen
[ { "from": "system", "value": "Use US English (organization over organisation)\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Active Collab Payments project.\n *\n * (c) A51 doo <info@activecollab.com>. All rights reserved.\n */\n\ndeclare(strict_types=1);\n\nnamespac...
php
chosen
[ { "from": "system", "value": "Change argument name in command" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace Pac\\ProophPackage\\Command;\n\nuse ArrayIterator;\nuse Pac\\Console\\Command;\nuse Prooph\\EventStore\\Stream;\nuse Prooph\\EventStore\\StreamName;\nuse Sy...
php
chosen
[ { "from": "system", "value": "Fix the 'base' attribute for ng-apps\n" }, { "from": "human", "value": "<!doctype html>\n<html class=\"no-js\" <?php language_attributes(); ?>>\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"v...
php
chosen
[ { "from": "system", "value": "Allow to use the internal PHP server\n\nLittle hack found on Silex documentation:\n http://silex.sensiolabs.org/doc/web_servers.html#php-5-4\n\nTo run the server:\n php -S 127.0.0.1:8080 index.php\n" }, { "from": "human", "value": "<?php\n\nif (version_compare...
php
chosen
[ { "from": "system", "value": "Make admin user view filter match the base class signature\n" }, { "from": "human", "value": "<?php\r\n\r\nnamespace ATPAdmin\\View\\Filter;\r\n\r\nclass AdminUser extends \\ATPCore\\View\\Filter\\AbstractBlockFilter\r\n{\r\n\tprotected function _replace()\r\n\t{\r\...
php
chosen
[ { "from": "system", "value": "Implement basic functionality for cache stat monitoring\n" }, { "from": "human", "value": "<?php\n class Better_PHP_Cache\n {\n private $cache_files_dir;\n\n public function __construct($cache_files_dir)\n {\n if($cache_files_di...
php
chosen
[ { "from": "system", "value": "Revert \"Explicitly use alias in command.\"\n\nThis reverts commit d5d5a4385dd8e4f9f1d7234050ba4226e98092e5.\n" }, { "from": "human", "value": "<?php\n\nnamespace InfusionWeb\\Laravel\\ContentCache;\n\nuse Illuminate\\Console\\Command;\n\nuse ContentCache;\n\nclass ...
php
chosen
[ { "from": "system", "value": "Add test ensuring that terminating a sleeping strand allows `Kernel::wait()` to exit \"early\".\n" }, { "from": "human", "value": "<?php\n\ndeclare (strict_types = 1); // @codeCoverageIgnore\n\nnamespace Recoil;\n\nrit('resumes execution after the specified number o...
php
chosen
[ { "from": "system", "value": "ENHANCEMENT: Add extension to site config\n" }, { "from": "human", "value": "<?php \nObject::add_extension('SiteTree', 'AccessKeyExtension');\nObject::add_extension(\"Page_Controller\",\"AccessKeyExtension\");\n ?>" }, { "from": "gpt", "value": "<?php \n...
php
chosen
[ { "from": "system", "value": "Move post count to config\n" }, { "from": "human", "value": "<?php\n/**\n * Template definitions for Datastore access\n *\n * Copy this file to \"config.php\" and populate your details\n */\ndefine('GDS_ACCOUNT', ' !! your service account name here !! ');\ndefine('G...
php
chosen
[ { "from": "system", "value": "Make proud topbar id unique\n" }, { "from": "human", "value": "<?php if ( $topbar_logo || $topbar_title ): ?>\n <ul class=\"logo-menu list-unstyled clearfix\">\n <?php if ( $topbar_logo ): ?>\n <li class=\"h3\">\n <a href=\"<?php ...
php
chosen
[ { "from": "system", "value": "[Doctrine] Fix default value to null for entity manager to make fluent integration with Doctrine Registry work\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 * Fo...
php
chosen
[ { "from": "system", "value": "Disable Foreign Key for Postgres\n\nHandle the following error with postgres:\n\nIlluminate/Database/QueryException with message 'SQLSTATE[42704]: Undefined object: 7 ERROR: unrecognized configuration parameter \"foreign_key_checks\" (SQL: SET FOREIGN_KEY_CHECKS=0)'\n" }, ...
php
chosen
[ { "from": "system", "value": "Replace GA with Fathom 🙏\n" }, { "from": "human", "value": "<script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsBy...
php
chosen
[ { "from": "system", "value": "Test that CM_Paging_Translation_Language->remove, delete specific language value only (not all langs)\n" }, { "from": "human", "value": "<?php\n\nclass CM_Paging_Translation_LanguageTest extends CMTest_TestCase {\n\n public function testRemove() {\n $langu...
php
chosen
[ { "from": "system", "value": "Add Mailchimp webhook test class.\n" }, { "from": "human", "value": "<?php\n\n// require_once 'CiviTest/CiviUnitTestCase.php';\nrequire_once 'tests/phpunit/CiviTest/CiviUnitTestCase.php';\n\n/**\n * Tests for Mailchimp Webhooks.\n */\nclass CRM_CiviMailchimp_Page_We...
php
chosen
[ { "from": "system", "value": "Remove Config from AWS Credentials\n" }, { "from": "human", "value": "<?php\n\n\trequire_once './config/config.php';\n\n $credentials = new Aws\\Credentials\\Credentials(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY);\n\n $config = array();\n $config['region'] =...
php
chosen
[ { "from": "system", "value": "Use the git status command for building the files-list\n" }, { "from": "human", "value": "<?php\n\nnamespace GrumPHP\\Locator;\n\nuse GitElephant\\Objects\\Diff\\Diff;\nuse GitElephant\\Objects\\Diff\\DiffObject;\nuse GitElephant\\Repository;\n\n/**\n * Class Git\n ...
php
chosen
[ { "from": "system", "value": "Remove useless object manager property" }, { "from": "human", "value": "<?php\n\nnamespace Natso\\Piraeus\\Block\\Payment;\n\nclass Redirect extends \\Magento\\Framework\\View\\Element\\Template\n{\n public $customerSession;\n public $logger;\n pr...
php
chosen
[ { "from": "system", "value": "Update output parameters for Click to Call\n" }, { "from": "human", "value": "<?php\n/**\n * Click to Call\n *\n * @url https://platform.x-onweb.com/#clicktocall\n */\nrequire __DIR__ . '/../vendor/autoload.php';\n\n/**\n * Your API Token\n */\n$token = 'ExampleToke...
php
chosen
[ { "from": "system", "value": "Add link of an author to the credit section\n" }, { "from": "human", "value": "<?php\nif(!defined('MEDIAWIKI')) die;\n\n$dir = __DIR__;\n$ext = 'HideUnwanted';\n\n$wgExtensionCredits['other'][] = array(\n 'path' => __FILE__,\n 'name' => $ext,...
php
chosen
[ { "from": "system", "value": "Fix Raw Data page for using new schema\n" }, { "from": "human", "value": "<?php\n\nfunction GetHIVData($mysqli) \n{\n\t$data = Array();\n\t$sql = <<<EOT\nSELECT * FROM sequence\nWHERE consensus = 1\nORDER BY year DESC;\nEOT;\n\n\tif($stmt = $mysqli->prepare($sql))\n...
php
chosen
[ { "from": "system", "value": "Expand technology section for plot to nearest by default.\n" }, { "from": "human", "value": "<?php\n\n$template->assign('PageTopic','Plot A Course');\n\nrequire_once(get_file_loc('menue.inc'));\ncreate_nav_menue($template,$player);\n\n$container=array();\n$container...
php
chosen
[ { "from": "system", "value": "Add 'disabled' parameter to Activity renderer\n" }, { "from": "human", "value": "<?php\n\nnamespace Honeybee\\Ui\\Renderer\\Html\\Honeybee\\Ui\\Activity;\n\nuse Honeybee\\Ui\\Renderer\\ActivityRenderer;\n\nclass HtmlActivityRenderer extends ActivityRenderer\n{\n ...
php
chosen
[ { "from": "system", "value": "Set initial slug length to 3\n" }, { "from": "human", "value": "<?php\n\nclass Helpers\n{\n const SUPERUSER_ID = 1;\n const PAGINATION_DEFAULT_ITEMS = 15;\n const UPLOAD_SLUG_INITIAL_LENGTH = 4;\n const NEW_USER_DAYS = 7; // How long is a user considered...
php
chosen
[ { "from": "system", "value": "Make cookiefactory instanced, set cryptosystem on instantiation\n" }, { "from": "human", "value": "<?php\n\nnamespace Rosio\\EncryptedCookie;\n\nclass CookieFactory\n{\n\tstatic function createCookie ($name)\n\t{\n\t\treturn new EncryptedCookie ($name);\n\t}\n\n\tst...
php
chosen
[ { "from": "system", "value": "Add sqs to list of supported drivers\n\nJust forgotten I presume." }, { "from": "human", "value": "<?php\n\nreturn array(\n\n\t/*\n\t|--------------------------------------------------------------------------\n\t| Default Queue Driver\n\t|---------------------------...
php
chosen
[ { "from": "system", "value": "Order photo albums by date\n" }, { "from": "human", "value": "<?php\n/*\n * Media class\n * Provides functions to get other media types\n */\n\nclass Media {\n protected $db;\n function __construct() {\n global $db;\n $this->db = $db; \n }\n\n...
php
chosen
[ { "from": "system", "value": "Use verbose method name to avoid conflict with implementing class.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Support\\Traits;\n\nuse Orchestra\\Support\\Str;\nuse Il...
php
chosen
[ { "from": "system", "value": "Add license header to migration\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddExternalContestType extends Migration\n{\n /**\n * Run the migrations.\n *\n * @return void\n */\n public f...
php
chosen
[ { "from": "system", "value": "Make $admins in config optional\n" }, { "from": "human", "value": "<?php\n\nclass auth_model extends Model {\n\n function is_admin($user) {\n global $admins;\n\n if (in_array($user, $admins)) {\n return true;\n }\n return fa...
php
chosen
[ { "from": "system", "value": "feat: Configure symfony serializer to preserve empty objects\n" }, { "from": "human", "value": "<?php\n\nnamespace CQRSFactory;\n\nuse CQRS\\Serializer\\SerializerInterface;\nuse CQRS\\Serializer\\SymfonySerializer;\nuse CQRSFactory\\Exception\\DomainException;\nuse...
php
chosen
[ { "from": "system", "value": "Fix colorize otput if there is no config settings in global config file\n" }, { "from": "human", "value": "<?php\n\nif ( !defined( 'WP_CLI' ) ) return;\n\nglobal $argv;\n\n$env = $argv[1];\n\n$config = array();\n\n$config_path = getenv( 'HOME' ) . '/.wp-cli/config.y...
php
chosen
[ { "from": "system", "value": "Add new exceptions to `$dontReport` property\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Exceptions;\n\nuse Exception;\nuse Illuminate\\Database\\Eloquent\\ModelNotFoundException;\nuse Symfony\\Component\\HttpKernel\\Exception\\HttpException;\nuse Sym...
php
chosen
[ { "from": "system", "value": "Add Nova UI for class standing rank order\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Nova;\n\nuse Illuminate\\Http\\Request;\nuse Laravel\\Nova\\Fields\\BelongsToMany;\nuse Laravel\\Nova\\Fields\\Text;\n\nclass ClassStandi...
php
chosen
[ { "from": "system", "value": "Add sqs to list of supported drivers\n\nJust forgotten I presume.\n" }, { "from": "human", "value": "<?php\n\nreturn array(\n\n\t/*\n\t|--------------------------------------------------------------------------\n\t| Default Queue Driver\n\t|-------------------------...
php
chosen
[ { "from": "system", "value": "Allow local override of api key and secret.\n" }, { "from": "human", "value": "<?php\n\nclass ShippingEasy_SignedUrl\n{\n public function __construct($http_method=null, $path=null, $params=null, $json_body=null, $api_timestamp=null)\n {\n $secret = ShippingEasy...
php
chosen
[ { "from": "system", "value": "Migrate DB import PRO disable Wp Debug\n" }, { "from": "human", "value": "<?php\ndefine( 'DB_NAME', 'root_tongue_wp' );\ndefine( 'DB_USER', 'root' );\ndefine( 'DB_PASSWORD', 'root' );\ndefine( 'DB_HOST', '127.0.0.1' );\n\n\ndefine( 'SAVEQUERIES', true );\ndefine( 'W...
php
chosen
[ { "from": "system", "value": "Fix phantomJS keeps user logged in even in new session; make login wait for login form\n" }, { "from": "human", "value": "<?php\n\nnamespace Lmc\\Steward\\Test;\n\n/**\n * This is a workaround for the order in which PHPUnit executes addFailure on listeners and tearD...
php
chosen
[ { "from": "system", "value": "Fix Fatal error in php5.2\n" }, { "from": "human", "value": "<?php\nif (version_compare(PHP_VERSION, '5.3', '>=')) {\n $loader = require_once __DIR__ . '/vendor/autoload.php';\n} else {\n require_once dirname(__FILE__) . '/vendor/splclassloader/SplClassLoader....
php
chosen
[ { "from": "system", "value": "Load the .env(.local) file using Symfony's Dotenv\n" }, { "from": "human", "value": "<?php\n\nuse Doctrine\\Common\\Annotations\\AnnotationRegistry;\n\n// use vendor generated autoloader\n$loader = require __DIR__ . '/vendor/autoload.php';\nAnnotationRegistry::regis...
php
chosen
[ { "from": "system", "value": "Make sure the destination directory can be created recursively\n" }, { "from": "human", "value": "<?php namespace Todaymade\\Daux\\Format\\HTML;\n\nuse Todaymade\\Daux\\GeneratorHelper;\n\ntrait HTMLUtils\n{\n public function ensureEmptyDestination($destination)\...
php
chosen
[ { "from": "system", "value": "Use namespaced PHPUnit test case\n\nPolyfilled by yoast package now\n" }, { "from": "human", "value": "<?php\n\nuse WP_CLI_Login\\WP_CLI_Login_Server;\n\nif (! class_exists('PHPUnit_Framework_TestCase')) {\n class_alias('PHPUnit\\Framework\\TestCase', 'PHPUnit_Fr...
php
chosen
[ { "from": "system", "value": "Use unique variables with list() to prevent unexpected results.\n\nPHP Compatibility check for PHP_CodeSniffer error message:\n FILE: php-curl-class/scripts/bump_major_version.php\n ------------------------------------------------------------------------------------------...
php
chosen
[ { "from": "system", "value": "Fix copy&pasted extension config root node name\n" }, { "from": "human", "value": "<?php\n\nnamespace OwsProxy3\\CoreBundle\\DependencyInjection;\n\nuse Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder;\nuse Symfony\\Component\\Config\\Definition\\Config...
php
chosen
[ { "from": "system", "value": "Make sure to test failures\n" }, { "from": "human", "value": "<?php\nnamespace Tests\\Shopello\\API;\n\nuse \\Shopello\\API\\ApiClient;\nuse \\Curl\\Curl;\n\nclass ApiClientTest extends \\PHPUnit_Framework_TestCase\n{\n /** @var ApiClient */\n private $target;...
php
chosen
[ { "from": "system", "value": "Support REDIS_HOST and REDIS_PORT environment variables\n" }, { "from": "human", "value": "<?php\n\nrequire_once '../lib/Qless/Worker.php';\nrequire_once '../lib/Qless/Queue.php';\nrequire_once '../lib/Qless/Client.php';\nrequire_once 'TestWorkerImpl.php';\n\n$queue...
php
chosen
[ { "from": "system", "value": "Fix for travis php5.4 falling\n" }, { "from": "human", "value": "<?php\n\nnamespace Purekid\\Mongodm\\Test\\TestCase;\n\nuse Phactory\\Mongo\\Phactory;\nuse Purekid\\Mongodm\\MongoDB;\n\n/**\n * Test Case Base Class for using Phactory *\n */\nabstract class Phactory...
php
chosen