conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Test page to test input and validation classes for the registration system\n" }, { "from": "gpt", "value": "<?php \nrequire_once '../core/init.php';\nif(Input::exists()) {\n\techo Input::get('username');\n}\n?>\n\n\n/**************************************************...
php
chosen
[ { "from": "human", "value": "Add penthotal file to load all functions\n" }, { "from": "gpt", "value": "<?php\n/*\n * This file is part of the Pentothal package.\n *\n * (c) Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>\n *\n * For the full copyright and license information, please view the L...
php
chosen
[ { "from": "human", "value": "Create an interface for normalize classes\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Nwidart\\LaravelNormalizer\\Contracts;\n\ninterface Normalizer\n{\n /**\n * Normalize the given data\n * @param array $data\n * @return array\n */\n pu...
php
chosen
[ { "from": "human", "value": "Test adding a profile in the frontend\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Frontend\\Modules\\Profiles\\Tests\\Engine;\n\nuse Frontend\\Modules\\Profiles\\Engine\\Model;\nuse Common\\WebTestCase;\nuse Frontend\\Modules\\Profiles\\Engine\\Profile;\n\nfi...
php
chosen
[ { "from": "human", "value": "Add default permissions to roles, so new admins can actually do something.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass Add...
php
chosen
[ { "from": "human", "value": "Remove hhvm from travis for now\n" }, { "from": "gpt", "value": "<?php\nnamespace Fyuze\\Kernel\\Application;\n\nuse Fyuze\\Cmd\\Shell;\nuse Fyuze\\Kernel\\Fyuze;\n\nclass Console extends Fyuze\n{\n\n public function boot()\n {\n $cli = new Shell($this->...
php
chosen
[ { "from": "system", "value": "Remove useless event source type\n" }, { "from": "human", "value": "<?php\n\n/**\n * Copyright 2016 LINE Corporation\n *\n * LINE Corporation licenses this file to you under the Apache License,\n * version 2.0 (the \"License\"); you may not use this file except in c...
php
chosen
[ { "from": "human", "value": "Add indexes on image_id to speed up some queries\n" }, { "from": "gpt", "value": "<?php\ndeclare(strict_types=1);\n\nuse Phinx\\Migration\\AbstractMigration;\n\nfinal class AddImageIdIndexes extends AbstractMigration\n{\n /**\n * Change Method.\n *\n *...
php
chosen
[ { "from": "system", "value": "Add array translation test for static call\n" }, { "from": "human", "value": "<?php\nnamespace Stichoza\\GoogleTranslate\\Tests;\n\nuse Stichoza\\GoogleTranslate\\TranslateClient;\n\nclass TranslationTest extends \\PHPUnit_Framework_TestCase\n{\n public function ...
php
chosen
[ { "from": "system", "value": "Add tests for setting cookies with SetCookie header" }, { "from": "human", "value": "<?php\n\n/**\n * @namespace\n */\nnamespace ZendTest\\Http;\n\nuse Zend\\Http\\Client;\n\nclass ClientTest extends \\PHPUnit_Framework_TestCase\n{\n public function testClientRet...
php
chosen
[ { "from": "human", "value": "[Notifier] Add the possibility to add actions on Slack messages\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please...
php
chosen
[ { "from": "human", "value": "Add skeleton load integration test\n" }, { "from": "gpt", "value": "<?php\n\nnamespace MageConfigSync\\Tests\\Integration;\n\nuse MageConfigSync\\Application;\nuse MageConfigSync\\Magento;\nuse Symfony\\Component\\Console\\Tester\\CommandTester;\nuse Symfony\\Compone...
php
chosen
[ { "from": "human", "value": "[TASK] Add code migration to \"composerify\" a package\n\nThe migration moves all class files into a PSR-0 compatible directory\nstructure and adds a composer manifest; Package.xml is removed.\n\nChange-Id: I2054b3ece5b98ed6d3232e0da06ce36fb2bf41e9\nRelated: #41031\nReleases: 1....
php
chosen
[ { "from": "human", "value": "Add test case for generator factory" }, { "from": "gpt", "value": "<?php\n/**\n * @see https://github.com/zendframework/zend-di for the canonical source repository\n * @copyright Copyright (c) 2017 Zend Technologies USA Inc. (http://www.zend.com)\n * @license ...
php
chosen
[ { "from": "system", "value": "Use array cache in tests\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests;\n\nuse Illuminate\\Contracts\\Console\\Kernel;\n\ntrait CreatesApplication\n{\n /**\n * Creates the application.\n *\n * @return \\Illuminate\\Foundation\\Applicatio...
php
chosen
[ { "from": "human", "value": "Add interface for auth entity\n" }, { "from": "gpt", "value": "<?php\n/**\n * Eadrax Entity/Auth.php\n *\n * @package Entity\n * @author Dion Moult <dion@thinkmoult.com>\n * @copyright (c) 2012 Dion Moult\n * @license ISC http://opensource.org/licenses/isc-lic...
php
chosen
[ { "from": "human", "value": "Add unit tests for Metadata" }, { "from": "gpt", "value": "<?php\n\nnamespace PHPExiftool\\Driver\\Metadata;\n\nrequire_once dirname(__FILE__) . '/../../../../../lib/PHPExiftool/Driver/Metadata/Metadata.php';\n\nclass TagTest extends \\PHPExiftool\\Driver\\Tag\n{\n\n...
php
chosen
[ { "from": "human", "value": "Make campaign run id nullable\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass MakeCampaignRunNullable extends Migration\n{\n ...
php
chosen
[ { "from": "human", "value": "Add test for AssociationValue resolver.\n" }, { "from": "gpt", "value": "<?php\ndeclare(strict_types = 1);\n\nnamespace Apha\\Saga;\n\nuse Apha\\Domain\\Identity;\nuse Apha\\Message\\Event;\n\nclass SimpleAssociationValueResolverTest extends \\PHPUnit_Framework_TestC...
php
chosen
[ { "from": "human", "value": "Set MCZ to 'publish pending'.\n\ngit-svn-id: d46fe582d22b46b457d3ac1c55a88da2fbe913a1@1470 baf6b65b-9124-4dc3-b1c0-01155b4af546\n" }, { "from": "gpt", "value": "<?php\n\n include_once(dirname(__FILE__) . \"/../../config/environment.php\");\n $mysqli =& $GLOBALS...
php
chosen
[ { "from": "human", "value": "Add controller to control survey in Backend context\n" }, { "from": "gpt", "value": "<?php\nnamespace backend\\controllers;\n\nuse Yii;\nuse yii\\web\\Controller;\n\n/**\n * Site controller\n */\nclass SurveyController extends Controller\n{\n\tpublic function actionA...
php
chosen
[ { "from": "human", "value": "Add MU plugin that add network users to main site\n" }, { "from": "gpt", "value": "<?php\n/*\nPlugin Name: Add network users to main site\nDescription: MU Plugin that adds users across the network subscribers in the main site. \nAuthor: Jude Rosario\nAuthor URI: http...
php
chosen
[ { "from": "human", "value": "Move email address to message\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Ddeboer\\Imap\\Message;\n\nclass EmailAddress\n{\n protected $mailbox;\n protected $hostname;\n protected $name;\n protected $address;\n\n public function __construct($ma...
php
chosen
[ { "from": "human", "value": "Remove `deleted_at` from all tables [API-309]\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass DropSoftDeletes extends Migratio...
php
chosen
[ { "from": "human", "value": "Add unit test for installed plugin\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Phpcq\\Test\\Runner\\Repository;\n\nuse Phpcq\\RepositoryDefinition\\Plugin\\PluginVersionInterface;\nuse Phpcq\\RepositoryDefinition\\Tool\\ToolVersion...
php
chosen
[ { "from": "human", "value": "Add test to trigger \"Trying to access array offset on value of type int\"\n\nSigned-off-by: Daniel Kesselberg <1d6e1cf70ec6f9ab28d3ea4b27a49a77654d370e@danielkesselberg.de>\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * @copyright 2020...
php
chosen
[ { "from": "human", "value": "Add pet specific single page\n" }, { "from": "gpt", "value": "<?php\n/**\n * The template for displaying all single posts and attachments\n *\n * @package WordPress\n * @subpackage FoundationPress\n * @since FoundationPress 1.0.0\n */\n\nget_header(); ?>\n\n<div clas...
php
chosen
[ { "from": "human", "value": "Add permissions and update roles for Team endpoints\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Spatie\\Permission\\Models\\Ro...
php
chosen
[ { "from": "human", "value": "Add sniff for echo and print.\n" }, { "from": "gpt", "value": "<?php\nclass PHPUnitStandard_Sniffs_Testing_NoOutputStatements implements PHP_CodeSniffer_Sniff\n{\n public function register()\n {\n return array(T_ECHO);\n return array(T_PRINT);\n ...
php
chosen
[ { "from": "human", "value": "Add licence expiration date for company\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddExpirationDateToCompaniesTable extends Migration\n{\n /**\n * Run the m...
php
chosen
[ { "from": "human", "value": "[ServiceProvider] Create the goutte service provider.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: Tarek Rjili\n * Date: 3/23/15\n * Time: 23:20 PM\n */\n\nnamespace Trjili\\Silex;\n\nuse Goutte\\Client;\nuse Psr\\Log\\InvalidArgumen...
php
chosen
[ { "from": "human", "value": "Add PHPUnit test for Stripe_Discount\n" }, { "from": "gpt", "value": "<?php\n\nclass Stripe_DiscountTest extends Stripe_TestCase\n{\n public function testDeletion()\n {\n self::authorizeFromEnv();\n $id = 'test-coupon-' . self::randomString();\n $coupon = ...
php
chosen
[ { "from": "human", "value": "Create form type for step 4\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component\\OptionsRes...
php
chosen
[ { "from": "human", "value": "Add migration for acculumated theft stats fields\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddTheftStatsToDominions exte...
php
chosen
[ { "from": "human", "value": "Add tests for the content extentions theme detail page\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Tests\\Action;\n\nuse Common\\WebTestCase;\n\nclass DetailThemeTest extends WebTestCase\n{\n public function testAuthenticat...
php
chosen
[ { "from": "human", "value": "Add unit tests for UUEncodedPart\n" }, { "from": "gpt", "value": "<?php\nnamespace ZBateson\\MailMimeParser;\n\nuse PHPUnit_Framework_TestCase;\nuse ZBateson\\MailMimeParser\\Header\\HeaderFactory;\nuse ZBateson\\MailMimeParser\\Header\\Consumer\\ConsumerService;\nus...
php
chosen
[ { "from": "human", "value": "Add a script that can be used to check for duplicate entries in config files, since that apparently makes SnakeYaml lose its mind now.\n" }, { "from": "gpt", "value": "#!/usr/bin/php\n<?php\n\n// Don't allow from Apache\nif (PHP_SAPI !== 'cli')\n{\n die('Nope.');\...
php
chosen
[ { "from": "human", "value": "Add Bing reverse geocoding API sample\n" }, { "from": "gpt", "value": "<?php\n/*\n * Telegram Bot Sample\n * ===================\n * UWiClab, University of Urbino\n * ===================\n * API sample, using Microsoft Bing reverse geolocation API.\n */\n\ndefine('BI...
php
chosen
[ { "from": "human", "value": "Add example for master / slave replication.\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Predis package.\n *\n * (c) Daniele Alessandri <suppakilla@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE...
php
chosen
[ { "from": "human", "value": "Print url from PS4 sytemupdate" }, { "from": "gpt", "value": "<?php\n$ch = curl_init();\ncurl_setopt( $ch, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1\" );\ncurl_setopt($ch, CURLOPT_URL, \"http://us.playstatio...
php
chosen
[ { "from": "human", "value": "Install our custom drush command for check if drush has been bootstrapped.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Drush\\Commands;\n\nuse Drush\\Drush;\nuse Consolidation\\SiteAlias\\SiteAliasManagerAwareInterface;\nuse Consolidation\\SiteAlias\\SiteAlia...
php
chosen
[ { "from": "human", "value": "Add script to update flavorasset permissions\nSUP-4739\n" }, { "from": "gpt", "value": "<?php\n/**\n * @package deployment\n * @subpackage jupiter.roles_and_permissions\n */\n\n$script = realpath(dirname(__FILE__) . '/../../../../') . '/alpha/scripts/utils/permission...
php
chosen
[ { "from": "human", "value": "Create new migration to get rid of \"UniEngine_Updater_LastUpdateApplied\" config DB row\n" }, { "from": "gpt", "value": "<?php\n\nuse \\UniEngine\\Utils\\Migrations as Migrations;\n\n/**\n * Changelog:\n * - Removes the last trace of the old \"updater.php\" admin p...
php
chosen
[ { "from": "human", "value": "[DoctrineBridge] Add common data fixtures loader\n\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LIC...
php
chosen
[ { "from": "human", "value": "Add core area layout gray\n" }, { "from": "gpt", "value": "<?php\ndefined('C5_EXECUTE') or die(\"Access Denied.\");\n\n$a = $b->getBlockAreaObject();\n$container = $formatter->getLayoutContainerHtmlObject();\n?>\n\n<div class=\"ws-layout-gray\">\n <div class=\"con...
php
chosen
[ { "from": "human", "value": "Add a main plugin file\n" }, { "from": "gpt", "value": "<?php\n/*\nPlugin Name: Decisions\nDescription: Not Options\nAuthor: John P Bloch\nAuthor URI: https://johnpbloch.com\nLicense: MIT\n*/\n\nif ( ! class_exists( 'Closure' ) ) {\n\t_doing_it_wrong( __FILE__, 'This...
php
chosen
[ { "from": "human", "value": "Add service value resolver tests Prove that the service value resolver will not work with the array notation\n\n" }, { "from": "gpt", "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...
php
chosen
[ { "from": "human", "value": "Upgrade safe setting default quote template" }, { "from": "gpt", "value": "<?php\n // created: 2011-09-21 13:26:01\n$dictionary['AOS_Quotes']['fields']['template_ddown_c']['default']='31d00d62-8892-7587-4153-4d9c843c2843';\n \n ?>\n" } ]
php
chosen
[ { "from": "human", "value": "Add subscription get type class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace MarcusJaschen\\Collmex\\Type;\n\n/**\n * Collmex Subscription Get Type\n *\n * @author Jewel Ahmed <tojibon@gmail.com>\n * @author Marcus Jaschen <mjaschen@gmail.com>\n * @author ...
php
chosen
[ { "from": "human", "value": "Update names in census step verify\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Form\\Type\\Census;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Compon...
php
chosen
[ { "from": "human", "value": "Add doctrine configuration for the consent table\n" }, { "from": "gpt", "value": "<?php\n\nnamespace OpenConext\\EngineBlockBundle\\Authentication\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * Note: this entity is currently only used to configure doctrine...
php
chosen
[ { "from": "human", "value": "Update last lead migration adding missing social media fields\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AlterLeadTableAd...
php
chosen
[ { "from": "human", "value": "Add a script to programmatically add image macros\n\nSummary: Urgent request.\n\nTest Plan: Ran \"add_macro.php\" on some things; verified results in web console.\n\nReviewers: btrahan, tcook\n\nReviewed By: btrahan\n\nCC: aran, epriestley\n\nDifferential Revision: https://secur...
php
chosen
[ { "from": "human", "value": "BAP-11602: Move ExecuteProcessJobCommand's logic to Message processor.\n\n- attempt to fix cycrular service relations.\n" }, { "from": "gpt", "value": "<?php\nnamespace Oro\\Bundle\\WorkflowBundle\\Tests\\Functional\\EventListener;\n\nuse Oro\\Bundle\\TestFrameworkBu...
php
chosen
[ { "from": "human", "value": "[MOD] Convert Tiki Connect data to json encoding (only for mother.tiki.org really, thanks again Xavi)\n\ngit-svn-id: 3582b35ee56d9e99405df4322499343324934860@52315 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "gpt", "value": "<?php\n// (c) Copyright 2002-2013...
php
chosen
[ { "from": "human", "value": "Add simple application run test\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Environaut\\Tests;\n\nuse Environaut\\Application;\n\nuse Symfony\\Component\\Console\\Tester\\ApplicationTester;\n\nclass ApplicationTest extends BaseTestCase\n{\n public function...
php
chosen
[ { "from": "human", "value": "Fix issue with helpText/helptext casing on setting table.\n" }, { "from": "gpt", "value": "<?php\n/*\n * Xibo - Digital Signage - http://www.xibo.org.uk\n * Copyright (C) 2018 Spring Signage Ltd\n *\n * This file is part of Xibo.\n *\n * Xibo is free software: you ca...
php
chosen
[ { "from": "human", "value": "Add Form directory including SocialMediaAggregatorForm class\n" }, { "from": "gpt", "value": "<?php\n/**\n * @file\n * Contains \\Drupal\\example\\Form\\ExampleForm.\n */\n\nnamespace Drupal\\example\\Form;\n\nuse Drupal\\Core\\Form\\FormBase;\nuse Drupal\\Core\\Form...
php
chosen
[ { "from": "human", "value": "Add index on messages(id) to boost performances\n" }, { "from": "gpt", "value": "<?php\n\nuse Movim\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass AddIdIndexToMessages extends Migration\n{\n public function up()\n {\n $this->schema->t...
php
chosen
[ { "from": "human", "value": "Add a dashboard controller test\n" }, { "from": "gpt", "value": "<?php\n\nnamespace OpenCFP\\Test\\Http\\Controller\\Reviewer;\n\nuse OpenCFP\\Test\\TestCase;\n\nclass DashboardControllerTest extends TestCase\n{\n /**\n * @test\n */\n public function in...
php
chosen
[ { "from": "human", "value": "Add a command to register system node types\n\nregisters the node type phpcr:managed without havin to create the file\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Doctrine\\ODM\\PHPCR\\Tools\\Console\\Command;\n\nuse Symfony\\Component\\Console\\Input\\InputAr...
php
chosen
[ { "from": "human", "value": "Add unit test for second factor collection\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Copyright 2018 SURFnet bv\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * Y...
php
chosen
[ { "from": "human", "value": "Add change password form type\n" }, { "from": "gpt", "value": "<?php \n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Form;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component\\OptionsResolv...
php
chosen
[ { "from": "human", "value": "Add index for user_id on beatmapset_events\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddIndexToBeatmapsetEvents extends ...
php
chosen
[ { "from": "human", "value": "BB-5906: Refactor WidgetController::startTransitionFormAction\n- created handler for transition form\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Oro\\Bundle\\WorkflowBundle\\Form\\Handler;\n\nuse Symfony\\Component\\Form\\Form;\nuse Symfony\\Component\\HttpFo...
php
chosen
[ { "from": "human", "value": "Add PHPUnit test for Stripe_Token\n" }, { "from": "gpt", "value": "<?php\n\nclass Stripe_TokenTest extends Stripe_TestCase\n{\n public function testUrls()\n {\n $this->assertSame(Stripe_Token::classUrl('Stripe_Token'), '/v1/tokens');\n $token = new Stripe_Tok...
php
chosen
[ { "from": "human", "value": "Add compiled route strategy inspired by fast route\n" }, { "from": "gpt", "value": "<?php\nnamespace Onion\\Framework\\Router\\Strategy;\n\nclass CompiledRegexStrategy\n{\n private $routes = [];\n\n public function __construct(array $routes, int $groupCount = 1...
php
chosen
[ { "from": "human", "value": "Add forget first function test suite.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Mimic\\Test;\n\nuse PHPUnit_Framework_TestCase;\nuse Mimic\\Functional as F;\n\nuse ArrayIterator;\n\n/**\n * Unit Test for forgetFirst Mimic library function.\n *\n * @since 0....
php
chosen
[ { "from": "human", "value": "Add Remote entity. Not in use yet\n" }, { "from": "gpt", "value": "<?php\n// src/VersionContol/GitControlBundle/Entity/GitDiff.php\n\nnamespace VersionContol\\GitControlBundle\\Entity;\n\n\n/**\n * Git Remote object\n *\n * @author fr_user\n */\nclass GitRemote {\n ...
php
chosen
[ { "from": "human", "value": "Add test for abstract english class\n" }, { "from": "gpt", "value": "<?php\n/**\n * \n * @author newloki\n */\n\nnamespace Tests\\Language\\Languages\\Indo\\German;\nuse Language\\Languages\\Indo\\English\\EnglishAbstract,\n Language\\Languages\\Indo\\IndoAbstract...
php
chosen
[ { "from": "human", "value": "Add the municipality extractor test\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of Bens Penhorados, an undergraduate capstone project.\n *\n * (c) FΓ‘bio Santos <ffsantos92@gmail.com>\n *\n * For the full copyright and license information, pleas...
php
chosen
[ { "from": "human", "value": "Create Minecraft auth code migration\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateMinecraftAuthCodes extends Migratio...
php
chosen
[ { "from": "human", "value": "Check that BitBucket credentials are valid\n" }, { "from": "gpt", "value": "<?php\n/**\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n *\n * @author Stephane HULARD <s.hulard@chstudio....
php
chosen
[ { "from": "human", "value": "Add tests for Dutch translation\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Localization;\n\n/*\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full copyright and license information, please vie...
php
chosen
[ { "from": "human", "value": "Fix extra header on user profile page.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Generates minimal site-wide page chrome.\n * @see https://drupal.org/node/1728148\n **/\n\n?>\n\n<?php if (!empty($tabs['#primary'])): ?><nav class=\"admin--tabs\"><?php print re...
php
chosen
[ { "from": "human", "value": "Test the add repository handler\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Regis\\Application\\CommandHandler\\Team;\n\nuse Regis\\Application\\Command;\nuse Regis\\Application\\CommandHandler;\nuse Regis\\Domain\\Entity;\nuse Regis\\Domain\\Repositor...
php
chosen
[ { "from": "human", "value": "Add Manager BusinessServiceController Test suite\n" }, { "from": "gpt", "value": "<?php\n\n\nclass ManagerBusinessServiceControllerTest extends TestCase\n{\n use CreateBusiness, CreateUser, CreateService;\n\n /**\n * @covers App\\Http\\Controllers\\Manage...
php
chosen
[ { "from": "human", "value": "Add artist tagging page (missed from last commit)\n" }, { "from": "gpt", "value": "<?php\n\n/* GNU FM -- a free network service for sharing your music listening habits\n\n Copyright (C) 2009 Free Software Foundation, Inc\n\n This program is free software: you can...
php
chosen
[ { "from": "human", "value": "Add a sample application for the Google Analytics V3 API.\n\n\ngit-svn-id: 6c6eb0d3cc6e8d5f6d3a0c71e6b3abc7e9845ff1@289 6c5fc399-1a2c-022f-82ce-feb0d0b4916c\n" }, { "from": "gpt", "value": "<?php\nrequire_once '../../src/apiClient.php';\nrequire_once '../../src/contr...
php
chosen
[ { "from": "human", "value": "Check that variable is an array\n" }, { "from": "gpt", "value": "\n<?php\n$yes = array('this', 'is', 'an array');\n\necho is_array($yes) ? 'Array' : 'not an Array';\necho \"\\n\";\n\n$no = 'this is a string';\n\necho is_array($no) ? 'Array' : 'not an Array';\n?>\n" ...
php
chosen
[ { "from": "human", "value": "Add tests for checking the service repository.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AppBundle\\Tests\\Connections;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase;\n\n/**\n * @file\n * Project: orcid\n * File: RepositoryTest.php\n */\ncla...
php
chosen
[ { "from": "human", "value": "III-483: Add test for TranslationDeleted (de)serialization\n" }, { "from": "gpt", "value": "<?php\n/**\n * @file\n */\n\nnamespace CultuurNet\\UDB3\\Event\\Events;\n\nuse CultuurNet\\UDB3\\Language;\nuse ValueObjects\\String\\String;\n\nclass TranslationDeletedTest e...
php
chosen
[ { "from": "human", "value": "Add default site name setting.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass AddSiteNameToSettings extends Migration {\n\n /**\n * Run the migrations.\n *\n * @...
php
chosen
[ { "from": "human", "value": "Delete unused columns from activities table\n" }, { "from": "gpt", "value": "<?php namespace System\\Database\\Migrations;\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Schema;\n\n/**\n * customer_id can be NUL...
php
chosen
[ { "from": "human", "value": "Add open in browser util function\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Omnipay\\UnionPay\\Tests;\n\nuse Omnipay\\Tests\\GatewayTestCase as Base;\nuse Omnipay\\UnionPay\\WtzGateway;\n\nclass GatewayTestCase extends Base\n{\n\n /**\n * @var WtzGat...
php
chosen
[ { "from": "human", "value": "Add form for town step 6 type\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component\\OptionsR...
php
chosen
[ { "from": "human", "value": "Add dynamic relation from user to player\n" }, { "from": "gpt", "value": "<?php\nnamespace VideoGamesRecords\\CoreBundle\\EventListener\\Entity;\n\nuse Doctrine\\ORM\\Events;\nuse VideoGamesRecords\\CoreBundle\\Entity\\Player;\nuse Doctrine\\Common\\EventSubscriber;\...
php
chosen
[ { "from": "human", "value": "Add abstract vehicle extractor test\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of Bens Penhorados, an undergraduate capstone project.\n *\n * (c) FΓ‘bio Santos <ffsantos92@gmail.com>\n *\n * For the full copyright and license information, pleas...
php
chosen
[ { "from": "human", "value": "Create trait to inflect resources\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Cerbero\\ApiClient\\Inflectors;\n\nuse BadMethodCallException;\n\n/**\n * Trait to inflect resources.\n *\n * @author Andrea Marco Sartori\n */\ntrait InflectsResources\n{\n /...
php
chosen
[ { "from": "human", "value": "Add foreign key to major_changes table appearance_id column\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AddForeignKeyToMajorChangesAppearanceId extends AbstractMigration {\n public function change() {\n $this->table...
php
chosen
[ { "from": "human", "value": "Add validation class to validate string\n" }, { "from": "gpt", "value": "<?php\n namespace Library;\n\n class Validation\n {\n private $rule = array();\n\n public function __construct()\n {\n $this->addRule('username', '^[A-Za...
php
chosen
[ { "from": "human", "value": "Set some initial stuff up.\n" }, { "from": "gpt", "value": "<?php\nheader('Content-Type: application/json');\n$dob = \"8/17/1983\";\n$json = '{\n \"person\": {\n \"age\": {\n \"years\": 30,\n \"months\": 8,\n \"weeks\": 2,\n...
php
chosen
[ { "from": "human", "value": "Implement ajax controller for get municipalities\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\HttpFoundation\\Request;...
php
chosen
[ { "from": "human", "value": "Add a test for property if()\n" }, { "from": "gpt", "value": "<?php\n/**\n *\n */\nclass CloneFoo {\n /**\n * @property \\DateTime|null\n */\n private $date;\n /**\n *\n */\n public function foo() {\n if($this->date) {\n ...
php
chosen
[ { "from": "human", "value": "BB-15455: Add unit test for Oro\\Bundle\\FeatureToggleBundle\\Checker\\Voter\\DependencyVoter\n\n- added success, fail and abstain tests for DependencyVoter\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Oro\\Bundle\\FeatureToggleBundle\\Tests\\Unit\\Checker\\Vo...
php
chosen
[ { "from": "human", "value": "Add missing spec for ContainsProductRuleChecker\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) PaweΕ‚ JΔ™drzejewski\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was ...
php
chosen
[ { "from": "human", "value": "Add test for File component\n" }, { "from": "gpt", "value": "<?php\n\nnamespace PhpTabsTest\\Component;\n\nuse PHPUnit_Framework_TestCase;\nuse PhpTabs\\Component\\File;\n\nclass FileTest extends PHPUnit_Framework_TestCase\n{\n public function setUp()\n {\n $thi...
php
chosen
[ { "from": "human", "value": "Add tests for persisting manually hydrated documents\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Doctrine\\ODM\\MongoDB\\Tests\\Functional\\Ticket;\n\nuse Doctrine\\ODM\\MongoDB\\Mapping\\Annotations as ODM;\nuse Doctrine\\ODM\\MongoDB\\Query\\Query;\n\nclass...
php
chosen
[ { "from": "human", "value": "Add tests with 100% coverage for Algorithm\\Symmetric" }, { "from": "gpt", "value": "<?php\n\nuse Fhaculty\\Graph\\Algorithm\\Symmetric as AlgorithmSymmetric;\nuse Fhaculty\\Graph\\Graph;\n\nclass SymmetricTest extends TestCase\n{\n public function testGraphEmpty(...
php
chosen
[ { "from": "human", "value": "[Security] Add test case for user not found\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LICENSE\n ...
php
chosen