conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Fix issue: Can't delete game which has active servers.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass FixGameForeignKey extends Migration {\n\n\t/**\n\t * Run the migra...
php
chosen
[ { "from": "human", "value": "Add a basic test suite\n" }, { "from": "gpt", "value": "<?php\n/**\n * Simple tests for now, to verify basic functionality.\n * This should soon be PHPUnit.\n */\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\nuse Qaribou\\Collection\\ImmArray;\nuse Qaribou\\...
php
chosen
[ { "from": "human", "value": "Add failed jobs table migration\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateFailedJobsTable extends Migration\n{\n ...
php
chosen
[ { "from": "human", "value": "Add category_url to theme globals.\n" }, { "from": "gpt", "value": "<?php namespace BaunPlugin\\Categories;\r\n\r\nuse Baun\\Plugin;\r\n\r\nclass Categories extends Plugin\r\n{\r\n public function init()\r\n {\r\n $this->events->addListener('baun.afterGl...
php
chosen
[ { "from": "human", "value": "Add Integration Test for Favorites\n" }, { "from": "gpt", "value": "<?php\n\nnamespace ImguBox\\Tests\\Integrated\\UserSettings;\n\nuse Illuminate\\Foundation\\Testing\\DatabaseMigrations;\nuse Illuminate\\Foundation\\Testing\\DatabaseTransactions;\nuse ImguBox\\Jobs...
php
chosen
[ { "from": "human", "value": "Add tests for the SymfonyUrlGenerator\n" }, { "from": "gpt", "value": "<?php\n\nnamespace SitemapGenerator\\Tests\\Entity;\n\nuse SitemapGenerator\\Routing\\SymfonyUrlGenerator;\nuse SitemapGenerator\\UrlGenerator;\n\nclass SymfonyUrlGeneratorTest extends \\PHPUnit_F...
php
chosen
[ { "from": "human", "value": "Add hello world script by php\n" }, { "from": "gpt", "value": "<\u0000?\u0000p\u0000h\u0000p\u0000\n\u0000\t\u0000e\u0000c\u0000h\u0000o\u0000 \u0000\"\u0000H\u0000e\u0000l\u0000l\u0000o\u0000 \u0000W\u0000o\u0000r\u0000l\u0000d\u0000!\u0000\"\u0000;\u0000\n\u0000?\u...
php
chosen
[ { "from": "human", "value": "Add check for SMTP status.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Copyright (c) 2009, Brad Griffith <griffbrad@gmail.com>\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without \n * modification, are permitted ...
php
chosen
[ { "from": "human", "value": "Add test for PhpTabs error\n" }, { "from": "gpt", "value": "<?php\n\nnamespace PhpTabsTest\\Component;\n\nuse Exception;\nuse PHPUnit_Framework_TestCase;\nuse PhpTabs\\PhpTabs;\n\n/**\n * Tests PhpTabs component\n */\nclass PhpTabsTest extends PHPUnit_Framework_TestC...
php
chosen
[ { "from": "human", "value": "Test the Read method for an array in return\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Helpers;\n\nuse Carbon\\Carbon,\n GuzzleHttp\\Client,\n Mediatoolkit\\Mediatoolkit,\n Mediatoolkit\\Helpers\\GroupHelper,\n PHPUnit\\Framework\\TestCase...
php
chosen
[ { "from": "human", "value": "Add test for index events\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Feature;\n\nuse Sijot\\User;\nuse Tests\\TestCase;\nuse Illuminate\\Foundation\\Testing\\WithoutMiddleware;\nuse Illuminate\\Foundation\\Testing\\DatabaseMigrations;\nuse Illuminate\...
php
chosen
[ { "from": "human", "value": "Add example of in memory queue\n" }, { "from": "gpt", "value": "<?php\n\n// This example utilizes SplQueue and is therefor in memory only\n// It will produce 20 jobs and then consume every job in the queue\n// and when done it idles.\n\nuse Raekke\\Consumer;\nuse Rae...
php
chosen
[ { "from": "human", "value": "Create a spreadsheet value object\n\nThis object will be used by readers and writers to hold a common\nspreadsheet representation in-memory. It'll then be easier to mix-\nmatch reading and writing formats.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Ob\\Unspr...
php
chosen
[ { "from": "human", "value": "Add snippet for changing default login redirect URL to previous page.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Changes the default login redirect URL to the previous page instead of the current page.\n *\n * @param array $output The output array of shortco...
php
chosen
[ { "from": "human", "value": "Fix default message\nin bank account statement transaction (message, structured_message)\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 M...
php
chosen
[ { "from": "human", "value": "Add tests folder with a sample Test\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: Faramarz Salehpour\n */\n\n\nuse PHPUnit\\Framework\\TestCase;\n\nclass SampleClassTest extends TestCase\n{\n /**\n * @test\n */\n public ...
php
chosen
[ { "from": "human", "value": "Add without 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 without Mimic library function.\n *\n * @since 0.1.0\n */\nclass WithoutFuncTest...
php
chosen
[ { "from": "system", "value": "Improve `arc lint --output summary`\n\nSummary:\nThis currently output like this:\n\n file_a:\n file_b:\n file_c:\n Warning on line 29: blah blah\n\nThis isn't especially useful and can't be piped to other tools. Instead, emit output like:\n\n file_c:29:Warning: blah bla...
php
chosen
[ { "from": "human", "value": "Create the Client Registration controller.\n\nSigned-off-by: Marios Sotiropoulos <d835cc3d5a582fb720c036e3ecd99881c51ab932@uom.gr>\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Ms\\OauthBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Co...
php
chosen
[ { "from": "human", "value": "Increase access token column length.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass IncreaseTokenFieldLength extends Migration\n{\n /**\n * Run the migrations.\n...
php
chosen
[ { "from": "human", "value": "Add patch to fix customer field type in phonecalls\n" }, { "from": "gpt", "value": "<?php\n\ndefined(\"_VALID_ACCESS\") || die('Direct access forbidden');\n\nDB::Execute('UPDATE phonecall_field SET type=%s WHERE field=%s AND type=%s', array('text', 'Customer', 'selec...
php
chosen
[ { "from": "human", "value": "Add qIpCidrFormatRule for validate a value with CIDR format (192.168.0.1/24 for example)" }, { "from": "gpt", "value": "<?php\n\n include_once(QFRAMEWORK_CLASS_PATH . \"qframework/class/data/qregexprule.class.php\");\n\n define(IP_CIDR_FORMAT_RULE_REG_EXP, \"^(...
php
chosen
[ { "from": "human", "value": "Add class for filtering requirements.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Main class to filter requirements.\n */\nclass Whip_RequirementsFilter {\n\n\t/**\n\t * @var int\n\t */\n\tprivate $expirationDate;\n\n\t/**\n\t * @var array\n\t */\n\tprivate $re...
php
chosen
[ { "from": "human", "value": "Add narrative reports link to default tools\n" }, { "from": "gpt", "value": "<?php\n\nif ($GLOBALS['Session']->hasAccountLevel('Staff')) {\n Slate\\UI\\Tools::$tools['Student Progress'] = [\n 'Narrative Reports' => [\n '_href' => '/manage#progres...
php
chosen
[ { "from": "human", "value": "Add overly complex xml:base test\n" }, { "from": "gpt", "value": "<?php\n\n$data = <<<EOD\n<feed xmlns=\"http://www.w3.org/2005/Atom\">\n\t<entry>\n\t\t<title type=\"xhtml\" xml:base=\"http://example.com/\"><div xmlns=\"http://www.w3.org/1999/xhtml\"><p xml:base=\"/t...
php
chosen
[ { "from": "human", "value": "Add migration for Faculty entity\n" }, { "from": "gpt", "value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m141216_145733_create_faculty_table extends Migration\n{\n public function up()\n {\n $tableOptions = null;\n if ($th...
php
chosen
[ { "from": "human", "value": "Add partial tests for narrator service\n" }, { "from": "gpt", "value": "<?php namespace Larapress\\Tests\\Services;\n\nuse Larapress\\Tests\\TestCase;\nuse Log;\nuse Mail;\nuse Narrator;\n\nclass NarratorTest extends TestCase\n{\n\n protected $log_message;\n\n ...
php
chosen
[ { "from": "system", "value": "Test shell with a command that will work on Windows too.\n" }, { "from": "human", "value": "<?php\n\nnamespace CommerceGuys\\Platform\\Cli\\Tests;\n\nuse CommerceGuys\\Platform\\Cli\\Helper\\ShellHelper;\n\nclass ShellHelperTest extends \\PHPUnit_Framework_TestCase\...
php
chosen
[ { "from": "human", "value": "Add test for Boolean type too\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of phpDocumentor.\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this sou...
php
chosen
[ { "from": "human", "value": "Add tests for only-dev decision\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tooly\\Tests\\Script\\Decision;\n\nuse Tooly\\Model\\Tool;\nuse Tooly\\Script\\Configuration;\nuse Tooly\\Script\\Decision\\OnlyDevDecision;\nuse Tooly\\Script\\Helper;\n\n/**\n * @pa...
php
chosen
[ { "from": "system", "value": "Change the test listener than layers on second-level-caching so that it is more conservative, only turning on caching-associations when it knows the target entity is cache-able.\n" }, { "from": "human", "value": "<?php\n\nnamespace Doctrine\\Tests\\EventListener;\n\...
php
chosen
[ { "from": "human", "value": "Add initial tests for SlackRecord\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Monolog package.\n *\n * (c) Jordi Boggiano <j.boggiano@seld.be>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that ...
php
chosen
[ { "from": "human", "value": "Add tests for the phpstan runner\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Regis\\Infrastructure\\PhpMd;\n\nuse Regis\\Infrastructure\\Phpstan\\Phpstan;\n\nclass PhpstanTest extends \\PHPUnit_Framework_TestCase\n{\n private $filename;\n\n publi...
php
chosen
[ { "from": "system", "value": "Create log dir if it doesn't exist\n" }, { "from": "human", "value": "<?php\n\nnamespace Sleeti\\Logging;\n\nclass Logger {\n\tprotected $container;\n\n\tprotected $handler;\n\n\tprotected $loggers;\n\n\tpublic function __construct($container) {\n\t\t$this->containe...
php
chosen
[ { "from": "human", "value": "[Messenger] Add a middleware that wraps all handlers in one Doctrine transaction.\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...
php
chosen
[ { "from": "human", "value": "Bring milestones/exceptions up-to-date with zf2/master\n\nMerge branch 'zf2/master' into milestones/exceptions\n\nConflicts:\n\tlibrary/Zend/Amf/Parser/TypeLoader.php\n\tlibrary/Zend/Amf/Server.php\n\tlibrary/Zend/Application/AbstractBootstrap.php\n\tlibrary/Zend/File/Transfer/A...
php
chosen
[ { "from": "human", "value": "Add test to cover new \\InvalidArgumentException being thrown.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Tests StreamIO.\n */\nnamespace PhpAmqpLib\\Tests\\Unit\\Wire\\IO;\n\nuse \\PhpAmqpLib\\Wire\\IO\\StreamIO;\n\nclass StreamIOTest extends \\PHPUnit_Framewor...
php
chosen
[ { "from": "human", "value": "Add php client storage driver\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Gos\\Bundle\\WebSocketBundle\\Client\\Driver;\n\n/**\n * @author Johann Saunier <johann_27@hotmail.fr>\n */\nclass InMemoryDriver implements DriverInterface\n{\n /**\n * @var arr...
php
chosen
[ { "from": "human", "value": "Add a subclass of CallablesFilter that also implements the DependencyExtractor interface.\n\nUseful for tests, among other things.\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Assetic package, an OpenSky project.\n *\n * (c) 2010-2013 Ope...
php
chosen
[ { "from": "human", "value": "Add Test case for AttachmentTest.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Zimbra\\Mail\\Tests\\Struct;\n\nuse Zimbra\\Mail\\Tests\\ZimbraMailTestCase;\nuse Zimbra\\Mail\\Struct\\AttachmentTest;\n\n/**\n * Testcase class for AttachmentTest.\n */\nclass Att...
php
chosen
[ { "from": "human", "value": "Remove \"last user imported\" setting.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass RemoveLastUserImportedSetting extends Migration {\n\n /**\n * Run the migra...
php
chosen
[ { "from": "human", "value": "chore(backend): Create command for testing websocket client.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: stas\n * Date: 29.05.16\n * Time: 21:22\n */\n\nnamespace WebsocketServerBundle\\Command;\n\nuse Symfony\\Bundle\\FrameworkBund...
php
chosen
[ { "from": "human", "value": "Add functional tests for public key endpoint.\n" }, { "from": "gpt", "value": "<?php\n\nuse Northstar\\Models\\User;\n\nclass KeyTest extends TestCase\n{\n /**\n * Test retrieving multiple users.\n * GET /users\n *\n * @return void\n */\n pu...
php
chosen
[ { "from": "human", "value": "Add the Google Calendar starter application.\n\n\ngit-svn-id: 6c6eb0d3cc6e8d5f6d3a0c71e6b3abc7e9845ff1@320 6c5fc399-1a2c-022f-82ce-feb0d0b4916c\n" }, { "from": "gpt", "value": "<?php\nrequire_once '../../src/apiClient.php';\nrequire_once '../../src/contrib/apiCalenda...
php
chosen
[ { "from": "human", "value": "Add set of RelationshipSerializer tests\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Huntie\\JsonApi\\Tests\\Serializers;\n\nuse Huntie\\JsonApi\\Serializers\\RelationshipSerializer;\nuse Huntie\\JsonApi\\Tests\\TestCase;\nuse Huntie\\JsonApi\\Tests\\Fixtures\...
php
chosen
[ { "from": "human", "value": "Add a bunch of traits to ZF2\n\nAs requested @\n\nhttps://github.com/protecinnovations/zf2-traits/issues/1\n\nThis is the initial commit to start getting traits into ZF2.\n\nWe need to move our tests over - which are currently using Mockery.\n" }, { "from": "gpt", "v...
php
chosen
[ { "from": "human", "value": "[ENH] search: Add a new value formatter to use timeago if enabled (otherwise uses datetime)\n\ngit-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@59270 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "gpt", "value": "<?php\n// (c) Copyright 2002-2016 by author...
php
chosen
[ { "from": "human", "value": "Create bubble model with external links." }, { "from": "gpt", "value": "<?php\n\nclass Bubble extends Eloquent {\n \n protected $guarded = ['id'];\n \n public function strip() {\n return $this->belongTo('Strip');\n }\n \n public function u...
php
chosen
[ { "from": "human", "value": "Fix copy and paste mistake\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 software and ...
php
chosen
[ { "from": "human", "value": "Migrate table Sizes - added column PriceCorrection\n" }, { "from": "gpt", "value": "<?php\n\nuse yii\\db\\Migration;\n\n/**\n * Handles adding PriceCorrection to table `sizes`.\n */\nclass m160615_155827_add_PriceCorrection_to_Sizes extends Migration\n{\n /**\n ...
php
chosen
[ { "from": "human", "value": "Implement app/console command to populate database\n\nCurrently only universities, will add-on anything else if required\n" }, { "from": "gpt", "value": "<?php\nnamespace AB\\Bundle\\Command;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand;\nu...
php
chosen
[ { "from": "human", "value": "Add sample User model class to illustrate find() functionality.\n" }, { "from": "gpt", "value": "<?php\n\n\tclass User extends Model\n\t{\n\t\tvar $_table_name = 'users';\n\t\tvar $_key_field = 'user_id';\n\t\tvar $_insert_timestamp_field = 'create_date';\n\t\tvar $_...
php
chosen
[ { "from": "human", "value": "Add migration for failed jobs table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateFailedJobsTable extends Migration\n{...
php
chosen
[ { "from": "human", "value": "Move files plugin to trunk folder\n\n" }, { "from": "gpt", "value": "<?php\n# -- BEGIN LICENSE BLOCK ----------------------------------\n# This file is part of Apercite, a plugin for Dotclear.\n# \n# Copyright (c) 2009 Francis Besset\n# francis.besset@free.fr\n# \n# ...
php
chosen
[ { "from": "human", "value": "Fix topic and forum covers\n\nNullables where they should be.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass NullablesOnForumCovers extends Migration\n{\n /**\n * R...
php
chosen
[ { "from": "human", "value": "Add tests for factory and model\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tooly\\Tests\\Factory;\n\nuse org\\bovigo\\vfs\\vfsStream;\nuse Tooly\\Factory\\ToolFactory;\nuse Tooly\\Model\\Tool;\n\n/**\n * @package Tooly\\Tests\\Factory\n */\nclass ToolFactory...
php
chosen
[ { "from": "human", "value": "Add Demo for new columns\n" }, { "from": "gpt", "value": "<?php\n\ndate_default_timezone_set('UTC');\ninclude 'init.php';\n\nclass ModelColor extends \\atk4\\data\\Model\n{\n\n public function init()\n {\n parent::init();\n\n $this->addField('name...
php
chosen
[ { "from": "human", "value": "Add PHPUnit test for Stripe_Object\n" }, { "from": "gpt", "value": "<?php\n\nclass Stripe_ObjectTest extends Stripe_TestCase\n{\n public function testArrayAccessorsSemantics()\n {\n $s = new Stripe_Object();\n $s['foo'] = 'a';\n $this->assertSame($s['foo']...
php
chosen
[ { "from": "human", "value": "Add tests with 100% coverage for Algorithm\\Bipartit" }, { "from": "gpt", "value": "<?php\n\nuse Fhaculty\\Graph\\Algorithm\\Bipartit as AlgorithmBipartit;\nuse Fhaculty\\Graph\\Graph;\n\nclass BipartitTest extends TestCase\n{\n public function testGraphEmpty()\n ...
php
chosen
[ { "from": "human", "value": "Fix foreign keys in tickets table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass TicketsFixPaymentgroup extends Migration {\n\n /**\n * Run the migrations.\n ...
php
chosen
[ { "from": "human", "value": "[tests] Add missing tests for SETNX.\n\nFor some obscure reason Predis/Command/StringSetPreserve had no tests.\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 ...
php
chosen
[ { "from": "human", "value": "Add form type to create association via dragging from one tree to another in tree view\n" }, { "from": "gpt", "value": "<?php\n\nnamespace CftfBundle\\Form\\Type;\n\nuse CftfBundle\\Entity\\LsAssociation;\nuse CftfBundle\\Entity\\LsDoc;\nuse Doctrine\\ORM\\EntityRepo...
php
chosen
[ { "from": "human", "value": "Add default id entity property trait\n\nAdd a new trait for ids\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Becklyn\\RadBundle\\Entity\\Extension;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n\n/**\n *\n */\ntrait EntityId\n{\n /**\n * @var int\n * @OR...
php
chosen
[ { "from": "human", "value": "Add view for pending request\n\n" }, { "from": "gpt", "value": "<?php //var_dump($rooms); ?>\n<style type=\"text/css\">\n\t/* Control Button */\n\t.control-btn {\n\t\tpadding: 10px;\n\t}\n</style>\n<section class=\"content rooms\">\n\t<div class=\"row\">\n\t\t<div cl...
php
chosen
[ { "from": "human", "value": "Add PHP script to display number of visits to a page.\n" }, { "from": "gpt", "value": "<?php\n $title = \"Visit Count\";\n $file = \"/tmp/ip-lab_2b_count\";\n\n $count = 1;\n\n if (!file_exists($file))\n {\n $handle = fopen($file, \"w\"); \n ...
php
chosen
[ { "from": "human", "value": "Add migration to add indexes to devices, samples and processes tables\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddDatet...
php
chosen
[ { "from": "human", "value": "Add Composer class to update package(s)" }, { "from": "gpt", "value": "<?php\n\nnamespace Bolt\\Composer\\Action;\n\nuse Composer\\Installer;\n\nclass UpdatePackage\n{\n /**\n * @param $io Composer\\IO\\BufferIO\n * @param $composer Composer\\Compose...
php
chosen
[ { "from": "human", "value": "Add basic tests for Delivery\n" }, { "from": "gpt", "value": "<?php\n\nnamespace RoyallTheFourth\\QuickList\\Tests;\n\nuse PHPUnit\\Framework\\TestCase;\nuse RoyallTheFourth\\QuickList\\Delivery;\n\nclass DeliveryTest extends TestCase\n{\n public function testUnsu...
php
chosen
[ { "from": "human", "value": "Add a core command `php lucidframe secret:generate [--options]` to generate a secret key\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of the PHPLucidFrame library.\n * The script executes the command `php lucidframe secret:generate`\n *\n * @pack...
php
chosen
[ { "from": "human", "value": "Revert \"Error testing file is no longer needed\"\n\nThis reverts commit 8928ee23d58ec5ac2993e8a8ea5ac66866706482.\n" }, { "from": "gpt", "value": "<?php\n\t/**\n\tAGORA - an interactive and web-based argument mapping tool that stimulates reasoning, \n\t\t\treflectio...
php
chosen
[ { "from": "human", "value": "Add tests for Basics. Incomplete.\n" }, { "from": "gpt", "value": "<?php\n\nclass BasicsTest extends \\PHPUnit_Framework_TestCase\n{\n public function testIdentity()\n {\n $x = 42;\n $this->assertTrue(\n $x === Basics::id($x),\n 'Identit...
php
chosen
[ { "from": "human", "value": "Add unit test for Utils module\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * Unit test for LuminousUtils module (class)\n */\n\n\ninclude dirname(__FILE__) . '/helper.inc';\n\nfunction test_balance() {\n // balanced delimiters:\n // most character when used as a...
php
chosen
[ { "from": "human", "value": "TASK: Add tests for the ArrayFromObject converter\n" }, { "from": "gpt", "value": "<?php\nnamespace TYPO3\\Flow\\Tests\\Unit\\Property\\TypeConverter;\n\n/*\n * This file is part of the TYPO3.Flow package.\n *\n * (c) Contributors of the Neos Project - www.neos.io\n ...
php
chosen
[ { "from": "human", "value": "Add application:override:config to replace an applications .cliconfig.json file with an external file\n" }, { "from": "gpt", "value": "<?php\n\nnamespace vierbergenlars\\CliCentral\\Command\\Application;\n\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symf...
php
chosen
[ { "from": "human", "value": "Set up first test for child process adapter\n" }, { "from": "gpt", "value": "<?php\n\nnamespace React\\Tests\\Filesystem\\ChildProcess;\n\nuse React\\Filesystem\\ChildProcess\\Adapter;\nuse React\\Tests\\Filesystem\\TestCase;\n\n/**\n * @requires extension eio\n */\n...
php
chosen
[ { "from": "human", "value": "Add missing 404 error page\n" }, { "from": "gpt", "value": "@extends('template')\n\n@section('headers')\n<style>\n .error-template {\n padding: 40px 15px;text-align: center;\n }\n .error-actions {\n margin-top:15px;margin-bottom:15px;\n }\n ...
php
chosen
[ { "from": "human", "value": "Add the annotator UI library\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tsugi\\UI;\n\nuse \\Tsugi\\Util\\U;\n\n/**\n * Our class to handle annotation markup\n */\nclass Annotate {\n\n /**\n * Provide the header material to support annotations\n */...
php
chosen
[ { "from": "human", "value": "Add log file to store logs into custom log files\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tools\\Utility;\n\nuse Cake\\Log\\Log as CoreLog;\n\n/**\n * Wrapper class to log data into custom file(s).\n */\nclass Log\n{\n /**\n * Debug configuration.\n...
php
chosen
[ { "from": "human", "value": "Add an interface for test event observers\n" }, { "from": "gpt", "value": "<?php\nnamespace pyd\\testkit\\interfaces;\n\n/**\n * Interface for class that observes the test events.\n * \n * @author Pierre-Yves DELETTRE <pierre.yves.delettre@gmail.com>\n */\ninterface ...
php
chosen
[ { "from": "human", "value": "Add test for new command create-webuser\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\AppBundle\\Command;\n\nuse AppBundle\\Command\\CreateWebuserCommand;\nuse Symfony\\Bundle\\FrameworkBundle\\Console\\Application;\nuse Symfony\\Bundle\\FrameworkBundle\...
php
chosen
[ { "from": "human", "value": "Add index to oc_cards to assist with searching large number of rows\n" }, { "from": "gpt", "value": "<?php\nnamespace OCA\\dav\\Migrations;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\nuse OCP\\Migration\\ISchemaMigration;\n\n/**\n * Add index to oc_cards to assist with s...
php
chosen
[ { "from": "human", "value": "Implement PHP iterator based on the ZSCAN command (Redis 2.8).\n\nThis iterator allows to perform full iterations over the members of a sorted\nset by wrapping the incremental nature of ZSCAN just like we did for SCAN:\n\n $client = new Predis\\Client('tcp://127.0.0.1', ['profi...
php
chosen
[ { "from": "human", "value": "Add loggingclient for better debugging\n" }, { "from": "gpt", "value": "<?php\nnamespace CouchDB\\Http;\n\nuse CouchDB\\Logging\\LoggingInterface;\n\n/**\n * @author Markus Bachmann <markus.bachmann@bachi.biz>\n */\nclass LoggingClient implements ClientInterface\n{\n...
php
chosen
[ { "from": "human", "value": "Add a ControllerDispatcher unit test\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Core\\ControllerDispatcher;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Prob\\Handler\\Proc\\ClosureProc;\nuse Prob\\Handler\\Proc\\FunctionProc;\nuse Prob\\Router\\Map;\nuse Zend\...
php
chosen
[ { "from": "human", "value": "Add a demo BrowserKit Test\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Wnx\\LaravelStats\\Tests\\Stubs\\Tests;\n\nuse Laravel\\BrowserKitTesting\\TestCase;\n\nclass DemoBrowserKit extends TestCase\n{\n public function createApplication()\n {\n //...
php
chosen
[ { "from": "human", "value": "[TASK] Add unit tests for SecurityHelper\n\nReleases: master\n" }, { "from": "gpt", "value": "<?php\nnamespace TYPO3\\Eel\\Tests\\Unit;\n\n/* *\n * This script belongs to the Flow package \"TYPO3....
php
chosen
[ { "from": "human", "value": "Add API fir check permissions\n" }, { "from": "gpt", "value": "<?php\n\nnamespace RcmAdmin\\Controller;\n\nuse Rcm\\Http\\Response;\nuse Rcm\\View\\Model\\ApiJsonModel;\nuse RcmUser\\Provider\\RcmUserAclResourceProvider;\n\n/**\n * Class ApiAdminCheckPermisionsContro...
php
chosen
[ { "from": "human", "value": "Test single use resource queue.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Orbt\\StyleMirror\\Tests\\Resource;\n\nuse Orbt\\StyleMirror\\Resource\\SingleUseQueue;\nuse Orbt\\ResourceMirror\\Resource\\GenericResource;\n\nclass SingleUseQueueTest extends \\PHP...
php
chosen
[ { "from": "human", "value": "Add StudentTicket manage permission to EAS\n" }, { "from": "gpt", "value": "<?php\n\nuse App\\Permission;\nuse App\\Role;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddStudentTicketManagePermissionToEas extends Migration\n{\n /**\n * Run the mi...
php
chosen
[ { "from": "human", "value": "Check if User logins created\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Closure;\nuse Illuminate\\Support\\Facades\\Auth;\nuse App\\models\\VRRoles;\nuse App\\models\\VRUsers;\n\nclass CheckIfMember\n{\n /**\n * Handle an...
php
chosen
[ { "from": "human", "value": "Load class para carregamento de views e models\n" }, { "from": "gpt", "value": "<?php\n\tclass Load{\n\t\tprivate $config;\n\n\t\tpublic function __construct() {\n\t\t\t$this->config = new Config;\n\t\t}\n\n\t\tpublic function view($name,array $vars = array()){\n\t\t...
php
chosen
[ { "from": "human", "value": "Add event stream meta data enricher implementation to add contextual info to events\n" }, { "from": "gpt", "value": "<?php\n/**\n * @file\n */\n\nnamespace CultuurNet\\UDB3\\EventSourcing;\n\n\nuse Broadway\\Domain\\DomainMessageInterface;\nuse Broadway\\Domain\\Meta...
php
chosen
[ { "from": "human", "value": "Add Site controller who control the front view of the site\n" }, { "from": "gpt", "value": "<?php\n/**\n * SiteController.php\n *\n * File to display pages\n *\n * PHP 7.0.10\n *\n * @category Controller\n * @author isma91 <ismaydogmus@gmail.com>\n * @license http...
php
chosen
[ { "from": "human", "value": "Create store info template part." }, { "from": "gpt", "value": "<div class=\"row store-info\">\n\t<?php if ( is_single() ) : ?>\n\t<div class=\"small-12 large-4 columns\">\n\t\t<?php the_post_thumbnail( 'store-image', array( 'class' => 'th' ) ); ?>\n\t</div>\n\t<div ...
php
chosen
[ { "from": "human", "value": "Add test to verify previous change\n" }, { "from": "gpt", "value": "<?php\n\nnamespace SimplyTestable\\ApiBundle\\Tests\\Services\\Job\\WebsiteResolution;\n\nuse SimplyTestable\\ApiBundle\\Tests\\BaseSimplyTestableTestCase;\n\nclass TooManyRedirectsTest extends BaseS...
php
chosen
[ { "from": "human", "value": "Add object for dismissing the message.\n" }, { "from": "gpt", "value": "<?php\n\n\n/**\n * A class to dismiss messages\n */\nfinal class Whip_WPMessageDismisser {\n\n\t/**\n\t * Returns the value of the whip_dismissed option.\n\t *\n\t * @return mixed\n\t */\n\tpubli...
php
chosen
[ { "from": "human", "value": "Add Customer Opening Balance Model" }, { "from": "gpt", "value": "<?php\n/**\n * SageOne Library\n *\n * @category Library\n * @package SageOne\n * @author Igor Sergiichuk <igorsergiichuk@gmail.com>\n * @license MIT <https://github.com/darrynten/sage-one-php/blob...
php
chosen
[ { "from": "human", "value": "Add pgsql boolean value tests\n" }, { "from": "gpt", "value": "<?php\nrequire 'vendor/autoload.php';\nuse CLIFramework\\Component\\Table\\Table;\n\n$dbh = new PDO('pgsql:host=localhost;dbname=testing', 'postgres');\n// $dbh->query('create table authors (confirmed BOO...
php
chosen
[ { "from": "human", "value": "Add additional sample provider for test suite\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Benrowe\\Formatter\\Test\\Examples;\n\nuse Benrowe\\Formatter\\AbstractFormatterProvider;\n\nclass NumberSampleProvider extends AbstractFormatterProvider\n{\n public ...
php
chosen
[ { "from": "human", "value": "test: Add tests for new class Call\n" }, { "from": "gpt", "value": "<?php\nnamespace nochso\\WriteMe\\Test\\Placeholder;\n\nuse nochso\\WriteMe\\Document;\nuse nochso\\WriteMe\\Placeholder\\Call;\n\nclass CallTest extends \\PHPUnit_Framework_TestCase\n{\n public f...
php
chosen