conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add data getter to listcustomeremails\n" }, { "from": "human", "value": "<?php\n\nnamespace Desk\\Response\\Customers;\n\nclass ListCustomerEmails implements \\ArrayAccess, \\Iterator\n{\n protected $data;\n private $position = 0;\n\n public function __cons...
php
chosen
[ { "from": "system", "value": "Move alias registration to the `register` method\n" }, { "from": "human", "value": "<?php namespace Illuminate\\Html;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass HtmlServiceProvider extends ServiceProvider {\n\n\t/**\n\t * Indicates if loading of the provi...
php
chosen
[ { "from": "system", "value": "Add missing validation rules for v3 posts.\n\nUsers should *not* be able to specify whether their post is approved, and we should enforce some restrictions on other fields.\n" }, { "from": "human", "value": "<?php\n\nnamespace Rogue\\Http\\Requests\\Three;\n\nuse Ro...
php
chosen
[ { "from": "system", "value": "Set default location when no GPS data exists." }, { "from": "human", "value": "<?php\nrequire(\"./creds.php\");\n\n// Connect to Database\nmysql_connect($db_host, $db_user, $db_pass) or die(mysql_error());\nmysql_select_db($db_name) or die(mysql_error());\n\n// Get ...
php
chosen
[ { "from": "system", "value": "Change the user seeder for the test account\n" }, { "from": "human", "value": "<?php\n\nuse CachetHQ\\Cachet\\Models\\User;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Seeder;\n\nclass UsersTableSeeder extends Seeder\n{\n /**\n * Ru...
php
chosen
[ { "from": "system", "value": "Fix serialized fields not showing for latest item\n" }, { "from": "human", "value": "<?php\n\nclass Zenc_EmailLogger_RestController extends Zenc_EmailLogger_Controller_Restful\n{\n protected $_methods = array('get');\n\n public function getListAction()\n {\...
php
chosen
[ { "from": "system", "value": "Expand function for grid->image column\n\nLast parameter for expand feature\r\n$grid->picture()->image('', 40, 40, true);" }, { "from": "human", "value": "<?php\n\nnamespace Encore\\Admin\\Grid\\Displayers;\n\nuse Illuminate\\Contracts\\Support\\Arrayable;\nuse Illu...
php
chosen
[ { "from": "system", "value": "Use a proper phpdoc syntax\n" }, { "from": "human", "value": "<?php\n\nnamespace Aerys;\n\ninterface Bootable {\n /** May return an instance of Middleware and/or callable to be used instead of the class implementing Bootable (which may also implement Middleware a...
php
chosen
[ { "from": "system", "value": "Fix for column key too long for Aurora.\n" }, { "from": "human", "value": "<?php\n\nnamespace ChaseH\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass AppServiceProvider extends ServiceProvider\n{\n /**\n * Bootstrap any application services.\...
php
chosen
[ { "from": "system", "value": "Add a new quote by thrall" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace WyriMaps\\XHeaders;\n\nfinal class Horde\n{\n public static function headers()\n {\n return [\n 'X-Horde' => 'For the Horde!',\n ...
php
chosen
[ { "from": "system", "value": "Refactor the repository's ORM entities\n" }, { "from": "human", "value": "<?php\nnamespace Axstrad\\DoctrineExtensions\\Sluggable\\Sluggable;\n\nuse Gedmo\\Sluggable\\Sluggable as BaseInterface;\n\n\n/**\n * Axstrad\\DoctrineExtensions\\Sluggable\\Sluggable\\Sluggab...
php
chosen
[ { "from": "system", "value": "Remove function from request test" }, { "from": "human", "value": "<?php\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 editor.\n */\n\n...
php
chosen
[ { "from": "system", "value": "Use ** operator over function pow()\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Twig.\n *\n * (c) 2010 Fabien Potencier\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with thi...
php
chosen
[ { "from": "system", "value": "Check if there are any users before making list\n" }, { "from": "human", "value": "@extends('lanager-core::layouts.default')\n@section('content')\n<h2>{{{ $title }}}</h2>\n\t{{ Table::open() }}\n\t@foreach ($users as $user)\n\t\t<?php\n\t\t// Get steam state for use...
php
chosen
[ { "from": "system", "value": "Simplify client, remove unneeded init method\n" }, { "from": "human", "value": "<?php\n\nnamespace React\\Whois;\n\nuse React\\Async\\Util as Async;\nuse React\\Curry\\Util as Curry;\nuse React\\Dns\\Resolver\\Resolver;\n\nclass Client\n{\n private $resolver;\n ...
php
chosen
[ { "from": "system", "value": "Disable User Backend Language feature for WordPress 4.7+.\n" }, { "from": "human", "value": "<?php # -*- coding: utf-8 -*-\n\nif ( is_admin() ) {\n\tadd_action( 'inpsyde_mlp_loaded', 'mlp_feature_user_backend_language', 0 );\n}\n\n/**\n * @param Inpsyde_Property_Lis...
php
chosen
[ { "from": "system", "value": "Use a medium strength generator for ircmaxell/random-lib\n\nAs discussed in https://github.com/ramsey/uuid/issues/56\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the ramsey/uuid library\n *\n * For the full copyright and license information...
php
chosen
[ { "from": "system", "value": "Add ability to configure a platform-specific type.\n" }, { "from": "human", "value": "<?php\n/**\n * PHP version 7.1\n *\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\nnamespace ComPHPPuebla\\Fixtures\\Con...
php
chosen
[ { "from": "system", "value": "Add <noscript> fallback to the lazyload background image example…\n\nWork in progress!\n" }, { "from": "human", "value": "<?php snippet_detect('html_head', array(\n\t'criticalcss' => 'home',\n\t'prev_next' => false,\n\t'prerender' => false\n)); ?>\n\n\t<?php snippet...
php
chosen
[ { "from": "system", "value": "Fix validation issues with quantity field\n" }, { "from": "human", "value": "<?php\n/**\n * Text input field with validation for numeric values.\n * \n * @package forms\n * @subpackage fields-formattedinput\n */\nclass QuantityField extends NumericField\n{\n\n pu...
php
chosen
[ { "from": "system", "value": "Check if js registry is null\n" }, { "from": "human", "value": "@inject('registry', 'Despark\\Cms\\Javascript\\Contracts\\RegistryContract')\n<script type=\"text/javascript\">\n if (typeof Despark == 'undefined') {\n Despark = {};\n }\n Despark.js = ...
php
chosen
[ { "from": "system", "value": "Use new config settings for send email addresses\n" }, { "from": "human", "value": "<?php\nclass PitchNotify {\n\n\tpublic function fire($job, $data)\n\t{\n\t\t$pitch = Pitch::find($data['pitch']);\n\t\tif ($pitch) {\n\t\t\tMail::send(['text' => 'emails.pitch'], ['p...
php
chosen
[ { "from": "system", "value": "Change multiple to selectbox by default\n" }, { "from": "human", "value": "<?php\n/**\n * PlumSearch plugin for CakePHP Rapid Development Framework\n *\n * Licensed under The MIT License\n * Redistributions of files must retain the above copyright notice.\n *\n * @a...
php
chosen
[ { "from": "system", "value": "TASK: Add method to retrieve public reviews\n" }, { "from": "human", "value": "<?php\nnamespace LarsNieuwenhuizen\\Trustpilot\\Service;\n\nuse Psr\\Http\\Message\\ResponseInterface;\n\nfinal class BusinessUnitDataService extends AbstractDataService\n{\n\n /**\n ...
php
chosen
[ { "from": "system", "value": "Fix how pager maintains \"approved\" state.\n" }, { "from": "human", "value": "<a href=\"?page=<?php \n echo $prev_page;\n if (!is_null($message_approved))\n echo \"&approved=$message_approved\";?>\">&larr; Previous</a>\n\n| Page <?php echo $page ?> of ...
php
chosen
[ { "from": "system", "value": "Add edge cases test name to data provider\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\n */...
php
chosen
[ { "from": "system", "value": "Add assertion to check if you need to be authenticated to access a page in the backend\n" }, { "from": "human", "value": "<?php\n\nnamespace Backend\\Core\\Tests;\n\nuse Common\\WebTestCase;\n\nabstract class BackendWebTestCase extends WebTestCase\n{\n protected ...
php
chosen
[ { "from": "system", "value": "[ENH] payments: Add a new action to add mulitple items to a cart (used in custom code only so far)\n\ngit-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@52748 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "human", "value": "<?php\n// (c) Copyright 2002-2014...
php
chosen
[ { "from": "system", "value": "Remove all serialization tests from the Job tests\n" }, { "from": "human", "value": "<?php\n\nnamespace SlmQueueTest\\Job;\n\nuse PHPUnit_Framework_TestCase as TestCase;\nuse SlmQueueTest\\Asset\\SimpleJob;\n\nclass JobTest extends TestCase\n{\n public function t...
php
chosen
[ { "from": "system", "value": "Make $argv and $argc globally accessible for command-line checks\n" }, { "from": "human", "value": "<?php\nuse MarkLogic\\MLPHP;\n\nuse Monolog\\Logger;\nuse Monolog\\Handler\\StreamHandler;\n\n// Create a logger for tests\n$logger = new Logger('test');\n$logger->pu...
php
chosen
[ { "from": "system", "value": "Add tests into dashboard tests\n" }, { "from": "human", "value": "<?php\n\nclass DashboardTest extends FunctionalTest\n{\n /**\n * @dataProvider siteProvider\n */\n public function testSiteTitle($siteUrl, $expectedTitle)\n {\n $this->url($sit...
php
chosen
[ { "from": "system", "value": "Check if Fork has been installed before installing again.\n" }, { "from": "human", "value": "<?php\n\nnamespace ForkCMS\\Bundle\\InstallerBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\n\nclass InstallerController extends Contro...
php
chosen
[ { "from": "system", "value": "Change IoC binding value to: vinelal.social.auth\n" }, { "from": "human", "value": "<?php namespace Vinelab\\Auth;\r\n\r\nuse Illuminate\\Support\\ServiceProvider;\r\n\r\nclass AuthServiceProvider extends ServiceProvider {\r\n\r\n\t/**\r\n\t * Indicates if loading o...
php
chosen
[ { "from": "system", "value": "[BugFix] Disable remember me on auto login\n" }, { "from": "human", "value": "<?php namespace Wells\\L4LdapNtlm;\n\nuse Illuminate\\Auth\\Guard;\n\n/**\n * An LDAP/NTLM authentication driver for Laravel 4.\n *\n * @author Brian Wells (https://github.com/wells/)\n * ...
php
chosen
[ { "from": "system", "value": "Delete row with new DB format works\n" }, { "from": "human", "value": "<?php\n\n$empty_check = implode('', $_POST);\nif (empty($empty_check)) {\n echo header('Location: et-lo.php');\n} else {\n // $_POST['row'] is in the format: delrowX\n // where X is the ...
php
chosen
[ { "from": "system", "value": "Change persons names with animals\n" }, { "from": "human", "value": "<?php\n\n$greetings = 'Hello world';\n\n$names = ['John', 'Jane', 'Joe', 'Frank'];\n\nrequire 'view/index.php';\n" }, { "from": "gpt", "value": "<?php\n\n$greetings = 'Hello world';\n\n...
php
chosen
[ { "from": "system", "value": "Include developer link only if set in config\n" }, { "from": "human", "value": "@if (config('backpack.base.show_powered_by'))\n <div class=\"pull-right hidden-xs\">\n {{ trans('backpack::base.powered_by') }} <a target=\"_blank\" href=\"http://backpackforlara...
php
chosen
[ { "from": "system", "value": "Add back visible-print check layout\n" }, { "from": "human", "value": "<?php while (have_posts()) : the_post() ?>\n <article class=\"govuk-grid-column-full\">\n <div class=\"govuk-visible-print\">\n <p><?php echo esc_html(get_permalink()) ?></p>\n </div>...
php
chosen
[ { "from": "system", "value": "Implement exists(), add cachePaths() thing.\n" }, { "from": "human", "value": "<?php namespace Bound1ess;\n\nclass Dot implements \\ArrayAccess {\n \n /**\n * @var array\n */\n protected $data = [];\n\n /**\n * @param array $data\n * @ret...
php
chosen
[ { "from": "system", "value": "Add method to get instance.\n" }, { "from": "human", "value": "<?php\n\nnamespace Taskforcedev\\CrudApi\\Helpers;\n\n/**\n * Class Model\n *\n * @package Taskforcedev\\CrudApi\\Helpers\n */\nclass Model\n{\n public $crudApi;\n\n /**\n * Model constructor.\...
php
chosen
[ { "from": "system", "value": "Remove doNotForce method as it represents the default property value already\n" }, { "from": "human", "value": "<?php\n\nnamespace NotificationChannels\\Authy;\n\nclass AuthyMessage\n{\n /**\n * Determine whether to force the notification over cellphone netwo...
php
chosen
[ { "from": "system", "value": "Remove isolated test with debug enabled (error with recreating the database)\n" }, { "from": "human", "value": "<?php\n\nnamespace fennecweb;\n\nclass OrganismsTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @runInSeparateProcess\n * @preserveGloba...
php
chosen
[ { "from": "system", "value": "Revert \"Revert \"Add Total Volunteer members.\"\"\n\nThis reverts commit cf41f093a19059a4d849c2ab16a96c826fe5474b.\n" }, { "from": "human", "value": "<?php\n// Get user type\n$userType = 'volunteer';\n\n// Query retrieving user ID, first name, last name of voluntee...
php
chosen
[ { "from": "system", "value": "Move 'allowed' to noop group\n" }, { "from": "human", "value": "<?php\n\nnamespace Pheasant\\Database;\n\nclass MysqlPlatform\n{\n public function columnSql($column, $type, $options)\n {\n return trim(sprintf('`%s` %s %s', $column, $type, $this->_option...
php
chosen
[ { "from": "system", "value": "Make it beautiful with bootstrap\n" }, { "from": "human", "value": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"UTF-8\">\n <title>Sligen Online Demo</title>\n</head>\n<body>\n <h1>Generate slide and pitch like a boss!</h1>\n <hr>\n <p><a href=\"...
php
chosen
[ { "from": "system", "value": "Use PHP_ENV for stage on app side.\n\nSigned-off-by: Daniel (dmilith) Dettlaff <0df25c85cef740557ee7be110d93fbdb7c899ad6@verknowsys.com>\n" }, { "from": "human", "value": "<?php\n\ntry {\n $curr_dir = getcwd(); # copy app root dir to var\n chdir(getcwd() . \"/../....
php
chosen
[ { "from": "system", "value": "Undo add AuditReader diff method\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sonata package.\n *\n * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>\n *\n * For the full copyright and license information, please view the LICENSE\...
php
chosen
[ { "from": "system", "value": "Use absolute paths for the templates\n" }, { "from": "human", "value": "<?php\n\nreturn [\n\n /*\n |--------------------------------------------------------------------------\n | Where the templates for the generators are stored...\n |-------------------...
php
chosen
[ { "from": "system", "value": "Update to latest for 2.8\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\ClassLoader\\ApcClassLoader;\nuse Symfony\\Component\\HttpFoundation\\Request;\n\n$loader = require_once __DIR__.'/../app/bootstrap.php.cache';\n\n// Enable APC for autoload...
php
chosen
[ { "from": "system", "value": "Use Consumer model for creating new Consumer\n" }, { "from": "human", "value": "<?php\n/**\n * @Author\tFreek Lijten\n */\n\n$DB = new mysqli('localhost', 'root', null, 'oauth');\n#TODO use consumer model\n#TODO smarter method for generating key and secret, generate...
php
chosen
[ { "from": "system", "value": "Use \":num/index.html\" link structure for non-pretty paginated pages\n" }, { "from": "human", "value": "<?php namespace TightenCo\\Jigsaw;\n\nclass BasicOutputPathResolver\n{\n public function link($path, $name, $type, $page = 1)\n {\n if ($page > 1) {...
php
chosen
[ { "from": "system", "value": "Fix class name of Facebook command\n" }, { "from": "human", "value": "<?php\n\nnamespace Laravel\\Passport\\Console;\n\nuse DateTime;\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Support\\Facades\\DB;\nuse Laravel\\Passport\\ClientRepository;\n\nclass ClientC...
php
chosen
[ { "from": "system", "value": "Check some strings inside the output instead of the whole output\n\nThe whole output depends on file paths, which we can't assure on Travis\nor on someone else's machine.\n" }, { "from": "human", "value": "<?php\n\nfunction bad()\n{\n throw new Exception('Somethi...
php
chosen
[ { "from": "system", "value": "Change text in flash massages\n" }, { "from": "human", "value": "<?php\n\nnamespace hipanel\\actions;\n\nuse Yii;\nuse yii\\base\\Action;\n\nclass AddToCartAction extends Action\n{\n public $productClass;\n\n public function run()\n {\n $product = ne...
php
chosen
[ { "from": "system", "value": "Add post not found handler\n" }, { "from": "human", "value": "<?php\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\nuse Psr\\Http\\Message\\ServerRequestInterface as Request;\nuse Psr\\Http\\Message\\ResponseInterface as Response;\nuse Blog\\GetPost;\nuse Sl...
php
chosen
[ { "from": "system", "value": "Fix tracing, but catch exceptions to avoid issues\n" }, { "from": "human", "value": "<?php\nnamespace Scat\\Service;\n\nrequire '../extern/cryptor.php';\n\n// TODO push this into class so it can get key from config service\nfunction include_encrypted($file) {\n $en...
php
chosen
[ { "from": "system", "value": "Add UpAllCommand to Mongrate application.\n" }, { "from": "human", "value": "<?php\n\nnamespace Mongrate\\MongrateBundle;\n\nuse Symfony\\Component\\HttpKernel\\Bundle\\Bundle;\nuse Symfony\\Component\\Console\\Application;\n\nclass MongrateBundle extends Bundle\n{\...
php
chosen
[ { "from": "system", "value": "Fix assets reference at login layout" }, { "from": "human", "value": "<!DOCTYPE html>\n<html lang=\"pt-br\">\n\n<head>\n @include('includes.head')\n \n <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->\n <!-- WARNING: Res...
php
chosen
[ { "from": "system", "value": "Ajax: Use weak ETag header in tests\n\nSee http://en.wikipedia.org/wiki/HTTP_ETag#Strong_and_weak_validation\n\nClose gh-1448\n" }, { "from": "human", "value": "<?php\nerror_reporting(0);\n\n$ts = $_REQUEST['ts'];\n$etag = md5($ts);\n\n$ifNoneMatch = isset($_SERVER[...
php
chosen
[ { "from": "system", "value": "Add typehints for ServiceRegistryInterface::get() calls\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENSE\n * fil...
php
chosen
[ { "from": "system", "value": "Fix error PHP <= 5.6\n" }, { "from": "human", "value": "<?php\n\nnamespace PDOSimpleMigration\\Command;\n\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Input\\InputO...
php
chosen
[ { "from": "system", "value": "Clean up unused private property\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Brick\\App;\n\nuse Brick\\Http\\Request;\nuse Brick\\DI\\ValueResolver;\nuse Brick\\Reflection\\ReflectionTools;\nuse ReflectionNamedType;\nuse Reflect...
php
chosen
[ { "from": "system", "value": "Remove PaginatorAdapterInterface since it does not make sense to put it on the adapter for Pagerfanta.\n" }, { "from": "human", "value": "<?php\n\nnamespace FOS\\ElasticaBundle\\Paginator;\n\nuse Pagerfanta\\Adapter\\AdapterInterface;\n\nclass FantaPaginatorAdapter ...
php
chosen
[ { "from": "system", "value": "Fix strings route on test.\n" }, { "from": "human", "value": "<?php\n\nnamespace Nobox\\LazyStrings\\Tests;\n\nuse Illuminate\\Support\\Facades\\Config;\nuse Nobox\\LazyStrings\\LazyStrings;\nuse Orchestra\\Testbench\\TestCase;\n\nclass LazyStringsServiceProviderTes...
php
chosen
[ { "from": "system", "value": "Change reply to to be RoboJackets Officers\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Mail\\Attendance;\n\nuse App\\AttendanceExport;\nuse Illuminate\\Bus\\Queueable;\nuse Illuminate\\Mail\\Mailable;\nuse Illuminate\\Queue...
php
chosen
[ { "from": "system", "value": "Update file sums for release\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of a XenForo addon.\n *\n * (c) Jeremy P <http://xenforo.com/community/members/jeremy-p.450/>\n *\n * For the full copyright and license information, please view the LI...
php
chosen
[ { "from": "system", "value": "Use inotify backend (auto detect)\n" }, { "from": "human", "value": "<?php\nnamespace Kwf\\FileWatcher;\nuse Kwf\\FileWatcher\\Backend as Backend;\n\nclass Watcher\n{\n /**\n * Creates instance of best watcher backend for your system.\n */\n public sta...
php
chosen
[ { "from": "system", "value": "Make PhpSpec passing after fixing PHPStan warnings\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENSE\n * file tha...
php
chosen
[ { "from": "system", "value": "Use old array notation because gnomo is not updated\n\nsrsly 2.0.\n" }, { "from": "human", "value": "<?php\n\nclass StatisticsHandler\n{\n function get()\n {\n /*if (isset($_GET['startDate']) && isset($_GET['endDate'])) {\n $start = $_GET['st...
php
chosen
[ { "from": "system", "value": "Load Twig's autoloader if needed\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Ekino New Relic bundle.\n *\n * (c) Ekino - Thomas Rabaix <thomas.rabaix@ekino.com>\n *\n * For the full copyright and license information, please view the LICEN...
php
chosen
[ { "from": "system", "value": "Fix the update time error\n" }, { "from": "human", "value": "{{ '<' . '?xml version=\"1.0\" encoding=\"utf-8\"?>' }}\n\n<feed xmlns=\"http://www.w3.org/2005/Atom\">\n <title>{{ trans('feeds.title') }}</title>\n <subtitle>{{ trans('feeds.sub_title') }}</subtitl...
php
chosen
[ { "from": "system", "value": "Use trait methods to get column names\n" }, { "from": "human", "value": "<?php\n\nnamespace Yajra\\Auditable;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AuditableTraitObserver\n{\n /**\n * Model's creatin...
php
chosen
[ { "from": "system", "value": "Add test for lowercased route\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Foundation\\Testing\\WithoutMiddleware;\nuse Illuminate\\Foundation\\Testing\\DatabaseMigrations;\nuse Illuminate\\Foundation\\Testing\\DatabaseTransactions;\n\nclass stationTe...
php
chosen
[ { "from": "system", "value": "Fix Strict error again :)" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of PsySH\n *\n * (c) 2012 Justin Hileman\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code....
php
chosen
[ { "from": "system", "value": "Revert \"Make routing work properly this time.\"\n\nThis reverts commit fa971ecfadf9b27ae797b3aa6913378de74dc01c.\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Application Routes\n|----...
php
chosen
[ { "from": "system", "value": "Test for getting all blocks in given language\n" }, { "from": "human", "value": "<?php namespace Modules\\Block\\Tests\\Integration;\n\nclass BlockRepositoryTest extends BaseBlockTest\n{\n /** @test */\n public function it_creates_blocks()\n {\n $blo...
php
chosen
[ { "from": "system", "value": "Change contact template to extra column.\n" }, { "from": "human", "value": "<?php\n/*\nTemplate Name: Kontakt\n*/\n?>\n\n<div class=\"large-12 medium-12 small-12 column\">\n <div class=\"white-bg vines\">\n <?php while (have_posts()) : the_post(); ?>\n ...
php
chosen
[ { "from": "system", "value": "Use normal query if no data is passed or using bind method if there is data passed\n" }, { "from": "human", "value": "<?php\n namespace DB;\n\n include (SYSTEM_PATH . 'db/IDriver.php');\n\n class DB\n {\n private $dbDriver;\n\n public funct...
php
chosen
[ { "from": "system", "value": "Return array consistently from query method\n" }, { "from": "human", "value": "<?php\n\nnamespace Rogue\\Services;\n\nuse Illuminate\\Support\\Facades\\Log;\nuse Softonic\\GraphQL\\ClientBuilder;\n\nclass GraphQL\n{\n /**\n * Build a new GraphQL client.\n ...
php
chosen
[ { "from": "system", "value": "Change action configuration amount to float\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was d...
php
chosen
[ { "from": "system", "value": "Use config instead of env value directly\n" }, { "from": "human", "value": "<?php\nnamespace NZTim\\Mailchimp;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass MailchimpServiceProvider extends ServiceProvider\n{\n protected $defer = false;\n\n public func...
php
chosen
[ { "from": "system", "value": "Check for ZF2_PATH env var when including ZF2 AutoloaderFactory\n" }, { "from": "human", "value": "<?php\nchdir(dirname(__DIR__));\nrequire_once 'vendor/ZendFramework/library/Zend/Loader/AutoloaderFactory.php';\nZend\\Loader\\AutoloaderFactory::factory(array('Zend\\...
php
chosen
[ { "from": "system", "value": "Make OC_Avatar unit tests independent of currently loggedin user\n" }, { "from": "human", "value": "<?php\n/**\n * Copyright (c) 2013 Christopher Schäpers <christopher@schaepers.it>\n * This file is licensed under the Affero General Public License version 3 or\n * l...
php
chosen
[ { "from": "system", "value": "Use Config::hasGroup() to detect where our config has been created.\n" }, { "from": "human", "value": "<?php\n\nnamespace FluxBB;\n\nuse Illuminate\\Support\\Facades\\Facade;\nuse Config;\n\nclass Core extends Facade\n{\n protected static function getFacadeAccess...
php
chosen
[ { "from": "system", "value": "Change variables to be protected so that subclasses can access them.\n" }, { "from": "human", "value": "<?php\n\nrequire_once 'Twig/Autoloader.php';\n\nTwig_Autoloader::register();\n\nclass TwigWrapper\n{\n private $loader;\n private $twig;\n private $template;\n...
php
chosen
[ { "from": "system", "value": "Add missing extension and remove date from log name\n" }, { "from": "human", "value": "<?php\n\nreturn array (\n\n /*\n * Directory to log to\n */\n 'path' => __DIR__ . '/../storage/logs',\n\n /*\n * Name of log file\n */\n 'name' => 'tom...
php
chosen
[ { "from": "system", "value": "Fix issue with /random/number where it parsed route as number\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse Illuminate\\Http\\Request;\n\nuse App\\Http\\Requests;\nuse App\\Helpers\\Helper;\n\nclass RandomController extends Con...
php
chosen
[ { "from": "system", "value": "Make field nullable instead of set default value\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of the ws/array-field-type-extension package.\n *\n * (c) Benjamin Georgeault <github@wedgesama.fr>\n *\n * For the full copyright and license informa...
php
chosen
[ { "from": "system", "value": "Check for toMap before calling.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Used to convert a data object to a json object\n *\n * @author marcus@silverstripe.com.au\n * @license BSD License http://silverstripe.org/bsd-license/\n */\nclass DataObjectSetJsonC...
php
chosen
[ { "from": "system", "value": "Fix latest migration's down() function\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddActiveFieldToUsersTable extends Migration\n{\n /**\n * Run the migrat...
php
chosen
[ { "from": "system", "value": "Change static placeholder text with instance var\n" }, { "from": "human", "value": "<?php\n\nnamespace FullyBaked\\Pslackr\\Messages;\n\nclass CustomMessage implements Message\n{\n protected $text;\n\n protected $optionalFields = [];\n\n public function __c...
php
chosen
[ { "from": "system", "value": "Fix message type in factory\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Model Factories\n|--------------------------------------------------------------------------\n|\n| Here you may...
php
chosen
[ { "from": "system", "value": "Update the admin interface and demo site generator\n\nUpdate the admin interface to feature a fully responsive, fully retina, cleaned up look and feel based on Bootstrap 3. Simultaniously updated the generated demo site to be more in line with what we use as a starting point fo...
php
chosen
[ { "from": "system", "value": "Change default path for the config json\n" }, { "from": "human", "value": "<?php\nnamespace Stirling\\Core;\n\nuse InvalidArgumentException;\n\nclass Config\n{\n\n protected static $instance;\n\n private $properties;\n\n /**\n * Config constructor.\n ...
php
chosen
[ { "from": "system", "value": "Remove superfluous debug property from internal request struct\n" }, { "from": "human", "value": "<?php\n\nnamespace Aerys;\n\nuse Amp\\Struct;\n\nclass InternalRequest {\n use Struct;\n public $isEncrypted;\n public $cryptoInfo;\n public $clientPort;\n ...
php
chosen
[ { "from": "system", "value": "Support editing and deleting columns\n" }, { "from": "human", "value": "<?php\n\nnamespace allejo\\DaPulse;\n\nuse allejo\\DaPulse\\Objects\\ApiObject;\n\nclass PulseColumn extends ApiObject\n{\n const Date = \"date\";\n const Person = \"person\";\n const...
php
chosen
[ { "from": "system", "value": "Move the response handling to a separate method\n" }, { "from": "human", "value": "<?php\n\nnamespace duncan3dc\\Proxy;\n\nuse GuzzleHttp\\Client;\n\nclass App\n{\n public function run(): void\n {\n $client = new Client([\n \"http_errors\" ...
php
chosen
[ { "from": "system", "value": "Fix gallery URL detection for feeds... again\n\nThey changed the HTML structure again it seems" }, { "from": "human", "value": "<?php\n\nclass ExPage_Index extends ExPage_Abstract\n{\n public function isLastPage()\n {\n return (count($this->find('td.ptd...
php
chosen
[ { "from": "system", "value": "Fix autoloader to work with helper classes on linux\n" }, { "from": "human", "value": "<?php\n\nnamespace PhpXmlRpc;\n\n/**\n * In the unlikely event that you are not using Composer to manage class autoloading, here's an autoloader for this lib.\n * For usage, see a...
php
chosen
[ { "from": "system", "value": "Fix render function so 404 body is not ignored by slim\n" }, { "from": "human", "value": "<?php\n\nnamespace SlimJson;\n\nuse Slim\\Slim;\n\nclass View extends \\Slim\\View {\n\n /**\n * @param int|string $status\n * @param array|null $data\n * @return void\n...
php
chosen