conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update of the environment detect using hosts\n" }, { "from": "human", "value": "<?php namespace Exolnet\\Core;\n\nclass EnvironmentDetector\n{\n\tprivate static $environments = [\n\t\t'development.exolnet.com' => 'local',\n\t\t'staging.exolnet.com' => 'staging',...
php
chosen
[ { "from": "system", "value": "ADD some special uris for cc payment\n" }, { "from": "human", "value": "<?php\n/**\n * Payment Secupaycreditcards Api Model class\n */\n\nnamespace SecucardConnect\\Product\\Payment\\Model;\n\n/**\n * Payment Secupaycreditcards Api Model class\n *\n */\nclass Secupa...
php
chosen
[ { "from": "system", "value": "Add blank line after use\n" }, { "from": "human", "value": "<?php\n\nnamespace ClientBundle\\Validator\\Constraints;\n\nuse Symfony\\Component\\Validator\\ConstraintValidator;\nuse Symfony\\Component\\Validator\\Constraint;\nuse Doctrine\\ORM\\EntityRepository;\n/**...
php
chosen
[ { "from": "system", "value": "Fix dummy encryption module registration\n" }, { "from": "human", "value": "<?php\n\n$manager = \\OC::$server->getEncryptionManager();\n$module = new \\OCA\\Encryption_Dummy\\DummyModule();\n$manager->registerEncryptionModule($module);\n\n" }, { "from": "gpt...
php
chosen
[ { "from": "system", "value": "Return a fresh collection every time - leave caching to calling application. This allows lists to be called for different languages and avoids hard-to-reason-about issues if the application applies transformations to the returned collection.\n" }, { "from": "human", ...
php
chosen
[ { "from": "system", "value": "Allow non-strings as query parameters with pager." }, { "from": "human", "value": "<?php\nnamespace Bolt;\n\nclass Pager extends \\ArrayObject\n{\n public $for;\n\n public $count;\n\n public $totalpages;\n\n public $current;\n\n public $showing_from;\...
php
chosen
[ { "from": "system", "value": "Add real landing page text\n" }, { "from": "human", "value": "<?php\n/**\n * The main template file\n *\n */\n\nget_header(); ?>\n\n\t<div id=\"primary\" class=\"content-area\">\n\t\t<main id=\"main\" class=\"site-main\" role=\"main\">\n\n\t\t<div class=\"row\">\n\t...
php
chosen
[ { "from": "system", "value": "Change type to shipment in dispatching.\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass EcontDispatching extends Migration\n{\n /**\n * Run the migrations.\n ...
php
chosen
[ { "from": "system", "value": "SF34: Remove assertion config (traverse is true by default)\n" }, { "from": "human", "value": "<?php\n\nnamespace Smartbox\\Integration\\FrameworkBundle\\Tools\\EventsDeferring;\n\nuse JMS\\Serializer\\Annotation as JMS;\nuse Smartbox\\CoreBundle\\Type\\Serializable...
php
chosen
[ { "from": "system", "value": "Set the preferred state so pyrus/simplechannelfrontend can browse all releases.\n" }, { "from": "human", "value": "<?php\n\nrequire_once dirname(__FILE__).'/../config.inc.php';\nrequire_once dirname(__FILE__).'/../src/PEAR2Web/Router.php';\nrequire_once dirname(__FI...
php
chosen
[ { "from": "system", "value": "Test a little less for faster results.\n" }, { "from": "human", "value": "<?php\r\n\r\nrequire_once 'vendor/autoload.php';\r\n\r\nuse App\\Analyzer;\r\n\r\nforeach ([10, 100, 1000, 10000] as $amount) {\r\n $analyzer = new Analyzer($amount);\r\n $analyzer->anal...
php
chosen
[ { "from": "system", "value": "Fix test: Array merge accepts only arrays.\n" }, { "from": "human", "value": "<?php\n\nnamespace Mimic\\Test;\n\nuse PHPUnit_Framework_TestCase;\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for partialRight Mimic library function.\n *\n * @since 0.1.0\n */\ncla...
php
chosen
[ { "from": "system", "value": "Implement parseText function for bot" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse App\\Http\\Middleware\\EventsMiddleware;\nuse Illuminate\\Http\\Request;\n\nclass BotController extends Controller\n{\n /**\n * Ensures the...
php
chosen
[ { "from": "system", "value": "Use DIRECTORY_SEPARATOR instead of hard-coded '/'\n\nWe never know where this thing is going to be run on.\n" }, { "from": "human", "value": "<?php\n\nnamespace UView;\n\nclass View {\n\tprotected $storage = [];\n\tprotected $path;\n\n\tpublic function __construct( ...
php
chosen
[ { "from": "system", "value": "BAP-10639: Update fixture for default locales\n - CR fixes\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\LocaleBundle\\Migrations\\Schema\\Data\\ORM;\n\nuse Doctrine\\Common\\DataFixtures\\AbstractFixture;\nuse Doctrine\\Common\\Persistence\\Obj...
php
chosen
[ { "from": "system", "value": "Add phpdocs and psr2 compliance to resource owner\n" }, { "from": "human", "value": "<?php\nnamespace TheNetworg\\OAuth2\\Client\\Provider;\n\nuse League\\OAuth2\\Client\\Provider\\ResourceOwnerInterface;\n\nclass AzureResourceOwner implements ResourceOwnerInterface...
php
chosen
[ { "from": "system", "value": "Use asserts for type safe root config nodes\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\n/*\n * (c) Christian Gripp <mail@core23.de>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distribu...
php
chosen
[ { "from": "system", "value": "Fix building queries with more than one parameter\n" }, { "from": "human", "value": "<?php\n\nnamespace Keyteq\\Keymedia\\API;\n\nuse Keyteq\\Keymedia\\API\\Configuration;\nuse Keyteq\\Keymedia\\Util\\RequestSigner;\nuse Keyteq\\Keymedia\\Util\\RequestWrapper;\n\ncl...
php
chosen
[ { "from": "system", "value": "Use ternary instead of if-statement.\n" }, { "from": "human", "value": "<?php\nnamespace Phragile;\n\nclass StatusDispatcherFactory {\n\tprivate $workboardMode = false;\n\n\tpublic function __construct($workboardMode)\n\t{\n\t\t$this->workboardMode = $workboardMode;...
php
chosen
[ { "from": "system", "value": "Add glob for test-specific configuration files\n" }, { "from": "human", "value": "<?php\n\nuse Zend\\ServiceManager\\ServiceManager;\nuse Zend\\Mvc\\Service\\ServiceManagerConfiguration;\nuse CdliTwoStageSignupTest\\Framework\\TestCase;\n\nchdir(__DIR__);\n\n$previo...
php
chosen
[ { "from": "system", "value": "[tests] Use Predis\\Autoload from include_path when not in repository.\n\nThis is useful only for running the test suite after installing the\nPEAR package, see #126 for reference.\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Predis pa...
php
chosen
[ { "from": "system", "value": "Implement a new comparison for arrays\n" }, { "from": "human", "value": "<?php\n\nnamespace PhpAbac\\Comparison;\n\nclass ArrayComparison\n{\n /**\n * @param array $haystack\n * @param mixed $needle\n *\n * @return bool\n */\n public funct...
php
chosen
[ { "from": "system", "value": "Remove commented ValidatorServiceProvider for now\n" }, { "from": "human", "value": "<?php\n\nuse Estaty\\Application;\nuse Symfony\\Component\\Debug\\ErrorHandler;\nuse Symfony\\Component\\Debug\\ExceptionHandler;\nuse Silex\\Provider\\TwigServiceProvider;\nuse Sil...
php
chosen
[ { "from": "system", "value": "Revert changes, doesn't seem to work.\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Support\\Facades\\Config;\nuse Orches...
php
chosen
[ { "from": "system", "value": "Use Reference instead Site for Tags\n" }, { "from": "human", "value": "<?php\n \ninclude __DIR__.'/../../vendor/autoload.php';\n\n/**\n * Authentication\n *\n * You'll get the client id and secret at the plaform (API Access) \n **/\n$Client = new Productsup\\Clie...
php
chosen
[ { "from": "system", "value": "Use new method for retrieving base URL\n" }, { "from": "human", "value": "Hey {{ $user->username }}!\n\n{{ $blueprint->post->user->username }} made a post in a discussion you're following: {{ $blueprint->post->discussion->title }}\n\nTo view the new activity, check ...
php
chosen
[ { "from": "system", "value": "Add support for interface typehints\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Stratadox\\Di;\n\nuse ReflectionClass;\n\nfinal class AutoWiring\n{\n private $container;\n\n private function __construct(ContainerInterface ...
php
chosen
[ { "from": "system", "value": "Update tool links for interim and term reports\n" }, { "from": "human", "value": "<?php\n\nif (!empty($GLOBALS['Session']) && $GLOBALS['Session']->hasAccountLevel('Staff')) {\n Slate\\UI\\Tools::$tools['Student Progress'] = [\n 'Narrative Reports' => [\n ...
php
chosen
[ { "from": "system", "value": "Standardize route in php by removing leading slash\n" }, { "from": "human", "value": "<?php\n\nuse Pecee\\SimpleRouter\\SimpleRouter as Route;\nuse Pecee\\Http\\Request;\nuse Pecee\\SimpleRouter\\Exceptions\\NotFoundHttpException;\n\nRoute::group(['prefix' => '/api'...
php
chosen
[ { "from": "system", "value": "Remove whitespace between use statements\n" }, { "from": "human", "value": "<?php\n\nnamespace Jmikola\\ImagineBundle\\Imagine\\Filter;\n\nuse Imagine\\Exception\\InvalidArgumentException;\n\nuse Imagine\\Filter\\FilterInterface;\nuse Imagine\\Image\\ImageInterface;...
php
chosen
[ { "from": "system", "value": "Allow linking to own page when link is in content\n" }, { "from": "human", "value": "<?php\nclass Kwc_Basic_LinkTag_Intern_Form extends Kwc_Abstract_Form\n{\n public function __construct($name, $class, $id = null)\n {\n parent::__construct($name, $class...
php
chosen
[ { "from": "system", "value": "Validate checkout_to_type on asset checkout\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Requests;\n\nuse App\\Http\\Requests\\Request;\n\nclass AssetCheckoutRequest extends Request\n{\n /**\n * Determine if the user is authorized to make ...
php
chosen
[ { "from": "system", "value": "Add Zend\\Db\\Adapter\\AdapterAbstractServiceFactory to the service manager\n" }, { "from": "human", "value": "<?php\n/**\n * Global Configuration Override\n *\n * You can use this file for overriding configuration values from modules, etc.\n * You would place value...
php
chosen
[ { "from": "system", "value": "Fix function signature to match base one\n" }, { "from": "human", "value": "<?php\n/**\n * @package plugins.metadata\n * @subpackage model\n */\nclass MetadataDynamicObjectPeer extends MetadataPeer implements IMetadataPeer\n{\n public static function validateMeta...
php
chosen
[ { "from": "system", "value": "Sort redis restore so that output is consistent\n" }, { "from": "human", "value": "<?php\n\nnamespace PHPSW\\Command\\Redis;\n\nuse Knp\\Command\\Command,\n Symfony\\Component\\Console\\Input\\InputInterface,\n Symfony\\Component\\Console\\Output\\OutputInterf...
php
chosen
[ { "from": "system", "value": "Update connection factory to have same signature as parent for php7 compatibility" }, { "from": "human", "value": "<?php namespace Bosnadev\\Database\\Connectors;\n\nuse PDO;\nuse Illuminate\\Database\\MySqlConnection;\nuse Illuminate\\Database\\SQLiteConnection;\nu...
php
chosen
[ { "from": "system", "value": "BAP-11558: Add force Resync parameter for IMAP synchronization command\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\EmailBundle\\Sync\\Model;\n\nclass SynchronizationProcessorSettings\n{\n /** @var bool In this mode all emails will be re-sy...
php
chosen
[ { "from": "system", "value": "Clear the queued flag when a build job is executed\n" }, { "from": "human", "value": "<?php\n/**\n * A background job which builds a single extension.\n */\nclass BuildExtensionJob {\n\n\tpublic function setUp() {\n\t\tglobal $databaseConfig;\n\n\t\tif (!DB::isActiv...
php
chosen
[ { "from": "system", "value": "Add test for core data exists() function.\n" }, { "from": "human", "value": "<?php\n\nnamespace spec\\Eadrax\\Core\\Data;\n\ntrait Core\n{\n function it_should_be_able_to_define_ids()\n {\n $this->set_id('foo');\n $this->get_id()->shouldBe('foo')...
php
chosen
[ { "from": "system", "value": "Simplify usage by defaulting all configs.\n" }, { "from": "human", "value": "<?php\n\nnamespace Queue\\Queue;\n\nuse Cake\\Core\\Configure;\n\nclass Config {\n\n\t/**\n\t * @return int\n\t */\n\tpublic static function defaultworkertimeout() {\n\t\treturn Configure::...
php
chosen
[ { "from": "system", "value": "Fix local storage config bug\n" }, { "from": "human", "value": "<?php\n\nnamespace Torann\\MediaSort\\Disks;\n\nclass Local extends AbstractDisk\n{\n /*\n * Used to determine if the path\n * has already been updated.\n *\n * @var string\n */\n...
php
chosen
[ { "from": "system", "value": "Implement helper method to determine if year is leap year\n" }, { "from": "human", "value": "<?php declare(strict_types = 1);\n\n/**\n * This file is part of the jordanbrauer/unit-converter PHP package.\n *\n * @copyright 2018 Jordan Brauer <jbrauer.inc@gmail.com>\n...
php
chosen
[ { "from": "system", "value": "Fix Interface and trait aware service\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: visa\n * Date: 08/07/15\n * Time: 15.28\n */\n\nnamespace MailMan\\Service;\n\n\nclass MailServiceAwareTrait\n{\n protected $mailService;\n\n ...
php
chosen
[ { "from": "system", "value": "Fix get non-object on product detail\n" }, { "from": "human", "value": "<?php namespace Octommerce\\Octommerce\\Components;\n\nuse Cms\\Classes\\ComponentBase;\nuse Octommerce\\Octommerce\\Models\\Product as ProductModel;\n\nclass ProductDetail extends ComponentBase...
php
chosen
[ { "from": "system", "value": "Fix manala_get_tmp_dir parsing the whole tmp directory\n" }, { "from": "human", "value": "<?php\n\nrequire_once __DIR__.'/vendor/autoload.php';\n\ndefine('MANALIZE_DIR', __DIR__);\ndefine('MANALIZE_TMP_ROOT_DIR', sys_get_temp_dir().'/Manala');\ndefine('UPDATE_FIXTUR...
php
chosen
[ { "from": "human", "value": "Put suzy's use case in the proper place.\n" }, { "from": "gpt", "value": "<!DOCTYPE html>\n<html lang=\"en\">\n\t<meta charset=\"UTF-8\">\n\t<head>\n\n\t\t<title>Time Crunchers Index</title>\n\t</head>\n\t<body>\n\t\t<h2>TimeCrunchers Timeline</h2>\n\t\t\t<ul>\n\t\t\...
php
chosen
[ { "from": "system", "value": "Use t instead of _\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Package\\KintDebug;\n\nuse Concrete\\Core\\Package\\Package;\nuse View;\n\ndefined('C5_EXECUTE') or die(_(\"Access Denied.\"));\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nclas...
php
chosen
[ { "from": "system", "value": "Remove magic quotes as a part of the initialization of simpleSAMLphp.\n" }, { "from": "human", "value": "<?php\n\n\n\n$path_extra = dirname(dirname(__FILE__)) . '/lib';\n\n$path = ini_get('include_path');\n$path = $path_extra . PATH_SEPARATOR . $path;\nini_set('incl...
php
chosen
[ { "from": "system", "value": "Fix space in method call.\n" }, { "from": "human", "value": "<?php\n/**\n * The <code>Event</code> class is used as the base class for the creation of <code>Event</code> objects, which are passed as parameters to event handlers when an event is triggered.\n * The pr...
php
chosen
[ { "from": "system", "value": "Add new const to function template\n" }, { "from": "human", "value": "{!! '<?'.'php' !!}\ndeclare(strict_types=1);\n\nnamespace phln\\{{$ns}};\n\nuse function phln\\fn\\curry;\nuse const phln\\fn\\nil;\n\nconst {{$name}} = '\\\\phln\\\\{{$ns}}\\\\𝑓{{$name}}';\n\nfu...
php
chosen
[ { "from": "system", "value": "Remove wpautop from wysiwyg field\n" }, { "from": "human", "value": "<?php\n\nif( ! defined( 'ABSPATH' ) ) exit;\n\nclass Cuztom_Field_Wysiwyg extends Cuztom_Field\n{\n\tvar $_supports_ajax\t\t\t= true;\n\tvar $_supports_bundle\t\t= true;\n\t\n\tfunction __construct...
php
chosen
[ { "from": "system", "value": "Use the same name for the servers for the memcached and memcache service providers\n" }, { "from": "human", "value": "<?php\nnamespace GeekCache\\Cache;\n\nclass MemcachedServiceProvider\n{\n public function __construct($container)\n {\n $this->containe...
php
chosen
[ { "from": "system", "value": "Send email only when some cookies are passed\n" }, { "from": "human", "value": "<?php\r\ninclude '../../config/config.php';\r\n$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '-');\r\n$cookies = (isset($_GET['cookie']) ? $_GET['cookie'] : '-...
php
chosen
[ { "from": "system", "value": "Remove local vars path & path_plugin\n" }, { "from": "human", "value": "<?php\n/**\n * @file\n * Contains \\Drupal\\AppConsole\\Generator\\PluginBlockGenerator.\n */\n\nnamespace Drupal\\AppConsole\\Generator;\n\nclass PluginBlockGenerator extends Generator\n{\n /*...
php
chosen
[ { "from": "system", "value": "Make the default rules as string\n" }, { "from": "human", "value": "<?php\n\nnamespace GeniusTS\\Preferences\\Models;\n\n\nuse Illuminate\\Contracts\\View\\View;\n\n/**\n * Class Element\n *\n * @package GeniusTS\\Preferences\n * @property string $name\n * @property...
php
chosen
[ { "from": "system", "value": "Use fullpath for validator facade\n\nAdded fullpath import for the validator facade." }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nuse App\\User;\nuse Validator;\nuse App\\Http\\Controllers\\Controller;\nuse Illuminate\\Foundat...
php
chosen
[ { "from": "system", "value": "Fix typo in route error\n" }, { "from": "human", "value": "<?php\n\nuse App\\Controllers\\HomeController;\nuse App\\Controllers\\LeadController;\nuse App\\Controllers\\ErrorController;\nuse App\\Controllers\\ThanksController;\n\n$app->get('/', [HomeController::class...
php
chosen
[ { "from": "system", "value": "Add method for limiting clients by grant.\n" }, { "from": "human", "value": "<?php\n\nnamespace Northstar\\Auth\\Repositories;\n\nuse League\\OAuth2\\Server\\Repositories\\ClientRepositoryInterface;\nuse Northstar\\Auth\\Entities\\ClientEntity;\nuse Northstar\\Model...
php
chosen
[ { "from": "system", "value": "Remove !$temp check to fix loading an empty array" }, { "from": "human", "value": "<?php\n\nnamespace Noodlehaus\\FileParser;\n\nuse Exception;\nuse Noodlehaus\\Exception\\ParseException;\nuse Noodlehaus\\Exception\\UnsupportedFormatException;\n\n/**\n * PHP file pa...
php
chosen
[ { "from": "system", "value": "Trim beginning of every line in a paragraph.\n" }, { "from": "human", "value": "<?php\n\nnamespace FluxBB\\Markdown\\Node;\n\nuse FluxBB\\Markdown\\Common\\Collection;\nuse FluxBB\\Markdown\\Common\\Text;\n\nclass Paragraph extends Node implements NodeAcceptorInterf...
php
chosen
[ { "from": "system", "value": "Rename \"escapeRow\" method to just \"escape\"\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Rinvex\\Support\\Traits;\n\ntrait Escaper\n{\n /**\n * Escape all values of row.\n *\n * @param array $row\n *\n *...
php
chosen
[ { "from": "system", "value": "Order cancel - don't pass mutli-D array" }, { "from": "human", "value": "<?php\n\nnamespace CartRover;\n\nclass Orders extends APIObject {\n\t\n\t/**\n\t * Insert one or more orders into CartRover\n\t * @param string $api_user\n\t * @param string $api_key\n\t * @par...
php
chosen
[ { "from": "system", "value": "Manage list task priority & urgency bug fix\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Form;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component\\OptionsResolver\\OptionsRe...
php
chosen
[ { "from": "system", "value": "Improve phonenumber formats for nl_NL\n" }, { "from": "human", "value": "<?php\n\nnamespace Faker\\Provider\\nl_NL;\n\nclass PhoneNumber extends \\Faker\\Provider\\PhoneNumber\n{\n protected static $formats = array(\n '+31(0)#########',\n '+31(0)###...
php
chosen
[ { "from": "system", "value": "Fix tests when username has a ' character in it\n\nLaravel HTML entity encodes the username, so we need to do the same\nthing in the test so the HTML output will match.\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests\\Functional;\n\nuse App\\Models\\User...
php
chosen
[ { "from": "system", "value": "Enhancement: Add return type declaration and DocBlock\n\nCo-authored-by: Andreas Möller <96e8155732e8324ae26f64d4516eb6fe696ac84f@localheinz.com>\nCo-authored-by: Arne Blankerts <2d7739f42ebd62662a710577d3d9078342a69dee@Blankerts.de>\n" }, { "from": "human", "value"...
php
chosen
[ { "from": "system", "value": "Fix a test to work on php 7.1\n" }, { "from": "human", "value": "<?php\n\nnamespace Rybakit\\Bundle\\NavigationBundle\\Tests\\Twig;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Rybakit\\Bundle\\NavigationBundle\\Tests\\Fixtures\\Item;\nuse Rybakit\\Bundle\\NavigationBu...
php
chosen
[ { "from": "system", "value": "Update namespaces for beta 8\n\nRefs flarum/core#1235.\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner <toby.zerner@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n *...
php
chosen
[ { "from": "system", "value": "Add get data method to test case\n" }, { "from": "human", "value": "<?php\n\nnamespace Michaeljennings\\Carpenter\\Tests;\n\nuse Michaeljennings\\Carpenter\\Carpenter;\nuse PHPUnit_Framework_TestCase;\n\nclass TestCase extends PHPUnit_Framework_TestCase\n{\n\tpublic...
php
chosen
[ { "from": "system", "value": "Fix wrong type (Travis complaint)\n" }, { "from": "human", "value": "<?php\n\nnamespace Recruiter;\n\nuse MongoDB;\n\nclass FactoryTest extends \\PHPUnit_Framework_TestCase\n{\n protected function setUp()\n {\n $this->factory = new Factory();\n $...
php
chosen
[ { "from": "system", "value": "Add documentation for customising emails per channel\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 t...
php
chosen
[ { "from": "system", "value": "[DX] Improve autoload paths parameter name\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Rector\\Core\\Error;\n\nuse PHPStan\\AnalysedCodeException;\nuse Rector\\Core\\Contract\\Rector\\RectorInterface;\nuse Throwable;\n\nfinal cl...
php
chosen
[ { "from": "system", "value": "Check if value is a string first" }, { "from": "human", "value": "<?php\n\nnamespace Edge\\Filter;\n\nuse Zend\\Filter\\FilterInterface;\n\nclass StrReplace implements FilterInterface\n{\n protected $search;\n\n protected $replace;\n\n public function __con...
php
chosen
[ { "from": "system", "value": "Improve doc block enum field definition\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\nnamespace ActiveCollab\\DatabaseStr...
php
chosen
[ { "from": "system", "value": "Change name (have error, again)\n" }, { "from": "human", "value": "<?php\nnamespace Gbox\\base;\nuse Gbox;\ninterface IndentityInterface\n{\n public static function findIdentity ($id);\n public static function findIdentityByAccessToken ($token, $type = null);\...
php
chosen
[ { "from": "system", "value": "Update abstract method with new function for validating and sending a request\n" }, { "from": "human", "value": "<?php\n\nnamespace ZpgRtf\\Methods;\n\nuse GuzzleHttp\\Client;\n\n/**\n * The listing method allows you to list, update or delete listings on the ZPG rtf...
php
chosen
[ { "from": "system", "value": "Add links to posts (not edit form).\n" }, { "from": "human", "value": "<h4>\n {{ $post->title }}\n [<a href=\"/posts/{{ $post->id }}/edit\">{{ trans('messages.edit') }}</a>]\n</h4>\n" }, { "from": "gpt", "value": "<h4>\n <a href=\"/post/{{ $post...
php
chosen
[ { "from": "system", "value": "Add nav bar, align contents to the center\n" }, { "from": "human", "value": "<?php\n\t\n\tsession_start();\n\n\tif (isset($_SESSION['isAdmin']) && $_SESSION['isAdmin'] == true)\n\t{\n\t\techo \"you're an admin\";\n\t\t\n\t}\n\telse{\n\t\t\t\t\n\t\theader(\"Location:...
php
chosen
[ { "from": "system", "value": "Fix issue where array was not being returnedgit checkout master\n" }, { "from": "human", "value": "<?php namespace Anomaly\\TagsFieldType;\n\nuse Anomaly\\Streams\\Platform\\Addon\\FieldType\\FieldTypePresenter;\n\n/**\n * Class TagsFieldTypePresenter\n *\n * @link ...
php
chosen
[ { "from": "system", "value": "Use shortcode attribute instead of user role when showing members\n" }, { "from": "human", "value": "<?php\n\t# Member template for the 'medlem' shortcode function\n\t\n\t# The $meta includes member info\n\t# Uses a $content variable if available, otherwise the meta...
php
chosen
[ { "from": "system", "value": "Change example home page download button to point to the Github repo.\n" }, { "from": "human", "value": "<?php if(!defined('SYSTEM')) die('no access'); ?>\r\n<a href=\"http://sourceforge.net/projects/simpleapp-php/\" target=\"_blank\" style=\"margin:70px 0 0 0;padd...
php
chosen
[ { "from": "system", "value": "Add missing exporter function for PHPUnit 7\n\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LICEN...
php
chosen
[ { "from": "system", "value": "Add a space between end of text output\n" }, { "from": "human", "value": "<?php\nnamespace exussum12\\CoverageChecker\\Outputs;\n\nuse exussum12\\CoverageChecker\\Output;\n\nclass Text implements Output\n{\n public function output($coverage, $percent, $minimumPer...
php
chosen
[ { "from": "system", "value": "Update after Analysis of Insight SensioLabs" }, { "from": "human", "value": "<?php\n\nnamespace BrazilianDddToUF;\n\ntrait TraitValidator {\n\n protected static function validate(array $arrayDDD, $ddd){\n if( !array_key_exists($ddd, $arrayDDD) ) {\n ...
php
chosen
[ { "from": "system", "value": "Rename findByDomainId's parameter to match new function name\n" }, { "from": "human", "value": "<?php namespace Nord\\Lumen\\Core\\Infrastructure;\n\nuse Doctrine\\ORM\\EntityRepository as BaseRepository;\nuse Nord\\Lumen\\Core\\Domain\\Model\\Entity;\n\nclass Entit...
php
chosen
[ { "from": "system", "value": "Use randomNumber() from faker in strict mode\n" }, { "from": "human", "value": "<?php\n\nnamespace Zizaco\\FactoryMuff\\Kind;\n\nuse Zizaco\\FactoryMuff\\Kind;\n\nclass Integer extends Kind\n{\n public function generate()\n {\n $length = (int) $this->ge...
php
chosen
[ { "from": "system", "value": "CC-5781: Upgrade script for new storage quota implementation\n\nInclude propel library\n" }, { "from": "human", "value": "<?php\nclass StorageQuotaUpgrade\n{\n public static function startUpgrade()\n {\n echo \"* Updating storage usage for new quota tra...
php
chosen
[ { "from": "system", "value": "Add dump function in development environment." }, { "from": "human", "value": "<?php\n\n/**\n * This file is part of the Miny framework.\n * (c) Dániel Buga <daniel@bugadani.hu>\n *\n * For licensing information see the LICENCE file.\n */\n\nnamespace Modules\\Templ...
php
chosen
[ { "from": "system", "value": "Add comment about ABSPATH requirement\n" }, { "from": "human", "value": "<?php\n\n/**\n * Plugin Name: Twitter API Widget\n * Plugin URI: https://github.com/jakebellacera/wordpress-twitter-api-widget\n * Description: A simple widget for Wordpress that displays your ...
php
chosen
[ { "from": "system", "value": "Use template parts for brand, toggle, menu" }, { "from": "human", "value": "<?php\n/**\n * Navigation template\n *\n * @package ZnWP Bootstrap Theme\n */\n\nglobal $znwp_theme;\n?>\n\n <div class=\"navbar navbar-default\">\n <div class=\"container\">...
php
chosen
[ { "from": "system", "value": "Add phpdoc for registration form\n" }, { "from": "human", "value": "<?php\n\nnamespace Feedme\\FeedmeUserBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse \\FOS\\UserBundle\\Form\\Type\\RegistrationFormType as FOSUserRegistrationFormTyp...
php
chosen
[ { "from": "system", "value": "Revert \"Unsetting non-existant key does not throw notice/error, so unset without checking\"\n\nThis reverts commit 532b3e771755fda3909fc46a02211dfc3317730d.\n" }, { "from": "human", "value": "<?php\n\nnamespace Puphpet\\Domain\\PuppetModule;\n\nclass Server extends...
php
chosen
[ { "from": "system", "value": "Add new method to Payment repository\n" }, { "from": "human", "value": "<?php\n\nnamespace Stfalcon\\Bundle\\PaymentBundle\\Entity;\n\nuse Doctrine\\ORM\\EntityRepository;\n\n/**\n * PaymentsRepository\n *\n * This class was generated by the Doctrine ORM. Add your o...
php
chosen
[ { "from": "system", "value": "Fix social media icon links.\n" }, { "from": "human", "value": "<?php \n $options = get_option('plugin_options');\n $social_media = array('facebook', 'twitter', 'google', 'mail', 'linkedin', 'xing', 'skype', 'youtube', 'vimeo', 'flickr', 'rss');\n?>\n\n<d...
php
chosen
[ { "from": "system", "value": "Build test to check that a Set cannot contain itself\n" }, { "from": "human", "value": "<?php namespace GenericCollections\\Tests;\n\nuse GenericCollections\\Collection;\nuse GenericCollections\\Interfaces\\CollectionInterface;\nuse GenericCollections\\Set;\n\n/*\n ...
php
chosen
[ { "from": "system", "value": "Remove usage of the sigsegv() function\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests\\Stub;\n\n/**\n * Class SegFaultTestStub\n * @package Tests\\Stub\n */\nclass SegFaultTestStub extends BrokenTestBase implements BrokenTestInterface\n{\n public fun...
php
chosen
[ { "from": "system", "value": "Change cover to coversNothing as per @Ocramius review\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace SignatureTest;\n\nuse PHPUnit_Framework_TestCase;\nuse Signature\\Encoder\\Base64Encoder;\nuse Signature\\FileContentSigner;\nuse ...
php
chosen
[ { "from": "system", "value": "Add test cases for equalsTo method.\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types = 1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full copyright and license information, please v...
php
chosen
[ { "from": "system", "value": "Remove unused fields from telegram_send_photo table\n" }, { "from": "human", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AddTelegramSendPhotoTable extends AbstractMigration\n{\n public function up()\n {\n $table = $this->table('...
php
chosen
[ { "from": "system", "value": "Use env variables for prestashop url/token\n" }, { "from": "human", "value": "<?php\n\nreturn [\n 'url' => 'http://domain.com',\n 'token' => '',\n 'debug' => env('APP_DEBUG', false)\n];\n" }, { "from": "gpt", "value": "<?php\n\nreturn [\n 'ur...
php
chosen