conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add tr_TR, thanks to katpatuka"
},
{
"from": "gpt",
"value": "<?php\n// +-----------------------------------------------------------------------+\r\n// | Piwigo - a PHP based photo gallery |\r\n// +----------------------------------... | php | chosen |
[
{
"from": "human",
"value": "Add migration for servers table.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Support\\Facades\\Schema;\nuse App\\Realms\\Server;\n\nclass CreateServersTable ... | php | chosen |
[
{
"from": "human",
"value": "Add tests for the TagVerify guard.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * TagVerifyTest\n *\n * @package Google\\Site_Kit\\Tests\\Core\\Tags\\Guards\n * @copyright 2020 Google LLC\n * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.... | php | chosen |
[
{
"from": "human",
"value": "Add example for export to image\n"
},
{
"from": "gpt",
"value": "<?php\ninclude \"../vendor/autoload.php\";\n\n$html = file_get_contents('report1.html');\n\n$header = '<div style=\"text-align: center;font-size: 20px; border-bottom: 1px #eeeeee solid; padding: 1px; \"... | php | chosen |
[
{
"from": "human",
"value": "Add functional tests for `Api::suspend()`.\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare (strict_types = 1); // @codeCoverageIgnore\n\nnamespace Recoil;\n\nrit('does not resume automatically', function () {\n yield Recoil::suspend();\n assert(false, 'strand... | php | chosen |
[
{
"from": "human",
"value": "Add PHPUnit test for Stripe_Util\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass Stripe_UtilTest extends Stripe_TestCase\n{\n public function testIsList()\n {\n $list = array(5, 'nstaoush', array());\n $this->assertTrue(Stripe_Util::isList($list));\n\n $no... | php | chosen |
[
{
"from": "human",
"value": "Add a sample application for the site verification api.\n\n"
},
{
"from": "gpt",
"value": "<?php\nrequire_once '../../src/apiClient.php';\nrequire_once '../../src/contrib/apiSiteVerificationService.php';\nsession_start();\n\n$client = new apiClient();\n$client->setAp... | php | chosen |
[
{
"from": "human",
"value": "Move geocoding of cities into a job\n"
},
{
"from": "gpt",
"value": "<?php \n/**\n*\n* Responsible for geocoding the cities to lookup their lat/lng\n*/\n\ndefined('C5_EXECUTE') or die(\"Access Denied.\");\nclass GeocodeCities extends Job {\n public $jNotUninstallabl... | php | chosen |
[
{
"from": "human",
"value": "Convert a PDF document to a JPEG/PNG image"
},
{
"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.p... | php | chosen |
[
{
"from": "human",
"value": "Add fiscal year to artworks\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddFiscalYear extends Migration\n{\n /**\n ... | php | chosen |
[
{
"from": "human",
"value": "Test helper factory creates correct object\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass Meanbee_Core_Test_Helper_data extends EcomDev_PHPUnit_Test_Case {\n /** @var Meanbee_Core_Helper_Data */\n protected $_helper;\n\n public function setUp() {\n $... | php | chosen |
[
{
"from": "human",
"value": "Add migration for config table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Migration\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\n/**\n * Creates the runtime config database schema\n *... | php | chosen |
[
{
"from": "human",
"value": "Fix: Use non-nullable TINYINT for boolean fields\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nfinal class UseNonNullableBoolean extends AbstractMigration\n{\n public function change()\n {\n $tableName = 'users';\n... | php | chosen |
[
{
"from": "human",
"value": "Add index on API key and Token keys.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddKeyAndTokenIndexes extends Migration\n{\n /**\n * Run the migrations.\n *\n * @return void\n */\n public ... | php | chosen |
[
{
"from": "human",
"value": "Test page added to make sure PHPStorm is set up\n"
},
{
"from": "gpt",
"value": "<!Doctype html>\n<html>\n\t<head></head>\n\t\t<title>Humble Beginnings</title>\n\t</head>\n\t<body>\n\t\t<p>I completed the prework</p>\n\t</body>\n</html>"
}
] | php | chosen |
[
{
"from": "human",
"value": "Add a monolog processor that pipes $_SERVER info into the 'extra' array\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Concrete\\Core\\Logging\\Processor;\n\n/**\n * A processor for packing $_SERVER info into the extra log info\n */\nclass ServerInfoProcessor\n{... | php | chosen |
[
{
"from": "human",
"value": "[feature/AddTest] Add test on the autoload manipulator\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Unit\\lib\\Manipulator;\n\nuse Chris\\Composer\\AutoregisterClassmapPlugin\\Manipulator\\AutoloadManipulator;\n\nclass AutoloadManipulatorTest extends \\PHPUnit... | php | chosen |
[
{
"from": "human",
"value": "Add translation for Portugese (Brazil)\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Portuguese (Brazil) translation strings for time, for example: /twitch/followage & /twitch/uptime\n *\n * Thanks to: AlmeckySan#3786 (Discord)\n */\nreturn [\n 'year' => ':value... | php | chosen |
[
{
"from": "human",
"value": "Add enum for the installer step\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace ForkCMS\\Core\\Installer\\Domain\\Installer;\n\nuse Closure;\nuse InvalidArgumentException;\nuse Spatie\\Enum\\Enum;\n\n/**\n * @method static self requirements()\n * @method static s... | php | chosen |
[
{
"from": "human",
"value": "Add basic test for `page_script`/`page_text`/`page_line` methods\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Dompdf\\Tests\\Canvas;\n\nuse Dompdf\\Adapter\\CPDF;\nuse Dompdf\\Canvas;\nuse Dompdf\\Dompdf;\nuse Dompdf\\FontMetrics;\nuse Dompdf\\Options;\nuse Domp... | php | chosen |
[
{
"from": "human",
"value": "Add basic Peer factory tests\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace BitWasp\\Bitcoin\\Tests\\Networking\\P2P;\n\n\nuse BitWasp\\Bitcoin\\Bitcoin;\nuse BitWasp\\Bitcoin\\Crypto\\Random\\Random;\nuse BitWasp\\Bitcoin\\Networking\\Peer\\Factory;\nuse BitWas... | php | chosen |
[
{
"from": "human",
"value": "Implement test class for APC storage.\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Gamegos\\NoSql\\Tests\\Storage;\n\n/* Import from gamegos/nosql */\nuse Gamegos\\NoSql\\Storage\\Apc;\nuse Gamegos\\NoSql\\Storage\\Exception\\ApcExtensionException;\n\n/**\n * Te... | php | chosen |
[
{
"from": "human",
"value": "Add Test case for AlarmTriggerInfo.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Zimbra\\Mail\\Tests\\Struct;\n\nuse Zimbra\\Mail\\Tests\\ZimbraMailTestCase;\nuse Zimbra\\Mail\\Struct\\AlarmTriggerInfo;\nuse Zimbra\\Mail\\Struct\\DateAttr;\nuse Zimbra\\Mail\\S... | php | chosen |
[
{
"from": "human",
"value": "Add example of connecting to a peer and requesting tx relay.\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire \"../vendor/autoload.php\";\n\nuse BitWasp\\Bitcoin\\Networking\\P2P\\PeerLocator;\nuse BitWasp\\Bitcoin\\Networking\\MessageFactory;\nuse BitWasp\\Bitcoin\... | php | chosen |
[
{
"from": "human",
"value": "Add test for filter config\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace kosssi\\MyAlbumsBundle\\Tests\\LiipImagine;\n\n/**\n * Class FilterConfigTest\n *\n * @author Simon Constans <kosssi@gmail.com>\n */\nclass FilterConfigTest extends \\PHPUnit_Framework_Tes... | php | chosen |
[
{
"from": "system",
"value": "Add database notification relation readNotifications()\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Illuminate\\Notifications;\n\ntrait HasDatabaseNotifications\n{\n /**\n * Get the entity's notifications.\n */\n public function notifications(... | php | chosen |
[
{
"from": "human",
"value": "Add empty testcase for later .. would work if we could mock applications\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @copyright Copyright (C) 2010-2022, the Friendica project\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free so... | php | chosen |
[
{
"from": "human",
"value": "Add migrate table role user\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass CreateRoleUserTable extends AbstractMigration\n{\n /**\n * Change Method.\n *\n * Write your reversible migrations using this method... | php | chosen |
[
{
"from": "human",
"value": "Add tests for the DuplicationGuard reporter\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tests\\Regis\\Application\\Reporter;\n\nuse Regis\\Application\\Inspection\\ViolationsCache;\nuse Regis\\Application\\Model\\Github\\PullRequest;\nuse Regis\\Application\\... | php | chosen |
[
{
"from": "human",
"value": "Add address resource to the php binding.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Ubivar;\n\nclass Address extends ApiResource\n{\n /**\n * @param string $id The ID of the item to retrieve.\n * @param array|string|null $opts\n *\n * @ret... | php | chosen |
[
{
"from": "human",
"value": "Add optimized uuid class in valueobject style. In this way it can be compared to other object of the same class\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * This file is part of the MysqlOptimizedUuid package.\n *\n * (c) Lorenzo Marzullo <marzullo.lorenzo@gmail... | php | chosen |
[
{
"from": "human",
"value": "Add test for the response destination match validator\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass SAML2_Response_Validation_ConstraintValidator_DestinationMatchesTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @var \\Mockery\\MockInterface\n */\... | php | chosen |
[
{
"from": "human",
"value": "Add test for the exponential backoff retry strategy.\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Keystone\\Queue\\Retry;\n\nuse PHPUnit\\Framework\\TestCase;\n\nclass ExponentialBackoffRetryStrategyTest extends TestCase\n{\n pub... | php | chosen |
[
{
"from": "human",
"value": "Remove duplicate entities, add uniqueness constraint\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Support\\Facades\\DB;\nuse App\\Chart;\n\nclass EntityUnique... | php | chosen |
[
{
"from": "human",
"value": "Create failing test for DDC-2645.\n\nMerge not dealing correctly with composite primary keys.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Doctrine\\Tests\\ORM\\Functional\\Ticket;\n\nrequire_once __DIR__ . '/../../../TestInit.php';\n\n/**\n * @group DDC-2645\... | php | chosen |
[
{
"from": "human",
"value": "Add class to keep track of composer requirements and dev requirements\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Construct;\n\nclass Composer\n{\n /**\n * The Composer requirements/packages.\n *\n * @var array\n */\n private $requiremen... | php | chosen |
[
{
"from": "human",
"value": "Add DynamoDB ZF2 session save handler\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\").\n * You may not use this file excep... | php | chosen |
[
{
"from": "human",
"value": "Add tests for the content extentions module detail page\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Tests\\Action;\n\nuse Common\\WebTestCase;\n\nclass DetailModuleTest extends WebTestCase\n{\n public function testAuthentic... | php | chosen |
[
{
"from": "human",
"value": "Add skeleton for BFS unit test"
},
{
"from": "gpt",
"value": "<?php\n\nuse Fhaculty\\Graph\\Vertex;\n\nuse Fhaculty\\Graph\\GraphViz;\nuse Fhaculty\\Graph\\Edge\\Base as Edge;\nuse Fhaculty\\Graph\\Algorithm\\ShortestPath\\BreadthFirst;\nuse Fhaculty\\Graph\\Loader\\... | php | chosen |
[
{
"from": "human",
"value": "Put asset test class on the right directory\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTI... | php | chosen |
[
{
"from": "human",
"value": "Add dominion networth calculator test\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace OpenDominion\\Tests\\Unit\\Calculators\\Networth;\n\nuse Mockery as m;\nuse OpenDominion\\Calculators\\Networth\\DominionNetworthCalculator;\nuse OpenDominion\\Calculators\\Netw... | php | chosen |
[
{
"from": "human",
"value": "Add test for list-traitformat command\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tests\\AppBundle\\Command;\n\n\nuse AppBundle\\Command\\ListTraitFormatCommand;\nuse Symfony\\Bundle\\FrameworkBundle\\Console\\Application;\nuse Symfony\\Bundle\\FrameworkBundl... | php | chosen |
[
{
"from": "human",
"value": "Add test for public value of Depository\\PermissionSet->selectOneById\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Friendica\\Test\\src\\Security\\PermissionSet\\Depository;\n\nuse Dice\\Dice;\nuse Friendica\\Database\\Database;\nuse Friendica\\DI;\nuse Friend... | php | chosen |
[
{
"from": "human",
"value": "Add User support and login feature\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Digicol\\SchemaOrg\\Dcx;\n\n\nuse Symfony\\Component\\Security\\Core\\User\\UserInterface;\n\nclass DcxUser implements UserInterface\n{\n protected $userid;\n protected $pass... | php | chosen |
[
{
"from": "human",
"value": "Create block template to show amount with interest rate\n"
},
{
"from": "gpt",
"value": "<?php\nclass Ebanx_Gateway_Block_Checkout_Cart_Total extends Mage_Core_Block_Template\n{\n protected function _construct()\n {\n parent::_construct();\n $this... | php | chosen |
[
{
"from": "human",
"value": "Add standard message for select return\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Feedme\\FeedmeUserBundle\\Model\\Message;\n\n/**\n * Class Result\n * @package Feedme\\FeedmeUserBundle\\Model\\Message\n */\nclass Result\n{\n /** @var bool */\n privat... | php | chosen |
[
{
"from": "human",
"value": "Add view for alias admin input"
},
{
"from": "gpt",
"value": "<label class=\"col-sm-2 control-label\">{{ $input['label'] }}</label>\n<div class=\"col-sm-10\">\n\t{{ Form::text($name, $value, ['class'=>'form-control', 'placeholder'=>$input['label'].' не указано']) }}\... | php | chosen |
[
{
"from": "human",
"value": "Introduce singleton to store global settings\n\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * @copyright 2017 Vladimir Jimenez\n * @license https://github.com/allejo/stakx/blob/master/LICENSE.md MIT\n */\n\nnamespace allejo\\stakx;\n\nabstract class Service\n{\n... | php | chosen |
[
{
"from": "human",
"value": "Create Column struct to abstract and standardize table creation.\n"
},
{
"from": "gpt",
"value": "<?php\n\n/***\n Struct with a constructor\n Example $column = new SQLayerColumn('k','key','Key','INTEGER PRIMARY KEY',5);\n\n Column names in the sqlite file ar... | php | chosen |
[
{
"from": "human",
"value": "Create Refund Request Test added\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Iyzipay\\Tests\\Request;\n\nuse Iyzipay\\Model\\Locale;\nuse Iyzipay\\Request\\CreateRefundRequest;\nuse Iyzipay\\Tests\\TestCase;\n\nclass CreateRefundRequestTest extends TestCase\n... | php | chosen |
[
{
"from": "human",
"value": "Add a test for the Rabobank converter.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * RabobankDebitCreditTest.php\n * Copyright (c) 2017 thegrumpydictator@gmail.com\n *\n * This file is part of Firefly III.\n *\n * Firefly III is free software: you can redistribute ... | php | chosen |
[
{
"from": "human",
"value": "Add some very basic selector tests\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Dompdf\\Tests\\Css;\n\nuse Dompdf\\Dompdf;\nuse Dompdf\\Tests\\TestCase;\n\nclass SelectorTest extends TestCase\n{\n public function selectorParsedWithoutErrorsProvider(): array\n... | php | chosen |
[
{
"from": "human",
"value": "Add set sub 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\\Applic... | php | chosen |
[
{
"from": "human",
"value": "BAP-16867: Fix failed tests\n- cover compiler pass for testSessionListener by unit test\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Oro\\Bundle\\TestFrameworkBundle\\Test\\DependencyInjection\\Compiler;\n\nuse Oro\\Bundle\\TestFrameworkBundle\\DependencyInjec... | php | chosen |
[
{
"from": "human",
"value": "Add migration to keep the same behvaiour between versions\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace OC\\Migrations;\n\nuse OCP\\Migration\\ISimpleMigration;\nuse OCP\\Migration\\IOutput;\n\n/**\n * Split the shareapi_only_share_with_group_member key to distin... | php | chosen |
[
{
"from": "human",
"value": "Add coverage for reflection language construct parameters."
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of Psy Shell.\n *\n * (c) 2012-2018 Justin Hileman\n *\n * For the full copyright and license information, please view the LICENSE\n * file tha... | php | chosen |
[
{
"from": "human",
"value": "Add static logging class to repo.\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass Logger {\n\n\tconst LOGFILE = 'weather.log';\n\t\n\tpublic static function log($message = '') {\n\t\tdate_default_timezone_set('America/Edmonton');\n\t\t$message = date('D j M Y g:i a')... | php | chosen |
[
{
"from": "human",
"value": "Implement default access token algorithm as an access token generator\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, pl... | php | chosen |
[
{
"from": "human",
"value": "Add middleware tests (project position)\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2016 Bruno P. Kinoshita, Peter Florijn\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this ... | php | chosen |
[
{
"from": "human",
"value": "Add base test class to ease testing\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpSchool\\PhpWorkshopTest;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Symfony\\Component\\Filesystem\\Filesystem;\n\nabstract class BaseTest extends Te... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for WebDriverClickAndHoldAction\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once __DIR__ . '/../../../lib/__init__.php';\n\nclass WebDriverClickAndHoldActionTest extends PHPUnit_Framework_TestCase\n{\n /**\n * @type WebDriverClickAndHoldAct... | php | chosen |
[
{
"from": "human",
"value": "Create migration for inserting African currencies\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass InsertAfricanCurrencies exte... | php | chosen |
[
{
"from": "human",
"value": "Add unit tests for Cauchy distribution.\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Math\\Probability\\Distribution\\Continuous;\n\nclass CauchyTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @dataProvider dataProviderForPDF\n */\n public f... | php | chosen |
[
{
"from": "human",
"value": "Add tests for the FormUtils class\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace LAG\\AdminBundle\\Tests\\Utils;\n\nuse LAG\\AdminBundle\\Tests\\AdminTestBase;\nuse LAG\\AdminBundle\\Utils\\FormUtils;\nuse Symfony\\Bridge\\Doctrine\\Form\\Type\\EntityType;\nuse ... | php | chosen |
[
{
"from": "human",
"value": "Implement session table -> database\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateSessionsTable extends Migration\n{\n /**\n * Run the migrations.\n *... | php | chosen |
[
{
"from": "human",
"value": "Add index for user IP address\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddIndexForUserIp extends Migration\n{\n /**\... | php | chosen |
[
{
"from": "human",
"value": "Add the Google Calendar starter application.\n"
},
{
"from": "gpt",
"value": "<?php\nrequire_once '../../src/apiClient.php';\nrequire_once '../../src/contrib/apiCalendarService.php';\nsession_start();\n\n$client = new apiClient();\n$client->setApplicationName(\"Googl... | php | chosen |
[
{
"from": "human",
"value": "Add techniques for getting PHP class names\n"
},
{
"from": "gpt",
"value": "// These all yield the same result\n$class_name = get_called_class();\n$class_name = static::class;\n$class_name = static();\n\n// Instantiate\n$instance = new get_called_class(); // Error\n$... | php | chosen |
[
{
"from": "human",
"value": "Test `FieldtypeImage` width & height.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace ProcessWire\\GraphQL\\Test\\Field\\Page\\Fieldtype;\n\nuse ProcessWire\\GraphQL\\Utils;\nuse ProcessWire\\GraphQL\\Test\\GraphQLTestCase;\nuse ProcessWire\\GraphQL\\Test\\Field\... | php | chosen |
[
{
"from": "human",
"value": "Add stub for candidate step 3 form type\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component... | php | chosen |
[
{
"from": "human",
"value": "Add an abstract for complete VIN concrete classes to build upon.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * PHP VIN Utility Library\n *\n * LICENSE\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and asso... | php | chosen |
[
{
"from": "human",
"value": "Add tests for sentinel account management\n\nAddition of unit tests for teh account management\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace OpenCFP\\Test\\Unit\\Infrastructure\\Auth;\n\nuse Cartalyst\\Sentinel\\Sentinel;\nuse Mockery;\nuse Mockery\\Adapter\\Ph... | php | chosen |
[
{
"from": "human",
"value": "Add migration user with Sentinel\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass CreateSentinelUser extends AbstractMigration\n{\n /**\n * Change Method.\n *\n * Write your reversible migrations using this me... | php | chosen |
[
{
"from": "human",
"value": "Add basic image styles class.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace AbleCore\\Modules;\n\nclass ImageStyleManager {\n\n\tprivate $generated = array();\n\n\tpublic static function init()\n\t{\n\t\treturn new self();\n\t}\n\n\tpublic function define($name... | php | chosen |
[
{
"from": "human",
"value": "Add X-UA-Compatible tag for IE compatibility\n\nAdd X-UA-Compatible tag for IE compatibility, see\nhttps://www.modern.ie/en-us/performance/how-to-use-x-ua-compatible\nand\nhttp://stackoverflow.com/questions/19784822/does-meta-http-equiv-x-ua-compatible-content-ie-edge-impact-on-... | php | chosen |
[
{
"from": "human",
"value": "UPDATE: Add DataExtension for silverstripe 3\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * Class CacheIncludeSiteTreeExtension\n */\nclass CacheIncludeSiteTreeExtension extends DataExtension\n{\n /**\n * @return array\n */\n public function extraSta... | php | chosen |
[
{
"from": "human",
"value": "Change default discussion comment count\n\nThis allows new public discussions to be immediately visible by users."
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of Flarum.\n *\n * For detailed copyright and license information, please view the\n * L... | php | chosen |
[
{
"from": "human",
"value": "Move default app options into ATP\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace ATP\\Application;\n\nclass Config\n{\n\tpublic static function defaultOptions($appOptions, $env)\n\t{\n\t\treturn array_merge($appOptions, array(\n\t\t\t'module_listener_options' =>... | php | chosen |
[
{
"from": "human",
"value": "Add integration test for thrift client factory\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Elastification\\Client\\Tests\\Fixtures\\Unit\\Transport\\Thrift;\n\nuse Elastification\\Client\\Transport\\Thrift\\ThriftTransportConnectionFactory;\n\nclass ThriftTrans... | php | chosen |
[
{
"from": "human",
"value": "Create tests for SetEntityAttributes helper\n"
},
{
"from": "gpt",
"value": "<?php\r\n\r\nuse \\PHPUnit\\Framework\\TestCase;\r\nuse \\AdobeConnectClient\\Helpers\\SetEntityAttributes;\r\nuse \\AdobeConnectClient\\Entities\\Permission;\r\n\r\nclass SetEntityAttribute... | php | chosen |
[
{
"from": "human",
"value": "Add tests for processor registry\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Becklyn\\AssetsBundle\\tests\\Processor;\n\nuse Becklyn\\AssetsBundle\\Processor\\AssetProcessor;\nuse Becklyn\\AssetsBundle\\Processor\\ProcessorRegistry;\nuse PHPUnit\\Framework\\T... | php | chosen |
[
{
"from": "system",
"value": "Add mobile app menu to Project Lists\n\nSummary: Using Project lists on mobile is missing the query menu, this adds it.\n\nTest Plan: test mobile layout, click menu, see query list\n\nReviewers: btrahan, epriestley\n\nReviewed By: epriestley\n\nSubscribers: Korvin, epriestley\n... | php | chosen |
[
{
"from": "human",
"value": "Create table for failed queue jobs\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateFailedJobsTable extends Migration\n{\n /**\n * Run the migrations.\n ... | php | chosen |
[
{
"from": "human",
"value": "Add migration for Group entity\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m141217_083040_create_group_table extends Migration\n{\n public function up()\n {\n $tableOptions = null;\n if ($this->... | php | chosen |
[
{
"from": "human",
"value": "Implement sms inbound controller as stub\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Sy... | php | chosen |
[
{
"from": "human",
"value": "Add separate test for delegate proxy\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Equip\\Dispatch;\n\nuse Eloquent\\Phony\\Phpunit\\Phony;\nuse Interop\\Http\\Middleware\\DelegateInterface;\nuse Psr\\Http\\Message\\RequestInterface;\n\nclass DelegateProxyTest ... | php | chosen |
[
{
"from": "human",
"value": "Remove external class usage, add 2 types\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @author: Koshkin Alexey <koshkin.alexey@gmail.com>\n */\n\nif (!$model->isNewRecord) {\n\t$form = $this->beginWidget(\n\t\tCActiveForm::class,\n\t\t[\n\t\t\t'method' => 'post',\n... | php | chosen |
[
{
"from": "human",
"value": "Add basic queue runner cli script\n"
},
{
"from": "gpt",
"value": "<?php\n\n\t/**\n\t * queueRunner.php\n\t * Usage:\n\t * > php queueRunner.php -q queueName\n\t */\n\n\t(PHP_SAPI === \"cli\") ?: die(\"Command line usage only\");\n\n\trequire(\"vendor/autoload.php\")... | php | chosen |
[
{
"from": "human",
"value": "Create array containing variables and their values\n"
},
{
"from": "gpt",
"value": "\n<?php\n$city = \"San Francisco\";\n$state = \"CA\";\n$event = \"SIGGRAPH\";\n\n$location_vars = array(\"city\", \"state\");\n\n$result = compact(\"event\", \"nothing_here\", $locat... | php | chosen |
[
{
"from": "human",
"value": "BB-4163: Refactor localized_value expression to data provider\n- updated tests"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Oro\\Bundle\\LocaleBundle\\Tests\\Unit\\Layout;\n\nuse Doctrine\\Common\\Collections\\ArrayCollection;\n\nuse Oro\\Bundle\\LocaleBundle\\E... | php | chosen |
[
{
"from": "human",
"value": "Add HTTP version of API\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once('boston_food_trucks.php');\n\n\nclass Request {\n\tpublic $parameters;\n\t\n\tpublic function parse_parameters () {\n\t\t$parameters = array();\n\t\t\n\t\tif (isset($_SERVER['QUERY_STRING'... | php | chosen |
[
{
"from": "human",
"value": "Add class for encoding SimpleXML elements into Last.fm compatible JSON output\n"
},
{
"from": "gpt",
"value": "<?php\n/* GNU FM -- a free network service for sharing your music listening habits\n\n Copyright (C) 2009 Free Software Foundation, Inc\n\n This program... | php | chosen |
[
{
"from": "human",
"value": "iii-89: Add test for handling of unknown events in DefaultEventEditingService\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @file\n */\n\nnamespace CultuurNet\\UDB3\\Event;\n\n\nuse Broadway\\CommandHandling\\CommandBusInterface;\nuse CultuurNet\\UDB3\\EventNotFoun... | php | chosen |
[
{
"from": "human",
"value": "Add migration to add source_details column\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddSourceDetailsColumnToPosts exten... | php | chosen |
[
{
"from": "human",
"value": "Add test for code generation with regexp string\n\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Zephir.\n *\n * (c) Zephir Team <team@zephir-lang.com>\n *\n * For the full copyright and license information, please view\n * the LICENSE file... | php | chosen |
[
{
"from": "human",
"value": "Add Facebook event to schools table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddFacebookEventIdToSchoolsTable extends Migration\n{\n /**\n * Run the migrat... | php | chosen |
[
{
"from": "human",
"value": "Core: Create entity directory for core Class\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Walrus\\core\\entity;\n\nclass Route\n{\n\n /**\n * URL of this Route\n * @var string\n */\n private $url;\n\n /**\n * Accepted HTTP methods for this... | php | chosen |
[
{
"from": "human",
"value": "Add database migrations for group username styling and badges.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddStylingColumnsToGroupsTable extends Migration\n{\n /... | php | chosen |
[
{
"from": "human",
"value": "Add omikron tests for objects\n"
},
{
"from": "gpt",
"value": "<?php return\n\nwithin('objects',\n describe('method',\n it('calls a method with params on an object', function() {\n $object = new _MethodTestDummy;\n\n return expect(meth... | php | chosen |
[
{
"from": "human",
"value": "Remove invalid (Unknown) files from the file manager\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Concrete\\Core\\Updater\\Migrations\\Migrations;\n\nuse Concrete\\Core\\File\\File;\nuse Concrete\\Core\\Updater\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL... | php | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.