conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Read More module: fixed upgrader versioning\n" }, { "from": "human", "value": "<?php\n if (!defined('UPGRADING') or !UPGRADING)\n exit;\n\n /**\n * Function: read_more_add_config\n * Adds config settings into an array.\n *\n * Versions: ...
php
chosen
[ { "from": "system", "value": "Update rules property to ba a collection instead of array\n" }, { "from": "human", "value": "<?php\n\nnamespace GeniusTS\\Preferences\\Models;\n\n\nuse Illuminate\\Contracts\\View\\View;\n\n/**\n * Class Element\n *\n * @package GeniusTS\\Preferences\n * @property s...
php
chosen
[ { "from": "system", "value": "Add test for add single email function\n" }, { "from": "human", "value": "<?php\n\nclass AddMailTest extends PHPUnit_Extensions_Selenium2TestCase\n{\n protected function setUp()\n {\n $this->setHost('127.0.0.1');\n $this->setBrowser('firefox');\n...
php
chosen
[ { "from": "system", "value": "BUGFIX: Handle nullable property annotations correctly" }, { "from": "human", "value": "<?php\nnamespace Neos\\Flow\\Tests\\Functional\\Reflection\\Fixtures\\Model;\n\n/*\n * This file is part of the Neos.Flow package.\n *\n * (c) Contributors of the Neos Project - ...
php
chosen
[ { "from": "system", "value": "Add input controls to payload\n\nIt is very helpful for invalid state to notify the user of the input that was not correct.\n" }, { "from": "human", "value": "<?php\nnamespace Spark;\n\nuse Spark\\Adr\\PayloadInterface;\n\nclass Payload implements PayloadInterface\n...
php
chosen
[ { "from": "system", "value": "Move \"Add Link\" button to top of page\n\nIt will be annoying at the bottom when there are a lot of links.\nThis closes #10\n" }, { "from": "human", "value": "<?php\n\nuse yii\\helpers\\Html;\nuse yii\\widgets\\ListView;\n\n/* @var $this yii\\web\\View */\n\n?>\n<h...
php
chosen
[ { "from": "system", "value": "Remove debug code from migration\n" }, { "from": "human", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AddSpriteHashToAppearances extends AbstractMigration {\n\tpublic function up() {\n\t\t$this->table('appearances')\n\t\t\t->addColumn('sprit...
php
chosen
[ { "from": "system", "value": "Fix indenation to project's default\n" }, { "from": "human", "value": "<?php\n/**\n * Will hold data from the Kaltura Player components to be passed on to the live analytics system\n * @package api\n * @subpackage objects\n */\nclass KalturaLiveStatsEvent extends Ka...
php
chosen
[ { "from": "system", "value": "Fix schedule link in nav\n" }, { "from": "human", "value": "<?php include \"../com/panel.php\"; ?>\n\n<div id=\"nav\">\n <img id=\"logo\" src=\"../img/logo.png\">\n <a href=\"tch_panel.php\">برنامه هفتگی</a>\n <a href=\"../com/logout.php\">خروج</a>\n</div>\...
php
chosen
[ { "from": "system", "value": "Load config file from examples directory\n" }, { "from": "human", "value": "<?php\nrequire __DIR__ . \"/../vendor/autoload.php\";\n\nerror_reporting(~E_ALL);\n\n$manager = new PhpProbe\\Manager();\n$manager->importConfig('config.yml');\n$manager->checkAll();\n\nif (...
php
chosen
[ { "from": "system", "value": "Fix forelse's candidate variable being pushed into template.\n" }, { "from": "human", "value": "@extends('layout')\n\n@section('title', $category->name)\n\n@section('content')\n <ul class=\"gallery\">\n @forelse($category->candidates as $candidate)\n @include('...
php
chosen
[ { "from": "system", "value": "ADD counting movies during update" }, { "from": "human", "value": "<?php\n\n/**\n * This script fetch data from IMDb for all movies currently in our database and save it.\n * It will overwrite existing data (update).\n */\n\n\nrequire_once('../public/index.php');\n\...
php
chosen
[ { "from": "system", "value": "Add a set of prefixes for routes skipping" }, { "from": "human", "value": "<?php\n\nreturn [\n 'providers' => [\n #\\App\\Http\\Terranet\\Administrator\\Navigation\\Providers\\PagesProvider::class,\n \\App\\Http\\Terranet\\Administrator\\Navigation\...
php
chosen
[ { "from": "system", "value": "Fix error message of composer version\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Foxy package.\n *\n * (c) François Pluchino <francois.pluchino@gmail.com>\n *\n * For the full copyright and license information, please view the LICENS...
php
chosen
[ { "from": "system", "value": "[Filesystem] Add types to private properties\n\nSigned-off-by: Alexander M. Turek <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@derrabus.de>\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien...
php
chosen
[ { "from": "system", "value": "MINOR: Remove inclusion of autoloader because silverstripe already includes it\n" }, { "from": "human", "value": "<?php\n\nif (file_exists(__DIR__ . '../vendor/autoload.php')) {\n require_once __DIR__ . '../vendor/autoload.php';\n}\n\nif (isset($_GET['flush']) &&...
php
chosen
[ { "from": "system", "value": "Add missing constructor for the entity class\n" }, { "from": "human", "value": "<?php\n\nnamespace ModuleGenerator\\Domain\\Entity;\n\nuse ModuleGenerator\\CLI\\Service\\Generate\\GeneratableClass;\nuse ModuleGenerator\\PhpGenerator\\ClassName\\ClassName;\n\nfinal c...
php
chosen
[ { "from": "system", "value": "Change option 'Processos Seletivos' to dropdown item\n" }, { "from": "human", "value": "<?php\n/**\n *Class for processing framework with HTML standards.\n *\n *@package Html\n *@author Vinicius Pinheiro <viny-pinheiro@hotmail.com>\n *@license MIT License\n *@link ...
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": "Read the files again upon deletion\n" }, { "from": "human", "value": "<?php\n\n\nnamespace Kibo\\Phast\\Cache\\File;\n\n\nuse Kibo\\Phast\\Common\\ObjectifiedFunctions;\n\nclass DiskCleanup extends ProbabilisticExecutor {\n\n /**\n * @var integer\n */\n ...
php
chosen
[ { "from": "system", "value": "Add an instance of check\n" }, { "from": "human", "value": "<?php namespace Modules\\Block\\Composers;\n\nuse Illuminate\\Contracts\\View\\View;\nuse Maatwebsite\\Sidebar\\SidebarGroup;\nuse Maatwebsite\\Sidebar\\SidebarItem;\nuse Modules\\Core\\Composers\\BaseSideb...
php
chosen
[ { "from": "system", "value": "Add options property for request\nReceive credentials on constructor\nPush credentials as auth basic\n" }, { "from": "human", "value": "<?php\n\nnamespace PhpWatson\\Sdk;\n\nuse GuzzleHttp\\Client as GuzzleClient;\nuse PhpWatson\\Sdk\\Interfaces\\ClientInterface;\n...
php
chosen
[ { "from": "system", "value": "Reformat & move comment checking stuff to subclass.\n" }, { "from": "human", "value": "<?php \nnamespace Gothick\\AkismetClient;\n\nclass ClientResult\n{\n const PRO_TIP_HEADER = 'X-akismet-pro-tip';\n private $raw_result;\n private $pro_tip;\n \n pub...
php
chosen
[ { "from": "system", "value": "Add notice that we are going to automatically upload the log once the user clicks on the big button\n" }, { "from": "human", "value": "<?php\n require \"scripts/pi-hole/php/header.php\";\n?>\n<!-- Title -->\n<div class=\"page-header\">\n <h1>Generate debug log...
php
chosen
[ { "from": "system", "value": "Remove json return (for testing purpose)\n" }, { "from": "human", "value": "<?php\n\nRoute::post('laralytics', function (Bsharp\\Laralytics\\Laralytics $laralytics,\n Illuminate\\Http\\Request $request,\n ...
php
chosen
[ { "from": "system", "value": "Fix typo in mapping array key." }, { "from": "human", "value": "<?php\n\nnamespace Borfast\\Socializr;\n\nclass Profile\n{\n public $provider;\n public $id;\n public $email;\n public $name;\n public $first_name;\n public $middle_name;\n public $...
php
chosen
[ { "from": "system", "value": "III-611: Correct class name in comment\n" }, { "from": "human", "value": "<?php\n\nnamespace CultuurNet\\UDB3\\Event\\Events;\n\nuse CultuurNet\\UDB3\\Event\\EventEvent;\nuse CultuurNet\\UDB3\\Offer\\ImageRemoveTrait;\n\n/**\n * Provides an ImageDeleted event.\n */\...
php
chosen
[ { "from": "system", "value": "Fix leading spaces in setext headers.\n" }, { "from": "human", "value": "<?php\n\nnamespace FluxBB\\Markdown\\Parser;\n\nuse FluxBB\\Markdown\\Common\\Text;\nuse FluxBB\\Markdown\\Node\\Heading;\n\nclass SetextHeaderParser extends AbstractParser\n{\n\n /**\n ...
php
chosen
[ { "from": "system", "value": "Refresh annotation using annotations command\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace ApiClients\\Client\\Travis\\Resource\\Async;\n\nuse ApiClients\\Foundation\\Hydrator\\CommandBus\\Command\\HydrateCommand;\nuse ApiClients\\F...
php
chosen
[ { "from": "system", "value": "Move path matching pattern to a constant.\n" }, { "from": "human", "value": "<?php\n\nnamespace Orbt\\StyleMirror\\Css;\n\nuse Orbt\\StyleMirror\\Resource\\SingleUseQueue;\nuse Orbt\\ResourceMirror\\Resource\\GenericResource;\n\n/**\n * Scans a stylesheet for resour...
php
chosen
[ { "from": "system", "value": "Enable multiple widgets\nOverride widget name by specifying widget: name in the widget variables\n" }, { "from": "human", "value": "<?php $this->view('partials/head'); ?>\n\n<div class=\"container\">\n\n\t<?php foreach($dashboard_layout AS $row):?>\n\n\t<div class=\...
php
chosen
[ { "from": "system", "value": "Add fonction for retrieve ext from contenttype\n\ngit-svn-id: 4cd2d1688610a87757c9f4de95975a674329c79f@1682 b8ca103b-dd03-488c-9448-c80b36131af2\n" }, { "from": "human", "value": "<?php\r\n\r\nclass mime_types {\r\n private static $mime_path;\r\n private static $m...
php
chosen
[ { "from": "system", "value": "Allow to specify neo4j credentials in phpunit.xml\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the GraphAware Neo4j Client package.\n *\n * (c) GraphAware Limited <http://graphaware.com>\n *\n * For the full copyright and license informati...
php
chosen
[ { "from": "system", "value": "Enable landing localized versions (2)\n" }, { "from": "human", "value": "<?php \n\nif (isset($_GET['l']) && ($l = $_GET['l']) && file_exist('landingPeaceLabs_'.$l.'.html'))\n{\n\n\tinclude('landingPeaceLabs_'.$l.'.html');\n\n}\nelse\n{\n\n include('landingPea...
php
chosen
[ { "from": "system", "value": "Use 2>&1 for enhanced debugging\n" }, { "from": "human", "value": "<?php\n\n$payload = json_decode(file_get_contents('php://input'));\n\nif ($payload) {\n file_put_contents('/var/www/controversial.io/webhook-test.json', file_get_contents('php://input'));\n shell_e...
php
chosen
[ { "from": "system", "value": "Replace real typograph with mock\n" }, { "from": "human", "value": "<?php\nnamespace Fsv\\TypographyBundle\\Tests\\Form\\Extension;\n\nuse Fsv\\TypographyBundle\\Form\\Extension\\TextareaTypeExtension;\nuse Fsv\\TypographyBundle\\Typograph\\MdashTypograph;\nuse Symf...
php
chosen
[ { "from": "system", "value": "Test asset method name correction - method name was mismatching the purpose (using an `object` hint)\n" }, { "from": "human", "value": "<?php\n/*\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANT...
php
chosen
[ { "from": "system", "value": "Use exceptions to warn user and stop application if any runtime file is missing\n" }, { "from": "human", "value": "<?php\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\n// TODO: If settings.php file does not exists throw an exception and warn users\nrequire __DIR...
php
chosen
[ { "from": "system", "value": "Remove some unfound/unused variable warnings\n" }, { "from": "human", "value": "<?php\nnamespace exussum12\\CoverageChecker\\DiffLineHandle;\n\nuse exussum12\\CoverageChecker\\DiffLineHandle;\n\nclass DiffStart extends DiffLineHandle\n{\n\n public function handle...
php
chosen
[ { "from": "system", "value": "Remove include header from entry view\n" }, { "from": "human", "value": "@extends('admin.layout.master')\n\n@section('content')\n @include('admin.layout.header')\n <table class=\"table table-hover\">\n <thead>\n <tr>\n <th>Crea...
php
chosen
[ { "from": "system", "value": "Fix user query not being returned in getBy\n\nJWTAuth::toUser($token) was not returning a User" }, { "from": "human", "value": "<?php\n\nnamespace Tymon\\JWTAuth\\Providers\\User;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass EloquentUserAdapter implements ...
php
chosen
[ { "from": "system", "value": "Raise an error in __get()\n" }, { "from": "human", "value": "<?php\n\nnamespace WPMissing;\n\nclass Post {\n function __construct($id) {\n $this->_post = get_post($id);\n $this->id = (int)$this->_post->ID;\n }\n\n function __get($name) {\n switch ($name)...
php
chosen
[ { "from": "system", "value": "Change getGenerator method protected to public\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": "system", "value": "Add an example on how to specify default parameters\n\n" }, { "from": "human", "value": "<?php\n\nreturn [\n // Source filesystem\n 'source' => new League\\Flysystem\\Filesystem(new League\\Flysystem\\Adapter\\Local(storage_path('files'))),\n // Cache fil...
php
chosen
[ { "from": "system", "value": "Remove redundant functionality, replaced by default Laravel 5.4 middleware\n" }, { "from": "human", "value": "<?php\n\n/*\n * NOTICE OF LICENSE\n *\n * Part of the Rinvex Support Package.\n *\n * This source file is subject to The MIT License (MIT)\n * that is bundl...
php
chosen
[ { "from": "system", "value": "Revert \"Revert \"I don't know what changed\"\"\n\nThis reverts commit e36c6107647bed4008f46f0ae91fd747b47b29ea.\n" }, { "from": "human", "value": "<?php get_template_part('templates/head'); ?>\n<body <?php body_class(); ?>>\n\n <!--[if lt IE 8]>\n <div class=\"...
php
chosen
[ { "from": "system", "value": "Fix typo on constructor in blizzard checker class\n" }, { "from": "human", "value": "<?php\n\nnamespace BNETDocs\\Libraries;\n\nuse \\CarlBennett\\MVC\\Libraries\\Common as CommonMVCLib;\nuse \\CarlBennett\\MVC\\Libraries\\IP;\n\nclass BlizzardChecker {\n\n /**\n ...
php
chosen
[ { "from": "system", "value": "Create new database column to store avatar location.\n" }, { "from": "human", "value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m150720_012512_create_table_account extends Migration\n{\n public function up()\n {\n $this->createTa...
php
chosen
[ { "from": "system", "value": "Add roadmap link to Learn page\n\nAdded under \"For Development\" below the Source Code link. \r\nRoad icon (http://fontawesome.io/icon/road/)\r\n\r\nFeel free to suggest putting this somewhere else" }, { "from": "human", "value": "<?php /*\n<div class=\"spacer1\">\...
php
chosen
[ { "from": "system", "value": "Fix bug with exists property\n" }, { "from": "human", "value": "<?php namespace ThibaudDauce\\MoloquentInheritance;\n\nuse ReflectionClass;\n\ntrait MoloquentInheritanceTrait {\n\n public $parentClasses;\n\n /**\n * Boot the moloquent inheritance for a mod...
php
chosen
[ { "from": "system", "value": "Add 'license-name' matching SPDX conventions\n\nReferences:\nhttp://spdx.org/licenses/\nhttps://www.mediawiki.org/wiki/Manual:$wgExtensionCredits#license-name\n\nChange-Id: I6f221c46d1e2746b8882ca57b040743dfb4ca0c1\n" }, { "from": "human", "value": "<?php\n/**\n * ...
php
chosen
[ { "from": "system", "value": "Make config a global variable\n" }, { "from": "human", "value": "<?php\n class ImageController {\n public static function create( $image ) {\n include_once 'models/image.php';\n include_once 'models/extentions.php';\n if ( ...
php
chosen
[ { "from": "system", "value": "Replace expect with native matchers in StateT\n" }, { "from": "human", "value": "<?php\n\nnamespace spec\\Md\\Phunkie\\Cats;\n\nuse Md\\Phunkie\\Cats\\StateT;\nuse function Md\\Phunkie\\Functions\\state\\put;\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\n\...
php
chosen
[ { "from": "system", "value": "FIX Assert elemental areas exist before calling methods on them\n" }, { "from": "human", "value": "<?php\n\nnamespace DNADesign\\Elemental\\GraphQL;\n\nuse DNADesign\\Elemental\\Models\\ElementalArea;\nuse GraphQL\\Type\\Definition\\ResolveInfo;\nuse SilverStripe\\G...
php
chosen
[ { "from": "system", "value": "Add comments to the API controller.\n" }, { "from": "human", "value": "<?php\n\nnamespace Mo\\FlashCardsBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\HttpFoundation\\JsonResponse;\n\nclass ApiController...
php
chosen
[ { "from": "system", "value": "Add location field in relation between course and period\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateCoursePeriod...
php
chosen
[ { "from": "system", "value": "Revert \"Enable abstract plugin class.\"\n\nThis reverts commit 053396dbcf45085ed2380514f0f66e0ba2e059ab.\n" }, { "from": "human", "value": "<?php\n/**\n * Lithium: the most rad php framework\n *\n * @copyright Copyright 2009, Union of RAD (http://union-of-rad.o...
php
chosen
[ { "from": "system", "value": "Improve password hashing store in registration\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Controllers;\n\nclass AuthController\n{\n public function login()\n {\n var_dump(input());\n return $input;\n }\n\n public function re...
php
chosen
[ { "from": "system", "value": "Move redirect setting to correct location.\n" }, { "from": "human", "value": "<?php\n/**\n * Application Settings\n * @author John Kloor <kloor@bgsu.edu>\n * @copyright 2017 Bowling Green State University Libraries\n * @license MIT\n */\n\nuse Symfony\\Component\\Ya...
php
chosen
[ { "from": "system", "value": "Reduce who to follow image size\n" }, { "from": "human", "value": "<div class=\"bg-white p-3 mb-3\">\n <h5>Who to follow</h5>\n @if (count($follow_suggestions))\n @foreach ($follow_suggestions as $follow_suggestion)\n <div class=\"media\">\n ...
php
chosen
[ { "from": "system", "value": "[saturn] Increase time for gamma spectrum command\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Sharp\\Commands;\n\nuse Code16\\Sharp\\EntityList\\Commands\\EntityCommand;\nuse Code16\\Sharp\\EntityList\\EntityListQueryParams;\n\nclass SpaceshipSynchron...
php
chosen
[ { "from": "system", "value": "Implement addition of the root nodes of the Nested Set.\n" }, { "from": "human", "value": "<?php\n\nnamespace common\\models\\comments;\n\nuse yii\\base\\Exception;\n\nclass NestedSetComment extends Comment\n{\n /**\n * @inheritdoc\n */\n public static...
php
chosen
[ { "from": "system", "value": "Allow the \"crash early\" behavior of snippets to be configured\n\nThis way it can be turned off in testing environment, making testing\nsetup simpler.\n" }, { "from": "human", "value": "<?php\n/**\n * Garp_Model_Db_Snippet\n * Snippet model. Snippets are small dyna...
php
chosen
[ { "from": "system", "value": "FIX Only apply theme settings if theme == ssau-minimalist\n" }, { "from": "human", "value": "<?php\n\n/**\n * \n *\n * @author <marcus@silverstripe.com.au>\n * @license BSD License http://www.silverstripe.org/bsd-license\n */\nclass PageControllerThemeExtension exte...
php
chosen
[ { "from": "system", "value": "Rewrite Connection test to use mocking\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Yodler package.\n *\n * (c) aes3xs <aes3xs@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was...
php
chosen
[ { "from": "system", "value": "Convert existing home page to use master template\n" }, { "from": "human", "value": "<!DOCTYPE html>\n<html>\n <head>\n <title>Laravel</title>\n\n <link href=\"//fonts.googleapis.com/css?family=Lato:300\" rel=\"stylesheet\" type=\"text/css\">\n\n ...
php
chosen
[ { "from": "system", "value": "Remove the extra setNotModified function call.\n\nSigned-off-by: Hunter Skrasek <6e2f9e6111e77edd0c446ea7a84e25323d137a61@perk.com>\n" }, { "from": "human", "value": "<?php namespace Aranw\\ETagsMiddleware;\n\nuse Symfony\\Component\\HttpKernel\\HttpKernelInterface;...
php
chosen
[ { "from": "system", "value": "Add optional selector argument support.\n" }, { "from": "human", "value": "<?php\n\nnamespace ProcessWire\\GraphQL\\Field\\Page;\n\nuse Youshido\\GraphQL\\Field\\AbstractField;\nuse Youshido\\GraphQL\\Execution\\ResolveInfo;\nuse Youshido\\GraphQL\\Type\\NonNullType...
php
chosen
[ { "from": "system", "value": "[Fix] Set the middleware to redirect to an url instead of the removed route\n" }, { "from": "human", "value": "<?php namespace TecBeast\\PreLaunch\\Middleware;\n\nuse Closure;\n\nclass AppIsInPrelaunch {\n\n\t/**\n\t * Redirects the user to the prelaunch route if th...
php
chosen
[ { "from": "system", "value": "Validate URI in project config schema\n" }, { "from": "human", "value": "<?php\n\nnamespace Drubo\\Config\\Project;\n\nuse Drubo\\Config\\ConfigSchema;\nuse Drubo\\DruboAwareInterface;\nuse Drubo\\DruboAwareTrait;\nuse Symfony\\Component\\Config\\Definition\\Builder...
php
chosen
[ { "from": "system", "value": "Fix return type of TO_DAYS function. Should be int.\n" }, { "from": "human", "value": "<?php\n\nnamespace Vectorface\\MySQLite\\MySQL;\n\n/**\n * Provides Date and Time MySQL compatibility functions for SQLite.\n *\n * http://dev.mysql.com/doc/refman/5.7/en/date-and...
php
chosen
[ { "from": "system", "value": "Use IpUtils to check for local addresses" }, { "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 l...
php
chosen
[ { "from": "system", "value": "Change populate method to allow limit to be null and take an extra array of filters.\n" }, { "from": "human", "value": "<?php\n\nnamespace Plummer\\Calendarful\\Calendar;\n\nuse Plummer\\Calendarful\\RegistryInterface;\n\ninterface CalendarInterface\n{\n\tpublic fun...
php
chosen
[ { "from": "system", "value": "Support hostname argument on hosts defined in inventory.yml\n" }, { "from": "human", "value": "<?php\n\nnamespace Droid\\Loader;\n\nuse Symfony\\Component\\Yaml\\Parser as YamlParser;\nuse Droid\\Model\\Inventory;\nuse Droid\\Model\\Host;\nuse Droid\\Model\\HostGrou...
php
chosen
[ { "from": "system", "value": "Add support for Laravel Lumen framework\n\n" }, { "from": "human", "value": "<?php\n\nnamespace Naughtonium\\LaravelDarkSky;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass LaravelDarkSkyServiceProvider extends ServiceProvider\n{\n /**\n * Perform post-...
php
chosen
[ { "from": "system", "value": "Fix inline and reply keyboard creation\n" }, { "from": "human", "value": "<?php\n\nnamespace Telegram\\Bot\\Objects\\Keyboard;\n\nuse Illuminate\\Support\\Str;\nuse JsonSerializable;\n\nabstract class BaseKeyboard implements JsonSerializable\n{\n protected $items...
php
chosen
[ { "from": "system", "value": "Return API error during parse, since it's being sent by the remote server\n" }, { "from": "human", "value": "<?php\n\nnamespace BitWasp\\Stratum\\Request;\n\nuse BitWasp\\Stratum\\Exception\\ApiError;\n\nclass RequestFactory\n{\n /**\n * @var array\n */\n...
php
chosen
[ { "from": "system", "value": "Define constants, and drop DB each test setup\n" }, { "from": "human", "value": "<?php\n\nnamespace Criterion\\Test;\n\nclass TestCase extends \\PHPUnit_Framework_TestCase\n{\n\n public function setUp()\n {\n putenv('APP_ENV=testing');\n }\n\n}\n" ...
php
chosen
[ { "from": "system", "value": "[FIX] Use singular form for 1 day, hour, minute, or second\n\ngit-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@35434 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "human", "value": "<?php\n// (c) Copyright 2002-2011 by authors of the Tiki Wiki CMS Groupwa...
php
chosen
[ { "from": "system", "value": "Convert message check to regex\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace WRS\\Tests\\Storage;\n\nuse PHPUnit\\Framework\\TestCase;\n\nuse WRS\\Storage\\NullStorage;\n\nclass NullStorageTest extends TestCase\n{\n const KEY =...
php
chosen
[ { "from": "system", "value": "Revert \"Use __CLASS__ for option name\"\n\nThis reverts commit 803a3909605915d4ca20ba9a82e100267024bcca.\n" }, { "from": "human", "value": "<?php\n\nabstract class CM_Provision_Script_OptionBased extends CM_Provision_Script_Abstract implements CM_Typed {\n\n use...
php
chosen
[ { "from": "system", "value": "Update wrong path in CAuthenticator\n" }, { "from": "human", "value": "<?php\nnamespace Jofe\\Blackgate;\n\nclass CAuthenticatorTest extends \\PHPUnit_Framework_TestCase\n{\n\tpublic function testApply(){\n\n\t\t$options = new \\Jofe\\BlackGate\\COptions();\n\t\t$el...
php
chosen
[ { "from": "system", "value": "Add another case to delete\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\n/*\n * This file is part of the Sonata Project package.\n *\n * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>\n *\n * For the full copyright and license informa...
php
chosen
[ { "from": "system", "value": "Remove full stop from MU plugins loader name" }, { "from": "human", "value": "<?php declare(strict_types=1);\n/**\n * Plugin Name: WP Starter MU plugins loader.\n * Description: MU plugins loaded: {{{MU_PLUGINS_LIST}}}.\n */\n\nforeach (explode(',', '{{{MU_PLUGINS_L...
php
chosen
[ { "from": "system", "value": "Add Pdo db config tests\n" }, { "from": "human", "value": "<?php\nnamespace ACache\\Tests;\n\nuse PDO;\nuse ACache\\PdoCache;\n\n/**\n * PdoCache tests.\n */\nclass PdoCacheTest extends NamespaceCacheTest\n{\n\n /**\n * Cache provider.\n */\n public fu...
php
chosen
[ { "from": "system", "value": "Test User model password functions\n" }, { "from": "human", "value": "<?php\n\nnamespace Criterion\\Test\\Model;\n\nclass UserModelTest extends \\Criterion\\Test\\TestCase\n{\n\n public function testInit()\n {\n $user = new \\Criterion\\Model\\User();\n...
php
chosen
[ { "from": "system", "value": "Use Laravel base controller in example\n" }, { "from": "human", "value": "<?php\n\n// Add the ServiceProvider\n\n// Create the oauth-providers config file\n\n// Create a route:\n\nRoute::get('login/{provider}', ['uses' => 'SocialController@login']);\n\n// Create a c...
php
chosen
[ { "from": "system", "value": "Add front-page.twig to Twig template hierarchy\n" }, { "from": "human", "value": "<?php\n/**\n * The main template file\n * This is the most generic template file in a WordPress theme\n * and one of the two required files for a theme (the other being style.css).\n *...
php
chosen
[ { "from": "system", "value": "Exclude some wide categories for faster generation\n" }, { "from": "human", "value": "<?php\n get_header();\n\n if (have_posts()) {\n while (have_posts()) {\n the_post();\n?>\n <div class=\"blogPost\">\n <?php the_content(); ?>\n\n<?php\n if (...
php
chosen
[ { "from": "system", "value": "Return empty response on login page.\n" }, { "from": "human", "value": "<?php\n\nnamespace Lucianux\\SpaBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\H...
php
chosen
[ { "from": "system", "value": "Remove closing PHP tag from end of file\n" }, { "from": "human", "value": "<?php\n\n//require_once( config_get( 'plugin_path' ) . 'SourceGithub/SourceGithub.php' );\n\nauth_reauthenticate();\n\nlayout_page_header( plugin_lang_get( 'title' ) );\nlayout_page_begin();\...
php
chosen
[ { "from": "system", "value": "Revert \"Simplify queue draining code\"\n\nThis reverts commit 173d8f9af5fb32e2b7b2763a6aa8867c2236450e.\n\nNote: The task must be kept on the queue until after it is called.\nOtherwise drain() will be called recursively.\n" }, { "from": "human", "value": "<?php\n\n...
php
chosen
[ { "from": "system", "value": "Make the email code a string\n" }, { "from": "human", "value": "<?php\n\nnamespace Scheb\\TwoFactorBundle\\Model\\Email;\n\ninterface TwoFactorInterface\n{\n /**\n * Return true if the user should do two-factor authentication.\n *\n * @return bool\n ...
php
chosen
[ { "from": "system", "value": "Hide splash when needed (when running install)\n" }, { "from": "human", "value": "<?php\n\nnamespace Bluora\\LaravelDatasets\\Traits;\n\ntrait CommandTrait\n{\n public function splash($text)\n {\n $this->line('');\n $this->line(' ___ _ ...
php
chosen
[ { "from": "system", "value": "Remove autowiring deprecation warning\nthis remove deprecation message (`Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead.`)\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the OverblogGraphQLB...
php
chosen
[ { "from": "system", "value": "Fix issue when password is not present in post\n" }, { "from": "human", "value": "<?php namespace Anomaly\\UsersModule\\User\\Form;\n\nuse Anomaly\\Streams\\Platform\\Ui\\Form\\Form;\nuse Anomaly\\Streams\\Platform\\Ui\\Form\\FormBuilder;\nuse Illuminate\\Http\\Requ...
php
chosen
[ { "from": "system", "value": "Check whether the style's cover photo exists during upgrade to 5.4\n" }, { "from": "human", "value": "<?php\n\n/**\n * Generates the WebP variant for cover photos of styles.\n *\n * @author Alexander Ebert\n * @copyright 2001-2021 WoltLab GmbH\n * @license GNU Lesse...
php
chosen
[ { "from": "system", "value": "Fix style and merge from pkakelas\n" }, { "from": "human", "value": "<?php\n class Country extends ActiveRecordBase {\n public $name;\n public $id;\n public $shortname;\n protected $tableName = 'countries';\n\n public static fun...
php
chosen
[ { "from": "system", "value": "Add descriptive comment to ob_start function in email-subject macro" }, { "from": "human", "value": "<?php\n\nnamespace App\\Helpers\\Emails;\n\nuse Latte;\nuse Latte\\MacroNode;\nuse Latte\\Macros\\MacroSet;\n\nclass EmailSubject {\n\n /**\n * Holds last scraped...
php
chosen
[ { "from": "system", "value": "Use <aside> rather than <div>\n\nSo all page content is within landmarks.\n\nResolves: https://trello.com/c/ZpypHwAa/526-fix-banner-styling\n" }, { "from": "human", "value": "<?php\n$showBannerOnNetwork = get_site_option('banner_setting');\n$showBannerBySite = get_f...
php
chosen