conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add sort index and remove unused disqus index\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\... | php | chosen |
[
{
"from": "system",
"value": "Use of thumb and icon method\n"
},
{
"from": "human",
"value": " <div class=\"clearfix well media @if($errors->has($field))has-error @endif\">\n @if($model->$field)\n <div>\n <span class=\"fa fa-file-text-o fa-3x\"></span>... | php | chosen |
[
{
"from": "human",
"value": "Add basic tests for product object\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace MageTitans\\Workshop\\Domain\\Product;\n\nuse MageTitans\\Workshop\\Domain\\Stock\\Stock;\nuse MageTitans\\Workshop\\Domain\\Stock\\StockInterface;\nuse PHPUnit\\Framework\\TestCas... | php | chosen |
[
{
"from": "human",
"value": "Add a command for checking permission\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 Sym... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for SuperfluousComment rule\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace MS\\PHPMD\\Tests\\Unit\\CleanCode;\n\nuse MS\\PHPMD\\Rule\\CleanCode\\SuperfluousComment;\nuse MS\\PHPMD\\Tests\\Unit\\AbstractApplyTest;\nuse PHPMD\\AbstractNode;\n\n/**\n ... | php | chosen |
[
{
"from": "human",
"value": "Fix created_at NULL throws errors on some SQL servers\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AllowNullOnCreatedColsInHistoricTables extends AbstractMigration {\n public function change() {\n $t = $this->t... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for Message\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Marein\\Nchan\\Http\\Adapter;\n\nuse Marein\\Nchan\\Message;\nuse PHPUnit\\Framework\\TestCase;\n\nclass MessageTest extends TestCase\n{\n /**\n * @test\n */\n public function... | php | chosen |
[
{
"from": "human",
"value": "Convert a given image to gray color model"
},
{
"from": "gpt",
"value": "<?php\n/*\n * PixLab PHP Client which is just a single class PHP file without any dependency that you can get from Github\n * https://github.com/symisc/pixlab-php \n */\nrequire_once \"pixlab.ph... | php | chosen |
[
{
"from": "human",
"value": "Rename 'price' to 'cost' for consistency\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass RenameEventPriceToCost extends Migrat... | php | chosen |
[
{
"from": "human",
"value": "Make all timestamps null by default\n\nBefore, some timestamp columns used to be `DEFAULT CURRENT_TIMESTAMP`.\nThis is bad from a data integrity standpoint. It's only useful if we\nhave a single timestamp column indicating when a record was added to\nthe database. Even then, we ... | php | chosen |
[
{
"from": "human",
"value": "Add a bootstrapper to allow OOMs to be handled\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Bugsnag\\BugsnagLaravel;\n\nclass OomBootstrapper\n{\n /**\n * A bit of reserved memory to ensure we are able to increase the memory\n * limit on an OOM.\n ... | php | chosen |
[
{
"from": "human",
"value": "Revert \"[HttpFoundation] removed test file not related to 2.3\"\n\nThis reverts commit 60ed3880d70b3051ba6b6de30c2b7737ad3ea46e.\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.c... | php | chosen |
[
{
"from": "human",
"value": "Add some initial tests for the new SimpleSAML\\Locale\\Language class.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace SimpleSAML\\Test\\Locale;\n\nuse SimpleSAML\\Locale\\Language;\n\nclass LanguageTest extends \\PHPUnit_Framework_TestCase\n{\n\n\n /**\n ... | php | chosen |
[
{
"from": "human",
"value": "Add script to replace EXPECT block with generated, [skip ci]\n"
},
{
"from": "gpt",
"value": "<?php\n\n$tests_dir = realpath(__DIR__ . '/../tests');\n$iterator = new GlobIterator($tests_dir . '/*.out', FilesystemIterator::KEY_AS_FILENAME);\n\nforeach ($iterator as $i... | php | chosen |
[
{
"from": "human",
"value": "Add tests on the ContainerBag\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that wa... | php | chosen |
[
{
"from": "human",
"value": "Correct name for InvalidVerb Exception\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace PHPLegends\\Routes\\Exceptions;\n\n/**\n * @author Wallace de Souza Vizerra <wallacemaxters@gmail.com>\n * */\n\nclass InvalidVerbException extends RouteException \n{\n\n\t/**\... | php | chosen |
[
{
"from": "human",
"value": "Move this module to site.\n\n\nsvn commit r9412\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once 'Site/SiteApplicationModule.php';\nrequire_once 'Swat/SwatMessage.php';\n\n/**\n * Web application module for admin messages\n *\n * @package Admin\n * @copyright s... | php | chosen |
[
{
"from": "human",
"value": "Add test for Laravel project when within /app directory\n\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Illuminate\\Tests\\Foundation;\n\nuse Illuminate\\Foundation\\Events\\DiscoverEvents;\nuse Mockery;\nuse Orchestra\\Testbench\\TestCase;\nuse ReflectionClass... | php | chosen |
[
{
"from": "human",
"value": "Add migration for null values in jobs\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Emergence\\Connectors;\n\nuse DB;\n\n$tableName = Job::$tableName;\n\n$skipped = true;\n\nif (!static::tableExists($tableName)) {\n return static::STATUS_SKIPPED;\n}\n\nif (s... | php | chosen |
[
{
"from": "human",
"value": "Add some basic unit testing\n"
},
{
"from": "gpt",
"value": "<?php\nuse ThibaudDauce\\EloquentInheritanceStorage\\ParentTrait;\nuse Illuminate\\Database\\Eloquent\\Model as Eloquent;\nuse ThibaudDauce\\EloquentInheritanceStorage\\InheritanceStorage;\n\nclass ParentTr... | php | chosen |
[
{
"from": "system",
"value": "Handle parse exception adding a previous exception containing the requested url\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Denner\\Client\\Response;\n\nuse GuzzleHttp\\Message\\ResponseInterface as HttpResponseInterface;\n\nabstract class BaseResponse imp... | php | chosen |
[
{
"from": "system",
"value": "Allow mailing lists to be permanently deleted\n\nSummary: Allow `PhabricatorMetaMTAMailingList` to be permanently deleted with `./bin/remove destroy`.\n\nTest Plan:\n```\n./bin/remove destroy PHID-MLST-nseux3r55escj573shsf\n IMPORTANT: OBJECTS WILL BE PERMANENTLY DESTROYED!\n\n... | php | chosen |
[
{
"from": "human",
"value": "[ProductAttribute] Fix deleting choice value of a select product attribute\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... | php | chosen |
[
{
"from": "human",
"value": "Add Command to correct `numberOfSentences` in `sentences_lists` table\n\nThis command counts the number of records in the \n`sentences_sentences_lists` table, grouped by `sentences_list_id`, and \nreplaces `sentences_lists.numberOfSentences` with this value.\n"
},
{
"fro... | php | chosen |
[
{
"from": "human",
"value": "Add a create User and getUser example\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire dirname(__FILE__). '/../apikey.php';\n\nrequire dirname(__FILE__).'/../vendor/autoload.php';\n\nuse AJT\\Toggl\\TogglClient;\n\n// Get the toggl client with your toggl api key\n$t... | php | chosen |
[
{
"from": "human",
"value": "Add get user by name example program\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once 'Console/CommandLine.php';\nrequire_once \"../../config.php\";\nrequire_once \"../../utils.php\";\nrequire_once \"$IP/connectors/useraccounts-service-connector.php\";\n\n#####... | php | chosen |
[
{
"from": "human",
"value": "Add a code formatting test to make sure no require_once is used for views\n"
},
{
"from": "gpt",
"value": "<?php\n class CodeFormatTest extends UnitTest {\n public function testNoRequireOnceForViews() {\n $requireOnceInViews = shell_exec( \"find ... | php | chosen |
[
{
"from": "human",
"value": "Implement tagged service IDs sorter.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @author Igor Nikolaev <igor.sv.n@gmail.com>\n * @copyright Copyright (c) 2015, Darvin Studio\n * @link https://www.darvin-studio.ru\n *\n * For the full copyright and license... | php | chosen |
[
{
"from": "system",
"value": "BAP-10874: Apply select2-autocomplete component for field Organization Structure of form create/edit user\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Oro\\Bundle\\OrganizationBundle\\EventListener;\n\nuse Oro\\Bundle\\SearchBundle\\Event\\IndexerPrepareQue... | php | chosen |
[
{
"from": "human",
"value": "Add tests for table prefixing\n\nRef #508\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Silber\\Bouncer\\Tests;\n\nclass TablePrefixTest extends BaseTestCase\n{\n use Concerns\\TestsClipboards;\n\n protected function registerDatabaseContainerBindings()\n ... | php | chosen |
[
{
"from": "human",
"value": "Add example transaction report file"
},
{
"from": "gpt",
"value": "<?php\n// This is a very basic example of a file you could put on your server and with a daily cron, and get it to email you a report of all the successful transactions from the previous 24 hours.\n\n... | php | chosen |
[
{
"from": "human",
"value": "Add point class to the model\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Ivory\\GoogleMapBundle\\Model;\n\n/**\n * Point which describes a google map point\n * \n * @see http://code.google.com/apis/maps/documentation/javascript/reference.html#Point\n * @autho... | php | chosen |
[
{
"from": "human",
"value": "Add Unit Test for ReadException.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace OE\\HousenumBErParser\\Elements;\n\nclass ReadExceptionTest extends \\PHPUnit_Framework_TestCase\n{\n public function testSimple()\n {\n $re = new ReadException('This is... | php | chosen |
[
{
"from": "human",
"value": "Add downloads template for Resources block\n"
},
{
"from": "gpt",
"value": "<ul class=\"row ws-blockgrid\">\n <?php foreach ($resources as $resource): ?>\n\n <?php\n $download = '';\n $thumbnail = '';\n foreach ($resource['versions'] as... | php | chosen |
[
{
"from": "human",
"value": "Add missing branch \"embed\" branch\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n * This file is part of the Hierarchy package.\n *\n * (c) Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>\n *\n * For the full copyright and license information, please view the LICENS... | php | chosen |
[
{
"from": "human",
"value": "Add spec for a listener"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace spec\\Badger\\GameBundle\\EventListener;\n\nuse Badger\\GameBundle\\Entity\\Badge;\nuse Badger\\GameBundle\\Entity\\UnlockedBadge;\nuse Badger\\GameBundle\\Event\\BadgeUnlockEvent;\nuse Badger\... | php | chosen |
[
{
"from": "human",
"value": "Add uva and uvalive url crawler util\n"
},
{
"from": "gpt",
"value": "<?php\ninclude_once(dirname(__FILE__).\"/../functions/global.php\");\ninclude_once(dirname(__FILE__).\"/../functions/problems.php\");\ninclude_once(dirname(__FILE__).\"/../functions/pcrawlers.php\"... | php | chosen |
[
{
"from": "human",
"value": "Add the naughty or nice checker sample\n"
},
{
"from": "gpt",
"value": "<?php\n// Are you naughty or nice? Find out by texting in your name.\n// (c) 2016 Tropo. Released under MIT License\n\n$status = 'NICE'; // By default, you're nice\n\n// No phone calls, just text... | php | chosen |
[
{
"from": "human",
"value": "Store messages in full UTF-8\n"
},
{
"from": "gpt",
"value": "<?php\ndeclare(strict_types=1);\n\nnamespace Externals\\Application\\Database;\n\nuse Doctrine\\DBAL\\Platforms\\MySQL57Platform;\n\n/**\n * Overload the MySQL 5.7 platform to use the utf8mb4 charset when ... | php | chosen |
[
{
"from": "human",
"value": "Add example in hello-world extension\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace YesWiki\\HelloWorld\\Controller;\n\nuse Symfony\\Component\\Routing\\Annotation\\Route;\nuse YesWiki\\Core\\ApiResponse;\nuse YesWiki\\Core\\YesWikiController;\n\nclass ApiContro... | php | chosen |
[
{
"from": "human",
"value": "Add snippet for adding column to memberships table.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Plugin Name: Restrict Content Pro - Memberships Table Column\n * Description: Adds a new column to the Memberships admin table.\n * Version: 1.0\n * Author: Restrict C... | php | chosen |
[
{
"from": "human",
"value": "Add skeleton class for contenttypes translation keys"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Bolt\\Translation;\n\nuse Silex;\n\n/**\n * Generates translations keys for contenttypes\n */\nclass ContenttypesKeygen\n{\n /**\n * Injected Application obj... | php | chosen |
[
{
"from": "human",
"value": "Add migration script to upgrade multi languages site meta\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace OpenOrchestra\\ModelBundle\\Migrations\\MongoDB;\n\nuse AntiMattr\\MongoDB\\Migrations\\AbstractMigration;\nuse Doctrine\\MongoDB\\Database;\nuse Symfony\\Co... | php | chosen |
[
{
"from": "human",
"value": "Implement simple authentication token class for sessions"
},
{
"from": "gpt",
"value": "<?php\nnamespace Bolt\\AccessControl;\n\nuse Bolt\\Storage\\Entity;\n\n/**\n * Authentication tokens.\n *\n * @author Gawain Lynch <gawain.lynch@gmail.com>\n */\nclass Token\n{\n ... | php | chosen |
[
{
"from": "human",
"value": "Add example for PushGateway usage\n"
},
{
"from": "gpt",
"value": "<?php\nrequire __DIR__ . '/../vendor/autoload.php';\n\nuse Prometheus\\CollectorRegistry;\n\n$adapter = new Prometheus\\Storage\\APC();\n$registry = new CollectorRegistry($adapter);\n\n$counter = $reg... | php | chosen |
[
{
"from": "system",
"value": "[TASK] Raise allowed TYPO3 version to 9.5.99\n"
},
{
"from": "human",
"value": "<?php\n\n/*\n * This file is part of the package bk2k/bootstrap-package.\n *\n * For the full copyright and license information, please read the\n * LICENSE file that was distributed wit... | php | chosen |
[
{
"from": "human",
"value": "Create migration for adding overdue foreign keys\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddOverdueForeignKeys extends... | php | chosen |
[
{
"from": "human",
"value": "Test\\PHPSemVer\\Console\\AbstractCommand: Test that it can sprintf arguments\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Test\\PHPSemVer\\Console;\n\n\nuse PHPSemVer\\Console\\AbstractCommand;\n\nclass AbstractCommandTest extends \\PHPUnit_Framework_TestCase... | php | chosen |
[
{
"from": "human",
"value": "Add example with blpop with timeout\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire __DIR__ . \"/../vendor/autoload.php\";\n\nAmp\\run(function () {\n $client = new Amp\\Redis\\Client(\"tcp://localhost:6379\");\n\n yield $client->del(\"foobar-list\");\n\n ... | php | chosen |
[
{
"from": "human",
"value": "Add something to get station table from database\n\n"
},
{
"from": "gpt",
"value": "<?php\n/* Build Network station tables on demand! */\n\ninclude_once(\"$rootpath/include/database.inc.php\");\n\nclass NetworkTable {\n\n function NetworkTable($a)\n {\n $this->t... | php | chosen |
[
{
"from": "human",
"value": "Add MW import tool (moved from HEAD -- oops!)\n\n\ngit-svn-id: 98221c33f75d780f3c875f55d1123395aec31ba7@10966 b456876b-0849-0410-b77d-98878d47e9d5\n"
},
{
"from": "gpt",
"value": "<?php\n// $Header: /cvsroot/tikiwiki/tiki/import/mwxml2tikixml.php,v 1.2.2.2 2008-01-06... | php | chosen |
[
{
"from": "human",
"value": "Add mail_id foreign key to message table\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Migration Task class.\n */\nclass GoteoMessageMail\n{\n public function preUp()\n {\n // add the pre-migration code here\n }\n\n public function postUp()\n {\n // ... | php | chosen |
[
{
"from": "human",
"value": "Add ItemPreviewController to copy items previews.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace console\\controllers;\n\nuse Yii;\nuse yii\\console\\Controller;\nuse frontend\\models\\Item;\nuse frontend\\models\\ExternalSite;\nuse frontend\\components\\HelperB... | php | chosen |
[
{
"from": "system",
"value": "Set properties to be public\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace OAuth2\\Client\\Provider;\n\nclass User implements \\IteratorAggregate {\n\n protected $uid = null;\n protected $nickname = null;\n protected $name = null;\n protected $fir... | php | chosen |
[
{
"from": "human",
"value": "Add base tests for files api resource.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Onesky\\Api\\Tests;\n\nuse Onesky\\Api\\Client;\n\n/**\n * Class to test the files resource.\n *\n * See more about files resource here:\n * https://github.com/onesky/api-docum... | php | chosen |
[
{
"from": "human",
"value": "Add required typehint to ``CacheAwareInterface`` implementations\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Neos\\Flow\\Core\\Migrations;\n\n/*\n * This file is part of the Neos.Flow package.\n *\n * (c) Contributors of the Neos Project - www.neos.io\n *\n * T... | php | chosen |
[
{
"from": "human",
"value": "Add script to generate coverage badges\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @author Thomas Müller <thomas.mueller@tmit.eu>\n *\n * @copyright Copyright (c) 2016, ownCloud, Inc.\n * @license AGPL-3.0\n *\n * This code is free software: you can redistribute ... | php | chosen |
[
{
"from": "human",
"value": "Add a programming contest template for PHP\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env php\n<?php\nif (basename(__FILE__) == basename($_SERVER['PHP_SELF'])) {\n while ($line = fgets(STDIN)) {\n $tokens = split(' +', $line);\n <+CURSOR+>\n }\n}\n?>\n"
}
... | php | chosen |
[
{
"from": "human",
"value": "Rework PHP 5.4 and upgrade docker\n"
},
{
"from": "gpt",
"value": "<?php\n\n$installer = $this;\n\n\n$installer->startSetup();\n\n$installer->run(\"\n\nALTER TABLE {$this->getTable('hipay_split_payment')} ADD COLUMN `tax_amount_to_pay` decimal(12,4) NOT NULL,\nADD CO... | php | chosen |
[
{
"from": "human",
"value": "Add migration for new time range config\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse App\\Chart;\n\nclass MapTimeRanges extends Migration\n{\n /**\n * Run the migr... | php | chosen |
[
{
"from": "human",
"value": "Add the the model extractor test\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of Bens Penhorados, an undergraduate capstone project.\n *\n * (c) Fábio Santos <ffsantos92@gmail.com>\n *\n * For the full copyright and license information, please v... | php | chosen |
[
{
"from": "human",
"value": "[OEM-141] Replace parent_id/class on address with contact_id and add foreign key.\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass m140210_132147_address_foreign_key extends CDbMigration\n{\n\tpublic function up()\n\t{\n\t\t$orphans = $this->dbConnection->createComman... | php | chosen |
[
{
"from": "human",
"value": "Use form request to validate recommendation updates\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace RadDB\\Http\\Requests;\n\nuse Illuminate\\Foundation\\Http\\FormRequest;\n\nclass UpdateRecommendationRequest extends FormRequest\n{\n /**\n * Determine if ... | php | chosen |
[
{
"from": "human",
"value": "Add task results routing test\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace SimplyTestable\\WebClientBundle\\Tests\\Controller\\View\\Test\\Task\\Results\\Index\\IndexAction;\n\nuse SimplyTestable\\WebClientBundle\\Tests\\Controller\\Base\\RoutingTest as BaseRo... | php | chosen |
[
{
"from": "human",
"value": "Add a library for checking the source code.\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/php\n<?php\n/**\n * .git/hooks/pre-commit\n * \n * This pre-commit hooks will check for PHP error (lint), and make sure the code\n * is PSR compliant.\n * \n * Dependecy: PHP-CS-F... | php | chosen |
[
{
"from": "human",
"value": "Add controller which enables elrte on text field\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace cms;\n\n/* Add this to text field to enable WYSIWYG editing / html */\nclass Controller_Elrte extends \\AbstractController {\n\tfunction init(){\n\t\tparent::init();\n\... | php | chosen |
[
{
"from": "human",
"value": "Create general Utilities console tool\n\nCurrently this has one command that deletes all posts from the Blog.\nThis is needed for acceptance tests which need an empty blog to start.\n"
},
{
"from": "gpt",
"value": "<?php\r\n/**\r\n * Created by PhpStorm.\r\n * User: ... | php | chosen |
[
{
"from": "human",
"value": "Add a script for decaching an object\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env php\n<?php\n/*\n * Laconica - a distributed open-source microblogging tool\n * Copyright (C) 2009, Control Yourself, Inc.\n *\n * This program is free software: you can redistribute ... | php | chosen |
[
{
"from": "human",
"value": "Create profile table from migrate\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * @author Sheillendra <sheillendra@yahoo.com>\n * @copyright (c) 2015, PHP Indonesia\n * @date 2015-07-04\n */\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\n/**\n * Pembuatan tabe... | php | chosen |
[
{
"from": "human",
"value": "Add tests for simple bus delegate\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace spec\\SyliusLabs\\RabbitMqSimpleBusBundle\\Bus;\n\nuse PhpSpec\\ObjectBehavior;\nuse SimpleBus\\Message\\Bus\\MessageBus;\nuse SyliusLabs\\RabbitMqSimpleBusBundle\\Bus\\MessageBusIn... | php | chosen |
[
{
"from": "human",
"value": "Create Cache Zend Cache Adapter\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace CurrencyConverterTest\\Cache\\Adapter;\n\nuse CurrencyConverter\\Cache\\Adapter\\ZendAdapter;\n\nclass ZendAdapterTest extends \\PHPUnit_Framework_TestCase\n{\n public function testC... | php | chosen |
[
{
"from": "human",
"value": "Add a sample user that doesn't have admin rights to test RBAC (fixes OE-108)\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass m110906_100325_add_non_admin_user extends CDbMigration\n{\n\tpublic function up()\n\t{\n\t\t$this->insert('user', array(\n\t\t\t'username' => ... | php | chosen |
[
{
"from": "human",
"value": "Add migration for right answer\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * Data object containing the SQL and PHP code to migrate the database\n * up to version 1382246909.\n * Generated on 2013-10-20 07:28:29 by smirik\n */\nclass PropelMigration_1382246909\n{... | php | chosen |
[
{
"from": "human",
"value": "Add compiler pass for registering commands\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Ibuildings\\QaTools\\Core\\Application\\CompilerPass;\n\nuse Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface;\nuse Symfony\\Component\\DependencyIn... | php | chosen |
[
{
"from": "human",
"value": "Add subscription line type entity\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Picqer\\Financials\\Exact;\n\n/**\n * Class SubscriptionLineType.\n *\n * @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=SubscriptionSubscriptionLineTyp... | php | chosen |
[
{
"from": "human",
"value": "Add /revoke route as per RFC 7009\n\nAdded /revoke route as per RFC 7009 (https://tools.ietf.org/html/rfc7009#section-2) integrated into bshaffer/oauth2-server-php. Request parameters as outlined in the server library should have 'token_type_hint' which is either 'access_token' ... | php | chosen |
[
{
"from": "human",
"value": "Add dev utility to generate offset map sizes depending on uploaded file size\n\n\ngit-svn-id: 28fe03dfd74dd77dcc8ecfe99fabcec8eed81bba@3550 8555b757-d854-4b86-925a-82fd84c90ff4\n"
},
{
"from": "gpt",
"value": "<?php\n\nfunction file_size_to_offset_map_size($file_size... | php | chosen |
[
{
"from": "human",
"value": "Add example of keyed shutdown.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Gielfeldt\\Example;\n\nrequire 'vendor/autoload.php';\n\nuse Gielfeldt\\ShutdownHandler;\n\n/**\n * Simple shutdown handler callback.\n *\n * @param string $message\n * Message to di... | php | chosen |
[
{
"from": "human",
"value": "Create tests for attachment factory.\n\nCreated attachment factory tests.\n"
},
{
"from": "gpt",
"value": "<?php namespace Codesleeve\\Stapler\\Factories;\n\nuse PHPUnit_Framework_TestCase;\n\nclass AttachmentTest extends PHPUnit_Framework_TestCase\n{\n\t/**\n\t * Se... | php | chosen |
[
{
"from": "human",
"value": "Add Issue custom attributes endpoint\n\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace TZK\\Taiga\\Services;\n\nuse TZK\\Taiga\\RestClient;\nuse TZK\\Taiga\\Service;\n\nclass IssueCustomAttributes extends Service\n{\n public function __construct(RestClient $ta... | php | chosen |
[
{
"from": "human",
"value": "Add new API notification type because of new API limit"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare( strict_types=1 );\n\nnamespace MarcusJaschen\\Collmex\\Type;\n\n/**\n * Collmex API notification Type.\n *\n * @author Marcus Jaschen <mail@marcusjaschen.de>\n *... | php | chosen |
[
{
"from": "human",
"value": "Add roundcube patch to update\n"
},
{
"from": "gpt",
"value": "<?php\n\ndefined(\"_VALID_ACCESS\") || die('Direct access forbidden');\nif(DB::is_mysql())\n $f = file_get_contents('modules/CRM/Roundcube/RC/SQL/mysql.update5.sql');\nelse\n $f = file_get_contents(... | php | chosen |
[
{
"from": "human",
"value": "Add Political Party Time provider source\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * FurryBear\n * \n * PHP Version 5.3\n * \n * @category Congress_API\n * @package FurryBear\n * @author lobostome <lobostome@local.dev>\n * @license http://opensource.org/lic... | php | chosen |
[
{
"from": "human",
"value": "Add secp256k1 ecdh test file\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace BitWasp\\Secp256k1Tests;\n\nclass Secp256k1EcDHTest extends TestCase\n{\n\n /**\n * Testing return value 1\n */\n public function testEcdsa()\n {\n $context = Tes... | php | chosen |
[
{
"from": "human",
"value": "Change data type for JSON fields\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * Migration: 10\n * Started: 29/04/2021\n *\n * @package Nails\n * @subpackage module-cms\n * @category Database Migration\n * @author Nails Dev Team\n */\n\nnamespace Nai... | php | chosen |
[
{
"from": "human",
"value": "Index inserida para verificar se o cms foi instalado\n"
},
{
"from": "gpt",
"value": "<?php\n\nif(is_file('../install.php')){\n header('Location: ../install.php');\n die();\n}\n\necho \"<h1>Parece que ocorreu tudo bem com a instalação :] <br> Crie um projeto.</... | php | chosen |
[
{
"from": "human",
"value": "Disable workshop by default in a new install MDL-13100\n"
},
{
"from": "gpt",
"value": "<?php // $Id$\n if (empty($CFG->workshop_initialdisable)) {\n if (!count_records('workshop')) {\n set_field('modules', 'visible', 0, 'name', 'workshop'); ... | php | chosen |
[
{
"from": "human",
"value": "Remove login form from 404 error page, replace with cas login link\n"
},
{
"from": "gpt",
"value": "<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>\n<div id=\"g-error\">\n <h1>\n <?= t(\"Page not found!\") ?>\n </h1>\n <? if ($is_guest): ?>\n... | php | chosen |
[
{
"from": "human",
"value": "Add query to iterate on the attachments\n"
},
{
"from": "gpt",
"value": "<?php namespace mitogh;\n\nclass Query{\n\tprivate $args = array(\n\t\t'posts_per_page' => 1,\n\t\t'orderby' => 'rand',\n\t\t'post_type' => 'attachment',\n\t\t'post_status' => 'inherit',\n\t\t'p... | php | chosen |
[
{
"from": "human",
"value": "Validate component improving and add tests for it\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\n/*\n * This file is part of the ************************ package.\n * _____________ _______________\n * ______/ \\_... | php | chosen |
[
{
"from": "human",
"value": "Add functions to parse srt files to create HTML subtitles structure\n"
},
{
"from": "gpt",
"value": "<?php\r\n function parse_time($time_str) {\r\n $time_str = preg_replace('/:/', '', $time_str);\r\n $time_str = preg_replace('/,/', '.', $time_str);\r\n retu... | php | chosen |
[
{
"from": "human",
"value": "Add initial placeholder for the CfP\n"
},
{
"from": "gpt",
"value": "<?php\n/*******************************************************************************\n * Copyright (c) 2016 Eclipse Foundation and others.\n * All rights reserved. This program and the accompanyi... | php | chosen |
[
{
"from": "system",
"value": "Throw a more user-friendly exception when the SearchBehavior is not attached\n\nRather than throw the following error/exception:\r\n\r\n```\r\nUnknown method \"filterParams\"\r\n```\r\n\r\nWe throw a RuntimeException that informs the developer that they have misconfigured their... | php | chosen |
[
{
"from": "human",
"value": "Add new webservice call for displaying all organisms to a specific trait\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace ajax\\details;\n\nuse \\PDO as PDO;\n\n/**\n * Web Service.\n * Returns Organisms with given ids\n */\nclass Organisms extends \\WebService {\... | php | chosen |
[
{
"from": "human",
"value": "Add migration to rename caption column to text\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass RenameCaptionToTextInPostsTable... | php | chosen |
[
{
"from": "human",
"value": "Add skeleton for category indexer\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * Solr data helper\n *\n * @category Asm\n * @package Asm_Solr\n * @author Ingo Renner <ingo@infielddesign.com>\n */\nclass Asm_Solr_Model_Indexer_Category extends Asm_Solr_Model_Indexe... | php | chosen |
[
{
"from": "system",
"value": "Remove verbose logging on PlayerActionService\n"
},
{
"from": "human",
"value": "<?php\n/*\n * Spring Signage Ltd - http://www.springsignage.com\n * Copyright (C) 2016 Spring Signage Ltd\n * (Xmr.php)\n */\n\n\nnamespace Xibo\\Middleware;\n\n\nuse Slim\\Middleware;\... | php | chosen |
[
{
"from": "human",
"value": "Add mail smtp test file\n"
},
{
"from": "gpt",
"value": "<?php\n//设置编码\nheader(\"content-type:text/html;charset=utf-8\");\nerror_reporting(E_ALL);\nini_set('display_errors', '1');\nrequire_once 'config.php';\nrequire 'Ss/mail-smtp.php';\n\n/*\necho \"smtp服务器连接方式:\". ... | php | chosen |
[
{
"from": "human",
"value": "Add initial function test suite.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Mimic\\Test;\n\nuse PHPUnit_Framework_TestCase;\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for initial Mimic library function.\n *\n * @since 0.1.0\n */\nclass InitialFuncTest... | php | chosen |
[
{
"from": "human",
"value": "Add partition function test suite.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Mimic\\Test;\n\nuse PHPUnit_Framework_TestCase;\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for partition Mimic library function.\n *\n * @since 0.1.0\n */\nclass PartitionFu... | php | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.