conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add tests for embed file header\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Becklyn\\AssetsBundle\\tests\\Embed;\n\nuse Becklyn\\AssetsBundle\\Embed\\EmbedFileHeader;\nuse PHPUnit\\Framework\\TestCase;\n\n\nclass EmbedFileHeaderTest extends TestCase\n{\n p...
php
chosen
[ { "from": "human", "value": "Add new middleware for participant\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Http\\Middleware;\nuse Illuminate\\Support\\Facades\\Auth;\n\nuse Closure;\n\nclass CheckIsParticipant\n{\n /**\n * Handle an incoming request.\n *\n * @param ...
php
chosen
[ { "from": "human", "value": "Add http named exception supporting unit tests\n" }, { "from": "gpt", "value": "<?php\n/**\n * Slim Framework (https://slimframework.com)\n *\n * @link https://github.com/slimphp/Slim\n * @copyright Copyright (c) 2011-2017 Josh Lockhart\n * @license https://gi...
php
chosen
[ { "from": "human", "value": "Add the color 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": "system", "value": "[WIP] BB-3589: Create generator’s extension for root and namespace replaces\n- cs fixes\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Component\\Layout\\Tests\\Unit\\Extension\\Theme\\Stubs;\n\nuse Oro\\Component\\Layout\\LayoutItemInterface;\nuse Oro\\...
php
chosen
[ { "from": "human", "value": "Test script for dir listing\n" }, { "from": "gpt", "value": "<?php\n\tfunction listdirs($dir) {\n\t static $alldirs = array();\n\t $dirs = glob($dir . '/*', GLOB_ONLYDIR);\n\t if (count($dirs) > 0) {\n\t foreach ($dirs as $d) $alldirs[] = $d;\n\t }...
php
chosen
[ { "from": "human", "value": "Add Solr search resource model\n" }, { "from": "gpt", "value": "<?php\n\n\n/**\n * Search Resource\n *\n * @category Asm\n * @package Asm_Solr\n * @author Ingo Renner <ingo@infielddesign.com>\n */\n\nclass Asm_Solr_Model_Resource_Search\n{\n\n\t/**\n\t * An instance ...
php
chosen
[ { "from": "human", "value": "Add controller for institutions with personal RA details\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 th...
php
chosen
[ { "from": "human", "value": "Add php to handle email\n" }, { "from": "gpt", "value": "<?php\n/* Created with the help of http://form.guide/email-form/html-email-form.html */\n\n\t$name = $_POST['name'];\n\t$visitor_email = $_POST['email'];\n\t$message = $_POST['text'];\n\n\tfunction IsInjected($...
php
chosen
[ { "from": "human", "value": "Make sure the SVG sprite contains valid XML\n" }, { "from": "gpt", "value": "<?php\nnamespace App\\Test\\TestCase\\Controller;\n\nuse Cake\\Core\\Configure;\nuse Cake\\TestSuite\\IntegrationTestTrait;\nuse Cake\\TestSuite\\TestCase;\nuse SimpleXMLElement;\n\nclass As...
php
chosen
[ { "from": "human", "value": "Add test skeleton for orm cache shell.\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...
php
chosen
[ { "from": "human", "value": "Add tests specifically for ParsedExpression\n\nPreviously, the ParsedExpression class was only being\ntested indirectly via the Sprintf tests.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Lstr\\Sprintf;\n\nuse PHPUnit_Framework_TestCase;\n\n/**\n * @coversDefa...
php
chosen
[ { "from": "human", "value": "Return file in valid case\n" }, { "from": "gpt", "value": "<?php\nnamespace Ely\\TempMailBuster;\n\nclass LoaderTest extends \\PHPUnit_Framework_TestCase\n{\n public function testGetPaths()\n {\n $this->assertTrue(is_array(Loader::getPaths()));\n }\n\...
php
chosen
[ { "from": "human", "value": "Add DAO fetching all available teams in database" }, { "from": "gpt", "value": "<?php\n\nnamespace Mila\\DAO;\n\nclass teamDAO\n{\n /*\n * @var \\Doctrine\\DBAL\\Connection\n */\n private $dbCon;\n\n /*\n * @param \\Doctrine\\DBAL\\Connection $db...
php
chosen
[ { "from": "human", "value": "Add a command to generate the cache class from the classes.map file\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Sonata package.\n *\n * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>\n *\n * For the full copyright and license infor...
php
chosen
[ { "from": "human", "value": "Define service for listing trait files\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AppBundle\\API\\Listing;\n\nuse AppBundle\\Entity\\Data\\TraitFileUpload;\nuse AppBundle\\Entity\\User\\FennecUser;\nuse AppBundle\\Entity\\User\\Project;\nuse AppBundle\\Servi...
php
chosen
[ { "from": "human", "value": "Add test for url validation rule\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Components\\Validation;\n\nuse App\\Validation\\DoesNotContainUrlRule;\nuse Tests\\TestCase;\n\nclass DoesNotContainUrlRuleTest extends TestCase\n{\n const STRING_WITH_URL ...
php
chosen
[ { "from": "human", "value": "Drop init status for transactions\n" }, { "from": "gpt", "value": "<?php\n\nuse yii\\db\\Migration;\n\n/**\n * Class m180929_200905_drop_init_transaction_status\n */\nclass m180929_200905_drop_init_transaction_status extends Migration {\n /**\n * {@inheritdoc}...
php
chosen
[ { "from": "human", "value": "Allow users to set up 2fa\n" }, { "from": "gpt", "value": "<?php\n\n namespace App\\Http\\Requests\\User;\n\n use Illuminate\\Foundation\\Http\\FormRequest;\n\n /**\n * Class Enable2FA\n *\n * @package App\\Http\\Requests\\User\n */\n clas...
php
chosen
[ { "from": "human", "value": "Add 'type' column to ReindexFlags\n\nWe need this column to distinguish changes (inserts and updates) from\ndeletions. Changed sentences will be included in the delta index,\ndeleted sentences will be included in the kill-list.\n\nSee #2226 for additional information.\n" }, ...
php
chosen
[ { "from": "human", "value": "Move data from snmp module to core plugin\n" }, { "from": "gpt", "value": "<?php\n\n/*\n ------------------------------------------------------------------------\n FusionInventory\n Copyright (C) 2010-2012 by the FusionInventory Development Team.\n\n http://w...
php
chosen
[ { "from": "human", "value": "Add fieldset to works with button bar" }, { "from": "gpt", "value": "<?php\n\nnamespace JS\\Form;\n\nuse Zend\\Form\\Fieldset;\n\nclass AbstractListFieldset extends AbstractFieldset {\n\n private $buttonBarTop;\n\n public function init() {\n $this->butto...
php
chosen
[ { "from": "human", "value": "Create a new interface to define a Where clause\n\nThis will be used to specify both the parent WHERE as well as the more\nspecific types of where clauses.\n\nissue #1\n" }, { "from": "gpt", "value": "<?php\n/**\n * @author Michael Collette <mcollette@meetinge...
php
chosen
[ { "from": "human", "value": "Add basic tests for PPI_Request_Session\n" }, { "from": "gpt", "value": "<?php\n/**\n * Unit test for the PPI Request GetQuery\n *\n * @package Core\n * @author Paul Dragoonis <dragoonis@php.net>\n * @license http://opensource.org/licenses/mit-license.php MIT\...
php
chosen
[ { "from": "human", "value": "Split options across multiple files.\n\nResults in more modularized and workable code structure.\n" }, { "from": "gpt", "value": "<?php\n\n/* ======================================================================\n\n WordPress for Web App Options\n Adjust plugi...
php
chosen
[ { "from": "human", "value": "Add test file for secp256k1_context_create / destroy / clone\n" }, { "from": "gpt", "value": "<?php\n\nnamespace BitWasp\\Secp256k1Tests;\n\nclass Secp256k1ContextTest extends TestCase\n{\n public function testContext()\n {\n $ctx = \\secp256k1_context_c...
php
chosen
[ { "from": "human", "value": "Add script to create Mongo database\n" }, { "from": "gpt", "value": "<?php\n\n/* \n * A demo of a schemaless Mongo structure\n * \n * I'm modelling an e-bike, and its constituent parts, from this URL:\n * \n * http://www.onbike.co.uk/electricbikes/haibike-sduro-allmt...
php
chosen
[ { "from": "human", "value": "Add test for actual use of product postprocessors\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Sylake\\SyliusConsumerPlugin\\Functional;\n\nuse PHPUnit\\Framework\\Assert;\nuse Sylake\\SyliusConsumerPlugin\\Event\\ProductUpda...
php
chosen
[ { "from": "human", "value": "Add rebuildBillsLinks tool which resets and updates linking fields between bills (invoices, payments)" }, { "from": "gpt", "value": "<?php\n\n/**\n * Reset and update linking fields between bills (invoices, payments)\n * @param array $accounts Account ids\n */\nfunct...
php
chosen
[ { "from": "human", "value": "Add Test case for AddRecurrenceInfo.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Zimbra\\Mail\\Tests\\Struct;\n\nuse Zimbra\\Mail\\Tests\\ZimbraMailTestCase;\nuse Zimbra\\Mail\\Struct\\AddRecurrenceInfo;\n\n/**\n * Testcase class for AddRecurrenceInfo.\n */\n...
php
chosen
[ { "from": "human", "value": "Add hydrator form abstract object\n" }, { "from": "gpt", "value": "<?php\nnamespace Matryoshka\\Model\\Hydrator;\n\nuse Zend\\Stdlib\\Hydrator\\ClassMethods as ZendClassMethods;\n\nclass ClassMethods extends ZendClassMethods\n{\n public function __construct()\n ...
php
chosen
[ { "from": "human", "value": "Add base class for drubo-enabled RoboFile console commands configuration classes\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Drubo\\Robo;\n\nuse Robo\\Tasks as RoboTasks;\n\n/**\n * Base class for drubo-enabled RoboFile console commands configuration classes....
php
chosen
[ { "from": "human", "value": "Add routes for hierarchy manipulation to API\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Remove a node from channel tree\n */\n$api->delete('/tree/:id', $APIkeyRequired, function($id) use ($api) {\n if (Channel::ById($id)->removeFromTree()) {\n $api->...
php
chosen
[ { "from": "human", "value": "Create test case for ContestEntriesController\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Controllers;\n\nuse App\\Models\\Contest;\nuse App\\Models\\User;\nuse DateTime;\nuse Illuminate\\Http\\Testing\\File;\nuse Tests\\TestCase;\n\nclass ContestEntri...
php
chosen
[ { "from": "human", "value": "Make it possible for Croogo to be included as a plugin\n" }, { "from": "gpt", "value": "<?php\n\nuse Cake\\Core\\Configure;\n\n$pluginPaths = Configure::read('plugins');\n$pluginPaths['Croogo/Croogo'] = $pluginPaths['Croogo'] . 'Croogo' . DS;\n\nConfigure::write('plu...
php
chosen
[ { "from": "human", "value": "Add a test to catch a bug in ourSubstr\n" }, { "from": "gpt", "value": "<?php\nuse \\Defuse\\Crypto\\Crypto;\nuse \\Defuse\\Crypto\\Key;\n\nclass CryptoTest extends PHPUnit_Framework_TestCase\n{\n # Test for issue #165 -- encrypting then decrypting empty string fa...
php
chosen
[ { "from": "human", "value": "Add test for projects index\n" }, { "from": "gpt", "value": "<?php\n$I = new AcceptanceTester($scenario);\n$I->wantTo('ensure that the projects index works');\nTestCommonAdmin::logMeIn($I);\n$I->amOnPage('/tickets');\n$I->see('Title', 'th');\n$I->see('Updated At', 't...
php
chosen
[ { "from": "human", "value": "Add some coverage to FixtureSchemaExtension\n" }, { "from": "gpt", "value": "<?php\ndeclare(strict_types=1);\n\n/**\n * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)\n * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)\n *\n...
php
chosen
[ { "from": "human", "value": "Migrate RefCursor data to RefPosition table\n\nSummary:\nRef T11823. This populates the new RefPosition table based on the existing RefCursor table, and deletes now-duplicate rows in the RefCursor table so the next change can add a unique key.\n\nThis change is not standalone, a...
php
chosen
[ { "from": "human", "value": "Create trait for sqlConcatenate using CONCAT function\n" }, { "from": "gpt", "value": "<?php\nnamespace EngineWorks\\DBAL\\Traits;\n\ntrait MethodSqlConcatenate\n{\n public function sqlConcatenate(...$strings)\n {\n if (! count($strings)) {\n ...
php
chosen
[ { "from": "human", "value": "Test for Message base class\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: stefan\n * Date: 1/16/17\n * Time: 11:39 PM\n */\n\nnamespace particleflux\\MaxCube\\tests\\parser;\n\n\nuse particleflux\\MaxCube\\messages\\Message;\nuse part...
php
chosen
[ { "from": "human", "value": "III-447: Add in-memory cache decorated UsersInterface implementation\n" }, { "from": "gpt", "value": "<?php\n/**\n * @file\n */\n\nnamespace CultuurNet\\UDB3\\UiTID;\n\nuse Psr\\Log\\LoggerAwareInterface;\nuse Psr\\Log\\LoggerAwareTrait;\nuse Psr\\Log\\NullLogger;\nu...
php
chosen
[ { "from": "human", "value": "Add permissions and roles test\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Feature;\n\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\nuse Spatie\\Permission\\Models\\Permission;\nuse Spatie\\Permission\\Models\\Role;...
php
chosen
[ { "from": "human", "value": "Add example of a configuration for client-side sharding.\n\n[ci skip]\n" }, { "from": "gpt", "value": "<?php\n\nrequire __DIR__.'/../vendor/autoload.php';\n\n$app = new Silex\\Application();\n\n$app->register(new Predis\\Silex\\ClientServiceProvider(), array(\n 'p...
php
chosen
[ { "from": "human", "value": "Add abstract corporate share 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 informatio...
php
chosen
[ { "from": "human", "value": "Add email provider mappings file.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * The world's most used third-party email providers.\n *\n */\nreturn array(\n 'gmail.com' => 'http://mail.google.com',\n 'me.com' => 'https://www.icloud.co...
php
chosen
[ { "from": "system", "value": "Add routes for TOS and Copyright" }, { "from": "human", "value": "{{--\n Copyright 2015-2017 ppy Pty. Ltd.\n\n This file is part of osu!web. osu!web is distributed with the hope of\n attracting more community contributions to the core ecosystem of osu!.\n\n...
php
chosen
[ { "from": "human", "value": "Add Request::validate() macro test coverage\n\n$request->validate() was never called in the test suite.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Illuminate\\Tests\\Integration\\Validation;\n\nuse Illuminate\\Http\\Request;\nuse Orchestra\\Testbench\\TestCa...
php
chosen
[ { "from": "human", "value": "Add php cs fixer rules\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\n/*\n * This file is part of PHP CS Fixer.\n * (c) Fabien Potencier <fabien@symfony.com>\n * Dariusz Rumiński <dariusz.ruminski@gmail.com>\n * This source file is subject ...
php
chosen
[ { "from": "human", "value": "Add unit test for RingPHP and Guzzle.\n" }, { "from": "gpt", "value": "<?php namespace Kshabazz\\Tests\\Interception;\n/**\n * Test for use with Guzzle HTTP client.\n */\nuse GuzzleHttp\\Client;\nuse GuzzleHttp\\Ring\\Client\\StreamHandler;\nuse Kshabazz\\Interceptio...
php
chosen
[ { "from": "system", "value": "Add an alias for Deprecated to be compatible with PHP5.6\n" }, { "from": "human", "value": "<?php\nif (class_exists('PHPUnit_Runner_Version')) {\n if (version_compare(\\PHPUnit_Runner_Version::id(), '5.7', '<')) {\n trigger_error(sprintf('Your PHPUnit Vers...
php
chosen
[ { "from": "human", "value": "[Tests] Check that author user can edit a 'page' record\n" }, { "from": "gpt", "value": "<?php\n\nuse Codeception\\Util\\Fixtures;\nuse Codeception\\Util\\Locator;\n\n/**\n * Backend 'author' tests\n *\n * @author Gawain Lynch <gawain.lynch@gmail.com>\n */\nclass Bac...
php
chosen
[ { "from": "human", "value": "Add the ability to use eleoquent in the application\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Begin\\Exceptions;\n\nuse Exception;\n\nclass ValidationException extends Exception\n{\n /**\n * The underlying errors instance.\n *\n * @var \\Illu...
php
chosen
[ { "from": "system", "value": "Rename task 'up' and 'down' to 'deploy:up' and 'deploy:down'\n" }, { "from": "human", "value": "<?php\n/* (c) Anton Medvedev <anton@elfet.ru>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this sour...
php
chosen
[ { "from": "human", "value": "Add order item payment 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\\Pa...
php
chosen
[ { "from": "human", "value": "Add a few tests for the Github client factory\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Regis\\Infrastructure\\Github;\n\nuse Github\\Api;\nuse Github\\Client as VendorClient;\nuse Psr\\Log\\LoggerInterface;\n\nuse Regis\\Domain\\Entity\\Github\\Repo...
php
chosen
[ { "from": "human", "value": "Add failing test for DCOM-288\n\nReported on: https://github.com/doctrine/common/issues/600\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Doctrine\\Tests\\ORM\\Functional\\Ticket;\n\nuse Doctrine\\Tests\\OrmFunctionalTestCase;\nuse Doctrine\\Tests\\Models\\ECom...
php
chosen
[ { "from": "system", "value": "Remove leading whitespace in constructor arg" }, { "from": "human", "value": "<?php\n\nnamespace Avalanche\\Bundle\\ImagineBundle\\Imagine\\Filter;\n\nuse Avalanche\\Bundle\\ImagineBundle\\Imagine\\Filter\\Loader\\LoaderInterface;\n\nuse Imagine\\Exception\\InvalidA...
php
chosen
[ { "from": "human", "value": "Add tests for google map form.\n" }, { "from": "gpt", "value": "<?php\n/**\n * PHP version 7.1\n *\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\nnamespace App\\Form\\GoogleMap;\n\nuse Mandragora\\FormFacto...
php
chosen
[ { "from": "human", "value": "Move events definitions into proper components\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was d...
php
chosen
[ { "from": "human", "value": "Add unit tests to step" }, { "from": "gpt", "value": "<?php\nnamespace Wizard;\n\nuse Zend\\Form\\Form;\n\nclass AbstractStepTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @var AbstractStep\n */\n protected $step;\n\n public function setUp()\...
php
chosen
[ { "from": "human", "value": "Add some tests for Metadata\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tystr\\RedisOrm\\Metadata;\n\nuse Tystr\\RedisOrm\\DataTransformer\\DataTypes;\nuse Tystr\\RedisOrm\\Exception\\InvalidArgumentException;\n\n/**\n * @author Tyler Stroud <tyler@tylerstrou...
php
chosen
[ { "from": "human", "value": "Add migrations to make new post columns nullable\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass MakeBucketAndDetailsColumnsNu...
php
chosen
[ { "from": "human", "value": "Add the artisan command to check for security vulns\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Console\\Commands;\n\nuse Illuminate\\Console\\Command;\nuse SensioLabs\\Security\\SecurityChecker;\n\nclass SecurityCheck extends Command\n{\n /**\n *...
php
chosen
[ { "from": "human", "value": "Throw an exception if document was not found in Crud service.\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the ONGR package.\n *\n * (c) NFQ Technologies UAB <info@nfq.com>\n *\n * For the full copyright and license information, please view t...
php
chosen
[ { "from": "human", "value": "Add an API client that uses Basic Auth & Service Descriptions\n" }, { "from": "gpt", "value": "<?php\nnamespace Intercom;\n\nuse InvalidArgumentException;\nuse Guzzle\\Common\\Collection;\nuse Guzzle\\Service\\Client;\nuse Guzzle\\Service\\Description\\ServiceDescrip...
php
chosen
[ { "from": "human", "value": "Split modules into their own files\n" }, { "from": "gpt", "value": "<?php\n// Version: 1.0: Module.php\nnamespace ShinyBear\\Services\\Modules;\n\nif (!defined('SMF')) {\n\tdie('Hacking attempt...');\n}\n\n/**\n * @package ShinyBear\n * @since 1.0\n */\ninterface iMo...
php
chosen
[ { "from": "human", "value": "Add stripe_customer_id column to users table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddStripeCustomerIdColumnToUsersT...
php
chosen
[ { "from": "human", "value": "III-481: Add test for LabelsMerged (de)serialization\n" }, { "from": "gpt", "value": "<?php\n/**\n * @file\n */\n\nnamespace CultuurNet\\UDB3\\Event\\Events;\n\nuse Broadway\\Serializer\\SerializableInterface;\nuse CultuurNet\\UDB3\\Label;\nuse CultuurNet\\UDB3\\Labe...
php
chosen
[ { "from": "human", "value": "Add Payment profile collection class\n" }, { "from": "gpt", "value": "<?php\n/*\n * HiPay fullservice SDK\n *\n * NOTICE OF LICENSE\n *\n * This source file is subject to the MIT License\n * that is bundled with this package in the file LICENSE.txt.\n * It is also av...
php
chosen
[ { "from": "system", "value": "Rearrange cron in UI to correspond to the actual order of work\n" }, { "from": "human", "value": "<?php\n\n// Small helper array that may be used on some page controllers to\n// fetch the crons we wish to monitor\n$aMonitorCrons = array('statistics','payouts','table...
php
chosen
[ { "from": "human", "value": "III-765: Add test for creation of a place\n" }, { "from": "gpt", "value": "<?php\n\nnamespace CultuurNet\\UDB3\\Place;\n\n\nuse Broadway\\CommandHandling\\CommandBusInterface;\nuse Broadway\\Repository\\RepositoryInterface;\nuse Broadway\\UuidGenerator\\UuidGenerator...
php
chosen
[ { "from": "human", "value": "Add example for string replacements\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once __DIR__.'/vendor/autoload.php';\n\n/*\n * You can use an closure or a class that implements TestInterface.\n *\n * Data that will be processed by the tested function can be exe...
php
chosen
[ { "from": "human", "value": "Add missing test for Twitter provider\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the HWIOAuthBundle package.\n *\n * (c) Hardware.Info <opensource@hardware.info>\n *\n * For the full copyright and license information, please view the LICENS...
php
chosen
[ { "from": "human", "value": "Add basic out of the box configuration\n" }, { "from": "gpt", "value": "<?php\n\nuse Cake\\Core\\Configure;\nuse Cake\\Database\\Type;\n\nConfigure::write('Muffin/Tokenize', [\n 'lifetime' => '3 days',\n 'length' => 32,\n]);\n\nif (!Type::map('json')) {\n Ty...
php
chosen
[ { "from": "system", "value": "Return HTTP 403 when access is forbidden\n" }, { "from": "human", "value": "<?php\n\nnamespace Kanboard\\Controller;\n\nuse Kanboard\\Core\\Base;\n\n/**\n * Class AppController\n *\n * @package Kanboard\\Controller\n * @author Frederic Guillot\n */\nclass AppContro...
php
chosen
[ { "from": "human", "value": "Add cronjob for extracting hero usages per mod\n" }, { "from": "gpt", "value": "<?php\nrequire_once('../functions.php');\nrequire_once('../../global_functions.php');\nrequire_once('../../connections/parameters.php');\n\n$db = new dbWrapper($hostname_gds_site, $userna...
php
chosen
[ { "from": "human", "value": "Fix missing foreign key reference on payments-table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass PaymentgroupsFixEventgroupId extends Migration {\n\n /**\n * R...
php
chosen
[ { "from": "human", "value": "Add script to dump ODBC database to CSV files.\n" }, { "from": "gpt", "value": "<?php\n$db = \"\";\n$user = \"\";\n$password = \"\";\n\nprintf(\"Connecting...\\n\");\n\n$conn = odbc_connect($db, $user, $password);\n\nif (!$conn) {\n\tdie(\"Could not connect to \" . $...
php
chosen
[ { "from": "human", "value": "Add sample script updating node language.\n" }, { "from": "gpt", "value": "#!/usr/bin/env drush\n\n<?php\n$result = db_query(\"SELECT n.nid, n.title FROM {node} n WHERE language = 'und'\");\nforeach ($result as $record) {\n print \"Loaded: {$record->title} [{$record...
php
chosen
[ { "from": "system", "value": "[HttpKernel] Fix missing use for request and response classes" }, { "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 ...
php
chosen
[ { "from": "human", "value": "Test passphrases are correctly checked\n" }, { "from": "gpt", "value": "<?php\n\nclass Relax_Openssl_PrivateKeyTest extends PHPUnit_Framework_TestCase\n{\n public function setUp()\n {\n $this->privateKey = tmpfile();\n $this->passPhrase = 'llamas ...
php
chosen
[ { "from": "human", "value": "Add a file utilities library.\n\nAdd function writeDataToTempFile to capture a common pattern of\ncreating a temp file and writing a blob of data to\nit. writeDataToTempFile returns the temp file name so it can be\ndeleted after use.\n" }, { "from": "gpt", "value": "...
php
chosen
[ { "from": "human", "value": "Add adjacency list comment table.\n" }, { "from": "gpt", "value": "<?php\n\nuse yii\\db\\Schema;\nuse console\\components\\Migration;\n\nclass m150804_080424_create_adjacency_list_comment_table extends Migration\n{\n public function up()\n {\n $this->cre...
php
chosen
[ { "from": "human", "value": "Add database migration for renaming group column to group_id within the users table.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Support\\Facades\\Schema;\n\...
php
chosen
[ { "from": "human", "value": "Create base form for a page\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Backend\\Modules\\Pages\\Domain\\Page\\Form;\n\nuse Backend\\Modules\\Pages\\Domain\\Page\\PageDataTransferObject;\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Fo...
php
chosen
[ { "from": "human", "value": "Add queueing cookie aware component\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Aedart\\Laravel\\Helpers\\Contracts\\Cookie;\n\nuse Illuminate\\Contracts\\Cookie\\QueueingFactory;\n\n/**\n * Queueing Cookie Aware\n *\n * @see \\Illuminate\\Contracts\\Cookie\\...
php
chosen
[ { "from": "human", "value": "Add SA slice cert interface.\n\nSA create_slice_certificate invokes mkslicecert with appropriate\narguments to generate a long-lived slice certificate.\n" }, { "from": "gpt", "value": "<?php\n//----------------------------------------------------------------------\n/...
php
chosen
[ { "from": "human", "value": "Add odnoklassniki resource owner test\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the HWIOAuthBundle package.\n *\n * (c) Hardware.Info <opensource@hardware.info>\n *\n * For the full copyright and license information, please view the LICENS...
php
chosen
[ { "from": "human", "value": "Add test for listing projects webservice\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\AppBundle\\API\\Listing;\n\nuse AppBundle\\API\\Webservice;\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\nuse Symfony\\Component\\HttpFoundation\\Paramete...
php
chosen
[ { "from": "human", "value": "Add no op message converter test\n" }, { "from": "gpt", "value": "<?php\n/*\n * This file is part of the prooph/common.\n * (c) 2014-2015 prooph software GmbH <contact@prooph.de>\n *\n * For the full copyright and license information, please view the LICENSE\n * file...
php
chosen
[ { "from": "human", "value": "Add a PDO iterator object.\n" }, { "from": "gpt", "value": "<?php\r\nclass PDOIterator implements Iterator {\r\n private $position = 0;\r\n private $pdo;\r\n private $fetchMode;\r\n private $nextResult;\r\n\r\n public function __construct(PDOStatement ...
php
chosen
[ { "from": "human", "value": "Test for detached heads yielding an invalid version\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of Composer.\n *\n * (c) Nils Adermann <naderman@naderman.de>\n * Jordi Boggiano <j.boggiano@seld.be>\n *\n * For the full copyright and license...
php
chosen
[ { "from": "human", "value": "Add very basic unit tests for PDO::lastInsertId()\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\PDO\\PDO;\n\nuse Stratedge\\Wye\\Wye;\nuse Tests\\TestCase;\n\nclass LastInsertIdTest extends TestCase\n{\n public function testReturnsGivenValueAsString()...
php
chosen
[ { "from": "human", "value": "Add New File Reperest Phase 2 New Registration\n\nAdd New File Reperest Phase 2 New Registration" }, { "from": "gpt", "value": "<div class=\"top-area\">\r\n <h2>2017 Registration<a href=\"<?php echo base_url('admin/audit_started_2017/excel_phase2_1') ?>\"><but...
php
chosen
[ { "from": "human", "value": "Set migration to update developers table\n\n- Rename name_jp to original\n- Rename name_en to romaji\n- Add furi column\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\...
php
chosen
[ { "from": "human", "value": "Add indexes to Messages table\n" }, { "from": "gpt", "value": "<?php\n\nuse Movim\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass AddJidToJidFromIndexesToMessages extends Migration\n{\n public function up()\n {\n $this->schema->table('...
php
chosen
[ { "from": "human", "value": "Migrate the Info table to clear the bad cache\n" }, { "from": "gpt", "value": "<?php\n\nuse Movim\\Migration;\nuse App\\Info;\n\nclass ClearBuggyPubsubNodesInInfosTable extends Migration\n{\n public function up()\n {\n Info::where('node', '0')->delete();...
php
chosen
[ { "from": "human", "value": "Add a template that simply calls v_devices_collection for output.\n" }, { "from": "gpt", "value": "<?php\n# Copyright 2003-2015 Opmantek Limited (www.opmantek.com)\n#\n# ALL CODE MODIFICATIONS MUST BE SENT TO CODE@OPMANTEK.COM\n#\n# This file is part of Open-AudIT...
php
chosen
[ { "from": "human", "value": "Test against ext-event if available" }, { "from": "gpt", "value": "<?php\n\nnamespace React\\Tests\\ChildProcess;\n\nuse React\\EventLoop\\ExtEventLoop;\n\nclass ExtEventLoopProcessTest extends AbstractProcessTest\n{\n public function createLoop()\n {\n ...
php
chosen