conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Correct namespace of Input Class\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of phpBB.\n *\n * (c) phpBB Ltd.\n *\n * This source file is subject to the MIT license that is bundled\n * with this source code in the file LICENSE.\n */\n\nnamespa...
php
chosen
[ { "from": "system", "value": "Add Amazon AFN fulfillment shipping methods" }, { "from": "human", "value": "<?php\nnamespace Marketplex\\Api\\Model;\n\nclass ShippingMethodEnum extends EnumAbstract {\n const STANDARD = \"Standard\";\n const EXPRESS = \"Express\";\n}\n" }, { "from": ...
php
chosen
[ { "from": "system", "value": "Add missing member and fix doc.\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of the Patternseek ComponentView library.\n *\n * (c) 2014 Tolan Blundell <tolan@patternseek.net>\n *\n * For the full copyright and license information, please view t...
php
chosen
[ { "from": "system", "value": "[AdminBundle] Test console exception subscriber without instantiating a specific command\n" }, { "from": "human", "value": "<?php\n\nnamespace Kunstmaan\\AdminBundle\\Tests\\EventListener;\n\nuse Kunstmaan\\AdminBundle\\Command\\ApplyAclCommand;\nuse Kunstmaan\\Admi...
php
chosen
[ { "from": "system", "value": "Make service provider methods private\n\n\nFormer-commit-id: 6aecba7024a6dc839839f10bd9107258956ff5a2\nFormer-commit-id: c603acc264dd5dbd0cc0f5a86fc24353e8a2170a" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Core\\Config;\n\nuse Concrete\\Core\\Foundat...
php
chosen
[ { "from": "system", "value": "Change default users roles to 'manager'\n" }, { "from": "human", "value": "<?php\nclass UserTableSeeder extends Seeder {\n\n public function run()\n {\n // to use non Eloquent-functions we need to unguard\n Eloquent::unguard();\n\n // All ...
php
chosen
[ { "from": "system", "value": "Fix if there is no placeholder attribute\n" }, { "from": "human", "value": "<?php\n\n// First field is user editable and won't be saved\n// Second field will be the generated hash, is hidden and will be saved\n\n// Multi-Lingual Placeholder, default is none\n$ph = f...
php
chosen
[ { "from": "system", "value": "Fix redirect after admin login\n\n" }, { "from": "human", "value": "<?php\n\nnamespace Webup\\LaravelHelium\\Core\\Http\\Controllers;\n\nuse App\\Http\\Controllers\\Controller;\nuse Illuminate\\Foundation\\Auth\\AuthenticatesUsers;\nuse Illuminate\\Foundation\\Auth\...
php
chosen
[ { "from": "system", "value": "Rewrite test to accomodate Suaybay reloaded\n" }, { "from": "human", "value": "<?php\n\n\nclass ExampleTest extends TestCase\n{\n /**\n * A basic functional test example.\n *\n * @return void\n */\n public function testBasicExample()\n {\n ...
php
chosen
[ { "from": "system", "value": "Make integration of NotificationContents Administration compatible to CakePHP 3.1.x\n" }, { "from": "human", "value": "<?php\n\nnamespace Notifications\\Controller;\n\nuse \\App\\Controller\\AppController as BaseController;\nuse \\Cake\\Core\\Configure;\nuse \\Cake\...
php
chosen
[ { "from": "system", "value": "Update client repository for grants that don't require secret.\n\nThis was a change made between the release candidate and final version.\nIt doesn't impact any of the grants we currently use, but makes sense to\nclean this up now so it's not forgotten.\n" }, { "from": ...
php
chosen
[ { "from": "system", "value": "Fix mismatch value for ID caused by max int size in PHP\n" }, { "from": "human", "value": "<?php\n\nnamespace Laravolt\\Indonesia\\Models;\n\nclass Model extends \\Illuminate\\Database\\Eloquent\\Model\n{\n function __construct()\n {\n \t$this->table = conf...
php
chosen
[ { "from": "system", "value": "Fix getPath and getUrl for markdown pages that extend multiple templates\n" }, { "from": "human", "value": "<?php namespace TightenCo\\Jigsaw;\n\nclass PageVariable extends IterableObject\n{\n public function addVariables($variables)\n {\n $this->items ...
php
chosen
[ { "from": "system", "value": "Fix for failing Travis CI tests.\n\nWrapped class names in quotes. Should get rid of \"Use of undefined\nconstant ...\" errors.\n" }, { "from": "human", "value": "<?php\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\nuse ReMQ\\Queue;\n\nclass QueueTest extends PH...
php
chosen
[ { "from": "system", "value": "Fix bug with count method in laravel 4 eloquent class\n" }, { "from": "human", "value": "<?php\n\nnamespace Michaeljennings\\Carpenter\\Store\\Laravel4;\n\nuse Michaeljennings\\Carpenter\\Contracts\\Store;\nuse Michaeljennings\\Carpenter\\Store\\Eloquent as Laravel5...
php
chosen
[ { "from": "system", "value": "Drop all rows in MySQL tables on tear down for integration tests\n" }, { "from": "human", "value": "<?php\n\nnamespace RCatlin\\Blog\\Test\\Integration;\n\nuse GuzzleHttp\\Client;\nuse League\\Container\\Container;\n\nabstract class AbstractIntegrationTest extends \...
php
chosen
[ { "from": "system", "value": "Fixed: Make regression test return verbose output for debugging.\n" }, { "from": "human", "value": "<?php\n\nnamespace Qafoo\\ChangeTrack;\n\n/**\n * @group regression\n */\nclass AnalyzerRegressionTest extends \\PHPUnit_Framework_TestCase\n{\n public function se...
php
chosen
[ { "from": "system", "value": "Fix Query does not exist\n\nFix \"Class PackageClass\\Property\\Search\\Query does not exist\" does not exist from custom SavedSearch" }, { "from": "human", "value": "<?php\nnamespace Concrete\\Core\\Entity\\Search;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * @...
php
chosen
[ { "from": "system", "value": "Adjust in ValidationGroup to possible extend it\n" }, { "from": "human", "value": "<?php\nnamespace Melody\\Validation\\ValidationGroups;\n\nuse Melody\\Validation\\Common\\Collections\\ConstraintsCollection;\n\nclass ValidationGroups\n{\n private $groups = array...
php
chosen
[ { "from": "system", "value": "Add timestamps to team_user intermediate table" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateTeamUser extends Migrati...
php
chosen
[ { "from": "system", "value": "Sort guests in ad form\n" }, { "from": "human", "value": "<?php\n\nnamespace DinnerBundle\\Form;\n\nuse DinnerBundle\\Entity\\Guest;\nuse Symfony\\Bridge\\Doctrine\\Form\\Type\\EntityType;\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\E...
php
chosen
[ { "from": "system", "value": "Check if source is drupal before updating." }, { "from": "human", "value": "<?php\n/**\n * @file UpdateAllCommand.php\n */\n\n\nnamespace HubDrop\\Bundle\\Command;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand;\nuse Symfony\\Component\\Cons...
php
chosen
[ { "from": "system", "value": "Throw NotReadable exception if the exif_read_data fails\n\nPNGs and corrupted images will raise exceptions and need to be hanlded correctly.\n\nStop handling and raise an appropriate exception.\n" }, { "from": "human", "value": "<?php\n\nnamespace Intervention\\Ima...
php
chosen
[ { "from": "system", "value": "Add nullable to assist imports\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass FkPageGroups extends Migration\n{\n /**\n * Run the migrations.\n *\n * ...
php
chosen
[ { "from": "system", "value": "Use transfer to xml in refactor script\n" }, { "from": "human", "value": "<?php\n\nrequire_once(__DIR__ . '/../vendor/autoload.php');\n\nspl_autoload_register(function ($class) {\n $class = str_replace(['ReneFactor', '\\\\'], ['', DIRECTORY_SEPARATOR], $class);\n...
php
chosen
[ { "from": "system", "value": "Use request path info as fallback\n" }, { "from": "human", "value": "<?php\n\nnamespace Kunstmaan\\LanguageChooserBundle\\LocaleGuesser;\n\nuse Lunetics\\LocaleBundle\\LocaleGuesser\\AbstractLocaleGuesser;\nuse Lunetics\\LocaleBundle\\Validator\\MetaValidator;\nuse ...
php
chosen
[ { "from": "system", "value": "Fix migration base class reference in import\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migration\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\n/**\n * Creates the runtime config da...
php
chosen
[ { "from": "system", "value": "Optimize memory consumption of Amp\\ByteStream\\pipe\n" }, { "from": "human", "value": "<?php\n\nnamespace Amp\\ByteStream;\n\nuse Amp\\Promise;\nuse function Amp\\call;\n\n// @codeCoverageIgnoreStart\nif (\\strlen('…') !== 3) {\n throw new \\Error(\n 'The...
php
chosen
[ { "from": "system", "value": "Add whitespace after description in phpdoc and fix classname used\n" }, { "from": "human", "value": "<?php\n\nnamespace EventCentric\\EventStore;\n\nuse EventCentric\\Contracts\\Contract;\nuse EventCentric\\EventStore\\EventStream;\nuse EventCentric\\Identifiers\\Id...
php
chosen
[ { "from": "system", "value": "Add return type for abstract style id getter\n" }, { "from": "human", "value": "<?php\n\n/**\n * Abstract Stylesheet\n *\n * @package GrottoPress\\Jentil\\Setups\\Styles\n * @since 0.6.0\n *\n * @author GrottoPress <info@grottopress.com>\n * @author N Atta Kusi Adus...
php
chosen
[ { "from": "system", "value": "Add type hints for mocked dependencies\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Mihaeu\\TestGenerator;\n\nuse PhpParser\\NodeTraverser;\nuse PhpParser\\NodeVisitor\\NameResolver;\nuse PhpParser\\Parser;\nuse PHPUnit\\Framewor...
php
chosen
[ { "from": "system", "value": "TASK: Create folder for backups in tmp\n" }, { "from": "human", "value": "<?php\n\nnamespace EditorconfigChecker\\Utilities;\n\nclass Utilities\n{\n /**\n * returns the end of line character from editorconfig rules\n *\n * @param array $rules\n * ...
php
chosen
[ { "from": "system", "value": "Add $ModuleManager to local space (CallModule)\n" }, { "from": "human", "value": "<?php\n\trequire_once 'Utils.php';\n\n\tclass WhatsBotCaller\n\t{\n\t\tprivate $ModuleManager = null;\n\t\tprivate $Whatsapp = null;\n\t\tprivate $Utils = null;\n\n\t\tpublic function ...
php
chosen
[ { "from": "system", "value": "Disable anti-spam form field label by default.\n" }, { "from": "human", "value": "<?php\n/**\n * @author Igor Nikolaev <igor.sv.n@gmail.com>\n * @copyright Copyright (c) 2015, Darvin Studio\n * @link https://www.darvin-studio.ru\n *\n * For the full copyrigh...
php
chosen
[ { "from": "system", "value": "Fix install ways triggering re-indexing recommendation\n" }, { "from": "human", "value": "<?php\n\nclass SV_WordCountSearch_Installer\n{\n public static function install($installedAddon, array $addonData, SimpleXMLElement $xml)\n {\n $version = isset($i...
php
chosen
[ { "from": "system", "value": "Extend example config with all config options.\n" }, { "from": "human", "value": "<?php\n// setup redis caching\n$config['cache']['backend'] = 'Redis';\n$config['cache']['backendOptions'] = array(\n 'server' => '127.0.0.1',\n 'port' => 6379,\n )...
php
chosen
[ { "from": "system", "value": " Define public $serverService in class\n" }, { "from": "human", "value": "<?php\nnamespace GearmanMonitor\\Controller;\n\nclass ServerController\n{\n\n public function __construct($twig, $serverService)\n {\n $this->serverService = $serverService;\n ...
php
chosen
[ { "from": "system", "value": "Remove foreign key constraint on api_log Table\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass CreateApiLogTable extends Migration\n{\n /**\n * Run the migrati...
php
chosen
[ { "from": "system", "value": "Add select part test for invalid column name\n" }, { "from": "human", "value": "<?php\n\nuse Mdd\\QueryBuilder\\Queries\\Parts;\n\nclass SelectPartBuilderTest extends PHPUnit_Framework_TestCase\n{\n /**\n * @dataProvider providerTestSelectViaConstructor\n ...
php
chosen
[ { "from": "system", "value": "Add frequently required checks and variables\n\nSigned-off-by: Riddhesh Sanghvi <f8c90b0b72a59c76b108f89842786e39e7dc3e58@gmail.com>\n" }, { "from": "human", "value": "<?php\n\nnamespace EE\\Migration;\n\nabstract class Base {\n\n public $status = 'incomplete';\n...
php
chosen
[ { "from": "system", "value": "Define constant directories without trailing /\n" }, { "from": "human", "value": "<?php\n\nnamespace Test;\n\nclass Environment\n{\n public static function initialize($application)\n {\n self::setApplicationRootDir();\n\n \\SprykerFeature\\Shared...
php
chosen
[ { "from": "system", "value": "Remove redundant index (from unique constraint)\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass CreateNewsPosts extends Mig...
php
chosen
[ { "from": "system", "value": "Reduce the code needed to test the string representation of an HTTP response object.\n" }, { "from": "human", "value": "<?php\n\n/**\n * ResponseTest\n *\n * @package Orient\n * @subpackage Test\n * @author Alessandro Nadalin <alessandro.nadalin@gmail.com>\n ...
php
chosen
[ { "from": "system", "value": "Remove _getView() usages from renderAdapter\n" }, { "from": "human", "value": "<?php\n\nclass CM_RenderAdapter_FormField extends CM_RenderAdapter_Abstract {\n\n public function fetch(array $params, CM_FormField_Abstract $field, CM_Form_Abstract $form, $fieldName)...
php
chosen
[ { "from": "system", "value": "Remove \"Bg\" namespace from widgets\n" }, { "from": "human", "value": "<?php\r\nclass sfWidgetFormI18nSelect2ChoiceCurrency extends BgWidgetFormSelect2Choice\r\n{\r\n protected function configure($options = array(), $attributes = array())\r\n {\r\n par...
php
chosen
[ { "from": "system", "value": "Allow passing a model to the rules for more advanced rule setting.\n\n" }, { "from": "human", "value": "<?php\n\nnamespace UMFlint\\Repository\\Rules;\n\nabstract class BaseRules\n{\n /**\n * Array of rules.\n *\n * @return array\n */\n abstrac...
php
chosen
[ { "from": "system", "value": "Fix \"covers\" annotation in tests\n" }, { "from": "human", "value": "<?php\n/**\n * @author Sergii Bondarenko, <sb@firstvector.org>\n */\n\nnamespace Drupal\\Tests\\TqExtension\\Utils;\n\nuse Drupal\\TqExtension\\Utils\\LogicalAssertion;\n\n/**\n * Class LogicalAss...
php
chosen
[ { "from": "system", "value": "Use the global composer autoloader if phan is installed globally.\n" }, { "from": "human", "value": "<?php declare(strict_types = 1);\n\n// Grab these before we define our own classes\n$internal_class_name_list = get_declared_classes();\n$internal_interface_name_lis...
php
chosen
[ { "from": "system", "value": "Remove default eager-load of LAN with event\n" }, { "from": "human", "value": "<?php\n\nnamespace Zeropingheroes\\Lanager;\n\nuse Eloquent;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\Relations\\belongsTo;\nuse Illuminate\\Databa...
php
chosen
[ { "from": "system", "value": "Read DB test config from a file\n" }, { "from": "human", "value": "<?php\n\nnamespace Hodor\\Database;\n\nuse PHPUnit_Framework_TestCase;\n\nclass PgsqlAdapterTest extends PHPUnit_Framework_TestCase\n{\n\n /**\n * @expectedException \\Exception\n */\n ...
php
chosen
[ { "from": "system", "value": "Add undo button for new forks to editing metabox\n" }, { "from": "human", "value": "<?php\n/**\n * Render the content of the metabox in the admin post editing form.\n */\n$post_id = $GLOBALS['post']->ID;\n$parent_id = get_post_meta($post_id, '_persistfork-parent', t...
php
chosen
[ { "from": "system", "value": "Fix add security configurations compiler pass.\n" }, { "from": "human", "value": "<?php\n/**\n * @author Igor Nikolaev <igor.sv.n@gmail.com>\n * @copyright Copyright (c) 2015, Darvin Studio\n * @link https://www.darvin-studio.ru\n *\n * For the full copyrigh...
php
chosen
[ { "from": "system", "value": "Set default fetch mode to fetch_obj\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is a part of the ChZ-PHP package.\n *\n * (c) François LASSERRE <choiz@me.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file t...
php
chosen
[ { "from": "system", "value": "Add a newline at eof\n" }, { "from": "human", "value": "<?php\n\nnamespace PHPOrchestra\\BackofficeBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration as Config;\n\n/**\n * Cla...
php
chosen
[ { "from": "system", "value": "Add missing @throws declaration to the interface\n\n" }, { "from": "human", "value": "<?php\n\nnamespace Jalle19\\CertificateParser\\Provider;\n\n/**\n * Interface ProviderInterface\n * @package Jalle19\\CertificateParser\\Provider\n */\ninterface ProviderInterface\...
php
chosen
[ { "from": "system", "value": "Remove call to method MemberId::any.\n" }, { "from": "human", "value": "<?php\n/**\n * PHP version 5.6\n *\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\nnamespace Hexagonal\\DomainEvents;\n\nuse Ewallet\\...
php
chosen
[ { "from": "system", "value": "Add form-horizontal class for the view section\n" }, { "from": "human", "value": "@extends('layouts.app')\n\n@section('page-title')\n {!! $t[$type.'_title'] or trans('eliurkis::crud.'.$type.'_title') !!}\n@stop\n\n@section('content')\n <div id=\"form-manage\" ...
php
chosen
[ { "from": "system", "value": "Rename createWol() to createSender() and adjust CS" }, { "from": "human", "value": "<?php\n\nnamespace Clue\\Wol;\n\nuse React\\EventLoop\\LoopInterface;\nuse Socket\\React\\Datagram\\Factory as DatagramFactory;\nuse Socket\\React\\Datagram\\Socket;\n\nclass Factory...
php
chosen
[ { "from": "system", "value": "Add fallbacks for parsed Url\n" }, { "from": "human", "value": "<?php\n\nnamespace Collectivism\\Router;\n\nclass Request\n{\n public $method;\n public $scheme;\n public $host;\n public $uri;\n public $query;\n public $fragment;\n\n public funct...
php
chosen
[ { "from": "system", "value": "Fix overzealous transactions on dashboard panels\n\nSummary: Fixes T10474. This had the same root cause as T10024 -- a missing call to `didSetValueFromStorage()` because of the way the fields work.\n\nTest Plan:\n - Edited a text panel before change, without changing text: got...
php
chosen
[ { "from": "system", "value": "Change the order of the Web_Alltests suite" }, { "from": "human", "value": "<?php\nrequire_once dirname(__FILE__).'/../phpunit.php';\n\nif(!defined('PHPUnit_MAIN_METHOD')) {\n define('PHPUnit_MAIN_METHOD', 'Web_AllTests::main');\n}\n\nrequire_once 'TAssetManagerTes...
php
chosen
[ { "from": "system", "value": "Add demo1 include, add namespace\n" }, { "from": "human", "value": "<?php\n/**\n * The main template file\n *\n * @package backbonedemo\n * @since 0.1.0\n */\n\n" }, { "from": "gpt", "value": "<?php\nnamespace backbonedemo;\n/**\n * The main template fil...
php
chosen
[ { "from": "system", "value": "Add type hints to autoloader closure\n" }, { "from": "human", "value": "<?php\n\n/**\n * Functions\n *\n * @package GrottoPress\\Jentil\n * @since 0.1.0\n *\n * @see https://developer.wordpress.org/themes/basics/theme-functions/\n *\n * @author GrottoPress <info@gro...
php
chosen
[ { "from": "system", "value": "Update to return data in alphabetical order\n\nReturns the countries and continents in alphabetical order, using the orderBy Method in Ascending order." }, { "from": "human", "value": "<?php\n\nnamespace Khsing\\World;\n\nuse Khsing\\World\\Models\\Continent;\nuse K...
php
chosen
[ { "from": "system", "value": "Fix logging out. :sheepish grin:\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Controller;\n\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\Routing\\RouterInte...
php
chosen
[ { "from": "system", "value": "Fix translation tag for hook for openid provider" }, { "from": "human", "value": "<?php\n/**\n * Hook to add the OpenID provider to the authentication tab.\n *\n * @param array &$links The links on the frontpage, split into sections.\n */\nfunction openidProvider_h...
php
chosen
[ { "from": "system", "value": "Add $property to cache key\n" }, { "from": "human", "value": "<?php\n\nclass CM_Http_ClientDevice {\n\n /** @var \\Jenssegers\\Agent\\Agent */\n protected $_parser;\n\n /** @var array */\n protected $_headerList;\n\n /**\n * @param CM_Http_Request...
php
chosen
[ { "from": "system", "value": "Test rgb to hex conversions\n" }, { "from": "human", "value": "<?php\n\nnamespace Rainbow\\Converter;\n\nuse Rainbow\\ColorInterface;\nuse Rainbow\\Hex;\n\nfinal class RgbToHexConverter implements ConverterInterface\n{\n /**\n * Returns the converted color\n ...
php
chosen
[ { "from": "system", "value": "Revert \"ask the expert container\"\n\nThis reverts commit 7e99eb5e35e71568450623b14bb920aec07f9c84.\n" }, { "from": "human", "value": "<?php\r\n/**\r\n * Template Name: Custom Template Ask The Expert\r\n */\r\n?>\r\n\r\n<div class=\"container\">\r\n<div class=\"abo...
php
chosen
[ { "from": "system", "value": "Add in a way to avoid scanning for databases on remote hosts\n" }, { "from": "human", "value": "<?php\n\n\trequire('config.php');\n\n\t$dbh = new PDO($reviewhost['dsn'], $reviewhost['user'], $reviewhost['password']);\n\n\tunset($query);\n\n\tforeach ($explainhosts a...
php
chosen
[ { "from": "system", "value": "Add basic Scrivener class structure and preview_post_link filter skeleton\n" }, { "from": "human", "value": "<?php" }, { "from": "gpt", "value": "<?php\n\nclass Scrivener {\n\n\tprivate static $_instance;\n\n\tprivate function __construct() {\n\t\tadd_fi...
php
chosen
[ { "from": "system", "value": "Use jquery to make ajax call when button is clicked\n" }, { "from": "human", "value": "<?php require_once('./config.php'); ?>\n\n<script src=\"https://checkout.stripe.com/checkout.js\"></script>\n\n<button id=\"customButton\">Purchase</button>\n\n<script>\n var han...
php
chosen
[ { "from": "system", "value": "Remove magic quotes as a part of the initialization of simpleSAMLphp.\n\n\ngit-svn-id: a243b28a2a52d65555a829a95c8c333076d39ae1@195 44740490-163a-0410-bde0-09ae8108e29a\n" }, { "from": "human", "value": "<?php\n\n\n\n$path_extra = dirname(dirname(__FILE__)) . '/lib'...
php
chosen
[ { "from": "system", "value": "Make the data not field mandatory\n" }, { "from": "human", "value": "<?php\n/**\n* Function to create a form to \n*/\n\nnamespace AppBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\n\nuse SSI\\...
php
chosen
[ { "from": "system", "value": "Fix font-awesome LESS source not being found in some cases\n" }, { "from": "human", "value": "<?php\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": "Correct instructions for setting the view script\n" }, { "from": "human", "value": "<?php\n\n/**\n * An alternative view script for the 'home' template\n * \n * This view script renders predefined page properties as JSON. This view can\n * be triggered by specifying...
php
chosen
[ { "from": "system", "value": "Add convenience methods for calling prot/priv methods.\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of Sesshin library.\n *\n * (c) Przemek Sobstel <http://sobstel.org>\n *\n * This source file is subject to the MIT license that is bundled\n * ...
php
chosen
[ { "from": "system", "value": "Make sure to sync all files (including hidden files).\n" }, { "from": "human", "value": "<?php\n\nnamespace BestIt\\Mage\\Tasks\\Release;\n\nuse Mage\\Task\\BuiltIn\\Deploy\\Release\\PrepareTask as MagePrepareTask;\n\n/**\n * Class PrepareTask\n *\n * @author Ahmad ...
php
chosen
[ { "from": "system", "value": "Update now creates tmp git ignored dir\n" }, { "from": "human", "value": "<?php\n\nnamespace SKE\\Composer;\n\nclass Script\n{\n public static function install()\n {\n $dirs = array(\n 'resources/cache',\n 'resources/log',\n ...
php
chosen
[ { "from": "system", "value": "Add path to theme attributes\n" }, { "from": "human", "value": "<?php namespace Pingpong\\Themes;\n\nuse Illuminate\\Filesystem\\Filesystem;\nuse Pingpong\\Modules\\Json;\nuse Symfony\\Component\\Finder\\Finder as SymfonyFinder;\n\nclass Finder {\n\n /**\n * ...
php
chosen
[ { "from": "system", "value": "Fix headers when creating new response from twig response\n" }, { "from": "human", "value": "<?php\nnamespace GMO\\Common\\Web\\Twig;\n\nuse Silex\\Application;\nuse Silex\\ServiceProviderInterface;\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;...
php
chosen
[ { "from": "system", "value": "Fix finder does not exist directory\n\n" }, { "from": "human", "value": "<?php\n\nreturn [\n\n /*\n |--------------------------------------------------------------------------\n | Autoload Files.\n |-------------------------------------------------------...
php
chosen
[ { "from": "system", "value": "Fix event after remove file\n" }, { "from": "human", "value": "<?php\n\nnamespace Purethink\\CMSBundle\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Purethink\\CoreBundle\\Entity\\Media;\n\n/**\n * @ORM\\Table()\n * @ORM\\Entity\n */\nclass ComponentHasFile ex...
php
chosen
[ { "from": "system", "value": "Update query for selecting most-expensive tags on dashboard to query by space_id instead of user_id\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse Illuminate\\Http\\Request;\n\nuse Auth;\nuse DB;\n\nclass DashboardController ext...
php
chosen
[ { "from": "system", "value": "Test defining functions in the global scope.\n" }, { "from": "human", "value": "<?php\nnamespace Phortress;\n\nclass EnvironmentTest extends \\PHPUnit_Framework_TestCase {\n\tpublic function testCanFindFunction() {\n\n\t}\n} \n" }, { "from": "gpt", "valu...
php
chosen
[ { "from": "system", "value": "Implement custom Imagine cache resolver.\n" }, { "from": "human", "value": "<?php\n/**\n * @author Igor Nikolaev <igor.sv.n@gmail.com>\n * @copyright Copyright (c) 2017, Darvin Studio\n * @link https://www.darvin-studio.ru\n *\n * For the full copyright and ...
php
chosen
[ { "from": "system", "value": "Add testGetMyData for testing GetMyData request\n" }, { "from": "human", "value": "<?php\n\n\nclass ClientTest extends PHPUnit_Framework_TestCase\n{\n\n public function testIsThereAnySyntaxError()\n {\n $var = new Rentlio\\Api\\Client(\"some api key\");...
php
chosen
[ { "from": "system", "value": "Add @uses tags for --strict mode.\n\nWhoops missed these!\n\nUnfortunately, I had to specify the full class name in these uses tags.\n" }, { "from": "human", "value": "<?php\nnamespace Nubs\\Vectorix;\n\nuse PHPUnit_Framework_TestCase;\n\n/**\n * @coversDefaultClass...
php
chosen
[ { "from": "system", "value": "Add Changhong to list of manufacturers\n" }, { "from": "human", "value": "<?php\n\nnamespace WhichBrowser\\Data;\n\nManufacturers::$GENERIC = [\n 'LG Electronics' => 'LG',\n 'LGE' => 'LG',\n '...
php
chosen
[ { "from": "system", "value": "Make sure user can also change is_presynopsis_seminar.\n" }, { "from": "human", "value": "<?php\n\ninclude_once 'header.php';\ninclude_once 'database.php';\n\n$_POST[ 'speaker' ] = $_SESSION[ 'user' ];\n\n$res = insertIntoTable( 'aws_requests'\n , array( 'sp...
php
chosen
[ { "from": "system", "value": "Add filter input on server var" }, { "from": "human", "value": "<?php \n \nnamespace Acd; \n \n/** \n* Http class\n* @author Acidvertigo MIT Licence \n*/ \nclass Http \n{ \n \n /** \n * Check HTTP version\n * @return string \n */\n public functi...
php
chosen
[ { "from": "system", "value": "Change the spanish password reminder sent language line for a more readable one.\n" }, { "from": "human", "value": "<?php\n\nreturn [\n\n /*\n |--------------------------------------------------------------------------\n | Password Reminder Language Lines\n...
php
chosen
[ { "from": "system", "value": "Use the new autoload.php path" }, { "from": "human", "value": "<?php\n\nrequire_once __DIR__.'/../vendor/.composer/autoload.php';\n$app = require __DIR__.'/../src/app.php';\nrequire __DIR__.'/../src/controllers.php';\n$app->run();\n" }, { "from": "gpt", ...
php
chosen
[ { "from": "system", "value": "Change hostname for servername variable\n" }, { "from": "human", "value": "<?php\nrequire 'init.php';\n\nComPHPartment\\ComPHPartment::$redirectURI = 'http://comphpartment/dashboard.php';\n\n$comPHPartment->authenticate();\n$_SESSION['token'] = $comPHPartment->token...
php
chosen
[ { "from": "system", "value": "Allow empty baseDir for getClassPath\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of the CLIFramework package.\n *\n * (c) Yo-An Lin <cornelius.howl@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * ...
php
chosen
[ { "from": "system", "value": "Fix (again) environment URL in `web` command\n" }, { "from": "human", "value": "<?php\n\nnamespace Platformsh\\Cli\\Command;\n\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\Console\\Output\\OutputInterface;\n\nclass WebCommand ext...
php
chosen
[ { "from": "system", "value": "Fix relation sync for library materials\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Transformers\\Inbound\\Library;\n\nuse App\\Transformers\\Datum;\nuse App\\Transformers\\Inbound\\AbstractTransformer;\n\nclass Material extends AbstractTransformer\n{...
php
chosen
[ { "from": "system", "value": "Tag Display in single Ticket\n" }, { "from": "human", "value": "<?php\n\nuse yii\\helpers\\Html;\nuse yii\\bootstrap\\Carousel;\n\n/* @var $this yii\\web\\View */\n/* @var $ticket common\\models\\Ticket */\n/* @var $showTagMax int/boolean maximum number of tags to d...
php
chosen
[ { "from": "system", "value": "Use bigger AC icon for mobile support\n" }, { "from": "human", "value": "<?php\n\nfunction slack_get_user_by_email($email) {\n\n static $users;\n\n if (defined('SLACK_API_TOKEN')) {\n\n if (!$users) {\n // @todo cache users.list\n ...
php
chosen
[ { "from": "system", "value": "Fix resource check for grouping scope\n" }, { "from": "human", "value": "<?php\n\nnamespace Luminary\\Services\\ApiQuery\\Grouping;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Luminary\\Services\\ApiQuery\\Eloquent\\BaseScope;\n\nclass Scope extends BaseScope...
php
chosen