conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use the real path to load yaml resources\n" }, { "from": "human", "value": "<?php\n\nnamespace LAG\\AdminBundle\\Resource\\Loader;\n\nuse Exception;\nuse Symfony\\Component\\Filesystem\\Exception\\FileNotFoundException;\nuse Symfony\\Component\\Filesystem\\Filesyste...
php
chosen
[ { "from": "system", "value": "Fix min_range option to stop numberofcpucores.php returning 0\n\nThe minimum options for filter_var() with FILTER_VALIDATE_INT should me\nmin_range.\n" }, { "from": "human", "value": "<?php\n\n$intOpts = array(\n 'options' => array(\n 'min' => 1,\n ),\n...
php
chosen
[ { "from": "system", "value": "Add option to Button messages to hide buttons on click\n" }, { "from": "human", "value": "<?php\n\nnamespace actsmart\\actsmart\\Actuators\\WebChat;\n\nclass WebChatButtonMessage extends WebChatMessage\n{\n protected $messageType = 'button';\n\n /** The messag...
php
chosen
[ { "from": "system", "value": "Test commit from JKP Info\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: stevan\n * Date: 29.9.17.\n * Time: 09.07\n */\nnamespace SalexUserBundle\\EventListener;\n// ...\n\nuse Avanzu\\AdminThemeBundle\\Event\\MessageListEvent;\nus...
php
chosen
[ { "from": "system", "value": "Add createTable, dropTable method to interface\n" }, { "from": "human", "value": "<?php\nnamespace LazyRecord\\SqlBuilder;\nuse LazyRecord\\Schema\\SchemaDeclare;\n\ninterface BuilderInterface\n{\n\tpublic function build($schema);\n public function buildIndex($sc...
php
chosen
[ { "from": "system", "value": "Fix updates of package data\n" }, { "from": "human", "value": "<?php\n\nnamespace Outlandish\\Wpackagist\\Storage;\n\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse Outlandish\\Wpackagist\\Entity\\PackageData;\n\nfinal class Database extends Provider\n{\n /** @v...
php
chosen
[ { "from": "system", "value": "Use config to get Nova path prefix\n" }, { "from": "human", "value": "<dropdown-trigger class=\"h-9 flex items-center\" slot-scope=\"{toggle}\" :handle-click=\"toggle\">\n <span class=\"text-90\">\n {{ auth()->user()->name }}\n </span>\n</dropdown-trigg...
php
chosen
[ { "from": "system", "value": "Fix bug when zero records with stackable resolver\n\nwe need to return an empty array if we dont have any records to respond with from the storage or the recursive query." }, { "from": "human", "value": "<?php\n\nnamespace yswery\\DNS;\n\nclass StackableResolver {\n...
php
chosen
[ { "from": "system", "value": "Define document root in the right place for PHPUnit\n" }, { "from": "human", "value": "<?php\n\ndefine('SERVER_PROTOCOL', 'HTTP/1.1');\ndefine('DOCUMENT_ROOT', '/var/www/htdocs/');\n" }, { "from": "gpt", "value": "<?php\n\ndefine('SERVER_PROTOCOL', 'HTTP...
php
chosen
[ { "from": "system", "value": "Fix (404): return empty token for errors pages\n" }, { "from": "human", "value": "<?php\n\nnamespace AppBundle\\Service;\n\nuse Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorage;\n\n\n/**\n * Class JwtService\n * @package AppBundle\\Se...
php
chosen
[ { "from": "system", "value": "Add options property to trait\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace GarethEllis\\Tldr\\Fetcher;\n\nuse GarethEllis\\Tldr\\Fetcher\\Exception\\PageNotFoundException;\nuse GarethEllis\\Tldr\\Fetcher\\Exception\\UnknownOperatin...
php
chosen
[ { "from": "system", "value": "Add PHP8 GDImage object support" }, { "from": "human", "value": "<?php\n\nnamespace Intervention\\Image\\Gd\\Commands;\n\nuse Intervention\\Image\\Commands\\AbstractCommand;\nuse Intervention\\Image\\Exception\\RuntimeException;\n\nclass ResetCommand extends Abstrac...
php
chosen
[ { "from": "system", "value": "Allow iterable in tag helper\n" }, { "from": "human", "value": "<?php declare(strict_types=1);\n\nnamespace Becklyn\\RadBundle\\Tags;\n\nuse Becklyn\\RadBundle\\Exception\\TagNormalizationException;\n\nclass TagHelper\n{\n /**\n * @param array<string|TagInter...
php
chosen
[ { "from": "system", "value": "Update server site for osmlive reports\n" }, { "from": "human", "value": "<?php \nfunction startsWith($haystack, $needle)\n{\n $length = strlen($needle);\n return (substr($haystack, 0, $length) === $needle);\n}\n\n$c = new Memcached(); \n$c->addServer(\"loca...
php
chosen
[ { "from": "system", "value": "Change the front-controller to enable AOP\n" }, { "from": "human", "value": "<?php\n\n// comment out the following two lines when deployed to production\ndefined('YII_DEBUG') or define('YII_DEBUG', true);\ndefined('YII_ENV') or define('YII_ENV', 'dev');\n\nrequire(_...
php
chosen
[ { "from": "system", "value": "Fix for SQLite3 and PostgreSQL databases" }, { "from": "human", "value": "<?php\nnamespace OCA\\Passwords\\Db;\n\nuse OCP\\IDb;\nuse OCP\\AppFramework\\Db\\Mapper;\n\nclass CategoryMapper extends Mapper {\n\n\tpublic function __construct(IDb $db) {\n\t\tparent::__co...
php
chosen
[ { "from": "system", "value": "Fix warning of covered interface\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace DontTest\\Exception;\n\nuse Dont\\Exception\\ExceptionInterface;\nuse PHPUnit\\Framework\\TestCase;\nuse Throwable;\n\n/**\n * @covers \\Dont\\Exceptio...
php
chosen
[ { "from": "system", "value": "Remove mildly useful but highly dangerous debug feature.\n" }, { "from": "human", "value": "<?php\n\nclass Config {\n public function __construct() {\n $raw_config = file_get_contents(__DIR__ . '/../config.json');\n if (!$raw_config) {\n throw new FileNo...
php
chosen
[ { "from": "system", "value": "Remove unneeded methods from concrete class\n" }, { "from": "human", "value": "<?php namespace Modules\\Blog\\Repositories\\Eloquent;\n\nuse Modules\\Blog\\Entities\\Category;\nuse Modules\\Blog\\Repositories\\CategoryRepository;\nuse Modules\\Core\\Repositories\\El...
php
chosen
[ { "from": "system", "value": "Fix a type related depreciation with php 8.1" }, { "from": "human", "value": "<?php\n\nnamespace Lexik\\Bundle\\JWTAuthenticationBundle\\TokenExtractor;\n\nuse Symfony\\Component\\HttpFoundation\\Request;\n\n/**\n * AuthorizationHeaderTokenExtractor.\n *\n * @author...
php
chosen
[ { "from": "system", "value": "Change to how we rectify the \"IPv6 bug\".\n" }, { "from": "human", "value": "<?php\n\t/**\n\t * Class to interact with a cisco router.\n\t */\n\tclass CiscoRouter extends Router {\n\t\tuse CiscoTrait;\n\n\t\t/* {@inheritDoc} */\n\t\tfunction getPrefixList($name, $t...
php
chosen
[ { "from": "system", "value": "Add example of kernel configuration to the demo\n" }, { "from": "human", "value": "<?php\n/**\n * Go! OOP&AOP PHP framework\n *\n * @copyright Copyright 2012, Lissachenko Alexander <lisachenko.it@gmail.com>\n * @license http://www.opensource.org/licenses/m...
php
chosen
[ { "from": "system", "value": "Add route to get the list of assemblies\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Http\\Request;\n\n/*\n|--------------------------------------------------------------------------\n| API Routes\n|----------------------------------------------------...
php
chosen
[ { "from": "system", "value": "Add optional 'contest_time' parameter for entries\n" }, { "from": "human", "value": "<?php\n\n\n$date =& $_REQUEST[\"date\"];\n$user =& $_REQUEST[\"user\"];\n$priority =& $_REQUEST[\"priority\"];\n$text =& $_REQUEST[\"text\"];\nif (is...
php
chosen
[ { "from": "system", "value": "Move from `rand` to `mt_rand` ;)" }, { "from": "human", "value": "<?php\n\n\nnamespace MeadSteve\\DiceApi;\n\nclass BasicDice implements Dice\n{\n\n private $size;\n\n public function __construct($size)\n {\n $this->size = $size;\n }\n\n public...
php
chosen
[ { "from": "system", "value": "Allow Locale to be set by GET Parameter" }, { "from": "human", "value": "<?php\n\n/**\n * To change this template, choose Tools | Templates\n * and open the template in the editor.\n */\nclass BootstrapNavbarLanguageFormController extends Extension {\n \n priv...
php
chosen
[ { "from": "system", "value": "Change default value of username/password\n" }, { "from": "human", "value": "<?php\n\ndefined( 'NODEMON_RUNNING') || die( 'Access denied.' );\n\n// See https://github.com/xblau/node-interface/wiki/Configuration\n// for more info about these options.\n\n$nodeconfig =...
php
chosen
[ { "from": "system", "value": "Fix loaded page name is empty\n" }, { "from": "human", "value": "<?php\n\n class Loader\n {\n private $instance = array();\n\n public function page($name, $method='index')\n {\n $page = $this->loadClass($name, 'Page');\n\n ...
php
chosen
[ { "from": "system", "value": "Make the .env file optional\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\n$dotenv = new Dotenv\\Dotenv(__DIR__ . '/../');\n$dotenv->load();\n\n// Platform.sh config\n$relationships = getenv...
php
chosen
[ { "from": "system", "value": "Add file locking specific tests.\n" }, { "from": "human", "value": "<?php\n\nnamespace Gielfeldt\\Lock\\Test;\n\nuse Gielfeldt\\Lock;\n\ninclude_once __DIR__ . '/LockTestBase.php';\n\n/**\n * @covers \\Gielfeldt\\Lock\\LockService\n * @covers \\Gielfeldt\\Lock\\Lock...
php
chosen
[ { "from": "system", "value": "Update test case for new version of IUCN\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests\\AppBundle\\API\\Listing;\n\nuse Symfony\\Component\\HttpFoundation\\ParameterBag;\nuse Tests\\AppBundle\\API\\WebserviceTestCase;\n\nclass OverviewTest extends Webs...
php
chosen
[ { "from": "system", "value": "Add Semantic UI into the app layout.\n" }, { "from": "human", "value": "<!DOCTYPE html>\n<html lang=\"en\" prefix=\"dcterms: http://purl.org/dc/terms/ og: http://ogp.me/ns#\">\n <head>\n <meta charset=\"utf-8\">\n <meta http-equiv=\"x-ua-compatible\...
php
chosen
[ { "from": "system", "value": "Add dd, debug and info func into Helper file\n" }, { "from": "human", "value": "<?php\n\n" }, { "from": "gpt", "value": "<?php\n\n/**\n *\n * @param string|array $expression\n * @param string $tag\n */\nfunction dd($expression, $tag = \"Tag\") {\n\techo ...
php
chosen
[ { "from": "system", "value": "Check null behaviour of emailID in mailchimp sync\n" }, { "from": "human", "value": "<?php\n\nclass CRM_Mailchimp_BAO_MCSync extends CRM_Mailchimp_DAO_MCSync {\n\n public static function create($params) {\n $instance = new self();\n $instance->copyValues($par...
php
chosen
[ { "from": "system", "value": "Add argument key name and pluralize get method in AccessToken interface\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 informatio...
php
chosen
[ { "from": "system", "value": "Update move REST request json content array in \"data\" post property\n" }, { "from": "human", "value": "<?php\n/**\n * Copyright (C) 2014 Ready Business System\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a cop...
php
chosen
[ { "from": "system", "value": "Add environment variable to define project environment\n" }, { "from": "human", "value": "<?php\n\n /**\n * PHP Code Enhancement Framework\n *\n * PHP Code Enhancement or PCE in short is small project (part of Code Enhancement\n * project) created...
php
chosen
[ { "from": "system", "value": "Make it a GET form, with a single simple param\n" }, { "from": "human", "value": "<?php\ninclude('lib/panda.php');\ninclude('lib/config.inc.php');\ninclude('lib/head.inc.html');\n?>\n<p>This is an example <strong>Panda</strong> client application, written in <strong...
php
chosen
[ { "from": "system", "value": "Revert \"Dummy commit to test\"\n\nThis reverts commit dd95013be87c409d6aac0b302a06fc426ef60339.\n" }, { "from": "human", "value": "<?php\n\ninclude 'includes/constant/config.inc.php';\nsession_start();\nreturn_meta();\n?>\n<head>\n<title>Home</title></head>\n<body>...
php
chosen
[ { "from": "system", "value": "Use absolute paths for includes\n" }, { "from": "human", "value": "<?php\n/**\n * metadata-validator\n *\n * @author Guy Halse http://orcid.org/0000-0002-9388-8592\n * @copyright Copyright (c) 2016, SAFIRE - South African Identity Federation\n * @license https://git...
php
chosen
[ { "from": "system", "value": "Use new error handling middleware for API\n" }, { "from": "human", "value": "<?php\n\nuse Psr\\Http\\Message\\ResponseInterface as Response;\nuse Psr\\Http\\Message\\ServerRequestInterface as Request;\nuse Zend\\Diactoros\\Server;\nuse Zend\\Stratigility\\Middleware...
php
chosen
[ { "from": "system", "value": "TASK: Use reference instead of index\n" }, { "from": "human", "value": "<?php\n\nnamespace EditorconfigChecker\\Fix;\n\nclass TrailingWhitespaceFix\n{\n /**\n * Insert a final newline at the end of the file\n *\n * @param string $filename\n * @ret...
php
chosen
[ { "from": "system", "value": "Add a test for RelativeTimer send() to make sure it sends metrics\n" }, { "from": "human", "value": "<?php\nnamespace Test\\Statsd\\Client;\n\nuse Statsd\\Client\\RelativeTimer;\nuse Statsd\\Client;\n\nclass RelativeTimerTest extends \\PHPUnit_Framework_TestCase\n{\...
php
chosen
[ { "from": "system", "value": "Remove comment because a test check this\n" }, { "from": "human", "value": "<?php\n\n\nnamespace Nikoms\\FailLover\\FileSystem\\Csv;\n\n\nuse Nikoms\\FailLover\\TestCaseResult\\ReaderInterface;\nuse Nikoms\\FailLover\\TestCaseResult\\TestCase;\n\nclass CsvReader imp...
php
chosen
[ { "from": "system", "value": "Update namespaces for beta 8\n\nRefs flarum/core#1235.\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner <toby.zerner@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n *...
php
chosen
[ { "from": "system", "value": "Add XML to the MIME type list\n" }, { "from": "human", "value": "<?php\n\nnamespace Ojs\\ImportBundle\\Helper;\n\nclass FileHelper {\n public static $mimeToExtMap = [\n 'application/pdf' => 'pdf',\n 'image/jpeg' => 'jpg',\n 'applic...
php
chosen
[ { "from": "system", "value": "ADD the new parameter for specify ident service ids\n" }, { "from": "human", "value": "<?php\n/**\n * Contact Common model class\n */\n\nnamespace SecucardConnect\\Product\\Common\\Model;\n\n/**\n * Contact Data Model class\n *\n */\nclass Contact\n{\n /**\n ...
php
chosen
[ { "from": "system", "value": "Replace facade and move orchestra/messages as suggest deps (and require-dev).\n\nSigned-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php namespace Orchestra\\Support\\Facades;\n\nuse Illuminate\\Support\...
php
chosen
[ { "from": "system", "value": "Add skeleton for private methods\n" }, { "from": "human", "value": "<?php\n\n/**\n * Title: PHP ArrayPaginate\n * Version: 0.1\n * Description: Paginate PHP arrays with markup for navigation\n * Author: Lawrence Okoth-Odida\n * Documentation: ...
php
chosen
[ { "from": "system", "value": "Add some validation helpers to base model class.\n" }, { "from": "human", "value": "<?php\n\nnamespace FluxBB\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Base extends Model\n{\n\n\tpublic $timestamps = false;\n\n}\n" }, { "from": "gpt", ...
php
chosen
[ { "from": "system", "value": "Return promise instead of full deferred\n" }, { "from": "human", "value": "<?php\n\nnamespace React\\Whois;\n\nuse Promise\\Deferred as Deferred;\nuse React\\Curry\\Util as Curry;\nuse React\\Dns\\Resolver\\Resolver;\n\nclass Client\n{\n private $dns;\n privat...
php
chosen
[ { "from": "system", "value": "Update e-mail address to diva4justice\n" }, { "from": "human", "value": "<?php\n\n //response array with status code and message\n $response_array = array();\n\n //send the email\n $body = \"Someone just submitted a question for the App\\n\" . \"Name: \"...
php
chosen
[ { "from": "system", "value": "Check for missing length of varchar columns\n" }, { "from": "human", "value": "<?php\nnamespace wcf\\system\\database\\table\\column;\n\n/**\n * Represents a `varchar` database table column.\n *\n * @author\tMatthias Schmidt\n * @copyright\t2001-2019 WoltLab GmbH\n ...
php
chosen
[ { "from": "system", "value": "Add a unit test case of ArrayUtils when not found item\n" }, { "from": "human", "value": "<?php\n\nnamespace Core\\Utils;\n\nuse PHPUnit\\Framework\\TestCase;\n\nclass ArrayUtilsTest extends TestCase\n{\n public function testFind()\n {\n $arr = [\n ...
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": "Update linkset preview to use POST not GET\n" }, { "from": "human", "value": "<?php defined('SYSPATH') OR die('No direct script access.');\n\n/**\n *\n * @package\tBoomCMS\n * @category\tChunks\n * @category\tControllers\n * @author\tRob Taylor\n * @copyright\tHoop ...
php
chosen
[ { "from": "system", "value": "Fix expected case on mysql5 foreignKey extraction\n" }, { "from": "human", "value": "<?php\n/**\n * DBSteward unit test for mysql5 foreign key extraction\n *\n * @package DBSteward\n * @license http://www.opensource.org/licenses/bsd-license.php Simplified BSD Licens...
php
chosen
[ { "from": "system", "value": "Add support for timestamps on users table\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Entities;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass User extends Model\n{\n protected $table = 'users';\n\n\tpublic $timestamps = false;\n\n prote...
php
chosen
[ { "from": "system", "value": "Add some const in Http helper\n" }, { "from": "human", "value": "<?php\n\n/**\n * Class RebillyHttpStatusCode\n * Helper class pre-defined Http response code\n */\nclass RebillyHttpStatusCode\n{\n /**\n * Http response code\n */\n const STATUS_OK = 200...
php
chosen
[ { "from": "system", "value": "Update ApiIntegrationTest to have real AuthorisationService" }, { "from": "human", "value": "<?php\nnamespace CtiDigital\\Configurator\\Test\\Unit\\Component;\n\nuse CtiDigital\\Configurator\\Model\\Component\\ApiIntegrations;\nuse Magento\\Integration\\Model\\Integ...
php
chosen
[ { "from": "system", "value": "Fix for requiring autoloader in bin script.\n" }, { "from": "human", "value": "#!/usr/bin/env php\n<?php\n/*\n * This file is part of StaticReview\n *\n * Copyright (c) 2014 Samuel Parkinson <@samparkinson_>\n *\n * For the full copyright and license information, pl...
php
chosen
[ { "from": "system", "value": "Fix reinitializing Grav in tests\n" }, { "from": "human", "value": "<?php\nnamespace Grav;\n\nuse Codeception\\Util\\Fixtures;\nuse Faker\\Factory;\nuse Grav\\Common\\Grav;\n\nini_set('error_log', __DIR__ . '/error.log');\n\n$grav = function() {\n Grav::resetInst...
php
chosen
[ { "from": "system", "value": "Disable attempts for Content-Length in order not to output error\n" }, { "from": "human", "value": "<?php\nuse Psr\\Http\\Message\\ServerRequestInterface as Request;\nuse Psr\\Http\\Message\\ResponseInterface as Response;\nuse HomoChecker\\Model\\Check;\nuse HomoChe...
php
chosen
[ { "from": "system", "value": "Fix updating task for new calendar API\n" }, { "from": "human", "value": "<?php\n\n// Init owncloud\nrequire_once('../../../lib/base.php');\nOC_JSON::checkLoggedIn();\nOC_JSON::checkAppEnabled('tasks');\n\n$l10n = new OC_L10N('tasks');\n\n$id = $_POST['id'];\n$task ...
php
chosen
[ { "from": "system", "value": "Remove use of factory defineAs.\n\nSigned-off-by: Mior Muhammad Zaki <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>\n" }, { "from": "human", "value": "<?php\n\nuse Faker\\Generator;\nuse Illuminate\\Support\\Str;\nuse Orchestra\\Foundation\\Auth\\User;\n\n/*\n...
php
chosen
[ { "from": "system", "value": "Return from dump instead of echoing\n" }, { "from": "human", "value": "<?php\n/**\n * Bootstrapping functions, essential and needed for Hana to work together with some common helpers.\n *\n */\n\n/**\n * Default exception handler.\n *\n */\nfunction myExceptionHandl...
php
chosen
[ { "from": "system", "value": "Fix typo and avoid fully-qualified namespaces\n" }, { "from": "human", "value": "<?php\n/**\n * Helpers functions to work with vlucas/phpdotenv.\n */\n\nnamespace Siler\\Dotenv;\n\n/**\n * Load the .env file contents into the environment.\n *\n * @param string $path...
php
chosen
[ { "from": "system", "value": "Fix Symfony 4.2 deprecation warning\n" }, { "from": "human", "value": "<?php\n\nnamespace RedjanYm\\FCMBundle\\DependencyInjection;\n\nuse Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder;\nuse Symfony\\Component\\Config\\Definition\\ConfigurationInterfa...
php
chosen
[ { "from": "system", "value": "Fix argument types in file type registry\n" }, { "from": "human", "value": "<?php\n\nnamespace Becklyn\\AssetsBundle\\File;\n\nuse Becklyn\\AssetsBundle\\Asset\\Asset;\nuse Becklyn\\AssetsBundle\\File\\Type\\CssFile;\nuse Becklyn\\AssetsBundle\\File\\Type\\FileType;...
php
chosen
[ { "from": "system", "value": "Fix for empty() on a constant\n" }, { "from": "human", "value": "<?php\n\t\n\tfunction sql_open() {\n\t\tglobal $pdo;\n\t\tif($pdo) return true;\n\t\t\n\t\t$dsn = DB_TYPE . ':host=' . DB_SERVER . ';dbname=' . DB_DATABASE;\n\t\tif(!empty(DB_DSN))\n\t\t\t$dsn .= ';' ....
php
chosen
[ { "from": "system", "value": "Use null user by default instead of 0\n" }, { "from": "human", "value": "<?php\n\nnamespace Yajra\\Auditable;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass AuditableTraitObserver\n{\n /**\n * Model's creating event hook.\n *\n * @param Model ...
php
chosen
[ { "from": "system", "value": "Add newline character on last line\n" }, { "from": "human", "value": "<?php\nnamespace Loct\\Pinger;\n\nuse \\JJG\\Ping;\n\n/**\n * Factory to create new JJG\\Ping\n * \n * @author herloct <herloct@gmail.com>\n */\nclass PingFactory\n{\n /**\n * Create new JJ...
php
chosen
[ { "from": "system", "value": "Fix private property name and visibility\n" }, { "from": "human", "value": "<?php\n// Copyright 2004-present Facebook. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance w...
php
chosen
[ { "from": "system", "value": "Remove Old Compatibility Layer for Pre-5.x Symfony Process" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace GrumPHP\\Process;\n\nuse GrumPHP\\Collection\\ProcessArgumentsCollection;\nuse Symfony\\Component\\Process\\Process;\n\n/**\n *...
php
chosen
[ { "from": "system", "value": "Fix type bug: ORM::pk returns a string, not an integer\n" }, { "from": "human", "value": "<?php defined('SYSPATH') or die('No direct script access.');\n/**\n * @since 1.0\n * @author Ando Roots <ando@roots.ee>\n */\nclass ACL_Model_Role extends Model_Auth_Role\n{\n\...
php
chosen
[ { "from": "system", "value": "Prepend WAMP client to script block instead of putting it somewhere in between\n" }, { "from": "human", "value": "<?php\n\nnamespace WyriHaximus\\Ratchet\\View\\Helper;\n\nuse Cake\\View\\Helper;\n\nclass WampHelper extends Helper\n{\n public $helpers = [\n ...
php
chosen
[ { "from": "system", "value": "Remove unused interface from repository\n" }, { "from": "human", "value": "<?php\n// @codingStandardsIgnoreFile\n// @codeCoverageIgnoreStart\n// this is an autogenerated file - do not edit\nspl_autoload_register(\n function($class) {\n static $classes = nu...
php
chosen
[ { "from": "system", "value": "Fix indentation in Header::redirect( arg\n" }, { "from": "human", "value": "<?php\n/**\n * @author Pierre-Henry Soria <ph7software@gmail.com>\n * @copyright (c) 2012-2018, Pierre-Henry Soria. All Rights Reserved.\n * @license GNU General Public L...
php
chosen
[ { "from": "system", "value": "Create berita index, models, and views" }, { "from": "human", "value": "<?php\n\n/* \n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the editor.\...
php
chosen
[ { "from": "system", "value": "Revert \"Make parser parameter required in the constructor as it is a hard dep\"\n\nDoing this will break the fallback PluginBroker behavior, as it tries to\ninstantiate the helper with no parameters to the constructor.\n\nThis reverts commit f368725d5742906cb0bf4130c290327adae...
php
chosen
[ { "from": "system", "value": "Add ReturnTypeWillChange to count method\n" }, { "from": "human", "value": "<?php\n\nnamespace Illuminate\\Database\\Eloquent\\Factories;\n\nuse Countable;\n\nclass Sequence implements Countable\n{\n /**\n * The sequence of return values.\n *\n * @var...
php
chosen
[ { "from": "system", "value": "Fix HTTP service error message.\n" }, { "from": "human", "value": "<?php namespace App\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass HTTPServiceProvider extends ServiceProvider {\n\n\t/**\n\t * Indicates that the loading of this provider is defer...
php
chosen
[ { "from": "system", "value": "[Tests] Remove handlers from Twig provider test\n" }, { "from": "human", "value": "<?php\nnamespace Bolt\\Tests\\Provider;\n\nuse Bolt\\Provider\\TwigServiceProvider;\nuse Bolt\\Tests\\BoltUnitTest;\nuse Bolt\\Twig\\SafeEnvironment;\n\n/**\n * Class to test src/Prov...
php
chosen
[ { "from": "system", "value": "Test if POST and GET variables are set before trying to actually access them. This increases code complexity noticable, let's see if codacy complains ...\n" }, { "from": "human", "value": "<?php\n $pwhash = parse_ini_file(\"/etc/pihole/setupVars.conf\")['WEBPASS...
php
chosen
[ { "from": "system", "value": "Fix models path in tests\n" }, { "from": "human", "value": "<?php\n\nif(is_dir(__DIR__ . '/../vendor')) {\n include(__DIR__ . '/../vendor/autoload.php');\n} else {\n require __DIR__ . '/../src.php';\n}\n\nrequire __DIR__ . '/TestCase.php';\nrequire __DIR__ . '...
php
chosen
[ { "from": "system", "value": "Add css to master template\n" }, { "from": "human", "value": "<!doctype html>\n<html>\n <head>\n <meta charset=\"utf-8\" />\n <title>Title</title>\n @yield('additional_styles')\n </head>\n <body>\n {{-- Nav bar goes here --}}\n\n...
php
chosen
[ { "from": "system", "value": "Fix linkTo links for new url format\n\nfix #176\n" }, { "from": "human", "value": "<?php\n\nclass OC_Search_Provider_News extends OC_Search_Provider{\n\t\n\tfunction search($query) {\n\t\tif (!OCP\\App::isEnabled('news')) {\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t$...
php
chosen
[ { "from": "system", "value": "Make endpoints api cors friendly\n" }, { "from": "human", "value": "<?php\n\nnamespace OParl\\Website\\API\\Controllers;\n\nuse App\\Model\\Endpoint;\nuse Illuminate\\Http\\Request;\n\nclass EndpointApiController\n{\n /**\n * @SWG\\Get(\n * path=\"/en...
php
chosen
[ { "from": "system", "value": "Revert \"Update a test to reflect a change in league/glide\"\n\nThis reverts commit 29cc75df4170a2ff902cd9f2bfdd675db0a91684.\n" }, { "from": "human", "value": "<?php\n\nnamespace League\\Glide\\Responses;\n\nuse League\\Flysystem\\Adapter\\Local;\nuse League\\Flysy...
php
chosen
[ { "from": "system", "value": "Use migrations inside test class\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests\\Unit\\Pages\\Help;\n\nuse Tests\\TestCase;\nuse Tests\\CreatesUser;\nuse Illuminate\\Foundation\\Testing\\RefreshDatabase;\n\nclass HelpIndexPageTest extends TestCase\n{\n ...
php
chosen
[ { "from": "system", "value": "FIX: Revert name of extension method and remove debugging\n" }, { "from": "human", "value": "<?php\n\nclass GridRowsExtension extends DataExtension {\n\n /*\n If you are laying out using some form of grid, e.g. HTML table (ugh) or bootstraps span classes it is use...
php
chosen
[ { "from": "system", "value": "Define our plan of action for the code\n" }, { "from": "human", "value": "<?php\r\n\tfunction insert($map_id)\r\n\t{\r\n\t\t//Standard SQL connection stuff\r\n\t\t$linkID = mysql_connect(\"localhost\", \"root\", \"\") or die (\"Could not connect to database!\");\r\n...
php
chosen
[ { "from": "system", "value": "Check if values are set or not\n" }, { "from": "human", "value": "<?php\n\t/**\n\t * @package content\n\t */\n\t/**\n\t * The AjaxTranslate page is used for translating strings on the fly\n\t * that are used in Symphony's javascript\n\t */\n\tClass contentAjaxTransl...
php
chosen
[ { "from": "system", "value": "Move routing into a separate function\n" }, { "from": "human", "value": "<?php\n\n$router->get([\n 'route' => '/name/(name)',\n 'object' => 'Example@getName',\n 'require' => function() {\n return 1 + 1 == 2;\n }\n]);\n\n$router->post([\n 'route...
php
chosen
[ { "from": "system", "value": "Fix RelationBehavior load many-to-many test. Set required php 5.6.0\n" }, { "from": "human", "value": "<?php\n\nnamespace notamedia\\relation;\n\nuse yii\\base\\Exception;\n\n/**\n * Exception for throw when relation errors occured\n */\nclass RelationException exte...
php
chosen
[ { "from": "system", "value": "Enable pagination on comment list in user profile\n" }, { "from": "human", "value": "<?php\ndefined('mnminclude') or die();\n\n$query = '\n FROM comments, links\n WHERE (\n comment_user_id = \"'.(int)$user->id.'\"\n AND link_id = comment_link_id\...
php
chosen
[ { "from": "system", "value": "Fix view to loop to all ingredients level\n" }, { "from": "human", "value": "<div id=\"ingredients_matrix\" class=\"row\">\n\t<?php foreach ($ingredients as $key => $ingredient) { ?>\n\t\t<div class=\"page-title medium-12 columns\">\n\t\t\t<p><?php echo $ingredient[...
php
chosen
[ { "from": "system", "value": "Add unserialize handler for data objects\n" }, { "from": "human", "value": "<?php\nnamespace Slack;\n\n/**\n * A serializable model object that stores its data in a hash.\n */\nabstract class DataObject implements \\JsonSerializable\n{\n /**\n * @var array Th...
php
chosen
[ { "from": "system", "value": "Order methods line -> function -> class -> file.\n" }, { "from": "human", "value": "<?hh // strict\n\nnamespace HackPack\\HackUnit\\Event;\n\nuse HackPack\\HackUnit\\Util\\TraceItem;\n\nclass Skip\n{\n public function __construct(private TraceItem $callSite)\n ...
php
chosen
[ { "from": "system", "value": "Add code back to clone items.\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Handler\\Framework;\n\nuse App\\Command\\Framework\\CopyFrameworkCommand;\nuse App\\Event\\CommandEvent;\nuse App\\Handler\\BaseDoctrineHandler;\nuse App\\Entity\\Framework\\LsD...
php
chosen