conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add a collection helper class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace ForkCMS\\Core\\Domain\\Doctrine;\n\nuse Doctrine\\Common\\Collections\\ArrayCollection;\nuse Doctrine\\Common\\Collections\\Collection;\n\nfinal class CollectionHelper\n{\n public st...
php
chosen
[ { "from": "human", "value": "Add `is_dir` and `is_file` acceptance tests\n" }, { "from": "gpt", "value": "<?php\nnamespace Vfs\\Stream\\StreamWrapper;\n\nuse Vfs\\Test\\AcceptanceTestCase;\n\nclass StatAcceptanceTest extends AcceptanceTestCase\n{\n protected $tree = [\n 'foo' => [\n ...
php
chosen
[ { "from": "human", "value": "Add unit tests for serializable strategy\n\nAdd unit tests for serializable strategy\n" }, { "from": "gpt", "value": "<?php\n/**\n * Zend Framework (http://framework.zend.com/)\n *\n * @link http://github.com/zendframework/zf2 for the canonical source repository...
php
chosen
[ { "from": "human", "value": "Add controller for demo user login\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AppBundle\\Controller;\n\n\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Route;\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\...
php
chosen
[ { "from": "human", "value": "Add rest api for enrollment\n" }, { "from": "gpt", "value": "<?php\n\n/**\n Copyright (C) 2010-2016 by the FusionInventory Development Team\n Copyright (C) 2016 Teclib'\n\n This file is part of Armadito Plugin for GLPI.\n\n Armadito Plugin for GLPI is free so...
php
chosen
[ { "from": "human", "value": "Add id column to news junction table\n" }, { "from": "gpt", "value": "<?php\n\nuse yii\\db\\Migration;\n\nclass m160721_204739_alter_junction_table extends Migration\n{\n public function up()\n {\n $this->dropPrimaryKey(\"news_news_tags\", \"news_news_ta...
php
chosen
[ { "from": "human", "value": "BAP-10818: Add Functional test webtest cases\n- Covered `Oro\\Bundle\\WorkflowBundle\\Controller\\Api\\Rest\\EntityController`\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Oro\\Bundle\\WorkflowBundle\\Tests\\Functional\\Controller\\Api\\Rest;\n\nuse Oro\\Bundl...
php
chosen
[ { "from": "human", "value": "GWY-2901: Add example of how to copy the sandbox plans to live account.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Rebilly\\examples;\n\nuse Exception;\nuse HttpException;\nuse Rebilly\\v2_1\\Plan;\nuse RebillyHttpStatusCode;\nuse RebillyRequest;\n\n/**\n * ...
php
chosen
[ { "from": "human", "value": "Add an example of BLPOP.\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Predis\\Async package.\n *\n * (c) Daniele Alessandri <suppakilla@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file th...
php
chosen
[ { "from": "human", "value": "Add tests for the publisher\n" }, { "from": "gpt", "value": "<?php declare(strict_types=1);\nnamespace Wisembly\\AmqpBundle;\n\nuse PHPUnit\\Framework\\TestCase;\n\nuse Prophecy\\Argument;\n\nuse Swarrot\\Broker\\Message;\nuse Swarrot\\Broker\\MessagePublisher\\Messa...
php
chosen
[ { "from": "human", "value": "Add the initial supporter wall widget.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Class Google\\Site_Kit\\Modules\\Thank_With_Google\\Supporter_Wall_Widget\n *\n * @package Google\\Site_Kit\\Modules\\Thank_With_Google\n * @copyright 2022 Google LLC\n * @licens...
php
chosen
[ { "from": "human", "value": "Add employment calculator test stub\n" }, { "from": "gpt", "value": "<?php\n\nnamespace OpenDominion\\Tests\\Unit\\Calculators\\Dominion;\n\nuse OpenDominion\\Tests\\BaseTestCase;\n\nclass EmploymentCalculatorTest extends BaseTestCase\n{\n public function testGetE...
php
chosen
[ { "from": "system", "value": "Comment updated for base decorator.\n" }, { "from": "human", "value": "<?php\n\nnamespace McCool\\LaravelAutoPresenter\\Decorators;\n\nabstract class BaseDecorator\n{\n\t/**\n\t * Some decorators depend on others to complete their task. This is a helper method\n\t *...
php
chosen
[ { "from": "human", "value": "Handle stream using ticks example\n" }, { "from": "gpt", "value": "<?php\n\nrequire dirname(__DIR__) . '/vendor/autoload.php';\n\nuse GuzzleHttp\\Client;\nuse GuzzleHttp\\HandlerStack;\nuse GuzzleHttp\\Psr7\\Response;\nuse React\\EventLoop\\Factory;\nuse WyriHaximus\...
php
chosen
[ { "from": "system", "value": "Disable spam filters for now\n" }, { "from": "human", "value": "<?php namespace Lio\\ServiceProviders;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse Lio\\Content\\ForeignLanguageSpamDetector;\nuse Lio\\Content\\PhoneNumberSpamDetector;\nuse Lio\\Content\\SpamFil...
php
chosen
[ { "from": "human", "value": "Add simple primary key for barcode (easier for ORM)\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\nuse Phinx\\Db\\Adapter\\MysqlAdapter;\n\nclass AddBarcodeId extends AbstractMigration\n{\n public function up()\n {\n $q...
php
chosen
[ { "from": "human", "value": "Add database migration for user settings\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddUserSettingsTable extends Migration\n{\n /**\n * Run the migrations.\n...
php
chosen
[ { "from": "human", "value": "Create payment post auth request test added\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Iyzipay\\Tests\\Request;\n\nuse Iyzipay\\Model\\Locale;\nuse Iyzipay\\Request\\CreatePaymentPostAuthRequest;\nuse Iyzipay\\Tests\\TestCase;\n\nclass CreatePaymentPostAuthR...
php
chosen
[ { "from": "human", "value": "Add missing migration for daythemes\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateDaythemesTable extends Migration {\n\n\t/**\n\t * Run the migrations.\n\t *\n\t...
php
chosen
[ { "from": "human", "value": "Add unit test for event model\n" }, { "from": "gpt", "value": "<?php\nuse \\Memvents\\Event;\n\nclass EventModelTest extends \\Codeception\\TestCase\\Test\n{\n /**\n * @var \\UnitTester\n */\n protected $tester;\n\n function testSavingEvent()\n {\...
php
chosen
[ { "from": "human", "value": "Solve Salary with Bonus in php\n" }, { "from": "gpt", "value": "<?php\n$a = trim(fgets(STDIN));\n$b = trim(fgets(STDIN));\n$c = trim(fgets(STDIN));\n\necho \"TOTAL = R$ \" . number_format($b + ($c * 0.15) * 100 / 100, 2, '.', '') . \"\\n\";\n?>\n" } ]
php
chosen
[ { "from": "human", "value": "Test the gradient descent regularizer.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace mcordingley\\Regression\\Tests\\Algorithm\\GradientDescent\\Gradient;\n\nuse mcordingley\\Regression\\Algorithm\\GradientDescent\\Gradient\\Linear;\nuse mcordingley\\Regression...
php
chosen
[ { "from": "human", "value": "PILOT-4895: Add functionality to get users from intergy api\n" }, { "from": "gpt", "value": "<?php namespace Intergy\\Storage;\n\nuse GuzzleHttp\\Exception\\RequestException;\nuse Log;\nuse \\Exception;\nuse Cache;\nuse Intergy\\Exceptions\\MissingParameterException;...
php
chosen
[ { "from": "human", "value": "Add Flipside Survival Guide CAPTCHA test\n" }, { "from": "gpt", "value": "<?php\nclass FlipsideCAPTCHA \n{\n private $random_id;\n /*TODO - Replace with DB or something */\n private $questions = array('How much water should you bring to Burning Flipside?',\n...
php
chosen
[ { "from": "human", "value": "Add sha256 for user account validation\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddUserValidationHash extends Migration\n{\n /**\n * Run the migrations.\n ...
php
chosen
[ { "from": "human", "value": "Add test for UserEvent class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace DCS\\User\\CoreBundle\\Tests\\Event;\n\nuse DCS\\User\\CoreBundle\\Event\\UserEvent;\nuse DCS\\User\\CoreBundle\\Model\\UserInterface;\n\nclass UserEventTest extends \\PHPUnit_Framework_...
php
chosen
[ { "from": "human", "value": "Add each rule test for repeated nested array support\n" }, { "from": "gpt", "value": "<?php\nnamespace Particle\\Tests\\Filter\\FilterRule;\n\nuse Particle\\Filter\\Filter;\n\nclass EachTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @var Filter\n *...
php
chosen
[ { "from": "human", "value": "Add a test for CASHRequest\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once('tests/php/base.php');\n\nclass CASHRequestTests extends UnitTestCase {\n\n function testCASHRequest(){\n\t\t$cr = new CASHRequest(array(\n\t\t\t'cash_request_type' => 'asset',\n\t\t...
php
chosen
[ { "from": "human", "value": "Add wide template for Page Attribute Display block\n" }, { "from": "gpt", "value": "<?php\ndefined('C5_EXECUTE') or die('Access Denied.');\n?>\n\n<div class=\"row\">\n\n <div class=\"col-xl-10 offset-xl-1\">\n\n <?php require dirname(__FILE__) . '/worldskil...
php
chosen
[ { "from": "human", "value": "Add test for invalid values\n" }, { "from": "gpt", "value": "<?php\n\nnamespace webignition\\IsHttpStatusCode;\n\nclass CheckInvalidValuesTest extends \\PHPUnit_Framework_TestCase {\n \n public function testCheck() {\n $this->assertFalse(\\webignition\\I...
php
chosen
[ { "from": "human", "value": "Create strategy for hydrating datetime stamps\n" }, { "from": "gpt", "value": "<?php\n/**\n * Copyright (c) 2013 Jurian Sluiman.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provid...
php
chosen
[ { "from": "human", "value": "Add missing migration for new version of redmine login\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Application\\Migrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generated Migration: Please ...
php
chosen
[ { "from": "human", "value": "[TASK] Add default type converter to get product data from a Node\n" }, { "from": "gpt", "value": "<?php\nnamespace Ttree\\Moltin\\TypeConverter;\n\nuse TYPO3\\Flow\\Annotations as Flow;\nuse TYPO3\\Flow\\Property\\PropertyMappingConfigurationInterface;\nuse TYPO3\\F...
php
chosen
[ { "from": "human", "value": "Add create-payments-* permissions for different payment methods\n" }, { "from": "gpt", "value": "<?php\n\nuse Spatie\\Permission\\Models\\Role;\nuse Spatie\\Permission\\Models\\Permission;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddPaymentMethodPer...
php
chosen
[ { "from": "human", "value": "Add cache features with APC\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Apricot\\Component;\n\ntrait Cache\n{\n public static function cache($key, $value = null, $expire = 3600)\n {\n // add data into cache\n if (null !== $value) {\n ...
php
chosen
[ { "from": "human", "value": "Test Space model's monthlyBalance method\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Unit;\n\nuse Tests\\TestCase;\nuse Illuminate\\Foundation\\Testing\\WithFaker;\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\n\nuse App\\Models\\Earning;\nuse...
php
chosen
[ { "from": "human", "value": "Refactor entity_iso_names into entities table and make it more rigorous\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse App\\Chart;\n\nclass MoreEntityUniqueness extends Mig...
php
chosen
[ { "from": "human", "value": "Add tests for simple spec factory\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Cs278\\BankModulus\\Spec;\n\n/**\n * @covers Cs278\\BankModulus\\Spec\\SimpleSpecFactory\n */\nfinal class SimpleSpecFactoryTest extends \\PHPUnit_Framework_TestCase\n{\n public ...
php
chosen
[ { "from": "human", "value": "Set Job type_id to 1 for all jobs\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Application\\Migrations;\n\nuse SimplyTestable\\BaseMigrationsBundle\\Migration\\BaseMigration,\n Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generated Migration: Please modi...
php
chosen
[ { "from": "human", "value": "Disable login autofocus during e2e.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Plugin Name: Disable Login Autofocus\n *\n * @package Google\\Site_Kit\n * @copyright 2020 Google LLC\n * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0\n...
php
chosen
[ { "from": "system", "value": "Check whether functions and class before loading file" }, { "from": "human", "value": "<?php\n\nrequire_once('Classloader.php');\nrequire_once('xmlrpc.inc');\n\n$classLoader = new Infusionsoft_Classloader();\nspl_autoload_register(array(&$classLoader, \"loadClass\")...
php
chosen
[ { "from": "human", "value": "Add full name 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, please view ...
php
chosen
[ { "from": "human", "value": "Add broken taxonomy type test file\n" }, { "from": "gpt", "value": "<?php\n\nclass Broken_Taxonomy_Type extends Papi_Taxonomy_Type {\n\n\t/**\n\t * Define our Taxonomy Type meta data.\n\t *\n\t * @return array\n\t */\n\tpublic function meta2() {\n\t\treturn [\n\t\t\t...
php
chosen
[ { "from": "human", "value": "Add some basic testing for Error_Context\n\nSigned-off-by: emanuele <ac2faa8b943b3fcadaf05ed2541f4eebde440ed7@gmail.com>\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once(TESTDIR . 'simpletest/autorun.php');\nrequire_once(TESTDIR . '../SSI.php');\nrequire_once(S...
php
chosen
[ { "from": "human", "value": "Create a new partial to display the list item HTML for each comment so that it can be reused by the ajax request that fetches new comments.\n" }, { "from": "gpt", "value": "@foreach ($comments as $comment)\n <li>\n <div class=\"chat-body\">\n <di...
php
chosen
[ { "from": "human", "value": "Include file to pass uploaded file from php to the python file that\nchanges the format to csv\n" }, { "from": "gpt", "value": "<?php\n date_default_timezone_set('America/Chicago');\n\n\n $file = $_FILES['uploadedfile']['tmp_name'];\n $names = $_FILES['uploa...
php
chosen
[ { "from": "human", "value": "Add dummy entity autocomplete form type.\n" }, { "from": "gpt", "value": "<?php declare(strict_types=1);\n/**\n * @author Igor Nikolaev <igor.sv.n@gmail.com>\n * @copyright Copyright (c) 2019, Darvin Studio\n * @link https://www.darvin-studio.ru\n *\n * For t...
php
chosen
[ { "from": "human", "value": "Add scaffolding for doctrine custom type\n\n[ci skip]\n" }, { "from": "gpt", "value": "<?php\n/**\n * doctrine custom type to handle reading and writing $refs attributes\n */\n\nnamespace Graviton\\DocumentBundle\\Types;\n\nuse Doctrine\\ODM\\MongoDB\\Mapping\\Types\...
php
chosen
[ { "from": "human", "value": "Add some tests on PhpAmqpLibMessagePublisher\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Swarrot\\Broker\\MessagePublisher;\n\nuse Prophecy\\Prophet;\nuse Prophecy\\Argument;\n\nuse PhpAmqpLib\\Message\\AMQPMessage;\n\nuse Swarrot\\Broker\\MessagePublisher\\P...
php
chosen
[ { "from": "human", "value": "Test index of Dashboard controller.\n" }, { "from": "gpt", "value": "<?php\nnamespace App\\Test\\TestCase\\Controller;\n\nuse App\\Controller\\DashboardController;\nuse Cake\\TestSuite\\IntegrationTestCase;\n\n/**\n * App\\Controller\\OperationsController Test Case\n...
php
chosen
[ { "from": "human", "value": "Add candidate step 7 type form\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\\Options...
php
chosen
[ { "from": "human", "value": "system: Add sample l10n config file\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * (Sample) Localization Configuration File\n * This config file contains localization config values needed\n * by the l10n libraries, including:\n * <ul>\n * <li>Localization Domain</...
php
chosen
[ { "from": "human", "value": "Add test for details organisms webservice\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\AppBundle\\API\\Details;\n\nuse AppBundle\\AppBundle;\nuse AppBundle\\DB;\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\nuse Symfony\\Component\\HttpFound...
php
chosen
[ { "from": "system", "value": "Move test to use namespaced PHPUnit TestCase\n" }, { "from": "human", "value": "<?php\n\nnamespace Test\\Phinx\\Console\\Command;\n\nuse Phinx\\Console\\PhinxApplication;\nuse Symfony\\Component\\Console\\Tester\\ApplicationTester;\n\nclass ListTest extends \\PHPUni...
php
chosen
[ { "from": "human", "value": "Add a class for CSS asset injection" }, { "from": "gpt", "value": "<?php\nnamespace Bolt\\Assets\\File;\n\n/**\n * Cascading stylesheet file object class.\n *\n * @author Gawain Lynch <gawain.lynch@gmaill.com>\n */\nclass Stylesheet extends AssetBase\n{\n /**\n ...
php
chosen
[ { "from": "human", "value": "Add admin list image field\n" }, { "from": "gpt", "value": "@if ($item->$field_name != null && $item->$field_name != '')\n\t<img src=\"{!! Croppa::url_resize('uploads/' . $route_prefix . '/' . $item->$field_name, 180) !!}\" />\n@endif\n" } ]
php
chosen
[ { "from": "human", "value": "Add migration to create AccountPlanConstraint\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Application\\Migrations;\n\nuse SimplyTestable\\BaseMigrationsBundle\\Migration\\BaseMigration,\n Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generated Migration:...
php
chosen
[ { "from": "human", "value": "Add the rental controller - backend\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse App\\Rental;\nuse Illuminate\\Http\\Request;\n\nuse App\\Http\\Requests;\n\nclass RentalController extends Controller\n{\n\n /**\n * Get all ...
php
chosen
[ { "from": "human", "value": "Add web hook endpoint for auto-checkout" }, { "from": "gpt", "value": "<?php\nheader('Content-Type: text/plain');\nexec('git fetch --all ; git checkout --force origin/master 2>&1', $output, $status);\nif ($status != 0) http_response_code(500);\necho implode(\"\\n\", ...
php
chosen
[ { "from": "human", "value": "Add db table to support db based sessions\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateSessionsTable extends Migration\n{\n /**\n * Run the migrations.\n...
php
chosen
[ { "from": "human", "value": "Fix default value of invoice paid column\n" }, { "from": "gpt", "value": "<?php\n/**\n * Database migration class\n *\n * @author David Vandemaele <david@tigron.be>\n */\n\nuse \\Skeleton\\Database\\Database;\n\nclass Migration_20200925_133303_Paid_default_value exte...
php
chosen
[ { "from": "human", "value": "Add command to report artworks w/o preferred images\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Console\\Commands\\Report;\n\nuse App\\Models\\Collections\\Artwork;\n\nuse League\\Csv\\Writer;\nuse Illuminate\\Support\\Facades\\Storage;\n\nuse Aic\\Hub\\...
php
chosen
[ { "from": "human", "value": "Add the property extractor wrapper\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, please...
php
chosen
[ { "from": "human", "value": "Add missing Search it test dir\n" }, { "from": "gpt", "value": "<?php\n\n/*\nCopyright (C) 2016 Teclib'\n\nThis file is part of Armadito Plugin for GLPI.\n\nArmadito Plugin for GLPI is free software: you can redistribute it and/or modify\nit under the terms of the GN...
php
chosen
[ { "from": "human", "value": "Add a column to the items table to store cropped image\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddCroppedImageColumnToItems extends Migration\n{\n /**\n *...
php
chosen
[ { "from": "human", "value": "Add test for sync handler\n" }, { "from": "gpt", "value": "<?php\n\nnamespace ThisData\\Api\\RequestHandler;\n\nuse GuzzleHttp\\Client;\nuse GuzzleHttp\\Psr7\\Request;\n\nclass SynchronousRequestHandlerTest extends \\PHPUnit_Framework_TestCase\n{\n public function...
php
chosen
[ { "from": "human", "value": "Add tracks_source to gliding.tracks\nChange point_time from TIMESTAMP to DATETIME.\nDROP DEFAULT from point_time.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Databa...
php
chosen
[ { "from": "human", "value": "Append invoice delivery method trait\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Collector\\Data;\n\ntrait InvoiceDeliveryMethodTrait\n{\n static public $InvoiceDeliveryMethodNormalMail = 1;\n static public $InvoiceDeliveryMethodEmail = 2;\n\n /**\n ...
php
chosen
[ { "from": "human", "value": "Add a simple spec for the child process.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * This file is part of the FreeDSx LDAP package.\n *\n * (c) Chad Sikorra <Chad.Sikorra@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE...
php
chosen
[ { "from": "human", "value": "Add example for GET /users/ID/reports\n" }, { "from": "gpt", "value": "<?php\n\nrequire dirname(__FILE__).'/_global.php';\n\necho \"Please enter the ID of the user whose reports you wish to retrieve: \";\n$id = trim(fgets(STDIN));\n\nprint_r($api->getReportsForUser($...
php
chosen
[ { "from": "human", "value": "Add unit test for Ajax class\n" }, { "from": "gpt", "value": "<?php\n/**\n * @author Pierre-Henry Soria <hello@ph7cms.com>\n * @copyright (c) 2017, Pierre-Henry Soria. All Rights Reserved.\n * @license GNU General Public License; See PH7.LIC...
php
chosen
[ { "from": "system", "value": "BAP-10985: Update the rules displaying autocomplete result for business unit owner field\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\OrganizationBundle\\Form\\Transformer;\n\nuse Doctrine\\Common\\Collections\\Collection;\nuse Oro\\Bundle\\Org...
php
chosen
[ { "from": "human", "value": "Update form type for step 2\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\\Component\\Op...
php
chosen
[ { "from": "human", "value": "Add ssl comodo enrol example.\n" }, { "from": "gpt", "value": "<?php\n\nrequire __DIR__.'/autoload.php';\n\nuse LaravelLb\\LogicBoxesComodo;\n\n// Setup user id and api key\n$userId = getenv('LB_AUTH_USERID');\n$apiKey = getenv('LB_API_KEY');\n\n$orderId = \"71784811...
php
chosen
[ { "from": "human", "value": "Create a queued job to cache all translations\n" }, { "from": "gpt", "value": "<?php namespace Modules\\Translation\\Jobs;\n\nuse App\\Jobs\\Job;\nuse Illuminate\\Contracts\\Bus\\SelfHandling;\nuse Illuminate\\Contracts\\Queue\\ShouldQueue;\nuse Illuminate\\Queue\\In...
php
chosen
[ { "from": "human", "value": "Add tests on Parser + Rules\n\nSigned-off-by: Stéphane HULARD <a24f38cb8c57ec2778c80a9f0c151933508927e5@chstudio.fr>\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of the beebot package.\n * For the full copyright and license information, please v...
php
chosen
[ { "from": "human", "value": "Add reject function test suite.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Mimic\\Test;\n\nuse PHPUnit_Framework_TestCase;\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for reject Mimic library function.\n *\n * @since 0.1.0\n */\nclass RejectFuncTest ex...
php
chosen
[ { "from": "human", "value": "Add template collection parser utility\n\nNeeded by multiple Tasks, which is why this deserves its own trait\n" }, { "from": "gpt", "value": "<?php namespace Aedart\\Scaffold\\Collections\\Utility;\n\nuse Aedart\\Scaffold\\Containers\\IoC;\nuse Aedart\\Scaffold\\Cont...
php
chosen
[ { "from": "human", "value": "Add some tests for the Catcher class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace duncan3dc\\ExceptionsTests;\n\nuse duncan3dc\\Exceptions\\Catcher;\n\nclass CatcherTest extends \\PHPUnit_Framework_TestCase\n{\n private $catcher;\n\n public function setU...
php
chosen
[ { "from": "human", "value": "Add index for rooms' ends_at column\n" }, { "from": "gpt", "value": "<?php\n\n// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.\n// See the LICENCE file in the repository root for full licence text.\n\nuse Illum...
php
chosen
[ { "from": "human", "value": "Make `sponsor_id` nullable on events [WEB-1173]\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass MakeSponsorIdNullableOnEvents ...
php
chosen
[ { "from": "human", "value": "Add unit tests for SamlConstants is...Valid methods\n" }, { "from": "gpt", "value": "<?php\n\nnamespace LightSaml\\Tests\\Tests;\n\nuse LightSaml\\SamlConstants;\n\nclass SamlConstantsTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @dataProvider methods...
php
chosen
[ { "from": "human", "value": "Add a validation class for the form-handler.\n" }, { "from": "gpt", "value": "<?php\n\n/*============================================================================*\\\n\t ________ ______ __ __\n\t / ____/ /__ _ ____...
php
chosen
[ { "from": "human", "value": "Test for proxy isInitialized flag\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the ONGR package.\n *\n * (c) NFQ Technologies UAB <info@nfq.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was...
php
chosen
[ { "from": "human", "value": "Add new file for composing functions. Might add curry functions to this as well.\n" }, { "from": "gpt", "value": "<?php\n/**\n * @package Mimic\\Functional\n * @since 0.1.0\n * @license MIT\n *\n * @typedef MapCollectionCallback \\Closure {\n * @param mixed $elem...
php
chosen
[ { "from": "human", "value": "Add tests for the current nameresolver implementation\n" }, { "from": "gpt", "value": "<?php\nnamespace Test\\Hal\\Component\\OOP\\Resolver;\n\nuse Hal\\Component\\OOP\\Resolver\\NameResolver;\nuse PHPUnit_Framework_TestCase as TestCase;\n\nclass NameResolverTest ext...
php
chosen
[ { "from": "human", "value": "Add a blank class to get started\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * BioPHP\n *\n * @category BioInformatics\n * @package BioPHP\n * @author Kenny Pavan <kenpavan@gmail.com>\n * @license MIT\n */\n\nclass BioPHP {\n\n\n\tpublic function Dna...
php
chosen
[ { "from": "human", "value": "Add address and comment columns to orders table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddAddressAndCommentColumnsToOrdersTable extends Migration\n{\n /**\n ...
php
chosen
[ { "from": "human", "value": "Allow the bot to delete messages\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types = 1);\n\nnamespace unreal4u\\TelegramAPI\\Telegram\\Methods;\n\nuse Psr\\Log\\LoggerInterface;\nuse unreal4u\\TelegramAPI\\Abstracts\\TelegramMethods;\nuse unreal4u\\Teleg...
php
chosen
[ { "from": "human", "value": "Add test for XmlToObject output strategy\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * FurryBear\n * \n * PHP Version 5.3\n * \n * @category Congress_API\n * @package FurryBear\n * @author lobostome <lobostome@local.dev>\n * @license http://opensource.org/lic...
php
chosen
[ { "from": "human", "value": "Add query builder test class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Ehann\\Tests\\RediSearch;\n\nuse Ehann\\RediSearch\\Query\\Builder;\nuse Ehann\\RediSearch\\Redis\\RedisClient;\nuse Ehann\\Tests\\Stubs\\TestIndex;\nuse PHPUnit\\Framework\\TestCase;\n\...
php
chosen
[ { "from": "human", "value": "Add abstract class for display\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * ディスプレイのテンプレート\n *\n * 拡張されたサブクラスに指定されたメソッドの実装を強制する\n *\n * @access public\n * @author ku2ma2 <motorohi.tsumaniku@gmail.com>\n * @copyright ku2ma2\n */\nabstract class AbstractDisplay\n{\...
php
chosen
[ { "from": "human", "value": "Adjust the unique key on the show table to account for generations\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AdjustShowUniqueKey extends AbstractMigration {\n public function up() {\n $this->table('show')\n -...
php
chosen
[ { "from": "human", "value": "Add japanese language for feed types\n" }, { "from": "gpt", "value": "<?php\n\nreturn [\n\n 'regular' => '定時',\n 'extra' => '随時',\n 'eqvol' => '地震火山',\n 'other' => 'その他',\n\n];\n" } ]
php
chosen
[ { "from": "human", "value": "Add trait for DI container\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * @author Petr Pliska <petr.pliska@post.cz>\n */\n\nnamespace App\\Shared\\Behaviour\\Common;\n\nuse DI\\Container;\n\ntrait DiContainerTrait\n{\n /**\n * @var Container\n */\n p...
php
chosen
[ { "from": "human", "value": "Add an interface that declares awareness of the application instance\n\n\nFormer-commit-id: 690e1dbf2c2dd460e81e5cef151c5458242c60a1\nFormer-commit-id: 3509727bbd266ddf1796c40060c3349c6d19c1a5" }, { "from": "gpt", "value": "<?php\nnamespace Concrete\\Core\\Applicatio...
php
chosen
[ { "from": "human", "value": "Add migration to change value column to text\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass ChangeValueColumnInSettingsTableT...
php
chosen
[ { "from": "human", "value": "Add a new exception type\n" }, { "from": "gpt", "value": "<?php\n/*\n * @package klout-sdk-php\n * @author Mike Tougeron <github+klout-sdk-php@tougeron.com>\n * @copyright Copyright (c) 2013 Mike Tougeron <github+klout-sdk-php@tougeron.com>\n * @license ht...
php
chosen
[ { "from": "human", "value": "[RPC] Add a RPC Client Processor\n" }, { "from": "gpt", "value": "<?php\nnamespace Swarrot\\Processor\\RPC;\n\nuse Psr\\Log\\LoggerInterface;\n\nuse Symfony\\Component\\OptionsResolver\\OptionsResolverInterface;\n\nuse Swarrot\\Broker\\Message;\nuse Swarrot\\Processo...
php
chosen
[ { "from": "human", "value": "Expand citizen table fields and one example data" }, { "from": "gpt", "value": "<?php\n\ndefined('BASEPATH') OR exit('No direct script access allowed');\n\n/**\n * Membuat relation pada database\n */\nclass Migration_expandcitizen extends CI_Migration {\n\n public...
php
chosen