conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add option to get file size\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Intervention\\Image;\n\nclass File\n{\n /**\n * Mime type\n *\n * @var string\n */\n public $mime;\n\n /**\n * Name of directory path\n *\n * @var ... | php | chosen |
[
{
"from": "human",
"value": "Add redirect for old forum topic urls\n"
},
{
"from": "gpt",
"value": "<?php\n\n$url = $_SERVER['REQUEST_URI'];\n$query = parse_url($url, PHP_URL_QUERY);\n$parameters = [];\n\nparse_str($query, $parameters);\n\n// topic parameter is required for\n// redirection\nif(a... | php | chosen |
[
{
"from": "human",
"value": "Update generator for timestamp & date\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass sfAdminTemplateGenerator extends sfDoctrineGenerator\n{\n /**\n * Returns HTML code for a field.\n *\n * @see sfModelGenerator\n * @param sfModelGeneratorConfigurationField... | php | chosen |
[
{
"from": "human",
"value": "Add test for Parser's Functor implementation.\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass ParserFunctorTest extends \\PHPUnit_Framework_TestCase {\n\n public function testMap() {\n $p = Parser::str('aaa')\n ->map(function ($s) { return strtoupper($s); })... | php | chosen |
[
{
"from": "human",
"value": "Add new adapter for Desarrolla2 Cache\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace GraphStory\\Cache;\n\n/**\n * Desarrolla2 Cache Adapter.\n *\n * @link https://github.com/desarrolla2/Cache\n */\nclass Desarrolla2CacheAdapter implements CacheAdapter\n{\n p... | php | chosen |
[
{
"from": "human",
"value": "Add manual update script to use when changing branches\n"
},
{
"from": "gpt",
"value": "<?\nrequire_once dirname(__FILE__) . '/../Kwf/Setup.php';\nKwf_Setup::setUp();\n\n$file = is_file('vkwf_branch') ? 'vkwf_branch' : 'kwf_branch';\nfile_put_contents($file, \"master... | php | chosen |
[
{
"from": "human",
"value": "Add an abstract listener which provides reflection validations\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * This file is part of the KnpDoctrineBehaviors package.\n *\n * (c) KnpLabs <http://knplabs.com/>\n *\n * For the full copyright and license information, p... | php | chosen |
[
{
"from": "human",
"value": "Add boilerplate utils for currying.\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass Curry {\n\n static function curry2(callable $f) {\n return function ($a) use ($f) { \n return function ($b) use ($f, $a) { \n return $f($a, $b); \n }; \n };\n ... | php | chosen |
[
{
"from": "human",
"value": "Add importer for data from old habitat module.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @file import_oldhabitat_basedata.php\n * @author Reto Schneider, 2012, github@reto-schneider.ch\n *\n * Import data from the old habitat module to the new naturvielfalt DB\... | php | chosen |
[
{
"from": "human",
"value": "Tag an image based on detected visual content which mean running a CNN on top of it"
},
{
"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/... | php | chosen |
[
{
"from": "human",
"value": "Add size helper class to the templating\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Ivory\\GoogleMapBundle\\Templating\\Helper;\n\nuse Ivory\\GoogleMapBundle\\Model\\Size;\n\n/**\n * Size helper allows easy rendering\n *\n * @author GeLo <geloen.eric@gmail.co... | php | chosen |
[
{
"from": "human",
"value": "Test the usage of null/box.NULL\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * This file is part of the Tarantool Client package.\n *\n * (c) Eugene Leonovich <gen.work@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * ... | php | chosen |
[
{
"from": "human",
"value": "Test if cookie name is required in browser session adapter\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Active Collab Authentication project.\n *\n * (c) A51 doo <info@activecollab.com>. All rights reserved.\n */\n\nnamespace ActiveCollab... | php | chosen |
[
{
"from": "human",
"value": "Add signed message serializer - parses / serializes SignedMessages\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace BitWasp\\Bitcoin\\Serializer\\MessageSigner;\n\n\nuse BitWasp\\Bitcoin\\MessageSigner\\SignedMessage;\nuse BitWasp\\Bitcoin\\Serializer\\Signature\\... | php | chosen |
[
{
"from": "human",
"value": "Add logout page, configure session\n"
},
{
"from": "gpt",
"value": "book\u0000\u0000\u0000\u0000mark\u0000\u0000\u0000\u00008\u0000\u0000\u00008\u0000\u0000\u0000\u0000\u0003\u0000\u0000\u0000\u0000\u0004\u0010\u0000\u0000\u0000\u0000rs/h\u0002>A\u0000\u0000\u0000\u0... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for WebDriverClickAction\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once __DIR__ . '/../../../lib/__init__.php';\n\nclass WebDriverClickActionTest extends PHPUnit_Framework_TestCase\n{\n /**\n * @type WebDriverButtonReleaseAction\n */\... | php | chosen |
[
{
"from": "human",
"value": "ADD too many request exception\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Fabs\\SteamLibrary\\Exception;\n\n\nclass TooManyRequestException extends SteamLibraryException\n{\n\n public function __construct($url)\n {\n parent::__construct('Too man... | php | chosen |
[
{
"from": "human",
"value": "Add parentRow column normalizer to KwfBundle\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace KwfBundle\\Serializer\\KwfModel\\ColumnNormalizer;\nuse Kwf_Model_Row_Interface;\nuse Symfony\\Component\\Serializer\\SerializerInterface;\nuse Symfony\\Component\\Serializ... | php | chosen |
[
{
"from": "human",
"value": "Add optional base entity class\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Sunlight\\Database\\Doctrine;\n\nuse Doctrine\\ORM\\EntityRepository;\nuse Sunlight\\Database\\Database;\n\n/**\n * Base entity class\n *\n * Implements a basic Active Record pattern u... | php | chosen |
[
{
"from": "human",
"value": "Add check for 5.4 new reserved keywords\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace PhpMigration\\Changes\\v5dot4;\n\n/*\n * @author Yuchen Wang <phobosw@gmail.com>\n *\n * Code is compliant with PSR-1 and PSR-2 standards\n * http://www.php-fig.org/psr/psr-1/\n... | php | chosen |
[
{
"from": "human",
"value": "Add migration to change case of tags\n\nThis migration does not support SQLite as long as this engine does not\nsupport Unicode in LOWER().\n\nThis migration starts by retrieving the list of lowercase tags which\nneed to be migrated. Then it retrieves the list of tags for each t... | php | chosen |
[
{
"from": "human",
"value": "Add something to generate TIFFs from n0r png files\n\n"
},
{
"from": "gpt",
"value": "<?php\n /* This bad boy converts a PNG to a geo-tiff */\n\n$dstr = isset($_GET[\"dstr\"]) ? $_GET[\"dstr\"]: die(\"No dstr set\");\n$year = intval( substr($dstr,0,4));\n$month = int... | php | chosen |
[
{
"from": "human",
"value": "Set config of default format as json\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Part of the Fuel framework.\n *\n * @package Fuel\n * @version 1.7\n * @author Fuel Development Team\n * @license MIT License\n * @copyright 2010 - 2015 Fuel Developmen... | php | chosen |
[
{
"from": "human",
"value": "Add API r2 custom routes feature\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Place for custom routes definitions\n *\n * Available Route Middleware:\n *\n */\n$app->get('/your/route/:name', function($name) use ($app) {\n\n\t// Build your response, best as array f... | php | chosen |
[
{
"from": "human",
"value": "Include Python as example language\n"
},
{
"from": "gpt",
"value": "```python\nimport requests\nimport json\n\nurl = '{{ trim(config('app.docs_url') ?: config('app.url'), '/')}}/{{ ltrim($route['uri'], '/') }}'\n@if(count($route['bodyParameters']))\npayload = {\n\t@f... | php | chosen |
[
{
"from": "human",
"value": "Create base service class for Wizin package\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Base service class for Wizin package\n */\nnamespace Wizin\\Bundle\\BaseBundle\\Service;\n\nuse Symfony\\Component\\DependencyInjection\\ContainerAware;\n\nclass Service exten... | php | chosen |
[
{
"from": "human",
"value": "Add repository interface and fix promotion scenarios\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 LICENSE\n * file that... | php | chosen |
[
{
"from": "human",
"value": "Add the testcase for a returned document with null object fields\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n * This file is part of the ONGR package.\n *\n * (c) NFQ Technologies UAB <info@nfq.com>\n *\n * For the full copyright and license information, please view ... | php | chosen |
[
{
"from": "human",
"value": "Add a CBC access helper"
},
{
"from": "gpt",
"value": "<?php\nnamespace common\\commands;\n\nuse Yii;\n\nclass CostbenefitCalculationAccess\n{\n public function getQueryConditions(){\n $company_id = yii::$app->getUser()->identity->company->id;\n $use... | php | chosen |
[
{
"from": "human",
"value": "Implement export assets version Composer script.\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... | php | chosen |
[
{
"from": "human",
"value": "Add snippet for restricting access to the entire site.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Plugin Name: Restrict Content Pro - Restrict Entire Site\n * Description: Restricts access to the entire site except for designated RCP pages such as registration, ... | php | chosen |
[
{
"from": "human",
"value": "Create migration to make identity.institution non-null.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Surfnet\\StepupMiddleware\\Migrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generated Mig... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for test-case\n\nBasically, if anything is wrong, the test simple will not execute. This\nshould prove that the base test-case works according to intention.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Aedart\\Testing\\TestCases\\Unit\\UnitTestCase;\n\... | php | chosen |
[
{
"from": "human",
"value": "Add legal info for en (UK)\n"
},
{
"from": "gpt",
"value": "<div class=\"panel panel-default\">\n <div class=\"panel-heading\">United Kingdom Computer Misuse Act 1990</div>\n <div class=\"panel-body\">\n <ul>\n <li>unauthorised access to compu... | php | chosen |
[
{
"from": "system",
"value": "Add support for various linux flavors\n\nOn many linux distros, 'open' is an alias to 'openvt' so `homestead edit` will not work correctly. This change adds support for Ubuntu, Arch, and many other linux distributions by returning the xdg-open command rather than the open comma... | php | chosen |
[
{
"from": "human",
"value": "Add tests for receiveJson assertion\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Http\\JsonResponse;\nuse Laravel\\Lumen\\Application;\nuse Laravel\\Lumen\\Http\\Request;\nuse Laravel\\Lumen\\Testing\\Concerns\\MakesHttpRequests;\nuse PHPUnit\\Framework\... | php | chosen |
[
{
"from": "human",
"value": "Write unit tests for Bootstrap class\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Webaholicson\\Minimvc\\Tests\\Core;\n\n/**\n * Test the App class\n * \n * @author <webaholicson@gmail.com>\n */\nclass BootstrapTest extends \\PHPUnit_Framework_TestCase\n{\n /... | php | chosen |
[
{
"from": "system",
"value": "[Mailer] Fix SmtpEnvelope renaming to Envelope\n"
},
{
"from": "human",
"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 LICE... | php | chosen |
[
{
"from": "human",
"value": "Add landing page for kerberos authentication failure\n"
},
{
"from": "gpt",
"value": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <title>Cloud Interface</title>\n <link href=\"/bootstrap/css/bootstrap.min.css\" rel=\"stylesheet\" type=\"text/css\"... | php | chosen |
[
{
"from": "human",
"value": "ADD - Model Admin for AuthNetLog table\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * AuthNetLogModelAdmin class.\n * \n * @extends ModelAdmin\n */\nclass AuthNetLogModelAdmin extends ModelAdmin\n{\n static $managed_models = array(\n 'AuthNetLog'\n );... | php | chosen |
[
{
"from": "human",
"value": "Add missing abstract processor class\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * File AbstractProcessor.php\n *\n * @category\n * @package\n * @author Ivanis Kouamé <ivanis.kouame@smile.fr>\n * @copyright 2015 Smile\n */\n\nnamespace Hipay\\MiraklConnector\\Co... | php | chosen |
[
{
"from": "human",
"value": "Add gutenberg network admin notice\n\n#320\n"
},
{
"from": "gpt",
"value": "<?php # -*- coding: utf-8 -*-\n\nif ( ! is_admin() ) {\n\treturn;\n}\n\nadd_action( 'inpsyde_mlp_loaded', 'mlp_gutenberg_admin_notice' );\n\nfunction mlp_gutenberg_admin_notice() {\n\n\tif ( ... | php | chosen |
[
{
"from": "human",
"value": "Add some sanity checks to core module, whether config is good and php version is fine\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Hook to do sanitycheck\n *\n * @param array &$hookinfo hookinfo\n */\nfunction core_hook_sanitycheck(&$hookinfo) {\n\tassert('is_arr... | php | chosen |
[
{
"from": "human",
"value": "Add functional test for GUID type\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Doctrine\\DBAL\\Tests\\Functional\\Types;\n\nuse Doctrine\\DBAL\\Schema\\Table;\nuse Doctrine\\DBAL\\Tests\\FunctionalTestCase;\n\nclass GuidTest extends... | php | chosen |
[
{
"from": "human",
"value": "Add unit tests for SlackWebhookHandler\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Monolog package.\n *\n * (c) Jordi Boggiano <j.boggiano@seld.be>\n *\n * For the full copyright and license information, please view the LICENSE\n * file ... | php | chosen |
[
{
"from": "human",
"value": "Add Test case for AttachmentsInfo.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Zimbra\\Mail\\Tests\\Struct;\n\nuse Zimbra\\Mail\\Tests\\ZimbraMailTestCase;\nuse Zimbra\\Mail\\Struct\\AttachmentsInfo;\nuse Zimbra\\Mail\\Struct\\ContactAttachSpec;\nuse Zimbra\\... | php | chosen |
[
{
"from": "human",
"value": "Delete Card Request Test added\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Iyzipay\\Tests\\Request;\n\nuse Iyzipay\\Model\\Locale;\nuse Iyzipay\\Request\\DeleteCardRequest;\nuse Iyzipay\\Tests\\TestCase;\n\nclass DeleteCardRequestTest extends TestCase\n{\n ... | php | chosen |
[
{
"from": "human",
"value": "Add a script to convert CommandBook warps to Essentials.\nThis doens't really belong in here, but.. oh well.\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... | php | chosen |
[
{
"from": "human",
"value": "Add admin insert question PHP\n"
},
{
"from": "gpt",
"value": "<?php\n include (\"conectare_db.php\");\n $sql = 'begin :rezultat := admin_pachet.insert_intrebare(:v_domeniu,:v_text,:v_dificultate,:v_tip,:v_r1,:v_r2,:v_r3,:v_rc); END;';\n $stid = oci_parse($... | php | chosen |
[
{
"from": "human",
"value": "Update wine_details view to reflect changes in wine table\n\nSigned-off-by: Christoph Wurst <7abde52c298496fa169fb750f91f213a282142af@winzerhof-wurst.at>\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Suppo... | php | chosen |
[
{
"from": "human",
"value": "Define interface for AccessToken Generators\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * This file is part of the Imbo package\n *\n * (c) Christer Edvartsen <cogo@starzinger.net>\n *\n * For the full copyright and license information, please view the LICENSE file... | php | chosen |
[
{
"from": "human",
"value": "Add a few tests for the Github\\Repository entity\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tests\\Regis\\Application\\Entity\\Github;\n\nuse Regis\\Application\\Entity\\Github\\Repository;\n\nclass RepositoryTest extends \\PHPUnit_Framework_TestCase\n{\n ... | php | chosen |
[
{
"from": "human",
"value": "Add unit tests for \\OC\\Connector\\Sabre\\DummyGetResponsePlugin\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @author Lukas Reschke <lukas@owncloud.com>\n *\n * @copyright Copyright (c) 2015, ownCloud, Inc.\n * @license AGPL-3.0\n *\n * This code is free software... | php | chosen |
[
{
"from": "human",
"value": "Implement exception class for Gone Http error\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * Slim Framework (https://slimframework.com)\n *\n * @license https://github.com/slimphp/Slim/blob/4.x/LICENSE.md (MIT License)\n */\n\ndeclare(strict_types=1);\n\nnamespace... | php | chosen |
[
{
"from": "human",
"value": "Create a factory for exceptions\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace PragmaRX\\Tracker\\Support\\Exceptions;\n\nclass ExceptionFactory {\n\n\tpublic static function make($errorCode, $errorMessage)\n\t{\n\t\tswitch($errorCode)\n\t\t{\n\t\t\tcase E_ERROR... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for WebDriverContextClickAction\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass WebDriverContextClickActionTest extends PHPUnit_Framework_TestCase\n{\n /**\n * @type WebDriverContextClickAction\n */\n private $webDriverContextClickAction;\... | php | chosen |
[
{
"from": "human",
"value": "Create Cancel Request Test added\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Iyzipay\\Tests\\Request;\n\nuse Iyzipay\\Model\\Locale;\nuse Iyzipay\\Request\\CreateCancelRequest;\nuse Iyzipay\\Tests\\TestCase;\n\nclass CreateCancelRequestTest extends TestCase\n... | php | chosen |
[
{
"from": "system",
"value": "[Cache] Fix wrong classname in deprecation message\n"
},
{
"from": "human",
"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 ... | php | chosen |
[
{
"from": "human",
"value": "Add db index for user->unified_index_with_byobu\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of fof/byobu.\n *\n * Copyright (c) 2019 FriendsOfFlarum.\n *\n * For the full copyright and license information, please view the LICENSE\n * file that ... | php | chosen |
[
{
"from": "human",
"value": "Test assets for a parameter interface jailer specification\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace StrictPhpTestAsset;\n\nclass ClassWithVariadicInterfaceParameters\n{\n /**\n * @return void\n */\n public function methodWithNoParameters()\n ... | php | chosen |
[
{
"from": "human",
"value": "t274: Add config generation script to CM scripts\n"
},
{
"from": "gpt",
"value": "<?php\n\ndefine(\"IS_CRON\", true);\ndefine('DIR_ROOT', dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR);\nrequire_once DIR_ROOT . 'library/CM/Bootloader.php';\nCM_Bootloader::load(arra... | php | chosen |
[
{
"from": "human",
"value": "Add new model for search options\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace SearchApi\\Models;\n\n/**\n * Class SearchOptions - Contains search options available to user.\n * TODO: Sorting and filtering options.\n *\n * @var $resultsPerPage int|null Number... | php | chosen |
[
{
"from": "human",
"value": "Create own PSR-4 class loader\n"
},
{
"from": "gpt",
"value": "<?php\n\nspl_autoload_register( function ( $class ) {\n\n $prefix = 'TinyApp\\\\';\n $base_dir = __DIR__.'/src/';\n\n $len = strlen( $prefix );\n if( strncmp( $prefix, $class, $len ) !== 0 ) {... | php | chosen |
[
{
"from": "human",
"value": "Convert text columns to mediumtext so we are very unlikely to reach any limits.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclas... | php | chosen |
[
{
"from": "human",
"value": "Add Content Stream Allowed Enum\n\nSummary: Add an Enumeration for \"Content Stream Allowed\" values.\n\nReviewers: claus.due, #forgetit-dev\n\nReviewed By: claus.due, #forgetit-dev\n\nDifferential Revision: https://phabricator.dkd.de/D470\n"
},
{
"from": "gpt",
"val... | php | chosen |
[
{
"from": "system",
"value": "Use PhutilProxyException to disambiguate work queue failures\n\nSummary: Fixes T2569. This is the other common exception source which is ambiguous. List the task ID explicitly to make debugging easier.\n\nTest Plan: {F51268}\n\nReviewers: btrahan\n\nReviewed By: btrahan\n\nCC: ... | php | chosen |
[
{
"from": "human",
"value": "Add test to check if parentAssociation is available in postLoad\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Doctrine\\ODM\\MongoDB\\Tests\\Functional\\Ticket;\n\nuse Doctrine\\ODM\\MongoDB\\Event\\LifecycleEventArgs;\nuse Doctrine\\ODM\\MongoDB\\Events;\nuse ... | php | chosen |
[
{
"from": "system",
"value": "Allow *.sspak extension in SS Filesystem\n"
},
{
"from": "human",
"value": "<?php\n"
},
{
"from": "gpt",
"value": "<?php\n// *.sspak is required for data archives\n$exts = Config::inst()->get('File', 'allowed_extensions');\n$exts[] = 'sspak';\nConfig::in... | php | chosen |
[
{
"from": "human",
"value": "Test the team creation handler\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tests\\Regis\\Application\\CommandHandler\\Team;\n\nuse Symfony\\Component\\Security\\Core\\Encoder\\UserPasswordEncoderInterface;\n\nuse Regis\\Application\\Command;\nuse Regis\\Appli... | php | chosen |
[
{
"from": "human",
"value": "Add console command `schema:export` to process the schema and export the database sql dump file\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * This file is part of the PHPLucidFrame library.\n * The script executes the command `php lucidframe schema:export [options]... | php | chosen |
[
{
"from": "human",
"value": "Add start/end datetime 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, ple... | php | chosen |
[
{
"from": "system",
"value": "Use passed $app instance in Closure instead\n"
},
{
"from": "human",
"value": "<?php namespace Illuminate\\Foundation\\Bootstrap;\n\nuse Illuminate\\Log\\Writer;\nuse Monolog\\Logger as Monolog;\nuse Illuminate\\Contracts\\Foundation\\Application;\n\nclass Configure... | php | chosen |
[
{
"from": "human",
"value": "Implement town step 7 for voters\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\\Optio... | php | chosen |
[
{
"from": "human",
"value": "Test added to download vcard\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * VCard generator test - can save to file or output as a download\n *\n * @author Jeroen Desloovere <jeroen@siesqo.be>\n */\t\n\n// require\nrequire_once '../vcard.php';\n\n// define vcard\n... | php | chosen |
[
{
"from": "human",
"value": "Create Unit Test for TagValidator with Update context\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace RCatlin\\Blog\\Tests\\Validator\\Entity;\n\nuse RCatlin\\Blog\\Tests\\HasFaker;\nuse RCatlin\\Blog\\Validator\\Context;\nuse RCatlin\\Blog\\Validator\\Entity\\Ta... | php | chosen |
[
{
"from": "human",
"value": "Add functional test for the reset action of the analytics module\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Backend\\Modules\\Analytics\\Tests\\Action;\n\nuse Common\\WebTestCase;\n\nclass ResetTest extends WebTestCase\n{\n /**\n * @runInSeparateProce... | php | chosen |
[
{
"from": "human",
"value": "Add runnable interface to enable creating runnables.\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * This file is part of the Stippers project (available here: https://github.com/Stannieman/stippers/).\n * The license and all terms en conditions that apply to Stipp... | php | chosen |
[
{
"from": "human",
"value": "Add bootstrap class php compressor\n"
},
{
"from": "gpt",
"value": "<?php\n\nfunction __autoload($classname) {\n $filename = \"lib/\". $classname .\".php\";\n include_once($filename);\n}\n\nclass PhpCompressor {\n\n private static $compressor = false;\n\n ... | php | chosen |
[
{
"from": "human",
"value": "Add migration for mail template\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace AppBundle\\Migration;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generated Migration: Please modify to your needs!\n */... | php | chosen |
[
{
"from": "human",
"value": "Add initial code for cURL request method\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace ReCaptcha\\RequestMethod;\n\nuse ReCaptcha\\RequestMethod;\nuse ReCaptcha\\RequestParameters;\n\n/**\n * Sends cURL request to the reCAPTCHA service.\n */\nclass Curl impleme... | php | chosen |
[
{
"from": "human",
"value": "Add middleware for handling authentication api key\n"
},
{
"from": "gpt",
"value": "<?php \n/**\n * This class is a part of middleware reSlim project for authentication registered api key\n * @author M ABD AZIZ ALFIAN <github.com/aalfiann>\n *\n * Don't remove this c... | php | chosen |
[
{
"from": "system",
"value": "Synchronize configuration class with upstream\n"
},
{
"from": "human",
"value": "<?php\n\n/*\n * This file is part of the Sonata project.\n *\n * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>\n *\n * For the full copyright and license information, please view... | php | chosen |
[
{
"from": "human",
"value": "Fix contacts approximate birthday dates\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse App\\Contact;\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass FixContactsTable ex... | php | chosen |
[
{
"from": "human",
"value": "Create stub for loading extension specific implementations\n"
},
{
"from": "gpt",
"value": "<?php\n\nif (extension_loaded('poly1305')) {\n class Poly1305 {\n function authenticate($key, $message)\n {\n return poly1305_authenticate($key, $m... | php | chosen |
[
{
"from": "human",
"value": "Update Chinese support level, MACHINE -> ALMOST\n\nThank you Goshin. #743 and #747\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * @copyright Copyright (C) 2015-2020 AIZAWA Hina\n * @license https://github.com/fetus-hina/stat.ink/blob/master/LICENSE MIT\n * @author... | php | chosen |
[
{
"from": "human",
"value": "Complete compare helper function unit tests.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for true Mimic library function.\n *\n * @since 0.1.0\n *\n * @todo Need to use QuickTest library.\n */\nclass CompareFuncTest exte... | php | chosen |
[
{
"from": "human",
"value": "Create a simple translations exporter to csv\n"
},
{
"from": "gpt",
"value": "<?php namespace Modules\\Translation\\Exporters;\n\nuse Maatwebsite\\Excel\\Classes\\LaravelExcelWorksheet;\nuse Maatwebsite\\Excel\\Excel;\nuse Maatwebsite\\Excel\\Writers\\LaravelExcelWri... | php | chosen |
[
{
"from": "human",
"value": "Add the basic search controller to perform search on topics.\n"
},
{
"from": "gpt",
"value": "<?php namespace App\\Http\\Controllers;\n\nuse App\\Http\\Requests;\nuse App\\Http\\Controllers\\Controller;\n\nuse Illuminate\\Http\\Request;\n\nclass SearchController exte... | php | chosen |
[
{
"from": "human",
"value": "Add fixed and tested twitter implementation of SocialFollowers\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * SocialFollowers implementing class for Twitter\n */\nclass TwitterFollowers implements SocialFollowers\n{\n\tprivate $data = null;\n\tprivate $url = \"\";... | php | chosen |
[
{
"from": "human",
"value": "Create command to check for expired donator perks\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace App\\Console\\Commands;\n\nuse App\\Entities\\Donations\\Models\\DonationPerk;\nuse App\\Entities\\Groups\\Models\\Group;\nuse App\\Http\\Actions\\SyncUserToDiscourse;... | php | chosen |
[
{
"from": "human",
"value": "Add the status 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 view... | php | chosen |
[
{
"from": "human",
"value": "Add a webform for printing given template when match given statuses.\n\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire(\"dbconnect.php\");\n\n# Get fields from GET/POST.\n$fields = Array();\nforeach ($_GET as $k => $v) {\n $fields[$k] = $v;\n}\nforeach ($_POST a... | php | chosen |
[
{
"from": "human",
"value": "Add index to posts 'created_at' and 'deleted_at' columns.\nThis significantly speeds up the ORDER BY query being made\nin the PostsController (especially if using cursor pagination).\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\... | php | chosen |
[
{
"from": "system",
"value": "Fix getting registrations error if no project id"
},
{
"from": "human",
"value": "<?php\nnamespace MapasCulturais\\Repositories;\nuse MapasCulturais\\Traits;\n\nclass Registration extends \\MapasCulturais\\Repository{\n /**\n *\n * @param \\MapasCulturais... | php | chosen |
[
{
"from": "human",
"value": "Create migration that deletes budgets whose tags don't exist anymore\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse App\\Models\\Budget;\nuse App\\Models\\Tag;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illumin... | php | chosen |
[
{
"from": "human",
"value": "Add foreign_key to tag_changes table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AddForeignKeyToTagChangesTable extends AbstractMigration {\n public function up() {\n $this->query('ALTER TABLE tag_changes ALTER COLU... | php | chosen |
[
{
"from": "human",
"value": "Create the actual CompilerAwarePass that will set the container.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace My\\TestBundle\\DependencyInjection\\Compiler;\n\nuse Symfony\\Component\\DependencyInjection\\Reference;\nuse Symfony\\Component\\DependencyInjection... | php | chosen |
[
{
"from": "human",
"value": "Add new password reset script. This is ongoing\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once 'email-confirmation/send.php';\n\n/**\n* PasswordReset is used to reset the users password in the database.\n*\n* @package Note Keeper\n* @author Luke Cahill\n* @... | php | chosen |
[
{
"from": "human",
"value": "Introduce an overview of system status\n"
},
{
"from": "gpt",
"value": "<?php\n\n\tView::composer('index', function($view) {\n\t\t$date = date('Y-m-d');\n\t\t$incident = Incident::whereRaw('DATE(created_at) = \"' . $date . '\"')\n\t\t\t\t\t\t->groupBy('status')\n\t\t... | php | chosen |
[
{
"from": "human",
"value": "Add PHPUnit test for Stripe_Invoice\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass Stripe_InvoiceTest extends Stripe_TestCase\n{\n public function testUpcoming()\n {\n self::authorizeFromEnv();\n $customer = self::createTestCustomer();\n\n Stripe_InvoiceI... | php | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.