conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add Open States base resource\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * FurryBear\n * \n * PHP Version 5.3\n * \n * @category Congress_API\n * @package FurryBear\n * @author lobostome <lobostome@local.dev>\n * @license http://opensource.org/licenses/MIT M...
php
chosen
[ { "from": "human", "value": "Add namespace with braces syntax test\n" }, { "from": "gpt", "value": "// SYNTAX TEST \"Packages/php-grammar/PHP.tmLanguage\"\n<?php\n\n// @todo https://github.com/gerardroche/sublime-php-grammar/issues/52\n\nnamespace Xyz {\n// ^ meta.namespace\n// ^ meta.nam...
php
chosen
[ { "from": "human", "value": "Add omikron tests for functions\n" }, { "from": "gpt", "value": "<?php return\n\nwithin('functions',\n describe('reverseargs',\n it('takes a function and returns that function with reversed args', function() {\n $subtractRev = reverseargs(subtrac...
php
chosen
[ { "from": "system", "value": "Fix filter for Ticket Admin\n" }, { "from": "human", "value": "<?php\n\nnamespace Stfalcon\\Bundle\\EventBundle\\Admin;\n\nuse Sonata\\AdminBundle\\Admin\\Admin;\nuse Sonata\\AdminBundle\\Form\\FormMapper;\nuse Sonata\\AdminBundle\\Datagrid\\DatagridMapper;\nuse Son...
php
chosen
[ { "from": "human", "value": "Add archive column for soft delete purpose\n\n" }, { "from": "gpt", "value": "<?php\n\n\nnamespace Stock\\Database\\Migrations;\n\n\nclass AddArchive extends \\CodeIgniter\\Database\\Migration\n{\n\n /**\n * @inheritDoc\n */\n public function up()\n ...
php
chosen
[ { "from": "human", "value": "Create an XML renderer for basic sitemaps.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Sitemap\\Writers\\XML\\Sitemap;\n\nclass Basic extends \\Sitemap\\Writers\\XML\\Sitemap\n{\n private $sitemap;\n\n public function __construct(\\Sitemap\\Sitemap\\Bas...
php
chosen
[ { "from": "human", "value": "Add dummy settings in default data\n" }, { "from": "gpt", "value": "<?php\nnamespace Siwapp\\CoreBundle\\DataFixtures\\ORM;\n\nuse Doctrine\\Common\\DataFixtures\\AbstractFixture;\nuse Doctrine\\Common\\DataFixtures\\OrderedFixtureInterface;\nuse Doctrine\\Common\\Ut...
php
chosen
[ { "from": "human", "value": "Add very basic fee waiver payment type.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Apply for a fee waiver\n */\nclass FeeWaiverPayment extends ApplyPayment{ \n const PENDING_TEXT = 'Your application has been received';\n const SETTLED_TEXT = 'Your application...
php
chosen
[ { "from": "human", "value": "Create a default Automation Group\n\n\nFormer-commit-id: 7fb91825864ee5ee892b443e1945bd3423caa2a6" }, { "from": "gpt", "value": "<?php\n\nnamespace Concrete\\Core\\User\\Group\\AutomatedGroup;\nuse Concrete\\Core\\User\\User;\nuse Concrete\\Core\\User\\Group\\GroupAu...
php
chosen
[ { "from": "human", "value": "Add populate settings table database migration\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass PopulateSettingsTable extends Migration\n{\n /**\n * Run the migrat...
php
chosen
[ { "from": "human", "value": "Add test case for logger factories\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Forestry\\Log\\Test;\n\nuse Forestry\\Log\\DebugLogger;\nuse Psr\\Log\\LogLevel;\n\n/**\n * Class FactoryTest\n *\n * Test case for the factory method.\n *\n * @package Forestry\\L...
php
chosen
[ { "from": "human", "value": "Complete Not function unit tests.\n" }, { "from": "gpt", "value": "<?php\n\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for true Mimic library function.\n *\n * @since 0.1.0\n *\n * @todo Need to use QuickTest library.\n */\nclass NotFuncTest extends PHPUnit_Fra...
php
chosen
[ { "from": "human", "value": "Prepare to add the rules to filter the note params.\n" }, { "from": "gpt", "value": "<?php namespace App\\Http\\Requests;\n\nuse App\\Http\\Requests\\Request;\n\nclass WriteNoteRequest extends Request {\n\n\t/**\n\t * Determine if the user is authorized to make this ...
php
chosen
[ { "from": "human", "value": "Change Model path to Models for synchronize\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of the Safan package.\n *\n * (c) Harut Grigoryan <ceo@safanlab.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file...
php
chosen
[ { "from": "human", "value": "Add new common class to create enumeration akin to java Enum\n" }, { "from": "gpt", "value": "<?php\n/**\n * File AbstractEnumeration.php\n *\n * @category\n * @package\n * @author Ivanis Kouamé <ivanis.kouame@smile.fr>\n * @copyright 2015 Smile\n */\n\nnamespace ...
php
chosen
[ { "from": "human", "value": "Migrate passwords to ensure they're encrypted\n" }, { "from": "gpt", "value": "<?php\nnamespace OCA\\files_external\\Migrations;\n\nuse OCP\\Migration\\ISimpleMigration;\nuse OCP\\Migration\\IOutput;\nuse OCP\\Files\\External\\Service\\IGlobalStoragesService;\nuse OC...
php
chosen
[ { "from": "human", "value": "Fix NULL/empty string inconsistencies in database\n\nThe fields audio_license and audio_attribution_url are initialized\nto NULL, but if you save your audio settings (using the form on\n/audio/of/<username>), these fields are saved to empty strings when\nleft blank. This have cr...
php
chosen
[ { "from": "human", "value": "Add migration for Semester entity\n" }, { "from": "gpt", "value": "<?php\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\nclass m150106_154639_create_semester_table extends Migration {\n\tpublic function up() {\n\t\t$tableOptions = null;\n\t\tif ($this->db->driverName...
php
chosen
[ { "from": "human", "value": "Clear the caches via a task.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * @author Simon 'Sphere' Erkelens\n * This little task clears out the caches for the current website on Twisted Bytes servers with Varnish.\n */\nclass FlushCaches extends BuildTask\n{\n\n ...
php
chosen
[ { "from": "human", "value": "Read the link destination from a symlink\n" }, { "from": "gpt", "value": "<?php\nconst SHOW_DATA = true;\nrequire dirname(__DIR__) . '/vendor/autoload.php';\n\n$loop = \\React\\EventLoop\\Factory::create();\n\n\\React\\Filesystem\\Filesystem::create($loop)->getAdapte...
php
chosen
[ { "from": "human", "value": "Add object to represent a packed box\n" }, { "from": "gpt", "value": "<?php\n/**\n * Box packing (3D bin packing, knapsack problem)\n * @package BoxPacker\n * @author Doug Wright\n */\n namespace DVDoug\\BoxPacker;\n\n /**\n * A \"box\" with items\n * @author D...
php
chosen
[ { "from": "human", "value": "Add command to clear versions and all related entities from the DB\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of Packagist.\n *\n * (c) Jordi Boggiano <j.boggiano@seld.be>\n * Nils Adermann <naderman@naderman.de>\n *\n * For the full copyr...
php
chosen
[ { "from": "human", "value": "Implement Section Term Data for storing section interim/term notes\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Slate\\Progress;\n\nclass SectionTermData extends \\VersionedRecord\n{\n // VersionedRecord configuration\n public static $historyTable = 'his...
php
chosen
[ { "from": "human", "value": "Add libuv signal handling example\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Process signals are \"watchable\" events just like timers and stream IO\n * availability. SignalReactor::onSignal() returns a unique watcher ID that\n * may be disabled/enabled/cancel...
php
chosen
[ { "from": "human", "value": "Add common table header lang\n" }, { "from": "gpt", "value": "<?php\n/**\n * This <server-gardu-reporter> project created by :\n * Name : syafiq\n * Date / Time : 28 June 2017, 10:06 AM.\n * Email : syafiq.rezpector@gmail.com\n * Github : syafiq...
php
chosen
[ { "from": "human", "value": "Synchronize calendar every 10am and 4pm.\n" }, { "from": "gpt", "value": "<?php\n\ninclude_once 'header.php';\ninclude_once 'methods.php';\ninclude_once './cron_jobs/helper.php';\n\n\nif( trueOnGivenDayAndTime( 'today', '4pm' ) || trueOnGivenDayAndTime( 'today', '8am...
php
chosen
[ { "from": "human", "value": "Add trait to implement user permissions.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Yajra\\Acl\\Traits;\n\nuse Illuminate\\Database\\Eloquent\\Relations\\BelongsToMany;\nuse Yajra\\Acl\\Models\\Permission;\n\n/**\n * @mixin \\Illuminate\\Database\\Eloquent\\...
php
chosen
[ { "from": "human", "value": "Add a class for the 'testCaseEnd' event\n" }, { "from": "gpt", "value": "<?php\nnamespace pyd\\testkit\\events;\n\n/**\n * Event triggered when a test case ends by\n * {@see \\pyd\\testkit\\Testlistener::endTestSuite()}.\n *\n * @author Pierre-Yves DELETTRE <pierre.y...
php
chosen
[ { "from": "system", "value": "Use Kernel::getEnvironment() to keep consistency\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\HttpKernel\\Kernel;\nuse Symfony\\Component\\Config\\Loader\\LoaderInterface;\n\nclass AppKernel extends Kernel\n{\n public function registerBundl...
php
chosen
[ { "from": "human", "value": "Add php example to authent and call Webservices\n" }, { "from": "gpt", "value": "<?php\n\nrequire 'OpenveoWSClient.php';\n\n$client = New OpenveoWSClient(\"65d6247f0293049523d6a5e2efdf49ac07b51600\", \"8a7b0d43a631b52cf15e89eba7a65f274ccc7f73\",\n \"localhost\", \...
php
chosen
[ { "from": "human", "value": "Add overload function for is_uploaded_file (testing)\n" }, { "from": "gpt", "value": "<?php\n\nnamespace fennecweb\\ajax\\upload;\n\n/**\n * Override is_uploaded_file() in fennecweb\\ajax\\upload namespace for testing\n * Rather than checking wether the file was uplo...
php
chosen
[ { "from": "human", "value": "Create (as yet unused) database config file.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Capsule\\Manager as Capsule;\nuse Sil\\PhpEnv\\Env;\n\n$mysqlHost = Env::get('MYSQL_HOST');\n$mysqlDatabase = Env::get('MYSQL_DATABASE');\n$mysqlUser = En...
php
chosen
[ { "from": "human", "value": "Add adapter for PSR-18 compatible client\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Voronkovich\\SberbankAcquiring\\HttpClient;\n\nuse Psr\\Http\\Client\\ClientInterface;\nuse Psr\\Http\\Message\\RequestFactoryInterface;\nuse Psr\...
php
chosen
[ { "from": "human", "value": "Create non entity based form object.\n" }, { "from": "gpt", "value": "<?php\nnamespace App\\DTO;\nuse Symfony\\Component\\Validator\\Constraints as Assert;\n\nclass ChangeLsItemData {\n /**\n * @var string\n * @Assert\\NotBlank()\n */\n public $full...
php
chosen
[ { "from": "human", "value": "Add a CRUD action for toggling\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Croogo\\Croogo\\Action;\n\nuse Crud\\Action\\BaseAction;\nuse Crud\\Traits\\FindMethodTrait;\nuse Crud\\Traits\\RedirectTrait;\nuse Crud\\Traits\\SaveMethodTrait;\nuse Crud\\Traits\\Vi...
php
chosen
[ { "from": "system", "value": "Use protected method getCurrentDate() instead of time() to allow override\n" }, { "from": "human", "value": "<?php\n\nnamespace CFDIReader\\PostValidations\\Validators;\n\nuse CFDIReader\\CFDIReader;\nuse CFDIReader\\PostValidations\\Issues;\n\nclass Fechas extends ...
php
chosen
[ { "from": "human", "value": "Add tests for ChainHandler class\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that...
php
chosen
[ { "from": "human", "value": "Add test for compile/decompile .mo files\n" }, { "from": "gpt", "value": "<?php\ninclude_once dirname(__DIR__).'/src/autoloader.php';\n\nclass MoGenerationTest extends PHPUnit_Framework_TestCase\n{\n public function testMoGeneration()\n {\n $originalTran...
php
chosen
[ { "from": "system", "value": "Configure the cipher in the SP\n" }, { "from": "human", "value": "<?php\n\nnamespace Illuminate\\Encryption;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass EncryptionServiceProvider extends ServiceProvider\n{\n /**\n * Register the service provider.\n ...
php
chosen
[ { "from": "human", "value": "Test case - test Json\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Acme\\ApiBundle\\Tests\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\n\nclass ProjectControllerTest extends WebTestCase\n{\n public function testJsonFormat()\n ...
php
chosen
[ { "from": "human", "value": "Add a unit test for lime unit-testing lib\n\nIt's stupid noone did this before.\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once(__DIR__.'/../../bootstrap/unit.php');\n\n$t = new lime_test(23);\n\n$t->comment('A. Equal numbers');\n$t->is(1, 1);\n$t->is(2, 2);\n...
php
chosen
[ { "from": "human", "value": "Fix beatmapsets approver id column type\n" }, { "from": "gpt", "value": "<?php\n\n// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.\n// See the LICENCE file in the repository root for full licence text.\n\nuse I...
php
chosen
[ { "from": "human", "value": "Add a channel router configurator\n" }, { "from": "gpt", "value": "<?php\n\nnamespace PhpTabs\\Model;\n\nclass ChannelRouterConfigurator\n{\n private $router;\n\n public function __construct(ChannelRouter $router)\n {\n $this->router = $router;\n }\n\n public...
php
chosen
[ { "from": "human", "value": "Add has 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 has Mimic library function.\n *\n * @since 0.1.0\n */\nclass HasFuncTest extends PHP...
php
chosen
[ { "from": "human", "value": "Add admin module menu for albums\n" }, { "from": "gpt", "value": "<?php\n\n$id = $this->addItem(\n $menu_type = 'main',\n $title = 'Albums',\n $slug = 'albums',\n $parent_id = 0,\n $isAdmin = true,\n $caption = 'albums',\n $position = 10,\n $f...
php
chosen
[ { "from": "human", "value": "Add migration for Course entity\n" }, { "from": "gpt", "value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m141218_100550_create_course_table extends Migration\n{\n public function up()\n {\n $tableOptions = null;\n if ($this...
php
chosen
[ { "from": "human", "value": "Add migration for themes table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateThemesTable extends Migration {\n\n\t/**\n\t * Run the migrations.\n\t *\n\t * @retu...
php
chosen
[ { "from": "human", "value": "Add migration for orders table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateOrdersTable extends Migration\n{\n /**\n * Run the migrations.\n */\n public function up()\n {\n Schema::c...
php
chosen
[ { "from": "human", "value": "Add soft deletes to trios table.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddSoftDeletesToTriosTable extends Migration\...
php
chosen
[ { "from": "human", "value": "Add migration for creating `bss_process_queue` table\n" }, { "from": "gpt", "value": "<?php\n\n// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.\n// See the LICENCE file in the repository root for full licence t...
php
chosen
[ { "from": "human", "value": "Add console command `schema:load` to process the schema and import the database\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of the PHPLucidFrame library.\n * The script executes the command `php lucidframe schema:load [options] [<db>]`\n *\n * U...
php
chosen
[ { "from": "human", "value": "Change `imgix_uuid` column to text [API-192]\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass ChangeImgixUuidToText extends Mig...
php
chosen
[ { "from": "human", "value": "Add an index on Posts aid\n" }, { "from": "gpt", "value": "<?php\n\nuse Movim\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass AddIndexAidToPostsTable extends Migration\n{\n public function up()\n {\n $this->schema->table('posts', funct...
php
chosen
[ { "from": "human", "value": "Solve Average 1 in php\n" }, { "from": "gpt", "value": "<?php\n$a = (float)trim(fgets(STDIN));\n$b = (float)trim(fgets(STDIN));\n$average = ($a * 3.5 + $b * 7.5) / 11.0;\n\necho \"MEDIA = \" . number_format($average, 5, '.', '') . \"\\n\";\n?>\n" } ]
php
chosen
[ { "from": "human", "value": "Append cached time with directory for Kohana::cache() method\n" }, { "from": "gpt", "value": "<?php defined('SYSPATH') or die('No direct script access.');\n/**\n * Contains the most low-level helpers methods in Kohana:\n *\n * - Environment initialization\n * - Locat...
php
chosen
[ { "from": "human", "value": "Add HTTP hello world example.\n" }, { "from": "gpt", "value": "<?php\n\nVertx::createHttpServer()->requestHandler(function($request) {\n $request->response()->putHeader('Content-Type', 'text/plain');\n $request->response()->end('Hello world');\n})->listen(8080);\n"...
php
chosen
[ { "from": "human", "value": "Fix default date/time values of DB fields\n\nThis completes the changes in #3301\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Concrete\\Core\\Updater\\Migrations\\Migrations;\n\nuse Concrete\\Core\\Updater\\Migrations\\AbstractMigration;\nuse Concrete\\Core\\U...
php
chosen
[ { "from": "human", "value": "Add complex undefined variable diagnostic test\n\nIt is a simplification of code that caused false positives in the\nanalysis of Wordpress.\n" }, { "from": "gpt", "value": "<?php\n\nfunction get_taxonomy($taxonomy) {\n global $wp_taxonomies;\n\n if (!isset($wp_taxo...
php
chosen
[ { "from": "human", "value": "[Exception] Create exceptionf or invalid date interval spec\n" }, { "from": "gpt", "value": "<?php\n\nnamespace HCLabs\\Bills\\Exception;\n\nclass InvalidDateIntervalSpecException extends \\Exception\n{\n public function __construct()\n {\n parent::__con...
php
chosen
[ { "from": "human", "value": "Drop foreign keys on messages table\n\nEnsure all messages will be forever preserved\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\...
php
chosen
[ { "from": "human", "value": "Add file is empty action\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * This file is part of CaptainHook\n *\n * (c) Sebastian Feldmann <sf@sebastian-feldmann.info>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was d...
php
chosen
[ { "from": "system", "value": "BAP-8491: Send mass notifications to application users—CLI only\n- update CLI Command\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\NavigationBundle\\Command;\n\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Co...
php
chosen
[ { "from": "human", "value": "Add a sample configuration for signed requests\n" }, { "from": "gpt", "value": "<?php\n\narray [\n /*\n |--------------------------------------------------------------------------\n | Available header overrides\n |-----------------------------------------...
php
chosen
[ { "from": "human", "value": "Add town step 2 form type\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component\\OptionsResol...
php
chosen
[ { "from": "human", "value": "Add snippet for keeping the default user role.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Plugin Name: Restrict Content Pro - Keep Default User Role\n * Description: Ensures that your specified default user role is never removed from members, even if their membe...
php
chosen
[ { "from": "human", "value": "Add test coverage for resource utilization\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Pterodactyl\\Tests\\Integration\\Api\\Client\\Server;\n\nuse Mockery;\nuse Pterodactyl\\Models\\Permission;\nuse Pterodactyl\\Repositories\\Wings\\DaemonServerRepository;\n...
php
chosen
[ { "from": "human", "value": "Complete coverage on Paths concat + getRelativePath\n" }, { "from": "gpt", "value": "<?php\n\nnamespace PHPMD\\Utility;\n\nuse PHPMD\\AbstractTest;\n\n/**\n * @coversDefaultClass \\PHPMD\\Utility\\Paths\n */\nclass PathsTest extends AbstractTest\n{\n /**\n * @...
php
chosen
[ { "from": "human", "value": "Add a script to checkwhich elements can't be found in the manual automatically\n" }, { "from": "gpt", "value": "#!/usr/bin/env php\n<?php\n/**\n * An simple script to check the manual for missing stuff\n */\n\nerror_reporting(E_ALL);\nini_set('include_path', __DIR__....
php
chosen
[ { "from": "human", "value": "system: Add a L10n support class\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Localization support class\n * @author Heinz Wiesinger\n */\nclass L10n\n{\n\n /**\n * Static list of supported languages\n * @var array\n */\n private static $langua...
php
chosen
[ { "from": "human", "value": "Create page to redirect for right layout page\n" }, { "from": "gpt", "value": "<?php\n/**\n *Redirects to the right layout page\n *\n *@author Iasmin Mendes <mendesiasmin96@gmail.com>\n *@license MIT License\n *@link http://eletronjun.com.br/controller/generatePu...
php
chosen
[ { "from": "human", "value": "Add xslt path resolver tests\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Greenter\\Validator\\Resolver;\n\nuse Greenter\\Validator\\Resolver\\XslPathResolver;\nuse PHPStan\\Testing\\TestCase;\n\nclass XslPathResolverTest ext...
php
chosen
[ { "from": "human", "value": "Add some tests for Response class\n\nMore tests will follow after improving the class\n" }, { "from": "gpt", "value": "<?php\nnamespace VisionTest\\Http;\n\nuse Vision\\Http\\Message;\nuse Vision\\Http\\Response;\n\nuse PHPUnit\\Framework\\TestCase;\n\nclass Response...
php
chosen
[ { "from": "human", "value": "Add a new test to build+parse value validation\n" }, { "from": "gpt", "value": "<?php\n\nnamespace SLWDC\\NICParser\\Tests;\n\nuse SLWDC\\NICParser\\Builder;\nuse PHPUnit\\Framework\\TestCase;\nuse SLWDC\\NICParser\\Parser;\n\nclass ParserBuilderTest extends TestCase...
php
chosen
[ { "from": "human", "value": "FEATURE: Add a simple interface for administrating permission roles. (from r85297)\n\ngit-svn-id: 61ad833bee3a753d148e0d349fad2a795836b318@89193 467b73ca-7a2a-4603-9d3b-597d59a354a9\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Admin interface for Permission Role...
php
chosen
[ { "from": "human", "value": "Add helper class to encapsulate Mercury Region data\n" }, { "from": "gpt", "value": "<?php\n/**\n * Helper class to encapsulate Mercury Region data \n *\n * @author Jonas Flodén\n */\n\nnamespace Koala\\ContentBundle;\n\nclass MercuryRegions implements \\ArrayAccess,...
php
chosen
[ { "from": "human", "value": "Add migration changing all score_ids to BIGINT\n" }, { "from": "gpt", "value": "<?php\n\n// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.\n// See the LICENCE file in the repository root for full licence text.\n...
php
chosen
[ { "from": "system", "value": "BAP-11559: Move all bundles to the Oro namespace\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\EntityBundle\\Migrations\\Schema;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\n\nuse Oro\\Bundle\\MigrationBundle\\Migration\\Installation;\nuse Oro\\Bundle\\Migra...
php
chosen
[ { "from": "system", "value": "BAP-10979: Update Existing Workflows\n- moved UpdateWorkflowItemFields to v1_14\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\WorkflowBundle\\Migrations\\Schema;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\n\nuse Oro\\Bundle\\MigrationBundle\\Migrati...
php
chosen
[ { "from": "human", "value": "Add mechanism to randomly pick a photo from album\n\n* Fetch and store photo lists for albums from Flickr API\n* Allow picking of a random photo from album\n* To ensure the same photo does not get picked repeatedly, remove it\nfrom the stored list of photos for the album it was ...
php
chosen
[ { "from": "human", "value": "Add active-doctrine schema update command\n\nUsing SchemaCreator to generate a schema for all entities in all\nmodules.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Neptune\\Command\\ActiveDoctrine;\n\nuse ActiveDoctrine\\Schema\\SchemaCreator;\nuse Neptune\\C...
php
chosen
[ { "from": "human", "value": "Create tests for GroupMembershipUpdate command\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AdobeConnectClient\\Tests\\Commands;\n\nuse Exception;\nuse AdobeConnectClient\\Commands\\GroupMembershipUpdate;\n\nclass GroupMembershipUpdateTest extends TestCommandB...
php
chosen
[ { "from": "human", "value": "BB-6489: Add migration to delete translation keys with values from DB\n- created common query to delete unused translation keys\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Oro\\Bundle\\TranslationBundle\\Migration;\n\nuse Doctrine\\DBAL\\Connection;\nuse Doc...
php
chosen
[ { "from": "human", "value": "Introduce SS RA locations service\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Copyright 2016 SURFnet B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may ...
php
chosen
[ { "from": "system", "value": "Add title and DOB to User entity (JANUS-18)\n* Set DOB form field to be of single_text type.\n" }, { "from": "human", "value": "<?php\n\nnamespace Ice\\ExternalUserBundle\\Form\\Type;\n\nuse FOS\\UserBundle\\Form\\Type\\RegistrationFormType as BaseType;\n\nuse Symfo...
php
chosen
[ { "from": "system", "value": "[Messenger] Add ext-redis min version req to tests\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the ...
php
chosen
[ { "from": "human", "value": "Make a very basic KRabbit class!\n\nThis class allows you to quickly get exchanges and queues\nfrom your config file without having to declare each one\nmanually and set all the options. The options are all\ntaken from the config file based on the exchange and\nqueue names.\n" ...
php
chosen
[ { "from": "human", "value": "Add sample to update a contact\n" }, { "from": "gpt", "value": "<?php\nrequire dirname(__DIR__) . '/vendor/autoload.php';\n\n$apiKey = $argv[1];\n$apiSecret = $argv[2];\n$id = $argv[3];\n$email = $argv[4];\n$firstName = $argv[5];\n\n$ivvy = (new Fcds\\Ivvy\\IvvyFacto...
php
chosen
[ { "from": "human", "value": "Add sniff for printf(), print_r(), and var_dump().\n" }, { "from": "gpt", "value": "<?php\nclass PHPUnitStandard_Sniffs_Testing_NoOutputFunctionsSniff extends Generic_Sniffs_PHP_ForbiddenFunctionsSniff\n{\n protected $forbiddenFunctions = array(\n 'printf' =>...
php
chosen
[ { "from": "human", "value": "Add config builder, basically uses Symfony standard with tweaks\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Cs278\\CsFixer;\n\nuse Symfony\\CS\\Config\\Config;\nuse Symfony\\CS\\FixerInterface;\n\n/**\n * Constructs PHP-CS-Fixer Config object.\n */\nfinal cla...
php
chosen
[ { "from": "human", "value": "BC: Add EventList (Array object) that will be caring all events instead of array\n" }, { "from": "gpt", "value": "<?php\n\nnamespace om;\n\n/**\n * Copyright (c) 2004-2022 Roman Ožana (https://ozana.cz)\n *\n * @license BSD-3-Clause\n * @author Roman Ožana <roman@oza...
php
chosen
[ { "from": "human", "value": "Add test for twig extension\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Ornicar\\GravatarBundle\\Tests\\Twig;\n\nuse Ornicar\\GravatarBundle\\Twig\\GravatarExtension;\n\nclass GravatarExtensionTest extends \\PHPUnit_Framework_TestCase\n{\n public function ...
php
chosen
[ { "from": "human", "value": "Add this page to the styleguide so the tests check it\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Styleguide\\Pages;\n\nclass NewsView extends Page\n{\n /** {@inheritdoc} **/\n public $path = '/styleguide/news/item-1';\n\n /**\n * {@inheritdoc}\n...
php
chosen
[ { "from": "human", "value": "Add the walls philippines copyright view\n" }, { "from": "gpt", "value": "<div id=\"walis_calling_card\" class=\"modal fade\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button ...
php
chosen
[ { "from": "human", "value": "Test for performance of algorithms comparing ISO 8601 dates\n" }, { "from": "gpt", "value": "<?php\n/**\n * Check performance of comparing iso8601 dates algorithms\n * @file CompareISO8601Dates.php\n *\n * PHP version 5.3.9+\n *\n * @author Alexander Yancharuk <a...
php
chosen
[ { "from": "human", "value": "Add forget last 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 forgetLast Mimic library function.\n *\n * @since 0.1.0\n */\nclass ForgetLa...
php
chosen
[ { "from": "human", "value": "Store attachments in a separate table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateAttachmentsTable extends Migration...
php
chosen
[ { "from": "human", "value": "Add Ship District method, remove unused Shippo\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AddShipmentShipDistrictMethod extends AbstractMigration\n{\n public function change()\n {\n $table= $this->table('shi...
php
chosen
[ { "from": "human", "value": "Add script to get CSP header of a site\n\n[ci skip]\n" }, { "from": "gpt", "value": "<?php\n/**\n * CSP\n *\n * @author Kenji Suzuki <https://github.com/kenjis>\n * @license MIT License\n * @copyright 2014 Kenji Suzuki\n * @link https://github.com/kenji...
php
chosen
[ { "from": "human", "value": "Add unescape entity tag modifier plugin\n\nSigned-off-by: Kaoru Ishikura <cdb165a9a0fdf6fb03afc7c91b98ee2f15662d4d@sakura-creative.com>\n" }, { "from": "gpt", "value": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * This library is free software; you can redistribute i...
php
chosen
[ { "from": "human", "value": "Add a few tests for the DefaultValues class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace SitemapGenerator\\Tests\\Provider;\n\nuse SitemapGenerator\\Entity\\ChangeFrequency;\nuse SitemapGenerator\\Provider\\DefaultValues;\n\nclass DefaultValuesTest extends \\P...
php
chosen