conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add code for PDO connects to ms sql and sqlite, fix comments.\n\n\ngit-svn-id: 245d8f85226f8eeeaacc1269b037bb4851d63c96@858 54a900ba-8191-11dd-a5c9-f1483cedc3eb\n" }, { "from": "human", "value": "<?php\r\ninclude '_CONFIG.php';\r\n\r\ntry {\r\n\t\t$dbh = new PDO(\"m...
php
chosen
[ { "from": "system", "value": "Remove policy caveat from Differential\n\nSummary: Policies are now fully supported in Differential.\n\nTest Plan: Grepped for other caveats, looks like I've already removed htem all.\n\nReviewers: chad, btrahan\n\nReviewed By: chad\n\nCC: aran\n\nDifferential Revision: https:/...
php
chosen
[ { "from": "system", "value": "Clean up the MySQL database connector." }, { "from": "human", "value": "<?php namespace Laravel\\Database\\Connectors; use PDO;\n\nclass MySQL extends Connector {\n\n\t/**\n\t * Establish a PDO database connection for a given database configuration.\n\t *\n\t * @par...
php
chosen
[ { "from": "system", "value": "Change Database pointer to PROD ENV\n" }, { "from": "human", "value": "<?php\n\nreturn [\n 'class' => 'yii\\db\\Connection',\n // 'dsn' => 'oci:host=103.13.28.239;dbname=103.13.28.239/XE;charset=UTF8',\n 'dsn' => 'mysql:host=103.13.28.239;dbname=aci_dev;cha...
php
chosen
[ { "from": "system", "value": "Update form view to show submit and cancel buttons\n" }, { "from": "human", "value": "<h2>Menu Maintenance - Editing</h2>\r\n<form action=\"#\" method=\"post\">\r\n {fid}\r\n {fname}\r\n {fdescription}\r\n {fprice}\r\n {fpicture}\r\n {fcategory}\r\...
php
chosen
[ { "from": "system", "value": "Add issue button on issues page added\n" }, { "from": "human", "value": "@extends('layouts.project')\n\n@section('styles')\n<link rel=\"stylesheet\" href=\"{{ asset('css/bugtracker/issue.css') }}\" />\n@endsection\n\n@section('scripts')\n<script src=\"{{ asset('js/b...
php
chosen
[ { "from": "system", "value": "Fix php doc short description\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Fxp Composer Asset Plugin package.\n *\n * (c) François Pluchino <francois.pluchino@gmail.com>\n *\n * For the full copyright and license information, please vi...
php
chosen
[ { "from": "system", "value": "Update test to valid use case\n" }, { "from": "human", "value": "<?php\n\nnamespace Doctrine\\Tests\\ORM\\Functional;\n\nuse Doctrine\\ORM\\Mapping\\JoinColumn;\n\nclass MergeCompositeToOneKeyTest extends \\Doctrine\\Tests\\OrmFunctionalTestCase\n{\n protected fu...
php
chosen
[ { "from": "system", "value": "Add abstract email command object as argument.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Handler\\Email;\n\nclass SendUserApprovedEmailHandler extends AbstractEmailHandler\n{\n protected function configureMessage(\\Swift_Message $email): void\n ...
php
chosen
[ { "from": "system", "value": "BB-5703: Create new release dump and create new build to test upgrade from latest release to master\n- moved some migrations that had wrong versions\n- fixed migrations that caused failures in tests\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\...
php
chosen
[ { "from": "system", "value": "[Plan] Add shortcut to subscribe a customer to a given plan.\n" }, { "from": "human", "value": "<?php\n\nnamespace Flosch\\Bundle\\StripeBundle\\Stripe;\n\nuse Stripe\\Stripe;\n\nclass StripeClient extends Stripe\n{\n public function __construct($stripeApiKey)\n ...
php
chosen
[ { "from": "system", "value": "Use typed property in UserLoggedIn event\n" }, { "from": "human", "value": "<?php\n\nnamespace wcf\\system\\user\\authentication\\event;\n\nuse wcf\\data\\user\\User;\nuse wcf\\system\\cache\\runtime\\UserRuntimeCache;\nuse wcf\\system\\event\\IEvent;\n\n/**\n * Ind...
php
chosen
[ { "from": "system", "value": "[FEATURE] Add tax percent to stripe subscriptions\n" }, { "from": "human", "value": "<?php\n\n/**\n * Stripe Create Subscription Request.\n */\nnamespace Omnipay\\Stripe\\Message;\n\n/**\n * Stripe Create Subscription Request\n *\n * @see Omnipay\\Stripe\\Gateway\n ...
php
chosen
[ { "from": "system", "value": "Add an addiction event dispatcher test\n" }, { "from": "human", "value": "<?php\nnamespace SmoothPhp\\Tests\\EventDispatcher;\n\nuse SmoothPhp\\EventDispatcher\\SimpleEventDispatcher;\n\n\n/**\n * Class SimpleEventDispatcherTest\n * @package SmoothPhp\\Tests\\EventD...
php
chosen
[ { "from": "system", "value": "Fix admin/model where bad config item was added on install\n" }, { "from": "human", "value": "<?php\nclass ModelPaymentOmiseOffsite extends Model\n{\n /**\n * Install a table that need to use in Omise Payment Gateway module\n * @return boolean\n */\n ...
php
chosen
[ { "from": "system", "value": "Fix response from payment removal API (using wrong ID for txn)\n" }, { "from": "human", "value": "<?\ninclude '../scat.php';\ninclude '../lib/txn.php';\n\nbcscale(2);\n\n$txn_id= (int)$_REQUEST['txn'];\n$id= (int)$_REQUEST['id'];\n\nif (!$txn_id || !$id)\n die_json...
php
chosen
[ { "from": "system", "value": "Stop if git commands fail.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Actions;\n\nuse App\\Shell\\Shell;\n\nclass InitializeGitRepo\n{\n use LamboAction;\n\n protected $shell;\n\n public function __construct(Shell $shell)\n {\n $th...
php
chosen
[ { "from": "system", "value": "Validate slide max position and duration\n" }, { "from": "human", "value": "<?php\n\nnamespace Zeropingheroes\\Lanager\\Requests;\n\nclass StoreSlideRequest extends Request\n{\n use LaravelValidation;\n\n /**\n * Whether the request is valid\n *\n ...
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@include(...
php
chosen
[ { "from": "system", "value": "Add description usage for ExpireDate class\n" }, { "from": "human", "value": "<?php\n/**\n * Description of Date\n *\n * @package Aktive Merchant\n * @author Andreas Kollaros\n * @license http://www.opensource.org/licenses/mit-license.php\n */\nclass Merchant_Billi...
php
chosen
[ { "from": "system", "value": "Determine if current DirectoryIterator item is a symbolic link\n" }, { "from": "human", "value": "<?php\nnamespace Phalcon\\Build;\n\nclass Util\n{\n /**\n * Normalize file path, convert all slashes to Linux-style and get rid of '..', '.'.\n *\n * @pa...
php
chosen
[ { "from": "system", "value": "Remove quotes only when attributes do not contains whitespaces\n" }, { "from": "human", "value": "<?php\n\nnamespace RenatoMarinho\\LaravelPageSpeed\\Middleware;\n\nclass RemoveQuotes extends PageSpeed\n{\n public function apply($buffer)\n {\n $replace ...
php
chosen
[ { "from": "system", "value": "Revert \"Add changelog generator method & documentation helper methods\"\n\nThis reverts commit 94c037ad6c2a8a39a1b02f12cde564b17b9e7067.\n" }, { "from": "human", "value": "<?php\n\n/**\n * This is project's console commands configuration for Robo task runner.\n *\n...
php
chosen
[ { "from": "system", "value": "Fix bad property name in Form_Filter.\n" }, { "from": "human", "value": "<?php\n/**\n * Abstract class to define form element filters\n * @author Jon Johnson <jon.johnson@ucsf.edu>\n * @license http://jazzee.org/license.txt\n * @package foundation\n * @subpackage fo...
php
chosen
[ { "from": "system", "value": "Change paradigm, use `on` instead of `add`\n\nAlso deprecate the `add` which become a simple alias to the on method.\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the bee4/events package.\n * For the full copyright and license information, p...
php
chosen
[ { "from": "system", "value": "Comment out the file exist check\n" }, { "from": "human", "value": "<?php\n\n // If the later function cannot handle autoloading, uncomment the default one as well\n// set_include_path(get_include_path().PATH_SEPARATOR.dirname(__DIR__));\n\n// spl_autoload_...
php
chosen
[ { "from": "system", "value": "TASK: Move nullable type to a separate property" }, { "from": "human", "value": "<?php\nnamespace Neos\\Flow\\Tests\\Functional\\Reflection\\Fixtures\\Model;\n\n/*\n * This file is part of the Neos.Flow package.\n *\n * (c) Contributors of the Neos Project - www.neo...
php
chosen
[ { "from": "system", "value": "Create doctrine Annotations on Entity" }, { "from": "human", "value": "<?php\r\nnamespace WiContact\\Entity;\r\n\r\nuse Doctrine\\ORM\\Mapping as ORM;\r\n\r\n/**\r\n * @ORM\\Entity\r\n * @ORM\\Table(name=\"contacts\")\r\n */\r\nclass Contact\r\n{\r\n\r\n /**\r\n ...
php
chosen
[ { "from": "system", "value": "Send values of items in withArray with the model array\n" }, { "from": "human", "value": "<?php\n\nnamespace Laraquick\\Models\\Traits;\n\nuse Illuminate\\Database\\Eloquent\\Builder;\n\ntrait Helper\n{\n\n /**\n * A shortcut to withoutGlobalScope()\n *\n...
php
chosen
[ { "from": "system", "value": "Add response contents to error message string.\n" }, { "from": "human", "value": "<?php\nnamespace EventFarm\\Restforce\\RestClient;\n\nuse Psr\\Http\\Message\\StreamInterface;\n\nclass RestforceClientException extends \\Exception\n{\n public static function quer...
php
chosen
[ { "from": "system", "value": "Replace file_get_contents with a CURL command for external URL's\n" }, { "from": "human", "value": "<?php\n\n\t// AJAX call to fetch a new background image\n\n\t$config = json_decode(file_get_contents(dirname(__FILE__) . \"/../../config.json\"), true);\n\n\t$url ...
php
chosen
[ { "from": "system", "value": "Allow Herald rules to apply \"only the first time\" to Calendar events\n\nSummary: Fixes T12821. (Some events only happen once, so the default behavior doesn't let you pick this rule, and objects must opt into it by saying \"yeah, I support multiple edits\".)\n\nTest Plan:\nNot...
php
chosen
[ { "from": "system", "value": "Define some method and relate the relationships.\n" }, { "from": "human", "value": "<?php namespace App;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Reply extends Model {\n\n\t//\n\n}\n" }, { "from": "gpt", "value": "<?php namespace App;\n\nus...
php
chosen
[ { "from": "system", "value": "Use the UTF-8 ellipsis character\n\nsvn commit r15188\n" }, { "from": "human", "value": "<?php\n\n/* vim: set noexpandtab tabstop=4 shiftwidth=4 foldmethod=marker: */\n\nrequire_once 'Swat/SwatEntry.php';\n\n/**\n * A single line search entry widget\n *\n * @package...
php
chosen
[ { "from": "system", "value": "Improve NamespaceBasedFactory + remove UrlDispatcherCache\n\n- Prepare NamespaceBasedFactory for migrating to PHP-DI 6.0\n- NamespaceBasedFactoryBuilder introduced\n- Client code refactoring\n- Various CS fixes\n" }, { "from": "human", "value": "<?php\nnamespace Spo...
php
chosen
[ { "from": "system", "value": "Remove template language hard initialization to dynamic initialization\n" }, { "from": "human", "value": "<?php\nnamespace Uphp\\web;\n\nuse src\\Inflection;\nuse \\UPhp\\ActionDispach\\Routes as Route;\nuse \\UPhp\\ActionController\\ActionController;\n\nclass Appli...
php
chosen
[ { "from": "system", "value": "Make metric call match comment :)" }, { "from": "human", "value": "<?php\n\nrequire('src/Message.php');\nrequire('src/Metric.php');\nrequire('src/Client.php');\n\n// Register a new client\n$a = new Agento\\Client('127.0.0.1', 12345);\n\n// Add a few tags describing ...
php
chosen
[ { "from": "system", "value": "Use Route ActionName instead of try/catch block\n" }, { "from": "human", "value": "<?php\n\nnamespace Wnx\\LaravelStats\\Classifiers;\n\nuse Exception;\nuse Illuminate\\Routing\\Router;\nuse Wnx\\LaravelStats\\ReflectionClass;\n\nclass ControllerClassifier extends C...
php
chosen
[ { "from": "system", "value": "Fix test failures in MySQLi test\n" }, { "from": "human", "value": "<?php\nnamespace Doctrine\\Tests\\DBAL\\Functional\\Mysqli;\n\nclass ConnectionTest extends \\Doctrine\\Tests\\DbalFunctionalTestCase\n{\n public function setUp()\n {\n if (!extension_l...
php
chosen
[ { "from": "system", "value": "Return feed as xml content type.\n" }, { "from": "human", "value": "<?php namespace App\\Http\\Controllers;\n\nuse App\\Items;\nuse App\\User;\n\nclass FeedController extends BaseController {\n\n public function podcast($id, $secret)\n {\n /** @var \\Ap...
php
chosen
[ { "from": "system", "value": "Revert \"add 'start' parameter to getusertransactions api page\"\n" }, { "from": "human", "value": "<?php\n$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;\n\n// Check if the API is activated\n$api->isActive();\n\n// Check user token\n$user_id =...
php
chosen
[ { "from": "system", "value": "Use the site_url() function inside the menu view.\n" }, { "from": "human", "value": "<?php\ndefined('BASEPATH') OR exit('No direct script access allowed');\n?>\n<div id=\"menu\">\n <ul>\n <li>\n <a href=\"./\">Home</a>\n </li>\n <l...
php
chosen
[ { "from": "system", "value": "Restructure abstract calendar to use iterators.\n" }, { "from": "human", "value": "<?php\n\nnamespace Plummer\\Calendar;\n\nabstract class CalendarAbstract implements CalendarInterface\n{\n\tprotected $events;\n\n\tprotected $recurrenceTypes;\n\n\tprotected function...
php
chosen
[ { "from": "system", "value": "Use PHP 5.3-compatible traditional array syntax\n" }, { "from": "human", "value": "<?php\n\nnamespace Liip\\RMT\\Tests\\Functional;\n\nuse Exception;\nuse Liip\\RMT\\Context;\nuse Liip\\RMT\\Prerequisite\\TestsCheck;\n\nclass TestsCheckTest extends \\PHPUnit_Framewo...
php
chosen
[ { "from": "system", "value": "Allow string as POSTFIELDS param\n" }, { "from": "human", "value": "<?php\n/**\n * @file PostCurlRequest.php\n *\n * PHP version 5.4+\n *\n * @author Yancharuk Alexander <alex at itvault dot info>\n * @date 2015-01-20 20:16\n * @copyright The BSD 3-Clause Lic...
php
chosen
[ { "from": "system", "value": "Add support for private fields\n\nA field name accepts a single underscore prefix to indicate it’s private.\n\nPrivate fields can only be used in a PrimaryCondition and are simple ignored for user-input.\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_typ...
php
chosen
[ { "from": "system", "value": "Remove create button in collection header when endpoint is database.\n" }, { "from": "human", "value": " <h3 class=\"panel-title\">\n <span class=\"text-left\"><?php echo ucwords(str_replace('_', ' ', ($this->response->meta->collection))); ?></span...
php
chosen
[ { "from": "system", "value": "Fix tests by reverting entity listener change – this will have to wait until 8.5\n" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Core\\Express\\Entry;\n\nuse Concrete\\Core\\Entity\\Express\\Entry;\nuse Concrete\\Core\\Support\\Facade\\Facade;\nuse Doc...
php
chosen
[ { "from": "system", "value": "Add links to header buttons\n" }, { "from": "human", "value": "@extends('_layouts.master')\n\n@section('body')\n\n<!-- Sticky Header -->\n<div id=\"header-placeholder\"></div>\n\n<header>\n\n\t<div class=\"header-left\">\n\n\t\t<a href=\"http://www.artic.edu/\">\n\t...
php
chosen
[ { "from": "system", "value": "Add X points to profile on task complete\n" }, { "from": "human", "value": "<?php\n\n\nnamespace SayAndDo\\TaskBundle\\Service;\n\n\nuse Doctrine\\ORM\\EntityManager;\nuse SayAndDo\\TaskBundle\\DependencyInjection\\TaskStatus;\nuse SayAndDo\\TaskBundle\\Entity\\Task...
php
chosen
[ { "from": "system", "value": "Make it work with PHP 8.0\n\nmethod_exists requires first parameter to be object or string now and won't accept a null parameter" }, { "from": "human", "value": "<?php\n\nnamespace Adldap\\Laravel\\Validation\\Rules;\n\nuse Adldap\\Laravel\\Events\\AuthenticatedMode...
php
chosen
[ { "from": "system", "value": "Add wowza thumbnail import cli command\n" }, { "from": "human", "value": "<?php\n\nclass CM_Stream_Cli extends CM_Cli_Runnable_Abstract {\n\n /**\n * @synchronized\n */\n public function startMessageSynchronization() {\n CM_Stream_Message::getIn...
php
chosen
[ { "from": "system", "value": "Fix an issue where binding the command would fail" }, { "from": "human", "value": "<?php\n\nnamespace Spatie\\MediaLibrary;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse Spatie\\MediaLibrary\\Commands\\RegenerateCommand;\n\nclass MediaLibraryServiceProvider exte...
php
chosen
[ { "from": "system", "value": "Fix the registration page redirection\n" }, { "from": "human", "value": "<?php\n\nfunction getReferralID() {\n global $_GET;\n\n if (empty($_GET['r'])) {\n return null;\n }\n\n return intval($_GET['r']);\n}\n\nfunction hasValidReferralData() {\n ...
php
chosen
[ { "from": "system", "value": "Use content-none.php instead of no-results.php\n\nRenamed no-results.php to content-none.php for consistency (as done in core: https://core.trac.wordpress.org/ticket/25181); so let's make sure it's used." }, { "from": "human", "value": "<?php\n/**\n * The main templ...
php
chosen
[ { "from": "system", "value": "Add use ServiceProvider to PageModuleProvider\n" }, { "from": "human", "value": "<?php\n\nnamespace LaravelFlare\\Cms;\n\nclass CmsModuleProvider extends ServiceProvider\n{\n /**\n * Perform post-registration booting of services.\n */\n public function...
php
chosen
[ { "from": "system", "value": "Rename Command fire method to handle\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Memory\\Console;\n\nuse Illuminate\\Console\\Command;\n\nclass MemoryCommand extends C...
php
chosen
[ { "from": "system", "value": "Change from an include to a require\n\nIt’s not like this file is optional.\n" }, { "from": "human", "value": "<?php\n\n/*\n * Include the settings.\n */\nrequire('settings.inc.php');\n\n/*\n * Include the Instant API library.\n */\ninclude('class.InstantAPI.php');\...
php
chosen
[ { "from": "system", "value": "Remove carriage return on log script\n" }, { "from": "human", "value": "<?php\n\t$log_file = fopen('../../log.txt','a');\n\tdate_default_timezone_set('America/New_York');\n\t$date = date('Y-m-d H:i:s', time());\n\t$request_body = file_get_contents('php://input');\n\...
php
chosen
[ { "from": "system", "value": "Remove json_encode() on array keys\n" }, { "from": "human", "value": "<?php\n\nnamespace LiteCQRS\\Plugin\\Doctrine\\EventStore;\n\nuse LiteCQRS\\DomainEvent;\nuse LiteCQRS\\EventStore\\EventStoreInterface;\nuse LiteCQRS\\EventStore\\SerializerInterface;\n\nuse Doct...
php
chosen
[ { "from": "system", "value": "Update dashboard homepage because all volunteers can now see it\n" }, { "from": "human", "value": "@extends('layouts.dashboard')\n\n@section('title')\nAccueil\n@endsection\n\n@section('smalltitle')\nMises à jour, informations, ...\n@endsection\n\n@section('content')...
php
chosen
[ { "from": "system", "value": "Put use statements in order\n" }, { "from": "human", "value": "<?php\nnamespace ShadowTranslate\\Test\\TestCase\\Model\\Behavior;\n\nuse Cake\\ORM\\Entity;\nuse Cake\\ORM\\Behavior\\Translate\\TranslateTrait;\n\n/**\n * Simulated baked entity class for a translated ...
php
chosen
[ { "from": "system", "value": "Throw exception on assert failure" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types = 1);\n\nnamespace ASN1\\Type;\n\nuse ASN1\\Component\\Identifier;\nuse ASN1\\Component\\Length;\nuse ASN1\\Exception\\DecodeException;\nuse ASN1\\Feature\\ElementBase;\...
php
chosen
[ { "from": "system", "value": "Add brief and command usage\n" }, { "from": "human", "value": "<?php\nnamespace LazyRecord\\Command;\nuse CLIFramework\\Command;\n\nclass SchemaCommand extends Command\n{\n\n function init()\n {\n parent::init();\n $this->registerCommand('build',...
php
chosen
[ { "from": "system", "value": "Add TransactionId to responses. Fix error_no and error_desc variables\n" }, { "from": "human", "value": "<?php \nrequire_once('../../lib/merchant.php');\n\nrequire_once('initialize_gateway.php');\n\ntry {\n\n $response = $gateway->authenticate( array(\n 'trans...
php
chosen
[ { "from": "system", "value": "Change that line to see if maybe that's the culprit\n" }, { "from": "human", "value": "<h3>Change Access</h3>\n<form class=\"form-horizontal\">\n\n <!-- Select Basic -->\n <div class=\"form-group\">\n <label class=\"col-md-8 control-label\" for=\"access-type\">...
php
chosen
[ { "from": "system", "value": "Return correct type during tests\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace GraphQLTests\\Doctrine\\Blog\\Model\\Special;\n\nuse Doctrine\\Common\\Collections\\Collection;\nuse Doctrine\\ORM\\Mapping as ORM;\nuse GraphQLTests\\...
php
chosen
[ { "from": "system", "value": "FIX Use HTTPS protocol in Gravatar URL\n" }, { "from": "human", "value": "<?php\n/**\n * An author who can be linked to several add-ons.\n */\nclass AddonAuthor extends DataObject\n{\n\n public static $db = array(\n 'Name' => 'Varchar(255)',\n 'Emai...
php
chosen
[ { "from": "system", "value": "Add code to make more robust.\n" }, { "from": "human", "value": "<?php\n\nnamespace SlightScribeBundle\\Task;\n\nuse SlightScribeBundle\\Entity\\Communication;\nuse SlightScribeBundle\\Entity\\RunHasCommunication;\n\n\n/**\n * @license 3-clause BSD https://github.c...
php
chosen
[ { "from": "system", "value": "Make getting mailbox case insensitive" }, { "from": "human", "value": "<?php\n\nnamespace Ddeboer\\Imap;\n\n/**\n * A connection to an IMAP server that is authenticated for a user\n */\nclass Connection\n{\n protected $server;\n protected $resource;\n prote...
php
chosen
[ { "from": "system", "value": "Fix rating types updated message\n\nNow we save all the rating types (before we were saving one type at once).\n\n\nFormer-commit-id: 5531021b980db9846344d2f6ad53e0b301fe056d" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Controller\\SinglePage\\Dashboa...
php
chosen
[ { "from": "system", "value": "Fix a bug with incorrect param\n" }, { "from": "human", "value": "@extends('layouts._one_column')\n\n@section('content')\n <section class=\"auth\">\n <h1>We're going to create an account with this information.</h1>\n\n <div class=\"user\">\n ...
php
chosen
[ { "from": "system", "value": "Add english language for form validation\n" }, { "from": "human", "value": "<?php\n\n$lang['unique'] = \"A project with this name already exists.\";\n\n/* End of file projects_lang.php */\n/* Location: ./application/language/english/form_validation_lang.php */\n" ...
php
chosen
[ { "from": "system", "value": "Use constants for HTTP status code\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Services\\Streamers;\n\nuse DaveRandom\\Resume\\FileResource;\nuse function DaveRandom\\Resume\\get_request_header;\nuse DaveRandom\\Resume\\InvalidRangeHeaderException;\nu...
php
chosen
[ { "from": "system", "value": "Fix releases breaking if there were no notes\n" }, { "from": "human", "value": "<?php\n\nnamespace Transformers;\n\nclass RecordTransformer extends Transformer\n{\n /**\n * transform record\n *\n * @param array $record\n * @return array\n */\n...
php
chosen
[ { "from": "system", "value": "Change wayward include()s to the preferred ->display()\n\ngit-svn-id: d0e296eae3c99886147898d36662a67893ae90b2@3279 653ae4dd-d31e-0410-96ef-6bf7bf53c507\n" }, { "from": "human", "value": "<?php include 'header.php'; ?>\n<!-- login -->\n\t<div class=\"content\">\n\t<...
php
chosen
[ { "from": "system", "value": "Add logout to wordpress plugin\n" }, { "from": "human", "value": "<?php\n/*\nPlugin Name: Flarum Single Sign On\n*/\n\nrequire_once __DIR__ . '/Forum.php';\n\nfunction my_login_redirect($redirect_to, $request, $user)\n{\n if ($redirect_to === 'forum' && $user ins...
php
chosen
[ { "from": "system", "value": "Upgrade to latest Symfony2 conventions\n" }, { "from": "human", "value": "<?php\n\nnamespace Bundle\\MarkdownBundle\\DependencyInjection;\n\nuse Symfony\\Components\\DependencyInjection\\Loader\\LoaderExtension;\nuse Symfony\\Components\\DependencyInjection\\Loader\...
php
chosen
[ { "from": "system", "value": "Allow NULL values in transformers.\n" }, { "from": "human", "value": "<?php\n\nnamespace CatLab\\Charon\\Transformers;\n\nuse CatLab\\Charon\\Exceptions\\InvalidPropertyException;\nuse CatLab\\Charon\\Interfaces\\Context;\nuse CatLab\\Charon\\Interfaces\\Transformer...
php
chosen
[ { "from": "system", "value": "Return a 204 No Content response\n\nInstead of sending a 200 OK with a 'true' string response, I think it makes much more sense tu send a 204 with an empty response." }, { "from": "human", "value": "<?php namespace GeneaLabs\\LaravelCaffeine\\Http\\Controllers;\n\nu...
php
chosen
[ { "from": "system", "value": "Improve exception message when fronted not found\n" }, { "from": "human", "value": "<?php\n\nnamespace Ilios\\WebBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Ilios\\CliBu...
php
chosen
[ { "from": "system", "value": "Fix blocks and use ViewData\n" }, { "from": "human", "value": "<?php\n\nnamespace Enhavo\\Bundle\\SliderBundle\\Block;\n\nuse Doctrine\\ORM\\EntityRepository;\nuse Enhavo\\Bundle\\BlockBundle\\Model\\BlockInterface;\nuse Enhavo\\Bundle\\SliderBundle\\Entity\\SliderB...
php
chosen
[ { "from": "system", "value": "Fix attributes of empty space node\n" }, { "from": "human", "value": "<?php\n/**\n * Class Visual composer Generator Empty Space\n * This class was created to generate shortcodes of visual composer plugin,\n * to be used in templates of custom pages wordpress\n *...
php
chosen
[ { "from": "system", "value": "Fix error when trying to display link to an item without a slug\n" }, { "from": "human", "value": "<a href=\"{{ route($route_prefix . '::slug::' . $item->slug) }}\">{{ trans('common::admin.list.content-link') }}</a>" }, { "from": "gpt", "value": "@if (mb...
php
chosen
[ { "from": "system", "value": "Fix syntax to work with php 5.3\n" }, { "from": "human", "value": "<?php\n\nnamespace Phive\\Twig\\Extensions\\Deferred;\n\nclass DeferredExtension extends \\Twig_Extension\n{\n /**\n * @var \\Twig_Environment\n */\n protected $environment;\n\n /**\...
php
chosen
[ { "from": "system", "value": "Improve possibility of JSON Latte filter\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace Trejjam\\Utils\\Latte\\Filter;\n\nuse Nette;\nuse Trejjam;\n\nclass Json\n{\n\t/**\n\t * @param mixed $input\n\t *\n\t * @return string\n\t * @th...
php
chosen
[ { "from": "system", "value": "Set event to disabled on \"hide\"\n" }, { "from": "human", "value": "<?php\n\nclass Admin_FormAction_Event_Hide extends CM_FormAction_Abstract {\n\n\tprotected function _getRequiredFields() {\n\t\treturn array('eventId');\n\t}\n\n\tprotected function _process(CM_Par...
php
chosen
[ { "from": "system", "value": "Resolve class via app property\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Providers;\n\nuse App\\User;\nuse Illuminate\\Support\\Facades\\Auth;\nuse Illuminate\\Support\\Facades\\Gate;\nuse Illuminate\\Support\\ServiceProvider;\n\nclass AuthServicePr...
php
chosen
[ { "from": "system", "value": "Use local json-rpc.php file for mysql demo\n" }, { "from": "human", "value": "<?php\n\nrequire('json-rpc/json-rpc.php');\n\nif (function_exists('xdebug_disable')) {\n xdebug_disable();\n}\n\n$link = new mysqli('localhost', 'user', 'password', 'db_name');\n\nclass...
php
chosen
[ { "from": "system", "value": "Fix errors in mysql rpc demo\n" }, { "from": "human", "value": "<?php\n\nrequire('json-rpc.php');\n\nif (function_exists('xdebug_disable')) {\n xdebug_disable();\n}\n\n$link = new mysqli('localhost', 'user', 'password', 'db_name');\n\nclass MysqlDemo {\n public ...
php
chosen
[ { "from": "system", "value": "Allow some tests to create more then 1 shard.\n\nThis is needed when we want to test things with a routing param.\n" }, { "from": "human", "value": "<?php\n\nnamespace Elastica\\Test;\n\nuse Elastica\\Client;\n\nclass Base extends \\PHPUnit_Framework_TestCase\n{\n ...
php
chosen
[ { "from": "system", "value": "Improve CPF legibility and footprint.\n" }, { "from": "human", "value": "<?php\nnamespace Respect\\Validation\\Rules;\n\nclass Cpf extends AbstractRule\n{\n public function validate($input)\n {\n // Code ported from jsfromhell.com\n $c = preg_rep...
php
chosen
[ { "from": "system", "value": "Fix lostpassword mail when password policy contains special chars.\n" }, { "from": "human", "value": "<?php\n\\OCP\\Util::addScript('password_policy', 'password_policy_user');\n$tpl = new OCP\\Template('password_policy', 'password_policy_user');\n\necho str_replace(...
php
chosen
[ { "from": "system", "value": "Add local-routes to config to allow the toggle of routes\n" }, { "from": "human", "value": "<?php\n\nnamespace Kregel\\Identicon;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass IdenticonServiceProvider extends ServiceProvider\n{\n /**\n * Indicates if ...
php
chosen
[ { "from": "system", "value": "Add more verbose to HTTP events\n" }, { "from": "human", "value": "<?php\n\nnamespace Athena\\Event\\Adapter;\n\nuse Athena\\Event\\HttpTransactionCompleted;\nuse Psr\\Http\\Message\\RequestInterface;\nuse Psr\\Http\\Message\\ResponseInterface;\nuse Symfony\\Compone...
php
chosen
[ { "from": "system", "value": "Put table into container on admin\n" }, { "from": "human", "value": "<?php\n$rank = 1;\n\ninclude 'includes/sqllogin.php';\n\n$result = mysqli_query($con,\"SELECT * FROM `Top Player` ORDER BY Distance DESC\");\n\necho \"<table class='table table-striped'>\n\t\t\t\t<...
php
chosen
[ { "from": "system", "value": "Change default value for mode to FTP_ASCII (in order to have the same default value with the constructor of Ftp.php)\n" }, { "from": "human", "value": "<?php\n\nnamespace Knp\\Bundle\\GaufretteBundle\\DependencyInjection\\Factory;\n\nuse Symfony\\Component\\Config\\...
php
chosen
[ { "from": "system", "value": "Update reverse relationship lookup to expect exceptions.\n" }, { "from": "human", "value": "<?php\n\nnamespace li3_fake_model\\extensions\\data\\relationships;\n\nclass HasMany extends Relation {\n\n\tpublic function appendData() {\n\t\t$foreignField = current($this...
php
chosen
[ { "from": "human", "value": "Add basic content to 'Where next' page\n\nClosely based on http://www.theyworkforyou.com/action/where-next\n\nrelates to #572\n" }, { "from": "gpt", "value": "<p>So OpenAustralia.org.au helped you find the facts - what next?</p>\n<h3>If you have a problem</h3>\n<h4>....
php
chosen
[ { "from": "system", "value": "Fix blade extension for 5.4\n" }, { "from": "human", "value": "<?php\n\nnamespace Pyaesone17\\ActiveState;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass ActiveStateServiceProvider extends ServiceProvider\n{\n /**\n * Bootstrap the application services...
php
chosen