conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add unit tests for Mutator class\n\nSigned-off-by: Tom Van Herreweghe <96835dd8bfa718bd6447ccc87af89ae1675daeca@king-foo.be>\n" }, { "from": "gpt", "value": "<?php\n/**\n * @covers \\PHPExif\\Hydrator\\Mutator::<!public>\n */\nclass MutatorTest extends \\PHPUnit_Fram...
php
chosen
[ { "from": "human", "value": "Add unit test for view dependency order\n" }, { "from": "gpt", "value": "<?php\n/**\n * Tests that views are dropped and added in the correct order\n *\n * @package DBSteward\n * @license http://www.opensource.org/licenses/bsd-license.php Simplified BSD License\n * @...
php
chosen
[ { "from": "human", "value": "Add events for sitemap component\n\nUses componentClass_ContentChanges to not slow down processing events.\nThere shouldn't normally be many sitemap components in a subroot.\n" }, { "from": "gpt", "value": "<?php\nclass Kwc_Advanced_Sitemap_Events extends Kwc_Abstrac...
php
chosen
[ { "from": "human", "value": "Test for the mustache loader." }, { "from": "gpt", "value": "<?php\n\nrequire_once '../Mustache.php';\nrequire_once '../MustacheLoader.php';\n\n/**\n * @group loader\n */\nclass MustacheLoaderTest extends PHPUnit_Framework_TestCase {\n\n\tpublic function testTheActua...
php
chosen
[ { "from": "human", "value": "Add migration to settings module\n" }, { "from": "gpt", "value": "<?php\n\n namespace papalapa\\yiistart\\modules\\settings\\migrations;\n\n use yii\\db\\Migration;\n\n /**\n * Class m172007_135743_add_comment_column_on_settings_table\n * @package pa...
php
chosen
[ { "from": "human", "value": "Add skeleton for transpose graph G^T" }, { "from": "gpt", "value": "<?php\r\n\nnamespace Fhaculty\\Graph\\Algorithm;\n\nuse Fhaculty\\Graph\\Exception\\UnexpectedValueException;\n\r\nuse Fhaculty\\Graph\\Graph;\r\nuse Fhaculty\\Graph\\Edge\\Base as Edge;\r\nuse Fhacu...
php
chosen
[ { "from": "human", "value": "Add Soccer & It/Tech to the list of intrests\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Application\\Migrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generated Migration: Please modify to ...
php
chosen
[ { "from": "human", "value": "[IMP] Add new test case for UrlOutput class\n" }, { "from": "gpt", "value": "<?php namespace Odoo\\Client\\Test\\Output;\n\nuse Odoo\\Client\\Output\\UrlOutput;\n\nclass UrlOutPutTest extends \\PHPUnit_Framework_TestCase\n{\n public function testCreateUrl()\n {...
php
chosen
[ { "from": "human", "value": "Fix the first issue, add normal routing for Navbar first\n\nSigned-off-by: Tracy <f03314d14d3d698b9b1e6ae84a137ad6fed8b55a@gmail.com>\n" }, { "from": "gpt", "value": "<?php\n\ndefined('BASEPATH') OR exit('No direct script access allowed');\n\nclass First extends Appl...
php
chosen
[ { "from": "human", "value": "Add BIP39 example for creating a mnemonic from entropy, converting the mnemonic/passphrase into a seed, and using the seed to create a BIP32 master key\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once \"../vendor/autoload.php\";\n\nuse BitWasp\\Bitcoin\\Crypto\...
php
chosen
[ { "from": "human", "value": "Add & Edit User Controller file\n" }, { "from": "gpt", "value": "<?\nclass Controller_User extends Controller{\n\n public function start(){\n\n if(!User::isUserLoggedIn()) Util::error404();\n\n $data = array();\n\n //$this->view = new View($da...
php
chosen
[ { "from": "human", "value": "Fix ZF-12173: Zend_Form and Zend_Form_Element prefix paths are not prefix agnostic (namespaces). Patch by Antonio J García Lagar.\n\ngit-svn-id: abaeb2b3ba5a94ed391a9405ad7d63d0414021c9@24849 44c647ce-9c0f-0410-b52a-842ac1e357ba\n" }, { "from": "gpt", "value": "<?php...
php
chosen
[ { "from": "human", "value": "Test monetary values shown on dashboard\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Feature;\n\nuse App\\Models\\Earning;\nuse App\\Models\\Space;\nuse App\\Models\\Spending;\nuse App\\Models\\User;\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase...
php
chosen
[ { "from": "human", "value": "Add tests with the examples used in the wiki\n" }, { "from": "gpt", "value": "<?php\nnamespace VXML;\n\nuse VXML\\Rule\\NumberRange;\nuse VXML\\Rule\\Set;\nuse VXML\\Rule\\Equal;\nuse VXML\\Rule\\Regex;\nuse VXML\\Rule\\Optional;\nuse VXML\\Rule\\Invert;\n\nclass Exa...
php
chosen
[ { "from": "human", "value": "Add unit testing for Controller\n" }, { "from": "gpt", "value": "<?php namespace CodeIgniter;\n\nuse CodeIgniter\\HTTP;\nuse Config\\App;\n\n/**\n * Exercise our core Controller class.\n * Not a lot of business logic, so concentrate on making sure\n * we can exercise...
php
chosen
[ { "from": "human", "value": "Add seed code for PHP.\n" }, { "from": "gpt", "value": "<?php\ni = 0;\nf();\n\nif (i == 0) {\n\tif (j != 0) {\n\t} elseif (2 > j) {\n\t}\n} elseif (1 < i) {\n}\nelse {\n}\n\nwhile (i != 0) {\n\twhile (j == 0) {\n\t}\n}\n\ndo {\n\tdo {\n\t} while (j == 0);\n} while (i...
php
chosen
[ { "from": "human", "value": "Add designated responder for invocation via middleware\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Fuzz\\ApiServer;\n\nuse Illuminate\\Support\\Facades\\Config;\nuse Illuminate\\Support\\Facades\\Response;\nuse Fuzz\\ApiServer\\Exception\\HttpException;\nuse ...
php
chosen
[ { "from": "human", "value": "Add tex plugin (use Google Graph API)\n" }, { "from": "gpt", "value": "<?php\n\nfunction kona3plugins_tex_execute($args) {\n $text = array_shift($args);\n //\n $api = \"https://chart.googleapis.com/chart?cht=tx&chl=\";\n $url = $api .= urlencode($text);\n $html ...
php
chosen
[ { "from": "human", "value": "Move tests to each component\n" }, { "from": "gpt", "value": "<?php\n\nnamespace React\\Tests\\Cache;\n\nuse React\\Cache\\ArrayCache;\nuse React\\Tests\\Socket\\TestCase;\n\nclass ArrayCacheTest extends TestCase\n{\n private $cache;\n\n public function setUp()...
php
chosen
[ { "from": "human", "value": "Convert .mo file to strings.php\n" }, { "from": "gpt", "value": "<?php\n\nfunction po2php_run($argv, $argc) {\n\n\tif ($argc!=2) {\n\t\tprint \"Usage: \".$argv[0].\" <file.mo>\\n\\n\";\n\t\treturn;\n\t}\n\t\n\t$mofile = $argv[1];\n\t$outfile = dirname($mofile).\"/str...
php
chosen
[ { "from": "human", "value": "Add test class for main regression class." }, { "from": "gpt", "value": "<?php\n\nuse mcordingley\\Regression\\Regression;\nuse mcordingley\\Regression\\RegressionStrategy\\LinearLeastSquares;\n\nclass RegressionTest extends PHPUnit_Framework_TestCase\n{\n protect...
php
chosen
[ { "from": "human", "value": "Add template for static front page\n" }, { "from": "gpt", "value": "<?php\n\nget_header(); ?>\n\n\t<div id=\"primary\" class=\"content-area\">\n\t\t<main id=\"main\" class=\"site-main\" role=\"main\">\n\n\t\t\t<section class=\"site-hero-section\">\n\t\t\t <div class...
php
chosen
[ { "from": "human", "value": "Fix view cache clearing for Menu_Expanded_Trl\n" }, { "from": "gpt", "value": "<?php\nclass Kwc_Menu_Expanded_Trl_Events extends Kwc_Menu_Abstract_Events\n{\n protected $_numLevels = 2;\n protected function _initSettings()\n {\n $mcc = Kwc_Abstract::g...
php
chosen
[ { "from": "human", "value": "Add some unit tests for Server API" }, { "from": "gpt", "value": "<?php\n\nuse Socks\\Server;\n\nclass ServerApiTest extends TestCase\n{\n /** @var Server */\n private $server;\n \n public function setUp()\n {\n $socket = $this->getMockBuilder('...
php
chosen
[ { "from": "human", "value": "Revert \"Revert \"Add unit test\"\"\n\nThis reverts commit 0d5943fb514495d214d954b785bb80e833f578ae.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace admintests\\admin\\ngrest\\base;\n\nuse admintests\\AdminTestCase;\nuse luya\\admin\\models\\User;\nuse yii\\base\...
php
chosen
[ { "from": "human", "value": "Add webhook service for CRUD actions on a lists webhooks\n" }, { "from": "gpt", "value": "<?php namespace Phpclient;\n\nclass HLWebhooks extends HLBase\n{\n public function __construct(HLClient $client)\n {\n $this->setClient($client);\n }\n\n publ...
php
chosen
[ { "from": "human", "value": "Add abstract shop cart class\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: Jan\n * Date: 3.5.14\n * Time: 19:06\n */\n\nnamespace Trejjam\\Utils;\n\nuse Nette,\n\tTrejjam;\n\n/**\n * Manage shopping cart\n * @package App\\Model\n */\n...
php
chosen
[ { "from": "human", "value": "Check whether the given faces belong to the same person or not." }, { "from": "gpt", "value": "<?php\n/*\n * PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github\n * https://github.com/symisc/pixlab-php \n */\nre...
php
chosen
[ { "from": "human", "value": "Create abstraction for bitbucket commands\n" }, { "from": "gpt", "value": "<?php\n/**\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n *\n * @author Stephane HULARD <s.hulard@chstudio.f...
php
chosen
[ { "from": "human", "value": "Add a script to remove duplicate unused email accounts.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Script to remove users with\n *\n * to run:\n * drush --script-path=../scripts/ php-script remove-duplicate-emails.php\n */\n\n$users = db_query('SELECT * FROM use...
php
chosen
[ { "from": "human", "value": "Add default testcase for setup\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Edofre\\Fullcalendar\\Test\\Integration;\n\nuse Orchestra\\Testbench\\TestCase as Orchestra;\n\n/**\n * Class TestCase\n * @package Edofre\\Fullcalendar\\Test\\Integration\n */\nabstra...
php
chosen
[ { "from": "human", "value": "Add test for XHPUnsafeRendable and XHPAlwaysValidChild\n" }, { "from": "gpt", "value": "<?hh\n\n// Please see MIGRATING.md for information on how these should be used in\n// practice; please don't create/use classes as unsafe as these examples.\n\nclass ExampleUnsafe...
php
chosen
[ { "from": "human", "value": "Add partial left 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 partialLeft Mimic library function.\n *\n * @since 0.1.0\n */\nclass Partia...
php
chosen
[ { "from": "human", "value": "TASK: Add code migration to convert unspecified VOs to embedded=false" }, { "from": "gpt", "value": "<?php\nnamespace Neos\\Flow\\Core\\Migrations;\n\n/*\n * This file is part of the Neos.Flow package.\n *\n * (c) Contributors of the Neos Project - www.neos.io\n *\n ...
php
chosen
[ { "from": "human", "value": "Fix the name of the file for the Facade\n" }, { "from": "gpt", "value": "<?php namespace Antoineaugusti\\LaravelEasyrec\\Facades;\n\nuse Illuminate\\Support\\Facades\\Facade;\n\nclass LaravelEasyrec extends Facade\n{\n\t/**\n\t * Get the registered name of the compon...
php
chosen
[ { "from": "human", "value": "Add Base (console) Task Test\n" }, { "from": "gpt", "value": "<?php\n\nuse Aedart\\Scaffold\\Tasks\\BaseTask;\nuse Mockery as m;\n\n/**\n * Class BaseTaskTest\n *\n * @group tasks\n * @group baseTask\n *\n * @coversDefaultClass Aedart\\Scaffold\\Tasks\\BaseTask\n * @...
php
chosen
[ { "from": "human", "value": "Add example showing Curl::diagnose() usage\n" }, { "from": "gpt", "value": "<?php\n// keywords: diagnose, troubleshoot, help\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\nuse Curl\\Curl;\n\n$curl = new Curl();\n$curl->get('https://httpbin.org/status/400');\n\nif...
php
chosen
[ { "from": "human", "value": "Add a kick command to kick buried job from a tube\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Leezy\\PheanstalkBundle\\Command;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nu...
php
chosen
[ { "from": "human", "value": "Verify that URLs can be collected from child sitemaps\n" }, { "from": "gpt", "value": "<?php\n\nclass GetUrlsFromChildrenTest extends BaseTest {\n \n public function setUp() {\n $this->setTestFixturePath(__CLASS__, $this->getName());\n } \n \n ...
php
chosen
[ { "from": "human", "value": "Create a component service for functionality related to SystemComponent entities.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Services;\n\nuse App\\Contracts\\SystemComponent;\nuse BadMethodCallException;\nuse Closure;\nuse Exception;\nuse Illuminate\\Su...
php
chosen
[ { "from": "human", "value": "Add helper class to test protected class interface\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Afrihost\\BaseCommandBundle\\Tests\\Fixtures;\n\n\nclass EncapsulationViolator\n{\n /**\n * Call protected/private method of a class. A method that violates ...
php
chosen
[ { "from": "human", "value": "Add fulltext search plugin for MySQL\n" }, { "from": "gpt", "value": "<?php\n\n/*\n\tThis plugin requires that you are running MySQL/MariaDB 5.6 or better.\n\n\tRun the following against your MySQL installation in the database that contains TinyTinyRSS:\n\n\tCREATE F...
php
chosen
[ { "from": "human", "value": "Add new template for 2 columns and 1 wide column.\n" }, { "from": "gpt", "value": "<?php\n/*\nTemplate Name: 2 Spalten, 1 volle Breite\n*/\n?>\n\n<div class=\"clearfix\">\n <?php get_template_part('templates/page', 'header'); ?>\n\n <div class=\"row-fluid\">\n <...
php
chosen
[ { "from": "human", "value": "Add a base class Bitrix24Entity\n" }, { "from": "gpt", "value": "<?php\nnamespace Bitrix24;\n\n/**\n * Class Bitrix24Entity\n */\nabstract class Bitrix24Entity\n{\n\tconst ITEMS_PER_PAGE_LIMIT = 50;\n\n\t/**\n\t * @var Bitrix24\n\t */\n\tpublic $client = null;\n\n\t/...
php
chosen
[ { "from": "human", "value": "Add script to add images into Memcache\n" }, { "from": "gpt", "value": "#!/usr/local/bin/php\n<?php\n/**\n * Add all images to MemCache, if available\n *\n * http://www.kutukupret.com/2011/05/13/nginx-memcached-module-caching-webiste-image-using-memcached/\n *\n * @a...
php
chosen
[ { "from": "human", "value": "Fix weapon data of Custom Jr.\n" }, { "from": "gpt", "value": "<?php\n/**\n * @copyright Copyright (C) 2015-2017 AIZAWA Hina\n * @license https://github.com/fetus-hina/stat.ink/blob/master/LICENSE MIT\n * @author AIZAWA Hina <hina@bouhime.com>\n */\n\nuse app\\compon...
php
chosen
[ { "from": "human", "value": "Add a missing bootstrap file\n" }, { "from": "gpt", "value": "<?php\n/*=========================================================================\n MIDAS Server\n Copyright (c) Kitware SAS. 26 rue Louis Guérin. 69100 Villeurbanne, FRANCE\n All rights reserved.\n More ...
php
chosen
[ { "from": "human", "value": "Create Project Titles data source" }, { "from": "gpt", "value": "<?php\n\n\trequire_once(TOOLKIT . '/class.datasource.php');\n\t\n\tClass datasourceproject_titles extends Datasource{\n\t\t\n\t\tpublic $dsParamROOTELEMENT = 'project-titles';\r\n\t\tpublic $dsParamORDE...
php
chosen
[ { "from": "human", "value": "Create an interface for module entity managers\n" }, { "from": "gpt", "value": "<?php\n/*\n * This file is part of the Harmony package.\n *\n * (c) Tim Goudriaan <tim@harmony-project.io>\n *\n * For the full copyright and license information, please view the LICENSE\...
php
chosen
[ { "from": "human", "value": "Initialize admin page for adding posts\n" }, { "from": "gpt", "value": "<php?\n\n?>\n\n<!DOCTYPE html>\n\n<html lang = \"en\">\n\t\n\t<head>\n\t\t<title>Welcome to the admin page</title>\n\t</head>\n\t\n\t<body>\n\t\t<h1>Admin page!</h1>\n\t</body>\n\t\n</html>" } ...
php
chosen
[ { "from": "human", "value": "Add service class for applying adjustments\n" }, { "from": "gpt", "value": "<?php\nnamespace SnowIO\\ExtendedSalesRepositories\\Model;\n\nuse Magento\\Sales\\Api\\Data\\CreditmemoInterface;\n\n/**\n * Class ApplyAdjustments\n *\n * @package SnowIO\\ExtendedSalesRepos...
php
chosen
[ { "from": "human", "value": "Add bogo sort algorithm in PHP\n" }, { "from": "gpt", "value": "<?php\n\n/* Example Usage:\n print_r(bogosort([5,17,-13,15,14,16]));\n*/\n\nfunction isSorted($array)\n{\n\tif (count($array) <= 1) {\n\t\treturn true;\n\t}\n\n\tfor ($i = 1; $i < count($array); $i++)...
php
chosen
[ { "from": "human", "value": "Add Dynamic Text Group driver (for export)\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * Import Driver for type: dynamictextgroup\n */\n\nclass ImportDriver_dynamictextgroup extends ImportDriver_default {\n\n /**\n * Constructor\n * @return void\n *...
php
chosen
[ { "from": "human", "value": "WIP: Introduce connection factory\nQuestions:\n should it have a options argument, so you can override configuration?\n" }, { "from": "gpt", "value": "<?php\nnamespace Neos\\Flow\\Persistence\\Doctrine;\n\n/*\n * This file is part of the Neos.Flow package.\n *\n * (c...
php
chosen
[ { "from": "human", "value": "Add personal section based on IIconSection interface\n" }, { "from": "gpt", "value": "<?php\n/**\n * OwnCloud - B2sharebridge App\n *\n * PHP Version 7\n *\n * @category Nextcloud\n * @package B2shareBridge\n * @author EUDAT <b2drop-devel@postit.csc.fi>\n * @co...
php
chosen
[ { "from": "system", "value": "Allow to click link by index\n" }, { "from": "human", "value": "<?php\n\nnamespace Knp\\FriendlyContexts\\Context;\n\nuse Behat\\MinkExtension\\Context\\MinkContext as BaseMinkContext;\nuse Behat\\Mink\\Exception\\ElementNotFoundException;\n\nclass MinkContext exten...
php
chosen
[ { "from": "system", "value": "Add share() method to view factory contract." }, { "from": "human", "value": "<?php namespace Illuminate\\Contracts\\View;\n\ninterface Factory {\n\n\t/**\n\t * Determine if a given view exists.\n\t *\n\t * @param string $view\n\t * @return bool\n\t */\n\tpublic f...
php
chosen
[ { "from": "human", "value": "Add new fake for put function tests.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Mimic\\Test\\Fake;\n\nclass Put {\n\tpublic $one;\n\tpublic $two;\n\n\tprotected $_internal = array();\n\n\tpublic function __get($name) {\n\t\treturn $this->_internal[$name];\n\...
php
chosen
[ { "from": "human", "value": "Add base test case class for all Zimbra Mail test cases.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Zimbra\\Mail\\Tests;\n\nuse \\PHPUnit_Framework_TestCase;\nuse Faker\\Factory as FakerFactory;\n\n/**\n * Base testcase class for all Zimbra Mail testcases.\n...
php
chosen
[ { "from": "human", "value": "Add interface for the DocBlockFactory\n" }, { "from": "gpt", "value": "<?php\nnamespace phpDocumentor\\Reflection;\n\ninterface DocBlockFactoryInterface\n{\n /**\n * Factory method for easy instantiation.\n *\n * @param string[] $additionalTags\n *...
php
chosen
[ { "from": "human", "value": "Add unit test for Route class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace RAPL\\Tests\\Unit\\Mapping;\n\nuse RAPL\\RAPL\\Mapping\\Route;\n\nclass RouteTest extends \\PHPUnit_Framework_TestCase\n{\n public function testRoute()\n {\n $pattern = '...
php
chosen
[ { "from": "human", "value": "Implement a rough database query function\n" }, { "from": "gpt", "value": "<?php\n\n$type2attr = [\n 'article' => [\n 'required' => ['author', 'title', 'journal', 'year'],\n 'optional' => ['volume', 'number', 'pages', 'month', 'note']\n ],\n 'b...
php
chosen
[ { "from": "human", "value": "Add method to lookup the JSON file for a translation\n" }, { "from": "gpt", "value": "<?php\ndefined('C5_EXECUTE') || die('Access Denied.');\nclass Localization extends Concrete5_Library_Localization\n{\n /**\n * For client-side translations, we need to supply...
php
chosen
[ { "from": "human", "value": "Add Like tests for COM API\n\nOnly the COM api supports likes. This class contains tests for that feature.\n" }, { "from": "gpt", "value": "<?php\r\n/**\r\n * Created by PhpStorm.\r\n * User: Nabeel\r\n * Date: 2015-10-18\r\n * Time: 8:25 AM\r\n */\r\n\r\nnamespace S...
php
chosen
[ { "from": "human", "value": "Add base class for admin ordering tool.\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once 'Admin/pages/AdminOrder.php';\n\n/**\n * @package Building\n * @copyright 2014 silverorange\n * @license http://www.opensource.org/licenses/mit-license.html MIT License...
php
chosen
[ { "from": "human", "value": "Implement a validator for the admin options.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace FluxBB\\Validator;\n\nuse FluxBB\\Core\\Validator;\n\nclass OptionsValidator extends Validator\n{\n /**\n * Get the rules to validate against.\n *\n * @ret...
php
chosen
[ { "from": "human", "value": "Create the Modify Dictionary class\n" }, { "from": "gpt", "value": "<?php\n/**\n * Class ModifyDictionary: The data access object.\n * This class performs the basic CRUD operations\n * on the dictionary object returned by\n * a static call to the getDictionary\n * me...
php
chosen
[ { "from": "human", "value": "Add script to aggregate data from task files\n" }, { "from": "gpt", "value": "<?php\n\n/*\n This script walk among the result files produced by command tasks\n producing a report.\n\n Author: Fernando Bevilacqua <fernando.bevilacqua@his.se>\n */\n\nfunction aggredate...
php
chosen
[ { "from": "human", "value": "Add fir fully functionnal version.\n" }, { "from": "gpt", "value": "<?php\n/**\n * FontAwesome Helper\n *\n * PHP 5\n *\n * @copyright Copyright (c) Sylvain Lévesque (http://www.gezere.com)\n * @link http://www.gezere.com\n * @package app.View.Helper\n */\n\nclass Fo...
php
chosen
[ { "from": "human", "value": "Update core tables to bigint\n" }, { "from": "gpt", "value": "<?php\n\nnamespace OC\\Migrations;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\nuse Doctrine\\DBAL\\Types\\Type;\nuse OCP\\Migration\\ISchemaMigration;\n\n/**\n * Updates some fields to bigint if required\n */\...
php
chosen
[ { "from": "human", "value": "Add unit tests for Curl HttpClient driver\n" }, { "from": "gpt", "value": "<?php\n\nclass Github_Tests_HttpClient_CurlTest extends PHPUnit_Framework_TestCase\n{\n public function testDoRequest()\n {\n $url = 'http://site.com/some/path';\n $c...
php
chosen
[ { "from": "human", "value": "Add Tests for the Twig Extension\n\nDidn't have tests before for some reason.\n" }, { "from": "gpt", "value": "<?php declare(strict_types=1);\n\n/*\n * This file is part of chrisguitarguy/request-id-bundle\n * Copyright (c) Christopher Davis <http://christopherdavis....
php
chosen
[ { "from": "human", "value": "Add unit test for entity Conversation\n" }, { "from": "gpt", "value": "<?php\n\nnamespace FD\\PrivateMessageBundle\\Tests\\Entity;\n\nuse Doctrine\\Common\\Collections\\ArrayCollection;\nuse FD\\PrivateMessageBundle\\Entity\\Conversation;\nuse FD\\PrivateMessageBundl...
php
chosen
[ { "from": "human", "value": "Add tests for scope search\n" }, { "from": "gpt", "value": "<?php\n\nnamespace OpenCFP\\Test\\Domain\\Model;\n\nuse OpenCFP\\Domain\\Model\\User;\nuse OpenCFP\\Test\\DatabaseTransaction;\n\n/**\n * @group db\n */\nclass UserTest extends \\PHPUnit\\Framework\\TestCase...
php
chosen
[ { "from": "human", "value": "Add a missing html utils file.\n\nThis contains helper methods for the index and login pages, and\nshould have been part of f1cedae3f3 which made the combination of\nstatic files configurable.\n\nChange-Id: I17e3cfd9323081fc75c66c13fd59514f5e089f58\n" }, { "from": "gpt",...
php
chosen
[ { "from": "human", "value": "Create the interface that all modules must implement\n" }, { "from": "gpt", "value": "<?php\n\nnamespace duncan3dc\\MetaAudio\\Modules;\n\n/**\n * Interface that all modules must implement to read tags.\n */\ninterface ModuleInterface\n{\n\n /**\n * Get the tr...
php
chosen
[ { "from": "human", "value": "Add quick DELETE query class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace QueryBuilder;\n\n\nclass DeleteQuery extends Query {\n /** @var bool */\n private $low_priority;\n\n /** @var bool */\n private $quick;\n\n /** @var bool */\n private $...
php
chosen
[ { "from": "human", "value": "Enable analytics tab for all partners with kmc_version = 3\n\ngit-svn-id: 8a2ccb88241e16c78017770bc38d91d6d5396a5a@57769 6b8eccd3-e8c5-4e7d-8186-e12b5326b719\n" }, { "from": "gpt", "value": "<?php\r\n\r\n$dryRun = true; //TODO: change for real run\r\nif($argc > 1 && ...
php
chosen
[ { "from": "human", "value": "Add botamp_entity_id to attribute to product entity\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Botamp\\Botamp\\Setup;\n\nuse Magento\\Eav\\Setup\\EavSetup;\nuse Magento\\Eav\\Setup\\EavSetupFactory;\nuse Magento\\Framework\\Setup\\InstallDataInterface;\nuse ...
php
chosen
[ { "from": "human", "value": "Add missing post_id foreign key\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Schema\\Builder;\n\nreturn [\n 'up' => function (Builder $schema) {\n $schema->table('fof_upload_downloads', fu...
php
chosen
[ { "from": "human", "value": "ADD script to update movies data from IMDb" }, { "from": "gpt", "value": "<?php\n\n/**\n * This script fetch all data from IMDb and save it in our database.\n * It will overwrite existing data (update).\n */\n\n\nrequire_once('../public/index.php');\n\n$movies = Defa...
php
chosen
[ { "from": "human", "value": "Add basic sharp assertions test\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Code16\\Sharp\\Tests\\Unit\\Utils\\Testing;\n\nuse Code16\\Sharp\\Tests\\SharpTestCase;\nuse Code16\\Sharp\\Utils\\Testing\\SharpAssertions;\nuse Illuminate\\Testing\\TestResponse;\nu...
php
chosen
[ { "from": "human", "value": "Rename files (2 of 2)\n" }, { "from": "gpt", "value": "<?php\r\n/*\r\nPlugin Name: Comment Timeout\r\nPlugin URI: http://www.jamesmckay.net/code/comment-timeout/\r\nDescription: Automatically closes comments on blog entries after a user-configurable period of time. I...
php
chosen
[ { "from": "human", "value": "refactor: Add logger, using psr/log interface\n" }, { "from": "gpt", "value": "<?php\n\nnamespace TijsVerkoyen\\Bpost;\n\n\nuse Psr\\Log\\LoggerInterface;\n\nclass Logger\n{\n /** @var LoggerInterface */\n private $logger;\n\n public function setLogger(Logg...
php
chosen
[ { "from": "human", "value": "Add a test ChildpageController styleguide page to esnure it works properly\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Styleguide\\Pages;\n\nclass NotInMenu extends Page\n{\n /** {@inheritdoc} **/\n public $path = '/styleguide/not/in/menu';\n\n /**\n...
php
chosen
[ { "from": "human", "value": "Add controller test for \"change password\"\n" }, { "from": "gpt", "value": "<?php\nclass Ikonoshirt_Pbkdf2_Test_Controller_AccountController extends EcomDev_PHPUnit_Test_Case_Controller\n{\n /*\n * Test data\n */\n const OLD_PASSWORD = 'oldpass',\n ...
php
chosen
[ { "from": "human", "value": "Improve API of adapter asserter and mock asserter. WARNING : this version is not backward compatible.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace mageekguy\\atoum\\mock;\n\ninterface observer\n{\n\tpublic function getCalls($functionName, array $arguments = nu...
php
chosen
[ { "from": "human", "value": "Add index for fonts module\n" }, { "from": "gpt", "value": "<?php\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Capsule\\Manager as Capsule;\n\nclass FontsAddIndex extends Migration\n{\n ...
php
chosen
[ { "from": "human", "value": "Add first useful function array_try" }, { "from": "gpt", "value": "<?php\n\nnamespace yii\\helpers;\n\n/**\n * ArrayHelper provides additional array functionality that you can use in your\n * application.\n *\n * @author Maksim Tikhonov aka Maksio <bnr17@yandex.ru>\n...
php
chosen
[ { "from": "human", "value": "Create URI Data Provider Trait\n" }, { "from": "gpt", "value": "<?php\n\nnamespace tests\\Traits;\n\nuse tests\\Providers\\AsciiUrlDataProvider;\nuse tests\\Providers\\UtfUrlDataProvider;\nuse tests\\Providers\\Ipv4UrlDataProvider;\nuse tests\\Providers\\Ipv6UrlDataP...
php
chosen
[ { "from": "human", "value": "Allow 'Spark' to be Run Anywhere\n\nRunning the 'Spark' framework through `info.php` allows the application\nto be run in a directory other than root and without 'rewrite' rules.\n" }, { "from": "gpt", "value": "<?php\n$filename = basename(__FILE__);\n$request_uri = ...
php
chosen
[ { "from": "human", "value": "[FEATURE] Add viewhelper to render inline svgs\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the package bk2k/bootstrap-package.\n *\n * For the full copyright and license information, please read the\n * LICENSE file that was distributed with...
php
chosen
[ { "from": "human", "value": "Add tests for DictTool class\n" }, { "from": "gpt", "value": "<?php\nnamespace Dara\\UrbanDict\\Test;\n\nuse Dara\\UrbanDict\\DictTool;\nuse Dara\\UrbanDict\\DictStore;\n\nclass DictToolTest extends \\PHPUnit_Framework_TestCase\n{\n protected $dictStore;\n protecte...
php
chosen
[ { "from": "human", "value": "Add first tests for mustache class\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * Mustache PHP Compiler - Test the Mustache class\n *\n * (c) July 2011 - Manuel Odendahl - wesen@ruinwesen.com\n */\n\nrequire_once(dirname(__FILE__).\"/../vendor/simpletest/autorun.ph...
php
chosen
[ { "from": "human", "value": "saml2: Add a class for SAML2 constants.\n\nThis patch adds the SimpleSAML_XML_SAML2 class, which currently contain\nSAML 2 status codes constants. New SAML2 constants should be added to this\nclass.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Various SAML 2 con...
php
chosen
[ { "from": "human", "value": "Add an example of creating a customer with a card by passing the card details directly.\n" }, { "from": "gpt", "value": "<?php\n require_once('./config.php');\n\n#from the api docs https://stripe.com/docs/api#create_card\n\n# You probably do not want to do this !!\n...
php
chosen
[ { "from": "human", "value": "Add a database helper to change database on the fly" }, { "from": "gpt", "value": "<?php\nnamespace common\\commands;\n\nuse Yii;\n\nclass DatabaseHelper\n{\n public function changeOdooDBTo($db_name){\n $database = 'db';\n \n return $this->cha...
php
chosen
[ { "from": "human", "value": "Add a result container class\n" }, { "from": "gpt", "value": "<?php\nnamespace Bolt\\Configuration\\Check;\n\n/**\n * A container class for a check result.\n *\n * @author Gawain Lynch <gawain.lynch@gmail.com>\n */\nclass Result implements \\JsonSerializable\n{\n ...
php
chosen
[ { "from": "system", "value": "Fix use command argument validation\n" }, { "from": "human", "value": "<?php\nnamespace PhpBrew\\Command;\nuse CLIFramework\\Command;\nuse PhpBrew\\Config;\nuse Exception;\n\nclass UseCommand extends Command\n{\n\n public function arguments($args) {\n $arg...
php
chosen
[ { "from": "human", "value": "Add 'hidden' flag to UserChannel\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddHiddenToUserChannels extends Migration\n{\n /**\n * Run the migrations.\n *\n...
php
chosen