conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix adding missing helper library" }, { "from": "human", "value": "<?php\n/**\n * Yii2 FancyBox Extension \n * @author Paul P <bigpaulie25ro@yahoo.com>\n * @license MIT\n */\nnamespace bigpaulie\\fancybox;\n\nuse yii\\web\\AssetBundle;\n\nclass FancyBoxAsset extends...
php
chosen
[ { "from": "system", "value": "Fix New object from variable name" }, { "from": "human", "value": "<?php\n\nnamespace PhpToZephir\\Converter\\Printer\\Expr;\n\nuse PhpParser\\Node\\Expr;\nuse PhpToZephir\\Converter\\SimplePrinter;\n\nclass NewPrinter extends SimplePrinter\n{\n public static fun...
php
chosen
[ { "from": "system", "value": "Add login and forgot links in the user register view\n\nMake is easy for users to get to the login and forgot view\nif they already registered.\n\nSigned-off-by: Marc Jones <bb1304e98184a66f7e15848bfbd0ff1c09583089@gmail.com>\n" }, { "from": "human", "value": "@exte...
php
chosen
[ { "from": "system", "value": "Add index assignments to to_indexed_array\n\nBeforehand, to_indexed_array wouldn't return an indexed array, instead it would just push the values into the array." }, { "from": "human", "value": "<?php\r\nnamespace tomlib\\object;\r\n\r\nfunction try_get_property($ob...
php
chosen
[ { "from": "system", "value": "Fix param type in doc block" }, { "from": "human", "value": "<?php\n/**\n * AmChartsPHP\n *\n * @link http://github.com/neeckeloo/AmChartsPHP\n * @copyright Copyright (c) 2012 Nicolas Eeckeloo\n */\nnamespace AmCharts\\Chart\\Axis;\n\nuse AmCharts\\Chart\\Excep...
php
chosen
[ { "from": "system", "value": "Allow multiple configuration files for both rules and attributes\n" }, { "from": "human", "value": "<?php\n\nnamespace PhpAbac\\Manager;\n\nuse PhpAbac\\Loader\\YamlAbacLoader;\n\nuse Symfony\\Component\\Config\\FileLocatorInterface;\n\nclass ConfigurationManager {\...
php
chosen
[ { "from": "system", "value": "Remove extra slash from group password form\n" }, { "from": "human", "value": "<style type='text/css'>\n#message\n{\n\twidth: 30%;\n\tmargin: 200px auto 0;\n}\n\n#message h1\n{\n\tfont-weight:bold;\n\tfont-size:1.3em;\n}\n\n#authBox\n{\n\tbackground: #000;\n\ttext-a...
php
chosen
[ { "from": "system", "value": "Change where to redirect if authenticated\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Closure;\nuse Illuminate\\Support\\Facades\\Auth;\n\nclass RedirectIfAuthenticated\n{\n /**\n * Handle an incoming request.\n *\n...
php
chosen
[ { "from": "system", "value": "Make the error goes away\n" }, { "from": "human", "value": "<div class=\"wrapper\">\n <div class=\"container\">\n <h1>Welcome</h1>\n\n <?php if(isset($_SESSION['error'])) {\n if ($_SESSION['error'] > 1) {\n foreach ($_SESSI...
php
chosen
[ { "from": "system", "value": "Test agains cluster as well\n" }, { "from": "human", "value": "<?php\n namespace ActiveCollab\\Insight\\Test;\n\n use ActiveCollab\\Insight\\Utilities\\Timestamp;\n use Redis, RedisCluster;\n\n /**\n * @package ActiveCollab\\Insight\\Test\n */\n abstract cl...
php
chosen
[ { "from": "system", "value": "Update the tests for the helper.\n" }, { "from": "human", "value": "<?php\n\nnamespace RichanFongdasen\\EloquentBlameableTest;\n\nclass HelperTests extends TestCase\n{\n /** @test */\n public function it_returns_current_user_identifier_correctly1()\n {\n ...
php
chosen
[ { "from": "system", "value": "Check specifically for null before overriding the timestamp\n" }, { "from": "human", "value": "<?php\n\nrequire_once('MongoQueue.php');\nrequire_once('MongoFunctor.php');\n\nabstract class MongoJob\n{\n\tpublic static function later($delay = 0, $batch = false)\n\t{\...
php
chosen
[ { "from": "system", "value": "Use token instead of getToken\n" }, { "from": "human", "value": "<?php\n\nnamespace AdamWathan\\Form;\n\nuse AdamWathan\\Form\\ErrorStore\\IlluminateErrorStore;\nuse AdamWathan\\Form\\OldInput\\IlluminateOldInputProvider;\nuse Illuminate\\Support\\ServiceProvider;\n...
php
chosen
[ { "from": "system", "value": "Update permissions table seeder with new structure\n" }, { "from": "human", "value": "<?php namespace Flarum\\Core\\Seeders;\n\nuse Illuminate\\Database\\Seeder;\nuse Flarum\\Core\\Models\\Permission;\n\nclass PermissionsTableSeeder extends Seeder {\n\n\t/**\n\t * ...
php
chosen
[ { "from": "system", "value": "Add homepage to plugin details" }, { "from": "human", "value": "<?php namespace Responsiv\\Uploader;\n\nuse System\\Classes\\PluginBase;\n\n/**\n * Uploader Plugin Information File\n */\nclass Plugin extends PluginBase\n{\n\n /**\n * Returns information about...
php
chosen
[ { "from": "system", "value": "Fix namespace missing backslash / wrong class\n" }, { "from": "human", "value": "<?php\n\nnamespace Plugin\\Theme;\n\nuse Core\\PluginBase;\n\nclass Plugin extends PluginBase\n{\n public function initialize()\n {\n $this->template->hook->attach('templat...
php
chosen
[ { "from": "system", "value": "Use list for Models collector + sort" }, { "from": "human", "value": "<?php\n\nnamespace Barryvdh\\Debugbar\\DataCollector;\n\nuse Barryvdh\\Debugbar\\DataFormatter\\SimpleFormatter;\nuse DebugBar\\DataCollector\\MessagesCollector;\nuse Illuminate\\Contracts\\Events...
php
chosen
[ { "from": "system", "value": "Add support for laravel 5.3\n" }, { "from": "human", "value": "<?php namespace Nwidart\\MoneyFormatterLaravel;\n\nuse Illuminate\\Foundation\\AliasLoader;\nuse Illuminate\\Support\\ServiceProvider;\nuse Nwidart\\MoneyFormatter\\MoneyFormatter;\n\nclass MoneyFormatte...
php
chosen
[ { "from": "system", "value": "Throw an exception if passed an empty value" }, { "from": "human", "value": "<?php\nnamespace Bolt\\Storage\\Mapping;\n\n/**\n * Taxonomy mapping.\n *\n * @author Gawain Lynch <gawain.lynch@gmail.com>\n */\nclass TaxonomyValue implements \\ArrayAccess\n{\n /** @v...
php
chosen
[ { "from": "system", "value": "Make it possible to define other values for the headers X-Frame-Options, X-XSS-Protection, X-Content-Type-Options if you realy want to\n\nThe current implementation uses an iframe this change makes it possible to use that again\n" }, { "from": "human", "value": "<?p...
php
chosen
[ { "from": "system", "value": "Configure headers through a constructor\n" }, { "from": "human", "value": "<?php\n\nnamespace hiapi\\Core\\Http\\Psr15\\Middleware;\n\nuse Psr\\Http\\Message\\ResponseInterface;\nuse Psr\\Http\\Message\\ServerRequestInterface;\nuse Psr\\Http\\Server\\MiddlewareInter...
php
chosen
[ { "from": "system", "value": "Remove left over dev code\n\n" }, { "from": "human", "value": "<?php\nRoute::get('/llllll', function() {\n \\Auth::loginUsingId(876594);\n return \"OK\";\n});\nRoute::group(['middleware' => 'auth:jwt,web', 'prefix' => '/auth'], function() {\n Route::get('to...
php
chosen
[ { "from": "system", "value": "Change and remove links in master template\n" }, { "from": "human", "value": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">\n ...
php
chosen
[ { "from": "system", "value": "Make changes for closing connection after use" }, { "from": "human", "value": "<?php\n // File: response.php\n\n // Get GET moviename value\n $gender = $_POST[\"moviename\"];\n\n // Connect to the database\n // replace the parameters with your proper credential...
php
chosen
[ { "from": "system", "value": "Fix copy/paste error in comment\n" }, { "from": "human", "value": "<?php\n\n/// ~ Change these values! ~ ///\n\n// YouTube channel ID\nconst CHANNELID = \"REPLACE_WITH_CHANNEL_ID\";\n\n// Public callback URL\nconst CALLBACKURL = \"REPLACE_WITH_CALLBACK_URL\";\n\n// ...
php
chosen
[ { "from": "system", "value": "Add decoding of json string\n" }, { "from": "human", "value": "<?php\n\nnamespace fennecweb\\ajax\\upload;\n\nuse \\PDO as PDO;\n\n/**\n * Web Service.\n * Uploads Project biom files and save them in the database\n */\nclass Project extends \\fennecweb\\WebService\n...
php
chosen
[ { "from": "system", "value": "Add .container wrapper around Service Icons list\n" }, { "from": "human", "value": "<?php\n\n$sidebar_id = 'keitaro_service_icons';\n\nif ( is_active_sidebar( $sidebar_id ) ) :\n\n\t?>\n\t<ul class=\"list-inline list-service-icons list-wide\">\n\t\t<?php\n\n\t\tdyna...
php
chosen
[ { "from": "system", "value": "Add a custom provided vampire\n" }, { "from": "human", "value": "<?php\n\nnamespace Scheb\\Tombstone\\Analyzer\\TestApplication\\Tombstone;\n\nuse Scheb\\Tombstone\\Analyzer\\Log\\LogReaderInterface;\nuse Scheb\\Tombstone\\Analyzer\\VampireIndex;\n\nclass LogProvide...
php
chosen
[ { "from": "system", "value": "Add test that should pass without warning\n" }, { "from": "human", "value": "<?php\necho $foo->$bar['baz'];\nFoo::$bar['baz']();\n$foo->$bar['baz']();\nstrlen($foo->$bar['baz']);\n" }, { "from": "gpt", "value": "<?php\necho $foo->$bar['baz'];\nFoo::$bar[...
php
chosen
[ { "from": "system", "value": "Fix unrelated coding style issue" }, { "from": "human", "value": "<?php\n\nnamespace Nord\\Lumen\\Elasticsearch\\Tests\\Search;\n\nuse Nord\\Lumen\\Elasticsearch\\Search\\Sort;\nuse Nord\\Lumen\\Elasticsearch\\Tests\\TestCase;\n\n/**\n * Class SortTest\n * @package ...
php
chosen
[ { "from": "system", "value": "Add constants for checkout session submit_type\n" }, { "from": "human", "value": "<?php\n\nnamespace Stripe\\Checkout;\n\n/**\n * Class Session\n *\n * @property string $id\n * @property string $object\n * @property string $cancel_url\n * @property string $client_re...
php
chosen
[ { "from": "system", "value": "Add Link Attribute Accessor to Slug Trait\n" }, { "from": "human", "value": "<?php\n\nnamespace LaravelFlare\\Cms\\Slugs;\n\ntrait SluggableModel\n{\n /**\n * Morph Slug to Model.\n * \n * @return \n */\n public function slug()\n {\n ...
php
chosen
[ { "from": "system", "value": "Fix for findById model method\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of Vegas package\n *\n * @author Slawomir Zytko <slawomir.zytko@gmail.com>\n * @copyright Amsterdam Standard Sp. Z o.o.\n * @homepage http://vegas-cmf.github.io\n *\n *...
php
chosen
[ { "from": "system", "value": "Use strict comparison to determine honeypot field value\n" }, { "from": "human", "value": "<?php\n\nnamespace Cerbero\\Auth\\Http\\Middleware;\n\nuse Closure;\nuse Cerbero\\Auth\\Exceptions\\DisplayException;\n\n/**\n * Protect from spam and bots.\n *\n * @author\tA...
php
chosen
[ { "from": "system", "value": "Fix bug when no mutation was declared for schema\n" }, { "from": "human", "value": "<?php\n/**\n * Date: 03.12.15\n *\n * @author Portey Vasil <portey@gmail.com>\n */\n\nnamespace Youshido\\GraphQL\\Introspection;\n\nuse Youshido\\GraphQL\\Schema;\nuse Youshido\\Gra...
php
chosen
[ { "from": "system", "value": "Add missing void return type to match the interface.\n" }, { "from": "human", "value": "<?php\n/**\n * PHP version 7.1\n *\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\nnamespace Ewallet\\Zf2\\InputFilter...
php
chosen
[ { "from": "system", "value": "Fix tests for PHP 5.3\n" }, { "from": "human", "value": "<?php\n\n/**\n * PHP Version 5.3\n *\n * @copyright (c) 2006-2015 brian ridley\n * @author brian ridley <ptlis@ptlis.net>\n * @license http://opensource.org/licenses/MIT MIT\n *\n * For the full cop...
php
chosen
[ { "from": "system", "value": "Add declare_strict_types rule for php-cs-fixer\n" }, { "from": "human", "value": "<?php\n\n$finder = (new PhpCsFixer\\Finder())\n ->in(__DIR__);\n\nreturn (new PhpCsFixer\\Config())\n ->setRiskyAllowed(true)\n ->setRules([\n '@Symfony' => true,\n ...
php
chosen
[ { "from": "system", "value": "Increment version to 0.0.6 for release\n" }, { "from": "human", "value": "<?php\ndefine(\"BEYONIC_CLIENT_VERSION\", \"0.0.5\");\n\nif (!function_exists('curl_init')) {\n throw new Exception('Beyonic requires the CURL PHP extension.');\n}\nif (!function_exists('json...
php
chosen
[ { "from": "system", "value": "Use justify-content-center on the manga list row.\n\nBasically just centers the columns.\n" }, { "from": "human", "value": "<div class=\"row\">\n <div class=\"col-12\">\n @if (isset($header))\n <h3 class=\"text-center\">\n <b>{{ $...
php
chosen
[ { "from": "system", "value": "Use session::put instead of flash, to preserve the session past multiple redirects until displayed" }, { "from": "human", "value": "<?php namespace GeneaLabs\\Bones\\Flash;\n\nuse Illuminate\\Session\\Store;\n\nclass FlashNotifier\n{\n private $session;\n\n pu...
php
chosen
[ { "from": "system", "value": "Remove the package registration for L5\n" }, { "from": "human", "value": "<?php namespace Jenssegers\\Date;\r\n\r\nuse Illuminate\\Support\\ServiceProvider;\r\n\r\nclass DateServiceProvider extends ServiceProvider {\r\n\r\n /**\r\n * Indicates if loading of t...
php
chosen
[ { "from": "system", "value": "Make sure to limit the number of simultaneous requests\n" }, { "from": "human", "value": "<?php\n\nnamespace Happyr\\LocoBundle\\Http;\n\nuse GuzzleHttp\\Client;\nuse GuzzleHttp\\Exception\\ClientException;\nuse GuzzleHttp\\Pool;\nuse Happyr\\LocoBundle\\Exception\\...
php
chosen
[ { "from": "system", "value": "Revert \"Fixed broken test and improved indentation of test.\"\n\nThis reverts commit b559c557c5f64c7df4a5e9d20759f3e09e8d3974.\n" }, { "from": "human", "value": "<?php\n\nclass EngineBlock_Test_Saml2_AuthnRequestAnnotationDecoratorTest extends PHPUnit_Framework_Tes...
php
chosen
[ { "from": "system", "value": "Fix Message for PHP-FPM / PHP-FCGI\n" }, { "from": "human", "value": "<?php\n\n//-- unixman\nini_set('display_errors', '1');\t// display runtime errors\nerror_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); // error reporting\nini_set('html_errors', '0');\...
php
chosen
[ { "from": "system", "value": "FIX session are now remembered for 120 days\n" }, { "from": "human", "value": "<?php\n\n// Define path to application directory\ndefined('APPLICATION_PATH')\n || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));\n\n// Define application...
php
chosen
[ { "from": "system", "value": "Use storage_path if it exists\n" }, { "from": "human", "value": "<?php namespace Fulfillment\\Api\\Utilities;\n\nclass Helper\n{\n /**\n * Get the path to the storage folder.\n *\n * @param string $path\n *\n * @return string\n */\n pu...
php
chosen
[ { "from": "system", "value": "Throw an exception when allow_url_fopen is disabled\n" }, { "from": "human", "value": "<?php\n\nnamespace Airbrake\\Http;\n\nuse Airbrake\\Exception;\nuse InvalidArgumentException;\n\nclass Factory\n{\n /**\n * HTTP client generation.\n *\n * @param s...
php
chosen
[ { "from": "system", "value": "Replace call to getPluginBlockPath with getPluginPath\n" }, { "from": "human", "value": "<?php\n/**\n * @file\n * Contains \\Drupal\\AppConsole\\Generator\\PluginBlockGenerator.\n */\n\nnamespace Drupal\\AppConsole\\Generator;\n\nclass PluginBlockGenerator extends G...
php
chosen
[ { "from": "system", "value": "Update gateways to use new sendData method\n" }, { "from": "human", "value": "<?php\n\nnamespace Omnipay\\Manual\\Message;\n\nuse Omnipay\\Common\\Message\\AbstractRequest;\n\n/**\n * Manual Request\n */\nclass Request extends AbstractRequest\n{\n public function...
php
chosen
[ { "from": "system", "value": "Add DateTime type hints for date parameters in method signature.\n" }, { "from": "human", "value": "<?php\n\nnamespace Plummer\\Calendarful\\Recurrence;\n\ninterface RecurrenceInterface\n{\n\tpublic function getLabel();\n\n\tpublic function getLimit();\n\n\tpublic f...
php
chosen
[ { "from": "system", "value": "Order topics by update time descending\n" }, { "from": "human", "value": "<?php\n/**\n * Topic components\n * \n * No redirection nor database manipulation ( insert, update, delete ) here\n */\nclass topicComponents extends myFrontModuleComponents\n{\n\n public fun...
php
chosen
[ { "from": "system", "value": "Add test cases get method\n" }, { "from": "human", "value": "<?php\n\nnamespace AmpProject\\RemoteRequest;\n\nuse AmpProject\\RemoteGetRequest;\nuse AmpProject\\Tests\\TestCase;\n\n/**\n * Tests for AmpProject\\RemoteRequest\\CurlRemoteGetRequest.\n *\n * @covers \...
php
chosen
[ { "from": "system", "value": "Make Data match the Extension API.\n" }, { "from": "human", "value": "<?php\nnamespace ComplexPie;\n\nclass Data extends Extension\n{\n protected static $static_ext = array();\n \n public static function add_static_extension($extpoint, $ext, $priority)\n ...
php
chosen
[ { "from": "system", "value": "Correct default value of attribute 'enabled'.\n" }, { "from": "human", "value": "<?php\n/**\n * @link https://github.com/thinker-g/yii2-ishtar-gate\n * @copyright Copyright (c) Thinker_g (Jiyan.guo@gmail.com)\n * @author Thinker_g\n * @license MIT\n * \n * This file...
php
chosen
[ { "from": "system", "value": "Update links to about pages\n" }, { "from": "human", "value": " <footer>\n <div class=\"row colors\">\n <div class=\"three columns mobile-one yellow\"> </div>\n <div class=\"three columns mobile-one light-blue\"> </div>\n <div class=\"three column...
php
chosen
[ { "from": "system", "value": "Enable error reporting, and use composer autoloading " }, { "from": "human", "value": "<pre>\n<?php\nrequire_once __DIR__ . '/../src/Blendle.php';\nrequire_once __DIR__ . '/../src/Rest.php';\n\nuse Steefdw\\Blendle\\Blendle;\n\n$search = Blendle::search('blendle');\...
php
chosen
[ { "from": "system", "value": "Write missing tests for ThrowMatcher.\n" }, { "from": "human", "value": "<?php namespace Essence\\Matchers;\n\nclass ThrowMatcherTest extends \\MatcherTestCase\n{\n\n protected $subject = \"Essence\\Matchers\\ThrowMatcher\";\n\n /**\n * @test\n */\n ...
php
chosen
[ { "from": "system", "value": "Make test more stable to avoid timing issues\n" }, { "from": "human", "value": "<?php\nclass Kwf_Component_Output_C4_Component extends Kwc_Abstract\n{\n public static function getSettings()\n {\n $ret = parent::getSettings();\n $ret['contentWidth...
php
chosen
[ { "from": "system", "value": "Add fetch EAGER to User relation. Change the parent to be the File relation.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Entities;\n\nuse App\\Contracts\\SystemComponent;\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * App\\Entities\\Comment\n *\n * @O...
php
chosen
[ { "from": "system", "value": "Add no-ctm fallback for bgset images.\n" }, { "from": "human", "value": "<?php ///////////////////////////////////////////////////////\n// ----------------------------------------------------------\n// SNIPPET\n// ----------------------------------------------------...
php
chosen
[ { "from": "system", "value": "Fix issue where PHP would try to escape slashes in a string in json_encode\n" }, { "from": "human", "value": "<?php \n\nclass FacebookJS {\n\n private $_initOptions = array(\n \"status\" => true,\n \"cookie\" => true,\n \"oauth\" => true,\n ...
php
chosen
[ { "from": "system", "value": "Make the mailchimp tests pass\n" }, { "from": "human", "value": "<?php\n\nrequire_once('tests/php/base.php');\n\nclass CashSeedTests extends UnitTestCase {\n\tfunction testS3Seed(){\n\t\t$settings = new S3Seed(1,1);\n\t\t$this->assertIsa($settings, 'S3Seed');\n\t}\n...
php
chosen
[ { "from": "system", "value": "Fix encoding apostrophes in page names\n\n\nFormer-commit-id: 764b2e7462b7fa0883f2e538611ee10957a7113a" }, { "from": "human", "value": "<?php\n\n/**\n * Helper class for sanitizing input and escaping output.\n * @package Helpers\n * @category Concrete\n * @subpackag...
php
chosen
[ { "from": "system", "value": "Add newline to end of output.\n" }, { "from": "human", "value": "<?php\n/*\n +------------------------------------------------------------------------+\n | dd |\n +----------------------------------...
php
chosen
[ { "from": "system", "value": "Allow forcing transient as cache handler\n" }, { "from": "human", "value": "<?php namespace GM\\ATP\\Cache;\n\nclass TransientHandler implements HandlerInterface {\n\n public function clear( $key ) {\n return delete_transient( $key );\n }\n\n public ...
php
chosen
[ { "from": "system", "value": "Add back daily NoAttendanceJediPush job" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Console;\n\nuse App\\Jobs\\DailyDuesSummary;\nuse App\\Jobs\\WeeklyAttendance;\nuse Illuminate\\Console\\Scheduling\\Schedule;\nuse Illuminat...
php
chosen
[ { "from": "system", "value": "[Tests] Create postgis extension in public schema\n" }, { "from": "human", "value": "<?php\n\necho \"Create the schema lizmap into the database lizmap\\n\";\n$tryAgain = true;\n\nwhile($tryAgain) {\n\n $cnx = @pg_connect(\"host='pgsql' port='5432' dbname='lizmap'...
php
chosen
[ { "from": "system", "value": "Use a static piece of text on the homepage, so test can pass both locally and on travis\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests\\Browser;\n\nuse Tests\\DuskTestCase;\nuse Laravel\\Dusk\\Browser;\nuse Illuminate\\Foundation\\Testing\\DatabaseMigra...
php
chosen
[ { "from": "system", "value": "Remove legacy fields from exhibition test\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests\\Unit;\n\nuse App\\Models\\Collections\\Exhibition;\nuse App\\Models\\Collections\\Place;\nuse App\\Models\\Collections\\Agent;\n\nclass ExhibitionTest extends ApiT...
php
chosen
[ { "from": "system", "value": "Fix uptime and minor re-factoring\n" }, { "from": "human", "value": "<?php\n\nfunction collect_kernel($debug) {\n $kernel = exec('uname -r').\" \".exec('uname -v');\n \n if ($debug == TRUE) {\n echo \"[DEBUG_COLLECT] Kernel: \".$kernel.\"\\n\";\n ...
php
chosen
[ { "from": "system", "value": "Fix security with id in update\n" }, { "from": "human", "value": "<?php\n// read global var $app\nglobal $app;\n\n// get id\nif (!isset($_GET['id'])) {\n die(\"error\"); // TODO faire un throw plus propre\n}\n$id = $_GET['id'];\n\n$formError = false;\n// check fo...
php
chosen
[ { "from": "system", "value": "Change factory class to abstract" }, { "from": "human", "value": "<?php\n\nnamespace JWX\\JWE\\CompressionAlgorithm;\n\nuse JWX\\JWA\\JWA;\nuse JWX\\JWE\\CompressionAlgorithm;\n\n\n/**\n * Factory class to construct compression algorithm instances.\n */\nclass Compr...
php
chosen
[ { "from": "system", "value": "Add and fix scheduled command to cleanup MailBody content\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Console;\n\nuse Draw;\nuse Illuminate\\Console\\Scheduling\\Schedule;\nuse Illuminate\\Foundation\\Console\\Kernel as ConsoleKernel;\n\nclass Kernel ...
php
chosen
[ { "from": "system", "value": "Fix PHP 5.3 compatibility issue\n" }, { "from": "human", "value": "<?php\n\nnamespace Kanboard\\Plugin\\GogsWebhook;\n\nuse Kanboard\\Core\\Plugin\\Base;\nuse Kanboard\\Core\\Translator;\n\nclass Plugin extends Base\n{\n public function initialize()\n {\n ...
php
chosen
[ { "from": "system", "value": "Add index on beatmap_discussions (user_id, updated_at)\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddLastReplyAtToBeat...
php
chosen
[ { "from": "system", "value": "Fix ip -> target bug\n" }, { "from": "human", "value": "<?php\n\nnamespace CascadeEnergy\\ServiceDiscovery\\Consul;\n\nuse CascadeEnergy\\ServiceDiscovery\\ServiceDiscoveryClientInterface;\n\nclass ConsulDns implements ServiceDiscoveryClientInterface\n{\n private...
php
chosen
[ { "from": "system", "value": "Fix for queued job support\n" }, { "from": "human", "value": "<?php\n/**\n * If the queued jobs module is installed, this will be used instead of\n * updating vfi's in onBeforeWrite.\n *\n * @author Mark Guinn <mark@adaircreative.com>\n * @date 07.02.2015\n * @p...
php
chosen
[ { "from": "system", "value": "Add title to the page type\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Modules\\Pages\\Domain\\Page\\Form;\n\nuse Backend\\Modules\\Pages\\Domain\\Page\\PageDataTransferObject;\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\...
php
chosen
[ { "from": "system", "value": "Fix undefined function when using in_memory user to login\n" }, { "from": "human", "value": "<?php\n\n\nnamespace UBC\\Exam\\MainBundle\\EventListener;\n\n\nuse Doctrine\\Bundle\\DoctrineBundle\\Registry;\nuse Symfony\\Component\\Security\\Http\\Event\\InteractiveLo...
php
chosen
[ { "from": "system", "value": "Move to new way of gettings items from user model.\n" }, { "from": "human", "value": "<?php namespace App\\Http\\Controllers;\n\nuse App\\Items;\nuse App\\User;\n\nclass FeedController extends BaseController {\n\n public function podcast($id, $secret)\n {\n ...
php
chosen
[ { "from": "system", "value": "Add apiPost() and fix apiGet() to send the correct headers.\n" }, { "from": "human", "value": "<?php\nnamespace Joindin\\Model\\API;\n\nclass JoindIn\n{\n protected $baseApiUrl = 'http://api.joind.in';\n\n public function __construct()\n {\n $app = \...
php
chosen
[ { "from": "system", "value": "Improve check for single by only issuing search once" }, { "from": "human", "value": "<?php\n\nclass AlgorithmConnectedComponents extends Algorithm{\n \n /**\n * \n * @var Graph\n */\n private $graph;\n \n /**\n * \n * @param Graph...
php
chosen
[ { "from": "system", "value": "Fix autoload.php path when installed via Composer\n\nFixes #34\n" }, { "from": "human", "value": "<?php\n\nuse DrupalVmGenerator\\Application;\n\n// Look for and require the autoloader.\n$appDir = __DIR__ . '/../';\nif (file_exists($appDir . 'vendor/autoload.php')) ...
php
chosen
[ { "from": "system", "value": "Add new lang function like Yii\n" }, { "from": "human", "value": "<?php\nnamespace common\\components;\n\nuse Yii;\n\nclass Lang\n{\n /**\n * AHNAMES Lng to Yii2 i18n\n * @param null $txt\n * @param string $path\n *\n * @return string\n */...
php
chosen
[ { "from": "system", "value": "Add a language string for logging the actions\n\nSigned-off-by: Suki <52329a27ea5670aeec0efeeb0773bf1b4f1affa1@missallsunday.com>\n" }, { "from": "human", "value": "<?php\n/**\n *\n * @package moderateAdmin mod\n * @version 1.0\n * @author Jessica Gonzlez <suki@miss...
php
chosen
[ { "from": "system", "value": "Add round day and hour marker in footer\n" }, { "from": "human", "value": "<footer class=\"main-footer\">\n\n <div class=\"pull-right\">\n <span class=\"hidden-xs\">Version: </span>{!! $version !!}\n </div>\n\n <i class=\"fa fa-github\"></i> <span cl...
php
chosen
[ { "from": "system", "value": "Check if optional config file exists before trying to load it. Added comment to xmlrpc check.\n" }, { "from": "human", "value": "<?php\n\nrequire_once('Classloader.php');\n\nif(!function_exists('xmlrpc_encode_entitites') && !class_exists('xmlrpcresp')) {\n\trequire_...
php
chosen
[ { "from": "system", "value": "Make it parse (using PHP 5.5).\n" }, { "from": "human", "value": "<?php\n\n$path = $_SERVER['PATH_INFO'];\n\nif ($path = '/address')\n{\n $controller = new \\Controller();\n $return = $controller->ex();\n echo $return;\n}\n\nclass Controller\n{\n $addresses = []...
php
chosen
[ { "from": "system", "value": "Allow webpack-dev-server port setting to fixed port number\n" }, { "from": "human", "value": "<?php\nclass Kwf_Assets_WebpackConfig\n{\n public static function getDevServerPort()\n {\n if (!Kwf_Config::getValue('debug.webpackDevServer')) {\n ...
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 Campaign Monitor\nPlugin URI: http://github.com/castlegateit/cgit-wp-campaign-monitor\nDescription: Campaign Monitor integration for WordPr...
php
chosen
[ { "from": "system", "value": "Improve docblock return types and using fully-qualified namespaces\n" }, { "from": "human", "value": "<?php\n\nnamespace Heystack\\Availability;\n\nuse DataExtension;\n\n/**\n * @package Heystack\\Availability\n */\nclass DiscountAvailabilityExtension extends DataEx...
php
chosen
[ { "from": "system", "value": "Add support for additional source options\n" }, { "from": "human", "value": "<?php\n\nnamespace Bridge\\HttpApi\\Adapter;\n\nuse GuzzleHttp\\Client;\nuse Transfer\\Adapter\\SourceAdapterInterface;\nuse Transfer\\Adapter\\Transaction\\Request;\nuse Transfer\\Adapter\...
php
chosen
[ { "from": "system", "value": "Fix for HHVM false function\n" }, { "from": "human", "value": "<?php\n\nnamespace Funct\\CodeBlocks;\n\n/**\n * Returns true if all of the values in the array pass the callback truth test.\n *\n * @author Aurimas Niekis <aurimas.niekis@gmail.com>\n *\n * @param arra...
php
chosen
[ { "from": "system", "value": "Split up the graph areas with header sections\n" }, { "from": "human", "value": "<!-- resources/views/dashboard/survey_counts.blade.php -->\n@extends('layouts.app')\n@section('content')\n <h2>Survey Count Graphs</h2>\n <div id=\"perf_div\"></div>\n @columnchart('...
php
chosen
[ { "from": "system", "value": "ENHANCEMENT: Test for exif data import\n" }, { "from": "human", "value": "<?php\n\nclass ImageMetaDataExtensionTest extends SapphireTest\n{\n public function testProcessExifData()\n {\n $this->markTestSkipped('TODO');\n }\n\n public function testO...
php
chosen
[ { "from": "system", "value": "Allow character to appear more than once\n\nUsing str_shuffle means that each character can only occur once in the generated string. This reduces the number of permutations possible. For example, using base 36, and 4 characters, there are 36^4 = 1.68M, but the current function ...
php
chosen
[ { "from": "system", "value": "Remove hard-code callback url from the requestBuilder, build via urlBuilder instead.\n" }, { "from": "human", "value": "<?php\nnamespace Omise\\Payment\\Gateway\\Request;\n\nuse Magento\\Payment\\Gateway\\Helper\\SubjectReader;\nuse Magento\\Payment\\Gateway\\Reques...
php
chosen
[ { "from": "system", "value": "Fix compatibility of REQUEST_URI parsing\n" }, { "from": "human", "value": "<?php\nnamespace Pragma\\Router;\n\nclass Request{\n\tprotected $path = '';\n\tprotected $method = '';\n\n\tprivate static $request = null;//singleton\n\n\tpublic function __construct(){\n\t...
php
chosen
[ { "from": "system", "value": "Add functional tests for Drush commands\n" }, { "from": "human", "value": "<?php\n\nnamespace Pantheon\\Terminus\\Tests\\Functional;\n\nuse Pantheon\\Terminus\\Tests\\Traits\\LoginHelperTrait;\nuse Pantheon\\Terminus\\Tests\\Traits\\TerminusTestTrait;\nuse PHPUnit\\...
php
chosen