conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add ShortDate element for MM YYYY dates that don't require the precise date.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * A Short Date Element\n * Just the month and year\n * @author Jon Johnson <jon.johnson@ucsf.edu>f\n * @package foundation\n * @subpackage forms... | php | chosen |
[
{
"from": "system",
"value": "[Les400Culs] Use internal RSS 2.0 parser\n"
},
{
"from": "human",
"value": "<?php\nclass Les400CulsBridge extends FeedExpander{\n\n\tconst MAINTAINER = \"unknown\";\n\tconst NAME = \"Les 400 Culs\";\n\tconst URI = \"http://sexes.blogs.liberation.fr/\";\n\tconst DESC... | php | chosen |
[
{
"from": "human",
"value": "Add detector for tabs in RST files\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\n/**\n * This file is part of CodeIgniter 4 framework.\n *\n * (c) CodeIgniter Foundation <admin@codeigniter.com>\n *\n * For the full copyright and license inform... | php | chosen |
[
{
"from": "human",
"value": "Prepare migration for settings table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateSettingsTable extends Migration\n{\... | php | chosen |
[
{
"from": "human",
"value": "Add Array utility library, currently containing only two methods.\n"
},
{
"from": "gpt",
"value": "<?php\n\n\tclass ArrayUtils\n\t{\n\t\tstatic public function fromSingleton($input)\n\t\t{\n\t\t\tif(!is_array($input)) {\n\t\t\t\t$input = array($input);\n\t\t\t}\n\t\t... | php | chosen |
[
{
"from": "human",
"value": "Add shell to update existing password hashes\n"
},
{
"from": "gpt",
"value": "<?php\n\nApp::import('Security', 'Utility');\n\nclass UpdatePasswordVersionShell extends AppShell {\n\n public $uses = array('User');\n\n public function main() {\n echo \"Upda... | php | chosen |
[
{
"from": "human",
"value": "Add tests for requestId property\n"
},
{
"from": "gpt",
"value": "<?php\n\n\nnamespace Hitmeister\\Component\\Api\\Tests\\Exceptions;\n\nuse Hitmeister\\Component\\Api\\Exceptions\\TransportException;\n\nclass TransportExceptionTest extends \\PHPUnit_Framework_TestCa... | php | chosen |
[
{
"from": "human",
"value": "Add view user images tests\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tests\\Feature;\n\nuse Tests\\IntegrationTestCase;\nuse Illuminate\\Http\\UploadedFile;\nuse Illuminate\\Support\\Facades\\Storage;\nuse Illuminate\\Foundation\\Testing\\DatabaseMigrations... | php | chosen |
[
{
"from": "system",
"value": "[Freenews] Use internal RSS 2.0 parser\n"
},
{
"from": "human",
"value": "<?php\ndefine(\"FREENEWS_RSS\", 'http://feeds.feedburner.com/Freenews-Freebox?format=xml');\nclass FreenewsBridge extends FeedExpander {\n\n\tconst MAINTAINER = \"mitsukarenai\";\n\tconst NAME... | php | chosen |
[
{
"from": "human",
"value": "Test the extended origin check functionality\n"
},
{
"from": "gpt",
"value": "<?php declare(strict_types=1);\n\nnamespace Gos\\Bundle\\WebSocketBundle\\Tests\\Server\\App\\Stack;\n\nuse Gos\\Bundle\\WebSocketBundle\\Server\\App\\Stack\\OriginCheck;\nuse PHPUnit\\Fram... | php | chosen |
[
{
"from": "human",
"value": "[RPC] Add a test case for the RpcServerProcessor\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Swarrot\\Processor\\RPC;\n\nuse Prophecy\\Argument;\nuse Prophecy\\PhpUnit\\ProphecyTestCase;\nuse Swarrot\\Broker\\Message;\n\nclass RpcServerProcessorTest extends P... | php | chosen |
[
{
"from": "human",
"value": "Add plugin to detect non boolean value in if() clause\n"
},
{
"from": "gpt",
"value": "<?php declare(strict_types=1);\n# .phan/plugins/NonBoolBranchPlugin.php\n\nuse Phan\\AST\\AnalysisVisitor;\nuse Phan\\CodeBase;\nuse Phan\\Language\\Context;\nuse Phan\\Language\\U... | php | chosen |
[
{
"from": "human",
"value": "Add repository for edit user usecase\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @license MIT\n * Full license text in LICENSE file\n */\n\nnamespace Eadrax\\Core\\Usecase\\User\\Edit;\nuse Eadrax\\Core\\Data;\n\ninterface Repository\n{\n public function edit_... | php | chosen |
[
{
"from": "human",
"value": "Add the status 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 fixture for failing test\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)\n * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)\n *\n * Licensed under The MIT License\n * For ful... | php | chosen |
[
{
"from": "human",
"value": "Test page to experiemnt with Bing's test tag\n"
},
{
"from": "gpt",
"value": "<!-- test_page_2.php -->\n\n<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <title>Generic Test Page 1</title>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=... | php | chosen |
[
{
"from": "human",
"value": "Add default listener for 'http.web.displayPage' event\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Rbs\\Website\\Events;\n\nuse Change\\Documents\\AbstractDocument;\nuse Change\\Documents\\Events\\Event;\nuse Change\\Documents\\Interfaces\\Publishable;\nuse Chan... | php | chosen |
[
{
"from": "human",
"value": "Test the connect response packet\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace BinSoul\\Test\\Net\\Mqtt\\Packet;\n\nuse BinSoul\\Net\\Mqtt\\Packet\\ConnectResponsePacket;\nuse BinSoul\\Net\\Mqtt\\PacketStream;\nuse PHPUnit\\Framework... | php | chosen |
[
{
"from": "human",
"value": "Make the example suite self-testing using omikron\n"
},
{
"from": "gpt",
"value": "<?php\n\nassert_options(ASSERT_WARNING, 0);\nassert_options(ASSERT_CALLBACK, 'assertCallback');\n\nreturn within('lambdalicious',\n describe('example',\n it('serves as a test... | php | chosen |
[
{
"from": "human",
"value": "OK-112: Configure repository\n- added stub test\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Okvpn\\Bundle\\RedisQueueBundle\\Test\\Transport\\Redis;\n\nuse Okvpn\\Bundle\\RedisQueueBundle\\Transport\\Redis\\RedisKey;\n\nclass RedisKeyTest extends \\PHPUnit_Fr... | php | chosen |
[
{
"from": "human",
"value": "Add stochastic gradient descent test.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace mcordingley\\Regression\\Tests;\n\nuse mcordingley\\Regression\\Algorithm\\GradientDescent\\Stochastic;\nuse mcordingley\\Regression\\Algorithm\\GradientDescent\\Schedule\\Adagr... | php | chosen |
[
{
"from": "human",
"value": "Create test for Message class\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace FullyBaked\\Pslackr\\Messages;\n\nuse PHPUnit_Framework_TestCase;\nuse Exception;\n\nclass MessageTest extends PHPUnit_Framework_TestCase\n{\n public function testAsJson()\n {\n ... | php | chosen |
[
{
"from": "human",
"value": "COM-264: Create configuration for Edit and Delete\n- updated tests"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Oro\\Bundle\\ActionBundle\\Tests\\Unit\\Handler;\n\nuse Oro\\Bundle\\ActionBundle\\Handler\\DeleteHandler;\n\nuse Oro\\Bundle\\EntityBundle\\ORM\\Doct... | php | chosen |
[
{
"from": "human",
"value": "Create tests for Login command\n"
},
{
"from": "gpt",
"value": "<?php\r\n\r\nnamespace AdobeConnectClient\\Tests\\Commands;\r\n\r\nuse AdobeConnectClient\\Commands\\Login;\r\n\r\nclass LoginTest extends TestCommandBase\r\n{\r\n /**\r\n * return string\r\n ... | php | chosen |
[
{
"from": "human",
"value": "Solve Average 2 in php\n"
},
{
"from": "gpt",
"value": "<?php\n$a = (float)trim(fgets(STDIN));\n$b = (float)trim(fgets(STDIN));\n$c = (float)trim(fgets(STDIN));\n$average = ($a * 2.0 + $b * 3.0 + $c * 5.0) / 10.0;\n\necho \"MEDIA = \" . number_format($average, 1, '.'... | php | chosen |
[
{
"from": "human",
"value": "Add revoke filter -> it should be attach to all controller or bootstrap\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace fproject\\authclient;\n\nuse Yii;\nuse yii\\base\\ActionFilter;\n\nclass RevokeFilter extends ActionFilter\n{\n /**\n * @inheritdoc\n ... | php | chosen |
[
{
"from": "human",
"value": "Create class to analyse the locale\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Backend\\Modules\\Locale\\Engine;\n\nfinal class LocaleAnalyser\n{\n /** @var string */\n private $application;\n\n /** @var string */\n private $modulesPath;\n\n /*... | php | chosen |
[
{
"from": "human",
"value": "Add inlist assert to input validation.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * InList Assert\n *\n * @author Tom Valk <tomvalk@lt-box.info>\n * @copyright 2016 Tom Valk\n */\n\nnamespace Arvici\\Heart\\Input\\Validation\\Assert;\n\nuse Arvici\\Exception\... | php | chosen |
[
{
"from": "system",
"value": "BB-4270: Call nonexistent method in layout expression\n- add exception to deteprovider decorator\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Oro\\Component\\Layout;\n\n/**\n * The data provider decorator that allows calls methods with pre-defined prefix\n ... | php | chosen |
[
{
"from": "human",
"value": "Add example of replication configuration using redis-sentinel.\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Predis package.\n *\n * (c) Daniele Alessandri <suppakilla@gmail.com>\n *\n * For the full copyright and license information, plea... | php | chosen |
[
{
"from": "system",
"value": "Update Language helper test case\n"
},
{
"from": "human",
"value": "<?php\n\nclass Language_helper_test extends CI_TestCase {\n\n\tpublic function test_lang()\n\t{\n\t\t$this->helper('language');\n\t\t$lang = $this->getMock('CI_Lang', array('line'));\n\t\t$lang->exp... | php | chosen |
[
{
"from": "human",
"value": "Store deleted messages and keep track of edited count\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass UpdateMessageAddExtraDat... | php | chosen |
[
{
"from": "human",
"value": "Add PHPUnit test for Stripe_Error\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass Stripe_ErrorTest extends Stripe_TestCase\n{\n public function testCreation()\n {\n try {\n throw new Stripe_Error(\n \"hello\",\n 500,\n \"{'foo':'b... | php | chosen |
[
{
"from": "human",
"value": "Add test trait to check for user permissions\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tests\\Concerns;\n\nuse App\\Models\\User;\nuse Illuminate\\Support\\Facades\\Auth;\n\ntrait InteractsWithPermissions\n{\n public function assertUserCan(User $user, st... | php | chosen |
[
{
"from": "human",
"value": "Add the template for displaying post navigation controls.\n"
},
{
"from": "gpt",
"value": "<?php if ( !defined( 'HABARI_PATH' ) ) { die('No direct access'); } ?>\n<div class=\"post-nav\">\n\t<?php \n\t\n\t\tif ( $previous = $post->descend() ) {\n\t\t\t?>\n\t\t\t\n\t\... | php | chosen |
[
{
"from": "human",
"value": "Add mock Requests transport transport.\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass Mock_Requests_Transport implements Requests_Transport {\n\tpublic $requests = array();\n\n\tpublic function request( $url, $headers = array(), $data = array(), $options = array() )... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for try rule\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace MS\\PHPMD\\Tests\\Unit\\CleanCode;\n\nuse MS\\PHPMD\\Rule\\CleanCode\\MethodOneTryCatch;\nuse MS\\PHPMD\\Tests\\Unit\\AbstractApplyTest;\n\n/**\n * Class MethodOneTryCatchTest\n *\n * @pac... | php | chosen |
[
{
"from": "human",
"value": "Task: Add simple command to test the sentry client\n\n./flow sentry:test\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Networkteam\\SentryClient\\Command;\n\nuse Neos\\Flow\\Annotations as Flow;\nuse Neos\\Flow\\Cli\\CommandController;\n\nclass SentryCommandContr... | php | chosen |
[
{
"from": "human",
"value": "Add test for formatted_amount attribute of spendings\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\\Spending;... | php | chosen |
[
{
"from": "human",
"value": "Add example to obtain available fields of a list\n\nThis feels like a workaround\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Show all available columns in this list\n */\nrequire_once '../../vendor/autoload.php';\n$settings = include('../../../tests/Settings.php'... | php | chosen |
[
{
"from": "human",
"value": "Set format by Accept header\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Netlogix\\JsonApiOrg\\Http\\Request;\n\n/*\n * This file is part of the Netlogix.JsonApiOrg package.\n *\n * This package is Open Source Software. For the full copyright and license\n * inf... | php | chosen |
[
{
"from": "human",
"value": "test: Add a test for lastInsertId.\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * This file is part of CodeIgniter 4 framework.\n *\n * (c) CodeIgniter Foundation <admin@codeigniter.com>\n *\n * For the full copyright and license information, please view\n * the L... | php | chosen |
[
{
"from": "human",
"value": "Add TYPO3 Surf Task which rsync config files from $sharedPath/Configuration/ to $currentReleasePath/config/.\nThis task does not overwrite existing files\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @author Christoph Bessei\n */\n\nnamespace BIT\\TYPO3\\Install\\T... | php | chosen |
[
{
"from": "human",
"value": "Add unit tests for LocalizedDate.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse VotingApp\\LocalizedDate;\n\nclass LocalizedDateTest extends TestCase\n{\n\n /**\n * Verify that US-style MM/DD/YYYY dates can be parsed.\n * @test\n */\n public functio... | php | chosen |
[
{
"from": "human",
"value": "Test the basics of QueueManager\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Hodor\\JobQueue;\n\nuse PHPUnit_Framework_TestCase;\n\n/**\n * @coversDefaultClass Hodor\\JobQueue\\QueueManager\n */\nclass QueueManagerTest extends PHPUnit_Framework_TestCase\n{\n ... | php | chosen |
[
{
"from": "human",
"value": "Add test for Application class (others to come :))\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass ApplicationTest extends PHPUnit_Framework_TestCase\n{\n public function testName()\n {\n $application = new Silexor\\Application();\n\n $this->asser... | php | chosen |
[
{
"from": "human",
"value": "Implement trivial case for JsonIterator\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * @author Etienne Lamoureux <etienne.lamoureux@crystalgorithm.com>\n * @copyright 2014 Etienne Lamoureux\n * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause\n */\... | php | chosen |
[
{
"from": "human",
"value": "Extend the controller to provide HTTP method and template parsing\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Robin\\AddressBookBundle\\Controller;\n\nclass Controller extends \\Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller\n{\n /**\n * Make... | php | chosen |
[
{
"from": "human",
"value": "Move fetchModels helper to trait\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace DevGroup\\AdminUtils\\traits;\n\n\nuse yii\\db\\ActiveRecord;\n\ntrait FetchModels\n{\n /**\n * Workaround to have ability use Model::load() method instead assigning values fr... | php | chosen |
[
{
"from": "system",
"value": "Add extra validation for vote creation.\n"
},
{
"from": "human",
"value": "<?php\n$question = trim($_REQUEST['question']);\nif($_REQUEST['action'] == 'Preview Vote')\n{\n\t$container = create_container('skeleton.php','vote_create.php');\n\t$container['PreviewVote'] ... | php | chosen |
[
{
"from": "human",
"value": "Create table for holding the pairing calculations\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreatePairingTable extends M... | php | chosen |
[
{
"from": "human",
"value": "Add outputable trait with toJson method\n"
},
{
"from": "gpt",
"value": "<?php\n\tnamespace Bolt\\Traits;\n\n\ttrait Outputable\n\t{\n\t\tpublic function toJson()\n\t\t{\n\t\t\t$results = null;\n\t\t\t$properties = $this->getProperties();\n\n\t\t\tforeach ($propertie... | php | chosen |
[
{
"from": "human",
"value": "Add behat test configuration for output converters\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * This file is part of the Imbo package\n *\n * (c) Christer Edvartsen <cogo@starzinger.net>\n *\n * For the full copyright and license information, please view the LICEN... | php | chosen |
[
{
"from": "human",
"value": "Add tax ID validator interface\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Active Collab Payments project.\n *\n * (c) A51 doo <info@activecollab.com>. All rights reserved.\n */\n\ndeclare(strict_types=1);\n\nnamespace ActiveCollab\\Paym... | php | chosen |
[
{
"from": "system",
"value": "[Tests] Use Zend_Autoloader when Composer's autoloader is not present.\n\nNote: If your tests are failing after this patch probably you need to do \"php composer.phat update\" to update Composer's autoloader with the new lists of namespaces\n"
},
{
"from": "human",
... | php | chosen |
[
{
"from": "human",
"value": "Create (feature) test for tags\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tests\\Feature;\n\nuse App\\User;\nuse App\\Space;\nuse App\\Tag;\nuse Tests\\TestCase;\nuse Illuminate\\Foundation\\Testing\\WithFaker;\nuse Illuminate\\Foundation\\Testing\\RefreshDa... | php | chosen |
[
{
"from": "human",
"value": "Create test for Helper class\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tests\\Unit;\n\nuse App\\Helper;\nuse PHPUnit\\Framework\\TestCase;\n\nclass HelperTest extends TestCase\n{\n public function testRawNumberConversion(): void\n {\n $cases = ... | php | chosen |
[
{
"from": "human",
"value": "Add migration for jobs tables in the database\n\nThis creates the schema for a jobs table.\nTo be used for storing jobs that will be executed asynchronously.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m151016_0000... | php | chosen |
[
{
"from": "system",
"value": "Change fluent to eloquent to fix timestamps\n"
},
{
"from": "human",
"value": "<?php\n/**\n* Copyright (C) 2014 Ibrahim Yusuf <ibrahim7usuf@gmail.com>.\n*\n* This program is free software: you can redistribute it and/or modify\n* it under the terms of the G... | php | chosen |
[
{
"from": "human",
"value": "Add vendor class to automatically manage vendor\n"
},
{
"from": "gpt",
"value": "<?php\n\n /**\n * Vendor Class\n *\n * Manage vendor and can automatically detect vendor.\n *\n * @package Core\n */\n class Vendor\n {\n public f... | php | chosen |
[
{
"from": "human",
"value": "Insert Turkish lira into currencies table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass InsertTurkishLiraIntoCurrenciesTable... | php | chosen |
[
{
"from": "human",
"value": "Add StatusNet Phergie plugin to pass messages received to IM architecture\n"
},
{
"from": "gpt",
"value": "<?php\r\n/**\r\n * StatusNet - the distributed open-source microblogging tool\r\n *\r\n * This program is free software: you can redistribute it and/or modify\r... | php | chosen |
[
{
"from": "human",
"value": "Add skeleton for PrettyPage handler template\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n* Template file for DamnIt's pretty error output.\n* Check the $v global variable (stdClass) for what's available\n* to work with.\n* @var $v\n*/\n?>\n<!DOCTYPE html>\n<html>\n ... | php | chosen |
[
{
"from": "human",
"value": "Add \"count\" command as example command\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace PhpSlackBot\\Command;\n\nclass CountCommand extends BaseCommand {\n\n private $count = 0;\n\n protected function configure() {\n $this->setName('count');\n }\n\... | php | chosen |
[
{
"from": "human",
"value": "Add eloquent tenant resolver implementation\n"
},
{
"from": "gpt",
"value": "<?php namespace Phonebook\\Resolvers; \n\nclass EloquentTenantResolver implements TenantResolver {\n\n protected $tenant;\n\n protected $config;\n\n public function __construct(Rep... | php | chosen |
[
{
"from": "human",
"value": "Add example page for link 4\n"
},
{
"from": "gpt",
"value": "<?php \n$currentPage = \"link_4\";\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 sort 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 sort Mimic library function.\n *\n * @since 0.1.0\n */\nclass SortFuncTest extends ... | php | chosen |
[
{
"from": "human",
"value": "Add test of Pages class\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Clx\\Xms\\Api as XA;\n\nclass PagesTest extends PHPUnit\\Framework\\TestCase\n{\n\n public function testIterationOverPages()\n {\n $results = [\n [\"element0\", \"element1\"... | php | chosen |
[
{
"from": "human",
"value": "Enable mount action from panel\n\n* Account can mount his archive backup\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once(\"../class/config.php\");\n\n$fields = array (\n \"name\" => array (\"request\", \"string\", \"\"),\n);\ngetFields($fields);\n\nif (!emp... | php | chosen |
[
{
"from": "human",
"value": "Add base table migration class\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Chromabits\\Illuminated\\Database\\Migrations;\n\nuse Exception;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\n/**\n * Class TableMigration\n *\n * A base migration for migrations t... | php | chosen |
[
{
"from": "human",
"value": "Test the cleanup of old sessions\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Frontend\\Modules\\Profiles\\Tests\\Engine;\n\nuse Common\\WebTestCase;\nuse DateTime;\nuse Frontend\\Core\\Engine\\Model as FrontendModel;\nuse Frontend\\Modules\\Profiles\\Engine\\... | php | chosen |
[
{
"from": "human",
"value": "Add a class to support Optimizely X\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace GrowthOptimized\\OAuth2\\Client\\Provider;\n\n/**\n * Class OptimizelyX\n * @package GrowthOptimized\\OAuth2\\Client\\Provider\n */\nclass OptimizelyX extends Optimizely\n{\n /... | php | chosen |
[
{
"from": "system",
"value": "Resolve inconsistent return statements in phpDoc\n"
},
{
"from": "human",
"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) 200... | php | chosen |
[
{
"from": "human",
"value": "Add test for data transformer\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Fsv\\TypographyBundle\\Tests\\Form\\Extension;\n\nuse Fsv\\TypographyBundle\\Form\\DataTransformer\\TypographyTransformer;\nuse Symfony\\Component\\Form\\Test\\TypeTestCase;\n\nclass Typo... | php | chosen |
[
{
"from": "human",
"value": "Add back alias for moved class\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * @package Grav\\Common\\Twig\n *\n * @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.\n * @license MIT License; see LICENSE file for details.\n */\n\nna... | php | chosen |
[
{
"from": "human",
"value": "Update Fri Feb 5 11:51:56 CET 2016\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Nitrapi\\Services\\Gameservers\\Games;\n\nclass TS3Musicbot extends Game\n{\n protected $game = \"ts3musicbot\";\n\n /**\n * Reinstalls the TS3Musicbot\n *\n * @... | php | chosen |
[
{
"from": "human",
"value": "Add singleton DB connection class to repo.\n"
},
{
"from": "gpt",
"value": "<?php\n\n//*****************************************************************\n//\tDatabase Configuration\n//*****************************************************************\n\ndefine('HOST',... | php | chosen |
[
{
"from": "human",
"value": "Add initial search class for the frontend.\n\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Search class for frontend users to search for events.\n * \n * \n * @package UNL_UCBCN_Frontend\n * @author Brett Bieber\n */\n\nrequire_once 'UNL/UCBCN/Frontend.php';\n\ncla... | php | chosen |
[
{
"from": "system",
"value": "Fix many to many polymorphic pivot updates\n\n`$morphType ` set by `setMorphType` is being included in queries from x->pivot->save() and the like. As the object is being added as a public data member on an object with an empty original, it is treated as an attribute and added a... | php | chosen |
[
{
"from": "human",
"value": "Add a naive PHP implementation first\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * A naive brainfuck interpreter in PHP\n *\n * @author Reeze Xia <reeze@php.net>\n */\n\n$buffer = \"\";\n$pos = 0;\n\n$code = \"++++++++++[>+++++++>++++++++++>+++>+<<<<-]\n >... | php | chosen |
[
{
"from": "human",
"value": "Add couple of functions as helpers\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse carlosV2\\Communism\\Communist;\nuse carlosV2\\Communism\\ExtractorInterface;\nuse carlosV2\\Communism\\InjectorInterface;\n\nif (!function_exists('From')) {\n /**\n * @param obje... | php | chosen |
[
{
"from": "human",
"value": "Add tests for tag formatter\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace KawaiiGherkinTest\\Formatter;\n\nuse KawaiiGherkin\\Formatter\\Tags;\n\nfinal class TagsTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @var Tags\n */\n private $form... | php | chosen |
[
{
"from": "human",
"value": "Add tests for API key routes & authorization.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Northstar\\Models\\ApiKey;\n\nclass ApiKeyTest extends TestCase\n{\n protected $adminScope;\n\n protected $userScope;\n\n public function setUp()\n {\n pare... | php | chosen |
[
{
"from": "system",
"value": "Add note about array syntax"
},
{
"from": "human",
"value": "<?php\n\n/**\n * Autoloaded file to handle deprecation such as class aliases.\n */\n\n// Class aliases for BC\nclass_alias('\\Bolt\\Asset\\Target', '\\Bolt\\Extensions\\Snippets\\Location');\nclass_alias('... | php | chosen |
[
{
"from": "human",
"value": "Add integration test to check all routes\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Punkstar\\RugbyFeedTest\\Calendar;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Punkstar\\RugbyFeed\\DataManager;\nuse Punkstar\\RugbyFeedService\\App;\nuse Symfony\\Component\\... | php | chosen |
[
{
"from": "human",
"value": "Add script to pre-approve all email addresses for users, and commenters who's comments are not spam or rejected\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Approve email addresses for users and non spam, non rejected comments.\n */\n\nif(php_sapi_name() !== 'cli'... | php | chosen |
[
{
"from": "human",
"value": "Add couple tests for factories loader\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace spec\\Laracasts\\TestDummy;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse Laracasts\\TestDummy\\TestDummyException;\n\nclass FactoriesLoaderSpec extends ObjectBe... | php | chosen |
[
{
"from": "human",
"value": "[COM_STOREFRONT] Fix case where storefront_collections ID isn't auto increment\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Hubzero\\Content\\Migration\\Base;\n\n// No direct access\ndefined('_HZEXEC_') or die();\n\n/**\n * Migration script to turn collections ID in... | php | chosen |
[
{
"from": "human",
"value": "Add TestFile to validate cache name for polymorphic configuration\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Laratrust\\Tests\\Checkers\\Model;\n\nclass LaratrustModelDefaultCheckerTest extends LaratrustModelCheckerTestCase\n{\n protected function setUp()... | php | chosen |
[
{
"from": "system",
"value": "BB-2188: Add posibility to use parameters in data providers\n- fixed old-style data-providers after master backmerge\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Oro\\Component\\Layout\\Extension\\Theme\\DataProvider;\n\nuse Oro\\Component\\Layout\\Extensio... | php | chosen |
[
{
"from": "human",
"value": "Create controller for adding video to queue\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Copyright (c) 2017 Roman Lakhtadyr\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files... | php | chosen |
[
{
"from": "human",
"value": "Test asset: interface with a `void` return type\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARR... | php | chosen |
[
{
"from": "human",
"value": "Add missing test for NullResponseCommand\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Desk\\Test\\Unit\\Command;\n\nuse Desk\\Test\\Helper\\UnitTestCase;\n\nclass NullResponseCommandTest extends UnitTestCase\n{\n\n /**\n * {@inheritdoc}\n */\n pu... | php | chosen |
[
{
"from": "human",
"value": "Add migration for ShortName property of Faculty entity\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m150108_095524_modify_faculty_table extends Migration\n{\n public function up()\n {\n \t$this->addColumn('... | php | chosen |
[
{
"from": "human",
"value": "Test the route service provider generate method\n"
},
{
"from": "gpt",
"value": "<?php namespace Nwidart\\Modules\\Tests;\n\nclass GenerateRouteServiceProviderTest extends BaseTestCase\n{\n /**\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n privat... | php | chosen |
[
{
"from": "human",
"value": "Test that list attributes have corresponding lists\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass ProfileElementTest extends PHPUnit_Framework_TestCase\n{\n public function testListAttributesHaveLists()\n {\n $basePath = dirname(dirname(__DIR__));\n ... | php | chosen |
[
{
"from": "human",
"value": "Prepare for new function: automatic sync acf.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace HbgEventImporter\\Helper;\n\nclass AcfSync\n{\n public function __construct()\n {\n //add_action('save_post', array($this,'saveAcfPHP'));\n }\n\n publ... | php | chosen |
[
{
"from": "human",
"value": "Create ATM modal block for modal functionality\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Drupal\\adtechmedia\\Plugin\\Block;\n\nuse Drupal\\Core\\Block\\BlockBase;\nuse Drupal\\Core\\Form\\FormStateInterface;\n\n/**\n * Provides a 'AtmModal' block.\n *\n * ... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for Status\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Marein\\Nchan\\Api;\n\nuse Marein\\Nchan\\Api\\Model\\StatusInformation;\nuse Marein\\Nchan\\Exception\\AuthenticationRequiredException;\nuse Marein\\Nchan\\Exception\\NchanException;\nuse M... | php | chosen |
[
{
"from": "human",
"value": "Add tests for the content blocks add page\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Tests\\Action;\n\nuse Common\\WebTestCase;\n\nclass AddTest extends WebTestCase\n{\n public function testAuthenticationIsNeeded(): void\n... | php | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.