conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add command for outputting the latest version number\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Doctrine MigrationsBundle\n *\n * The code was originally distributed inside the Symfony framework.\n *\n * (c) Fabien Potencier <fabien@sym...
php
chosen
[ { "from": "human", "value": "Add controll utils: some function for check the input\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: Utente\n * Date: 02/12/2016\n * Time: 13:32\n */\n\n /**\n * @param $data\n * @return string\n *\n *This function del...
php
chosen
[ { "from": "human", "value": "Add script to create development version files\n" }, { "from": "gpt", "value": "<?php\nfunction make_dev_versions() {\n\tfile_put_contents(\"../versions/versions-test-\" . rand(0, 3) . \".\" . rand(0, 3) . \".\" . rand(0, 3) . \".\", \"\");\n}\n\nfor($i = 0; $i < 10;...
php
chosen
[ { "from": "human", "value": "Move folder fw to its own git and composer package\n" }, { "from": "gpt", "value": "<?php\r\n\r\ndefine('PATH_PROJECT', \t\t__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR);\r\ndefine('PATH_APP', \tPATH_PROJECT . 'app' . DIRECTORY_SEPARATOR);\r\...
php
chosen
[ { "from": "human", "value": "Add diagnostic tests for unset()\n" }, { "from": "gpt", "value": "<?php\n\nfunction bar($arg) {\n $foo = 42;\n echo $foo;\n\n unset($foo);\n echo $foo/*!PHP3007!*/;\n\n $foo = 24;\n\n if ($arg == 1) {\n unset($foo);\n }\n\n echo $foo/*!PHP3007!*/;\n\n $fo...
php
chosen
[ { "from": "human", "value": "Remove country col from items migration\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass RemoveCountryFromItems extends Migration {\n\n\t/**\n\t * Run the migrations.\n\t...
php
chosen
[ { "from": "human", "value": "Create unit test for Response\\AjaxResponse\n" }, { "from": "gpt", "value": "<?php\n\nnamespace BlueTea\\AjaxResponseBundle\\Tests\\Response;\n\nuse BlueTea\\AjaxResponseBundle\\Response\\AjaxResponse;\n\nclass AjaxResponseTest extends \\PHPUnit_Framework_TestCase\n{...
php
chosen
[ { "from": "human", "value": "Rework currency context internals, store it in a cookie\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 t...
php
chosen
[ { "from": "human", "value": "Add additional columns to users table migration\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddAdditionalColumnsToUsersTable extends Migration\n{\n /**\n * Ru...
php
chosen
[ { "from": "human", "value": "Add example to delegate parameters\n\nResolves #148.\n" }, { "from": "gpt", "value": "<?php\n\nrequire __DIR__ . \"/../vendor/autoload.php\";\n\nclass A {\n private $a;\n private $b;\n\n public function __construct(stdClass $a, stdClass $b) {\n $this-...
php
chosen
[ { "from": "human", "value": "Create a compiler pass to alias the mime and extension guessers to the `mime_types` service" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the `liip/LiipImagineBundle` project.\n *\n * (c) https://github.com/liip/LiipImagineBundle/graphs/contribu...
php
chosen
[ { "from": "human", "value": "Test for CookieIdentity class, which cause the previous improvements\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Palladium\\Exception\\Authentication;\n\nuse Palladium\\Component\\AppException as Exception;\n\n\nclass InvalidCookieToken extends Exception\n{\n...
php
chosen
[ { "from": "human", "value": "Add docker image info migration\n" }, { "from": "gpt", "value": "<?php\n\nnamespace EE\\Migration;\n\nuse EE;\nuse EE\\Migration\\Base;\n\nclass InsertDockerImagesVersion extends Base {\n\n\tprivate static $pdo;\n\n\tpublic function __construct() {\n\n\t\ttry {\n\t\t...
php
chosen
[ { "from": "human", "value": "Add PHPUnit test for Stripe_Coupon\n" }, { "from": "gpt", "value": "<?php\n\nclass Stripe_CouponTest extends Stripe_TestCase\n{\n public function testSave()\n {\n self::authorizeFromEnv();\n $id = 'test_coupon-' . self::randomString();\n $c = Stripe_Coupon...
php
chosen
[ { "from": "human", "value": "Add vagrant to boot apache to localhost:30080\n" }, { "from": "gpt", "value": "<?php\n\nclass Crime extends Module {\n\n public $url = \"https://data.bathhacked.org/resource/e46f-mhfs.json\";\n public $pc = \"\";\n\n \n function __construct($postcode) {\...
php
chosen
[ { "from": "human", "value": "Add snippet for displaying generic login error message.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Plugin Name: Restrict Content Pro - Generic Login Error\n * Description: Makes the login form error more generic to prevent revealing whether or not the account ex...
php
chosen
[ { "from": "system", "value": "Fix unacceptably light-hearted string in serious business mode\n\nSummary: A serious business lost a bunch of serious business partners today because of this string, I assume.\n\nTest Plan: Enabled serious mode, clicked button, was relieved to see no jokes.\n\nReviewers: btraha...
php
chosen
[ { "from": "human", "value": "Add example apge for CSS/JS\n" }, { "from": "gpt", "value": "<?php\n\trequire_once __DIR__.'/_puff/sitewide.php';\n\t$Page['Type'] = 'Index';\n\t$Page['Title'] = 'Puff Sys';\n\t$Page['Description'] = 'Puff is Awesome';\n\t$Page['JS'][] = 'http://a...
php
chosen
[ { "from": "human", "value": "Add test for processor registry\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Pipe\\Test\\Util;\n\nuse Pipe\\Util\\ProcessorRegistry;\n\nclass ProcessorRegistryTest extends \\PHPUnit_Framework_TestCase\n{\n protected $registry;\n\n function setup()\n {...
php
chosen
[ { "from": "human", "value": "Add migration for project settings.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddSettingsToProjects extends Migration {\n\n\t/**\n\t * Run the migrations.\n\t *\n\...
php
chosen
[ { "from": "human", "value": "Add new asset test class to test method check with multiple params" }, { "from": "gpt", "value": "<?php\n/*\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO,...
php
chosen
[ { "from": "human", "value": "Add executor file to git\n" }, { "from": "gpt", "value": "<?php\n\nnamespace BitWasp\\Stratum;\n\nuse BitWasp\\Stratum\\Request\\Request;\nuse BitWasp\\Stratum\\Request\\RequestFactory;\nuse React\\EventLoop\\LoopInterface;\nuse React\\Promise\\Deferred;\nuse React\\...
php
chosen
[ { "from": "human", "value": "Test asset - class that uses multiple traits indirectly\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Doctrine\\Tests\\Common\\Annotations\\Fixtures;\n\nuse Doctrine\\Tests\\Common\\Annotations\\Fixtures\\Annotation\\Route;\nuse Doctrine\\Tests\\Common\\Annotat...
php
chosen
[ { "from": "human", "value": "Add new system setting - 'Require exam before booking'\n" }, { "from": "gpt", "value": "<?php\n\nclass m170314_104129_add_new_system_setting_require_exam_before_booking extends CDbMigration\n{\n public function up()\n {\n $this->insert('setting_metadat...
php
chosen
[ { "from": "human", "value": "Add ServiceProvider for Laravel 4\n" }, { "from": "gpt", "value": "<?php\n\n\nnamespace Nam\\Realtime;\n\n\nuse Illuminate\\Support\\ServiceProvider;\nuse Nam\\Realtime\\Connectors\\PubnubConnector;\n\nclass RealtimeServiceProvider extends ServiceProvider\n{\n pro...
php
chosen
[ { "from": "human", "value": "Set info_items label to 'Key' instead of 'Keys'.\n\ngit-svn-id: d46fe582d22b46b457d3ac1c55a88da2fbe913a1@1697 baf6b65b-9124-4dc3-b1c0-01155b4af546\n" }, { "from": "gpt", "value": "<?php\n//use to set values in the database\n\ninclude_once(dirname(__FILE__) . \"/../.....
php
chosen
[ { "from": "human", "value": "Add Test case for AttachSpec.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Zimbra\\Mail\\Tests\\Struct;\n\nuse Zimbra\\Mail\\Tests\\ZimbraMailTestCase;\n\n/**\n * Testcase class for AttachSpec.\n */\nclass AttachSpecTest extends ZimbraMailTestCase\n{\n publ...
php
chosen
[ { "from": "human", "value": "Add a helper to validate status from WS\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AdobeConnectClient\\Helper;\n\nabstract class StatusValidate\n{\n public static function validate(array $status)\n {\n switch ($status['code']) {\n cas...
php
chosen
[ { "from": "human", "value": "Add a Money Embeddable Object.\n" }, { "from": "gpt", "value": "<?PHP\n\n/**\n * A Money Doctrine Embeddable object.\n *\n * This embeddable can be used to persist a money\n * value using Doctrine.\n *\n * @package Serendipity\\Framework\n * @subpackage ValueObject...
php
chosen
[ { "from": "human", "value": "Add Authenticated Test Case utility\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of Flarum.\n *\n * For detailed copyright and license information, please view the\n * LICENSE file that was distributed with this source code.\n */\n\nnamespace Fl...
php
chosen
[ { "from": "human", "value": "Add a featured user section\n" }, { "from": "gpt", "value": "<?php\n/**\n * Laconica, the distributed open-source microblogging tool\n *\n * Section for featured users\n *\n * PHP version 5\n *\n * LICENCE: This program is free software: you can redistribute it and/o...
php
chosen
[ { "from": "human", "value": "Add book api to get the number of reviews" }, { "from": "gpt", "value": "<?php\nrequire_once '../admin/php/connection.php';\n\n$index = isset($_GET['index'])? $_GET['index'] : 0;\n$count = isset($_GET['count'])? $_GET['count'] : 20;\n\n$db = open_connection();\n$db->...
php
chosen
[ { "from": "human", "value": "Test for document scheduled for both insertion and update\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Doctrine\\ODM\\MongoDB\\Tests\\Functional\\Ticket;\n\nuse Doctrine\\ODM\\MongoDB\\Events;\nuse Doctrine\\ODM\\MongoDB\\Event\\OnFlushEventArgs;\nuse Doctrine...
php
chosen
[ { "from": "system", "value": "CRM-4904: Refactor email body sync\n - Fix migrations\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\EmailBundle\\Migrations\\Schema\\v1_20;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\n\nuse Oro\\Bundle\\MigrationBundle\\Migration\\Migration;\nuse Or...
php
chosen
[ { "from": "human", "value": "Add test for processor view\n" }, { "from": "gpt", "value": "<?php\n/*\n * File: ViewsProcessorTest.php\n * Holds: Testes the Processor view\n * Created: 29.05.2016\n * Project: Youkok2\n *\n */\n\nnamespace Youkok2\\Tests\\Views;\n\nuse Youkok2\\Youkok2;\nuse Youkok...
php
chosen
[ { "from": "human", "value": "Add test for conversion funcs\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: Faramarz Salehpour\n */\n\n\nuse PersianToolkit\\PersianToolkit;\nuse PHPUnit\\Framework\\TestCase;\n\nclass PersianToolkitTest extends TestCase\n{\n /**\n...
php
chosen
[ { "from": "human", "value": "Add tests for the content extentions edit theme template page\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Tests\\Action;\n\nuse Common\\WebTestCase;\n\nclass EditThemeTemplateTest extends WebTestCase\n{\n public function te...
php
chosen
[ { "from": "human", "value": "Check whether user already has TWFY alert before showing TWFY advert.\n" }, { "from": "gpt", "value": "<?\n// authed.php:\n// Returns whether an email address has signed up to a TWFY alert for an MP.\n// Uses shared secret for authentication.\n//\n// Copyright (c) 20...
php
chosen
[ { "from": "human", "value": "Add unit tests for Pagecontext transformer\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Inanimatt\\SiteBuilder\\Transformer;\n\nuse \\Mockery as m;\n\nclass PagecontextTransformerTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @var PagecontextTra...
php
chosen
[ { "from": "human", "value": "Add doctrine configuration for service_provider_uuid\n" }, { "from": "gpt", "value": "<?php\n\nnamespace OpenConext\\EngineBlockBundle\\Authentication\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * Note: this entity is currently only used to configure doct...
php
chosen
[ { "from": "human", "value": "FEATURE: Watch Fusion parsing and rendering\n" }, { "from": "gpt", "value": "<?php\nnamespace Flownative\\Neos\\Tideways;\n\n/*\n * This file is part of the Flownative.Neos.Tideways package.\n *\n * (c) Flownative GmbH - https://www.flownative.com/\n *\n * This packa...
php
chosen
[ { "from": "human", "value": "Create migration that moves currency_id column to spaces table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass MoveCurrencyIdC...
php
chosen
[ { "from": "human", "value": "Add migration to create queue_units_returning table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateQueueUnitsReturningT...
php
chosen
[ { "from": "human", "value": "Add Response methods to interface\n" }, { "from": "gpt", "value": "<?php\n\nnamespace PhpWatson\\Sdk\\Interfaces;\n\nuse GuzzleHttp\\Psr7\\Response;\n\ninterface ResponseInterface\n{\n /**\n * Parse an incoming PSR7 response\n *\n * @param Response $re...
php
chosen
[ { "from": "system", "value": "BAP-9985: Add processor that will set total deleted items count into response header\n-- comment fix\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\ApiBundle\\Processor\\DeleteList;\n\nuse Oro\\Component\\ChainProcessor\\ContextInterface;\nuse Or...
php
chosen
[ { "from": "human", "value": "Add some tests for encrypted cookie's getters/setters\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests;\n\nuse \\Mockery as m;\nuse Rosio\\EncryptedCookie\\EncryptedCookie;\nuse Rosio\\EncryptedCookie\\CookieStorage;\nuse Rosio\\EncryptedCookie\\CryptoSystem...
php
chosen
[ { "from": "human", "value": "Implement stub for candidacy step 2\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\\Op...
php
chosen
[ { "from": "human", "value": "Edit page of the WebPage\n" }, { "from": "gpt", "value": "<?php\n\n require_once __DIR__ . \"/class/autoload.php\";\n\n use \\html\\Page as Page;\n use \\html\\Menu as Menu;\n use \\configuration\\Globals as Globals;\n use \\utilities\\Session as Sessi...
php
chosen
[ { "from": "human", "value": "Add a controller to expose an api with step types configurations\n" }, { "from": "gpt", "value": "<?php\n\nnamespace IDCI\\Bundle\\StepBundle\\Controller;\n\nuse FOS\\RestBundle\\Controller\\Annotations\\Get;\nuse FOS\\RestBundle\\Controller\\FOSRestController;\nuse ...
php
chosen
[ { "from": "human", "value": "Add plugin to detect non boolean value in binary logical arithmetics\n" }, { "from": "gpt", "value": "<?php declare(strict_types=1);\n# .phan/plugins/NonBoolInLogicalArithPlugin.php\n\nuse Phan\\AST\\AnalysisVisitor;\nuse Phan\\CodeBase;\nuse Phan\\Language\\Context;...
php
chosen
[ { "from": "human", "value": "BAP-12106: Create migration for commerce-crm upgrade to 2.0\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Oro\\Bundle\\TranslationBundle\\Migrations\\Data\\ORM;\n\nuse Doctrine\\Common\\DataFixtures\\AbstractFixture;\nuse Doctrine\\Common\\Persistence\\ObjectMa...
php
chosen
[ { "from": "human", "value": "Add basic command builder test\n" }, { "from": "gpt", "value": "<?php\n\nclass CommandBuilderTest extends PHPUnit_Framework_TestCase\n{\n public function test()\n {\n ob_start();\n $cmd = new PhpBrew\\CommandBuilder('ls');\n ok($cmd);\n ...
php
chosen
[ { "from": "human", "value": "Add `update-teams-membership-own` permission and assign to roles\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Spatie\\Permission\\Models\\Role;\nuse Spatie\\Permission\\Models\\...
php
chosen
[ { "from": "human", "value": "Make content field accept more characters by changing to medium text.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass ChangeContentToMediumText extends Migration {\n\n\t...
php
chosen
[ { "from": "human", "value": "Add unit tests for the Xml util class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace League\\CommonMark\\Tests\\Unit\\Util;\n\nuse League\\CommonMark\\Util\\Xml;\nuse PHPUnit\\Framework\\TestCase;\n\nclass XmlTest extends TestCase\n{\n /**\n * @param stri...
php
chosen
[ { "from": "human", "value": "Add unit test for CSS::convertMediaTypeAttributeToMediaQuery()\n" }, { "from": "gpt", "value": "<?php\n/**\n * JsMinifyTest.php\n * @author Dylan Ferris\n * @link https://github.com/acerix\n */\n\nnamespace rmrevin\\yii\\minify\\tests\\unit\\view;\n\nuse rmrevin\\yii...
php
chosen
[ { "from": "human", "value": "Test to verify that `Doctrine\\ORM\\Mapping\\ReflectionEmbeddedProperty` is able to interact with internal PHP classes\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Doctrine\\Tests\\ORM\\Mapping;\n\nuse Doctrine\\Instantiator\\Instantiator;\nuse Doctrine\\ORM\\...
php
chosen
[ { "from": "human", "value": "Fix reserved_by column of broken_posts missed during uuid migration\n" }, { "from": "gpt", "value": "<?php /** @noinspection SqlResolve */\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass ChangeBrokenPostsReservedByColumnType extends AbstractMigration {\n public...
php
chosen
[ { "from": "human", "value": "Add effect size to statistics.\n" }, { "from": "gpt", "value": "<?php\nnamespace MathPHP\\Statistics;\n\n/**\n * Effect size is a quantitative measure of the strength of a phenomenon.\n * https://en.wikipedia.org/wiki/Effect_size\n */\nclass EffectSize\n{\n /**\n ...
php
chosen
[ { "from": "human", "value": "Add PHP tests for validating business IDs\n" }, { "from": "gpt", "value": "<?php\n\nrequire($_SERVER['DOCUMENT_ROOT'] . 'includes/autoloader.php');\n\nuse PHPUnit\\Framework\\TestCase;\n\nclass BusinessTest extends PHPUnit\\Framework\\TestCase\n{\n\n public functi...
php
chosen
[ { "from": "human", "value": "Add a new Layer to handle setter / getter\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 tests for the WebSite schema\n" }, { "from": "gpt", "value": "<?php\n/**\n * Tests for the WebSite schema.\n *\n * @package Schemify\n */\n\nnamespace Test\\Schemas;\n\nuse Schemify\\Schemas\\WebSite;\nuse WP_UnitTestCase;\n\nclass WebSiteTest extends WP_UnitTest...
php
chosen
[ { "from": "human", "value": "Add tests for Helper classes\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Bjorvack\\ImageStacker\\Tests;\n\nuse Bjorvack\\ImageStacker\\Helpers\\FileManager;\nuse Bjorvack\\ImageStacker\\Helpers\\StringTransformer;\n\nclass HelpersTest extends BaseTest\n{\n ...
php
chosen
[ { "from": "system", "value": "Fix compatibility with Phalcon 2\n" }, { "from": "human", "value": "<?php\n/**\n * @author Patsura Dmitry https://github.com/ovr <talk@dmtry.me>\n */\n\nnamespace User;\n\nclass Module implements \\Phalcon\\Mvc\\ModuleDefinitionInterface\n{\n public function regi...
php
chosen
[ { "from": "human", "value": "Add unit test for Calcul without result, 100% coverage\n" }, { "from": "gpt", "value": "<?php\n\nnamespace SimplePHPEasyPlus\\Calcul;\n\nclass CalculTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @expectedException RuntimeException\n * @expectedExc...
php
chosen
[ { "from": "human", "value": "Add a sample application for the Google Analytics V3 API.\n" }, { "from": "gpt", "value": "<?php\nrequire_once '../../src/apiClient.php';\nrequire_once '../../src/contrib/apiAnalyticsService.php';\nsession_start();\n\n$client = new apiClient();\n$client->setApplicati...
php
chosen
[ { "from": "human", "value": "Add Terbilang datetime methods test" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests;\n\nuse Riskihajar\\Terbilang\\Facades\\Terbilang;\n\nclass TerbilangDateTimeTest extends TestCase\n{\n /** @test */\n public function date_method_can_convert_date_to_wo...
php
chosen
[ { "from": "human", "value": "Add example to dump task details\n" }, { "from": "gpt", "value": "<?php\nrequire_once('../asana.php');\n\n// See class comments and Asana API for full info\n$asana = new Asana(array('apiKey' => 'ki9hkSd.nFnGrx8mrXVgazKIQ7o4lb2I')); // Your API Key, you can get it in ...
php
chosen
[ { "from": "human", "value": "Add candidate 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\\Options...
php
chosen
[ { "from": "human", "value": "Add minimal test coverage for class declaration service\n" }, { "from": "gpt", "value": "<?php\n\nnamespace EdpSuperluminalTest\\ClassDeclaration;\n\nuse EdpSuperluminal\\ClassDeclaration\\ClassDeclarationService;\nuse EdpSuperluminal\\ClassDeclaration\\ClassTypeServ...
php
chosen
[ { "from": "human", "value": "Remove unique constraint from account plan constraint name\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Application\\Migrations;\n\nuse SimplyTestable\\BaseMigrationsBundle\\Migration\\BaseMigration,\n Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generat...
php
chosen
[ { "from": "human", "value": "Test the home page response status code\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Questo file è parte di usignolo.\n *\n * @author Daniele De Nobili\n * @copyright Web Agency Meta Line S.r.l.\n * @package ???\n */\n\nnamespace Usignolo\\Bundle\\UsignoloB...
php
chosen
[ { "from": "human", "value": "Move graph property algorithms to new Algorithm\\Property" }, { "from": "gpt", "value": "<?php\n\nnamespace Fhaculty\\Graph\\Algorithm\\Property;\n\nuse Fhaculty\\Graph\\Algorithm\\BaseGraph;\n\n/**\n * Simple algorithms for working with Graph properties\n *\n * @lin...
php
chosen
[ { "from": "human", "value": "Add tests for path should match rule\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of Slim HTTP Basic Authentication middleware\n *\n * Copyright (c) 2013-2014 Mika Tuupola\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/l...
php
chosen
[ { "from": "system", "value": "Wysiwyg: Adjust condition to allow for empty uploadsPath\n\nWithout this check, an empty URL will try converted to the current\nrequest action which is not something that is desired.\n" }, { "from": "human", "value": "<?php\n\nApp::uses('AppHelper', 'View/Helper');\...
php
chosen
[ { "from": "human", "value": "Add the bundle entry point class\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * \n * @author: Gabriel BONDAZ <gabriel.bondaz@idci-consulting.fr>\n * @license: MIT\n *\n */\n\nnamespace IDCI\\Bundle\\StepBundle;\n\nuse Symfony\\Component\\HttpKernel\\Bundle\\Bundl...
php
chosen
[ { "from": "human", "value": "Set service_type_id=2 of DutchSpecies Catalogue\n\ngit-svn-id: d46fe582d22b46b457d3ac1c55a88da2fbe913a1@532 baf6b65b-9124-4dc3-b1c0-01155b4af546\n" }, { "from": "gpt", "value": "#!/usr/local/bin/php\r\n<?php\r\n//use to set values in the database\r\n//exit;\r\n\r\n//...
php
chosen
[ { "from": "human", "value": "Add Api Token auth provider.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Laravel\\Lumen\\Auth\\Providers;\n\nuse Dingo\\Api\\Routing\\Route;\nuse Illuminate\\Http\\Request;\nuse ...
php
chosen
[ { "from": "human", "value": "Add combined `citi_id`, `updated_at` index to CITI tables [API-91]\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddCitiIdUp...
php
chosen
[ { "from": "human", "value": "Add PSR-4 Autoloader module directory and class file" }, { "from": "gpt", "value": "<?php\n\n/* \n * PSR-4 Class Autoloader\n *\n * Copyright 2017 Digital Web Development.\n *\n * http://digiwebdev.com.au\n *\n * Licensed under the Apache License, Ver...
php
chosen
[ { "from": "human", "value": ":white_check_mark: Add a test for dashboard data\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Feature;\n\nuse Tests\\TestCase;\nuse Illuminate\\Foundation\\Testing\\DatabaseTransactions;\nuse App\\Org;\nuse App\\User;\n\nclass DataTest extends TestCase\...
php
chosen
[ { "from": "human", "value": "Add a section for popular notices sitewide\n" }, { "from": "gpt", "value": "<?php\n/**\n * Laconica, the distributed open-source microblogging tool\n *\n * Base class for sections showing lists of notices\n *\n * PHP version 5\n *\n * LICENCE: This program is free so...
php
chosen
[ { "from": "human", "value": "Add unittest for sinking a ship\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Wecamp\\FlyingLiqourice\\Domain;\n\nuse Rhumsaa\\Uuid\\Uuid;\nuse Wecamp\\FlyingLiqourice\\Domain\\Game\\Coords;\nuse Wecamp\\FlyingLiqourice\\Domain\\Game\\Grid;\n\nfinal class GameT...
php
chosen
[ { "from": "human", "value": "Add a simple wrapper, no subdataobject loading, for SiteBotrMedia objects.\n\n\nsvn commit r72800\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once 'Site/dataobjects/SiteBotrMedia.php';\nrequire_once 'Site/dataobjects/SiteSimpleMediaWrapper.php';\n\n/**\n * A si...
php
chosen
[ { "from": "human", "value": "Make function to pull new kills\n" }, { "from": "gpt", "value": "<?php\n/**\n * Providence Slack DankFrags Killboard pull\n * User: ed\n * Date: 08/05/15\n * Time: 23:01\n */\n\nnamespace JamylBot\\Killbot;\n\n\nuse GuzzleHttp\\Client;\n\n/**\n * Class zkillMonkey\n ...
php
chosen
[ { "from": "human", "value": "Add consultation step1 form type\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Form\\Type\\Consultation;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Co...
php
chosen
[ { "from": "human", "value": "Add migration to populate db a little\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Lchski\\Migrations;\n\nuse \\Illuminate\\Database\\Capsule\\Manager as Capsule;\nuse \\Illuminate\\Database\\Schema\\Blueprint;\nuse Lchski\\Thing;\n\nclass PopulateThingsTableM...
php
chosen
[ { "from": "human", "value": "[fix] Make sure accepted timestamp is set\n\nRefs: https://qubeshub.org/support/ticket/1086\n" }, { "from": "gpt", "value": "<?php\n\nuse Hubzero\\Content\\Migration\\Base;\n\n// No direct access\ndefined('_HZEXEC_') or die();\n\n/**\n * Migration script for making s...
php
chosen
[ { "from": "human", "value": "Introduce abstract class for functional tests.\n" }, { "from": "gpt", "value": "<?php\n/**\n * @author Andreas Fischer <bantu@phpbb.com>\n * @copyright MMXIV Andreas Fischer\n * @license http://www.opensource.org/licenses/mit-license.html MIT License\n */\n\nab...
php
chosen
[ { "from": "human", "value": "Add full width template for use with team page.\n" }, { "from": "gpt", "value": "<?php\n/*\nTemplate Name: Full Width Page\n*/\n?>\n\n<div class=\"container hypo-space-at-bottom\">\n\t<?php while (have_posts()) : the_post(); ?>\n\t <?php get_template_part('templates...
php
chosen
[ { "from": "human", "value": "Add snippet for sending pending payment reminder emails\n" }, { "from": "gpt", "value": "<?php\n/**\n * Sends an email to a member when their payment has remained \"Pending\" for 24 hours.\n * This can help remind users that their payment has not completed and prompt...
php
chosen
[ { "from": "system", "value": "Return bad request for any method\n\nWe don't restrict this to GET, copied that in error.\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController;\nuse...
php
chosen
[ { "from": "human", "value": "Add base proxy agent class\n" }, { "from": "gpt", "value": "<?php\nnamespace NinjaSentry;\n\n/**\n * ----------------------------\n * ProxyAgent v0.0.1\n * ----------------------------\n * NinjaSentry.com 2016\n * ----------------------------\n */\n\n/**\n * Class Pr...
php
chosen
[ { "from": "human", "value": "Apply a user supplied function to every member of an array\n" }, { "from": "gpt", "value": "\n<?php\n$fruits = array(\"d\" => \"lemon\", \"a\" => \"orange\", \"b\" => \"banana\", \"c\" => \"apple\");\n\nfunction test_alter(&$item1, $key, $prefix)\n{\n $item1 = \"$...
php
chosen
[ { "from": "human", "value": "Add script to add user\n" }, { "from": "gpt", "value": "<?php\n\n $__ROOT__ = dirname(__FILE__).\"/..\";\n \n require_once $__ROOT__.\"/lib/lib.php\";\n \n echo \"Username : \";\n \n $username = trim(fgets(STDIN));\n \n echo \"Password : \";\...
php
chosen
[ { "from": "human", "value": "Add a new plugin for running a Jabber applet for connecting to a local jabber server.\n\n\ngit-svn-id: 3d5924c06390d9880c3f6dc8614bfed48a70bf89@1483 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "gpt", "value": "<?php\n/* Tiki plugin for Jabber\n Written by ...
php
chosen
[ { "from": "human", "value": "Create classi student/teacher e interfaccia" }, { "from": "gpt", "value": "<?php\r\n\r\nclass Student implements Person {\r\n private $name;\r\n private $age;\r\n private $courses = array();\r\n\r\n public function __construct ($name,$age,$email,$courses=...
php
chosen
[ { "from": "human", "value": "Add in the stack interface\n" }, { "from": "gpt", "value": "<?php\n/**\n *\n *===================================================================\n *\n * Tungsten\n *-------------------------------------------------------------------\n * @category tungsten\n * @p...
php
chosen
[ { "from": "human", "value": "Convert the demo logo mif to a gif\n" }, { "from": "gpt", "value": "<?php\n\nif (empty($argv[1])) {\n echo \"Usage php mif2gif.php path/to/index.mif path/to/data.mif\\n\";\n exit(1);\n}\n\nif (empty($argv[2])) {\n echo \"Usage php mif2gif.php path/to/index.m...
php
chosen
[ { "from": "human", "value": "Fix migration from 8.2.11 to 10.0.x with postgresql\n" }, { "from": "gpt", "value": "<?php\nnamespace OCA\\notifications\\Migrations;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\nuse Doctrine\\DBAL\\Types\\Type;\nuse OCP\\Migration\\ISchemaMigration;\n\n/**\n * Change the...
php
chosen