conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "[ADDED] Check if master is read-only\n\nJust to ensure we can run at all.\n" }, { "from": "human", "value": "<?php\n\n// Make sure we are called from index.php\nif (!defined('SECURITY'))\n die('Hacking attempt');\n\n// Instantiate class, we are using mysqlng\n$my...
php
chosen
[ { "from": "human", "value": "[TASK] Add new task to recursive atomic remove.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Deployer;\n\n/**\n * Remove directory recursively - atomic.\n *\n * First rename folder which is atomic operation and then remove.\n * Important when removing file bas...
php
chosen
[ { "from": "human", "value": "Add PHPUnit test for Stripe_FileUpload\n" }, { "from": "gpt", "value": "<?php\n\nclass Stripe_FileUploadTest extends Stripe_TestCase\n{\n public function testCreateFile()\n {\n $fp = fopen(dirname(__FILE__).'/../data/test.png', 'r');\n self::authorizeFromEnv(...
php
chosen
[ { "from": "system", "value": "Add tags to the component seeder\n" }, { "from": "human", "value": "<?php\n\nuse CachetHQ\\Cachet\\Models\\Component;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Seeder;\n\nclass ComponentTableSeeder extends Seeder\n{\n /**\n * Run ...
php
chosen
[ { "from": "human", "value": "Add - classe para buscar \"cores antigas\" da tabela 'dados_antigos'." }, { "from": "gpt", "value": "<?php\n\nnamespace Mapeadores;\n\nuse Entidades\\DadosAntigos;\nuse Entidades\\Tamanhos;\nuse Entidades\\Cores;\n\n/**\n * @author Tiago Oliveira de Farias\n */\nclas...
php
chosen
[ { "from": "human", "value": "Add hydrator that (de)hydrates the object using public properties\n" }, { "from": "gpt", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace Onion\\Framework\\Hydrator;\n\ntrait PropertyHydrator\n{\n /**\n * @inheritdoc\n */\n public function hydrate...
php
chosen
[ { "from": "human", "value": "[UPDATE] Install Query Builder module as dependency of RB\n" }, { "from": "gpt", "value": "<?php\n\ndefined(\"_VALID_ACCESS\") || die('Direct access forbidden');\n\n$module_name = 'Utils/QueryBuilder';\nif (ModuleManager::is_installed($module_name) < 0) {\n Module...
php
chosen
[ { "from": "human", "value": "Add Ansi Color definition class\n" }, { "from": "gpt", "value": "<?php\nnamespace CLIFramework\\Ansi;\n\nclass Colors\n{\n protected $foregroundColors = array(\n 'black' => '0,30',\n 'dark_gray' => '1,30',\n 'blue' => '0,34',...
php
chosen
[ { "from": "human", "value": "Add new 'Equal without whitespace' custom test.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * White-space agnostic custom expectation class.\n *\n * @package\t\tTestee\n * @author\t\tStephen Lewis <stephen@experienceinternet.co.uk>\n * @copyright\tExperience Inte...
php
chosen
[ { "from": "human", "value": "Extend CI's config class to create relative URLs\n" }, { "from": "gpt", "value": "<?php\n/*\n * Copyright (c) 2011 Eike Foken <kontakt@eikefoken.de>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associat...
php
chosen
[ { "from": "human", "value": "Add 'exception_type' field to Incidents.\n\nSigned-off-by: Dhananjay Nakrani <9e965ab80219a00627f2dc7fe46b57bdbd34c853@gmail.com>\n" }, { "from": "gpt", "value": "<?php\nclass AddExceptionTypeToIncidents extends CakeMigration {\n\n/**\n * Migration description\n *\n ...
php
chosen
[ { "from": "human", "value": "Create settings class for global settings\n" }, { "from": "gpt", "value": "<?hh\n\nclass Settings {\n public static function get(string $key): mixed {\n $query = DB::queryFirstRow(\"SELECT * FROM settings WHERE key=%s\", $key);\n return $query['value'];\n }\n...
php
chosen
[ { "from": "human", "value": "Add the owner_id as foreign key in store_loadouts\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass StoreSetupLoadoutTable2 extends Migration\n{\n /**\n * Run the m...
php
chosen
[ { "from": "human", "value": "Add DAO fetching all available events and single event by id" }, { "from": "gpt", "value": "<?php\n\nnamespace Mila\\DAO;\n\nfinal class eventDAO implements DAOInterface\n{\n /*\n * @var \\Doctrine\\DBAL\\Connection\n */\n private $dbCon;\n\n /*\n ...
php
chosen
[ { "from": "system", "value": "Fix Functional Testing after upgrade of SSP\n" }, { "from": "human", "value": "\n<?php\nclass Dummy_Model_Sp_TestCase_SignedPostRequest\n implements Dummy_Model_Sp_TestCase_TestCaseInterface\n{\n public function decorateRequest(SAML2_Request $request)\n {\n...
php
chosen
[ { "from": "human", "value": "Add failed queue job table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateFailedJobsTable extends Migration\n{\n /**\n * Run the migrations.\n *\n ...
php
chosen
[ { "from": "human", "value": "Add migration for lasttweet table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass CreateLasttweetTable extends Migration {\n\n\t/**\n\t * Run the migrations.\n\t *\n\t *...
php
chosen
[ { "from": "human", "value": "Add Candidate Step 5 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 migration to allow the post url to be null\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AllowPostsUrlToBeNull extends Migration\n{\n /**\n * Run the migrat...
php
chosen
[ { "from": "human", "value": "Add page template for user edit page.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Generates site-wide page chrome.\n * @see https://drupal.org/node/1728148\n **/\n\n?>\n\n<?php if (!empty($tabs['#primary'])): ?><nav class=\"admin--tabs\"><?php print render($tab...
php
chosen
[ { "from": "human", "value": "Add unit test for chain plugin\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Phpcq\\Runner\\Test\\Plugin;\n\nuse Phpcq\\PluginApi\\Version10\\Configuration\\Builder\\StringListOptionBuilderInterface;\nuse Phpcq\\PluginApi\\Version10\...
php
chosen
[ { "from": "system", "value": "Fix weird \"0\" notification numbers\n\nSummary: The JsShrink change swapped an \"== 0\" for \"=== 0\" in JS, but we're currently sending a string down. Fixes T3230.\n\nTest Plan: I'm not 100% sure this actually fixes it but probably? Let me know if you still see it.\n\nReviewe...
php
chosen
[ { "from": "system", "value": "Add API documentation (JANUS-19)\n* Add form field descriptions.\n" }, { "from": "human", "value": "<?php\n\nnamespace Ice\\ExternalUserBundle\\Form\\Type;\n\nuse FOS\\UserBundle\\Form\\Type\\RegistrationFormType as BaseType;\n\nuse Symfony\\Component\\Form\\FormBui...
php
chosen
[ { "from": "human", "value": "Add a migration with the pinned field to comments\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddPinnedFieldToComments ext...
php
chosen
[ { "from": "human", "value": "Add sql string interpolation test\n" }, { "from": "gpt", "value": "// SYNTAX TEST \"Packages/php-grammar/PHP.tmLanguage\"\n<?php\n\n$double_quotes = \"SELECT * FROM tbl\";\n// ^ source.sql keyword\n// ^ source.sql keyword\n// ...
php
chosen
[ { "from": "human", "value": "Add an action for replacement with regexp\n" }, { "from": "gpt", "value": "<?php\n\nnamespace SpreadsheetsReplacement\\Action\\Regexp;\n\nuse SpreadsheetsReplacement\\Action\\Action;\n\n/**\n * Action to modify column's value with preg_replace.\n *\n * @author floria...
php
chosen
[ { "from": "human", "value": "Allow us to add users to tasks\n\n\ngit-svn-id: 3b6cb4556d214d66df54bca2662d7ef408f367bf@1953 46e82423-29d8-e211-989e-002590a4cdd4\n" }, { "from": "gpt", "value": "<?\n\t# $Id: user_tasks.php,v 1.1.2.1 2003-01-10 16:03:25 dan Exp $\n\t#\n\t# Copyright (c) 1998-2001 D...
php
chosen
[ { "from": "human", "value": "Create roles-users pivot table so user can be assigned to multiple roles\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateRoleUserPivotTable extends Migration\n{\n ...
php
chosen
[ { "from": "human", "value": "Add a custom generator for tests\n" }, { "from": "gpt", "value": "<?php\n/*\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURP...
php
chosen
[ { "from": "human", "value": "Add unit test for the abstract entities\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of the Axstrad library.\n *\n * (c) Dan Kempster <dev@dankempster.co.uk>\n *\n * For the full copyright and license information, please view the LICENSE\n * file...
php
chosen
[ { "from": "human", "value": "Add JWK Key Value parameter" }, { "from": "gpt", "value": "<?php\n\nnamespace JWX\\JWK\\Parameter;\n\nuse JWX\\Util\\Base64;\n\n\nclass KeyValueParameter extends RegisteredJWKParameter\n{\n\t/**\n\t * Constructor\n\t *\n\t * @param string $key Base64url encoded key\n...
php
chosen
[ { "from": "human", "value": "Add database migration for Mentor Apprentice link table\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass MentorApprenticeLinkTableCreate extends AbstractMigration\n{\n /**\n * Change Method.\n *\n * More infor...
php
chosen
[ { "from": "human", "value": "Create example script demoing the converter\n" }, { "from": "gpt", "value": "<?php\n require_once '..\\docx2md.php';\n\n $converter = new Docx2md\\Docx2md;\n\n $files = glob('docx/*.docx', GLOB_BRACE);\n foreach ($files as $file) {\n echo $converte...
php
chosen
[ { "from": "human", "value": "Add migration to make `popularity_score`s signed\n\nTicket Evolution is allowing negative `popularity_score`s, which doesn’t make any sense, but easier to handle it here than to get it fixed at the source.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Sup...
php
chosen
[ { "from": "system", "value": "Add getNativeErrors method to return validation errors in Laravel way." }, { "from": "human", "value": "<?php\n\nnamespace Lanin\\Laravel\\ApiExceptions;\n\nuse Exception;\nuse Lanin\\Laravel\\ApiExceptions\\Contracts\\DontReport;\n\nclass ValidationFailedApiExcepti...
php
chosen
[ { "from": "human", "value": "Fix default value on is_public to false\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass SetDefaultValueToIsPublicOnDocs extends AbstractMigration\n{\n /**\n * Change Method.\n *\n * Write your reversible migr...
php
chosen
[ { "from": "human", "value": "Add section ID foreign key column to section table.\n" }, { "from": "gpt", "value": "<?php\n\nuse yii\\db\\Schema;\nuse console\\components\\Migration;\n\nclass m150730_113623_create_junction_in_section_table extends Migration\n{\n public function up()\n {\n ...
php
chosen
[ { "from": "human", "value": "Add specs for locator factory\n" }, { "from": "gpt", "value": "<?php\n\nnamespace spec\\MageTest\\PhpSpec\\MagentoExtension\\Extension;\n\nuse MageTest\\PhpSpec\\MagentoExtension\\Extension\\LocatorFactory;\nuse MageTest\\PhpSpec\\MagentoExtension\\Locator\\Magento\\...
php
chosen
[ { "from": "human", "value": "Revert \"remove redundant edit-after command.\"\n\nThis reverts commit 34005c38\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Commands;\n\nuse App\\Actions\\EditAfter as EditAfterAction;\nuse LaravelZero\\Framework\\Commands\\Command;\n\nclass EditAfter ex...
php
chosen
[ { "from": "system", "value": "Fix tests which require optional zend-session asset\n" }, { "from": "human", "value": "<?php\n/**\n * Zend Framework (http://framework.zend.com/)\n *\n * @link http://github.com/zendframework/zf2 for the canonical source repository\n * @copyright Copyright (c) ...
php
chosen
[ { "from": "human", "value": "Add a migration to refresh the YouTube block\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Concrete\\Core\\Updater\\Migrations\\Migrations;\n\nuse Concrete\\Core\\Updater\\Migrations\\AbstractMigration;\nuse Concrete\\Core\\Updater\\Migrations\\RepeatableMigrat...
php
chosen
[ { "from": "human", "value": "Add missing pluggable interface file.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Zend Framework\n *\n * LICENSE\n *\n * This source file is subject to the new BSD license that is bundled\n * with this package in the file LICENSE.txt.\n * It is also available thr...
php
chosen
[ { "from": "human", "value": "Add functional test for doctrine mapping\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of the backlog-velocity.\n * \n * (c) Yannick Voyer (http://github.com/yvoyer)\n */\n\nnamespace Star\\Component\\Sprint\\Tests\\Functional;\n\nuse Star\\Compon...
php
chosen
[ { "from": "human", "value": "Add unit tests for `Date` column.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Test the DATE column.\n *\n * @author Steven A Zahm\n * @since 2.0\n * @license MIT\n * @copyright Iron Bound Designs, 2016.\n */\n\nnamespace IronBound\\DB\\Tests\\Unit\\Colum...
php
chosen
[ { "from": "human", "value": "Add a page to show error log file" }, { "from": "gpt", "value": "<?php\n\n\tif (Permission::Insufficient('developer'))\n\t\tCoreUtils::NotFound();\n\t\t\n\theader('Content-Type: text/plain; charset=utf-8;');\n\treadfile(APPATH.'../mlpvc-rr-error.log');\n" } ]
php
chosen
[ { "from": "human", "value": "Add tests for the SendViolationsAsComments command handler\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Regis\\Application\\CommandHandler\\Github\\Inspection;\n\nuse Regis\\Application\\Command;\nuse Regis\\Application\\CommandHandler;\nuse Regis\\Appl...
php
chosen
[ { "from": "human", "value": "Drop event_id from posts table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass RemoveEventIdFromPostsTable extends Migration\n{\n /**\n * Run the migrations.\n ...
php
chosen
[ { "from": "human", "value": "Add database migration for remember token and timestamps for user model.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddRe...
php
chosen
[ { "from": "system", "value": "Work around lack of lastInsertId() for ODBC with PDO for MSSQL\n" }, { "from": "human", "value": "<?php\n\nnamespace Illuminate\\Database\\Query\\Processors;\n\nuse Illuminate\\Database\\Query\\Builder;\n\nclass SqlServerProcessor extends Processor\n{\n /**\n ...
php
chosen
[ { "from": "human", "value": "Add (unused) item load API\n" }, { "from": "gpt", "value": "<?\ninclude '../scat.php';\ninclude '../lib/item.php';\n\n$id= (int)$_REQUEST['id'];\n\n$code= $_REQUEST['code'];\n\nif (!$id && $code) {\n $code= $db->escape($code);\n $q= \"SELECT id FROM item WHERE code...
php
chosen
[ { "from": "human", "value": "Add config file that hold global values for form validation.\n" }, { "from": "gpt", "value": "<?php\n\n/*\n* The settings in this file are used to validate user input.\n* They define the minimum and maximum lengts of data the user can enter throughout the application...
php
chosen
[ { "from": "human", "value": "Add schema:load command that reuses config info from parameters.yml\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Radvance\\Command;\n\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Co...
php
chosen
[ { "from": "human", "value": "Allow for the addition of new API endpoints\n" }, { "from": "gpt", "value": "<?php namespace Flarum\\Events;\n\nuse Flarum\\Api\\Request;\nuse Flarum\\Http\\RouteCollection;\nuse Psr\\Http\\Message\\ServerRequestInterface;\n\nclass RegisterApiRoutes\n{\n /**\n ...
php
chosen
[ { "from": "human", "value": "Add initial interface for rpc handler spec object\n" }, { "from": "gpt", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace Xerkus\\Neovim\\Plugin\\RpcHandler;\n\n/**\n * Rpc handler that announces itself to neovim.\n *\n */\ninterface RpcSpec\n{\n /**\n *...
php
chosen
[ { "from": "human", "value": "Add custom build task to fill search table with related data\n" }, { "from": "gpt", "value": "<?php\n\nnamespace ilateral\\SilverStripe\\Searchable\\Tasks;\n\nuse ilateral\\SilverStripe\\Searchable\\Model\\SearchTable;\nuse ilateral\\SilverStripe\\Searchable\\Searcha...
php
chosen
[ { "from": "human", "value": "Add group data format to PDO Arr\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Imhonet\\Connection\\DataFormat\\Arr\\PDO;\n\nuse Imhonet\\Connection\\DataFormat\\IArr;\n\nclass Group implements IArr\n{\n\n private $data;\n\n private $groups = [];\n\n p...
php
chosen
[ { "from": "human", "value": "Add PHPUnit test for \\Aciton\\AcitonRead\n" }, { "from": "gpt", "value": "<?php\n\nclass TestActionRead\n extends PHPUnit_Framework_TestCase\n{\n public function setUp()\n {\n $this->config = $this->getMockBuilder('\\Noodlehaus\\ConfigInterface')->g...
php
chosen
[ { "from": "human", "value": "Add migration for worlds table.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateWorldsTable extends Migration\n{\n /*...
php
chosen
[ { "from": "human", "value": "Test asset for classes with colliding inherited properties\n" }, { "from": "gpt", "value": "<?php\n/*\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE I...
php
chosen
[ { "from": "human", "value": "Add a test for the php class.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Has_Multiple_AdminsTest\n *\n * @package Google\n * @copyright 2021 Google LLC\n * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0\n * @link https://sitekit...
php
chosen
[ { "from": "human", "value": "Add unit test for (to be added) Net_SFTP_Stream::register().\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 Lice...
php
chosen
[ { "from": "human", "value": "Add tests for the MediaObject schema\n" }, { "from": "gpt", "value": "<?php\n/**\n * Tests for the MediaObject schema.\n *\n * @package Schemify\n */\n\nnamespace Test\\Schemas;\n\nuse Schemify\\Schemas\\CreativeWork;\nuse Schemify\\Schemas\\MediaObject;\nuse WP_Unit...
php
chosen
[ { "from": "human", "value": "Add level to the user model\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass AddLevelToUsersTable extends Migration {\n\n\t/**\n\t * Run the migrations.\n\t *\n\t * @retu...
php
chosen
[ { "from": "human", "value": "Add unit test for Username Cleanup class\n" }, { "from": "gpt", "value": "<?php\n/**\n * @author Pierre-Henry Soria <hello@ph7cms.com>\n * @copyright (c) 2019, Pierre-Henry Soria. All Rights Reserved.\n * @license GNU General Public License;...
php
chosen
[ { "from": "human", "value": ":white_check_mark: Add test for upwork provider.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Risan\\OAuth1\\Test\\Unit\\Provider;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Risan\\OAuth1\\Provider\\Upwork;\nuse Risan\\OAuth1\\Signature\\HmacSha1Signer;\nuse Ri...
php
chosen
[ { "from": "human", "value": "Introduce service for creating institution configuration concept\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...
php
chosen
[ { "from": "human", "value": "Include some tests for abstract class ArrayManager for method not used in VoteManager extension used by Condorcet.\n" }, { "from": "gpt", "value": "<?php\ndeclare(strict_types=1);\nnamespace CondorcetPHP\\Condorcet\\DataManager;\n\nuse PHPUnit\\Framework\\TestCase;\n...
php
chosen
[ { "from": "human", "value": "Add single Sign-On feature for services and products. It automatically logs in the users on SolusVM control panel.\n" }, { "from": "gpt", "value": "<?php\n/*\n * SolusVM_ServiceSingleSignOn\n *\n * Perform single sign-on for a given instance of a product/service in t...
php
chosen
[ { "from": "human", "value": "Add index to kudosu histories table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddIndexToKudosuHistoriesKudosuable extends Migration\n{\n /**\n * Run the migrat...
php
chosen
[ { "from": "human", "value": "FIX forgot a file !\n" }, { "from": "gpt", "value": "<?php\r\n\r\nclass Default_View_Helper_Sort extends Zend_View_Helper_Abstract\r\n{\r\n\tpublic function sort($label, $column, $sort, $sortOrder)\r\n\t{\r\n\t\t$orders = array('desc' => 'asc', 'asc' => 'desc');\r\n\...
php
chosen
[ { "from": "human", "value": "Add a PHP cli script to get range file adress from isbn authority\n" }, { "from": "gpt", "value": "<?php\n\ninclude('vendor/autoload.php');\n\necho \"Requesting XML ranges file...\\n\";\n\n$client = new GuzzleHttp\\Client();\n$res = $client->request('POST', 'https://...
php
chosen
[ { "from": "human", "value": "Add unit test for ThrowExceptionIfRequestRequiresAuthenticationClient\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Marein\\Nchan\\Http;\n\nuse Marein\\Nchan\\Exception\\AuthenticationRequiredException;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ThrowException...
php
chosen
[ { "from": "human", "value": "Add form for forgotten passwords\n\n\ngit-svn-id: 3b6cb4556d214d66df54bca2662d7ef408f367bf@4328 46e82423-29d8-e211-989e-002590a4cdd4\n" }, { "from": "gpt", "value": "<?php\n\t#\n\t# $Id: password-reset-via-token.php,v 1.1 2010-09-17 14:44:55 dan Exp $\n\t#\n\t# Copyr...
php
chosen
[ { "from": "human", "value": "Create migration for laralytics_info table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\n/**\n * Class CreateLaralyticsInfoTable\n...
php
chosen
[ { "from": "system", "value": "Move logic to new RelativeFallbackResolver\n" }, { "from": "human", "value": "<?php\n/**\n * Zend Framework (http://framework.zend.com/)\n *\n * @link http://github.com/zendframework/zf2 for the canonical source repository\n * @copyright Copyright (c) 2005-2014...
php
chosen
[ { "from": "human", "value": "Add migration for adding 'active' column in events table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddActiveToEventsTable extends Migration\n{\n /**\n * Run...
php
chosen
[ { "from": "human", "value": "Change size of description, model in machines table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass ChangeDescModelSizeInMachi...
php
chosen
[ { "from": "human", "value": "Add:\nAdd new menu details and other login page views\n" }, { "from": "gpt", "value": "<?php\n\n/* \n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template i...
php
chosen
[ { "from": "human", "value": "Add migration to add unique index to language entries table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddUniqueIndexToLa...
php
chosen
[ { "from": "human", "value": "Add Ensure Production Settings command\n" }, { "from": "gpt", "value": "<?php namespace Mitch\\LaravelDoctrine\\Console;\n\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\nclass EnsureProductionSettingsCommand exten...
php
chosen
[ { "from": "human", "value": "Add update question PHP module" }, { "from": "gpt", "value": "<?php\r\n include (\"conectare_db.php\");\r\n $sql = 'begin :rezultat := admin_pachet.update_intrebare(:v_id,:v_domeniu,:v_text,:v_dificultate,:v_tip,:v_r1,:v_r2,:v_r3,:v_rc);END;';\r\n $stid = o...
php
chosen
[ { "from": "human", "value": "Upgrade script from 11.0.4 to 12.0.0-B1\n" }, { "from": "gpt", "value": "<?php\n\n$aFilesDelete = array(\n 'modules/base/text/template/account_link.html',\n 'plugins/stripe/lib/Error',\n 'plugins/stripe/lib/Util/AutoPagingIterator.php',\n 'plugins/stripe/...
php
chosen
[ { "from": "human", "value": "test: Add tests for new class Exec\n" }, { "from": "gpt", "value": "<?php\nnamespace nochso\\Omni\\Test;\n\nuse nochso\\Omni\\Exec;\n\nclass ExecTest extends \\PHPUnit_Framework_TestCase\n{\n public function testCreate_NoPrefix()\n {\n $runner = Exec::cr...
php
chosen
[ { "from": "human", "value": "Add test case for Key::deriveFromPassword" }, { "from": "gpt", "value": "<?php\nuse \\ParagonIE\\Halite\\Key;\n\n/**\n * @backupGlobals disabled\n * @backupStaticAttributes disabled\n */\nclass KeyTest extends PHPUnit_Framework_TestCase\n{\n public function testDe...
php
chosen
[ { "from": "human", "value": "Add town step 3 type form\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component\\OptionsResol...
php
chosen
[ { "from": "human", "value": "Add skeleton test for the Sitemap_Data class.\n" }, { "from": "gpt", "value": "<?php defined('SYSPATH') or die('No direct script access.');\n/**\n * Sitemap generation class\n *\n * Copyright (C) 2009 Mathew Leigh Davies\n *\n * This program is free software: you can...
php
chosen
[ { "from": "human", "value": "Add a simple test suite\n" }, { "from": "gpt", "value": "<?PHP\n\ninclude(\"class.krumo.php\");\n\n$fp = fopen(__FILE__,\"r\");\n\n$a = array(\n\t'first' => $fp,\n\t'last' => new bar,\n\t'null_var' => NULL,\n\t'float' => pi(),\n\t'bool' => true,\n\...
php
chosen
[ { "from": "human", "value": "Add tiny PhpSpec test for Action class.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace spec\\FluxBB\\Core;\n\nuse Illuminate\\Contracts\\Events\\Dispatcher;\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse FluxBB\\Core\\Action;\n\nclass ActionSpec ext...
php
chosen
[ { "from": "human", "value": "Add the Init phpunit test\n" }, { "from": "gpt", "value": "<?php\n\n\tinclude '../index.php';\n\n\tclass InitTest extends PHPUnit_Framework_TestCase\n\t{\n\t\t\n\t\tpublic function test_smooth_vars()\n\t\t{\t\t\n\t\t\t$this->assertTrue(defined('BASEPATH'));\n\t\t\t$t...
php
chosen
[ { "from": "human", "value": "Reorganize for 100% for OrderAddress.\n" }, { "from": "gpt", "value": "<?php\nnamespace inklabs\\kommerce\\Entity;\n\nclass OrderAddressTest extends \\PHPUnit_Framework_TestCase\n{\n public function testCreate()\n {\n $orderAddress = new OrderAddress;\n ...
php
chosen
[ { "from": "human", "value": "Add Async client test suite\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Http\\React\\Tests;\n\nuse Http\\Client\\Tests\\HttpAsyncClientTest;\nuse Http\\React\\ReactHttpClient;\n\n/**\n * @author Stéphane Hulard <s.hulard@gmail.com>\n */\nclass ReactHttpAsyncC...
php
chosen
[ { "from": "human", "value": "Allow null help_videos.order to fix sqlite errors\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass MakeOrderDefaultNullOnHelpVideoTable extends Migration\n{\n /**\n ...
php
chosen
[ { "from": "human", "value": "Add migration for total points on snapshots.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddTotalPointsToSnapshots extends Migration {\n\n\t/**\n\t * Run the migrati...
php
chosen
[ { "from": "human", "value": "Test the pull request listener\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Regis\\BitbucketContext\\Application\\EventListener;\n\nuse PHPUnit\\Framework\\TestCase;\nuse League\\Tactician\\CommandBus;\nuse Regis\\BitbucketContext\\Application\\Command;...
php
chosen
[ { "from": "human", "value": "Fix truncated meta_uri in phpdebugbar\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass PhpdebugbarTableChangeMetaUriToText exte...
php
chosen
[ { "from": "human", "value": "Add migration for institution configuration options\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Surfnet\\StepupMiddleware\\Migrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generated Migrati...
php
chosen
[ { "from": "human", "value": "Add ARP service that connects to EB through JSON API\n\nWe might want to reconsider how we are retrieving a ConsentList and turning it into SpecifiedConstentList.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Copyright 2016 SURFnet B.V.\n *\n * Licensed under the...
php
chosen
[ { "from": "human", "value": "Add php script for calling bash script\n" }, { "from": "gpt", "value": "<?php\n\nif ($_GET[\"password\"] != \"hunter2\") die(\"Access denied.\");\n\n# direct call\n#system(\"/home/florin/bin/bootIt/wakeIt.sh\");\n\n# remote call\nsystem(\"ssh netpiExt /home/florin/bi...
php
chosen
[ { "from": "human", "value": "Add tests for the search 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\\Property;\n\nuse Mandragora\\FormFactor...
php
chosen
[ { "from": "human", "value": "Add composite key data builder\n" }, { "from": "gpt", "value": "<?php declare(strict_types=1);\n\nnamespace hollodotme\\Readis\\Application\\ReadModel\\KeyDataBuilders;\n\nuse hollodotme\\Readis\\Application\\Interfaces\\ProvidesKeyInfo;\nuse hollodotme\\Readis\\Appl...
php
chosen