conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use pg_lowrite for writing resource to PostgreSQL\n\nUse pg_lowwrite instead of pg_import for writing resource to PostgreSQL database." }, { "from": "human", "value": "<?php\r\n$uploadDirectory = 'resourceUploads/';\r\n$temp = explode ( '.', $_FILES [ 'fileToUpload'...
php
chosen
[ { "from": "system", "value": "Fix SQL error in migration 181\n" }, { "from": "human", "value": "<?php\n\nnamespace vv201830;\n\n\nclass AddBootswatchSettings extends \\AbstractUpdatableMigration {\n\n function innerUp($hesk_settings) {\n $this->executeQuery(\"INSERT INTO `\" . hesk_dbE...
php
chosen
[ { "from": "system", "value": "Replace php 5.4 array notation" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sonata package.\n *\n * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>\n *\n * For the full copyright and license information, please view the LICENSE\n * ...
php
chosen
[ { "from": "system", "value": "Use is_readable instead of file_exists\n" }, { "from": "human", "value": "<?php\n\nnamespace Ochenta;\n\n/** @throws InvalidArgumentException */\nfunction resource_of($resource) {\n if (is_null($resource)) {\n return null;\n }\n\n if (is_scalar($reso...
php
chosen
[ { "from": "system", "value": "Add Additional Scopes to Vendor Config\n\nNewly added scopes were missing from vendor config file. These scopes have been added.\n" }, { "from": "human", "value": "<?php\n\nreturn [\n 'client_id' => env('TWITCH_KEY', ''),\n 'client_secret' => env('TWITCH_SECRE...
php
chosen
[ { "from": "system", "value": "Fix for main class not found\n" }, { "from": "human", "value": "<?php\n\n/**\n * Lazy Images for Contao Open Source CMS\n *\n * @copyright DerHaeuptling 2016\n * @author Martin Schwenzer <mail@derhaeuptling.com>\n * @author Sebastijan Ribarić <sebastijan.ri...
php
chosen
[ { "from": "system", "value": "Update phpdoc constructor parameter can't be null\n" }, { "from": "human", "value": "<?php\n\nnamespace SumoCoders\\FrameworkMultiUserBundle\\Security;\n\nuse SumoCoders\\FrameworkMultiUserBundle\\Exception\\InvalidPasswordResetTokenException;\nuse SumoCoders\\Frame...
php
chosen
[ { "from": "system", "value": "Add new fields to user profile information\n" }, { "from": "human", "value": "<?php\r\n/**\r\n * Created by PhpStorm.\r\n * User: Nabeel\r\n * Date: 2015-10-15\r\n * Time: 6:40 PM\r\n */\r\n\r\nnamespace ShortCirquit\\LinkoScopeApi\\Models;\r\n\r\n\r\nclass UserProf...
php
chosen
[ { "from": "system", "value": "Create wrapper for methods deprecated in PHPUnit 9\n" }, { "from": "human", "value": "<?php\n\nnamespace Codeception\\PHPUnit;\n\n\nabstract class TestCase extends \\PHPUnit\\Framework\\TestCase\n{\n\n protected function setUp(): void\n {\n if (method_e...
php
chosen
[ { "from": "system", "value": "Fix failing test in App.\n" }, { "from": "human", "value": "<?php\n/**\n * Core Configurations.\n *\n * PHP 5\n *\n * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)\n * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)\n...
php
chosen
[ { "from": "system", "value": "Rename default connection name property\n" }, { "from": "human", "value": "<?php\nnamespace Veles\\DataBase\\ConnectionPools;\n\nuse Veles\\DataBase\\Connections\\PdoConnection;\n\n/**\n * Class ConnectionPool\n *\n * @author Alexander Yancharuk <alex at itvault do...
php
chosen
[ { "from": "system", "value": "New: Add change event handler to payment customers.\n" }, { "from": "human", "value": "<?php\n\nnamespace SecucardConnect\\Product\\Payment;\n\nuse SecucardConnect\\Client\\ProductService;\n\n\n/**\n * Operations for the payment/customers resource.\n * @package Secu...
php
chosen
[ { "from": "system", "value": "Add api key generator command.\n" }, { "from": "human", "value": "<?php namespace App\\Console;\n\nuse Illuminate\\Console\\Scheduling\\Schedule;\nuse Laravel\\Lumen\\Console\\Kernel as ConsoleKernel;\n\nclass Kernel extends ConsoleKernel\n{\n\n /**\n * The A...
php
chosen
[ { "from": "system", "value": "Replace big alerts with inline alerts for register view\n" }, { "from": "human", "value": "@extends('layout')\n\n@section('body')\n <div class=\"row\">\n <div class=\"column size-560 align-center\">\n @if ($errors->any())\n @forea...
php
chosen
[ { "from": "system", "value": "Allow users to disable package autoloading\n" }, { "from": "human", "value": "<?php\n\nnamespace Illuminate\\Foundation\\Bootstrap;\n\nuse Illuminate\\Filesystem\\Filesystem;\nuse Illuminate\\Foundation\\PackageAssetLoader;\nuse Illuminate\\Contracts\\Foundation\\Ap...
php
chosen
[ { "from": "system", "value": "Add path when calling object\n" }, { "from": "human", "value": "<?php\n\nnamespace Politix\\PolitikportalBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\n// use Politix\\PolitikportalBundle\\Model;\n\n\nclass SourcesController ex...
php
chosen
[ { "from": "system", "value": "Add new custom post type and add new setting.\n" }, { "from": "human", "value": "<?php\n/**\n * The story editor.\n *\n * @package AMP\n */\n\n// don't load directly.\nif ( ! defined( 'ABSPATH' ) ) {\n\tdie( '-1' );\n}\n\nrequire_once ABSPATH . 'wp-admin/admin-heade...
php
chosen
[ { "from": "system", "value": "Fix config file loading in prod\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the EmharCqrsInfrastructure bundle.\n *\n * (c) Emmanuel Harleaux\n *\n * This source file is subject to the MIT license that is bundled\n * with this source code...
php
chosen
[ { "from": "system", "value": "Fix Translator tests for Travis\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full copyright and license information, please view th...
php
chosen
[ { "from": "system", "value": "FIX If no image found for the given conversion, skip adding data- attribute\n" }, { "from": "human", "value": "<?php\n\n/**\n * @author marcus\n */\nclass AssetUrlConversionFilter implements RequestFilter {\n \n private $convertUrls = false;\n \n \n p...
php
chosen
[ { "from": "system", "value": "Stop reporting 404 errors to sentry\n\nWe get lots of these and they are all crawlers or bad actors. We should\njust ignore them.\n" }, { "from": "human", "value": "<?php\nnamespace App\\EventListener;\n\nuse App\\Service\\Config;\nuse Symfony\\Component\\HttpKernel...
php
chosen
[ { "from": "system", "value": "Make doc blocks bc compliant\n" }, { "from": "human", "value": "<?php\n\n/**\n * Copyright 2016 SURFnet B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may ob...
php
chosen
[ { "from": "system", "value": "Add word boundary to regex\n" }, { "from": "human", "value": "<?php\n\nnamespace VCR\\CodeTransform;\n\nclass SoapCodeTransform extends AbstractCodeTransform\n{\n const NAME = 'vcr_soap';\n\n private static $replacements = array(\n 'new \\VCR\\Util\\Soa...
php
chosen
[ { "from": "system", "value": "Add common directory to include path\n" }, { "from": "human", "value": "<?php\n/**\n* Flipside Common Code Autoload Function\n*\n* Autoload Flipside Common code Classes with the syntax Namespace/class.Classname.php\n*\n* @author Patrick Boyd / problem@burningflipsid...
php
chosen
[ { "from": "system", "value": "Make base url schema agnostic\n" }, { "from": "human", "value": "<?php\n\n/**\n * @file\n * Main \"engine\" file. Should not need to be customized.\n */\n\nsession_start();\nrequire 'vendor/autoload.php';\n$base_url = 'http://' . $_SERVER['SERVER_NAME'] . '/';\n$api...
php
chosen
[ { "from": "system", "value": "Make examples scripts executable only via CLI.\n\nThis is meant as a basic layer of protection for those cases where the whole\nPredis repository is cloned into a path which is publicly exposed by the web\nserver.\n\nCloses #408\n" }, { "from": "human", "value": "<?...
php
chosen
[ { "from": "system", "value": "Add method to get the path as a string\n" }, { "from": "human", "value": "<?php namespace Modules\\Media\\Entities;\n\nuse Dimsav\\Translatable\\Translatable;\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Modules\\Media\\ValueObjects\\MediaPath;\n\n/**\n * Class ...
php
chosen
[ { "from": "system", "value": "Fix display tests in navbar\n\nprev $this->data[] is overwritten QuestionEdit by controller\n" }, { "from": "human", "value": "<?php\n\nnamespace Egzaminer\\Question;\n\nuse Egzaminer\\Admin\\Dashboard as Controller;\n\nclass QuestionAdd extends Controller\n{\n p...
php
chosen
[ { "from": "system", "value": "Trim slashes from base URL.\n" }, { "from": "human", "value": "<?php\n\nnamespace Orbt\\ResourceMirror;\n\nuse Symfony\\Component\\EventDispatcher\\EventDispatcherInterface;\n\n/**\n * Main service for materializing services.\n */\nclass ResourceMirror\n{\n /**\n...
php
chosen
[ { "from": "system", "value": "CRM-6422: Fix failing PHPUnit tests\n- Removed unused persist.\n- Code styling cleanup.\n" }, { "from": "human", "value": "<?php\n\n$file = __DIR__ . '/../../../../../../../vendor/autoload.php';\n\nif (!file_exists($file)) {\n throw new RuntimeException('Install ...
php
chosen
[ { "from": "system", "value": "fix(shop): Update admin order show page\n\nUpdate admin order show page\n\nsee #401\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Http\\Controllers\\Admin;\n\nuse Illuminate\\Http\\Request;\nuse App\\Http\\Controllers\\Controller;\nuse App\\Order;\n\ncl...
php
chosen
[ { "from": "system", "value": "Add new smoke test that does basic timestamp get from server\n" }, { "from": "human", "value": "<?php\n/*\nCopyright 2002-2012 MarkLogic Corporation. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this fil...
php
chosen
[ { "from": "system", "value": "FIX query class for Member MDL\n" }, { "from": "human", "value": "<?php\n\nnamespace frontend\\modules\\bbii\\models\\_query;\n\nuse yii\\db\\ActiveQuery;\n\n/**\n * Created to replace Yii1's scope concept. Yii2 uses query classes\n *\n * @since 0.0.5\n */\nclass B...
php
chosen
[ { "from": "system", "value": "Update to Moodle 1.6 develop\n" }, { "from": "human", "value": "<?php // $Id$\n\n/////////////////////////////////////////////////////////////////////////////////\n/// Code fragment to define the version of scorm\n/// This fragment is called by moodle_needs_upgrad...
php
chosen
[ { "from": "system", "value": "Remove useless call to parent constructor.\n" }, { "from": "human", "value": "<?php\n\nnamespace estvoyage\\net;\n\nuse\n\testvoyage\\value\\world\\integer\n;\n\nfinal class mtu\n{\n\tuse integer\\unsigned {\n\t\t__construct as private;\n\t\tvalidate as private isUn...
php
chosen
[ { "from": "system", "value": "Add support for Equipment CPT\n" }, { "from": "human", "value": "<?php\n\nnamespace Roots\\Sage\\Extras;\n\nuse Roots\\Sage\\Setup;\n\n/**\n * Add <body> classes\n */\nfunction body_class($classes) {\n // Add page slug if it doesn't exist\n if (is_single() || is_p...
php
chosen
[ { "from": "system", "value": "Move injection pass to a later stage\n\nWithout this change, the necessary monolog compiler passes\nwould not be completed yet, and the service alias \"logger\"\nwould not exist in the container.\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of...
php
chosen
[ { "from": "system", "value": "Add missing typehint on chain sender\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * fi...
php
chosen
[ { "from": "system", "value": "Remove redundant method call to get()\n" }, { "from": "human", "value": "<?php\n\nnamespace MyBB\\Core\\Database\\Repositories\\Eloquent;\n\nuse Illuminate\\Support\\Collection;\nuse MyBB\\Core\\Database\\Models\\ProfileFieldGroup;\nuse MyBB\\Core\\Database\\Reposit...
php
chosen
[ { "from": "system", "value": "Test for push subscription counting\n" }, { "from": "human", "value": "<?php\n\nclass Denkmal_Component_PushNotificationsTest extends CMTest_TestCase {\n\n public function testAjax_storePush() {\n $environment = new CM_Frontend_Environment();\n $res...
php
chosen
[ { "from": "system", "value": "Clean up language, center answer button.\n" }, { "from": "human", "value": "@extends('layouts.app')\n@section('content')\n <div class=\"row\">\n <div class=\"col-md-8 col-md-offset-2\">\n\n <div class=\"panel panel-default\">\n <d...
php
chosen
[ { "from": "system", "value": "Comment about the purpose of details function\n" }, { "from": "human", "value": "<?php\n\nnamespace LNCD\\OAuth2server;\n\nclass Scope\n{\n\tpublic function exists(string $scope)\n\t{\n\t\t// tests if a scope exists\n\t}\n\n public function details($scopes)\n ...
php
chosen
[ { "from": "system", "value": "Load Plugin for CakePHP greater or equal 3.7.0\n\nSolution found at: https://github.com/cakephp/cakephp/issues/12682\n" }, { "from": "human", "value": "<?php\n\nuse Cake\\Core\\Plugin;\n\n$findRoot = function ($root) {\n\tdo {\n\t\t$lastRoot = $root;\n\t\t$root = di...
php
chosen
[ { "from": "system", "value": "[NodeBundle] Update typehints to prepare php 8.1 support\n" }, { "from": "human", "value": "<?php\n\nnamespace Kunstmaan\\NodeBundle\\Entity;\n\nuse Doctrine\\Common\\Collections\\Collection;\n\nclass NodeIterator implements \\RecursiveIterator\n{\n private $_dat...
php
chosen
[ { "from": "system", "value": "Fix modifications of Composer\\Util\\RemoteFilesystem (constructor)\n" }, { "from": "human", "value": "<?php\n/*\n * This file is part of Composer.\n *\n * (c) Nils Adermann <naderman@naderman.de>\n * Jordi Boggiano <j.boggiano@seld.be>\n *\n * For the full copyrigh...
php
chosen
[ { "from": "system", "value": "Change auth of ACP module\n" }, { "from": "human", "value": "<?php\n\n/**\n *\n * @package survey\n * @copyright (c) 2015 kilianr\n * @license http://www.gnu.org/licenses/agpl-3.0.html GNU Affero General Public License v3\n *\n */\n\nnamespace kilianr\\survey\\acp;\...
php
chosen
[ { "from": "system", "value": "Remove `width` and `height` from image service import [WEB-1908]\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Console\\Commands\\Import;\n\nuse App\\Models\\Collections\\Image;\n\nclass ImportImages extends AbstractImportCommand\n{\n\n protected $si...
php
chosen
[ { "from": "system", "value": "Use the version constant, and fixed comments\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the Imbo package\n *\n * (c) Christer Edvartsen <cogo@starzinger.net>\n *\n * For the full copyright and license information, please view the LICENSE ...
php
chosen
[ { "from": "system", "value": "Remove mcrypt constant from the bundle boot\n" }, { "from": "human", "value": "<?php\n\n/**\n * LICENSE: This file is subject to the terms and conditions defined in\n * file 'LICENSE', which is part of this source code package.\n *\n * @copyright 2016 Copyright(c) -...
php
chosen
[ { "from": "system", "value": "Implement more security options and debug options.\n" }, { "from": "human", "value": "<?php\n\nclass OpauthModule extends CWebModule {\n\n\tpublic $securitySalt;\n\tpublic $strategies;\n\tpublic $debug;\n\n\tpublic function init() {\n\t\t$this->setImport(array(\n\t\...
php
chosen
[ { "from": "system", "value": "Make sure that the error page can load when settings can't be loaded\n" }, { "from": "human", "value": "<?php\n\nuse Cake\\Core\\Configure;\nuse Cake\\Routing\\RouteBuilder;\nuse Cake\\Routing\\Router;\n\nRouter::prefix('admin', function (RouteBuilder $routeBuilder)...
php
chosen
[ { "from": "system", "value": "Fix migration on conpherence images\n" }, { "from": "human", "value": "<?php\n\n// Rebuild all Conpherence Room images to profile standards\n//\n$table = new ConpherenceThread();\n$conn = $table->establishConnection('w');\n$table_name = 'conpherence_thread';\n\nfore...
php
chosen
[ { "from": "system", "value": "Add bowl pickem all the time\n" }, { "from": "human", "value": "<?php\n\nnamespace SofaChamps\\Bundle\\CoreBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Route;\n\nclass ...
php
chosen
[ { "from": "system", "value": "[Fields] Fix du min et du max\n" }, { "from": "human", "value": "<?php\n\nnamespace Gregwar\\DSD\\Fields;\n\n/**\n * Nombre\n *\n * @author Grégoire Passault <g.passault@gmail.com>\n */\nclass NumberField extends Field \n{\n /**\n * Valeur minimum\n */\n ...
php
chosen
[ { "from": "system", "value": "Remove 'container' property in 'App\\Action' class due to error test on PHP 5.x\n\nSigned-off-by: Fery Wardiyanto <bd7846e81d12676baffd10ffe6daf3939680ab52@gmail.com>\n" }, { "from": "human", "value": "<?php\nnamespace App;\n\nuse Slim\\Container;\n\nabstract class ...
php
chosen
[ { "from": "system", "value": "Modify model reference for category-confession\n" }, { "from": "human", "value": "<?php namespace App\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Category extends Model {\n\n /**\n * The database table used by the model.\n * @var strin...
php
chosen
[ { "from": "system", "value": "Delete chado modifications in test case\n" }, { "from": "human", "value": "<?php\nrequire_once __DIR__ . DIRECTORY_SEPARATOR . 'config.php';\n\nrequire_once __DIR__ . '/../../vendor/autoload.php';\nrequire_once __DIR__ . '/fennecweb/ajax/upload/overload_is_uploaded_...
php
chosen
[ { "from": "system", "value": "Use values also as array keys in return array, so that the Sonata Forms work\n" }, { "from": "human", "value": "<?php\n\nnamespace Tg\\OkoaBundle\\Util;\n\nuse Doctrine\\Common\\Annotations\\AnnotationReader;\nuse Symfony\\Component\\Validator\\Constraints as Assert...
php
chosen
[ { "from": "system", "value": "Make query pass and change structure of results\n" }, { "from": "human", "value": "<?php\n\nnamespace ajax\\listing;\n\nuse \\PDO as PDO;\n\n/**\n * Web Service.\n * Returns Organisms with given ids\n */\nclass Organisms extends \\WebService {\n\n /**\n * @pa...
php
chosen
[ { "from": "system", "value": "Add WHERE part to the sql stm and add the seacrh functionality to the webservice\n" }, { "from": "human", "value": "<?php\n\nnamespace ajax\\listing;\n\nuse \\PDO as PDO;\n\n/**\n * Web Service.\n * Returns Organisms with given ids\n */\nclass Organisms extends \\We...
php
chosen
[ { "from": "system", "value": "Add database initialization before testing" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace PAF\\Utils;\n\nuse Nette\\DI\\Container;\n\nclass ContainerInitializerExtension extends InitializerExtension\n{\n /** @var Container */\n pr...
php
chosen
[ { "from": "system", "value": "Add default methods to source interface" }, { "from": "human", "value": "<?php\n\nnamespace Elchristo\\Calendar\\Model\\Source;\n\n/**\n *\n */\ninterface SourceInterface\n{\n public function getEvents();\n public function getEventBuilder();\n public functi...
php
chosen
[ { "from": "system", "value": "Fix missing '/' in forum route\n" }, { "from": "human", "value": "<?php\n\nnamespace InsaLan\\NewsBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Route;\nuse Sensio\\Bundl...
php
chosen
[ { "from": "system", "value": "Add header to allow script execution\n\nIf you say it should be executed as a script you might also want this..." }, { "from": "human", "value": "<?php\n/*\n * handles maintance jobs\n * should be called on regular basis by cron or something like\n * should only be ...
php
chosen
[ { "from": "system", "value": "Revert \"Rename 'user' to 'users' on poll model\"\n\nThis reverts commit 01453bc86a9dd1ef8f565f60163d9e3401283f0d.\n" }, { "from": "human", "value": "<?php\n\nnamespace App;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Illuminate\\Database\\Eloquent\\SoftDelet...
php
chosen
[ { "from": "system", "value": "Add test message functionality to base test case\n" }, { "from": "human", "value": "<?php\nnamespace Ddeboer\\Imap\\Tests;\n\nuse Ddeboer\\Imap\\Server;\nuse Ddeboer\\Imap\\Connection;\n\nabstract class AbstractTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n...
php
chosen
[ { "from": "system", "value": "Add subject to weekly email\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Jobs;\n\nuse App\\Jobs\\Job;\nuse Illuminate\\Queue\\SerializesModels;\nuse Illuminate\\Queue\\InteractsWithQueue;\nuse Illuminate\\Contracts\\Bus\\SelfHandling;\nuse Illuminate\\...
php
chosen
[ { "from": "system", "value": "Set default background-size to contain\n\nThis sets the default background-size attribute to contain, so we always shows the full image specified by the user." }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of WordPlate.\n *\n * (c) Vincent Klaibe...
php
chosen
[ { "from": "system", "value": "Increase size of Google map embed\n" }, { "from": "human", "value": "@extends('layouts.default')\n\n@section('title')\n {{ $venue->name }}\n@endsection\n\n@section('content-header')\n <div class=\"row align-items-center\">\n <div class=\"col-md-auto\">\...
php
chosen
[ { "from": "system", "value": "Remove reference to deprecated 'EXT' constant.\n" }, { "from": "human", "value": "<?php if ( ! defined('EXT')) exit('Invalid file request.');\n\n/**\n * OmniLog module tests.\n *\n * @author Stephen Lewis <stephen@experienceinternet.co.uk>\n * @copyright ...
php
chosen
[ { "from": "system", "value": "Fix a namespace conflict during code coverage analysis\n" }, { "from": "human", "value": "<?php\n\nnamespace PhpTabs;\n\nuse PhpTabs\\Component\\Autoloader;\n\n/**\n * Loads the project specific autoloader\n *\n * Include this file only if you do NOT use composer\n ...
php
chosen
[ { "from": "system", "value": "Fix typo in simple number string parser\n" }, { "from": "human", "value": "<?php\n\nnamespace SimplePHPEasyPlus\\Parser;\n\nclass SimpleNumberStringParser implements SimpleNumberStringParser\n{\n /**\n * Parses the given string and returns its numeric value\n...
php
chosen
[ { "from": "system", "value": "Fix first migration class name\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Migrations;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\nuse Doctrine\\Migrations\\AbstractMigration;\n\nfinal class Version_20201228212501 extends Abstr...
php
chosen
[ { "from": "system", "value": "Add generate id from uuid identifier\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the Borobudur package.\n *\n * (c) 2017 Borobudur <http://borobudur.io>\n *\n * For the full copyright and license information, please view the LICENSE\n * fi...
php
chosen
[ { "from": "system", "value": "Fix test of ArrayAccessProvider to avoid using Pimple\n" }, { "from": "human", "value": "<?php\n\nnamespace Knp\\Menu\\Tests\\Renderer;\n\nuse Knp\\Menu\\Renderer\\ArrayAccessProvider;\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayAccessProviderTest extends TestC...
php
chosen
[ { "from": "system", "value": "Replace removed middleware with equivalent current middleware\n" }, { "from": "human", "value": "<?php namespace LaravelAcl\\Authentication\\Tests\\Unit;\n\nuse Illuminate\\Support\\Facades\\Route;\nuse Mockery as m;\n\nclass ClientLoggedFilterTest extends TestCase...
php
chosen
[ { "from": "system", "value": "Test for PHP >= 5.2.0\n" }, { "from": "human", "value": "<?php \n/**\n * ChurchTools 2.0\n * http://www.churchtools.de\n *\n * Copyright (c) 2013 Jens Martin Rauen\n * Licensed under the MIT license, located in LICENSE.txt \n */\n\ninclude_once(\"system/includes/sta...
php
chosen
[ { "from": "system", "value": "Revert \"Revert \"Revert \"Revert \"Index aangepast zodat deze via ajax Sauna.php ophaalt\"\"\"\"\n\nThis reverts commit b38d1c1d7ad17935ab1619982116656d4704bd2f.\n" }, { "from": "human", "value": "<?php\n\nheader('Location: Sauna.php');\n?>\n" }, { "from": ...
php
chosen
[ { "from": "system", "value": "Support user config. Located at phoxy_config function\n" }, { "from": "human", "value": "<?php\n\nerror_reporting(E_ALL); ini_set('display_errors', '1');\n\ninclude_once('connect.php');\n\nif (!count($_GET))\n{\n include_once('index.html');\n exit();\n}\n \nfunct...
php
chosen
[ { "from": "system", "value": "Make sure to type hint to Configuration\n\nAllowing ConfigInterface will just make the code fail when initiating a Driver. The Driver needs a Configuration\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the GraphAware Bolt package.\n *\n * (...
php
chosen
[ { "from": "system", "value": "Use variables from config.php configuration file\n" }, { "from": "human", "value": "<?php\n $MYSQL_DATABASE_NAME = \"ehosp\";\n $MYSQL_HOSTNAME = \"localhost\";\n $MYSQL_USERNAME = \"root\";\n $MYSQL_ROOT_PASSWORD = \"rootpsswd\";\n\n // For debugging...
php
chosen
[ { "from": "system", "value": "Set curly brackets to same line than condition\n" }, { "from": "human", "value": "<?php\n/**\n * @author Pierre-Henry Soria <ph7software@gmail.com>\n * @copyright (c) 2014-2017, Pierre-Henry Soria. All Rights Reserved.\n * @license GNU General Pu...
php
chosen
[ { "from": "system", "value": "Fix templates requiring access to the config\n" }, { "from": "human", "value": "<?php\nrequire_once 'include/template.php';\nrequire_once 'include/config.php';\n\n$opts = getopt('t:');\nif (!isset($opts['t'])) {\n\techo \"Please, specify the template to output with ...
php
chosen
[ { "from": "system", "value": "[BUGFIX] Correct extension manager dependencies to match composer requirements\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the package bk2k/bootstrap-package.\n *\n * For the full copyright and license information, please read the\n * LIC...
php
chosen
[ { "from": "system", "value": "Fix problem with tests broken by missing tables\n" }, { "from": "human", "value": "<?php\n\nclass TestCase extends Orchestra\\Testbench\\TestCase {\n\n /**\n * Get package providers.\n *\n * @return array\n */\n protected function getPackagePro...
php
chosen
[ { "from": "system", "value": "Fix deprecation notice in PHP 8 for libxml_disable_entity_loader\n\nPHP 8 [deprecates `libxml_disable_entity_loader`](https://php.watch/versions/8.0/libxml_disable_entity_loader-deprecation) function, and this fixes the deprecation notice by not calling the function on libxml 2...
php
chosen
[ { "from": "system", "value": "Change Backend references to Frontend\n" }, { "from": "human", "value": "<?php\n\n/*\n Autoload function for Open Badges Backend\n Based on PSR-4 autoloader example from:\n https://github.com/php-fig/fig-standards\n With some changes and using portable constants...
php
chosen
[ { "from": "system", "value": "Add another missing copyright header\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Schema\\Builder;\n\nreturn [\n 'up' => function (Builder $schema) {\n $schema->table('tags', function (...
php
chosen
[ { "from": "system", "value": "Change webservice and add limit functionality\n" }, { "from": "human", "value": "<?php\n\nnamespace ajax\\listing;\n\nuse \\PDO as PDO;\n\n/**\n * Web Service.\n * Returns Organisms with given ids\n */\nclass Organisms extends \\WebService {\n\n /**\n * @para...
php
chosen
[ { "from": "system", "value": "ENHANCEMENT: Test for CMS fields of Point of Interest layer\n" }, { "from": "human", "value": "<?php\n\n\tclass ImagePointOfInterestExtensionTest extends SapphireTest {\n\t\tpublic function testUpdateCMSFields() {\n\t\t\t$this->markTestSkipped('TODO');\n\t\t}\n\n}\n...
php
chosen
[ { "from": "system", "value": "Remove calculation finishing the test\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Tests\\Entity;\n\nuse AppBundle\\Entity\\Calculation;\nuse AppBundle\\Model\\CalculationFactory;\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\n\nclass...
php
chosen
[ { "from": "system", "value": "Select all dupes except the lowest UID.\n\nDrupal’s user_load_by_mail function used in the login process resolves\nthe lowest UID when trying to log in, so these are never accessed.\n" }, { "from": "human", "value": "<?php\n/**\n * Script to remove users with\n *\n ...
php
chosen
[ { "from": "system", "value": "Add papi cli command methods\n" }, { "from": "human", "value": "<?php\n\n/**\n * Base class that must be extended by any Papi sub commands.\n */\nclass Papi_CLI_Command extends WP_CLI_Command {\n\n}\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Base ...
php
chosen
[ { "from": "system", "value": "Tweak connection data for pgsql instead of mysql\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Capsule\\Manager as Capsule; \n\nclass Bootstrap {\n\n function boot()\n {\n $capsule = new Capsule; \n\n $capsule->addConnect...
php
chosen
[ { "from": "system", "value": "Fix : group by postgres < 9\n" }, { "from": "human", "value": "<?php\r\n$result = array();\r\n\r\n$where = sql::make_search_blob(\"user_id || user_name || user_mail\", $_POST['search']);\r\n\r\n$cols = array(\"user_id\", \"user_name\", \"user_mail\");\r\n$tables = a...
php
chosen
[ { "from": "system", "value": "Simplify loop in linear gradient.\n" }, { "from": "human", "value": "<?php\n\nnamespace mcordingley\\Regression\\Algorithm\\GradientDescent\\Gradient;\n\nfinal class Linear implements Gradient\n{\n /** @var int */\n private $power;\n\n /**\n * @param in...
php
chosen
[ { "from": "system", "value": "Add test for publishing stubs\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests;\n\nuse Illuminate\\Support\\Facades\\Artisan;\nuse Illuminate\\Support\\Facades\\File;\n\nfinal class MakeCommandTest extends TestCase\n{\n publ...
php
chosen
[ { "from": "system", "value": "TASK: Exit value depending on the error number\n" }, { "from": "human", "value": "<?php\n\nnamespace MStruebing\\EditorconfigChecker;\n\nuse MStruebing\\EditorconfigChecker\\Cli\\Cli;\nuse MStruebing\\EditorconfigChecker\\Cli\\Logger;\n\n$cliPath = dirname(__FILE__)...
php
chosen
[ { "from": "system", "value": "Use distinct error code for 'REMOTE_CONFIG_INVALID_JSON'\n" }, { "from": "human", "value": "<?php\n/**\n * Nextcloud - spreedme\n *\n * This file is licensed under the Affero General Public License version 3 or\n * later. See the COPYING file.\n *\n * @author Leon <...
php
chosen
[ { "from": "system", "value": "Add a default value to the constructor.\n\n\nsvn commit r3127\n" }, { "from": "human", "value": "<?php\n\nrequire_once 'Swat/SwatOption.php';\n\n/**\n * A class representing a divider in a flydown\n *\n * This class is for semantic purposed only. The flydown handles...
php
chosen