conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": " Return the current key and value pair from an array and advance the array cursor\n"
},
{
"from": "gpt",
"value": "\n<?php\n$foo = array(\"bob\", \"fred\", \"jussi\", \"jouni\", \"egon\", \"marliese\");\n$bar = each($foo);\nprint_r($bar);\n?>\n"
}
] | php | chosen |
[
{
"from": "human",
"value": "Fix issue where order_totals table is missing auto_increment field.\n"
},
{
"from": "gpt",
"value": "<?php namespace Admin\\Database\\Migrations;\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Schema;\n\n/**\n *... | php | chosen |
[
{
"from": "human",
"value": "Refactor control file and App\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass OctopushApplication extends Silex\\Application\n{\n\n public function isPaused()\n {\n return file_exists($this['config']['control_file']);\n }\n\t\n public function paus... | php | chosen |
[
{
"from": "human",
"value": "Add tile class (and table)\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace AppBundle\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * @ORM\\Entity\n * @ORM\\Table(name=\"tile\")\n */\nclass Tile\n{\n /**\n * @ORM\\Column(type=\"integer\")\n * @O... | php | chosen |
[
{
"from": "human",
"value": "Add base class for event service decorators\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @file\n */\n\nnamespace CultuurNet\\UDB3;\n\n\nabstract class EventServiceDecoratorBase implements EventServiceInterface\n{\n /**\n * @var EventServiceInterface\n *... | php | chosen |
[
{
"from": "human",
"value": "ticks: Add new interface for timer implementations.\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * This file contains an interface for Timers.\n *\n * PHP Version 5.3\n *\n * @category Libraries\n * @package Ticks\n * @subpackage Libraries\n * @author Hei... | php | chosen |
[
{
"from": "human",
"value": "Add xf_session => redis migration script\n"
},
{
"from": "gpt",
"value": "<?php\n\n$startTime = microtime(true);\n$fileDir = dirname(__FILE__) . '/html';\n\n@set_time_limit(0);\nignore_user_abort(true);\n\nrequire($fileDir . '/library/XenForo/Autoloader.php');\nXenFo... | php | chosen |
[
{
"from": "human",
"value": "Add trait for begin & end factory methods\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Benrowe\\Laravel\\Widgets\\Traits;\n\n/**\n * Provides the begin & end functionality for the Widget factory\n *\n * @package Benrowe\\Laravel\\Widgets\n */\ntrait BeginEndFa... | php | chosen |
[
{
"from": "human",
"value": "Add a couple of simple PHPUnit tests\n"
},
{
"from": "gpt",
"value": "<?php\n//require_once 'PHPUnit/Framework.php';\nrequire_once 'at.wrapper.php';\nuse Treffynnon\\At\\Wrapper as At;\n\nclass AtWrapperTest extends PHPUnit_Framework_TestCase {\n protected $test_f... | php | chosen |
[
{
"from": "human",
"value": "Add new report for daily payment info\n"
},
{
"from": "gpt",
"value": "<?\nrequire 'scat.php';\n\nhead(\"daily report\");\n\n$q= \"SELECT DATE_FORMAT(processed, '%Y-%m-%d %a') AS date,\n method, cc_type, SUM(amount) amount\n FROM payment\n WHERE... | php | chosen |
[
{
"from": "human",
"value": "Add a param converter for institutions within the instititution sub domain\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * Copyright 2014 SURFnet bv\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in co... | php | chosen |
[
{
"from": "human",
"value": "Prepare migration to create Lineament History table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateLineamentsHistoryTab... | php | chosen |
[
{
"from": "human",
"value": "Add functional tests for `Api::strand()`.\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare (strict_types = 1); // @codeCoverageIgnore\n\nnamespace Recoil;\n\nrit('resumes the calling strand with itself', function () {\n $strand = null;\n $expected = yield Reco... | php | chosen |
[
{
"from": "human",
"value": "Add an experimental constraint for checking query result counts\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Chromabits\\Illuminated\\Meditation\\Constraints;\n\nuse Chromabits\\Nucleus\\Meditation\\Constraints\\AbstractConstraint;\nuse Illuminate\\Database\\Q... | php | chosen |
[
{
"from": "human",
"value": "AEIV-572: Update implementation of UI views to support updated data structure: Server side\n\n- server origin by default\n\nConflicts:\n\tsrc/Oro/Bundle/CalendarBundle/Migrations/Data/ORM/LoadCalendarEventOriginData.php\n"
},
{
"from": "gpt",
"value": "<?php\n\nnames... | php | chosen |
[
{
"from": "human",
"value": "CC-3921: Add mobile phone number field to user record\n\n-committing Doctrine migartion file for new cell_phone column\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace DoctrineMigrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration,\n Doctrine\\DBAL\\S... | php | chosen |
[
{
"from": "human",
"value": "Add the global images resource itself\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * This file is part of the Imbo package\n *\n * (c) Christer Edvartsen <cogo@starzinger.net>\n *\n * For the full copyright and license information, please view the LICENSE file that ... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for JsonDataConverter class.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * User: TRANN\n * Date: 6/18/13\n * Time: 5:14 PM\n */\n\nuse \\application\\components\\helper as helper;\n\nclass JsonDataConverterTest extends \\CTestCase {\n\n public $dat... | php | chosen |
[
{
"from": "human",
"value": "Split out no dependent listeners\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @category RCM\n * @author James Jervis <jjervis@relivinc.com>\n * @copyright 2012 Reliv International\n * @license License.txt New BSD License\n * @version GIT: reliv\n * @link ... | php | chosen |
[
{
"from": "human",
"value": "Remove old game picks table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass LanAttendeeGamePicksTableDrop extends Migration\n{... | php | chosen |
[
{
"from": "human",
"value": "Add url and caption field to posts table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddContentFieldsToPostsTable extends Migration\n{\n /**\n * Run the migra... | php | chosen |
[
{
"from": "human",
"value": "Update pinned, locked columns in threads table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddDefaultsToForumTableThreadsColumns extends Migration\n{\n /**\n ... | php | chosen |
[
{
"from": "human",
"value": "Add Hashpass so that it is easy to update earlier users to the hashed passwords for security. This will be done as soon as we verify that we generate the same things on both ends\n"
},
{
"from": "gpt",
"value": "<?php\r\n\t\r\n\t$password = $_REQUEST['password']; //... | php | chosen |
[
{
"from": "human",
"value": "Add test case for webservice\n"
},
{
"from": "gpt",
"value": "<?php\nclass OrganismsTest extends PHPUnit_Framework_TestCase\n{\n public function testPushAndPop()\n {\n list($service) = \\WebService::factory('listing/Organisms');\n $stack = array()... | php | chosen |
[
{
"from": "human",
"value": "Remove filename columns from items\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass DeleteFilenameColumnsFromItems extends Migration {\n\n\t/**\n\t * Run the migrations.\... | php | chosen |
[
{
"from": "human",
"value": "Add job that downloads and saves the HTML of a webmention\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace App\\Jobs;\n\nuse GuzzleHttp\\Client;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Queue\\SerializesModels;\nuse Illuminate\\Queue\\InteractsWithQueue;\... | php | chosen |
[
{
"from": "human",
"value": "Add script to start PHP built-in web server when running unit test.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Start the Built-in PHP web server for unit test sake.\n * Kills the process when done.\n */\n$fixturesWebPath = FIXTURES_PATH . DIRECTORY_SEPARATOR . '... | php | chosen |
[
{
"from": "human",
"value": "Add php code for 100 doors puzzle\n"
},
{
"from": "gpt",
"value": "#!/usr/local/bin/php\n<?php\n/* \n * @Author: Menaka S.\n * @Email: menakas.menakas@gmail.com\n *\n * Problem Statement: \n * There are 100 doors in a row, all doors are initially closed. A person wa... | php | chosen |
[
{
"from": "human",
"value": "Add bridge provider for policies compatible with Sentinel 2\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Created by PhpStorm.\n * User: marco\n * Date: 16/07/16\n * Time: 10.18\n */\n\nnamespace Mbcraft\\Laravel\\Providers;\n\nuse Sentinel;\nuse Illuminate\\Auth\\... | php | chosen |
[
{
"from": "human",
"value": "Add interface for configure Psr container\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Tlumx (https://tlumx.com/)\n *\n * @author Yaroslav Kharitonchuk <yarik.proger@gmail.com>\n * @link https://github.com/tlumx/framework\n * @copyright Copyright (c) 2016-... | php | chosen |
[
{
"from": "human",
"value": "Add Show command to list loaded rectors\n"
},
{
"from": "gpt",
"value": "<?php declare(strict_types=1);\n\nnamespace Rector\\Console\\Command;\n\nuse Rector\\Console\\Shell;\nuse Rector\\Contract\\Rector\\RectorInterface;\nuse Symfony\\Component\\Console\\Input\\Inpu... | php | chosen |
[
{
"from": "human",
"value": "Add is_flight_mode_enabled column to repositories\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AddFlightModeToRepositories extends AbstractMigration\n{\n public function change()\n {\n ... | php | chosen |
[
{
"from": "human",
"value": "Add combine array using plus / array_merge()\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Notice;\n\nuse PHPUnit_Framework_TestCase;\n\nclass ArrayPlusAndMergeTest extends PHPUnit_Framework_TestCase\n{\n /**\n * @test\n */\n public function combi... | php | chosen |
[
{
"from": "human",
"value": "Create tests for ListRecordings command\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace AdobeConnectClient\\Tests\\Commands;\n\nuse Exception;\nuse AdobeConnectClient\\Commands\\ListRecordings;\nuse AdobeConnectClient\\Entities\\SCORecord;\nuse AdobeConnectClient... | php | chosen |
[
{
"from": "human",
"value": "Add sanity tests for ProcessMock\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Skeleton\\ProcessMock;\n\n\nuse PHPUnit\\Framework\\TestCase;\nuse Skeleton\\TestSkeleton;\n\n\nclass ProcessMockTest extends TestCase\n{\n\tprivate function getMockFilePath(string $id... | php | chosen |
[
{
"from": "human",
"value": "Add test for weak crypto reported by openssl_random_pseudo_bytes()\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * weakCrypto\n * @package OTPAuthenticate\n * @copyright (c) Marc Alexander <admin@m-a-styles.de>\n *\n * For the full copyright and license information... | php | chosen |
[
{
"from": "human",
"value": "Duplicate match.php and make changes\n"
},
{
"from": "gpt",
"value": "<?php\n/**\nTemplate to display next single match for a specific team\n\nThe following variables are usable:\n\t\n\t$league: league object\n\t$team: team object\n\t$next_match: next match object\n\... | php | chosen |
[
{
"from": "human",
"value": "Add the Google Custom Search sample application.\n\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n * Copyright 2011 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.... | php | chosen |
[
{
"from": "human",
"value": "Add template file for link to survey\n"
},
{
"from": "gpt",
"value": "<div id=\"ms_srv_wrapper\" class=\"pre-header-notice\" style=\"/* display:none */\">\n <p>\n <a href=\"https://www.surveygizmo.co.uk/s3/2262048/2014-Baselining-OpenAustralia\" id=\"ms_srv_link\... | php | chosen |
[
{
"from": "human",
"value": "Set COMPRESSED row format on solo_scores\n"
},
{
"from": "gpt",
"value": "<?php\n\n// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.\n// See the LICENCE file in the repository root for full licence text.\n\nuse ... | php | chosen |
[
{
"from": "human",
"value": "Make Selenium WebDriver open a Firefox browser when firing phpunit\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * Description of WebDriverTest\n *\n * @author Romualdo Dasig <dasig.rg@a5project.com>\n */\nclass WebDriverTest extends TestCase\n{\n\n public funct... | php | chosen |
[
{
"from": "human",
"value": "Fix invalid foreign key in post table.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse yii\\db\\Schema;\nuse console\\components\\Migration;\n\nclass m150731_142318_fix_invalid_foreign_key_in_post_table extends Migration\n{\n public function up()\n {\n $th... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for recurring invoice generator\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Siwapp\\RecurringInvoiceBundle\\Tests;\n\nuse Doctrine\\ORM\\EntityManager;\nuse Siwapp\\InvoiceBundle\\Entity\\Invoice;\nuse Siwapp\\RecurringInvoiceBundle\\InvoiceGene... | php | chosen |
[
{
"from": "human",
"value": "Add initial ODataParameter parsing tests\n"
},
{
"from": "gpt",
"value": "<?php\nrequire_once('Autoload.php');\nclass ODataParamsTest extends PHPUnit_Framework_TestCase\n{\n public function testOldStyle()\n {\n $params = array();\n $params['filter... | php | chosen |
[
{
"from": "human",
"value": "Add test for basic gradient descent."
},
{
"from": "gpt",
"value": "<?php\n\nnamespace mcordingley\\Regression\\Tests;\n\nuse mcordingley\\Regression\\Linkings\\Identity;\nuse mcordingley\\Regression\\RegressionAlgorithms\\GradientDescent;\n\nclass GradientDescentTes... | php | chosen |
[
{
"from": "human",
"value": "Add example with nested submenu\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse PhpSchool\\CliMenu\\CliMenu;\nuse PhpSchool\\CliMenu\\CliMenuBuilder;\n\nrequire_once(__DIR__ . '/../vendor/autoload.php');\n\n$itemCallable = function (CliMenu $menu) {\n echo $menu->ge... | php | chosen |
[
{
"from": "human",
"value": "Add CLI command for DeleteUser\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace SumoCoders\\FrameworkMultiUserBundle\\Command;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Sym... | php | chosen |
[
{
"from": "human",
"value": "Add test for compiler formatter\n\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Zephir.\n *\n * (c) Phalcon Team <team@zephir-lang.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distr... | php | chosen |
[
{
"from": "human",
"value": "Add test for creating a new signup\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Foundation\\Testing\\WithoutMiddleware;\nuse Illuminate\\Foundation\\Testing\\DatabaseMigrations;\nuse Illuminate\\Foundation\\Testing\\DatabaseTransactions;\n\nclass SignupA... | php | chosen |
[
{
"from": "human",
"value": "Add a user import tool\n"
},
{
"from": "gpt",
"value": "<?php\ndefined('C5_EXECUTE') or die(\"Access Denied.\");\n\n// Hard-code the xml we'll update.. it's a one-off migration\n$f = File::getByID(62);\n$nh = Loader::helper('navigation');\nLoader::model('user_list');... | php | chosen |
[
{
"from": "human",
"value": "Add how_to_get field to api table.\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass m161004_202726_add_how_to_get_field_for_apis extends CDbMigration\n{\n public function safeUp()\n {\n $this->addColumn('{{api}}', 'how_to_get', 'text null');\n }\n\n ... | php | chosen |
[
{
"from": "system",
"value": "Move fully qualified class name to a use statement\n"
},
{
"from": "human",
"value": "<?php\nnamespace Joindin\\Model\\Db;\n\nclass User\n{\n protected $keyName = 'users';\n protected $db;\n\n public function __construct()\n {\n $this->db = new \\... | php | chosen |
[
{
"from": "system",
"value": "Make sure DynamoDB factory observes 'retries' => false\n"
},
{
"from": "human",
"value": "<?php\nnamespace Aws\\Service;\n\nuse Aws\\AwsClientInterface;\nuse Aws\\Retry\\ThrottlingFilter;\nuse Aws\\Retry\\Crc32Filter;\nuse GuzzleHttp\\Subscriber\\Retry\\RetrySubscri... | php | chosen |
[
{
"from": "system",
"value": "Allow users to specify their own PDO"
},
{
"from": "human",
"value": "<?php\n/**\n * Fizz is a lightweight ORM\n *\n * @author Skylar Kelty <skylarkelty@gmail.com>\n */\n\nnamespace SkylarK\\Fizz;\n\n/**\n * The config store all Fizz models rely on\n */\nclass FizzC... | php | chosen |
[
{
"from": "human",
"value": "Add Soft Delete Model Base Class\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * HHVM\n *\n * Copyright (C) Tony Yip 2015.\n *\n * @author Tony Yip <tony@opensource.hk>\n * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License\n */\n\nnamespac... | php | chosen |
[
{
"from": "human",
"value": "Test case: retreiving the matches view.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace tests\\AppBundle\\Controller\\Dtp\\Standings;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\n\nclass MatchesControllerTest extends WebTestCase\n{\n public fun... | php | chosen |
[
{
"from": "human",
"value": "Add migration to link GroupActivity with Semester entity\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m150106_160327_modify_group_activity_table extends Migration\n{\n public function up()\n {\n \t$this->ad... | php | chosen |
[
{
"from": "human",
"value": "Fix problem with trl-media-cache for downloadTag\n\nwasn't deleted when master changed\n"
},
{
"from": "gpt",
"value": "<?php\nclass Kwc_Basic_DownloadTag_Trl_Events extends Kwc_Basic_LinkTag_Abstract_Trl_Events\n{\n public function getListeners()\n {\n ... | php | chosen |
[
{
"from": "human",
"value": "Add migration to migrate club staff data\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass MigrateClubStaffRelation extends Migration\n{\n /**\n * Run the migrations.\n *\n * @return void\n */\n ... | php | chosen |
[
{
"from": "human",
"value": "Add a generic error view for HTTP 406 responses\n"
},
{
"from": "gpt",
"value": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <title>Non-acceptable request</title>\n\n <style>\n /* Create a small Belgian flag at the top of ... | php | chosen |
[
{
"from": "human",
"value": "Move the installation methods in the package controller to it's own class - draft"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Kaapiii\\Doctrine\\BehavioralExtensions;\n\n\\Concrete\\Core\\Database\\DatabaseStructureManager;\n\\Concrete\\Core\\Support\\Facade\\C... | php | chosen |
[
{
"from": "human",
"value": "Add tests for the content extentions theme templates page\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Tests\\Action;\n\nuse Common\\WebTestCase;\n\nclass ThemeTemplatesTest extends WebTestCase\n{\n public function testAuthe... | php | chosen |
[
{
"from": "human",
"value": "Add a command for post receive\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Gitonomy\\Bundle\\CoreBundle\\Command;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\C... | php | chosen |
[
{
"from": "human",
"value": "Add backend delete form type\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Backend\\Form\\Type;\n\nuse Backend\\Core\\Engine\\Model;\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType;\nuse Symfony\\Com... | php | chosen |
[
{
"from": "human",
"value": "Add Log adapter unit tests\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Slim\n *\n * A simple PHP framework for PHP 5 or newer\n *\n * @author\t\tJosh Lockhart <info@joshlockhart.com>\n * @link\t\thttp://slim.joshlockhart.com\n * @copyright\t2010 Josh Lockhart\n *... | php | chosen |
[
{
"from": "human",
"value": "Add a shortcut to be used for the phar file more easily\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @author Jean Silva <jeancsil@gmail.com>\n * @license MIT\n * @see This is just a shortcut mainly used for the .phar file.\n */\nrequire 'bin/flight-watcher';"
}
... | php | chosen |
[
{
"from": "human",
"value": "Change configuration of file to host on heroku\n"
},
{
"from": "gpt",
"value": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset='UTF-8'>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n <title>Demo App</title>\n <link rel=\"stylesheet... | php | chosen |
[
{
"from": "human",
"value": "Make new api for summarizing the text within a page\n"
},
{
"from": "gpt",
"value": "<?php\n\tfunction site_ots($url,$ratio) {\n\t\t$html = file_get_contents($url);\n\t\treturn(ots($html,$ratio));\n\t}\n function ots($text , $ratio) {\n if($text... | php | chosen |
[
{
"from": "human",
"value": "Add permissions entity backend uint tests\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Test case for the PermissionEntity class\n * Date: 8/10/16\n * Time: 16:33\n * @copyright Marcos Zuriaga Miguel 2016\n * @license AGPLv3\n */\nuse \\OCA\\Passman\\Utility\\Permi... | php | chosen |
[
{
"from": "system",
"value": "Make it possible to upload files to Company Images\n"
},
{
"from": "human",
"value": "<?php\r\nclass Infusionsoft_FileServiceBase extends Infusionsoft_Service{\r\n\r\n public static function getFile($fileId, Infusionsoft_App $app = null){\r\n $params = arr... | php | chosen |
[
{
"from": "human",
"value": "Add config setting to allow auto update of slug\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Config class\n * Configuration for Skeleton\\Object\n *\n * @author David Vandemaele <david@tigron.be>\n */\n\nnamespace Skeleton\\Object;\n\nclass Config {\n\n\t/**\n\t *... | php | chosen |
[
{
"from": "human",
"value": "Add back to website spec.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace spec\\App\\Http\\Handlers;\n\nuse App\\Http\\Handlers\\BackToWebsite;\nuse Illuminate\\Container\\Container;... | php | chosen |
[
{
"from": "human",
"value": "Add a test for pagination\n\nThis class didn't have its own tests yet, and all coverage of it was\nfrom the controller tests.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace OpenCFP\\Test\\Domain\\Services;\n\nuse OpenCFP\\Domain\\Services\\Pagination;\nuse OpenC... | php | chosen |
[
{
"from": "human",
"value": "Add test for Delete Company Form\n\n- company can be deleted by admin\n- admin can delete company that is created by other user\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse App\\User;\nuse App\\Company;\n\nuse Illuminate\\Foundation\\Testing\\WithoutMiddleware;\nuse... | php | chosen |
[
{
"from": "human",
"value": "Implement yaml loader for the configuration file\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace PhpAbac\\Loader;\n\nuse Symfony\\Component\\Config\\Loader\\FileLoader;\nuse Symfony\\Component\\Yaml\\Yaml;\n\nclass YamlAbacLoader extends FileLoader\n{\n public... | php | chosen |
[
{
"from": "human",
"value": "Add class for Atom Person Constructs.\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace ComplexPie\\Atom10\\Content;\n\nclass Person\n{\n protected $node;\n \n protected $name;\n protected $uri;\n protected $email;\n \n public function __construc... | php | chosen |
[
{
"from": "human",
"value": "Test method for country collections\n"
},
{
"from": "gpt",
"value": "<?php\nuse Galahad\\LaravelAddressing\\Country;\nuse Galahad\\LaravelAddressing\\CountryCollection;\n\n/**\n * Class CountryCollectionTest\n *\n * @author Junior Grossi <juniorgro@gmail.com>\n */\nc... | php | chosen |
[
{
"from": "human",
"value": "Add a script to follow easily the cache entries\n"
},
{
"from": "gpt",
"value": "<?php\n\nif ($argc !=2) {\n throw new DomainException('Please provide a threshold parameter to measure TTLs of redis keys');\n}\n\n$threshold = (int) $argv[1];\nif ($threshold < 1) {\... | php | chosen |
[
{
"from": "human",
"value": "Introduce event listener to test nested events in buffered event bus\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 compli... | php | chosen |
[
{
"from": "system",
"value": "Add STA Plaza to meeting room jump list\n"
},
{
"from": "human",
"value": "<div class=\"btn-group btn-group-justified\">\n\t<a class=\"btn btn-default\" href=\"#downtown\">Downtown</a>\n\t<a class=\"btn btn-default\" href=\"#east-side\">East Side</a>\n\t<a class=\"b... | php | chosen |
[
{
"from": "human",
"value": "Create an example migration class\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse yii\\db\\Migration;\n\n/**\n * Handles the creation for table `table_test`.\n */\nclass m160529_025942_create_table_test extends Migration\n{\n /**\n * @inheritdoc\n */\n pu... | php | chosen |
[
{
"from": "human",
"value": "Add mediawiki integration to Selvbetjening\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once(\"sso_api.php\");\n\nclass AnimeKitaHooks {\n\n\tpublic static function onUserLoadFromSession($user, &$result) {\n\n\t\t$si_sso = new SelvbetjeningIntegrationSSO(\"wiki\... | php | chosen |
[
{
"from": "human",
"value": "Add this list here, so that pear-core guys can manipulate the PEAR bundle\nfor the win32 snapshot.\n\n\ngit-svn-id: 4b064e69dc630d28214c1e1442d27300cccf8e9a@155547 c90b9560-bf6c-de11-be94-00142212c4b1\n"
},
{
"from": "gpt",
"value": "<?php\n/* This is a list of packa... | php | chosen |
[
{
"from": "human",
"value": "Add Composer class to search for package(s) by name"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Bolt\\Composer\\Action;\n\nuse Bolt\\Composer\\PackageManager;\n\nuse Composer\\Factory;\nuse Composer\\Repository\\CompositeRepository;\nuse Composer\\Repository\\P... | php | chosen |
[
{
"from": "human",
"value": "Add top memes display controller\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass TopController extends \\BaseController {\n\n\t/**\n\t * Display a listing of the resource.\n\t *\n\t * @return Response\n\t */\n\tpublic function getIndex()\n\t{\n $memes = Meme::... | php | chosen |
[
{
"from": "human",
"value": "Write specs for the ElasticsearchExecutor\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace spec\\RulerZ\\Executor;\n\nuse Elasticsearch\\Client;\nuse PhpSpec\\ObjectBehavior;\n\nuse RulerZ\\Executor\\Executor;\n\nclass ElasticsearchExecutorSpec extends ObjectBehav... | php | chosen |
[
{
"from": "human",
"value": "Add the notes controller to define the CRUD action.\n"
},
{
"from": "gpt",
"value": "<?php namespace App\\Http\\Controllers;\n\nuse App\\Http\\Requests;\nuse App\\Http\\Controllers\\Controller;\n\nuse Illuminate\\Http\\Request;\n\nclass NotesController extends Contro... | php | chosen |
[
{
"from": "human",
"value": "Create migration to add processing_fee column to payments table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddProcessingF... | php | chosen |
[
{
"from": "human",
"value": "Add migration to drop the virtual columns from the DB\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass DropVirtualColumnsUsersT... | php | chosen |
[
{
"from": "human",
"value": "Add 'release' artisan command that bumps version number and generates docs [WEB-1807]\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace App\\Console\\Commands;\n\nuse Illuminate\\Support\\Facades\\Storage;\nuse Carbon\\Carbon;\n\nclass Release extends BaseCommand\n... | php | chosen |
[
{
"from": "human",
"value": "Create map type id helper\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Ivory\\GoogleMapBundle\\Templating\\Helper;\n\n/**\n * Map type ID helper\n *\n * @author GeLo <geloen.eric@gmail.com>\n */\nclass MapTypeIdHelper \n{\n /**\n * Renders javascript ma... | php | chosen |
[
{
"from": "human",
"value": "Add parse function for optional fields to avoid accessing non existent properties\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the easypay-php package.\n *\n * (c) Samuel Gordalina <https://github.com/gordalina/easypay-php>\n *\n * For the fu... | php | chosen |
[
{
"from": "human",
"value": "Implement tests for ContentBlock model class\n"
},
{
"from": "gpt",
"value": "<?php namespace Prezly\\DraftPhp\\Tests\\Model;\n\nuse InvalidArgumentException;\nuse PHPUnit_Framework_TestCase;\nuse Prezly\\DraftPhp\\Constants\\BlockType;\nuse Prezly\\DraftPhp\\Model\\... | php | chosen |
[
{
"from": "system",
"value": "Use null as default value for $options\n\n- FactoryInterface does this already; InvokableFactory should as well.\n"
},
{
"from": "human",
"value": "<?php\n/**\n * Zend Framework (http://framework.zend.com/)\n *\n * @link http://github.com/zendframework/zf2 for ... | php | chosen |
[
{
"from": "human",
"value": "Add route to check for maximun size to open ROOT files\n"
},
{
"from": "gpt",
"value": "<?php\n// Check if we are a user\nOCP\\JSON::checkLoggedIn();\n\n// Set the session key for the file we are about to edit.\n$dir = isset($_GET['dir']) ? $_GET['dir'] : '';\n$filen... | php | chosen |
[
{
"from": "human",
"value": "Test - Reencode all the MIME messages in the samples folder fixing the encodings\n"
},
{
"from": "gpt",
"value": "<?php\n\n// Recreate a message\n// This code is used in BackendIMAP:GetMessage - for MIME format (iOS devices), and will try to fix the encoding\n// Will... | php | chosen |
[
{
"from": "human",
"value": "Add a base worker shell\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace DelayedJobs\\Worker;\n\nuse Cake\\Datasource\\ModelAwareTrait;\n\n/**\n * Class BaseWorker\n */\nabstract class BaseWorker\n{\n use ModelAwareTrait;\n\n /**\n * Construct the listener... | php | chosen |
[
{
"from": "human",
"value": "Revert \"removing an accidently added custom\"\n\nThis reverts commit 67739dd33ef781726d44fa9ebc5cc01fc7fc54ee.\n"
},
{
"from": "gpt",
"value": "<?php \n //WARNING: The contents of this file are auto-generated\n\n\n/**\n * Advanced OpenWorkflow, Automating SugarCRM.\... | php | chosen |
[
{
"from": "human",
"value": "Add test coverage for LegacyEmptyPass."
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of Psy Shell\n *\n * (c) 2012-2014 Justin Hileman\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed wit... | php | chosen |
[
{
"from": "human",
"value": "Add migration to make a signup_id index on the events table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddSignupIdIndexToEventsTable extends Migration\n{\n /**\n... | php | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.