conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Remove OAuth settings page link\n" }, { "from": "human", "value": "<div class=\"card card--no-padding\">\n <div class=\"card__body\">\n\n <ul class=\"sidemenu\">\n <li>\n <a href=\"{{ route('front.account.settings') }}\">\n ...
php
chosen
[ { "from": "system", "value": "Add missing test scenarios for CssLength.php\n" }, { "from": "human", "value": "<?php\n\nnamespace AmpProject;\n\nuse AmpProject\\Tests\\TestCase;\n\n/**\n * Tests for AmpProject\\CssLength.\n *\n * @todo This is only a stub and basic smoke test, more tests need t...
php
chosen
[ { "from": "system", "value": "Update table name to match previous refactor\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateCoinDataCodesTable exten...
php
chosen
[ { "from": "system", "value": "Convert price to float to compare\n" }, { "from": "human", "value": "<?php\nfunction GetAuctionData($gameID){\n $data = json_decode(file_get_contents('https://www.g2a.com/marketplace/product/auctions/?id=' . $gameID), true);\n $data = array_values(array_values...
php
chosen
[ { "from": "system", "value": "Change time and distance getter return types to be nullable\n" }, { "from": "human", "value": "<?php\n\nclass ViewData\n{\n /**\n * @var int $time\n */\n private $time;\n\n /**\n * @var float $distance\n */\n private $distance;\n\n con...
php
chosen
[ { "from": "system", "value": "Modify tests to implement the required rules property.\n" }, { "from": "human", "value": "<?php\n\nuse Mockery as m;\nuse Samrap\\Validation\\Validator;\n\nclass ValidatorTest extends PHPUnit_Framework_TestCase\n{\n public function tearDown()\n {\n m::c...
php
chosen
[ { "from": "system", "value": "Use an integer for hash cost factor\n" }, { "from": "human", "value": "<?php\n\n/*\n * User Login for CouchCMS (https://github.com/cheesypoof/UserLoginForCouchCMS)\n * Copyright (c) 2014 Increment Web Services (http://incrementwebservices.com/)\n * Released under th...
php
chosen
[ { "from": "system", "value": "Set Email Address string to be read from l10n\n" }, { "from": "human", "value": "@extends('panelViews::mainTemplate')\n@section('page-wrapper')\n\n@if(Session::has('message'))\n <div class=\"alert-box success\">\n <h2>{{ Session::get('message') }}</h2>\n ...
php
chosen
[ { "from": "system", "value": "Set root name in constructor of TreeBuilder\n" }, { "from": "human", "value": "<?php\n\nnamespace Spraed\\PDFGeneratorBundle\\DependencyInjection;\n\nuse Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder;\nuse Symfony\\Component\\Config\\Definition\\Confi...
php
chosen
[ { "from": "system", "value": "Remove cannotBeEmpty call on integernode\n" }, { "from": "human", "value": "<?php\n\nnamespace Blablacar\\RedisBundle\\DependencyInjection;\n\nuse Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder;\nuse Symfony\\Component\\Config\\Definition\\Configuratio...
php
chosen
[ { "from": "system", "value": "Remove home nav partial, since it's redundant now.\n" }, { "from": "human", "value": "@inject('pages', 'BruceCms\\Pages\\Page')\n\n<nav class=\"nav --main\" role=\"navigation\">\n\t<ul class=\"nav__list\">\n\t\t<li class=\"nav__item\">\n\t\t\t<a class=\"link nav__li...
php
chosen
[ { "from": "system", "value": "Add Content-Length header on attachment downloader\n" }, { "from": "human", "value": "<?php\n\nnamespace BNETDocs\\Views\\Attachment;\n\nuse \\CarlBennett\\MVC\\Libraries\\Common;\nuse \\BNETDocs\\Libraries\\Exceptions\\IncorrectModelException;\nuse \\BNETDocs\\Libr...
php
chosen
[ { "from": "system", "value": "Check that we have an app object before using it\n" }, { "from": "human", "value": "<?php\nif ($app->has_error()) {\n\tforeach($app->get_all_errors() as $error) {\n\t\techo \"<div class=\\\"error\\\">$error</div>\";\n\t}\n}\n?>\n" }, { "from": "gpt", "va...
php
chosen
[ { "from": "system", "value": "Improve PSR test to produce useful output\n" }, { "from": "human", "value": "<?php\n\nnamespace phpSmug\\Tests;\n\n/**\n * @class\n * Test properties of our codebase rather than the actual code.\n */\nclass PsrComplianceTest extends \\PHPUnit_Framework_TestCase\n{\n...
php
chosen
[ { "from": "system", "value": "Remove any empty nodes before combining into a path\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Core\\Url\\Components;\n\n/**\n * c5 specific path component for league/url\n */\nclass Path extends \\League\\Url\\Components\\Path\n{\n\n protected...
php
chosen
[ { "from": "system", "value": "Return $record in case of no exception.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Copyright 2014 SURFnet bv\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * Y...
php
chosen
[ { "from": "system", "value": "Clean obsolete epom key usage.\n" }, { "from": "human", "value": "<?php\n\nclass CM_AdproviderAdapter_Epom extends CM_AdproviderAdapter_Abstract {\n\n public function getHtml($zoneData, array $variables) {\n $zoneId = CM_Util::htmlspecialchars($zoneData['z...
php
chosen
[ { "from": "system", "value": "Fix error that caused code output\n" }, { "from": "human", "value": "<?\n/* Site-wide utility functions */\n\nrequire_once('secureConstants.php');\n\nfunction mysqliConn() {\n\t$db = new mysqli(\n\t\t$GLOBALS['DB']['SERVER'],\n\t\t$GLOBALS['DB']['USERNAME'],\n\t\t$G...
php
chosen
[ { "from": "system", "value": "Fix header comparison debug output\n" }, { "from": "human", "value": "<?php\n/**\n * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)\n * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)\n *\n * Licensed under The MIT License\n ...
php
chosen
[ { "from": "system", "value": "Fix unit test for 0.90 version of GLPI\n" }, { "from": "human", "value": "<?php\nrequire_once('commonfunction.php');\ninclude_once (GLPI_ROOT . \"/config/based_config.php\");\ninclude_once (GLPI_ROOT . \"/inc/dbmysql.class.php\");\ninclude_once (GLPI_CONFIG_DIR . \"...
php
chosen
[ { "from": "system", "value": "Add add_action only if it exists\n" }, { "from": "human", "value": "<?php\n\nnamespace Xu\\Foundation\\Bootstrap;\n\n// @codeCoverageIgnoreStart\nuse Xu\\Foundation\\Foundation;\nuse Xu\\Facades\\Facade;\n\n// Load xu functions files.\n// Please note that missing fi...
php
chosen
[ { "from": "system", "value": "Add new target blank for external link\n" }, { "from": "human", "value": "<footer class=\"footer\">\n <div class=\"container-fluid\">\n <nav class=\"pull-left\">\n <ul>\n <li>\n ...
php
chosen
[ { "from": "system", "value": "Fix bug where status controller would only return \"unavailable\"\n" }, { "from": "human", "value": "<?php namespace App\\Http\\Controllers;\n\nuse Illuminate\\Support\\Facades\\Cache;\nuse Laravel\\Lumen\\Routing\\Controller;\nuse Illuminate\\Support\\Facades\\View...
php
chosen
[ { "from": "system", "value": "Fix a bug with the print_files output function\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\">\n <title>Gificiency</title>\n ...
php
chosen
[ { "from": "system", "value": "Add class and extract sidebar from content\n" }, { "from": "human", "value": "<?php\n/**\n *\n * Template Name: My Sidebar Page\n *\n * The Template for displaying all single posts.\n *\n * @package socket.io-website\n */\n\nget_header(); ?>\n\n\t<div id=\"primary\"...
php
chosen
[ { "from": "system", "value": "Revert \"Updated middleware contract to force use of Request and Response contracts.\"\n\nThis reverts commit 47d2083f48b676d359c2b2eb3836b2ce2f85909d.\n" }, { "from": "human", "value": "<?php\n\nnamespace Phapi\\Contract\\Middleware;\n\nuse Phapi\\Contract\\Http\\R...
php
chosen
[ { "from": "system", "value": "Revert type hints on abstract container for now.\n\nThis is our only abstract class in the compat suite and we expect\npeople to implement this. Adding a type hint breaks existing\nimplementations. So it's not really good to do this in a patch\nrelease.\n" }, { "from": ...
php
chosen
[ { "from": "system", "value": "Use PackageName-x.x.x for consistency with CLI install usage.\n" }, { "from": "human", "value": "<?php\n// Set the title for the main template\n$parent->context->page_title = $context->name.' | pear2.php.net';\n?>\n<div class=\"package\">\n <div class=\"grid_8 le...
php
chosen
[ { "from": "system", "value": "Add $guarded for mass assignment\n" }, { "from": "human", "value": "<?php\n\nnamespace App;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\SoftDeletes;\n\nclass Team extends Model\n{\n use SoftDeletes;\n \n /**\n * G...
php
chosen
[ { "from": "system", "value": "Add getTemporaryFile method to base test class\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace PhpSchool\\PhpWorkshopTest;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Symfony\\Component\\Filesystem\\Filesystem;\n\nabstract class BaseT...
php
chosen
[ { "from": "system", "value": "Rename controller action delete to destroy\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Cortex\\Foundation\\Transformers;\n\nuse Spatie\\MediaLibrary\\Models\\Media;\nuse League\\Fractal\\TransformerAbstract;\n\nclass MediaTransf...
php
chosen
[ { "from": "system", "value": "Add configuration file publishing to the service provider\n\n" }, { "from": "human", "value": "<?php\n\nnamespace Jalle19\\Laravel\\UnshittyFlash;\n\nuse Illuminate\\Support\\ServiceProvider;\n\n/**\n * Class FlashServiceProvider\n * @package Jalle19\\Laravel\\Unshi...
php
chosen
[ { "from": "system", "value": "Fix user active state verification\n" }, { "from": "human", "value": "<?php\nnamespace Passengers\\Event;\n\nuse Cake\\Event\\Event;\nuse Cake\\Event\\EventListenerInterface;\nuse Cake\\Controller\\Component\\AuthComponent;\nuse Cake\\Core\\Configure;\nuse Cake\\Cor...
php
chosen
[ { "from": "system", "value": "Remove trimming to avoid warnings in some base64 implementations\n" }, { "from": "human", "value": "<?php\n\n// args: phar path, privkey, privkey password\n$pkeyid = openssl_pkey_get_private(\"file://\".realpath($_SERVER['argv'][2]), $_SERVER['argv'][3]);\nif (!open...
php
chosen
[ { "from": "system", "value": "Remove call to unused global function.\n" }, { "from": "human", "value": "@extends('layout.master')\n\n@section('main_content')\n\n@include('layout.header', ['header' => 'Users', 'subtitle' => 'View & edit member profiles.'])\n\n<div class=\"container -padded\">\n ...
php
chosen
[ { "from": "system", "value": "Add eq barcode update faeature\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse App\\EquipmentBarcode;\nuse Illuminate\\Http\\Request;\nuse App\\Services\\ApiService;\n\nclass EquipmentBarcodeController extends Controller\n{\n ...
php
chosen
[ { "from": "system", "value": "Add clearTitleSegments method to seo helper\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Core\\Html\\Service;\n\nclass Seo\n{\n private $siteName = '';\n private $titleSegments = array();\n private $titleSegmentSeparator = ' :: ';\n priv...
php
chosen
[ { "from": "system", "value": "Make sure to load the importers.\n" }, { "from": "human", "value": "<?php\n\n/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 cc=80; */\n\n/**\n * @package omeka\n * @subpackage fedora-connector\n * @copyright 2012 Rector and Board of Visitors, Univ...
php
chosen
[ { "from": "system", "value": "Fix path to app.css file\n" }, { "from": "human", "value": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<link href=\"css/app.css\" rel=\"stylesheet\" />\n<title>Radiological Equipment Database</title>\n</head>\n<body>\n\t<div class=\"c...
php
chosen
[ { "from": "system", "value": "Fix duplicate payment profile handling\n" }, { "from": "human", "value": "<?php\n\nnamespace Omnipay\\AuthorizeNet\\Message;\n\n/**\n * Authorize.Net CIM Get payment profiles Response\n */\nclass CIMGetProfileResponse extends CIMCreatePaymentProfileResponse\n{\n ...
php
chosen
[ { "from": "system", "value": "Fix bug cannot update advanced section\n" }, { "from": "human", "value": "<?php namespace WebEd\\Base\\Providers;\n\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\ServiceProvider;\nuse WebEd\\Base\\Settings\\Http\\Controllers\\SettingController;\n\nclass ...
php
chosen
[ { "from": "system", "value": "Fix error in Update named constant declarations to include check that avoids duplicate declaration when package is required by different other packages\n" }, { "from": "human", "value": "<?php\r\n//Spreadsheet process or constants for PHPExcel wrapper\r\n/** CYMAPGT...
php
chosen
[ { "from": "system", "value": "Remove the password strength javascript from the login and checkout pages\n" }, { "from": "human", "value": "<?php\n\n/**\n * Change variable price display to show range, rather than the minimum price.\n **/\nadd_filter('woocommerce_variable_price_html', 'custom_var...
php
chosen
[ { "from": "system", "value": "Throw exception if sequence generator not found\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 w...
php
chosen
[ { "from": "system", "value": "Add a missing return statement\n" }, { "from": "human", "value": "<?php\n\nnamespace OpenCFP\\Domain\\Model;\n\nclass Favorite extends Eloquent\n{\n protected $table = 'favorites';\n public $timestamps = false;\n\n public function talk()\n {\n $th...
php
chosen
[ { "from": "system", "value": "Fix get_data in managed installs\n" }, { "from": "human", "value": "<?php \n\n/**\n * managedinstalls class\n *\n * @package munkireport\n * @author \n **/\nclass managedinstalls_controller extends Module_controller\n{\n\t\n\t/*** Protect methods with auth! ****/\n\...
php
chosen
[ { "from": "system", "value": "Fix logable listener to remove change_ when needed" }, { "from": "human", "value": "<?php\n\nnamespace NyroDev\\UtilityBundle\\Listener;\n\nuse Gedmo\\Loggable\\LoggableListener as SrcLoggableListener;\n\nclass LoggableListener extends SrcLoggableListener\n{\n pr...
php
chosen
[ { "from": "system", "value": "Add missing use statements to service factories\n" }, { "from": "human", "value": "<?php\n/**\n * Zend Framework (http://framework.zend.com/)\n *\n * @link http://github.com/zendframework/zf2 for the canonical source repository\n * @copyright Copyright (c) 2005...
php
chosen
[ { "from": "system", "value": "Change type check in encode to ctype_digit() for greater compatibility\n" }, { "from": "human", "value": "<?php\n\nnamespace Bijective;\n\n/**\n * @author Brian Freytag <brian@idltg.in>\n */\nclass BijectiveTranslator implements BijectiveInterface\n{\n /** @var s...
php
chosen
[ { "from": "system", "value": "Update boolean params to broaden ReflectorFactory::setBool tests\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the Composite Utils package.\n *\n * (c) Emily Shepherd <emily@emilyshepherd.me>\n *\n * For the full copyright and license inform...
php
chosen
[ { "from": "system", "value": "Create an instance of request for console interface.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Routing;\n\nclass RoutingServiceProvider extends \\Illuminate\\Routing...
php
chosen
[ { "from": "system", "value": "Add support to register subdirectory config for Laravel 5 packages.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Contracts\\Config;\n\ninterface PackageRepository\n{\n ...
php
chosen
[ { "from": "system", "value": "Allow ability to add require-dev packages from module to the main composer.json file\n" }, { "from": "human", "value": "<?php\n\nnamespace Nwidart\\Modules\\Process;\n\nclass Updater extends Runner\n{\n /**\n * Update the dependencies for the specified module...
php
chosen
[ { "from": "system", "value": "Fix destination be at current directory\n" }, { "from": "human", "value": "<?php\n\nnamespace FaizShukri\\Quran\\Supports;\n\nclass Config\n{\n private $config;\n\n public function __construct(array $config = [])\n {\n $this->config = $this->buildCon...
php
chosen
[ { "from": "system", "value": "Change ncmbClassName,apiPath to class constants.\n" }, { "from": "human", "value": "<?php\n\nnamespace Ncmb;\n\n/**\n * Role - Representation of an access Role.\n */\nclass Role extends Object\n{\n public static $ncmbClassName = 'role';\n public static $apiPat...
php
chosen
[ { "from": "system", "value": "Test query is actually created.\n" }, { "from": "human", "value": "<?php\nnamespace Gt\\Database\\Query;\n\nclass QueryFactoryTest extends \\PHPUnit_Framework_TestCase {\n\n/**\n * @dataProvider \\Gt\\Database\\Test\\Helper::queryPathExistsProvider\n */\npublic func...
php
chosen
[ { "from": "system", "value": "Use full row width for image field\n" }, { "from": "human", "value": "<div class=\"form-group {{ $errors->has('image') ? 'has-error' : '' }}\">\n <label class=\"col-md-3 control-label\" for=\"image\">{{ trans('general.image_upload') }}</label>\n <div class=\"c...
php
chosen
[ { "from": "system", "value": "Replace leftover app()->url() with UrlGenerator\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Flarum.\n *\n * For detailed copyright and license information, please view the\n * LICENSE file that was distributed with this source code.\n */\...
php
chosen
[ { "from": "system", "value": "Read the docs, setTo takes an array of addresses, which is the right way to do it, not implode it with commas.\n" }, { "from": "human", "value": "<?php\n\nnamespace BisonLab\\SakonninBundle\\Lib\\Sakonnin;\n\n/*\n */\n\nclass MailForward\n{\n\n protected $contain...
php
chosen
[ { "from": "system", "value": "Fix compatibility with null as routing key" }, { "from": "human", "value": "<?php\n\nnamespace Swarrot\\SwarrotBundle\\Event;\n\nuse Swarrot\\Broker\\Message;\n\nclass MessagePublishedEvent extends SymfonyEvent\n{\n const NAME = 'swarrot.message_published';\n\n ...
php
chosen
[ { "from": "system", "value": "Fix pathes to init and config file\n" }, { "from": "human", "value": "<?php\n\nrequire_once __DIR__.'/../../init.php';\n\n//var_dump($_SERVER);exit;\n\n$configPath = __DIR__.'/../../config/config.json';\n$configService = new Ric_Server_Config($configPath);\n$api = n...
php
chosen
[ { "from": "system", "value": "Check JSON data is valid.\n" }, { "from": "human", "value": "<?php\n\nnamespace SSRadio\\Common;\n\nclass Tracklist {\n\n\tpublic function __construct() {\n\t}\n\n\tpublic static function from_arp_json() {\n\t\t$tracklist = new Tracklist;\n\n\t\t// TODO: Process JSO...
php
chosen
[ { "from": "system", "value": "Fix output of remote collection items that lack YAML variables\n" }, { "from": "human", "value": "<?php namespace TightenCo\\Jigsaw\\Collection;\n\nuse Symfony\\Component\\Yaml\\Yaml;\nuse TightenCo\\Jigsaw\\Parsers\\FrontMatterParser;\n\nclass CollectionRemoteItem\...
php
chosen
[ { "from": "system", "value": "Add missing dependency provider for KwfDynamicAssetsVersion\n" }, { "from": "human", "value": "<?php\nclass Kwf_Assets_ProviderList_Maintenance extends Kwf_Assets_ProviderList_Abstract\n{\n public function __construct()\n {\n $providers = array();\n ...
php
chosen
[ { "from": "system", "value": "Fix user scope working when impersonating other users\n\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Scopes;\n\nuse Illuminate\\Database\\Eloquent\\Builder;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\Scope;\n\nclas...
php
chosen
[ { "from": "system", "value": "Make constructor final to prevent overriding in child class\n" }, { "from": "human", "value": "<?php\n/**\n * \n * @author newloki\n */\nnamespace Language\\Languages\\Indo\\English;\nuse Language\\Languages\\Indo\\IndoAbstract,\n Language\\Languages\\LanguagesEx...
php
chosen
[ { "from": "system", "value": "Fix failure with Symfony 2.8\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Paraunit\\Process;\n\nuse Paraunit\\Configuration\\EnvVariables;\nuse Paraunit\\Configuration\\PHPUnitConfig;\nuse Paraunit\\Configuration\\TempFilenameFac...
php
chosen
[ { "from": "system", "value": "Return array of retrieved values to support multiple tokens per user\n" }, { "from": "human", "value": "<?php\n\nnamespace NotificationChannels\\ExpoPushNotifications\\Repositories;\n\nuse ExponentPhpSDK\\ExpoRepository;\nuse NotificationChannels\\ExpoPushNotificati...
php
chosen
[ { "from": "system", "value": "Correct bug with lowPrice method\n\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse App\\Mail\\Contact;\nuse App\\Ticket;\nuse App\\User;\nuse Illuminate\\Http\\Request;\nuse Illuminate\\Support\\Facades\\Mail;\n\nclass AppControl...
php
chosen
[ { "from": "system", "value": "Include restricted fields in Elasticsearch mapping [WEB-2399]\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Models;\n\ntrait Transformable\n{\n\n public function transform(array $requestedFields = null)\n {\n $transformer = app('Resources')...
php
chosen
[ { "from": "system", "value": "Fix unexpected swoole sever crash on high concurrency operation\n\n`SplQueue` is operated using `enqueue()` and `dequeue()` not with `push()` and `pop()` which is for `Stack`.\r\n\r\n`SplQueue` is a `FIFO`, but use of `push/pop` turns it into `Stack` which is `LIFO`, this has c...
php
chosen
[ { "from": "system", "value": "Fix missing constants for CRONUS calculator\n" }, { "from": "human", "value": "<?php if (!defined('BASEPATH')) exit('No direct script access allowed');\n\nclass Calculator {\n\n function send($submitText, $calcType) {\n // prepare for a curl call\n ...
php
chosen
[ { "from": "system", "value": "Remove whitespace at end of line\n" }, { "from": "human", "value": "<?php\n\nnamespace Jstewmc\\Rtf\\Element\\Control\\Symbol;\n\n/**\n * The apostrophe control symbol (\"\\'hh\") is used to represent a non-ASCII\n * character from a Windows Code Page. The two digit...
php
chosen
[ { "from": "system", "value": "Make camalize method explictily public\n" }, { "from": "human", "value": "<?php\r\nnamespace Ayeo\\Parser\\Utils;\r\n\r\nclass Camelizer\r\n{\r\n function camelize($scored)\r\n {\r\n return lcfirst(implode('',array_map('ucfirst', array_map('strtolower',...
php
chosen
[ { "from": "system", "value": "Add wrapper element to licenses acct page\n" }, { "from": "human", "value": "<?php do_action( 'it_exchange_content_licenses_before_wrap' ); ?>\n<div id=\"it-exchange-licenses\" class=\"it-exchange-wrap it-exchange-account\">\n\t<?php do_action( 'it_exchange_content_...
php
chosen
[ { "from": "system", "value": "Add 'order' to allowed API-fields for ticketgroups\n" }, { "from": "human", "value": "<?php namespace Blindern\\UKA\\Billett;\n\nclass Ticketgroup extends \\Eloquent {\n protected $model_suffix = '';\n protected $table = 'ticketgroups';\n\n protected $apiAl...
php
chosen
[ { "from": "system", "value": "Improve 5.4 example error path\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Web Routes\n|--------------------------------------------------------------------------\n|\n| Here is where ...
php
chosen
[ { "from": "system", "value": "Move epom key to config.\n" }, { "from": "human", "value": "<?php\n\nclass CM_AdproviderAdapter_Epom extends CM_AdproviderAdapter_Abstract {\n\n public function getHtml($zoneData, array $variables) {\n $zoneId = CM_Util::htmlspecialchars($zoneData['zoneId'...
php
chosen
[ { "from": "system", "value": "Change shorthand array syntax to pre-5.4\n" }, { "from": "human", "value": "<?php\n\nuse ToniPeric\\Oib;\n\nclass OibTest extends PHPUnit_Framework_TestCase\n {\n /**\n * @test\n */\n function it_validates_a_single_oib()\n {\n $this->as...
php
chosen
[ { "from": "system", "value": "Use PHPUnit's equality constraint for query assertion\n" }, { "from": "human", "value": "<?php\nnamespace Helmich\\MongoMock\\Assert;\n\nuse Helmich\\MongoMock\\MockCollection;\nuse Helmich\\MongoMock\\Query;\n\nclass QueryWasExecutedConstraint extends \\PHPUnit_Fra...
php
chosen
[ { "from": "system", "value": "Add an optional second parameter to cache, used to conditionaly enable/disable caching\n" }, { "from": "human", "value": "<?php namespace Gchaincl\\LaravelFragmentCaching;\n\nclass ViewServiceProvider extends \\Illuminate\\View\\ViewServiceProvider\n{\n protected...
php
chosen
[ { "from": "system", "value": "Add more tests for RandomService\n" }, { "from": "human", "value": "<?php\n\nnamespace Raffle;\n\nfinal class RandomServiceTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @var RandomService\n */\n private $service;\n\n public function setUp()...
php
chosen
[ { "from": "system", "value": "Allow a string of multiple emails in message `to` field.\n" }, { "from": "human", "value": "<?php\n\nnamespace Ornamental\\Sender;\n\nclass Phpmailer implements \\Ornamental\\Sender\n{\n public $smtpHost;\n public $smtpUsername;\n public $smtpPassword;\n ...
php
chosen
[ { "from": "system", "value": "Use correct fields for address formatting\n" }, { "from": "human", "value": "<?php\n\nnamespace HbgEventImporter;\n\nclass Location extends \\HbgEventImporter\\Entity\\PostManager\n{\n public $post_type = 'location';\n\n public function afterSave()\n {\n ...
php
chosen
[ { "from": "system", "value": "Replace try_get_property with property access" }, { "from": "human", "value": "<?php\r\nnamespace tomlib\\object;\r\n\r\nfunction try_get_property($object, $name, $default = null) {\r\n\t\tif(property_exists($object, $name))\r\n\t\t\t\treturn $object->$name;\r\n\t\t...
php
chosen
[ { "from": "system", "value": "Use helpers instead of facade\n" }, { "from": "human", "value": "<?php\nnamespace Lio\\Exceptions;\n\nuse Auth;\nuse Bugsnag;\nuse Exception;\nuse Symfony\\Component\\HttpKernel\\Exception\\HttpException;\nuse Bugsnag\\BugsnagLaravel\\BugsnagExceptionHandler as Exce...
php
chosen
[ { "from": "system", "value": "Enable users to bootstrap sentinel after kohana initialization\n" }, { "from": "human", "value": "<?php\n\nnamespace Kohana\\Sentinel;\n\nuse Cartalyst\\Sentinel\\Native\\SentinelBootstrapper;\nuse Kohana;\n\nclass SentinelFactory\n{\n /**\n * @var SentinelBo...
php
chosen
[ { "from": "system", "value": "Add Author URI instead HTML\n\nHTML code in Plugin info block, breaks the markup." }, { "from": "human", "value": "<?php\n\n/*\nPlugin Name: Allow Forward Slashes in Short URLs\nPlugin URI: http://williambargent.co.uk\nDescription: Allow Forward Slashes in Short URL...
php
chosen
[ { "from": "system", "value": "Rework condition on cutom filter example\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 * @...
php
chosen
[ { "from": "system", "value": "Fix search:reindex to work with \"doc\"\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Console\\Commands;\n\nuse Elasticsearch;\n\nuse App\\Console\\Helpers\\Indexer;\n\nuse Aic\\Hub\\Foundation\\AbstractCommand as BaseCommand;\n\nclass SearchReindex ext...
php
chosen
[ { "from": "system", "value": "Fix Ghost execution bug and multiple execution bug\n\nhttp://www.concrete5.org/developers/bugs/5-6-2-1/ghost-execution-of-queuable-jobs/\r\nhttp://www.concrete5.org/developers/bugs/5-6-2-1/slices-of-many-queable-jobs-could-be-executed-together/" }, { "from": "human", ...
php
chosen
[ { "from": "system", "value": "Check for buffer before calling ob_end_clean()\n\nIf ob_end_clean() is called before ob_start() has been called, PHP will\nthrow an error. This ensures that the buffer is only terminated if it\nexists in the first place.\n\nIn addition, getRootAddress() has been removed.\n" }...
php
chosen
[ { "from": "system", "value": "Add indexes to service migration\n" }, { "from": "human", "value": "<?php\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Capsule\\Manager as Capsule;\n\nclass Service extends Migration\n{\n ...
php
chosen
[ { "from": "system", "value": "Fix a pass by reference, and don't create APIs for hidden directories\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Routing\\Router;\nuse Illuminate\\Foundation\\Support\\Providers\\RouteServiceProvider as ServiceProvider;\...
php
chosen
[ { "from": "system", "value": "Disable CSRF token validation, Recaptcha is redundant and can be revalidated if expired\n" }, { "from": "human", "value": "<?php\n\nnamespace Korko\\SecretSanta\\Http\\Middleware;\n\nuse Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken as BaseVerifier;\n\nc...
php
chosen
[ { "from": "system", "value": "Add content peeps to the db.\n" }, { "from": "human", "value": "<?php\n\nclass UsersTableSeeder extends Seeder {\n\n public function run()\n {\n $faker = Faker\\Factory::create();\n\n User::truncate();\n\n User::create([\n 'first_name' => 'Dave',\n ...
php
chosen
[ { "from": "system", "value": "Simplify stops download using stopinfo/stops API method\n" }, { "from": "human", "value": "<?php\nif(php_sapi_name() !== 'cli') die();\n\n$chars = 'aąbcćdeęfghijklłmnńoóprsśtuvwxyzżź0123456789';\n$len = mb_strlen($chars, 'UTF-8');\n\n$replacements = [\n\t'&Oacute;' ...
php
chosen
[ { "from": "system", "value": "[BC] Replace model.mail.beforeSend event with model.mailGetData local event\n\n" }, { "from": "human", "value": "<?php\n\nnamespace System\\Traits;\n\nuse Illuminate\\Support\\Facades\\Event;\nuse Illuminate\\Support\\Facades\\Mail;\n\ntrait SendsMailTemplate\n{\n ...
php
chosen
[ { "from": "system", "value": "Fix for legacy php versions\n" }, { "from": "human", "value": "<?php\nif(is_user_logged_in())\n return;\n\n$wordpress_login_enabled = WP_Auth0_Options::get('wordpress_login_enabled') == 1;\nif (!$wordpress_login_enabled || !isset($_GET['wle'])) {\n include ('a...
php
chosen
[ { "from": "system", "value": "Fix future query problems (current users not affected either way) [skip ci]\n" }, { "from": "human", "value": "<?php\n/**\n * 2016_06_16_000001_create_users_table.php\n * Copyright (C) 2016 thegrumpydictator@gmail.com\n *\n * This software may be modified and distri...
php
chosen