conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Solve compatibility issues and more.\n\nAdded best practice for relative filepaths." }, { "from": "human", "value": "\n<?php readfile('template/header.php'); ?>\n<?php readfile('template/analytics.php'); ?> \n <div class=\"container\">\n\n <main role=\"main\"...
php
chosen
[ { "from": "system", "value": "Tweak example client for new board format\n" }, { "from": "human", "value": "<?\n $board = json_decode($_POST['board']);\n\n if($_POST['player'] == 2) {\n foreach($board as $x => $col) {\n foreach($col as $y => $cell) {\n if($c...
php
chosen
[ { "from": "system", "value": "Throw error if APC extension is not loaded\n" }, { "from": "human", "value": "<?php\nnamespace F3\\AppNexusClient;\n\n/**\n * ApcTokenStorage\n *\n * @uses TokenStorage\n * @package\n * @version $id$\n * @copyright Federico Nicolás Motta\n * @author Federico Nicolás...
php
chosen
[ { "from": "system", "value": "Make front + admin test\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Tests\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\n\nclass DefaultControllerTest extends WebTestCase\n{\n public function testIndex()\n {\n ...
php
chosen
[ { "from": "system", "value": "Change copies to be centered at the bottom.\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace BlockHorizons\\BlockSniper\\cloning\\types;\n\nuse BlockHorizons\\BlockSniper\\brush\\BaseShape;\nuse BlockHorizons\\BlockSniper\\cloning\\B...
php
chosen
[ { "from": "system", "value": "Check that bound data is object before checking if property is defined\n" }, { "from": "human", "value": "<?php\n\nnamespace AdamWathan\\Form\\Binding;\n\nclass BoundData\n{\n protected $data;\n\n public function __construct($data)\n {\n $this->data ...
php
chosen
[ { "from": "system", "value": "Update name from singleword to Name of App\n" }, { "from": "human", "value": "<?php\n\nnamespace FeatureBrowser\\FeatureBrowser;\n\nuse FeatureBrowser\\FeatureBrowser\\Cli\\Application;\n\n/**\n * Class ApplicationFactory\n *\n * @package FeatureBrowser\n */\nfinal ...
php
chosen
[ { "from": "system", "value": "Fix when to insert extra padding\n" }, { "from": "human", "value": "<?php\nnamespace HomoChecker\\View;\n\nclass ServerSentEventView implements ViewInterface {\n public $event;\n\n public function __construct($event) {\n $this->event = $event;\n\n ...
php
chosen
[ { "from": "system", "value": "Add Model::transform() for simple transformer support.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Model;\n\nuse Closure;\nuse Illuminate\\Database\\Eloquent\\Model;\n...
php
chosen
[ { "from": "system", "value": "Use pretty page formatter for whoops component\n" }, { "from": "human", "value": "<?php\n\n/**\n * Init application\n */\n\n$app = new Mosaic\\Cement\\Application(\n realpath(__DIR__ . '/../')\n);\n\n$app->components(\n Mosaic\\Exceptions\\Component::whoops(),...
php
chosen
[ { "from": "system", "value": "[fp/43524][FIX] Fix to default to global if null\n\ngit-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@43566 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "human", "value": "<?php\n// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Projec...
php
chosen
[ { "from": "system", "value": "Add annotation through IdeHelper run\n" }, { "from": "human", "value": "<?php\n/**\n * @var RouteBuilder $routes\n */\n\nuse Cake\\Routing\\RouteBuilder;\n\n$routes->prefix('Admin', function (RouteBuilder $routes) {\n\t$routes->plugin('Queue', function (RouteBuilder...
php
chosen
[ { "from": "system", "value": "Fix if no profiles are found\n" }, { "from": "human", "value": "@extends('partials.content-area')\n\n@section('content')\n <h1 class=\"page-title\">{{ $page['title'] }}</h1>\n\n {!! $page['content']['main'] !!}\n\n @foreach($profiles as $key => $profiles)\n...
php
chosen
[ { "from": "system", "value": "Fix site name in index\n" }, { "from": "human", "value": "@extends('layouts.master')\n\n@section('title', 'uPste')\n\n@section('content')\n <div class=\"container-sm text-center jumbotron\">\n <p>{{ config('upste.domain') }} is a private file hosting websi...
php
chosen
[ { "from": "system", "value": "Make createLangualKey and isLangualKey private\n" }, { "from": "human", "value": "<?php\n\nnamespace ContentTranslator\\Entity;\n\nabstract class Translate\n{\n protected $lang;\n protected $db;\n\n public function __construct()\n {\n global $wpdb...
php
chosen
[ { "from": "system", "value": "Add bootstrap code for slack oauth\n" }, { "from": "human", "value": "<?php\n\nvar_dump($_ENV);\n" }, { "from": "gpt", "value": "<?php\n\nif (empty($_ENV['SLACK_CLIENT_SECRET']) || empty($_ENV['SLACK_CLIENT_ID'])) {\n die('Missing env. variables, abor...
php
chosen
[ { "from": "system", "value": "Improve output messages for backup:monitor command" }, { "from": "human", "value": "<?php\n\nnamespace Spatie\\Backup\\Commands;\n\nuse Spatie\\Backup\\Events\\HealthyBackupWasFound;\nuse Spatie\\Backup\\Events\\UnhealthyBackupWasFound;\nuse Spatie\\Backup\\Tasks\\M...
php
chosen
[ { "from": "system", "value": "Set up better merge method with default values\n" }, { "from": "human", "value": "<?php\n\nnamespace ThemeKeeper\\DI;\n\nuse Nette\\DI\\CompilerExtension;\nuse ThemeKeeper\\Theme\\Theme;\nuse UrlMatcher\\Utils\\Arrays;\n\n\n/**\n * Class ThemeKeeperExtension\n *\n *...
php
chosen
[ { "from": "system", "value": "Enhance view with button to next setup: vacancies" }, { "from": "human", "value": "@extends('app')\n\n@section('content')\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-md-10 col-md-offset-1\">\n\n <div class=\"panel panel-d...
php
chosen
[ { "from": "system", "value": "Remove pjax from index page\n" }, { "from": "human", "value": "<?php class _Common_PageCode extends PageCode {\npublic function go($api, $dom, $template, $tool) {\n\t$main = $dom[\"body > main\"];\n\tif($main->hasAttribute(\"data-title\")) {\n\t\t$dom[\"body > heade...
php
chosen
[ { "from": "system", "value": "Set metric values on for testing.\n" }, { "from": "human", "value": "<?php\n\n$databaseAddress = '127.0.0.1';\n$databaseUsername = 'root';\n$databasePassword = 'tiger';\n\n$useMetricAndCelsiusMeasurements = false;\n\n?>" }, { "from": "gpt", "value": "<?p...
php
chosen
[ { "from": "system", "value": "Add .txt format, not because it's useful, but because the previous formatter was broken and now we have something to test.\n" }, { "from": "human", "value": "<?php\n\nnamespace CatLab\\Charon\\Laravel\\Middleware;\n\nuse CatLab\\Charon\\Laravel\\Models\\ResourceResp...
php
chosen
[ { "from": "system", "value": "Throw Omnipay NotFound in case resource not found on gateway\n" }, { "from": "human", "value": "<?php\n\nnamespace Omnipay\\Braintree\\Message;\n\nuse Braintree\\Exception\\NotFound;\nuse Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException;\n\n/**\n * F...
php
chosen
[ { "from": "system", "value": "BAP-1626: Customize multi-step setup forms\n- removed \"session.handler.pdo\" from installation\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\InstallerBundle\\Process\\Step;\n\nuse Sylius\\Bundle\\FlowBundle\\Process\\Context\\ProcessContextInte...
php
chosen
[ { "from": "system", "value": "Update QuestController in general and add Quest GET call\n" }, { "from": "human", "value": "<?php\nnamespace QuestServer\\ApiBundle\\Controller;\n\nuse FOS\\RestBundle\\Controller\\FOSRestController;\nuse Nelmio\\ApiDocBundle\\Annotation\\ApiDoc;\n\nclass QuestsCont...
php
chosen
[ { "from": "system", "value": "Fix class exception not found'\n" }, { "from": "human", "value": "<?php\nnamespace Routeria;\nuse Symfony\\Component\\HttpFoundation\\Request;\n\nclass Dispatcher implements DispatcherInterface\n{\n\tprivate $router;\n\n\tpublic function __construct(RouterInterface ...
php
chosen
[ { "from": "system", "value": "Revert \"added a simple change\"\n\nThis reverts commit 99a591c9704643857ec240f2171b5e415656cd48.\n" }, { "from": "human", "value": "<?php\n// change\nValidator::extend('alpha_space', function ($attribute,$value,$parameters) {\n return preg_match(\"/^[\\s\\n\\-+:...
php
chosen
[ { "from": "system", "value": "Add cellNumber as alias for en_GB mobileNumber method\n" }, { "from": "human", "value": "<?php\n\nnamespace Faker\\Provider\\en_GB;\n\nclass PhoneNumber extends \\Faker\\Provider\\PhoneNumber\n{\n protected static $formats = array(\n '+44(0)##########',\n ...
php
chosen
[ { "from": "system", "value": "Allow behaviors to be placed outside extensions.\n" }, { "from": "human", "value": "<?php\n/**\n * Lithium: the most rad php framework\n *\n * @copyright Copyright 2010, Union of RAD (http://union-of-rad.org)\n * @license http://opensource.org/licenses/bsd...
php
chosen
[ { "from": "system", "value": "Add pending() scope to pitch model\n" }, { "from": "human", "value": "<?php\n\nclass Pitch extends Eloquent {\n\n\tprotected $table = 'pitches';\n\n\tprotected $fillable = ['name', 'email', 'blurb'];\n\t/**\n\t * Class constants\n\t */\n\tconst UNSEEN = 10;\n\tco...
php
chosen
[ { "from": "system", "value": "Fix dupe document ID exception handling\n" }, { "from": "human", "value": "<?php\n\nnamespace Sajari\\Engine\\Exception;\n\nuse Sajari\\Common\\Exception\\NamespaceExceptionFactory as BaseNamespaceExceptionFactory;\nuse Guzzle\\Http\\Message\\Response;\n\nclass Name...
php
chosen
[ { "from": "system", "value": "Add a missing (string) cast to repository.query\n\nSummary: The method returns a PhutilURI object, which json_encode() encodes as \"{}\" since all the properties are private.\n\nTest Plan:\nExamined the output of \"repository.query\" more carefully:\n\n \"0\" : {\n \"name\"...
php
chosen
[ { "from": "system", "value": "Reset path to smsd config file\n" }, { "from": "human", "value": "<?php\n\nreturn array(\n 'smstools3' => array(\n 'configPath' => '/opt/etc/smsd.conf'\n ),\n 'timezone' => 'UTC'\n);\n" }, { "from": "gpt", "value": "<?php\n\nreturn array...
php
chosen
[ { "from": "system", "value": "Update markup for survey link\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_field('show_banner', 'options');\nif ($showBa...
php
chosen
[ { "from": "system", "value": "Add fake HTTP_CLIENT_IP for command line use\n" }, { "from": "human", "value": "<?php\n// This is global bootstrap for autoloading\n\nnamespace Grav;\n\nuse Codeception\\Util\\Fixtures;\nuse Faker\\Factory;\n\n// Ensure vendor libraries exist\n$autoload = __DIR__ . ...
php
chosen
[ { "from": "system", "value": "Enable doctrine migrations bundle in kernel\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\HttpKernel\\Kernel;\nuse Symfony\\Component\\Config\\Loader\\LoaderInterface;\n\nclass AppKernel extends Kernel\n{\n public function registerBundles()\...
php
chosen
[ { "from": "system", "value": "Tidy up info a little for the PluginModule popup edit form\n\ngit-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@40393 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "human", "value": "<?php\n// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupwa...
php
chosen
[ { "from": "system", "value": "Use the full path for code coverage.\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\nchdir(__DIR__);\n\n$returnStatus = null;\npassthru('composer install --dev', $returnStatus);\nif ($returnStatus !== 0) {\n exit(1);\n}\n\nrequire 'vendor/autoload.p...
php
chosen
[ { "from": "system", "value": "Remove invalid test for Week period" }, { "from": "human", "value": "<?php\n\nnamespace DateRangerTest\\Period;\n\nuse DateRanger\\Period\\Week;\n\nfinal class WeekTest extends \\PHPUnit_Framework_TestCase\n{\n /** @test */\n public function validWeek()\n {...
php
chosen
[ { "from": "system", "value": "Fix unnecessary validation for a username field.\n" }, { "from": "human", "value": "<?php\n\nuse Laracasts\\Validation\\FormValidator;\n\nclass UserValidator extends FormValidator {\n\n /**\n * Validation rules for logging in.\n *\n * @var array\n */\n pro...
php
chosen
[ { "from": "system", "value": "Add comment regading DI usage\n" }, { "from": "human", "value": "<?php\n\nuse BigPipe\\Lib;\n\n/** @var Lib\\Pagelet $element */\n$element = new Lib\\Pagelet('footer', null, 30);\n\n// Adding styles to the head.\n$element->addCss(['pagelets/footer/css/style.css']);\...
php
chosen
[ { "from": "system", "value": "Use the partner's online resource document for the resource: Rhododendron Images from Curtis Botanical Magazine.\n" }, { "from": "human", "value": "<?php\nnamespace php_active_record;\n/* connector for Royal Botanic Garden Edinburgh: Rhododendron Images from Curtis ...
php
chosen
[ { "from": "system", "value": "Disable phpdoc_to_comment CS rule to avoid issues with Psalm annotations\n" }, { "from": "human", "value": "<?php\n\n/*\n * Additional rules or rules to override.\n * These rules will be added to default rules or will override them if the same key already exists.\n ...
php
chosen
[ { "from": "system", "value": "Remove no longer used route.\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Application Routes\n|--------------------------------------------------------------------------\n|\n| Here is ...
php
chosen
[ { "from": "system", "value": "Make feedback form use smtphost too\n" }, { "from": "human", "value": "<?php\n\n/**\n * Log the feedback information\n * The token can be traced to a student ID for feedback follow-up\n * The user agent can be used to debug front-end/visual bugs\n */\n\n// We can se...
php
chosen
[ { "from": "system", "value": "Fix unset type_options in list form_filters config" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace AlterPHP\\EasyAdminExtensionBundle\\Helper;\n\nuse Symfony\\Component\\Form\\FormFactory;\nuse Symfony\\Component\\Form\\FormInterface;...
php
chosen
[ { "from": "system", "value": "Fix LinkedIn - Member profile plugin\n" }, { "from": "human", "value": "<?php\n\nnamespace HostBox\\Components\\LinkedIn\\SocialPlugins;\n\n/**\n * Class MemberProfile\n * @package HostBox\\Components\\LinkedIn\\SocialPlugins\n *\n * @tagClass IN/MemberProfile\n */\...
php
chosen
[ { "from": "system", "value": "Fix incorrect function config call\n" }, { "from": "human", "value": "<?php\n\nnamespace Soy\\Codeception;\n\ntrait ConfigTrait\n{\n /**\n * @var Config\n */\n protected $config;\n\n /**\n * @return string\n */\n public function getBinary...
php
chosen
[ { "from": "system", "value": "Check if the category name is set before using it.\n" }, { "from": "human", "value": "<?php\nnamespace Product\\Model\\Mapper;\nuse Zend\\Stdlib\\Hydrator\\ClassMethods;\n/*\n * To change this template, choose Tools | Templates\n * and open the template in the edito...
php
chosen
[ { "from": "system", "value": "Add service name for replacement pattern registry\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the PcdxParameterEncryptionBundle package.\n *\n * (c) picodexter <https://picodexter.io/>\n *\n * For the full copyright and license informatio...
php
chosen
[ { "from": "system", "value": "Add warning about custom logout redirection\n" }, { "from": "human", "value": "<?php\n\nreturn [\n 'layout' => 'ui::layouts.public.full',\n 'captcha' => false,\n 'identifier' => 'email',\n 'login' => [\n 'implementation' => \\L...
php
chosen
[ { "from": "system", "value": "Change return type of getChildren to ArrayCollection" }, { "from": "human", "value": "<?php\n\nnamespace MovingImage\\Meta\\Interfaces;\n\ninterface ChannelInterface\n{\n public function getId(): int;\n\n public function getName(): string;\n\n public functi...
php
chosen
[ { "from": "system", "value": "Fix locales for windows and unix\n\nSigned-off-by: Josua Grawitter <c028c213ed5efcf30c3f4fc7361dbde0c893c5b7@greyage.org>\n" }, { "from": "human", "value": "<?php\n\nrequire_once('config.inc.php');\nrequire_once('misc.inc.php');\nrequire_once('db.inc.php');\nrequire...
php
chosen
[ { "from": "system", "value": "Fix obtaining current URL when using mod_rewrite\n" }, { "from": "human", "value": "<?php\r\n/**\r\n * Copyright 2016 The Ranger <ranger@risk.ee>\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in ...
php
chosen
[ { "from": "system", "value": "Correct which file to load\n" }, { "from": "human", "value": "<?php\n\n/**\n* Set the key paths we'll be using\n* ================================\n* Here we set the theme path, as well as routes to all our core assets.\n*/\n\ndefine('PUBLIC_THEME_PATH', parse_url(g...
php
chosen
[ { "from": "system", "value": "Introduce three to becom abstract methods to the translate entity for install, uninstall and isInstalled\n" }, { "from": "human", "value": "<?php\n\nnamespace ContentTranslator\\Entity;\n\nabstract class Translate\n{\n protected $lang;\n protected $db;\n\n ...
php
chosen
[ { "from": "system", "value": "Add namespace to database driver interface\n" }, { "from": "human", "value": "<?php\n\n interface IDriver\n {\n public function connect($host, $user, $password);\n public function database($name);\n public function query($sql);\n pu...
php
chosen
[ { "from": "system", "value": "Create Tasks on a tasklist\n" }, { "from": "human", "value": "<?php namespace Rossedman\\Teamwork;\n\nuse Rossedman\\Teamwork\\Traits\\RestfulTrait;\n\nclass Tasklist extends AbstractObject {\n\n protected $wrapper = 'todo-list';\n\n protected $endpoint = 't...
php
chosen
[ { "from": "system", "value": "Add default page for getSources\n" }, { "from": "human", "value": "<?php\n\nnamespace Politix\\PolitikportalBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\n// use Politix\\PolitikportalBundle\\Model;\n\n\nclass SourcesController...
php
chosen
[ { "from": "system", "value": "Return mailbox object, not name, for getMailboxes()" }, { "from": "human", "value": "<?php\n\nnamespace Ddeboer\\Imap;\n\n/**\n * A connection to an IMAP server that is authenticated for a user\n */\nclass Connection\n{\n protected $server;\n protected $resour...
php
chosen
[ { "from": "system", "value": "Add variant columns to the metas table\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateMetasTable extends Migration {\n\n /**\n * Run the migrations.\n ...
php
chosen
[ { "from": "system", "value": "Add valid_data to content interface\n" }, { "from": "human", "value": "<?php\n\nnamespace Isotop\\Cargo\\Contracts;\n\ninterface Content_Interface {\n\n\t/**\n\t * Get JSON string for content data.\n\t *\n\t * @return mixed\n\t */\n\tpublic function get_json();\n}\n...
php
chosen
[ { "from": "system", "value": "Update api adapt withErrors method\n" }, { "from": "human", "value": "<?php\n\n\nnamespace Nam\\Commander\\Exceptions;\n\nuse Illuminate\\Support\\MessageBag;\nuse RuntimeException;\n\n\n/**\n * Class CommandValidationException\n *\n * @author Nam Hoang Luu <nam@mb...
php
chosen
[ { "from": "system", "value": "Add title to uninstall page\n" }, { "from": "human", "value": "<?php\n namespace Page;\n\n class Uninstall\n {\n public function index()\n {\n $this->load->storeView('Uninstall');\n\n $this->load->layout('Fresh');\n ...
php
chosen
[ { "from": "system", "value": "Fix: Make test for sigterm more robust.\n" }, { "from": "human", "value": "<?php\n\n/**\n * PHP Version 5.3\n *\n * @copyright (c) 2015 brian ridley\n * @author brian ridley <ptlis@ptlis.net>\n * @license http://opensource.org/licenses/MIT MIT\n */\n\nnamespace ptli...
php
chosen
[ { "from": "system", "value": "Remove redundant links to add member and add photo\n" }, { "from": "human", "value": "<div class=\"row\">\n <div class=\"large-12 columns\">\n <h1>Welcome, <?=$currentUser->firstName()?></h1>\n <ul>\n <li><a href=\"?p=profile_edit\">Edit your name or bio...
php
chosen
[ { "from": "system", "value": "Remove unsetting of request flash session key\n\nNo need to unset it." }, { "from": "human", "value": "<?php\n/*\n * Lily, a web application library\n *\n * (c) Luke Morton <lukemorton.dev@gmail.com>\n *\n * For the full copyright and license information, please vie...
php
chosen
[ { "from": "system", "value": "Add missing guests login/register links for top navbar\n" }, { "from": "human", "value": "<!-- User Account: style can be found in dropdown.less -->\n<li class=\"dropdown\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n {{ Auth::use...
php
chosen
[ { "from": "system", "value": "Add test for module_path extension\n\n" }, { "from": "human", "value": "<?php\n\nnamespace Nwidart\\Modules\\Tests;\n\nuse Illuminate\\Support\\Str;\n\nclass HelpersTest extends BaseTestCase\n{\n /**\n * @var \\Illuminate\\Filesystem\\Filesystem\n */\n ...
php
chosen
[ { "from": "system", "value": "Fix incompatible return type declaration issue\n\nScrutinizer turned up this issue, since the declared return type in\n`UuidBuilderInterface` was of `Uuid` and we weren't properly importing\n`\\Ramsey\\Uuid\\Uuid` in a `use` statement.\n" }, { "from": "human", "valu...
php
chosen
[ { "from": "system", "value": "Remove mensagem de erro bem chata\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: eduardo\n * Date: 04/02/14\n * Time: 10:54\n */\n\nnamespace Cacic\\RelatorioBundle\\Menu;\n\nuse Knp\\Menu\\FactoryInterface;\nuse Symfony\\Component\...
php
chosen
[ { "from": "system", "value": "Add possibility to shuffle an associative array\n\nUsage: `{{ myArray | shuffle }}` will shuffle as usual (initial behaviour of the plugin); `{{ myArray | shuffle(true) }}` will preserve the keys of an associative array." }, { "from": "human", "value": "<?php\n\n/**...
php
chosen
[ { "from": "system", "value": "Remove commented code in examples\n" }, { "from": "human", "value": "<?php\nrequire_once __DIR__.'/../vendor/autoload.php';\n\n$transmission = new Transmission\\Transmission();\n$queue = $transmission->all();\n\necho \"Downloading to: {$transmission->getSession()->g...
php
chosen
[ { "from": "system", "value": "Fix wrong order of parameters and change json decode to json encode\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\API\\Edit;\n\n\nuse AppBundle\\API\\Webservice;\nuse AppBundle\\AppBundle;\nuse AppBundle\\Entity\\FennecUser;\nuse AppBundle\\Entity...
php
chosen
[ { "from": "system", "value": "Deploy on push, test 6\n" }, { "from": "human", "value": "<?php\n // Use in the \"Post-Receive URLs\" section of your GitHub repo.\n if ( $_POST['payload'] && false ) {\n file_put_contents('log/payload.txt', print_r($_POST['payload']), FILE_APPEND);\n\n...
php
chosen
[ { "from": "system", "value": "Set local debug to true.\n" }, { "from": "human", "value": "<?php\n\n// direct access protection\nif(!defined('KIRBY')) die('Direct access is not allowed');\n\n/* -----------------------------------------------------------------------------\nTroubleshooting\n-------...
php
chosen
[ { "from": "system", "value": "Allow adding arbitrary properties to the request class.\n" }, { "from": "human", "value": "<?php\nclass Wpup_Request {\n\t/** @var array */\n\tpublic $query = array();\n\t/** @var string */\n\tpublic $action;\n\t/** @var string */\n\tpublic $slug;\n\t/** @var Wpup_P...
php
chosen
[ { "from": "system", "value": "Add worker getter for queue runner\n" }, { "from": "human", "value": "<?php\n\nnamespace VGMdb\\Component\\Queue;\n\n/**\n * Runs the worker job loop.\n *\n * @author Gigablah <gigablah@vgmdb.net>\n */\nclass Runner\n{\n const INTERVAL = 10000;\n\n protected $...
php
chosen
[ { "from": "system", "value": "Allow shared container to store empty, but not null values.\n" }, { "from": "human", "value": "<?php\n/**\n *\n */\n\nnamespace Mvc5\\Resolver;\n\nuse RuntimeException;\n\ntrait Initializer\n{\n /**\n * @var array\n */\n protected $pending = [];\n\n ...
php
chosen
[ { "from": "system", "value": "Use provider() instead of extends()\n" }, { "from": "human", "value": "<?php namespace Analogue\\LaravelAuth;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse Illuminate\\Auth\\AuthManager;\n\nclass AnalogueAuthServiceProvider extends ServiceProvider {\n\n\t/**\n\t...
php
chosen
[ { "from": "system", "value": "Revert rewrite on example file\n" }, { "from": "human", "value": "<?php\n\nfunction helloWorld() {\n print \"hello world!\";\n $thing = true;\n $thingAgain = true;\n $thingTheThird = true;\n $otherThing = false;\n $another = false;\n $andAnother...
php
chosen
[ { "from": "system", "value": "Fix HTML email extraction regex\n" }, { "from": "human", "value": "<?php\n$subject = $this->email->getHeaderValue('Subject', '<Empty Subject>');\n$this->title($subject);\n?>\n<h1 class=\"heading\">\n <a href=\"<?= $this->escape()->attr($this->route('list')); ?>\"...
php
chosen
[ { "from": "system", "value": "Use FQCN constants instead of strings.\n" }, { "from": "human", "value": "<?php\n/**\n * @author Igor Nikolaev <igor.sv.n@gmail.com>\n * @copyright Copyright (c) 2015, Darvin Studio\n * @link https://www.darvin-studio.ru\n *\n * For the full copyright and li...
php
chosen
[ { "from": "system", "value": "Add test for factory UserIngameInfo and fix autoincrement\n" }, { "from": "human", "value": "<?php\n/**\n *\n * @author malinink\n */\n\nclass ModelsFactoriesTest extends TestCase\n{\n /**\n * Test User Factory\n *\n * @return void\n */\n publi...
php
chosen
[ { "from": "system", "value": "Check if the return content type is within the Accept header\n" }, { "from": "human", "value": "<?php\nnamespace Wave\\Framework\\External\\Phroute\\Filters\\After;\n\nuse Wave\\Framework\\Application\\Wave;\n\nclass Encoding\n{\n /**\n * Sets the content typ...
php
chosen
[ { "from": "system", "value": "Fix key length to work with mariadb\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass AppServiceProvider extends ServiceProvider\n{\n /**\n * Bootstrap any application services.\n *...
php
chosen
[ { "from": "system", "value": "Update to new DomPDF 7 interface.\n" }, { "from": "human", "value": "<?php\n\nnamespace Athens\\Core\\Renderer;\n\nuse Athens\\Core\\Writable\\WritableInterface;\nuse DOMPDF;\n\n/**\n * Class PDFRenderer\n *\n * @package Athens\\Core\\Renderer\n */\nclass PDFRendere...
php
chosen
[ { "from": "system", "value": "Remove non required method in interface\n" }, { "from": "human", "value": "<?php\nnamespace Burrow\\Tactician;\n\nuse League\\Tactician\\Plugins\\NamedCommand\\NamedCommand;\n\ninterface CommandSerializer\n{\n /**\n * @param NamedCommand $command\n * @ret...
php
chosen
[ { "from": "system", "value": "Add documentation for taxonomy webservice\n" }, { "from": "human", "value": "<?php\n\n/* \n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the edi...
php
chosen
[ { "from": "system", "value": "Set some Regexp related global variables\n\n- $&\n- $~\n" }, { "from": "human", "value": "<?php\n\nnamespace Phuby {\n class Regexp extends Object { }\n}\n\nnamespace Phuby\\Regexp {\n class ClassMethods {\n static function initialized($self) {\n ...
php
chosen
[ { "from": "system", "value": "Use Fileinfo's exist method rather than performing a file exist check manually" }, { "from": "human", "value": "<?php\nnamespace TheSeer\\phpDox\\Generator {\n\n use TheSeer\\fDOM\\fDOMDocument;\n use TheSeer\\phpDox\\Collector\\SourceFile;\n use TheSeer\\p...
php
chosen
[ { "from": "system", "value": "Change managerarea header app name to tenant name\n" }, { "from": "human", "value": "<header class=\"main-header\">\n <!-- Logo -->\n <a href=\"#\" class=\"logo\" data-toggle=\"push-menu\" role=\"button\">\n <!-- mini logo for sidebar mini 50x50 pixels ...
php
chosen
[ { "from": "system", "value": "Add more HTTP cache headers\n" }, { "from": "human", "value": "<?php\n\nnamespace Politix\\PolitikportalBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\n\n\nclass MainController extends Controller {\n \n public function get...
php
chosen
[ { "from": "system", "value": "Change env('APP_ENV') to $app->environment() to prevent .env reading again\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass AppServiceProvider extends ServiceProvider\n{\n /**\n * Boot...
php
chosen
[ { "from": "system", "value": "Check source type when raising an unrecognized source exception\n" }, { "from": "human", "value": "<?php\n\nnamespace Plank\\Mediable\\Exceptions\\MediaUpload;\n\nuse Plank\\Mediable\\Exceptions\\MediaUploadException;\n\nclass ConfigurationException extends MediaUpl...
php
chosen
[ { "from": "system", "value": "Fix admin controller routing bug\n\nSigned-off-by: JWhy <6a9f7c06e789f829524fd1a3a38b8c7d794c3a1f@jwhy.de>\n" }, { "from": "human", "value": "<div class=\"span2\">\n <div class=\"admin_button_cont\"><?php echo anchor('admin/items', 'Edit Item Database', array('clas...
php
chosen
[ { "from": "system", "value": "Use the new config system\n" }, { "from": "human", "value": "<?php\n\nnamespace Libs;\n\nclass Redirect\n{\n\tprotected $session;\n\t\n\tpublic function __construct(\\Libs\\interfaces\\SessionInterface $session)\n\t{\n\t\t$this->session = $session;\n\t}\n\t\n\tpubli...
php
chosen
[ { "from": "system", "value": "Remove dates of existence from bioghist\n" }, { "from": "human", "value": "\n<?php if (0 < count($creators)): ?>\n <?php foreach($events as $date): ?>\n <?php $creator = QubitActor::getById($date->actorId); ?>\n\n <?php if (($value = $creator->getHistory(arra...
php
chosen
[ { "from": "system", "value": "Fix deleting when not connected\n" }, { "from": "human", "value": "<?php\r\n\r\n// give the name of php file associated with routename\r\nfunction getPhpFile($routeName='') {\r\n\t// read global var $app\r\n\tglobal $app;\r\n\r\n\t// check if page exists in file\r\n...
php
chosen
[ { "from": "system", "value": "FIX: Add an extension point to the notify controller, to allow messages to be added\n" }, { "from": "human", "value": "<?php namespace Milkyway\\SS\\FlashMessage;\n\nuse Controller as Original;\n\nclass Controller extends Original\n{\n private static $allowed_act...
php
chosen