conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Migrate flow chart pages chart data to the new API\n\nCLI Usage:\n./framework/sake dev/tasks/FlowChartMigrate flush=1\n\nVia webserver:\n/dev/tasks/FlowChartMigrate?flush=1\n" }, { "from": "gpt", "value": "<?php\n/**\n * Converts old API where the flow chart data was...
php
chosen
[ { "from": "human", "value": "Add unit tests for SecurityEncoderFactoryPass\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the FOSUserBundle package.\n *\n * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>\n *\n * For the full copyright and license information, p...
php
chosen
[ { "from": "human", "value": "Add test cases for StoppablePropagation\n" }, { "from": "gpt", "value": "<?php\n\nnamespace PageExperience\\Tests\\Engine\\EventDispatcher;\n\nuse PageExperience\\Tests\\TestCase;\nuse PageExperience\\Engine\\EventDispatcher\\StoppablePropagation;\n\n/**\n * Test the...
php
chosen
[ { "from": "human", "value": "Add sorted set 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\\App...
php
chosen
[ { "from": "human", "value": "Add a company access helper" }, { "from": "gpt", "value": "<?php\nnamespace common\\commands;\n\nuse Yii;\n\nclass CompanyAccess\n{\n public function getQueryConditions(){\n $company_id = yii::$app->getUser()->identity->company->id;\n $user_role = yi...
php
chosen
[ { "from": "human", "value": "Add unit tests for the violations cache\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Regis\\GithubContext\\Infrastructure\\Inspection;\n\nuse PHPUnit\\Framework\\TestCase;\nuse M6Web\\Component\\RedisMock\\RedisMockFactory;\nuse Predis\\ClientInterface ...
php
chosen
[ { "from": "human", "value": "Add abstract class for type tests\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the VinceTypeBundle package.\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n...
php
chosen
[ { "from": "human", "value": "Add a script to fix users who have missing mobile field.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Script to fix users with `xxxx@mobile` emails, but nothing set in their mobile field.\n *\n * to run:\n * drush --script-path=../scripts/ php-script fix-mobile-fi...
php
chosen
[ { "from": "human", "value": "saml2: Add a class for SAML2 constants.\n\nThis patch adds the SimpleSAML_XML_SAML2 class, which currently contain\nSAML 2 status codes constants. New SAML2 constants should be added to this\nclass.\n\ngit-svn-id: a243b28a2a52d65555a829a95c8c333076d39ae1@1569 44740490-163a-0410-...
php
chosen
[ { "from": "system", "value": "Add missing hook for `PropelQuerySubscriber`" }, { "from": "human", "value": "<?php\n\nnamespace Knp\\Component\\Pager\\Event\\Subscriber\\Sortable;\n\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\nuse Knp\\Component\\Pager\\Event\\BeforeEvent;...
php
chosen
[ { "from": "human", "value": "Add cart manager interface [initial version]\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: Omar\n * Date: 4/24/2016\n * Time: 10:44 PM\n */\n\nnamespace Demo\\CartBundle\\Entity;\n\n/**\n * Interface CartManagerInterface\n * @package ...
php
chosen
[ { "from": "system", "value": "Fix bug with email attachments\n" }, { "from": "human", "value": "<?php\n\nnamespace Ice\\MailerBundle\\PreCompiler;\n\nuse Ice\\MailerBundle\\Attachment\\Attachment;\nuse Ice\\MailerBundle\\Attachment\\AttachmentException;\nuse Ice\\MailerBundle\\Attachment\\Attach...
php
chosen
[ { "from": "human", "value": "Add slug column to story model\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass AddSlugToStoriesTable extends Migration {\n\n /**\n * Run the migrations.\n *\n...
php
chosen
[ { "from": "human", "value": "Add unit test for Configuration\n" }, { "from": "gpt", "value": "<?php\nnamespace Airbrake;\n\nrequire_once(__DIR__.'/../../src/Airbrake/Configuration.php');\nrequire_once(__DIR__.'/../../src/Airbrake/Exception.php');\n\nclass ConfigurationTest extends \\PHPUnit_Fram...
php
chosen
[ { "from": "human", "value": "Add skeleton for CMS 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_Cms extends Asm_Solr_Model_Indexer_Abstract...
php
chosen
[ { "from": "human", "value": "Add PhpStorm configuration for Moka\n" }, { "from": "gpt", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace PHPSTORM_META {\n\n use Moka\\Moka;\n\n override(\n Moka::phpunit(0),\n map([\n '' => '@'\n ])\n );\n\n overr...
php
chosen
[ { "from": "human", "value": "Add discussion_id foreign key to posts table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Schema\\Builder;\n\nreturn [\n 'up' => function (Builder $schema) {\n // Delete rows with non-exis...
php
chosen
[ { "from": "human", "value": "Add photo retail item model.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Arctic\\Model\\PhotoSite;\n\nuse Arctic\\Model;\n\n/**\n * Class PhotoRetailItem\n * @property int $id\n * @property string $name\n * @property string $shortname\n * @property string $va...
php
chosen
[ { "from": "human", "value": "Add a dummy field class\n" }, { "from": "gpt", "value": "<?php\n/**\n * Front End Accounts\n *\n * @category WordPress\n * @package FrontEndAcounts\n * @since 0.1\n * @author Christopher Davis <http://christopherdavis.me>\n * @copyright 2013 Chris...
php
chosen
[ { "from": "human", "value": "Add xml_document column to 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 AddXmlDocumentToEntriesTable extends ...
php
chosen
[ { "from": "human", "value": "Add a functional test for the password reset flow.\n" }, { "from": "gpt", "value": "<?php\n\nuse Northstar\\Auth\\Registrar;\nuse Northstar\\Models\\User;\n\nclass PasswordResetTest extends TestCase\n{\n /**\n * Reset the server variables for the request.\n ...
php
chosen
[ { "from": "human", "value": "Add missing profile generator console command\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Console\\Commands;\n\nuse Illuminate\\Console\\Command;\nuse App\\Peer, App\\Hub\\Node\\Node, App\\Hub\\Service, App\\User;\n\nclass FixProfile extends Command\n{\n...
php
chosen
[ { "from": "human", "value": "III-217: Test event export command for allowing a notification address\n" }, { "from": "gpt", "value": "<?php\n\nnamespace CultuurNet\\UDB3\\EventExport\\Command;\n\nuse CultuurNet\\UDB3\\EventExport\\EventExportQuery;\nuse CultuurNet\\UDB3\\EventExport\\HTML\\Brand;...
php
chosen
[ { "from": "human", "value": "Check that the latest migration has the correct version\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Concrete\\Tests\\Update;\n\nuse Concrete\\Core\\Updater\\Migrations\\Configuration;\nuse Doctrine\\DBAL\\Migrations\\Version;\nuse PHPUnit\\Framework\\TestCase...
php
chosen
[ { "from": "human", "value": "Add a command to send a alert by mail if a lock is too old.\n" }, { "from": "gpt", "value": "<?php\nnamespace App\\Command;\n\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Command\\LockableTrait;\nuse Symfony\\Component\\Consol...
php
chosen
[ { "from": "human", "value": "Add test case for project delete webservice\n" }, { "from": "gpt", "value": "<?php\n\nnamespace fennecweb;\n\nclass ProjectRemoveTest extends \\PHPUnit_Framework_TestCase\n{\n const NICKNAME = 'ProjectRemoveTestUser';\n const USERID = 'ProjectRemoveTestUser';\n...
php
chosen
[ { "from": "human", "value": "Add page to download private ssh key.\n" }, { "from": "gpt", "value": "<?php\n//----------------------------------------------------------------------\n// Copyright (c) 2012 Raytheon BBN Technologies\n//\n// Permission is hereby granted, free of charge, to any person...
php
chosen
[ { "from": "human", "value": "Disable jqmigrate during e2e tests.\n\nThis helps keep the console clean, especially when \"persist log\" is enabled.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Plugin Name: E2E Disable jQuery Migrate\n * Description: Plugin for disabling jQuery migrate during E...
php
chosen
[ { "from": "human", "value": "Add admin delete domain PHP\n" }, { "from": "gpt", "value": "<?php\ninclude (\"conectare_db.php\");\n$sql = 'begin :rezultat := admin_pachet.sterge_domeniu(:v_id); END;';\n$stid = oci_parse($connection, $sql);\noci_bind_by_name($stid, \":v_id\", $_POST[\"d_id\"]);\n...
php
chosen
[ { "from": "human", "value": "Add example for testing measurement more accurate\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * Require Performance\n */\n\nrequire_once('../vendor/autoload.php');\nuse Performance\\Performance;\n\n/*\n * One test for measurements the accurate\n */\nPerformance::p...
php
chosen
[ { "from": "human", "value": "Add a new helper class that extends Object and adds ::get() method\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: mirel\n * Date: 22.02.2016\n * Time: 11:53\n */\n\nnamespace mpf\\base;\n\n\nclass Singleton extends Object {\n\n priv...
php
chosen
[ { "from": "human", "value": "Add a helpful script for resizing any icon to 32x32\n" }, { "from": "gpt", "value": "#!/usr/bin/php\n<?php\n\n// Don't allow from Apache\nif (PHP_SAPI !== 'cli')\n{\n die('Nope.');\n}\n\nif (count($argv) < 2) {\n die(\"Usage: rpicons.php <folder>\\n\");\n}\n\ne...
php
chosen
[ { "from": "human", "value": "Revert \"Delete\" from 137c29648e. Restored the brace style sniff deactivation the part the code base is unclear about.\n" }, { "from": "gpt", "value": "<?php\nclass PHPCS_Sniffs_ControlStructures_ControlSignatureSniff extends PHP_CodeSniffer_Standards_AbstractPatter...
php
chosen
[ { "from": "human", "value": "Add presenter trait for user initialization" }, { "from": "gpt", "value": "<?php declare(strict_types=1);\n\nnamespace PAF\\Common\\Presenter;\n\nuse PAF\\Common\\Security\\LiveUserIdentity;\nuse PAF\\Modules\\CommonModule\\Model\\User;\nuse PAF\\Modules\\CommonModul...
php
chosen
[ { "from": "human", "value": "Add a prototype for dependency injection container of my choice\n\n" }, { "from": "gpt", "value": "<?php\n/**\n * A dependency injection container for lazy-evaluated shared resources.\n**/\nnamespace Ob_Ivan\\ResourceContainer;\n\nuse ArrayAccess;\n\nclass ResourceCo...
php
chosen
[ { "from": "human", "value": "[+FEATURE] Add string to boolean Type converter\n\nChange-Id: Ia4d93a20bd61900f503815c93c7752ae4300469f\nOriginal-Commit-Hash: 52ef434ce2c825bd565d171a0e8adc99125742b2\n" }, { "from": "gpt", "value": "<?php\ndeclare(ENCODING = 'utf-8');\nnamespace F3\\FLOW3\\Property...
php
chosen
[ { "from": "human", "value": "Rename KillLog API to KillMails\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass RenameKillLogApiEndpoint extends Migration {\n\n\t/**\n\t * Run the migrations.\n\t *\n\t...
php
chosen
[ { "from": "human", "value": "Add tests for Cache Manager class\n" }, { "from": "gpt", "value": "<?php\n\nuse Aviat\\Ion\\Friend;\nuse Aviat\\Ion\\Cache\\CacheManager;\n\nclass CacheManagerText extends AnimeClient_TestCase {\n\n\tprotected $cachedTime;\n\n\tpublic function __call($name, $args)\n\...
php
chosen
[ { "from": "human", "value": "Add initial basic bloomd client\n" }, { "from": "gpt", "value": "<?php\n\nclass BloomdClient\n{\n\t// CONSTANTS - - - - - - - - - - - - - - - - - - - - -\n\n\t// Constants for TCP or UDP connection to bloomd\n\tconst BLOOMD_TCP = 0;\n\tconst BLOOMD_UDP = 1;\n\n\t// I...
php
chosen
[ { "from": "human", "value": "Add the imagine filters annotation.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Glavweb\\CoreBundle\\Mapping\\Annotation;\n\n/**\n * Class ImagineFilters\n * @package Glavweb\\UploaderBundle\\Mapping\\Annotation\n *\n * @Annotation\n * @Target({\"PROPERTY\"}...
php
chosen
[ { "from": "human", "value": "Add inline if unit test\n" }, { "from": "gpt", "value": "<?php\n\nnamespace MS\\PHPMD\\Tests\\Unit\\CleanCode;\n\nuse MS\\PHPMD\\Rule\\CleanCode\\InlineIf;\nuse MS\\PHPMD\\Tests\\Unit\\AbstractApplyTest;\n\n/**\n * Class InlineIfTest\n *\n * @package MS\\PHPMD\\Tests...
php
chosen
[ { "from": "human", "value": "Add tests for the comment controller factory\n" }, { "from": "gpt", "value": "<?php\nnamespace RbCommentTest\\Factory\\Controller;\n\nuse Interop\\Container\\ContainerInterface;\nuse PHPUnit_Framework_TestCase;\nuse RbComment\\Controller\\CommentController;\nuse RbCo...
php
chosen
[ { "from": "human", "value": "Create a abstract class 'FormFieldSemanticUI' - responsible to generate html fields using the frontend frameword 'Semanti-ui'\n" }, { "from": "gpt", "value": "<?php\n/**\n * <h1>FormFieldsSemanticUI</h1>\n * \n * Project Name: Backfront\n * Project URI: https://githu...
php
chosen
[ { "from": "human", "value": "[FrameworkBundle] Add unit tests for the TemplateLocator class\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 ...
php
chosen
[ { "from": "human", "value": "Add migration to index fingerprint column\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddFingerprintIndexToConfessionsTabl...
php
chosen
[ { "from": "human", "value": "Add test for listing organisms webservice\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\AppBundle\\API\\Listing;\n\nuse AppBundle\\AppBundle;\nuse AppBundle\\DB;\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\nuse Symfony\\Component\\HttpFound...
php
chosen
[ { "from": "human", "value": "Add new service for uploading traits\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AppBundle\\API\\Upload;\n\n\nuse AppBundle\\Service\\DBVersion;\nuse Symfony\\Bundle\\FrameworkBundle\\Console\\Application;\nuse Symfony\\Component\\Console\\Input\\ArrayInput;\...
php
chosen
[ { "from": "human", "value": "BAP-9469: Increase JSON API performance\n - Add unit tests\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Oro\\Bundle\\ApiBundle\\Tests\\Unit\\Processor\\NormalizeValue;\n\nuse Oro\\Bundle\\ApiBundle\\Processor\\NormalizeValue\\NormalizeValueContext;\n\nclass No...
php
chosen
[ { "from": "human", "value": "Create app title on config folder\n" }, { "from": "gpt", "value": "<?php\ndefined('BASEPATH') OR exit('No direct script access allowed');\n\n// CONFIG APP BY HEKKYDEV REPOSITORY\n\n\n$config['ci_app_title'] = \"SCM | Pertamina LPG Sistem Management\";" } ]
php
chosen
[ { "from": "system", "value": "Check for existince of uri\n" }, { "from": "human", "value": "<?php\nnamespace Talk;\n\nuse Application\\BaseCommentEntity;\nuse stdClass;\n\nclass TalkCommentEntity extends BaseCommentEntity\n{\n public function getUsername()\n {\n if (!isset($this->da...
php
chosen
[ { "from": "human", "value": "Add hydrate command unit test\n" }, { "from": "gpt", "value": "<?php\n\nuse Gaufrette\\Adapter\\InMemory;\nrequire_once __DIR__ . '/CommandTestCase.php';\n\nclass HydrateTest extends CommandTestCase\n{\n protected\n $mock;\n \n protected function setU...
php
chosen
[ { "from": "human", "value": "Add functional tests for the blog category actions.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Frontend\\Modules\\Blog\\Action;\n\nuse Common\\WebTestCase;\n\nclass CategoryTest extends WebTestCase\n{\n public function testCategoryHasPage()\n {\n ...
php
chosen
[ { "from": "human", "value": "Add fast exponentiation in PHP\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Part of Cosmos by OpenGenus Foundation\n */\n\n/**\n * This functions computes an exponent by doing repeated squares\n *\n * @param Integer $base the base\n * @param Integer $exponent th...
php
chosen
[ { "from": "human", "value": "Add a test for generated JSON\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Feature;\n\nuse Mockery;\nuse Tests\\TestCase;\nuse App\\IndieWebUser;\nuse IndieAuth\\Client as IndieClient;\nuse GuzzleHttp\\Client as GuzzleClient;\nuse GuzzleHttp\\Middleware...
php
chosen
[ { "from": "human", "value": "Add tests for the content extentions upload module page\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Tests\\Action;\n\nuse Common\\WebTestCase;\n\nclass UploadModuleTest extends WebTestCase\n{\n public function testAuthentic...
php
chosen
[ { "from": "human", "value": "Add missing test for getItem on ItemTooLargeException\n" }, { "from": "gpt", "value": "<?php\n/**\n * Box packing (3D bin packing, knapsack problem)\n * @package BoxPacker\n * @author Doug Wright\n */\ndeclare(strict_types=1);\nnamespace DVDoug\\BoxPacker;\n\nuse DVD...
php
chosen
[ { "from": "human", "value": "Add top-level redirect to www/\n\nThis commit adds a top-level redirect to the www/ directory, as that's\nwhere all the good stuff happens. It also allows us to hand out\nprettier/shorter URLs for our public installs, which is good because\npeople have a shorter memory than a co...
php
chosen
[ { "from": "human", "value": "[FEATURE] Add operation for sorting nodes recursive\n" }, { "from": "gpt", "value": "<?php\nnamespace Flowpack\\Listable\\TypoScript\\Eel\\FlowQueryOperations;\n\n/* *\n * This script belongs to t...
php
chosen
[ { "from": "human", "value": "ADD exception class for when inventory is invalid\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: necipalllef\n * Date: 17/06/2017\n * Time: 15:29\n */\n\nnamespace Fabs\\SteamLibrary\\Exception;\n\n\nclass InvalidSteamInventoryExceptio...
php
chosen
[ { "from": "human", "value": "Add function all object test\n" }, { "from": "gpt", "value": "// SYNTAX TEST \"Packages/php-grammar/PHP.tmLanguage\"\n<?php\n\n$foo = $this->getRequest();\n// ^ meta.function-call.object\n\n$foo = $this->request;\n// ^ variable.other.propert...
php
chosen
[ { "from": "human", "value": "Add comment event handler for activities\n\nSigned-off-by: Julius Härtl <bf353fa4999f2f148afcc6d8ee6cb1ee74cc07c3@bitgrid.net>\n" }, { "from": "gpt", "value": "<?php\n/**\n * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>\n *\n * @author Julius Härtl <j...
php
chosen
[ { "from": "human", "value": "Introduce global view parameters service\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 with the License.\n * Y...
php
chosen
[ { "from": "human", "value": "Test assets are getting published\n" }, { "from": "gpt", "value": "<?php namespace Nwidart\\Modules\\Tests\\Commands;\n\nuse Nwidart\\Modules\\Tests\\BaseTestCase;\n\nclass PublishCommandTest extends BaseTestCase\n{\n /**\n * @var \\Illuminate\\Filesystem\\Fil...
php
chosen
[ { "from": "human", "value": "Add example php script for handling telesign callbacks\n" }, { "from": "gpt", "value": "<?php\nconst CUSTOMER_ID = \"Your 40 Character Customer ID Goes here\";\nconst API_KEY = \"YOUR API KEY GOES HERE\";\n\nfunction _log($log_level, $log_message) {\n //syslog($log_...
php
chosen
[ { "from": "human", "value": "[TEST] Add UnitTest for Singleton trait\n" }, { "from": "gpt", "value": "<?php\nnamespace AppZap\\PHPFramework\\Tests\\Unit;\n\nuse AppZap\\PHPFramework\\Domain\\Repository\\AbstractDomainRepository;\n\nclass TestRepository1 extends AbstractDomainRepository{}\nclass ...
php
chosen
[ { "from": "human", "value": "Add unit tests for Guild entity\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: piotrmacha\n * Date: 01/10/2017\n * Time: 14:06\n */\n\nnamespace Provider\\Entity;\n\nuse Discord\\OAuth2\\Client\\Provider\\Entity\\Guild;\nuse Discord\\O...
php
chosen
[ { "from": "human", "value": "Add migration to add admin account\n" }, { "from": "gpt", "value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m150706_113400_add_admin_account extends Migration\n{\n public function up()\n {\n $this->insert('user', ['username' => 'a...
php
chosen
[ { "from": "human", "value": "Split out database connection to a separate file.\n\n" }, { "from": "gpt", "value": "<?php function db_connect() {\n $conn = mysqli_connect('localhost', 'root', 'root', 'web20', 8889);\n $db_error = $conn ? '' : '<strong>Error connecting to database</strong>: '...
php
chosen
[ { "from": "human", "value": "Add a test for GridFieldOrderableRows::getSortTable\n" }, { "from": "gpt", "value": "<?php\n/**\n * Tests for the {@link GridFieldOrderableRows} component.\n */\nclass GridFieldOrderableRowsTest extends SapphireTest {\n\n\tprotected $usesDatabase = true;\n\n\t/**\n\t...
php
chosen
[ { "from": "human", "value": "Create timezone on the profile table" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Dektrium project.\n *\n * (c) Dektrium project <http://github.com/dektrium/>\n *\n * For the full copyright and license information, please view the LICENSE\n...
php
chosen
[ { "from": "human", "value": "[Tests] Check that author user can edit a 'page' record" }, { "from": "gpt", "value": "<?php\n\nuse Codeception\\Util\\Fixtures;\nuse Codeception\\Util\\Locator;\n\n/**\n * Backend 'author' tests\n *\n * @author Gawain Lynch <gawain.lynch@gmail.com>\n */\nclass Backe...
php
chosen
[ { "from": "human", "value": "Add trait for handle with mockery repetitive methods\n" }, { "from": "gpt", "value": "<?php\nnamespace Artesaos\\Zenvia\\Tests\\Traits;\n\nuse Mockery as m;\ntrait MockTrait\n{\n\n /**\n * @afterClass\n */\n public function tearDown()\n {\n m:...
php
chosen
[ { "from": "human", "value": "Add E2E test for footer\n" }, { "from": "gpt", "value": "<?php\n\nnamespace E2E;\n\n/**\n * Class PlaybackControlsTest\n *\n * Tests the playback controls (the footer buttons).\n *\n * @package E2E\n */\nclass PlaybackControlsTest extends TestCase\n{\n public func...
php
chosen
[ { "from": "human", "value": "Prepare test class for QueryBuilder\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Pragma\\Tests;\n\nuse Pragma\\DB\\DB;\nuse Pragma\\ORM\\QueryBuilder;\n\nclass QueryBuilderTest extends \\PHPUnit_Extensions_Database_TestCase\n{\n\tprotected $pdo;\n\tprotected $...
php
chosen
[ { "from": "human", "value": "[FIX] Put back file accidentally deleted from previous commit\n\n\ngit-svn-id: 7564fe402ed407387e083b9f1c8ef2c2bd7bb5d7@55762 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "gpt", "value": "<?php\n// (c) Copyright 2002-2015 by authors of the Tiki Wiki CMS Group...
php
chosen
[ { "from": "human", "value": "Create dbal type for fork cms value objects\n" }, { "from": "gpt", "value": "<?php\n\nnamespace ForkCMS\\Modules\\Backend\\Domain\\Navigation;\n\nuse Doctrine\\DBAL\\Types\\StringType;\nuse Doctrine\\DBAL\\Platforms\\AbstractPlatform;\nuse InvalidArgumentException;\n...
php
chosen
[ { "from": "human", "value": "Add a snippet object class" }, { "from": "gpt", "value": "<?php\nnamespace Bolt\\Assets\\Snippets;\n\n/**\n * Snippet objects.\n *\n * @author Gawain Lynch <gawain.lynch@gmaill.com>\n */\nclass Snippet\n{\n /** @var string */\n protected $location;\n /** @va...
php
chosen
[ { "from": "human", "value": "Add HostcategoriesMulti file in Connector\n" }, { "from": "gpt", "value": "<?php\n/**\n * Copyright 2005-2015 Centreon\n * Centreon is developped by : Julien Mathis and Romain Le Merlus under\n * GPL Licence 2.0.\n *\n * This program is free software; you can redistr...
php
chosen
[ { "from": "human", "value": "Introduce RA institution configuration options service\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 with the ...
php
chosen
[ { "from": "human", "value": "Add a base class for module classes\n" }, { "from": "gpt", "value": "<?php\n\nnamespace ModuleGenerator\\CLI\\Service\\Generate;\n\nuse ModuleGenerator\\PhpGenerator\\ModuleName\\ModuleName;\n\nabstract class GeneratableModuleClass extends GeneratableClass\n{\n /*...
php
chosen
[ { "from": "human", "value": "Add common zip class to extract them\n" }, { "from": "gpt", "value": "<?php\n/**\n * File ZipExtractor.php\n *\n * @category\n * @package\n * @author Ivanis Kouamé <ivanis.kouame@smile.fr>\n * @copyright 2015 Smile\n */\n\nnamespace Hipay\\MiraklConector\\Service;...
php
chosen
[ { "from": "human", "value": "Add script to reset admin user passwords\n" }, { "from": "gpt", "value": "<?php\n\n$file = '/shell/abstract.php';\nfor ($path = '/../../', $i = 0; ! file_exists(dirname(__FILE__) . $path . $file) && $i++ < 10; $path .= '../');\nrequire_once dirname(__FILE__) . $path ...
php
chosen
[ { "from": "human", "value": "Change manual payment label on registration form\n" }, { "from": "gpt", "value": "<?php\n/**\n * This will change the Manual Payment label on the registration\n * form to the text you specify below.\n */\nadd_filter( 'rcp_payment_gateways', function( $gateways ) {\n\...
php
chosen
[ { "from": "human", "value": "Improve test coverage on Model/ChangeFrequency\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\SitemapPlugin\\Model;\n\nuse SitemapPlugin\\Model\\ChangeFrequency;\n\n/**\n * Class ChangeFrequencyTest\n * @package Tests\\SitemapPlugin\\Model\n */\nclass Cha...
php
chosen
[ { "from": "human", "value": "Add unit tests for auth registry\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * This file is part of tenside/core.\n *\n * (c) Christian Schiffler <c.schiffler@cyberspectrum.de>\n *\n * For the full copyright and license information, please view the LICENSE\n * fi...
php
chosen
[ { "from": "human", "value": "Add an interface for signed elements\n" }, { "from": "gpt", "value": "<?php\n\nnamespace SAML2;\n\nuse RobRichards\\XMLSecLibs\\XMLSecurityKey;\n\n/**\n * An interface describing signed elements.\n *\n * @package SimpleSAMLphp\n */\ninterface SignedElementInterface\n...
php
chosen
[ { "from": "human", "value": "Test for importing and exporting.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Rah\\Danpu\\Test\\Export\\Simple;\nuse Rah\\Danpu\\Dump;\nuse Rah\\Danpu\\Export;\nuse Rah\\Danpu\\Import;\n\nclass SimpleTest extends \\PHPUnit_Framework_TestCase\n{\n private $...
php
chosen
[ { "from": "human", "value": "Add snippet for using a percentage for excerpt length.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Normally the length of the excerpt is a fixed number of words for all posts. This snippet\n * changes that value to a percentage of the post's length. This example ...
php
chosen
[ { "from": "human", "value": "Add it_IT, thanks to virgigiole" }, { "from": "gpt", "value": "<?php\n// +-----------------------------------------------------------------------+\r\n// | This file is part of Piwigo. |\r\n// | ...
php
chosen
[ { "from": "human", "value": "Add an abstract as a base for event classes\n" }, { "from": "gpt", "value": "<?php\nnamespace pyd\\testkit\\events;\n\n/**\n * Base class for events.\n *\n * @author Pierre-Yves DELETTRE <pierre.yves.delettre@gmail.com>\n */\nabstract class Event\n{\n /**\n * ...
php
chosen
[ { "from": "human", "value": "Add a lobby state column to the room table\n\nSigned-off-by: Joas Schilling <ab43a7c9cb5b2380afc4ddf8b3e2583169b39a02@schilljs.com>\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n/**\n * @copyright Copyright (c) 2019, Joas Schilling <coding@schil...
php
chosen
[ { "from": "human", "value": "Add internal sniff for project to demoshop merging.\n" }, { "from": "gpt", "value": "<?php\n/**\n * (c) Spryker Systems GmbH copyright protected.\n */\n\nnamespace Spryker\\Sniffs\\Internal;\n\nuse PHP_CodeSniffer_File;\nuse Spryker\\Sniffs\\AbstractSniffs\\AbstractS...
php
chosen
[ { "from": "human", "value": "Create new trait form image browsing.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Yajra\\CMS\\Http\\Traits;\n\nuse Symfony\\Component\\Finder\\Finder;\n\n/**\n * Class BrowsableTrait\n *\n * @package App\\Http\\Traits\n */\ntrait BrowsableTrait\n{\n /**\n ...
php
chosen
[ { "from": "human", "value": "Add the service provider file\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AAlakkad\\AjaxForwarder;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass AjaxForwarderServiceProvider extends ServiceProvider\n{\n protected $configPath = __DIR__.'/../../confi...
php
chosen
[ { "from": "system", "value": "Synchronize base functional test class with upstream\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the FOSUserBundle package.\n *\n * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>\n *\n * For the full copyright and license info...
php
chosen
[ { "from": "human", "value": "Add caption permissions API to liveNG partner.\n" }, { "from": "gpt", "value": "<?php\n/**\n * @package deployment\n * @subpackage propus.roles_and_permissions\n */\n$addPermissionsScript = realpath(dirname(__FILE__) . '/../../../../') . '/alpha/scripts/utils/permiss...
php
chosen
[ { "from": "human", "value": "Add hello world script by php\n" }, { "from": "gpt", "value": "<?php\n\t$abc = 55;\n\t$abc = 43;\n\t\n\tclass test{\n\t public static function abc(){\n\t\techo \"hello<br/>\";\n\t\tprint \"world<br/>\";\n\t}\t\n\t}\n\t\n\ttest::abc();\n\techo getcwd();\n\n?>" } ...
php
chosen
[ { "from": "human", "value": "F-0001: Add Loader to handle routes\n" }, { "from": "gpt", "value": "<?php \n\trequire_once(\"config/autoload.php\");\n\tConfig\\Autoload::run();\n\n\tUse config\\config as Config;\n\t/**\n\t* Global Loader for the app\n\t*/\n\tclass Loader extends Config\n\t{\n\n\t...
php
chosen
[ { "from": "human", "value": "Add fake iterator for size.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Mimic\\Test\\Fake;\n\nuse Iterator;\n\nclass Size implements Iterator {\n\tpublic $at = 0;\n\n\tpublic $limit = 0;\n\n\tpublic function __construct($limit) {\n\t\t$this->limit = $limit;\n...
php
chosen
[ { "from": "human", "value": "Add migration for coupon fix" }, { "from": "gpt", "value": "<?php\n\nnamespace Sylius\\Migrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generated Migration: Please modify to your needs!\n */\nclass...
php
chosen