conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add tests for checking the service factory.\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 */\nclass ...
php
chosen
[ { "from": "system", "value": "Simplify check for reverse PHPUnit aliases\n" }, { "from": "human", "value": "<?php\nif (class_exists('PHPUnit_Runner_Version')) {\n if (version_compare(\\PHPUnit_Runner_Version::id(), '5.7', '<')) {\n trigger_error(sprintf('Your PHPUnit Version must be at...
php
chosen
[ { "from": "human", "value": "Add unit test for image handling for not often used methods\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\SitemapPlugin\\Model;\n\nuse Doctrine\\Common\\Collections\\ArrayCollection;\nuse Doctrine\\Common\\Collections\\Collect...
php
chosen
[ { "from": "human", "value": "Add test for details organismsWithTrait\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Test\\AppBundle\\API\\Details;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\nuse Symfony\\Component\\HttpFoundation\\ParameterBag;\n\nclass OrganismsWithTraitTe...
php
chosen
[ { "from": "human", "value": "Add data grid for archived content block revisions\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\ContentBlock;\n\nuse Backend\\Core\\Engine\\DataGridDB;\nuse Backend\\Core\\Language\\Locale;\n\nclass RevisionDataGrid extends Dat...
php
chosen
[ { "from": "human", "value": "Add test for creating new ApiApp\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * The MIT License (MIT)\n *\n * Copyright (C) 2014 hellosign.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated ...
php
chosen
[ { "from": "human", "value": "Add class to load doctrine's fixture" }, { "from": "gpt", "value": "<?php\n\nnamespace JS\\Doctrine\\Fixture;\n\nuse Doctrine\\Common\\DataFixtures\\Loader;\nuse Doctrine\\Common\\DataFixtures\\Executor\\ORMExecutor;\nuse Doctrine\\Common\\DataFixtures\\Purger\\ORMPu...
php
chosen
[ { "from": "human", "value": "Add new shell command to be used by cron.\n" }, { "from": "gpt", "value": "<?php\nclass CronShell extends AppShell {\n\n\tpublic $uses = array('Scribble', 'Statistic');\n\n\tpublic function main() {\n\t\t$results = $this->Scribble->find('count');\n\t\t$this->Statisti...
php
chosen
[ { "from": "human", "value": "Add unit tests for AggregationNamingStrategy\n" }, { "from": "gpt", "value": "<?php\n\nnamespace FileNamingResolver\\NamingStrategy;\n\nuse FileNamingResolver\\FileInfo;\n\n/**\n * @author Victor Bocharsky <bocharsky.bw@gmail.com>\n */\nclass AggregateNamingStrategyT...
php
chosen
[ { "from": "human", "value": "Fix Random key file missing\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Harp\\RandomKey;\n\nuse Harp\\Harp\\Config;\nuse Harp\\Harp\\Repo\\Event;\n\n/**\n * @author Ivan Kerin <ikerin@gmail.com>\n * @copyright 2014, Clippings Ltd.\n * @license http://spd...
php
chosen
[ { "from": "human", "value": "Add plugin to fake all AMP reponses.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Plugin Name: Fake AMP Responses\n * Description: Plugin to filter AMP HTTP responses to return without errors.\n *\n * @package Google\\Site_Kit\n * @copyright 2020 Google LLC\n * ...
php
chosen
[ { "from": "human", "value": "Add test for details traitsOfOrganisms webservice\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Test\\AppBundle\\API\\Details;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\n\nclass TraitsOfOrganismsTest extends WebTestCase\n{\n\n public functi...
php
chosen
[ { "from": "human", "value": "Add example page for link 2\n" }, { "from": "gpt", "value": "<?php \n$currentPage = \"link_2\";\nrequire_once(\"config.php\"); \n?>\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\" />\n <meta http-equiv=\"x-ua-compatible\" content=\"ie=edg...
php
chosen
[ { "from": "human", "value": "Add tests for the admin creation command\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Regis\\Application\\CommandHandler\\Github\\User;\n\nuse Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoderInterface;\n\nuse Regis\\Application\\Command;...
php
chosen
[ { "from": "human", "value": "Test association de lot à des tables\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once(dirname(__FILE__).'/../bootstrap/common.php');\n\nif ($application != 'igp13') {\n $t = new lime_test(1);\n $t->ok(true, \"Pass AOC\");\n return;\n}\n\n$t = new lime_...
php
chosen
[ { "from": "human", "value": "TASK: Add test covering undisclosed credentials\n" }, { "from": "gpt", "value": "<?php\nnamespace Neos\\Flow\\Tests\\Unit\\Http\\Helper;\n\nuse Neos\\Flow\\Http\\Helper\\ArgumentsHelper;\nuse Neos\\Flow\\Http\\Helper\\RequestInformationHelper;\nuse Neos\\Flow\\Http\\...
php
chosen
[ { "from": "human", "value": "Create a custom translator class\n" }, { "from": "gpt", "value": "<?php namespace Modules\\Translation\\Services;\n\nuse Illuminate\\Foundation\\Bus\\DispatchesJobs;\nuse Modules\\Translation\\Events\\TranslationNotFoundInCache;\nuse Modules\\Translation\\Repositorie...
php
chosen
[ { "from": "human", "value": "Add execution statuses repository test\n" }, { "from": "gpt", "value": "<?php\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2016 Bruno P. Kinoshita, Peter Florijn\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this s...
php
chosen
[ { "from": "human", "value": "Create service provider to wire things into the framework.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace MCordingley\\LaravelSapient;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse MCordingley\\LaravelSapient\\Console\\GenerateSealingKeyPair;\nuse MCordingle...
php
chosen
[ { "from": "human", "value": "Add missing communicator base class" }, { "from": "gpt", "value": "<?php\n\nabstract class Worker_Communicator{\n /**\n * get stream to read from\n * \n * @return resource\n */\n abstract public function getStreamRead();\n \n /**\n * g...
php
chosen
[ { "from": "system", "value": "Check if Buzz library is installed.\n" }, { "from": "human", "value": "<?php\n\nnamespace Geocoder\\Tests\\HttpAdapter;\n\nuse Geocoder\\Tests\\TestCase;\n\nuse Geocoder\\HttpAdapter\\BuzzHttpAdapter;\n\n/**\n * @author William Durand <william.durand1@gmail.com>\n *...
php
chosen
[ { "from": "human", "value": "Add default implementation of exception handler.\n" }, { "from": "gpt", "value": "<?php namespace Illuminate\\Foundation\\Debug;\n\nuse Exception;\nuse Psr\\Log\\LoggerInterface;\nuse Symfony\\Component\\Debug\\ExceptionHandler as SymfonyDisplayer;\nuse Illuminate\\C...
php
chosen
[ { "from": "human", "value": "Add flatten dot 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 flattenDot Mimic library function.\n *\n * @since 0.1.0\n *\n * @todo Need t...
php
chosen
[ { "from": "system", "value": "Add deprecation class alias for Bolt\\Storage\n" }, { "from": "human", "value": "<?php\n\n/**\n * Autoloaded file to handle deprecation such as class aliases.\n *\n * NOTE:\n * If for any reason arrays are required in this file, only ever use array()\n * syntax to p...
php
chosen
[ { "from": "human", "value": "Add testing and setting for eloquent connection\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Inisiatif\\Tests;\n\nuse PDO;\nuse PHPUnit\\Framework\\TestCase;\nuse Illuminate\\Events\\Dispatcher;\nuse Illuminate\\Database\\Connection;\nuse Illuminate\\Database\...
php
chosen
[ { "from": "human", "value": "Add file to load all the Punic components\n" }, { "from": "gpt", "value": "<?php\nrequire_once __DIR__ . '/code/Calendar.php';\nrequire_once __DIR__ . '/code/Data.php';\nrequire_once __DIR__ . '/code/Exception.php';\nrequire_once __DIR__ . '/code/Exception/BadArgumen...
php
chosen
[ { "from": "human", "value": "Add model factory to generate random CT QC data\n" }, { "from": "gpt", "value": "<?php\n\nuse Faker\\Generator as Faker;\n\nuse Carbon\\Carbon;\n\n$factory->define(RadDB\\CTDailyQCRecord::class, function (Faker $faker) {\n return [\n 'machine_id' => '130',\...
php
chosen
[ { "from": "system", "value": "Use encryption available for Laravel 5.0 and 5.1 in tests\n" }, { "from": "human", "value": "<?php\n\nclass AimeosTestAbstract extends Orchestra\\Testbench\\TestCase\n{\n\tprotected function getEnvironmentSetUp($app)\n\t{\n\t\t$app['config']->set('database.default',...
php
chosen
[ { "from": "human", "value": "[FIX] homepages: Add a patch file to rename wiki pages without a name, and also remove prefs with value NULL, which both can contribute to a \"No wiki page specified\" error on tiki-index.php\n\ngit-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@64287 b456876b-0849-0410-b77d-9...
php
chosen
[ { "from": "human", "value": "Create example of routing confing\n" }, { "from": "gpt", "value": "<?php\n\nreturn [\n [\n 'command' => 'Dummy',\n 'defaults' => 'MartiAdrogue\\Console\\DummyCommand',\n ],\n [\n 'command' => 'NotFound',\n 'defaults' => 'MartiAdro...
php
chosen
[ { "from": "human", "value": "Add custom string loader for twig processor\n" }, { "from": "gpt", "value": "<?php\n/**\n * Copyright 2011 Victor Farazdagi\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.\...
php
chosen
[ { "from": "human", "value": "Add initial tests for Events\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests;\n\nuse TightenCo\\Jigsaw\\Jigsaw;\nuse org\\bovigo\\vfs\\vfsStream;\n\nclass EventsTest extends TestCase\n{\n public function test_user_can_add_event_listeners_as_closures()\n ...
php
chosen
[ { "from": "human", "value": "Add some unit tests for the readme examples." }, { "from": "gpt", "value": "<?php\n/**\n * @author Todd Burry <todd@vanillaforums.com>\n * @copyright 2009-2014 Vanilla Forums Inc.\n * @license MIT\n */\n\nuse Garden\\Cli\\Cli;\n\n/**\n * Provides tests for the sample...
php
chosen
[ { "from": "human", "value": "Add test for SiteBuilder deleting/replacing old build files\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests;\n\nuse org\\bovigo\\vfs\\vfsStream;\n\nclass SiteBuilderTest extends TestCase\n{\n /**\n * @test\n */\n public function destination_di...
php
chosen
[ { "from": "human", "value": "Test that filter() works with arrays eagerly\n" }, { "from": "gpt", "value": "<?php\n/*\n * Copyright 2017, 2018 Alexey Kopytko <alexey@kopytko.com>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in comp...
php
chosen
[ { "from": "human", "value": "Add unit tests for Schedule object\n" }, { "from": "gpt", "value": "<?php\n\nuse PHPUnit\\Framework\\TestCase;\n\nclass ScheduleTest extends TestCase\n{\n public function testMasterScheduleEquivalency()\n {\n $teams = ['Team 1', 'Team 2', 'Team 3', 'Team...
php
chosen
[ { "from": "human", "value": "Create a new partial for asset bulk actions\n\nSigned-off-by: snipe <e9c017fc53f27c86a4fb6d4f0de7d332b596a185@snipe.net>\n" }, { "from": "gpt", "value": "<div id=\"toolbar\">\n {{ Form::open([\n 'method' => 'POST',\n 'route' => ['hardware/bulkedit'],\n ...
php
chosen
[ { "from": "human", "value": "Allow to add serializers through config\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\n * @copyright Copyright (c) 2005-2013 Zend ...
php
chosen
[ { "from": "human", "value": "Add column `user_id` in Company table as foreign key\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddUserIdToCompanyTable extends Migration\n{\n /**\n * Run th...
php
chosen
[ { "from": "human", "value": "Add initial working-draft for tests.\n" }, { "from": "gpt", "value": "<?php\n\ndeclare (strict_types = 1);\n\nnamespace Crell\\Document\\Document\\Test;\n\nuse Crell\\Document\\Document\\Document;\nuse Crell\\Document\\Document\\SimpleDocumentSet;\n\nclass FieldTest ...
php
chosen
[ { "from": "human", "value": "Add Middleware test for set and queued cookie encryption\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Http\\Response;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Routing\\Router;\nuse Illuminate\\Container\\Container;\nuse Illuminate\\Encryption\\En...
php
chosen
[ { "from": "human", "value": "Allow null for optional talk fields\n" }, { "from": "gpt", "value": "<?php\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AlterTalkColumnsAllowNull extends AbstractMigration\n{\n /**\n * Migrate Up.\n */\n public function up()\n {\n $this-...
php
chosen
[ { "from": "human", "value": "Allow longer UUID for image\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass LongerImageUuid extends AbstractMigration\n{\n public function change()\n {\n $table= $this->table('image', [ 'signed' => false ]);\n ...
php
chosen
[ { "from": "human", "value": "Add tests for the priority class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Common\\Tests\\Core\\Header;\n\nuse Common\\Core\\Header\\Priority;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PriorityTest extends TestCase\n{\n public function testPriorityEqua...
php
chosen
[ { "from": "human", "value": "Test coverage for non-command-specific server error handling.\n" }, { "from": "gpt", "value": "<?php\n\nMock::generate('Pheanstalk_Socket', 'MockSocket');\n\n/**\n * Tests exceptions thrown to represent non-command-specific error responses.\n *\n * @author Paul Annes...
php
chosen
[ { "from": "human", "value": "Increase cached deviations' image column lengths\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass ExtendCachedDeviationsColumnLengths extends AbstractMigration {\n\tpublic function change() {\n\t\t$this->table('cached_deviat...
php
chosen
[ { "from": "human", "value": "Create initial signature form field view" }, { "from": "gpt", "value": "@if($isHorizontal)\n<div class=\"col-sm-offset-{{ $labelWidth }} col-sm-{{ $fieldWidth }}\">\n@endif\n\n <div class=\"signature {{ $name }} well\">\n <div class=\"embed-responsive embed...
php
chosen
[ { "from": "human", "value": "Create migration script for section term notes\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Slate\\Courses;\n\nuse DB, SQL;\n\n$oldTable = 'narrative_section_notes';\n\nif (!static::tableExists($oldTable)) {\n return static::STATUS_SKIPPED;\n}\n\n$totalSect...
php
chosen
[ { "from": "human", "value": "Add field for Stripe Payment Intent API\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AddStripePaymentIntent extends AbstractMigration\n{\n public function change()\n {\n $table= $this->table('sale');\n $t...
php
chosen
[ { "from": "human", "value": "Index page updated. Admin and user login.\n" }, { "from": "gpt", "value": "<?php\nsession_start();\nif(isset($_GET['logout']))\nunset($_SESSION['userid']);\nif(isset($_SESSION['userid']))\necho '<meta http-equiv=\"Refresh\" content=\"0;http://localhost/cart/user.php\...
php
chosen
[ { "from": "human", "value": "[OE-5235] Increase the length of audit model names and make them unique.\n" }, { "from": "gpt", "value": "<?php\n\nclass m141208_135800_audit_model_unique extends CDbMigration\n{\n\tpublic function safeUp()\n\t{\n\t\t$this->alterColumn(\"audit_model\", \"name\", \"st...
php
chosen
[ { "from": "human", "value": "Introduce virtual machine managed object extension\n" }, { "from": "gpt", "value": "<?php\nnamespace Vmwarephp\\Extensions;\n\nclass VirtualMachine extends \\Vmwarephp\\ManagedObject {\n\n\tfunction takeSnapshot($name, $memory = null, $quiesce = null) {\n\t\t$snapsho...
php
chosen
[ { "from": "human", "value": "Add class for meta tags\n" }, { "from": "gpt", "value": "<?php\n\nnamespace LaraComponents\\Seo;\n\nclass Meta\n{\n protected $attributes = [];\n\n public function __construct(array $attributes = [])\n {\n $this->setAttributes($attributes);\n }\n\n...
php
chosen
[ { "from": "human", "value": "Add dictionary delta for PHP 8.2\n" }, { "from": "gpt", "value": "<?php // phpcs:ignoreFile\n\n/**\n * This contains the information needed to convert the function signatures for php 8.2 to php 8.1 (and vice versa)\n *\n * This file has three sections.\n * The 'added...
php
chosen
[ { "from": "human", "value": "Add new Unit Test for PaymentManager\n" }, { "from": "gpt", "value": "<?php\n\nnamespace ChangeTests\\Rbs\\Payment;\n\nclass PaymentManagerTest extends \\ChangeTests\\Change\\TestAssets\\TestCase\n{\n\n\tpublic static function setUpBeforeClass()\n\t{\n\t\tstatic::ini...
php
chosen
[ { "from": "human", "value": "Add migration to get rid of Bern timezone\n" }, { "from": "gpt", "value": "<?php\n\nuse App\\User;\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass RemoveBernTimezone e...
php
chosen
[ { "from": "human", "value": "Remove words from numeric pagination\n\nThe default numeric pagination includes the words \"Previous Page\" and\n\"Next Page\".\n\nThe Bootstrap example pagination uses only the laquo and raquo\ncharacters.\n\nRemove the words \"Previous Page\" and \"Next Page\" from pagination\...
php
chosen
[ { "from": "human", "value": "Add function to read columns from the db and generate appropriate html.\n\ngit-svn-id: 245d8f85226f8eeeaacc1269b037bb4851d63c96@897 54a900ba-8191-11dd-a5c9-f1483cedc3eb\n" }, { "from": "gpt", "value": "<?php\n\n//Function to query the db and return the correct column...
php
chosen
[ { "from": "human", "value": "Refactor deploy, style up instace details\n" }, { "from": "gpt", "value": "<?php\nnamespace Peazie\\BuildDeliveryBundle\\Controller;\n\nuse Aws\\Common\\Aws;\nuse Aws\\Ec2\\Ec2Client;\nuse Aws\\ElasticLoadBalancing\\ElasticLoadBalancingClient;\n\nuse Symfony\\Compone...
php
chosen
[ { "from": "human", "value": "Add migration to set default user (notification) settings\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse OpenDominion\\Helpers\\NotificationHelper;\nuse OpenDominion\\Models\\User;\n\nclass SetDefaultNotificationSettin...
php
chosen
[ { "from": "human", "value": "Add class... the magic one\n" }, { "from": "gpt", "value": "<?php\n/**\n * @author e 13.01.2016\n */\n\nnamespace e;\n\nuse PDO;\n\nclass PhoneNumberValidator\n{\n\tprivate $_db;\n\n\t/**\n\t * PhoneNumberValidator constructor.\n\t */\n\tpublic function __construct()...
php
chosen
[ { "from": "human", "value": "Add a few more tests\n" }, { "from": "gpt", "value": "<?php\nnamespace DrestTests;\n\n\n\nclass ManagerTest extends DrestTestCase\n{\n\n public function testExecutingOnANamedRoute()\n {\n $dm = $this->_getDrestManager();\n\n $dm->dispatch()\n\n ...
php
chosen
[ { "from": "system", "value": "BAP-12474: Add compiler pass for provider extensions\n- fix service id after merge\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\ActionBundle\\DependencyInjection\\CompilerPass;\n\nuse Symfony\\Component\\DependencyInjection\\Compiler\\CompilerP...
php
chosen
[ { "from": "human", "value": "Add maintenance script to purge pages with map tags\n\nAlso has a --dry-run option to just list these pages instead.\n\nBug: T193525\nChange-Id: Ib382a7b14f80da8c6caf5e2b3dc4696797e7d477\n" }, { "from": "gpt", "value": "<?php\n$IP = getenv( 'MW_INSTALL_PATH' );\nif (...
php
chosen
[ { "from": "human", "value": "Add Esteban's new validated entities\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddEstebanEntities extends Migration\n{\n /**\n * Run the migrations.\n *...
php
chosen
[ { "from": "human", "value": "Create table to save credit cards\n" }, { "from": "gpt", "value": "<?php\n/**\n * Used to store saved customer payment cards\n */\n\n$installer = $this;\n$installer->startSetup();\n\n$installer->run(\"\nCREATE TABLE {$this->getTable('ebanx_user_cards')} (\n `ebanx...
php
chosen
[ { "from": "human", "value": "Add migration class for cfg_forms_fields table\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Data object containing the SQL and PHP code to migrate the database\n * up to version 1432824532.\n * Generated on 2015-05-28 16:48:52 by root\n */\nclass PropelMigration...
php
chosen
[ { "from": "human", "value": "Add js static analysis task type\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Application\\Migrations;\n\nuse SimplyTestable\\BaseMigrationsBundle\\Migration\\EntityModificationMigration,\n SimplyTestable\\WorkerBundle\\Entity\\Task\\Type\\Type,\n SimplyTestab...
php
chosen
[ { "from": "system", "value": "[WIP] BB-4325: Refactor block types, move expressions in vars from buildView to finishView\n- added test for Options:setMultiple\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Tests\\Unit\\Component\\Layout\\Block\\Type;\n\nuse Oro\\Component\\Layout\\Bl...
php
chosen
[ { "from": "human", "value": "Introduce a new object to store execution details\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of the bee4/transport package.\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this sour...
php
chosen
[ { "from": "human", "value": "Add foreign keys to the database\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddForeignKeys extends Migration {\n\n pri...
php
chosen
[ { "from": "human", "value": "Create unit test for AccountService class\n" }, { "from": "gpt", "value": "<?php\nrequire_once('api/service/account.php');\n\ndescribe('Account service', function () {\n\n describe('register', function () {\n $this->data = [];\n $this->data['email'] = 'user@te...
php
chosen
[ { "from": "human", "value": "Add migration for ActivityType entity\n" }, { "from": "gpt", "value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m141220_143106_create_activity_type_table extends Migration\n{\n public function up()\n {\n $tableOptions = null;\n ...
php
chosen
[ { "from": "human", "value": "Add test for a Callback type\n" }, { "from": "gpt", "value": "<?php\n\nnamespace atk4\\data\\tests;\n\nuse atk4\\data\\Model;\nuse atk4\\data\\Persistence_SQL;\n\nclass FieldHereditaryTest extends \\atk4\\schema\\PHPUnit_SchemaTestCase\n{\n public function testDir...
php
chosen
[ { "from": "human", "value": "Add api rest scheduler entry point\n" }, { "from": "gpt", "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 software...
php
chosen
[ { "from": "human", "value": "Add new object to represent an item in it's packed orientation\n" }, { "from": "gpt", "value": "<?php\n/**\n * Box packing (3D bin packing, knapsack problem)\n * @package BoxPacker\n * @author Doug Wright\n */\nnamespace DVDoug\\BoxPacker;\n\n/**\n * An item to be pa...
php
chosen
[ { "from": "human", "value": "Create an app kernel for our application\n" }, { "from": "gpt", "value": "<?php\n\nnamespace ModuleGenerator;\n\nuse Matthias\\SymfonyConsoleForm\\Bundle\\SymfonyConsoleFormBundle;\nuse Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle;\nuse Symfony\\Component\\Confi...
php
chosen
[ { "from": "system", "value": "Fix psr and add doclox\n" }, { "from": "human", "value": "<?php\nnamespace Aura\\Cli;\n\n/**\n * \n * An object-oriented wrapper for resource streams.\n * \n */\nclass StdioResource\n{\n protected $handle;\n \n protected $filename;\n \n protected $mod...
php
chosen
[ { "from": "human", "value": "Add hash array 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 hash_array Mimic library function.\n *\n * @since 0.1.0\n */\nclass HashArray...
php
chosen
[ { "from": "human", "value": "Add an interface to be able to inject a wsClient stub in type-constrained methods\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Overblog\\WsClientBundle\\Client;\n\ninterface WsClientInterface\n{\n /**\n * Get Request\n * @param string $uri\n * @...
php
chosen
[ { "from": "human", "value": "Add imageable entity repository trait.\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 the...
php
chosen
[ { "from": "human", "value": "Add test for container compilation\n\nTo help catch changes in symfony container such as the ones in 3.3\n" }, { "from": "gpt", "value": "<?php\n\nnamespace DMS\\DMS\\Bundle\\FilterBundle\\Tests\\Integration;\n\nuse DMS\\Bundle\\FilterBundle\\DependencyInjection\\DMS...
php
chosen
[ { "from": "human", "value": "Test Attachment model's file_path accessor\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Unit;\n\nuse App\\Repositories\\AttachmentRepository;\nuse Tests\\TestCase;\n\nclass AttachmentTest extends TestCase\n{\n public function testFileTypeAccessor(): ...
php
chosen
[ { "from": "human", "value": "Add script injector serialize test\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Ray\\Compiler\\Deep;\n\n\nfinal class FakeDemand\n{\n public $dep;\n public function __construct(\n FakeDep $dep\n )\n {\n $th...
php
chosen
[ { "from": "human", "value": "Add coverage for Ops class\n" }, { "from": "gpt", "value": "<?php\n\nuse OpenSRS\\Ops;\n\nclass OpsTest extends PHPUnit_Framework_TestCase\n{\n /**\n * Should convert specials chars, & encode in utf8\n * \n * @return void\n */\n public function ...
php
chosen
[ { "from": "human", "value": "Add stub class for Windows Environments\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * PHP Version 5.3\n *\n * @copyright (c) 2015 brian ridley\n * @author brian ridley <ptlis@ptlis.net>\n * @license http://opensource.org/licenses/MIT MIT\n *\n * For th...
php
chosen
[ { "from": "human", "value": "Implement the site-wide search controller.\n" }, { "from": "gpt", "value": "<?php\nApp::uses('AppController', 'Controller');\n\n/**\n * Search controller\n *\n * Handles site-wide search.\n */\nclass SearchController extends AppController\n{\n\tpublic function this($...
php
chosen
[ { "from": "system", "value": "BB-4318: Make sure that user can build grids based on the backend search engine\n- fixed minor issues after review\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\SearchBundle\\EventListener;\n\nuse Oro\\Bundle\\DataGridBundle\\Event\\BuildAfter;\...
php
chosen
[ { "from": "human", "value": "Add an explicit org role check example\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once \"vendor/autoload.php\";\nrequire_once 'example_helpers.php';\n\nfunction wicket_person_has_organization_role($person_roles, $role_name, $role_resource_id) {\n $has_branch_...
php
chosen
[ { "from": "human", "value": "system: Add a generic controller interface\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * This file contains the base controller interface.\n *\n * PHP Version 5.3\n *\n * @category Libraries\n * @package Core\n * @subpackage Libraries\n * @author M2Mobi ...
php
chosen
[ { "from": "human", "value": "Prepare migration to create Character History table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateCharactersHistoryTab...
php
chosen
[ { "from": "human", "value": "Add unit test for ParamTrait\n" }, { "from": "gpt", "value": "<?php\n/**\n * DronePHP (http://www.dronephp.com)\n *\n * @link http://github.com/Pleets/DronePHP\n * @copyright Copyright (c) 2016-2018 Pleets. (http://www.pleets.org)\n * @license http://www.drone...
php
chosen
[ { "from": "human", "value": "Make a stub for manager section\n" }, { "from": "gpt", "value": "<?php\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Comp...
php
chosen
[ { "from": "human", "value": "Add soft deletes to server settings\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass UpdateSettingsAddSoftDeletes extends Migra...
php
chosen
[ { "from": "human", "value": "TASK: Add core migration that warns about component chain usage\n\nProvides a minimal core migration that will show a warning\nwhen the migrated package contains PHP code that refers to\nthe no longer existing `ComponentInterface`.\n\nUsage:\n\n ./flow flow:core:migrate <Pack...
php
chosen
[ { "from": "system", "value": "Fix critical claim bug on token\n" }, { "from": "human", "value": "<?php\n\nnamespace Emarref\\Jwt;\n\nuse Emarref\\Jwt\\Claim;\nuse Emarref\\Jwt\\HeaderParameter;\nuse Emarref\\Jwt\\Token\\Header;\nuse Emarref\\Jwt\\Token\\Payload;\n\nclass Token\n{\n /**\n ...
php
chosen
[ { "from": "human", "value": "Add write script to write start and end blocks\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Jhg\\ComposerCiTools;\n\nuse Composer\\Script\\Event;\nuse Symfony\\Component\\OptionsResolver\\OptionsResolver;\n\n/**\n * Class Write.\n */\nclass Write extends Abstr...
php
chosen
[ { "from": "human", "value": "Reorder methods to match interface\n" }, { "from": "gpt", "value": "<?php\n\nnamespace FullyBaked\\Pslackr\\Messages;\n\nclass CustomMessage implements Message\n{\n protected $text;\n\n public function asJson()\n {\n $message = [\n 'text' =...
php
chosen
[ { "from": "human", "value": "Add indexes for operations table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\n/**\n * This Migration creates indexes for operations table\n *\n * @author Yuriy Tokarev ...
php
chosen
[ { "from": "human", "value": "Add Facade for when needed!\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Metrique\\CDNify;\n\nuse Illuminate\\Support\\Facades\\Facade;\n\nclass CDNifyFacade extends Facade\n{\n /**\n * Get the registered name of the component.\n *\n * @return s...
php
chosen