conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "unittests: Use laserpointer to play with nyancat to reduce sleep\n" }, { "from": "human", "value": "<?php\n\n//namespace Mockery\\Adapter\\Phpunit;\nnamespace Wecamp\\FlyingLiqourice;\n\nclass NyanListener implements \\PHPUnit_Framework_TestListener\n{\n\n public...
php
chosen
[ { "from": "system", "value": "Add validation rules to the internetbanking command response validator.\n" }, { "from": "human", "value": "<?php\nnamespace Omise\\Payment\\Gateway\\Validator\\Offsite;\n\nuse Magento\\Payment\\Gateway\\Command\\CommandException;\nuse Magento\\Payment\\Gateway\\Vali...
php
chosen
[ { "from": "system", "value": "Create sqlite database if use select that.\n\nIf a user decides to utilize sqlite, let's go ahead and make the database for them." }, { "from": "human", "value": "<?php\r\n\r\nnamespace RachidLaasri\\LaravelInstaller\\Helpers;\r\n\r\nuse Exception;\r\nuse Illuminate...
php
chosen
[ { "from": "system", "value": "Add route for ACL Editor\n\nThis is needed to access the ACL editor added in sonata-project/SonataAdminBundle#1475" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sonata package.\n *\n * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>\...
php
chosen
[ { "from": "system", "value": "Use ZS9 library in default settings\n" }, { "from": "human", "value": "<?php\r\n\r\n// default settings\r\n\r\ndefine('XMLSERVICELIB', 'ZENDSVR6'); //library with IBM XMLTOOLKIT objects\r\ndefine('DFTLIB', 'QGPL'); //library for creation of temporary ...
php
chosen
[ { "from": "system", "value": "Use $_REQUEST instead of $_POST in exception notification emails.\n" }, { "from": "human", "value": "<?php\r\n\r\n\tclass ErrorHandler\r\n\t{\r\n\t\tstatic public function install()\r\n\t\t{\r\n\t\t\tset_error_handler(\"ErrorHandler::handle\");\r\n\t\t}\r\n\t\t\r\n\...
php
chosen
[ { "from": "system", "value": "Add salt method to salt input parameter" }, { "from": "human", "value": "<?php\n\nnamespace JWX\\JWT\\Parameter;\n\n\n/**\n * PBES2 Salt Input parameter\n *\n * @link https://tools.ietf.org/html/rfc7518#section-4.8.1.1\n */\nclass PBES2SaltInputParameter extends Reg...
php
chosen
[ { "from": "system", "value": "Revert the duplication of the reference in resources table\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateTableResources extends Migration\n{\n /**\n * ...
php
chosen
[ { "from": "system", "value": "Remove not needed stuff from the PHPUnit boostrap file\n" }, { "from": "human", "value": "<?php\n/*\n * This file bootstraps the test environment.\n */\nnamespace Doctrine\\Tests;\n\nerror_reporting(E_ALL | E_STRICT);\n\nif (file_exists(__DIR__ . '/../../../vendor/a...
php
chosen
[ { "from": "system", "value": "Update template code for admin email, use hardcoded values for template.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Handler\\Email;\n\nclass SendAdminNotificationEmailHandler extends AbstractEmailHandler\n{\n protected function configureMessage(\\...
php
chosen
[ { "from": "system", "value": "Check for Laravel 4 before calling $this->package()\n" }, { "from": "human", "value": "<?php namespace Manavo\\BootstrapForms;\n\nuse Illuminate\\Html\\HtmlServiceProvider as IlluminateHtmlServiceProvider;\n\nclass BootstrapFormsServiceProvider extends IlluminateHtm...
php
chosen
[ { "from": "system", "value": "Update user provider to expect model.\n" }, { "from": "human", "value": "<?php\n\nnamespace Aurora\\Auth;\n\nuse GuzzleHttp\\Exception\\ClientException;\nuse Illuminate\\Contracts\\Auth\\Authenticatable;\nuse Illuminate\\Contracts\\Auth\\UserProvider;\nuse Illuminat...
php
chosen
[ { "from": "system", "value": "Extend ResqueBundle BaseJob to get access to container\n" }, { "from": "human", "value": "<?php\n\nnamespace SimplyTestable\\ApiBundle\\Resque\\Job;\n\nuse Resque\\Job\\AbstractInstance as BaseJob;\n\nabstract class AbstractJob extends BaseJob { \n}" }, { ...
php
chosen
[ { "from": "system", "value": "Create configuration in script handler\n" }, { "from": "human", "value": "<?php\n\nnamespace Tooly;\n\nuse Composer\\IO\\IOInterface;\nuse Composer\\Script\\Event;\nuse Tooly\\Factory\\ToolFactory;\nuse Tooly\\Script\\Helper;\nuse Tooly\\Script\\Helper\\Filesystem;\...
php
chosen
[ { "from": "system", "value": "Put dev environments back in debug mode\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\Debug\\Debug;\n\n// If you don't want to setup permissions the proper way, just uncomment the following PHP ...
php
chosen
[ { "from": "system", "value": "Add IP for dev mode" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\Debug\\Debug;\n\n// If you don't want to setup permissions the proper way, just uncomment the following PHP line\n// read http://s...
php
chosen
[ { "from": "system", "value": "Set vars to pass by reference\n" }, { "from": "human", "value": "<?php\n\nabstract class CRM_Securefiles_Backend {\n\n abstract protected function uploadFile($file, $user = null);\n abstract protected function downloadFile($file, $user = null);\n abstract protect...
php
chosen
[ { "from": "system", "value": "Comment out the test entry until this section can be built correctly\n" }, { "from": "human", "value": "<?php include('theme/header.php'); ?>\n\n<?php\n\ninclude('dbconnect.php');\n\n$sql = \"INSERT INTO small_victories (date, latest_amount) VALUES ('2017-01-25', '3...
php
chosen
[ { "from": "system", "value": "Remove navigation entry for shared files\n" }, { "from": "human", "value": "<?php\n\nrequire_once('apps/files_sharing/lib_share.php');\nrequire_once('apps/files_sharing/sharedstorage.php');\n\nOC_Filesystem::registerStorageType(\"shared\", \"OC_Filestorage_Shared\",...
php
chosen
[ { "from": "system", "value": "Send message notifications only to subscribers of region's site\n" }, { "from": "human", "value": "<?php\n\nclass Denkmal_MessagePushNotification_SendJob extends CM_Jobdistribution_Job_Abstract {\n\n protected function _execute(CM_Params $params) {\n /** @...
php
chosen
[ { "from": "system", "value": "Fix imported exception & protect DELETE routes too.\n" }, { "from": "human", "value": "<?php\n\nnamespace Rogue\\Http\\Middleware;\n\nuse Closure;\n\nclass AuthenticateApi\n{\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Re...
php
chosen
[ { "from": "system", "value": "Change link order for consistency\n" }, { "from": "human", "value": "<?php\n/**\n * @file\n * Template for the subscribed message.\n */\n?>\n\n<div class=\"message\"><?php print $message; ?></div>\n<div class=\"update-link\"><?php print $update_link; ?></div>\n<div ...
php
chosen
[ { "from": "system", "value": "Adjust the error message styling\n" }, { "from": "human", "value": "<?php require_once 'config.php';\n\nif ($env == 'production') {\n error_reporting(E_ERROR | E_PARSE);\n}\n\nfunction print_files($url, $dir)\n{\n $hide = \".\";\n\n $myDirectory = opendir($dir);\...
php
chosen
[ { "from": "system", "value": "Set the relations of attention.\n" }, { "from": "human", "value": "<?php namespace App;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Attention extends Model {\n\n\t//\n\n}\n" }, { "from": "gpt", "value": "<?php namespace App;\n\nuse Illuminate\...
php
chosen
[ { "from": "system", "value": "Create and register new autoloader\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\Debug\\Debug;\n\nif (!file_exists(dirname(__DIR__) . \"/vendor/autoload.php\")) {\n die(\n 'Set up the project dependencies using the following commands:' . PH...
php
chosen
[ { "from": "system", "value": "Fix to actually get status from request\n" }, { "from": "human", "value": "<?php defined('SYSPATH') or die('No direct script access.');\n\nclass Kohana_Error_Exception {\n\t\n\tpublic static function handler(Exception $e)\n\t{\n\t\tif (Kohana::$environment === Kohan...
php
chosen
[ { "from": "system", "value": "Remove the array HTML escaping\n\nEscaping must be performed on the rendered string. It does not make sense\nto escape each array value separately.\n" }, { "from": "human", "value": "<?php\n\nfunction html_escape_value($data)\n{\n if (!is_array($data)) {\n ...
php
chosen
[ { "from": "system", "value": "Document what structure the trusted facets list is based on\n" }, { "from": "human", "value": "<?php\n\n/**\n * Copyright 2015 SURFnet bv\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance wit...
php
chosen
[ { "from": "system", "value": "Change HTML lang attrib with i18n\n" }, { "from": "human", "value": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <title><?php isset($title) ? $this->titl...
php
chosen
[ { "from": "system", "value": "Fix bug option, reader and writer parameters was not being apply if value is set.\n" }, { "from": "human", "value": "<?php\nnamespace Tpg\\ExtjsBundle\\Annotation;\n\nuse Doctrine\\ORM\\Mapping\\Annotation;\n\n/**\n * @Annotation\n * @Target(\"CLASS\")\n */\nfinal c...
php
chosen
[ { "from": "system", "value": "Break loop when ProviderCompilerPass is found" }, { "from": "human", "value": "<?php\n\nnamespace Scheb\\TwoFactorBundle\\Tests;\n\nuse Scheb\\TwoFactorBundle\\DependencyInjection\\Compiler\\ProviderCompilerPass;\nuse Scheb\\TwoFactorBundle\\SchebTwoFactorBundle;\nu...
php
chosen
[ { "from": "system", "value": "Allow other groups if set in block name\n" }, { "from": "human", "value": "<?php \ndefined('C5_EXECUTE') or die(\"Access Denied.\");\nLoader::model('user_list');\n$av = Loader::helper('concrete/avatar');\n$ul = new UserList();\n$ul->filterByGroup('Staff');\n$ul->sor...
php
chosen
[ { "from": "system", "value": "[TASK] Add missing method to the PairRepository\n" }, { "from": "human", "value": "<?php\nnamespace DreadLabs\\VantomasWebsite\\SecretSanta\\Pair;\n\nuse DreadLabs\\VantomasWebsite\\SecretSanta\\Donee\\DoneeInterface;\nuse DreadLabs\\VantomasWebsite\\SecretSanta\\Do...
php
chosen
[ { "from": "system", "value": "Add comments for the config file\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: Fabian\n * Date: 29.05.17\n * Time: 16:50.\n */\n\nreturn [\n\n 'breadcrumb' => [\n 'root' => 'Files',\n ],\n\n 'routes' => [\n '...
php
chosen
[ { "from": "system", "value": "Fix XSS issue with redirects parameter\n" }, { "from": "human", "value": "<?php\n//this plugin replaces %redirect% dynamic (so viewCache can be enabled)\nclass Kwc_User_Login_Plugin extends Kwf_Component_Plugin_Abstract\n implements Kwf_Component_Plugin_Interface...
php
chosen
[ { "from": "system", "value": "Add methods for 403 and 409 HTTP errors\n" }, { "from": "human", "value": "<?php namespace Neomerx\\JsonApi\\Contracts\\Integration;\n\n/**\n * Copyright 2015 info@neomerx.com (www.neomerx.com)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\")...
php
chosen
[ { "from": "system", "value": "Add return type to annotations for find method\n" }, { "from": "human", "value": "<?php namespace Picqer\\Carriers\\SendCloud\\Query;\n\nuse Picqer\\Carriers\\SendCloud\\Connection;\n\n/**\n * Trait FindOne\n *\n * @method Connection connection()\n *\n * @package Pi...
php
chosen
[ { "from": "system", "value": "Update example client to process new game rules\n" }, { "from": "human", "value": "<?\n $board = json_decode($_POST['board']);\n $done = false;\n foreach($board as $x => $col) {\n foreach($col as $y => $cell) {\n if($cell == 0) {\n ...
php
chosen
[ { "from": "system", "value": "Make sure that we reference the config file using an absolute path... just in case...\n" }, { "from": "human", "value": "<?php\r\n$sConfigFile = 'conf/production/config-itop.php';\r\n$sStartPage = './pages/UI.php';\r\n$sSetupPage = './setup/index.php';\r\n\r\n/**\r\...
php
chosen
[ { "from": "system", "value": "Change config from sample file to actually file.\n" }, { "from": "human", "value": "<?php\n\nrequire_once __DIR__.'/vendor/autoload.php';\nrequire_once __DIR__.'/config_sample.php';\n\nrequire_once __DIR__.'/util/utils-loader.php';\nrequire_once __DIR__.'/models/mod...
php
chosen
[ { "from": "system", "value": "Include variables for all counts.\n" }, { "from": "human", "value": "<html>\n<head>\n<title>Number Counter</title>\n</head>\n<body>\n<h2>Counting to <?php echo \"$numend\".\":\".\"</h2>\".\"<br>\";\n\t\n\t$numstart=0;\n\t$numend=255;\n\t\n\t\t\tfor ($num=$numstart; ...
php
chosen
[ { "from": "system", "value": "Update\nRegister from bind to singleton\n" }, { "from": "human", "value": "<?php\n\nnamespace Edujugon\\GoogleAds\\Providers;\n\nuse Edujugon\\GoogleAds\\Console\\RefreshTokenCommand;\nuse Edujugon\\GoogleAds\\GoogleAds;\nuse Illuminate\\Support\\ServiceProvider;\n\...
php
chosen
[ { "from": "system", "value": "Fix answer count if multiple questionaires\n" }, { "from": "human", "value": "<?\nrequire \"../../../lib.php\";\nrequire_once \"{$root}/lib/Twig/Autoloader.php\";\n\nTwig_Autoloader::register();\n$loader = new Twig_Loader_Filesystem(\"{$root}/admin/tpl/\");\n$twig =...
php
chosen
[ { "from": "system", "value": "Add a missing required param to deployment create\n" }, { "from": "human", "value": "<?php\n\n/**\n * @file\n * Contains \\Eloqua\\Api\\Assets\\Email\\Deployment.\n */\n\nnamespace Eloqua\\Api\\Assets\\Email;\n\nuse Eloqua\\Api\\AbstractApi;\nuse Eloqua\\Api\\Creata...
php
chosen
[ { "from": "system", "value": "Revert \"Use PDO in the local cellid script\"\n" }, { "from": "human", "value": "<?php\n\nrequire_once(\"database.php\");\n\n$db = connect_save();\n\nif ($db === null)\n{\n\techo \"Result:4\";\n\tdie();\n}\n\nif ($_REQUEST[\"myl\"] != \"\") \n{\n $temp = split(\":\...
php
chosen
[ { "from": "system", "value": "Set release version to 0.7.5\n" }, { "from": "human", "value": "<?php\n\nrequire_once __DIR__ . '/Zigra/Core.php';\n/**\n * This class only exists for backwards compatability. All code was moved to\n * Zigra_Core and this class extends Zigra_Core\n *\n * @package Zi...
php
chosen
[ { "from": "system", "value": "Add Amazon Pay payment method\n" }, { "from": "human", "value": "<?php\nnamespace Scat;\n\nclass Payment extends \\Model {\n public static $methods= array(\n 'cash' => \"Cash\",\n 'change' => \"Change\",\n 'credit' => \"Credit Card\",\n 'square' => \"Sq...
php
chosen
[ { "from": "system", "value": "Update version to match new tagged release system.\n" }, { "from": "human", "value": "<?php\n/**\n * App Core Framework Version\n **/\n\nnamespace App;\n\ndefine('APP_CORE_VERSION', '20160922');\ndefine('APP_CORE_RELEASE', 'Alpha');\n\nclass Version\n{\n public s...
php
chosen
[ { "from": "system", "value": "Fix class in button group dropdown\n" }, { "from": "human", "value": "<?php\n// check if groups are not empty\nforeach ($groups as $key => $group) {\n $exists = false;\n foreach ($group as $action => $config) {\n $subaction = is_array($config) ? $action...
php
chosen
[ { "from": "system", "value": "Move OAuth down in admin security settings\n\nFor #16076\n\nSigned-off-by: Roeland Jago Douma <982d370f7dc34a05b4abe8788f899578d515262d@famdouma.nl>\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n/**\n * @copyright Copyright (c) 2017 Lukas Resch...
php
chosen
[ { "from": "system", "value": "Correct path if slug contains \"-\"\n" }, { "from": "human", "value": "<?php\n\nnamespace Caffeinated\\Modules\\Console;\n\nuse Illuminate\\Console\\GeneratorCommand as LaravelGeneratorCommand;\nuse Illuminate\\Support\\Str;\nuse Module;\n\nabstract class GeneratorC...
php
chosen
[ { "from": "system", "value": "Add activity event to user logged in event\n" }, { "from": "human", "value": "<?php\n\nnamespace OpenDominion\\Events;\n\nuse OpenDominion\\Contracts\\Services\\Analytics\\AnalyticsEvent as EventContract;\nuse OpenDominion\\Services\\Analytics\\AnalyticsEvent;\nuse ...
php
chosen
[ { "from": "system", "value": "Fix tests for PHP < 5.5\n" }, { "from": "human", "value": "<?php\n\nnamespace Omnipay\\Swish\\Message;\n\nuse Omnipay\\Common\\Message\\AbstractResponse;\nuse Omnipay\\Common\\Message\\RequestInterface;\n\nclass PurchaseResponse extends AbstractResponse\n{\n prot...
php
chosen
[ { "from": "system", "value": "Compress images at the proxy\n" }, { "from": "human", "value": "<?php\n $strFile = rawurldecode(@$_GET['url']);\n\t$strFile_array = explode('.' , $strFile);\n $strFileExt = end($strFile_array);\n\n if($strFileExt == 'jpg' or $strFileExt == 'jpeg') {\n ...
php
chosen
[ { "from": "system", "value": "Use ->guard() instead of ->driver().\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Auth;\n\nuse Orchestra\\Authorization\\Policy;\nuse Illuminate\\Contracts\\Foundation\...
php
chosen
[ { "from": "system", "value": "Change header and title classes\n" }, { "from": "human", "value": "<?php\n/**\n * The template used for displaying page content in page.php\n *\n * @package Flacso\n */\n?>\n\n<article id=\"post-<?php the_ID(); ?>\" <?php post_class(); ?>>\n\t<header class=\"entry-h...
php
chosen
[ { "from": "system", "value": "Return types in manager tests\n" }, { "from": "human", "value": "<?php\n/*\n * WellCommerce Open-Source E-Commerce Platform\n * \n * This file is part of the WellCommerce package.\n *\n * (c) Adam Piotrowski <adam@wellcommerce.org>\n * \n * For the full copyright an...
php
chosen
[ { "from": "system", "value": "Remove old caching logic, and add missing docblock.\n" }, { "from": "human", "value": "<?php namespace VotingApp\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Cviebrock\\EloquentSluggable\\SluggableInterface;\nuse Cviebrock\\EloquentSluggable\\Sluggabl...
php
chosen
[ { "from": "system", "value": "Remove post method from CommandInterceptor binding\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace BEAR\\QueryRepository;\n\nuse BEAR\\RepositoryModule\\Annotation\\AbstractCacheControl;\nuse BEAR\\RepositoryModule\\Annotation\\Cach...
php
chosen
[ { "from": "system", "value": "Rename method getType to getParameterType\n" }, { "from": "human", "value": "<?php\n\nnamespace Gl3n\\HttpQueryStringFilterBundle\\ParameterType;\n\n/**\n * Contains all parameter types\n */\nclass ParameterTypeChain\n{\n /**\n * @var array\n */\n priv...
php
chosen
[ { "from": "system", "value": "Add missing tests of SystemOfUnits\n" }, { "from": "human", "value": "<?php\n\nnamespace BinSoul\\Test\\Common\\Measurement\\SystemOfUnits;\n\nuse BinSoul\\Common\\Measurement\\SystemOfUnits;\nuse BinSoul\\Common\\Measurement\\Unit;\nuse BinSoul\\Common\\Measurement...
php
chosen
[ { "from": "system", "value": "Reduce precision of floats in JSON\n\nDue to a https://stackoverflow.com/questions/42981409/php7-1-json-encode-float-issue\n\nFixes #161\n" }, { "from": "human", "value": "<?php\nrequire_once ('mysql.php');\n\n$benchID = $_GET[\"bench\"];\n$format = $_GET[\"for...
php
chosen
[ { "from": "system", "value": "Hide events before current date\n" }, { "from": "human", "value": "<section class=\"related events\" role=\"landmark\">\n <a class=\"anchor\" id=\"{{ $page->getFilename() }}\"></a>\n\t<div class=\"container\">\n\n\t\t<div class=\"title\">\n\t\t\t<h2>Upcoming Even...
php
chosen
[ { "from": "system", "value": "ADD support to multiple languages from config/app.php config file\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Jobs;\n\nuse App\\Jobs\\Job;\nuse Request;\nuse Illuminate\\Contracts\\Bus\\SelfHandling;\n\nclass SetLocale extends Job implements SelfHandl...
php
chosen
[ { "from": "system", "value": "STYLE: Comment only change to test dashboard svn update step.\n\ngit-svn-id: 496ab2bd9c9a782235c11388890d59de1024c1f0@1911 91079597-3006-4846-9bd3-4f3fb3d139a7\n" }, { "from": "human", "value": "<?php\n// kwtest library\nrequire_once('kwtest/kw_web_tester.php');\n\n...
php
chosen
[ { "from": "system", "value": "Fix to run the suite of tests\n" }, { "from": "human", "value": "<?php\n/**\n * Erdiko Test Suite\n * Be sure to name your test cases MyClassTest.php where MyClass is the functionality being tested\n */\n\nclass AllTests\n{\n\tpublic static function suite()\n\t{\n\t...
php
chosen
[ { "from": "system", "value": "Set database default string length\n" }, { "from": "human", "value": "<?php\n\nnamespace SQLgreyGUI\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass AppServiceProvider extends ServiceProvider\n{\n /**\n * Bootstrap any application services.\n...
php
chosen
[ { "from": "system", "value": "Add CSRF middleware to main app stack.\n" }, { "from": "human", "value": "<?php namespace App\\Providers;\n\nuse Illuminate\\Routing\\Router;\nuse Illuminate\\Routing\\Stack\\Builder as Stack;\nuse Illuminate\\Foundation\\Support\\Providers\\AppServiceProvider as Se...
php
chosen
[ { "from": "system", "value": "Put 'abstract' keyword before visibility to follow psr-2 standard\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Middleware;\n\nuse Interop\\Container\\ContainerInterface;\nuse Psr\\Http\\Message\\ServerRequestInterface as Request;\nuse Psr\\Http\\Messag...
php
chosen
[ { "from": "system", "value": "Fix incorrect coumpund tax flag method name\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Active Collab Payments project.\n *\n * (c) A51 doo <info@activecollab.com>. All rights reserved.\n */\n\ndeclare(strict_types=1);\n\nnamespace Ac...
php
chosen
[ { "from": "system", "value": "Fix sed command argument by appending -i.bak\n" }, { "from": "human", "value": "<?php\nnamespace PhpBrew\\Tasks;\n\nuse PhpBrew\\Utils;\n\nclass Patch64BitSupportTask extends BaseTask\n{\n\n public function match($build)\n {\n $currentVersion = preg_rep...
php
chosen
[ { "from": "system", "value": "Remove redundant number validator code\n" }, { "from": "human", "value": "<?php\n/*\n * Copyright 2016 Jack Sleight <http://jacksleight.com/>\n * This source file is subject to the MIT license that is bundled with this package in the file LICENCE. \n */\n\nnamespace...
php
chosen
[ { "from": "system", "value": "Enable PHPUnit exception expecting test\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nuse PHPUnit\\Framework\\TestCase;\n\n/**\n * @covers Email\n */\nfinal class EmailTest extends TestCase\n{\n public function testCanBeCreatedFromValidEma...
php
chosen
[ { "from": "system", "value": "Use the new API of the client\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the ImboClientCli package\n *\n * (c) Christer Edvartsen <cogo@starzinger.net>\n *\n * For the full copyright and license information, please view the LICENSE file t...
php
chosen
[ { "from": "system", "value": "Add static progress bar when getting image from docker\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of JoliCi.\n*\n* (c) Joel Wurtz <jwurtz@jolicode.com>\n*\n* For the full copyright and license information, please view the LICENSE\n* file that...
php
chosen
[ { "from": "system", "value": "Add ACTION_NONE to the definitions\n" }, { "from": "human", "value": "<?php\n define( 'DIRECTION_NONE', 0 );\n define( 'DIRECTION_NORTH', 1 );\n define( 'DIRECTION_EAST', 2 );\n define( 'DIRECTION_SOUTH', 3 );\n define( 'DIRECTION_WEST', 4 );\n def...
php
chosen
[ { "from": "system", "value": "Fix incorrect construction of subtype map when validating \"subtype\" transactions against non-subtypable objects\n\nSummary:\nFixes T13389. Currently, we try to \"newSubtypeMap()\" unconditionally, even if the underlying object does not support subtypes.\n\n - Only try to bui...
php
chosen
[ { "from": "system", "value": "BUGFIX: Check there is a service container before calling get on it.\n" }, { "from": "human", "value": "<?php\n\n/**\n * This file is part of the Heystack package\n *\n * @package Heystack\n */\n\n/**\n * Core namespace\n */\nnamespace Heystack\\Subsystem\\Core;\n\n...
php
chosen
[ { "from": "system", "value": "Set \"PHP\" word to uppercase!" }, { "from": "human", "value": "<?php\n/**\n * @author Pierre-Henry Soria <ph7software@gmail.com>\n * @copyright (c) 2012-2016, Pierre-Henry Soria. All Rights Reserved.\n * @license GNU General Public License; See ...
php
chosen
[ { "from": "system", "value": "Fix url when using cdnUrl with S3. Null url was incorrectly used as path\n" }, { "from": "human", "value": "<?php\n\nnamespace FoF\\Upload\\Adapters;\n\nuse FoF\\Upload\\Contracts\\UploadAdapter;\nuse FoF\\Upload\\File;\nuse FoF\\Upload\\Helpers\\Settings;\nuse Illu...
php
chosen
[ { "from": "system", "value": "Switch license from MIT to AGPL in plugin file\n" }, { "from": "human", "value": "<?php\n\n/*\n\nPlugin Name: Castlegate IT WP User Guide\nPlugin URI: https://github.com/castlegateit/cgit-wp-user-guide\nDescription: Add a simple WordPress user guide to the admin pan...
php
chosen
[ { "from": "system", "value": "Remove double slash in filename\n" }, { "from": "human", "value": "<?php\n\nnamespace Fillet\\Writer;\n\nuse Symfony\\Component\\Yaml\\Dumper as YamlDumper;\n\n/**\n * Generates a Post for Sculpin\n *\n * @package Fillet\\Writer\n */\nclass PostWriter extends Abstra...
php
chosen
[ { "from": "system", "value": "Send headers when redirect to avoid non identity bug\n" }, { "from": "human", "value": "<?php\n\nnamespace Admin\\Controller;\n\nuse Phalcon\\Mvc\\Controller;\n\nclass IndexController extends Controller\n{\n private $identity;\n\n public function initialize()\...
php
chosen
[ { "from": "system", "value": "Fix display of code block language where none is given.\n" }, { "from": "human", "value": "<?php\n\nnamespace FluxBB\\Markdown\\Node;\n\nuse FluxBB\\Markdown\\Common\\Collection;\nuse FluxBB\\Markdown\\Common\\Text;\n\nclass CodeBlock extends Node implements NodeAcc...
php
chosen
[ { "from": "system", "value": "Add test directories to suite definition.\n" }, { "from": "human", "value": "<?php\n/**\n * MustacheCake\n *\n * A Mustache implementation for CakePHP.\n *\n * @copyright Copyright (c) Hanson Wong\n * @link https://github.com/Dismounted/MustacheCake\n *...
php
chosen
[ { "from": "system", "value": "Update the send email command to use email manager\n" }, { "from": "human", "value": "<?php\n\nnamespace Forex\\Bundle\\EmailBundle\\Command;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand;\nuse Symfony\\Component\\Console\\Input\\InputArgum...
php
chosen
[ { "from": "system", "value": "Support for namespaces in local classes\n" }, { "from": "human", "value": "<?php\nspl_autoload_register('webFrameworkAutoloader');\n\nfunction webFrameworkAutoloader($class){\n\n $baseDir = str_replace(\"/include\", \"\", dirname(__FILE__));\n\n if (file_exist...
php
chosen
[ { "from": "system", "value": "Fix improper namespace causing test to ignore App\\Actions\\LaravelUi and make no assertions against it.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Actions;\n\nuse App\\LaravelUi;\nuse App\\Shell\\Shell;\n\nclass ConfigureFrontendFramework\n{\n us...
php
chosen
[ { "from": "system", "value": "Add commit property to the Branch object\n" }, { "from": "human", "value": "<?php\n\nrequire_once(__DIR__ . '/../GitHubObject.php');\n\n\t\n\nclass GitHubBranch extends GitHubObject\n{\n\t/* (non-PHPdoc)\n\t * @see GitHubObject::getAttributes()\n\t */\n\tprotected f...
php
chosen
[ { "from": "system", "value": "Fix Ratio Imageslider (wordpresss starter)\n" }, { "from": "human", "value": "<?php\n/**\n * Image Slider\n * ============\n * Build a Image Slider with Swipper.js\n */\n\n// Default Vars\n$classname = 'o-imageslider';\n?>\n\n<? // Build Element Block ?>\n<figure cl...
php
chosen
[ { "from": "system", "value": "Fix new line at the end of file" }, { "from": "human", "value": "<?php\n\nnamespace Galileo\\SettingBundle\\Lib\\Model;\n\ninterface SettingBagInterface\n{\n /**\n * @param string $name\n * @param string|integer|boolean|null $default\n *\n * @retu...
php
chosen
[ { "from": "system", "value": "Add missing use statement for Request\n" }, { "from": "human", "value": "<?php\n\nnamespace Keyteq\\Keymedia\\Util;\n\nuse Keyteq\\Keymedia\\API\\Configuration;\n\nclass RequestBuilder\n{\n public $config;\n\n public function __construct(Configuration $config)...
php
chosen
[ { "from": "system", "value": "Revert \"no fatal when using require_once on creature and animal instead of\"\n\nRe-introduce fatal to HEAD\n\nThis reverts commit fcd7b50630fc353700988723631ceed8f8433d86.\n" }, { "from": "human", "value": "<?php\n\nrequire_once(\"creature.php\");\nrequire_once(\"a...
php
chosen
[ { "from": "system", "value": "[PackageBuilder] Improve param typo proofreader test\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace Symplify\\PackageBuilder\\Tests\\Parameter\\ParameterTypoProofreader;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Psr\\Container\\Contai...
php
chosen
[ { "from": "system", "value": "Return cursor instead of our own cursor\n" }, { "from": "human", "value": "<?php\n\nnamespace EasyRepository\\t{{$mt=uniqid(true)}};\n\nuse PDO;\nuse EasySQL\\Cursor;\n\n@foreach ($files as $query)\nclass {{$query->getName()}}Repository\n{\n protected $dbh;\n\n ...
php
chosen
[ { "from": "system", "value": "Fix layout bug by properly closing SPAN element\n\nThe \"E-mail\" label ended up right of the \"Real name\" label earlier.\n" }, { "from": "human", "value": "<?php\n if (is_guest()) {\n echo('<p class=\"qmText\">The guest account does not have a profile. If you ...
php
chosen
[ { "from": "system", "value": "Fix error check field name\n" }, { "from": "human", "value": "@extends(Config::get('Sentinel::config.layout'))\n\n{{-- Web site Title --}}\n@section('title')\n@parent\nImport People\n@stop\n\n{{-- Content --}}\n@section('content')\n\t<h4>Import People from CSV</h4>\...
php
chosen
[ { "from": "system", "value": "Add functionality to work with models using different database connections" }, { "from": "human", "value": "<?php namespace GeneaLabs\\LaravelGovernor\\Listeners;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illumi...
php
chosen
[ { "from": "system", "value": "Change page section page - body" }, { "from": "human", "value": "@extends('page::page-layouts.default')\n@section('title', 'Laravel Pages')\n@section('page')\n\n@include('page::shared.header', [\"class_name\" => \"landing bg-5\"])\n\n\n@include('page::shared.nav')\n...
php
chosen
[ { "from": "system", "value": "Add doclink for Diviner documentation\n\nSummary: Fixes T7502.\n\nTest Plan: Went to `/diviner/` and saw a link to the documentation at `/help/documentation/PhabricatorDivinerApplication/`.\n\nReviewers: #blessed_reviewers, epriestley\n\nReviewed By: #blessed_reviewers, epriest...
php
chosen