conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add script to master layout\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 <meta http-e...
php
chosen
[ { "from": "system", "value": "Allow merging of multiple arrays\n" }, { "from": "human", "value": "<?php\nnamespace Sandhje\\Spanner\\Adapter;\n\n/**\n *\n * @author Sandhje\n * \n */\nclass BaseAdapter\n{\n protected function mergeConfig($baseConfig, $environmentConfig)\n {\n ...
php
chosen
[ { "from": "system", "value": "Clean up router to defer to base router as much as possible.\n" }, { "from": "human", "value": "<?php\n\n\nnamespace RandomState\\LaravelApi\\Http\\Routing;\n\n\nuse Illuminate\\Contracts\\Routing\\Registrar;\nuse Illuminate\\Contracts\\Support\\Responsable;\nuse Ar...
php
chosen
[ { "from": "system", "value": "[ECS] Add general doc removal for thorws\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpCsFixer\\Fixer\\ClassNotation\\FinalInternalClassFixer;\nuse Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator;...
php
chosen
[ { "from": "system", "value": "Add notice if config.php is missing\n" }, { "from": "human", "value": "<?php\n/**\n * Gallery - A project for 'WPF - Moderne Webanwendungen' at\n * Cologne University of Applied Sciences.\n *\n * @author Dominik Schilling <dominik.schilling@smail.fh-koeln.de>\n *...
php
chosen
[ { "from": "system", "value": "Check if a Roleable already has the role before assigning it\n" }, { "from": "human", "value": "<?php namespace Digbang\\Security\\Roles;\n\nuse Doctrine\\Common\\Collections\\ArrayCollection;\n\ntrait RoleableTrait\n{\n\t/**\n\t * @type ArrayCollection\n\t */\n\tpr...
php
chosen
[ { "from": "system", "value": "Add unit test which use the mongodb session backend\n" }, { "from": "human", "value": "<?php\n\nuse \\photon\\config\\Container as Conf;\n\nclass SessionTest extends \\photon\\test\\TestCase\n{\n protected $conf;\n\n public function setup()\n {\n par...
php
chosen
[ { "from": "system", "value": "Remove need for tests autoloading\n" }, { "from": "human", "value": "<?php\n\ndefine('UNIT_TESTING', true);\ndefine('HEYSTACK_BASE_PATH', dirname(__DIR__));\ndefine('BASE_PATH', HEYSTACK_BASE_PATH);\n\nif (!file_exists(BASE_PATH . '/vendor/autoload.php')) {\n ech...
php
chosen
[ { "from": "system", "value": "Make it so routes can echo their output\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Core\\Routing;\n\nuse Concrete\\Core\\Http\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\HttpKernel\\Controller\\ArgumentRes...
php
chosen
[ { "from": "system", "value": "Add type check when exchanging an array\n" }, { "from": "human", "value": "<?php\nnamespace RDM\\Generics;\n\nclass TypedArrayObject extends \\ArrayObject\n{\n private $type;\n \n /**\n * {@inheritDoc}\n *\n * @param string $type The type of ele...
php
chosen
[ { "from": "system", "value": "Add getID to DBobject force support for LinkedObject.\n" }, { "from": "human", "value": "<?php\n\nnamespace wcatron\\CommonDBFramework;\n\nabstract class DBObject {\n\n /**\n * @var DB Class name for default DB class used.\n */\n protected static $dbCl...
php
chosen
[ { "from": "system", "value": "Add name to fixture facade.\n\nChanged the classname of the fixture facade so that it's now correctly\nnamed 'Fixture'.\n" }, { "from": "human", "value": "<?php namespace Codesleeve\\Fixture\\Facades;\n\nuse Illuminate\\Support\\Facades\\Facade;\n\nclass ClassName e...
php
chosen
[ { "from": "system", "value": "[Tests] Set a real path for PHPUNIT_WEBROOT as we can't realpath() yet" }, { "from": "human", "value": "<?php\n\n/*\n * Test bootstrapper. This leaves out all stuff registering services and\n * related to request dispatching.\n */\n\n// Define our install type\nif (...
php
chosen
[ { "from": "system", "value": "Remove spec for method MemberId::any, method was removed.\n" }, { "from": "human", "value": "<?php\n/**\n * PHP version 5.6\n *\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\nnamespace specs\\Ewallet\\Acco...
php
chosen
[ { "from": "system", "value": "Remove whitespace before and after link text\n" }, { "from": "human", "value": "<?php\ndeclare (strict_types = 1);\n\nnamespace GrottoPress\\Jentil\\Utilities\\ThemeMods;\n\nuse GrottoPress\\Jentil\\Jentil;\n\nclass Colophon extends AbstractThemeMod\n{\n /**\n ...
php
chosen
[ { "from": "system", "value": "Change the new line in file to match results from Avetmiss\n" }, { "from": "human", "value": "<?php namespace Avetmiss;\n\nuse Avetmiss\\Row;\n\n\nclass File\n{\n\n\tprotected $rows = array();\n\tprotected $time;\n\n\n\tpublic function __construct()\n\t{\n\t\t$this-...
php
chosen
[ { "from": "system", "value": "Add a filter for popular discussions\n" }, { "from": "human", "value": "<?php namespace App\\Filters;\n\nuse App\\Data\\User;\n\nclass DiscussionFilters extends Filters\n{\n\tprotected $filters = ['by'];\n\n\tprotected function by($username)\n\t{\n\t\t$user = User::...
php
chosen
[ { "from": "system", "value": "Fix whitespace at the end of the URL breaking routing\n" }, { "from": "human", "value": "<?php\n\n\trequire __DIR__.'/../includes/init.php';\n\n\tuse App\\RegExp;\n\tuse App\\HTTP;\n\tuse App\\Users;\n\tuse App\\CoreUtils;\n\n\t$permRedirectPattern = new RegExp('^\\...
php
chosen
[ { "from": "system", "value": "Add user_id field to budgets migration\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateBudgetsTable extends Migration...
php
chosen
[ { "from": "system", "value": "Make buttons of person links\n" }, { "from": "human", "value": "@extends('layouts.offcanvas')\n\n@section('sidebar')\n@endsection\n\n@section('main')\n<div id=\"tribe-details\">\n <h2>@lang(\"ui.about\")</h2>\n {{ link_to_action('FriendsController@getGoals', trans...
php
chosen
[ { "from": "system", "value": "Fix app event service provider contract\n" }, { "from": "human", "value": "<?php namespace App\\Providers;\n\nuse Illuminate\\Foundation\\Support\\Providers\\EventServiceProvider as ServiceProvider;\n\nclass EventServiceProvider extends ServiceProvider {\n\n\t/**\n\...
php
chosen
[ { "from": "system", "value": "Add missing call to txn_load()\n" }, { "from": "human", "value": "<?\ninclude '../scat.php';\ninclude '../lib/txn.php';\n\n$id= (int)$_REQUEST['txn'];\nif (!$id)\n die_jsonp(\"no transaction specified.\");\n\nif ($txn['paid']) {\n die_jsonp(\"This order is already...
php
chosen
[ { "from": "system", "value": "Add more detailed interop auth error message\n" }, { "from": "human", "value": "<?php\n\n// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.\n// See the LICENCE file in the repository root for full licence text.\...
php
chosen
[ { "from": "system", "value": "Add active class to current breadcrumb\n" }, { "from": "human", "value": "<?php namespace Coreplex\\Crumbs\\Renderers;\n\nuse Coreplex\\Crumbs\\Contracts\\Renderer as Contract;\nuse Coreplex\\Crumbs\\Contracts\\Container;\n\nclass Basic implements Contract {\n\n ...
php
chosen
[ { "from": "system", "value": "Fix for problems with some smarty installs\n" }, { "from": "human", "value": "<?\nfunction smarty_block_set($params, $content, &$smarty) {\n if (!empty($params[\"var\"])) {\n $mode = any($params[\"mode\"], \"set\");\n\n $realsmarty = ($smarty instanceof Smart...
php
chosen
[ { "from": "system", "value": "Fix problem edit_component not shown in list if invisible\n\nIt's done like with mail_editable.\n" }, { "from": "human", "value": "<?php\nclass Kwc_Editable_ComponentsModel extends Kwf_Model_Data_Abstract\n{\n public function __construct(array $config = array())\...
php
chosen
[ { "from": "system", "value": "Add return statement to site/index action\n" }, { "from": "human", "value": "<?php namespace app\\controllers;\n\nuse Yii;\nuse yii\\web\\Controller;\n\nclass SiteController extends Controller\n{\n public function actionIndex() {\n $this->render('index');\...
php
chosen
[ { "from": "system", "value": "Improve compatibility logic for the EventDispatcher\n" }, { "from": "human", "value": "<?php\n\nnamespace Codeception\\Event;\n\nuse Symfony\\Component\\EventDispatcher\\Event;\nuse Symfony\\Component\\EventDispatcher\\EventDispatcher;\nuse Symfony\\Component\\Event...
php
chosen
[ { "from": "system", "value": "Change auth.model to auth.providers.users.model in users function" }, { "from": "human", "value": "<?php\n\nnamespace App\\Models\\Access\\Role\\Traits\\Relationship;\n\n/**\n * Class RoleRelationship\n * @package App\\Models\\Access\\Role\\Traits\\Relationship\n */...
php
chosen
[ { "from": "system", "value": "Fix config path used to retreive wizard step services" }, { "from": "human", "value": "<?php\nnamespace Wizard\\Factory;\n\nuse Wizard\\StepPluginManager;\nuse Zend\\ServiceManager\\Config;\nuse Zend\\ServiceManager\\FactoryInterface;\nuse Zend\\ServiceManager\\Serv...
php
chosen
[ { "from": "system", "value": "CC-5781: Upgrade script for new storage quota implementation\n" }, { "from": "human", "value": "<?php\n\n// Define path to application directory\ndefined('APPLICATION_PATH')\n || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../../install_minimal/....
php
chosen
[ { "from": "system", "value": "Remove link constraint on media display block\n" }, { "from": "human", "value": "<?php\n\nnamespace OpenOrchestra\\MediaAdminBundle\\GenerateForm\\Strategies;\n\nuse OpenOrchestra\\Backoffice\\GenerateForm\\Strategies\\AbstractBlockStrategy;\nuse OpenOrchestra\\Mode...
php
chosen
[ { "from": "system", "value": "Fix style issues with previous commit\n" }, { "from": "human", "value": "<?php\n\nnamespace Illuminate\\Database\\Query\\Processors;\n\nuse Illuminate\\Database\\Query\\Builder;\n\nclass SqlServerProcessor extends Processor\n{\n /**\n * Process an \"insert ge...
php
chosen
[ { "from": "system", "value": "OEE-1016: Update lifetime sales value calculation\n- Fix issue with constant removal\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\CurrencyBundle\\Rounding;\n\nclass PriceRoundingService extends AbstractRoundingService\n{\n const DEFAULT_ROUN...
php
chosen
[ { "from": "system", "value": "Add cacheType to allow cache with keys.\n" }, { "from": "human", "value": "<?php namespace ProcessWire\\GraphQL\\Type;\n\nuse ProcessWire\\Template;\n\ntrait CacheTrait\n{\n private static $type;\n public static function type($options = null)\n {\n if ($option...
php
chosen
[ { "from": "system", "value": "Add TODO for stale-if-error caching\n" }, { "from": "human", "value": "<?php\n/**\n * Created by IntelliJ IDEA.\n * User: Kevin\n * Date: 07.06.2015\n * Time: 15:44\n */\n\nnamespace Kevinrob\\GuzzleCache;\n\n\nuse GuzzleHttp\\Promise\\Promise;\nuse Psr\\Http\\Messa...
php
chosen
[ { "from": "system", "value": "Update getHashidConnection to use getTable\n\nIf $table is not set on the model then we get the error\r\n\r\n```InvalidArgumentException with message 'Connection [table.] not configured.'```\r\n\r\nby using ```$model->getTable()``` will get a default from the model rather than ...
php
chosen
[ { "from": "system", "value": "Make sure headers can be children of blockquotes.\n" }, { "from": "human", "value": "<?php\n\nnamespace FluxBB\\Markdown\\Node;\n\nclass Blockquote extends Block implements NodeInterface, NodeAcceptorInterface\n{\n\n public function getType()\n {\n retu...
php
chosen
[ { "from": "system", "value": "Fix initialization errors if MapbenderDataSourceBundle is not registered in kernel\n" }, { "from": "human", "value": "<?php\nnamespace Mapbender\\DigitizerBundle;\n\nuse Mapbender\\CoreBundle\\Component\\MapbenderBundle;\nuse Symfony\\Component\\Config\\FileLocator;...
php
chosen
[ { "from": "system", "value": "Make header dashboard link go to the right place\n" }, { "from": "human", "value": "<nav class=\"nav has-shadow\">\n <div class=\"container is-fluid\">\n <div class=\"nav-left\">\n <a href=\"{{ route('helpdesk.dashboard.agent') }}\" class=\"nav-item is-tab ...
php
chosen
[ { "from": "system", "value": "Fix email value object after refactoring by Daniel Santamaria.\n" }, { "from": "human", "value": "<?php\n\nnamespace ValueObjects\\Internet;\n\nuse ValueObjects\\ValueObject;\n\n/**\n * Class Email\n * Value object that represents a mail address.\n * @package ValueO...
php
chosen
[ { "from": "system", "value": "Include next 15 minutes in 'next courses' block\n" }, { "from": "human", "value": "<?php\n\nnamespace Etu\\Core\\UserBundle\\Entity\\Repository;\n\nuse Doctrine\\ORM\\EntityRepository;\nuse Etu\\Core\\UserBundle\\Entity\\Course;\nuse Etu\\Core\\UserBundle\\Entity\\U...
php
chosen
[ { "from": "system", "value": "Use fopen r+ instead of rw to fix hhvm tests\n" }, { "from": "human", "value": "<?php\nnamespace ZBateson\\MailMimeParser;\n\nuse PHPUnit_Framework_TestCase;\n\n/**\n * Description of MailMimeParserTest\n *\n * @group MailMimeParser\n * @group Base\n * @covers ZBate...
php
chosen
[ { "from": "system", "value": "Move package registering to boot()\n" }, { "from": "human", "value": "<?php namespace Barryvdh\\Debugbar;\n\n\nclass ServiceProvider extends \\Illuminate\\Support\\ServiceProvider {\n\n /**\n * Indicates if loading of the provider is deferred.\n *\n *...
php
chosen
[ { "from": "system", "value": "Remove API key (and revoke it)\n" }, { "from": "human", "value": "<?php\n\nnamespace Asana;\n\nrequire dirname(__FILE__) . '/../vendor/autoload.php';\n\nuse Asana\\Client;\n\nconst ASANA_API_KEY = '5KuX5z.wySa0u7i9ag7tCVwLJktAbHvX';\n\n$client = Client::basicAuth(AS...
php
chosen
[ { "from": "system", "value": "Remove duplicate geometry read code from polygon\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Active Collab DatabaseStructure project.\n *\n * (c) A51 doo <info@activecollab.com>. All rights reserved.\n */\n\ndeclare(strict_types=1);\n...
php
chosen
[ { "from": "system", "value": "Fix a bug of undefinded variable" }, { "from": "human", "value": "<?php\n\nnamespace Vinala\\Kernel\\Process;\n\nuse Vinala\\Kernel\\Filesystem\\File;\n\n/**\n * Model class.\n */\nclass Model extends Process\n{\n public static function create($class, $table, $rt...
php
chosen
[ { "from": "system", "value": "Fix \"Illegal string offset\" problem on Mac OSX since $value returned string, not array\n" }, { "from": "human", "value": "<?php\nnamespace Linfo\\Laravel\\Models;\n\nuse Linfo\\Laravel\\Traits\\LinfoProcessedTrait;\n\nclass Linfo extends Model\n{\n use LinfoPro...
php
chosen
[ { "from": "system", "value": "Load POSTed signup data and check content\n" }, { "from": "human", "value": "<?php\ninclude ('functions.php');\n\nif ($_GET[\"action\"] == 'login') {\n $data = getPOSTData();\n print json_encode($data);\n}\n" }, { "from": "gpt", "value": "<?php\ninclud...
php
chosen
[ { "from": "system", "value": "Edit - Place CDN correctly\n\n" }, { "from": "human", "value": "<!DOCTYPE html>\n<html>\n <head>\n\n <meta charset=\"utf-8\" /> \n \n <title>Joutes</title>\n \n </head>\n <body>\n \n <header>\n\n </header>\n ...
php
chosen
[ { "from": "system", "value": "Add method to get all data\n" }, { "from": "human", "value": "<?php\nnamespace Avh\\DataHandler;\n\nclass DataHandler\n{\n protected $registry;\n\n /**\n * Class constructor\n *\n * @param AttributeBagInterface $registry\n */\n public functi...
php
chosen
[ { "from": "system", "value": "Include groups in user autocomplete\n" }, { "from": "human", "value": "<?php\n$RUNTIME_NOAPPS = true;\n\nrequire_once('../../../lib/base.php');\n\nif( !OC_USER::isLoggedIn()){\n\techo json_encode( array( \"status\" => \"error\", \"data\" => array( \"message\" => \"A...
php
chosen
[ { "from": "system", "value": "Set as FAILED when maxTries is set to 0\n\n" }, { "from": "human", "value": "<?php\n\nnamespace Imtigger\\LaravelJobStatus\\EventManagers;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Queue\\Events\\JobExceptionOccurred;\nuse Illuminate\\Queue\\Events\\JobFailed;\nuse Il...
php
chosen
[ { "from": "system", "value": "Fix path prefix on unix\n" }, { "from": "human", "value": "<?php\n\nnamespace Isaac\\Services\\Filesystem;\n\nuse League\\Flysystem\\Adapter\\Local;\n\n/**\n * A fork of the Local adapter that grants us permissions to any absolute path\n * instead of working with re...
php
chosen
[ { "from": "system", "value": "Set the soon-to-be URL on stevegrunwell.com for the plugin\n" }, { "from": "human", "value": "<?php\n/**\n * Plugin Name: Revision Strike\n * Plugin URI: https://stevegrunwell.com/revision-strike\n * Description: Periodically purge old post revisions via WP Cron.\n ...
php
chosen
[ { "from": "system", "value": "Change references for initial buttons\n" }, { "from": "human", "value": "<?php\n\nsession_start();\nif (isset($_SESSION['user_Id']) && $_SESSION['user_Id'] != 0) {\n header(\"Location: \" . $_POST[\"redirectUrl\"]);\n}\n\ninclude_once 'functions.php';\ncreateHead...
php
chosen
[ { "from": "system", "value": "Remove empty values in tags form item.\n" }, { "from": "human", "value": "<?php\r\nclass Tags_FormItem_Core extends FormItem {\r\n \r\n public $autocomplete_uri;\r\n \r\n \r\n protected function itemValue() {\r\n return array_filter(explode(\",\", parent::it...
php
chosen
[ { "from": "system", "value": "Fix issue with ejs devtools visibility on https websites\n" }, { "from": "human", "value": "<?php\n\nfunction phoxy_default_conf()\n{\n return\n [\n \"ip\" => $_SERVER['REMOTE_ADDR'],\n \"site\" => \"http://\".$_SERVER['HTTP_HOST'].\"/\",\n \"debug_api\" ...
php
chosen
[ { "from": "system", "value": "Use class_exists to correctly check for pre-existing header type\n" }, { "from": "human", "value": "<?php\n\nnamespace Versionable\\Prospect\\Header;\n\nuse Versionable\\Common\\Collection\\Map;\n\nclass Collection extends Map implements CollectionInterface\n{\n pu...
php
chosen
[ { "from": "system", "value": "Add publish/unpublish methods for post\n" }, { "from": "human", "value": "<?php\n\nnamespace LapaLabs\\BlogBundle\\Model;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * Class AbstractPost\n */\nabstract class AbstractPost implements CategoryPostInterface\n{\n /...
php
chosen
[ { "from": "system", "value": "Fix saving icons input icon\n" }, { "from": "human", "value": "<label class=\"col-sm-2 control-label\">{{ $input['label'] }}</label>\n<div class=\"col-sm-10\">\n\t<div class=\"input-group\">\n\t <span class=\"input-group-addon\"><i id=\"icon_selector_view\" style=\...
php
chosen
[ { "from": "system", "value": "Add 'open/close' option for Nikoswitch (used as Shutter)\n" }, { "from": "human", "value": "<?php\nnamespace Autohome\\Plugins\\Niko;\n\nclass SwitchPlugin extends NikoPlugin\n{\n protected $values = [\n 'on' => 1, '254' => 1,\n 'off' => 0, '255' =...
php
chosen
[ { "from": "system", "value": "Add make console task mock utility method\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\nuse Mockery as m;\n\n/**\n * Console Test\n *\n * Provides a few...
php
chosen
[ { "from": "system", "value": "Fix deprecated ZipCode validator methods calls\n" }, { "from": "human", "value": "<?php\n\nnamespace SLLH\\IsoCodesValidator\\Constraints;\n\nuse IsoCodes;\nuse SLLH\\IsoCodesValidator\\IsoCodesConstraintValidator;\nuse Symfony\\Component\\Validator\\Constraint;\n\n...
php
chosen
[ { "from": "system", "value": "Move <header> block to right place, derp\n" }, { "from": "human", "value": "@extends('layouts.master')\n\n@section('title')C&amp;Q #{{ $volnum}}: {{ $title }}@endsection\n\n@section('head')\n<header class=\"story\">\n <p>Claw &amp; Quill &middot; Issue #{{ $volnum ...
php
chosen
[ { "from": "system", "value": "Refactor CPU code. Add debugging code.\n" }, { "from": "human", "value": "<?php\n\nfunction collect_cpuUsage($debug, $log) {\n $usage = explode(\" \", exec('vmstat 2 2'));\n\t\n\t// Get CPU usage\n\t$cpu = $usage[43];\n\tsettype($cpu, \"integer\");\n\t$cpu = 100...
php
chosen
[ { "from": "system", "value": "Modify the CventConneciton class to use a factory pattern\n" }, { "from": "human", "value": "<?php namespace CventApi;\n\nuse SoapClient;\nuse SoapFault;\nuse \\CventApi\\CventLoginCredentials;\n\n\nclass CventConnection {\n\n /**\n * @var String\n */\n protec...
php
chosen
[ { "from": "system", "value": "Make password not to show in status bar\n" }, { "from": "human", "value": "<?php if(!isset($conn)) die; ?><header>\n <h1>Super-Simple-Vunlerable-Guestbook</h1>\n\n <ul class=\"nav\">\n <?php\n function protect($url, $pwd) {\n return \"java...
php
chosen
[ { "from": "system", "value": "Hide all output for Nix systems\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Mihaeu\\PhpDependencies\\OS;\n\nclass ShellWrapper\n{\n private $STD_ERR_PIPE = ' 2> /dev/null';\n\n private $STD_ERR_PIPE_WIN = ' 2> NUL';\n\n ...
php
chosen
[ { "from": "system", "value": "Fix flag file paths again" }, { "from": "human", "value": "<?php\n// echo '<p>Hi I am some random ' . rand() .' output from the server.</p>';\n// echo '<strong>Bitcoin is Enabled</strong>';\n// echo \"Data is\";\n$domvalue = $_GET['id'];\n\n// Bitcoin controls\nswit...
php
chosen
[ { "from": "system", "value": "Fix Test by ensuring non-interactivity\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the kreait eZ Publish Migrations Bundle.\n *\n * This source file is subject to the license that is bundled\n * with this source code in the file LICENSE.\...
php
chosen
[ { "from": "system", "value": "Fix method comment parameter signature.\n" }, { "from": "human", "value": "<?php\n\nnamespace Orbt\\ResourceMirror\\Resource;\n\n/**\n * A collection of resource objects.\n */\nclass Collection implements \\IteratorAggregate\n{\n /**\n * Resource collection a...
php
chosen
[ { "from": "system", "value": "Remove comment left over from xhp-js sample code\n" }, { "from": "human", "value": "<?hh // strict\n\nfinal class :nucleus:members-table extends :x:element {\n use XHPHelpers;\n use XHPReact;\n\n attribute :xhp:html-element;\n\n protected function render(): XHPR...
php
chosen
[ { "from": "system", "value": "[phabricator] Allow missing dependency checks to run\n\nTest Plan:\nRun upgrade-schema.php, see error instead of silent failure.\n\nTask: T123\n\nReviewed By: epriestley\nReviewers: epriestley, jungejason\nCC: aran, rm, epriestley\nDifferential Revision: 199\n" }, { "fr...
php
chosen
[ { "from": "system", "value": "Fix input field for password, change from 'Text' to 'Password'.\n" }, { "from": "human", "value": "<?php\nnamespace SanAuth\\Model;\n\nuse Zend\\Form\\Form;\n\nclass User extends Form {\n public function __construct($name = null) {\n // we want to ignore the name p...
php
chosen
[ { "from": "system", "value": "Fix from 'static::' to 'self::'.\n" }, { "from": "human", "value": "<?php\nnamespace Imunew\\Pipeline\\Context;\n\n/**\n * Class Status\n * @package Imunew\\Pipeline\n */\nclass Status implements StatusInterface\n{\n /** @var string */\n private static $INITIA...
php
chosen
[ { "from": "system", "value": "Make phpcs happy for PSR2\n" }, { "from": "human", "value": "<?php\n\nnamespace DspLib;\n\nclass Console\n{\n\tpublic static function getUserInput($silent = false)\n\t{\n\t\tif ($silent) {\n\t\t\tshell_exec('stty -echo');\n\t\t}\n\n\t\t$userInput = fgets(STDIN);\n\n...
php
chosen
[ { "from": "system", "value": "Put download Tesco SVG Barcode to separated function\n" }, { "from": "human", "value": "<?php\nnamespace Omise\\Payment\\Gateway\\Response;\n\nuse Magento\\Payment\\Gateway\\Helper\\SubjectReader;\nuse Magento\\Payment\\Gateway\\Response\\HandlerInterface;\n\nclass ...
php
chosen
[ { "from": "system", "value": "Correct PHPDoc type for float ttl\n\nIt can be null as the Lock instance accepts it." }, { "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 licen...
php
chosen
[ { "from": "system", "value": "Add the method for user to delete a notification or clear them all.\n" }, { "from": "human", "value": "<?php namespace App\\Http\\Controllers;\n\nuse App\\Http\\Requests;\nuse App\\Http\\Controllers\\Controller;\n\nuse App\\Notification;\nuse Illuminate\\Http\\Reque...
php
chosen
[ { "from": "system", "value": "Update gearman client call due to changes\n" }, { "from": "human", "value": "<?php\n\nnamespace Soil\\QueueHttpEndpointBundle\\Controller;\n\nuse Soilby\\EventComponent\\Service\\GearmanClient;\nuse Symfony\\Component\\HttpFoundation\\JsonResponse;\nuse Symfony\\Com...
php
chosen
[ { "from": "system", "value": "Access Config through Service Container\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse Illuminate\\Support\\Facades\\Config;\n\nclass LanguageController extends Controller\n{\n /**\n * Switch Language\n *\n * @par...
php
chosen
[ { "from": "system", "value": "Add a test for flatten\n" }, { "from": "human", "value": "<?php\n\nclass ArrayTest extends PHPUnit_Framework_TestCase {\n function testFlatten() {\n // Missing\\_Array\\flatten()\n $this->markTestIncomplete();\n }\n}\n" }, { "from": "gpt", "value...
php
chosen
[ { "from": "system", "value": "Disable raise php limits from \\CSSmin\n\nUnit tests can not be achieved due to max_execution_time set by default to 60 seconds from class \\CSSmin." }, { "from": "human", "value": "<?php\n\nnamespace AssetsBundle\\AssetFile\\AssetFileFilter;\n\nclass CssAssetFileFi...
php
chosen
[ { "from": "system", "value": "Make alias public to work on SF4+\n\nServices in SF4+ are now private by default. To make the bundle work in SF4+ we have to set the alias to public. Maybe for further versions it would be better to inject the service to the controller instead of accessing it through the contai...
php
chosen
[ { "from": "system", "value": "Add test for setting a property on a model\n" }, { "from": "human", "value": "<?php\n\nuse PhilipBrown\\CapsuleCRM\\Connection;\n\nclass ModelTest extends PHPUnit_Framework_TestCase {\n\n public function setUp()\n {\n $this->model = new ModelStub(new Connection...
php
chosen
[ { "from": "system", "value": "Check if participant exists when tracking pixel is requested\n\n" }, { "from": "human", "value": "<?php\n\n\nnamespace Intracto\\SecretSantaBundle\\Controller;\n\nuse Intracto\\SecretSantaBundle\\Response\\TransparentPixelResponse;\nuse Intracto\\SecretSantaBundle\\...
php
chosen
[ { "from": "system", "value": "Implement GD image - Attempt 1\n\nTrying to add support for GD as a fallback for IMagick. first attempt.\n" }, { "from": "human", "value": "<?php\n\tclass Card {\n\t\tpublic function __construct($value, $suit) {\n\t\t\t$sourceDirectory = '/home/public/img/cards';\n\...
php
chosen
[ { "from": "system", "value": "Strengthen PHP scorecard id validation\n" }, { "from": "human", "value": "<?php\n\nfunction is_valid_scorecard_id($id) {\n if ($id === \"\" || preg_match('/\\W/', $id) === 1) {\n return false;\n }\n return true;\n}\n\nfunction error($code) {\n if ...
php
chosen
[ { "from": "system", "value": "Switch to using int milliseconds for timestamps.\n" }, { "from": "human", "value": "<?php\n\nnamespace Princeton\\App\\DataModel;\n\nuse DateTime;\n\nclass DocumentObject implements \\JsonSerializable\n{\n\tprotected $id;\n\tprotected $active;\n\tprotected $created;...
php
chosen
[ { "from": "system", "value": "Allow injecting of cache through factory\n" }, { "from": "human", "value": "<?php\n\nnamespace Addr;\n\nuse Alert\\Reactor,\n LibDNS\\Decoder\\DecoderFactory,\n LibDNS\\Encoder\\EncoderFactory,\n LibDNS\\Messages\\MessageFactory,\n LibDNS\\Records\\Quest...
php
chosen
[ { "from": "system", "value": "Add documentation to the getLocale method.\n" }, { "from": "human", "value": "<?php namespace Vinkla\\Translator;\n\nuse Vinkla\\Translator\\Exceptions\\TranslatorException;\nuse Config, Session;\n\ntrait TranslatorTrait {\n\n\t/**\n\t * The default localization key...
php
chosen
[ { "from": "system", "value": "Add AdminLTE styles mapping to public folder\n" }, { "from": "human", "value": "<?php\n\nnamespace RenderbitTechnologies\\AdminLTE;\n\nclass ServiceProvider extends \\Illuminate\\Support\\ServiceProvider\n{\n const CONFIG_PATH = __DIR__ . '/../config/adminlte.php...
php
chosen
[ { "from": "system", "value": "[Espresso] Fix stack to only protect closures\n\n" }, { "from": "human", "value": "<?php\n\nnamespace React\\Espresso;\n\nuse React\\EventLoop\\Factory;\nuse React\\Socket\\Server as SocketServer;\nuse React\\Http\\Server as HttpServer;\n\nclass Stack extends \\Pimp...
php
chosen
[ { "from": "system", "value": "GH-22: Remove commented code from the test file.\n" }, { "from": "human", "value": "<?php\n\nnamespace Droath\\ProjectX\\Tests;\n\nuse Droath\\ProjectX\\ProjectX;\nuse Robo\\Robo;\nuse Robo\\Tasks;\nuse Symfony\\Component\\Console\\Output\\NullOutput;\n\n/**\n * Def...
php
chosen
[ { "from": "system", "value": "Add the edgecase name to the test dataprovider\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace WyriHaximus\\HtmlCompress\\Tests;\n\nuse WyriHaximus\\HtmlCompress\\Factory;\nuse WyriHaximus\\TestUtilities\\TestCase;\n\n/**\n * @internal...
php
chosen
[ { "from": "system", "value": "feat(shop): Update admin order index page\n\nUpdate admin order index page\n\nsee #369\n" }, { "from": "human", "value": "@extends('layouts.admin')\n\n@section('content')\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n ...
php
chosen
[ { "from": "system", "value": "Disable `lastmod` scope in `report:netx` [WEB-1893]\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Console\\Commands\\Report;\n\nuse App\\Library\\Slug;\nuse App\\Models\\Collections\\Artwork;\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate...
php
chosen
[ { "from": "system", "value": "Reset data before reading file contents\n" }, { "from": "human", "value": "<?php \n\nnamespace DataStream;\n\n/**\n * Data source loader\n */\nclass Source\n{\n \n protected $data = null;\n \n /**\n * @var boolean Whether the file should be read once or every t...
php
chosen
[ { "from": "system", "value": "Add comma to the last element of the array\n" }, { "from": "human", "value": "<?php\nnamespace Moxio\\Sniffs\\Tests\\PHP;\n\nuse Moxio\\Sniffs\\PHP\\DisallowImplicitLooseComparisonSniff;\nuse Moxio\\Sniffs\\Tests\\AbstractSniffTest;\n\nclass DisallowImplicitLooseCom...
php
chosen