conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Send a email as test in sms inbound\n" }, { "from": "human", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symf...
php
chosen
[ { "from": "system", "value": "BAP-12009: Create command oro:debug:condition\n - CR fixes\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\ActionBundle\\Tests\\Unit\\Command;\n\nuse Oro\\Bundle\\ActionBundle\\Command\\DebugConditionCommand;\n\nclass DebugConditionCommandTest ext...
php
chosen
[ { "from": "system", "value": "Update because CakePHP version changed\n" }, { "from": "human", "value": "<?php\n\n/**\n * Class UnitsController\n * Actions related to dealing with units\n * @author Stuart Chalk <schalk@unf.edu>\n *\n */\nclass UnitsController extends AppController\n{\n\n publi...
php
chosen
[ { "from": "system", "value": "Allow date without time with date injector\n" }, { "from": "human", "value": "<?php\nnamespace Maphper\\Lib;\n//Replaces dates in an object graph with \\DateTime instances\nclass DateInjector {\n\tprivate $processCache;\n\n\tpublic function replaceDates($obj, $reset...
php
chosen
[ { "from": "system", "value": "t285: Order language tree by key name\n" }, { "from": "human", "value": "<?php\n\nclass CM_Tree_Language extends CM_Tree_Abstract {\n\n\tprotected $_rootId = '.';\n\n\t/**\n\t * @param array|null $params\n\t */\n\tpublic function __construct($params = null) {\n\t\tp...
php
chosen
[ { "from": "system", "value": "Use of @component for buttons in form\n" }, { "from": "human", "value": "@section('js')\n <script src=\"{{ asset('components/ckeditor/ckeditor.js') }}\"></script>\n@endsection\n\n@include('core::admin._buttons-form')\n\n{!! BootForm::hidden('id') !!}\n\n{!! BootF...
php
chosen
[ { "from": "system", "value": "Add service name for parameter replacement fetcher\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the PcdxParameterEncryptionBundle package.\n *\n * (c) picodexter <https://picodexter.io/>\n *\n * For the full copyright and license informati...
php
chosen
[ { "from": "system", "value": "CC-5781: Upgrade script for new storage quota implementation\n" }, { "from": "human", "value": "<?php\n\n// Define path to application directory\ndefined('APPLICATION_PATH')\n || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../../install_minimal/....
php
chosen
[ { "from": "system", "value": "Save dashboard panel visibility only when needed\n" }, { "from": "human", "value": "<?php\nif (Request::getInstance()->get('_ccm_dashboard_external')) {\n return;\n}\n?>\n</div>\n</div>\n\n<?php View::element('footer_required', ['disableTrackingCode' => true]); ?...
php
chosen
[ { "from": "system", "value": "Add notification count fields to the user table.\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateUsersTable extends Migration {\n\n\t/**\n\t * Run the migration...
php
chosen
[ { "from": "system", "value": "Use as 1st argument for CLI.\n" }, { "from": "human", "value": "<?php\n\n/**\n * Add here as many arguments as segments you want to be used on your URIs or as arguments to the\n * CLI runner.\n */\n\n\nif(PHP_SAPI == 'cli') {\n\t$arguments_structure = array(\n\t\t'...
php
chosen
[ { "from": "system", "value": "Remove toArray as it is now handled by ArrayAccess\n" }, { "from": "human", "value": "<?php\n\nnamespace Basemkhirat\\Elasticsearch;\n\nuse Illuminate\\Support\\Collection as BaseCollection;\n\n\nclass Collection extends BaseCollection\n{\n\n /**\n * Get the ...
php
chosen
[ { "from": "system", "value": "Fix config name typo in SetupCheckPygment\n\nSummary:\nUse correct spelling of 'environment.append-paths' so that the current\nvalue of the variable will display as expected in the\n'pygmentize Not Found' setup issue screen.\n\nTest Plan:\n* Enabled Pygments but haven't install...
php
chosen
[ { "from": "system", "value": "[NEW] Handle {ref-id:...} in XML import for query properties.\n" }, { "from": "human", "value": "<?php\r\n/**\r\n * customer_DynamiccustomergroupScriptDocumentElement\r\n * @package modules.customer.persistentdocument.import\r\n */\r\nclass customer_Dynamiccustomerg...
php
chosen
[ { "from": "system", "value": "Add option to get an administrative area by code or name inside a collection\n" }, { "from": "human", "value": "<?php\n\nnamespace Galahad\\LaravelAddressing;\n\n/**\n * Class AdministrativeAreaCollection\n *\n * @package Galahad\\LaravelAddressing\n * @author Junio...
php
chosen
[ { "from": "system", "value": "Fix problems with validating null and integer values for tags\n" }, { "from": "human", "value": "<?php\nclass Kwf_Validate_NoTags extends Zend_Validate_Abstract\n{\n const INVALID_TAGS = 'invalidTags';\n\n public function __construct()\n {\n $this->_...
php
chosen
[ { "from": "system", "value": "Change integer to string for AWS S3 configuration in spec\n" }, { "from": "human", "value": "<?php\n\nnamespace spec\\BackupManager\\Filesystems;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\n\nclass Awss3FilesystemSpec extends ObjectBehavior {\n\n fu...
php
chosen
[ { "from": "system", "value": "Use `array_rand()` instead of `mt_rand()`/`count()` to reduce code, optimization, cleaner code\n" }, { "from": "human", "value": "<?php\n/**\n * @author Pierre-Henry Soria <hello@ph7cms.com>\n * @copyright (c) 2018, Pierre-Henry Soria. All Rights Reserv...
php
chosen
[ { "from": "system", "value": "Reduce number of ReflectionProperty::getName calls\n" }, { "from": "human", "value": "<?php\n\nnamespace BroadwaySerialization\\Hydration;\n\n/**\n * Simple implementation of a hydrator, which uses reflection to iterate over the properties of an object\n */\nclass H...
php
chosen
[ { "from": "system", "value": "Remove spurious test group for work-in-progress\n" }, { "from": "human", "value": "<?php\n\nnamespace OpenCFP\\Test\\Infrastructure\\Persistence;\n\nuse OpenCFP\\Infrastructure\\Persistence\\IlluminateAirportInformationDatabase;\n\n/**\n * Tests integration with ill...
php
chosen
[ { "from": "system", "value": "Create instance of TwitterApi in constructor\n" }, { "from": "human", "value": "<?php\n\nnamespace Twitter;\n\nuse TwitterOAuth\\TwitterOAuth as TwitterApi;\n\nclass LatestTweets\n{\n /**\n *\n * @var TwitterApi\n */\n private $api;\n\n /**\n ...
php
chosen
[ { "from": "system", "value": "Create log directory if does'nt exist.\n" }, { "from": "human", "value": "<?php\n\nnamespace Rad\\Logging\\Adapter;\n\nuse Rad\\Logging\\AbstractAdapter;\n\n/**\n * File Adapter\n *\n * @package Rad\\Logging\\Adapter\n */\nclass FileAdapter extends AbstractAdapter\n...
php
chosen
[ { "from": "system", "value": "Make the navigation cache localization-aware\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Core\\Application\\UserInterface\\Dashboard\\Navigation;\n\nuse Symfony\\Component\\HttpFoundation\\Session\\Session;\n\nabstract class AbstractNavigationCache...
php
chosen
[ { "from": "system", "value": "Implement Push to Rancher post-generate action\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the ACME PHP library.\n *\n * (c) Titouan Galopin <galopintitouan@gmail.com>\n *\n * For the full copyright and license information, please view th...
php
chosen
[ { "from": "system", "value": "Fix <img> not being printed to <picture>.\n" }, { "from": "human", "value": "<?php\n\nnamespace ResponsiveImages;\n\nuse Functional as F;\n\n\n/**\n * Class Slot\n */\nclass Slot\n{\n /**\n * @var Size[]\n */\n private $sizes = [];\n\n /**\n * @var Source[]...
php
chosen
[ { "from": "system", "value": "Add test on feed class\n" }, { "from": "human", "value": "<?php\n\nnamespace Funstaff\\FeedBundle\\Factory;\n\n/**\n * Factory\n *\n * @author Bertrand Zuchuat <bertrand.zuchuat@gmail.com>\n */\nclass Factory\n{\n protected $config;\n\n static protected $versi...
php
chosen
[ { "from": "system", "value": "Improve regexp to match result from babel\n\nBabel does convert commonjs require calls from\nvar bar = require('bar');\nbar.foo('test');\ninto\n _bar2.default.foo('test')\ntherefore this regexp need to consider _ and 2.default as optional\n" }, { "from": "human", "v...
php
chosen
[ { "from": "system", "value": "Improve DiscoJuice Feed debug view" }, { "from": "human", "value": "<?php\n\n\n#sleep(2);\n\n$feed = new sspmod_discojuice_Feed();\n\nif (!empty($_REQUEST['refresh'])) {\n\t$feed->store();\n\t$data = $feed->read();\t\n} else {\n\t$data = $feed->read();\t\n}\n\n\n\n\...
php
chosen
[ { "from": "system", "value": "Add additional methods for the exercise type and interface\n" }, { "from": "human", "value": "<?php\n\nnamespace PhpSchool\\PhpWorkshop\\Check;\n\nuse PhpSchool\\PhpWorkshop\\Exercise\\ExerciseInterface;\nuse PhpSchool\\PhpWorkshop\\Result\\ResultInterface;\n\n/**\n...
php
chosen
[ { "from": "system", "value": "Make article_aggregated_views user_id column non-nullable\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateArticleAggr...
php
chosen
[ { "from": "system", "value": "Fix issue with has meta to match get meta" }, { "from": "human", "value": "<?php\n\nnamespace Coreplex\\Meta\\Eloquent;\n\nuse Coreplex\\Meta\\Contracts\\Variant;\n\ntrait HasMetaData\n{\n /**\n * Retrieve the meta data for this model\n *\n * @param V...
php
chosen
[ { "from": "system", "value": "Add responsive sharer to resources\n" }, { "from": "human", "value": "<?php\n/*\n * Classic theme\n * Author: Jonathan Kim\n * Date: 30/12/2011\n */\n\nuse FelixOnline\\Core;\n\nif(!defined('THEME_DIRECTORY')) define('THEME_DIRECTORY', dirname(__FILE__));\nif(!defin...
php
chosen
[ { "from": "system", "value": "Fix toast problem with apostrophe\n" }, { "from": "human", "value": "<?php\n/**\n * Toast messages file.\n * This file is being included in footer_scripts.php\n * \n * Shows toasts for the various 'levels':\n * - notice\n * - success\n * - warning\n * - error\n * \n...
php
chosen
[ { "from": "system", "value": "Update the API version used\n" }, { "from": "human", "value": "<?php\n\nnamespace Speicher210\\KontaktIO;\n\nuse function GuzzleHttp\\default_user_agent;\n\nclass Client extends \\GuzzleHttp\\Client\n{\n const API_VERSION_STABLE = '7';\n\n const API_VERSION_LA...
php
chosen
[ { "from": "system", "value": "Deal with transformer with retuns array\n" }, { "from": "human", "value": "<?php\n\nnamespace Rezzza\\Jobflow\\Extension\\ETL\\Processor;\n\nuse Knp\\ETL\\ContextInterface;\nuse Knp\\ETL\\TransformerInterface;\nuse Psr\\Log\\LoggerInterface;\nuse Rezzza\\Jobflow\\Me...
php
chosen
[ { "from": "system", "value": "Add new BG test case for foreign natural persons\n" }, { "from": "human", "value": "<?php\n\ndeclare (strict_types=1);\n\nnamespace DragonBe\\Test\\Vies\\Validator;\n\nclass ValidatorBGTest extends AbstractValidatorTest\n{\n /**\n * @covers \\DragonBe\\Vies\\...
php
chosen
[ { "from": "system", "value": "Add test for Grouped datasource\n" }, { "from": "human", "value": "<?php\nnamespace Camspiers\\StatisticalClassifier\\DataSource;\n\n/**\n * Generated by PHPUnit_SkeletonGenerator 1.2.0 on 2013-03-26 at 18:06:09.\n */\nclass GroupedTest extends \\PHPUnit_Framework_T...
php
chosen
[ { "from": "system", "value": "Fix typo at calendar transaction\n\nSummary:\n* Fixed conveted => converted\nRef T11576\n\nTest Plan: * Looked at a page, where somebody converted an AllDay Event to a normal one\n\nReviewers: #blessed_reviewers, epriestley\n\nReviewed By: #blessed_reviewers, epriestley\n\nSubs...
php
chosen
[ { "from": "system", "value": "Add highlight to result in transformer\n" }, { "from": "human", "value": "<?php\n\nnamespace makeandship\\elasticsearch\\transformer;\n\nuse makeandship\\elasticsearch\\Util;\n\nclass SearchTransformer\n{\n public function transform($response)\n {\n $va...
php
chosen
[ { "from": "system", "value": "Clean up implementation of TimeModifierTemplatePlugin\n\nNo need to use the DateUtil here. `getDateTimeByTimestamp()` is trivial,\nlocalization already happens via `IntlDateFormatter` and the `c` format is\nmeant for technical consumption, thus no need to run this via `DateUtil...
php
chosen
[ { "from": "system", "value": "Remove usage of BufferedOutput, since is not available in SF 2.3\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests\\Stub;\n\nuse Symfony\\Component\\Console\\Output\\BufferedOutput;\n\n/**\n * Class UnformattedOutputStub\n * @package Tests\\Stub\n */\nclas...
php
chosen
[ { "from": "system", "value": "Load factories on startup of tests\n" }, { "from": "human", "value": "<?php\n\nnamespace League\\FactoryMuffin\\Test;\n\nuse League\\FactoryMuffin\\Facade\\FactoryMuffin;\n\nclass TestCase extends \\PHPUnit_Framework_TestCase\n{\n}\n" }, { "from": "gpt", ...
php
chosen
[ { "from": "system", "value": "Update controller test , check if service is not found with incorect parameters\n" }, { "from": "human", "value": "<?php\n\nnamespace Dardarlt\\Bundle\\TwitterTaskBundle\\Tests\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\n\nclass Defaul...
php
chosen
[ { "from": "system", "value": "Fix a fatal error when removing contacts\n" }, { "from": "human", "value": "<?php\n/**\n * @file src/Worker/RemoveContact.php\n * @brief Removes orphaned data from deleted contacts\n */\nnamespace Friendica\\Worker;\n\nuse Friendica\\Database\\DBA;\n\nrequire_once '...
php
chosen
[ { "from": "system", "value": "Add `user` parameter to differential.createrevision\n\nSummary: arc incorrectly passes a \"user\" parameter to differential.createrevision (long ago, we respected it, I think). After D4191 this fatals. Provide a stub call until the next version bump.\n\nTest Plan: inspection\n\...
php
chosen
[ { "from": "system", "value": "Add setOption method to change default configuration\n" }, { "from": "human", "value": "<?php\n\nnamespace Datatheke\\Bundle\\PagerBundle\\DataGrid\\Handler\\Http;\n\nuse Symfony\\Component\\HttpFoundation\\Request;\n\nuse Datatheke\\Bundle\\PagerBundle\\DataGrid\\H...
php
chosen
[ { "from": "system", "value": "Move return view to controller\n" }, { "from": "human", "value": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Web Routes\n|--------------------------------------------------------------------------\n|\n| This file is w...
php
chosen
[ { "from": "system", "value": "Fix factory with proper variable name" }, { "from": "human", "value": "<?php namespace Affinity\n{\n\tuse Dotink\\Flourish;\n\n\t/**\n\t *\n\t */\n\tclass Config implements ConfigInterface\n\t{\n\t\t/**\n\t\t *\n\t\t */\n\t\tstatic public function create($types, $da...
php
chosen
[ { "from": "system", "value": "Allow limiting selection by role\n" }, { "from": "human", "value": "<?\ninclude '../scat.php';\n\n$criteria= array();\n\n$term= $_REQUEST['term'];\n$terms= preg_split('/\\s+/', $term);\n\nforeach ($terms as $term) {\n $term= $db->real_escape_string($term);\n $crit...
php
chosen
[ { "from": "system", "value": "Remove old roles relationship function\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Models;\n\nuse Illuminate\\Auth\\Authenticatable;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Auth\\Passwords\\CanResetPassword;\nuse Illuminate\\Found...
php
chosen
[ { "from": "system", "value": "Remove closing PHP tag at end of file" }, { "from": "human", "value": "<?php\n\n\t// TODO Set ALL the parameters\n\n\t$Page['Title'] = 'Puff Sys';\n\t$Page['Type'] = 'Article';\n\t$Page['Published'] = '2015-02-05';\n\trequire_once __DIR__.'/_puff/sitewide.php';\n\t...
php
chosen
[ { "from": "system", "value": "Use path relative to project\n" }, { "from": "human", "value": "<?php\n\r\nrequire_once(__DIR__ . \"/core/init.php\");\n\n\r\nuse \\plugin\\Plugin as Plugin;\r\n\r\nPlugin::activate(\"doctrine1\");\nPlugin::activate(\"mvc\", __DIR__ . \"/vendor/makmonty/movac-mvc\")...
php
chosen
[ { "from": "system", "value": "Add assertion that request base URL is set to the prefix\n" }, { "from": "human", "value": "<?php\n\nnamespace CHH\\Test;\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse CHH\\UrlMap;\nuse Stack\\CallableHtt...
php
chosen
[ { "from": "system", "value": "Update URL to Typesafe training feed\n" }, { "from": "human", "value": "<?php\n\theader('Content-type: application/javascript');\n\t$geturl = \"http://www.typesafe.com/how/training.json\";\n include \"$geturl\";\n?>\n" }, { "from": "gpt", "value":...
php
chosen
[ { "from": "system", "value": "Remove localhost as an explicit dev server\n" }, { "from": "human", "value": "<?php\n\nglobal $project;\n$project = 'mysite';\n\n\ninclude_once dirname(__FILE__).'/local.conf.php';\n\n// Sites running on the following servers will be\n// run in development mode. See...
php
chosen
[ { "from": "system", "value": "Add more control for shortcode implementation\n" }, { "from": "human", "value": "<?php\nnamespace Avh\\Utility;\n\nabstract class ShortcodesAbstract\n{\n private $shortcode_map;\n\n /**\n * Method that's always called for the shortcode\n *\n * @par...
php
chosen
[ { "from": "system", "value": "Remove hook callback function since every child class implement individual version, inline documentation\n" }, { "from": "human", "value": "<?php\n\nnamespace Formwerdung\\Square\\Lib;\n\nabstract class DashboardWidget extends Admin {\n protected static $widget_id;...
php
chosen
[ { "from": "system", "value": "Use correct controller base class.\n" }, { "from": "human", "value": "<?php\r\n\r\nnamespace FluxBB\\Controllers;\r\n\r\nuse FluxBB\\Models\\User,\r\n\tIlluminate\\Routing\\Controllers\\Controller,\r\n\tIlluminate\\Validation\\Validator;\r\n\r\nclass BaseController ...
php
chosen
[ { "from": "system", "value": "Use container-sm on the index page also\n" }, { "from": "human", "value": "@extends('layouts.master')\n\n@section('title', 'Do you know the way?')\n\n@section('content')\n <div class=\"text-center\">\n <p>{{ env('DOMAIN') }} is a private file hosting websi...
php
chosen
[ { "from": "system", "value": "Update RunTimeConfigExtension for Twig deprecations" }, { "from": "human", "value": "<?php\n\nnamespace OpenSky\\Bundle\\RuntimeConfigBundle\\Twig\\Extension;\n\nuse OpenSky\\Bundle\\RuntimeConfigBundle\\Service\\RuntimeParameterBag;\nuse Symfony\\Component\\Depende...
php
chosen
[ { "from": "system", "value": "Make the description column searchable\n\nWorks, but need to refresh the page to get rid of the \"extra\" results.\nCould be related to https://github.com/rappasoft/laravel-livewire-tables/discussions/374\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Ht...
php
chosen
[ { "from": "system", "value": "Revert \"Fix default transporter additional properties\"\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Ship\\Transporters;\n\nuse App\\Ship\\Parents\\Transporters\\Transporter;\n\n/**\n * Class DataTransporter\n *\n * @author Johannes Schobel <johannes....
php
chosen
[ { "from": "system", "value": "Allow null published_at, fix Validation message\n" }, { "from": "human", "value": "<?php\n\nnamespace Metrique\\Building\\Http\\Requests;\n\nuse Illuminate\\Foundation\\Http\\FormRequest;\nuse Illuminate\\Validation\\Rule;\nuse Metrique\\Building\\Rules\\AbsoluteUrl...
php
chosen
[ { "from": "system", "value": "Load petstore if library contains no documents\n" }, { "from": "human", "value": "<?php\nnamespace Alt3\\Swagger\\Controller;\n\nuse Cake\\Core\\Configure;\nuse Cake\\Core\\Exception;\nuse Cake\\Routing\\Router;\n\n/**\n * UiController class responsible for serving ...
php
chosen
[ { "from": "system", "value": "Remove CRUD methods from interface" }, { "from": "human", "value": "<?php\n\nnamespace BrianFaust\\Addressable\\Interfaces;\n\ninterface HasAddresses\n{\n /**\n * @return mixed\n */\n public function addresses();\n\n /**\n * @param $address\n ...
php
chosen
[ { "from": "system", "value": "Fix variable name in `TDecoratedCategoryMenuPageHandler`\n" }, { "from": "human", "value": "<?php\nnamespace wcf\\system\\page\\handler;\nuse wcf\\data\\category\\AbstractDecoratedCategory;\nuse wcf\\data\\IAccessibleObject;\n\n/**\n * Implementation of the `IMenuPa...
php
chosen
[ { "from": "system", "value": "Hide including index file from phpunit" }, { "from": "human", "value": "<?php\n/**\n * This is a Tiramizo Webhook URL\n */\n\n//oxid should execute oxtiramizoo_webhook view\n$_POST['cl'] = 'oxtiramizoo_webhook';\n\n// executing regular routines ...\nrequire '../../i...
php
chosen
[ { "from": "system", "value": "Write each tag from newline\n" }, { "from": "human", "value": "<?php\nnamespace common\\widgets;\n\nuse app\\modules\\article\\models\\Tag;\nuse yii\\base\\Widget;\nuse yii\\bootstrap\\Html;\n\n/**\n * Class TagsInputWidget\n * @package common\\widgets\n * @property...
php
chosen
[ { "from": "system", "value": "Add default Charset to iso-8859-15\n" }, { "from": "human", "value": "<?php\r\nnamespace MF\\Email;\r\n\r\nrequire_once('phpmailer/class.phpmailer.php');\r\n\r\nclass Mailer extends \\PHPMailer {\r\n\t\r\n}\r\n" }, { "from": "gpt", "value": "<?php\r\nnam...
php
chosen
[ { "from": "system", "value": "[Bugfix] Remove typo in method name \"getEntityByValueAndClass\"\n" }, { "from": "human", "value": "<?php\n\nnamespace Sle\\TYPO3\\Extbase\\Domain\\Utility;\n\nuse TYPO3\\CMS\\Core\\Utility\\GeneralUtility;\n\n/**\n * Class EntityUtility\n *\n * @package Sle\\TYPO3\...
php
chosen
[ { "from": "system", "value": "Fix divide by zero when no reg estimate\n" }, { "from": "human", "value": "<?php\nnamespace CodeDay\\Clear\\Controllers\\Manage;\n\nuse \\CodeDay\\Clear\\Models;\n\nclass DashboardController extends \\Controller {\n\n public function getIndex()\n {\n re...
php
chosen
[ { "from": "system", "value": "Fix some more BC between v2 and v3\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types = 1);\n\nnamespace unreal4u\\TelegramAPI\\Telegram\\Types\\Custom;\n\nuse unreal4u\\TelegramAPI\\Abstracts\\CustomType;\nuse Psr\\Log\\LoggerInterface;\nuse unreal4u\\T...
php
chosen
[ { "from": "system", "value": "Delete will try to delete from all the managers\n" }, { "from": "human", "value": "<?php\n/**\n * Created by mcfedr on 7/28/16 14:24\n */\nnamespace Mcfedr\\QueueManagerBundle\\Manager;\n\nuse Mcfedr\\QueueManagerBundle\\Queue\\Job;\n\nclass QueueManagerRegistry\n{\...
php
chosen
[ { "from": "system", "value": "Fix php 5.3 build failed on []\n" }, { "from": "human", "value": "<?php\n\n$t = new Test\\Ternary();\n\nassert($t->testTernary1() === 101);\nassert($t->testTernary2(true) === \"foo\");\nassert($t->testTernary2(false) === \"bar\");\nassert($t->testTernaryComplex1([],...
php
chosen
[ { "from": "system", "value": "BAP-9558: Create new type Origin oauthOrigin\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\ImapBundle\\Migrations\\Schema\\v1_4;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\n\nuse Oro\\Bundle\\MigrationBundle\\Migration\\Migration;\nuse Oro\\Bundle\\...
php
chosen
[ { "from": "system", "value": "Use Form::checkbox() helper instead of raw HTML in login form.\n" }, { "from": "human", "value": "@extends('layouts.application.guest')\n\n@section('content')\n <form action=\"{{ route('dashboard.user.login') }}\" id=\"loginForm\" method=\"post\">\n {{ csr...
php
chosen
[ { "from": "system", "value": "Change data type of 'savable' column on 'assessments' table\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass UpdateAssessmentsTable extends Migration\n{\n\t/**\n\t * R...
php
chosen
[ { "from": "system", "value": "Remove the configuration entry after copying its value.\n" }, { "from": "human", "value": "<?php namespace Essence\\Matchers;\n\nclass ContainMatcher extends AbstractMatcher\n{\n\n /**\n * {@inheritdoc}\n */\n public function run()\n {\n $con...
php
chosen
[ { "from": "system", "value": "Add eventId to lesson to keep track of related calendar event\n" }, { "from": "human", "value": "<?php\n\nnamespace UCP\\AbsenceBundle\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * @ORM\\Entity\n */\nclass Lesson\n{\n /**\n * @ORM\\Id\n * @ORM...
php
chosen
[ { "from": "system", "value": "Remove pagination from controllers data provider to show more than 20 controllers\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: alex\n * Date: 20/10/2016\n * Time: 15:57\n */\n\nnamespace vr\\api\\doc\\widgets;\n\nuse yii\\bootstra...
php
chosen
[ { "from": "system", "value": "Remove wrong @since comment in docblock\n" }, { "from": "human", "value": "<?php\n/**\n * SampleTask file\n *\n * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)\n * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)\n *\n * Lice...
php
chosen
[ { "from": "system", "value": "Add is_raw param in route\n" }, { "from": "human", "value": "<?php\n\n\nnamespace BFITech\\ZapAdmin;\n\n\n/**\n * AdminRoute class.\n *\n * This is a thin layer than glues router and storage together.\n * Subclassess extend this instead of abstract AdminStore.\n *\n...
php
chosen
[ { "from": "system", "value": "Update message when account is not enabled\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of By Night.\n * (c) 2013-2020 Guillaume Sainthillier <guillaume.sainthillier@gmail.com>\n *\n * This source file is subject to the MIT license that is bu...
php
chosen
[ { "from": "system", "value": ":bug: Make sure super is called before anything else\n\nIn constructor of an exception\n" }, { "from": "human", "value": "<?hh //strict\nclass PageIgnoreException extends ErrorException { }\n\nclass APIException extends ErrorException {\n public function __construc...
php
chosen
[ { "from": "system", "value": "Handle the fact that a user can be removed but have feeds in queue\n" }, { "from": "human", "value": "<?php\n\nuse Miniflux\\Handler;\nuse Miniflux\\Model;\nuse Miniflux\\Session\\SessionStorage;\nuse Pheanstalk\\Pheanstalk;\n\nrequire __DIR__.'/app/common.php';\n\n...
php
chosen
[ { "from": "system", "value": "Correct typo on assertion message." }, { "from": "human", "value": "<?php\n\nuse OnlyBits\\LogicGates\\XnorGate;\n\nclass XnorGateTest extends PHPUnit_Framework_TestCase\n{\n /**\n * @dataProvider logicGateTwoInputProvider\n */\n public function testOu...
php
chosen
[ { "from": "system", "value": "Add new method params and move to static\n" }, { "from": "human", "value": "<?php\n/**\n * The Colonel Framework\n *\n * @author Nigel Greenway <nigel_greenway@me.com>\n * @license MIT\n */\n\nnamespace Colonel\\ConfigurationGenerator;\n\n/**\n * Interface for Confi...
php
chosen
[ { "from": "system", "value": "Throw an exception if the regex fails.\n" }, { "from": "human", "value": "<?php\n\n\nnamespace PeterVanDommelen\\Parser\\Expression\\Regex;\n\n\nuse PeterVanDommelen\\Parser\\Expression\\ExpressionResultInterface;\nuse PeterVanDommelen\\Parser\\Parser\\ParserInterfa...
php
chosen
[ { "from": "system", "value": ":pencil2: Implement PHP 7.x and refactoring by PHPCS\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace FilipSedivy\\EET\\Utils;\n\nclass Format\n{\n public static function BKB($code): string\n {\n $r = '';\n for ($i =...
php
chosen
[ { "from": "system", "value": "Allow 'text/javascript; charset=UTF-8' as JSON valid format\n\nI'm trying to embed a facebook link using the library and I'm not able because FB oEmbed response is in formar 'text/javascript; charset=UTF-8' instead of 'application/json'\r\nhttps://developers.facebook.com/docs/p...
php
chosen
[ { "from": "system", "value": "Remove legacy method from controller\n" }, { "from": "human", "value": "<?php\n\tnamespace Bolt;\n\n\tuse ReflectionClass;\n\tuse ReflectionMethod;\n\n\tabstract class Controller extends Base\n\t{\n\t\tpublic function __toString()\n\t\t{\n\t\t\treturn \"API Object: ...
php
chosen
[ { "from": "system", "value": "Add convert to database value function\n" }, { "from": "human", "value": "<?php namespace Mbbender\\Doctrine\\DBAL\\Types;\n\nuse Doctrine\\DBAL\\Types\\GuidType;\nuse Doctrine\\DBAL\\Platforms\\AbstractPlatform;\n\nclass OrderedGuidType extends GuidType\n{\n co...
php
chosen
[ { "from": "system", "value": "Change access token requirement on Ordercloud facade\n" }, { "from": "human", "value": "<?php namespace Ordercloud;\n\nuse Illuminate\\Container\\Container;\nuse Ordercloud\\Entities\\Auth\\AccessToken;\nuse Ordercloud\\Entities\\Organisations\\OrganisationAccessTok...
php
chosen
[ { "from": "system", "value": "Fix Yii autoloader issues in unit tests\n" }, { "from": "human", "value": "<?php\nrequire __DIR__ . '/../vendor/autoload.php';\nrequire __DIR__ . '/../vendor/yiisoft/yii/framework/yii.php';\n\n$basePath = sys_get_temp_dir() . '/yii-sass';\nif (!is_dir($basePath)) {\...
php
chosen
[ { "from": "system", "value": "Improve error description showing class name\n" }, { "from": "human", "value": "<?php\n/**\n * DronePHP (http://www.dronephp.com)\n *\n * @link http://github.com/Pleets/DronePHP\n * @copyright Copyright (c) 2016 DronePHP. (http://www.dronephp.com)\n * @license ...
php
chosen
[ { "from": "system", "value": "Update config file for correct admin path\n" }, { "from": "human", "value": "<?php\n/**\n* Authentication Library\n*\n* @package Authentication\n* @category Libraries\n* @author Adam Griffiths\n* @link http://programmersvoice.com\n* @version 1.0.4\n* @copyright Adam...
php
chosen
[ { "from": "system", "value": "Set unfurl link option in returned response\n" }, { "from": "human", "value": "<?php\n\nrequire_once 'MemeBot/Memeable.php';\nrequire_once 'MemeBot/MemeClass.php';\nrequire_once 'MemeBot/Meme.php';\n\n$meme = new MemeBot\\MemeClass;\n\n// Get Request\n$trigger = tri...
php
chosen
[ { "from": "system", "value": "FIX: Fix error in config for controller extension\n" }, { "from": "human", "value": "<?php \nObject::add_extension('SiteTree', 'AccessKeyExtension');\nObject::add_extension(\"Page_Controller\",\"AccessKeyExtension\");\n ?>" }, { "from": "gpt", "value": "...
php
chosen
[ { "from": "system", "value": "Remove Net_Gearman require, see last commit message\n" }, { "from": "human", "value": "<?php\n$app_path = realpath(\n dirname(__FILE__) . '/../../../../../../app'\n);\nif (!$app_path) {\n $app_path = '/mnt/hgfs/Sites/magento.development.local/public/app';\n}\n...
php
chosen
[ { "from": "system", "value": "Convert backslashes to forward slashes in spl_autoload_register\n" }, { "from": "human", "value": "<?php\n\n// Don't allow direct access to the boostrap\nif(basename($_SERVER['REQUEST_URI']) == 'bootstrap.php'){\n\texit('bootstrap.php does nothing on its own. Please...
php
chosen