conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Handle invalid dates only as well\n" }, { "from": "human", "value": "<?php\n\nnamespace Speicher210\\Fastbill\\Api\\Serializer\\Handler;\n\nuse JMS\\Serializer\\Context;\nuse JMS\\Serializer\\Handler\\DateHandler as JMSDateHandler;\nuse JMS\\Serializer\\JsonDeserial...
php
chosen
[ { "from": "system", "value": "Throw an exception instead of exiting when autload.php cannot be included\n" }, { "from": "human", "value": "<?php\n\nuse OCA\\Mail\\HordeTranslationHandler;\n\n$autoload = __DIR__ . '/../vendor/autoload.php';\nif (!is_readable($autoload)) {\n\tprint 'Cannot read \...
php
chosen
[ { "from": "system", "value": "Increase `Bcrypt` cost to 12\n\nThis results in ~333ms per hash on an oldish Intel(R) Core(TM) i5-2430M CPU @ 2.40GHz\r\n any other CPU I tested was faster than that." }, { "from": "human", "value": "<?php\nnamespace wcf\\system\\user\\authentication\\password\\algo...
php
chosen
[ { "from": "system", "value": "Make the message nicer with a picture of jen\n" }, { "from": "human", "value": "@extends('layouts.master')\n\n@section('main_content')\n\n @include('layouts.header', ['header' => 'Upload a CSV for import'])\n\n <div class=\"container -padded\">\n <div c...
php
chosen
[ { "from": "system", "value": "Fix typo in contact notes migration down function\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateContactNotesTable extends Migration\n{\n /**\n * Run th...
php
chosen
[ { "from": "system", "value": "Remove scripting for now, just git pull\n" }, { "from": "human", "value": "<?php\n\nrequire 'core.php';\n\n// No unauthenticated deploys!\nprotectPage();\n\n// Run relevant deploy.\n$hash = $_GET['project'];\n$targets = getDeployTargets();\nforeach ($targets as $tar...
php
chosen
[ { "from": "system", "value": "2.4.3: Use schedule settings in the access method.\n" }, { "from": "human", "value": "<?php\n\nnamespace Drupal\\happy_alexandrie\\Access;\n\nuse Drupal\\Core\\Access\\AccessResult;\nuse Drupal\\Core\\Session\\AccountInterface;\n\nclass AlexandrieAccess {\n\n /**\n...
php
chosen
[ { "from": "system", "value": "Add return types to JsonSerializable implementations\n\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 ...
php
chosen
[ { "from": "system", "value": "Add two members to recieve ec_dsr_report, next will fix PM8:00 problem\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Export\\DailySaleRecord;\n\nuse App\\Utility\\Chinghwa\\ExportExcel;\nuse Carbon\\Carbon;\n\nclass OnlyEcExport extends Export\n{\n p...
php
chosen
[ { "from": "system", "value": "Make AllTests.php without any checkstyle error\n" }, { "from": "human", "value": "<?php\n/**\n * AllTests file\n *\n * PHP 5\n *\n * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)\n * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefo...
php
chosen
[ { "from": "human", "value": "feat(tests): Add simple placeholder tests, give first timers opportunities to contribute to open source\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Unicodeveloper\\Ngsc\\Test;\n\nuse PHPUnit_Framework_TestCase;\n\nclass NgscTest extends PHPUnit_Framework_Test...
php
chosen
[ { "from": "system", "value": "Add a redirect message when logging out.\n" }, { "from": "human", "value": "<?php\n\nnamespace FluxBB\\Web\\Controllers;\n\nuse FluxBB\\Server\\Exception\\Exception;\nuse FluxBB\\Server\\Exception\\ValidationFailed;\nuse FluxBB\\Web\\Controller;\n\nclass AuthControl...
php
chosen
[ { "from": "system", "value": "Add logout link for OIDC Test RP\n" }, { "from": "human", "value": "<h1>OIDC RP Test</h1>\n<?php\nforeach ($_SERVER as $key => $value) if (substr($key,0,4) == \"OIDC\") echo \"<p>\" . substr($key,5) . \": $value</p>\\n\";\n" }, { "from": "gpt", "value": ...
php
chosen
[ { "from": "system", "value": "Add Type attribute to password (security header)\n" }, { "from": "human", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: Giansalex\n * Date: 15/07/2017\n * Time: 22:54.\n */\n\nnamespace Greenter\\Ws\\Header;\n\nuse SoapHeader;\nuse SoapVar;\n\n/**\n * Clas...
php
chosen
[ { "from": "system", "value": "Add signInViaPassport() for api tests\n" }, { "from": "human", "value": "<?php\n\nnamespace Tests;\n\nuse Illuminate\\Foundation\\Testing\\TestCase as BaseTestCase;\n\nabstract class TestCase extends BaseTestCase\n{\n use CreatesApplication;\n\n protected func...
php
chosen
[ { "from": "system", "value": "Fix to getShopifyApi() so it correctly returns different instances when dealing with different shops\n" }, { "from": "human", "value": "<?php\n\nnamespace RocketCode\\Shopify;\n\n/**\n * This trait should be used to implement the interface ShopifyApiUser\n */\ntrait...
php
chosen
[ { "from": "system", "value": "Fix static call to non-static method\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace SimpleSAML\\SAML2\\XML\\md;\n\nuse SimpleSAML\\Assert\\Assert;\nuse SimpleSAML\\SAML2\\Exception\\ProtocolViolationException;\n\nuse function filte...
php
chosen
[ { "from": "system", "value": "Add a global scope for the reply count\n" }, { "from": "human", "value": "<?php namespace App\\Data;\n\nuse Eloquent;\nuse DiscussionPresenter;\nuse Laracasts\\Presenter\\PresentableTrait;\nuse Illuminate\\Database\\Eloquent\\SoftDeletes;\n\nclass Discussion extends...
php
chosen
[ { "from": "system", "value": "Set Brand name as page meta title.\n" }, { "from": "human", "value": "<?php\n\nnamespace Dmatthew\\Brand\\Block\\Brand;\n\nclass View extends \\Magento\\Framework\\View\\Element\\Template\n{\n /**\n * Core registry\n *\n * @var \\Magento\\Framework\\R...
php
chosen
[ { "from": "system", "value": "Fix recursion call on Hook of getData / setData on data objects\n" }, { "from": "human", "value": "<?php\n/**\n *\n * (c) Marco Bunge <marco_bunge@web.de>\n *\n * For the full copyright and license information, please view the LICENSE.txt\n * file that was distribut...
php
chosen
[ { "from": "system", "value": "Fix potential TypeError with malformed cookie" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Dflydev\\FigCookies;\n\nuse function array_filter;\nuse function assert;\nuse function explode;\nuse function is_array;\nuse function preg_s...
php
chosen
[ { "from": "system", "value": "Replace use of deprecated class \"Twig_Filter_Method\"" }, { "from": "human", "value": "<?php\n\nnamespace Twig\\Extension;\n\nclass GeshiExtension extends \\Twig_Extension\n{\n\n /**\n * @return array\n */\n public function getFilters()\n {\n ...
php
chosen
[ { "from": "system", "value": "Add flag to not escape slashes in json encoding" }, { "from": "human", "value": "<?php\n\nnamespace JWX\\JWT;\n\nuse JWX\\JWT\\Claim\\Claim;\n\n\nclass Claims\n{\n\t/**\n\t * Claims\n\t *\n\t * @var Claim[] $_claims\n\t */\n\tprotected $_claims;\n\t\n\t/**\n\t * Con...
php
chosen
[ { "from": "system", "value": "Clean up page metadata keys\n" }, { "from": "human", "value": "<?php\n\tnamespace Site\\Page;\n\n\tclass MetadataList {\n\t\tpublic $error;\n\t\tpublic $count = 0;\n\n\t\tpublic function find($parameters = array()) {\n\t\t\t$bind_params = array();\n\t\t\t$get_object...
php
chosen
[ { "from": "system", "value": "Add test for commit invalidating cache\n" }, { "from": "human", "value": "<?php\n\n/**\n * @group cache\n */\nclass CacheTest extends DatabaseTestCase {\n\tpublic function setUp() {\n\t\tDatabaseTestCase::setUp();\n\t\tBasicObject::invalidate_cache();\n\t}\n\n\tpubl...
php
chosen
[ { "from": "system", "value": "Move sleep call to begining of loop\n" }, { "from": "human", "value": "<?php\n\n define(\"SECONDS_BETWEEN_ALERTS\", rand(10, 60));\n\n $alerts = array(\n \"Coldest Air of the Season Sweeping Through Central and Southern States\",\n \"Belgium on '...
php
chosen
[ { "from": "system", "value": "Raise memory limit for coverage tests\n" }, { "from": "human", "value": "<?php\n/**\n * A few common settings for all unit tests.\n *\n * Also remember do define the @package attribute for your test class to make it appear under\n * the right package in unit test an...
php
chosen
[ { "from": "system", "value": "Test fix: always use full cms-models config state as default\n" }, { "from": "human", "value": "<?php\nnamespace Czim\\CmsModels\\Test;\n\nabstract class TestCase extends \\Orchestra\\Testbench\\TestCase\n{\n\n /**\n * {@inheritdoc}\n */\n protected fu...
php
chosen
[ { "from": "system", "value": "Fix first crappy bug in this crappy hack\n" }, { "from": "human", "value": "<?php\r\n$code = file_get_contents($file);\r\n$obj = null;\r\n\r\nif (defined('tempns'))\r\n if (!function_exists('uopz_undefine'))\r\n die('You need uopz pecl extension for complex clas...
php
chosen
[ { "from": "system", "value": "Make sure we assign the right thing to the styles array.\n" }, { "from": "human", "value": "<?php\n\nnamespace AbleCore\\Modules;\n\nclass ImageStyleManager {\n\n\tprotected $styles = array();\n\n\t/**\n\t * Init\n\t *\n\t * @return ImageStyleManager A new instance ...
php
chosen
[ { "from": "system", "value": "BAP-9376: Create unit tests for ApiBundle. Fix ExpandRelatedEntities and FilterFieldsByExtra. Unit tests for ExpandRelatedEntities, FilterFieldsByExtra, CompleteDefinition, EnsureInitialized\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\ApiBundl...
php
chosen
[ { "from": "system", "value": "Add tideways config to getcomposer.org\n" }, { "from": "human", "value": "<?php\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\n\nif (!isset($env) || $...
php
chosen
[ { "from": "system", "value": "Add HTTP properties to generic error\n\nAllows generic HTTP error to accept more detailed information about the response from the server." }, { "from": "human", "value": "<?php\nnamespace Mailgun\\Connection\\Exceptions;\n\nclass GenericHTTPError extends \\Exception...
php
chosen
[ { "from": "system", "value": "Add support for smart transactional emails\n" }, { "from": "human", "value": "<?php\n\nnamespace Casinelli\\CampaignMonitor;\n\nclass CampaignMonitor\n{\n protected $app;\n\n public function __construct($app)\n {\n $this->app = $app;\n }\n\n pu...
php
chosen
[ { "from": "system", "value": "Add ability to limit products and taxons when looking for name part\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LIC...
php
chosen
[ { "from": "system", "value": "Add forgotten file doc block\n" }, { "from": "human", "value": "<?php\n\nclass testRuleAppliesToVariableNameWithEmptySubtractSuffixes\n{\n private $permissionsRepository;\n}\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of PHP Mess...
php
chosen
[ { "from": "system", "value": "Fix PSR-4 fix for Composer deprecation\n\nComposer:\r\n\r\nDeprecation Notice: Class Sly\\Sly\\NotificationPusher\\Adapter\\ApnsAPI located in ./vendor/sly/notification-pusher/src/Sly/NotificationPusher/Adapter/ApnsAPI.php does not comply with psr-4 autoloading standard. It wil...
php
chosen
[ { "from": "system", "value": "Make marker interface extend throwable\n\nThis makes sure the interface can only be used by exceptions/errors, and\r\nit makes more sense to be catched." }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace League\\Tactician;\n\n/**\n * Mar...
php
chosen
[ { "from": "system", "value": "system: Fix style issues for clicontroller class\n" }, { "from": "human", "value": "<?php\n\n/**\n * This file contains an extension for the base controller\n * class, which implements additional features specifically\n * required by the CLI.\n *\n * PHP Version 5.3...
php
chosen
[ { "from": "system", "value": "Adjust to scalar types introduced in Resource component & bundle\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENS...
php
chosen
[ { "from": "system", "value": "Fix unit tests box size\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the Imagine package.\n *\n * (c) Bulat Shakirzyanov <mallluhuct@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that w...
php
chosen
[ { "from": "system", "value": "Add initial code for setup/teardown of test cases\n" }, { "from": "human", "value": "<?php\nApp::uses('Model', 'Model');\nApp::uses('AppModel', 'Model');\nrequire_once CAKE . 'Test' . DS . 'CASE' . DS . 'Model' . DS . 'models.php';\nclass DeletedAtBehaviorTest exten...
php
chosen
[ { "from": "system", "value": "Change Finding Aids homepage to show more collections than two.\n" }, { "from": "human", "value": "<h1><?php echo __('Welcome'); ?></h1>\n\n<div class=\"row\">\n <?php foreach(get_recent_collections(2) as $collection): ?>\n <div class=\"col-sm-6\">\n ...
php
chosen
[ { "from": "system", "value": "Add explicit reasoning for session sniff\n\nFrom https://vip.wordpress.com/documentation/code-review-what-we-look-for/#session_start-and-other-session-related-functions, linked in #75" }, { "from": "human", "value": "<?php\n/**\n * WordPress_Sniffs_VIP_SessionVariab...
php
chosen
[ { "from": "system", "value": "Update doc blocks at class level\n" }, { "from": "human", "value": "<?php\n\nnamespace SilverStripe\\FullTextSearch\\Search\\Extensions;\n\nuse SilverStripe\\Core\\Extension;\nuse TractorCow\\ClassProxy\\Generators\\ProxyGenerator;\nuse SilverStripe\\FullTextSearch\...
php
chosen
[ { "from": "system", "value": "Remove bootstrap asset from app asset\n" }, { "from": "human", "value": "<?php\n/**\n * @link http://www.yiiframework.com/\n * @copyright Copyright (c) 2008 Yii Software LLC\n * @license http://www.yiiframework.com/license/\n */\n\nnamespace app\\assets;\n\nuse yii\...
php
chosen
[ { "from": "system", "value": "Return a string instead of printing.\n\n\nsvn commit r2846\n" }, { "from": "human", "value": "<?php\n\nrequire_once 'Swat/Swat.php';\nrequire_once 'Swat/exceptions/SwatException.php';\n\n/**\n * The base object type\n *\n * @package Swat\n * @copyright 2004-2005 s...
php
chosen
[ { "from": "system", "value": "feat: Remove 140 hard limit from prayer request\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreatePrayerRequestsTable e...
php
chosen
[ { "from": "system", "value": "Check that cases are up to date comparing to pugjs ones\n" }, { "from": "human", "value": "<?php\n\nnamespace Phug\\Test;\n\nclass CasesTest extends AbstractRendererTest\n{\n public function caseProvider()\n {\n return array_map(function ($file) {\n ...
php
chosen
[ { "from": "system", "value": "Refactor some duplicate code into a checkSyntax function which isn't as noisy\n" }, { "from": "human", "value": "<?php\n\nrequire_once('tests/php/base.php');\n\nclass SyntaxTests extends UnitTestCase {\n public function testFrameworkSyntax() {\n $test_file...
php
chosen
[ { "from": "system", "value": "Add an alias for the bound watcher instance.\n\nSigned-off-by: Jason Lewis <b136be6b8ecc2c62ceb9857ec62bf85489a45e0c@gmail.com>\n" }, { "from": "human", "value": "<?php\n\nnamespace JasonLewis\\ResourceWatcher\\Integration;\n\nuse Illuminate\\Support\\ServiceProvide...
php
chosen
[ { "from": "system", "value": "Verify non-generic members also work just fine\n" }, { "from": "human", "value": "<?php namespace net\\xp_framework\\unittest\\core\\generics;\n\nuse util\\Objects;\n\n/**\n * Lookup map\n */\n#[@generic(self= 'K, V', parent= 'K, V')]\nclass Lookup extends AbstractD...
php
chosen
[ { "from": "system", "value": "Create test case for default currency\n" }, { "from": "human", "value": "<?php\n\nnamespace Flagbit\\Bundle\\CurrencyBundle\\Tests;\n\nuse Flagbit\\Bundle\\CurrencyBundle\\DependencyInjection\\Configuration;\nuse Symfony\\Component\\Config\\Definition\\Processor;\n\...
php
chosen
[ { "from": "system", "value": "Fix apc extension checking condition\n" }, { "from": "human", "value": "<?php\nuse Pux\\Dispatcher\\APCDispatcher;\nuse Pux\\Mux;\n\nclass APCDispatcherTest extends PHPUnit_Framework_TestCase\n{\n public function test()\n {\n if ( ! extension_loaded('ap...
php
chosen
[ { "from": "system", "value": "Change temp variable to something more descriptive\n" }, { "from": "human", "value": "<?php\ninclude_once '../src/round_robin.php';\n\n$teams = ['The 1st', '2 Good', 'We 3', '4ward'];\n\n$schedule = schedule($teams, (($temp = count($teams)) % 2 === 0 ? $temp - 1 : $...
php
chosen
[ { "from": "system", "value": "Make the message menu callable from other menu builders or be autonomous.\n" }, { "from": "human", "value": "<?php\n\nnamespace BisonLab\\SakonninBundle\\Menu;\n\nuse Knp\\Menu\\FactoryInterface;\nuse Symfony\\Component\\DependencyInjection\\ContainerAwareInterface;...
php
chosen
[ { "from": "system", "value": "Handle the error for CSRF and MethodNotAllowed differently\n" }, { "from": "human", "value": "<?php namespace App\\Exceptions;\n\nuse Exception, Redirect;\nuse Illuminate\\Foundation\\Exceptions\\Handler as ExceptionHandler;\n\nclass Handler extends ExceptionHandler...
php
chosen
[ { "from": "system", "value": "Add convenience method to convert to an Illuminate collection\n" }, { "from": "human", "value": "<?php\n\nnamespace TheCrypticAce\\Lazy\\Concerns;\n\nuse Illuminate\\Contracts\\Support\\Jsonable;\nuse Illuminate\\Contracts\\Support\\Arrayable;\n\ntrait Arrays\n{\n ...
php
chosen
[ { "from": "system", "value": "Correct a Property Name Typo\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of PMG\\Queue\n *\n * Copyright (c) PMG <https://www.pmg.com>\n *\n * For full copyright information see the LICENSE file distributed\n * with this source code.\n *\n * ...
php
chosen
[ { "from": "system", "value": "Use fully qualified name space\n" }, { "from": "human", "value": "<?php\n\nnamespace Bernard\\Event;\n\nuse Bernard\\Envelope;\nuse Bernard\\Queue;\nuse Symfony\\Component\\EventDispatcher;\n\n/**\n * @package Bernard\n */\nclass PingEvent extends EventDispatcher\\E...
php
chosen
[ { "from": "system", "value": "Add init from POST array\n" }, { "from": "human", "value": "<?php\n/**\n * @license MIT\n * @author Igor Sorokin <dspbee@pivasic.com>\n */\nnamespace Dspbee\\Bundle\\Data;\n\n/**\n * Initialize class properties from array.\n *\n * Class TDataFilter\n * @package Dspb...
php
chosen
[ { "from": "system", "value": "Use default behavior to get docker host in tests, DOCKER_HOST env variable or unix:///var/run/docker.sock by default\n" }, { "from": "human", "value": "<?php\n\nnamespace Docker\\Tests;\n\nuse Docker\\Docker;\nuse Docker\\Http\\DockerClient as Client;\nuse PHPUnit_F...
php
chosen
[ { "from": "system", "value": "Update plugin to use new interface\n" }, { "from": "human", "value": "<?php\nnamespace Rocketeer\\Plugins\\Laravel;\n\nuse Illuminate\\Container\\Container;\nuse Rocketeer\\Abstracts\\AbstractPlugin;\n\nclass LaravelPlugin extends AbstractPlugin\n{\n /**\n * ...
php
chosen
[ { "from": "system", "value": "Add instanceof check to setScale method\n" }, { "from": "human", "value": "<?php namespace Philipbrown\\Math;\n\nclass Math {\n\n /**\n * @var integer\n */\n protected $scale = 0;\n\n /**\n * Create\n *\n * @param $value string\n * @return Math\\Numbe...
php
chosen
[ { "from": "system", "value": "Use interface rather than a class.\n" }, { "from": "human", "value": "<?php\n\nnamespace Mulgrew\\Model;\n\nuse DateTime;\n\nclass Revision\n{\n /**\n * Revision Identifier\n * @column(type=\"string\", length=\"40\", )\n * @var integer\n */\n p...
php
chosen
[ { "from": "system", "value": "Fix large Input file generator\n" }, { "from": "human", "value": "<?php\ndeclare(strict_types=1);\n\nrequire_once __DIR__.'/../__CondorcetAutoload.php';\n\n///\n $number_of_votes = 100_000_000;\n $number_of_candidates = 8;\n///\n\n$candidateName = 'A';\n\n$can...
php
chosen
[ { "from": "system", "value": "Add false return for no results\n" }, { "from": "human", "value": "<?php\n/**\n* \n*/\nclass Log extends CI_Model\n{\n\tpublic function auth($acount, $dbs){\n\t\t$db = $this->load->database($dbs, true);\n\t\t$data = $this->db->query(\"select rtrim(ltrim(clave)) as p...
php
chosen
[ { "from": "system", "value": "Make configured email verification window available as service\n" }, { "from": "human", "value": "<?php\n\n/**\n * Copyright 2014 SURFnet bv\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance ...
php
chosen
[ { "from": "system", "value": "Include poll info field in JSON response\n" }, { "from": "human", "value": "<?php\n\nnamespace app\\modules\\rest\\versions\\v1\\controllers;\n\nuse Yii;\nuse app\\models\\Poll;\nuse app\\models\\Code;\nuse app\\modules\\rest\\controllers\\VotingRestController;\nuse...
php
chosen
[ { "from": "system", "value": "Implement a method to convert udesrscore case to camelCase\n" }, { "from": "human", "value": "<?php\nnamespace Air\\BookishBundle\\Lib;\n\nclass NytApiHandler\n{\n private $nytApiKey;\n private $guzzleClient;\n\n public function __construct($nytApiKey, $guz...
php
chosen
[ { "from": "system", "value": "Update release link on public site.\n" }, { "from": "human", "value": "<?php\n/**\n * the home page\n *\n * @package WordPress\n * @subpackage Twenty_Eleven\n */\n\nget_header(); ?>\n\n\t\t<div id=\"primary\">\n\t\t\t<div id=\"content\" class=\"home\" role=\"main\">...
php
chosen
[ { "from": "system", "value": "Move the logic for \"for\" to the end of the constructor so that\neverything else is set first." }, { "from": "human", "value": "<?php\nclass Wub_Success\n{\n public $message = \"There was a success for something.... idk what.\";\n \n public $continueURL = ...
php
chosen
[ { "from": "system", "value": "Format loyalty number when shown as name in search\n" }, { "from": "human", "value": "<?\ninclude '../scat.php';\n\n$criteria= array();\n\n$term= $_REQUEST['term'];\n$terms= preg_split('/\\s+/', $term);\n\nforeach ($terms as $term) {\n $term= $db->real_escape_strin...
php
chosen
[ { "from": "system", "value": "Add Max priority for queue declare\n" }, { "from": "human", "value": "<?php\n\nnamespace VladimirYuldashev\\LaravelQueueRabbitMQ\\Console;\n\nuse Exception;\nuse Illuminate\\Console\\Command;\nuse VladimirYuldashev\\LaravelQueueRabbitMQ\\Queue\\Connectors\\RabbitMQC...
php
chosen
[ { "from": "system", "value": "Move hooks directory to a constant\n\nThat way one could ask for the default directory from its code while still\nextend the class and change the path to another one.\n" }, { "from": "human", "value": "<?php\n\nnamespace PhpGitHooks\\Module\\Configuration\\Infrastru...
php
chosen
[ { "from": "system", "value": "Fix lightbox on two col page.\n" }, { "from": "human", "value": "<?php\n/*\nTemplate Name: 2 Spalten und Bilder\n*/\n?>\n\n<div class=\"row\">\n <div class=\"medium-8 small-12 column\">\n <div class=\"white-bg vines\">\n <?php while (have_posts(...
php
chosen
[ { "from": "system", "value": "Fix id of first organisation.\n" }, { "from": "human", "value": "<?php\n\nuse Illuminate\\Database\\Seeder;\n\nclass OrganisationsTableSeeder extends Seeder\n{\n /**\n * Run the database seeds.\n *\n * @return void\n */\n public function run()\...
php
chosen
[ { "from": "system", "value": "Throw exception if config not found\n" }, { "from": "human", "value": "<?php\n\nnamespace DoctrineDbalIbmiTest;\n\nuse Doctrine\\ORM\\EntityManager;\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse Doctrine\\ORM\\Tools\\Setup;\n\nrequire __DIR__ . '/../vendor/autolo...
php
chosen
[ { "from": "system", "value": "Return code for about command\n" }, { "from": "human", "value": "<?php\n\nnamespace Distill\\Cli\\Command;\n\nuse Distill\\Distill;\nuse Symfony\\Component\\Console\\Command\\Command;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\Component\\...
php
chosen
[ { "from": "system", "value": "Use md5 to generate better guid\n" }, { "from": "human", "value": "<?= '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>' ?>\n<rss version=\"2.0\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\">\n <channel>\n <title><?= @$tpl['channel_title'] ?: 'Fortune ...
php
chosen
[ { "from": "system", "value": "Write test for class construct\n" }, { "from": "human", "value": "<?php\n\nrequire_once __DIR__.'/../paths.php';\nrequire_once VENDOR_DIR.'autoload.php';\nrequire_once STENCIL_DIR.'post.php';\n\nuse Stencil\\Stencil as Stencil;\nuse Stencil\\Post as Post;\n\nclass P...
php
chosen
[ { "from": "system", "value": "Fix exception call in loop()\n" }, { "from": "human", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Funktions;\n\n/**\n * Return a value based on a test\n *\n * @param boolean $test\n * @param callable $truthy\n * @param callable $falsy\n * @return mixed\...
php
chosen
[ { "from": "system", "value": "Destroy all pipes since we don't need them for mocking\n" }, { "from": "human", "value": "<?php\n\nnamespace WyriHaximus\\React\\Tests;\n\nuse Evenement\\EventEmitter;\nuse Phake;\nuse React\\EventLoop\\Factory;\nuse WyriHaximus\\React\\ProcessOutcome;\n\nclass Func...
php
chosen
[ { "from": "system", "value": "Add fix for new phpunit\n" }, { "from": "human", "value": "<?php\n\nuse Mro95\\FormBuilder\\Form;\nuse Mro95\\FormBuilder\\FormBuilderFactory;\nuse Mro95\\FormBuilder\\View\\FormViewBuilder;\n\nclass TestForm extends PHPUnit_Framework_TestCase\n{\n public functio...
php
chosen
[ { "from": "system", "value": "Switch to just icons for home and sign out in dashboard nav\n" }, { "from": "human", "value": "<nav class=\"navbar navbar-default navbar-fixed-top\" role=\"navigation\">\n <div class=\"container-fluid\">\n <div class=\"navbar-header\">\n <button...
php
chosen
[ { "from": "system", "value": "[Form] Implement Twig helpers to get field variables\n\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 ...
php
chosen
[ { "from": "system", "value": "Update fields form for step 2\n" }, { "from": "human", "value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component\\Optio...
php
chosen
[ { "from": "system", "value": "Remove through field check, as we now check the entire through chain\n" }, { "from": "human", "value": "<?php\n\nnamespace AlgoWeb\\PODataLaravel\\Models\\ObjectMap\\Entities\\Associations;\n\nclass AssociationStubMonomorphic extends AssociationStubBase\n{\n /**\...
php
chosen
[ { "from": "system", "value": "Use spaces and new array syntax\n" }, { "from": "human", "value": "<?php\n\nreturn array(\n\n\t/**\n\t * You can get a steam API key from http://steamcommunity.com/dev/apikey\n\t * Once you get your key, add it here.\n\t*/\n\t'steamApiKey' => env('STEAM_API_KEY'),\n...
php
chosen
[ { "from": "system", "value": "Use fully qualified path to app.php\n\nAs we don't know where the current working directory is, use a fully\nqualified path to app.php. This allows use of the PHP built in web\nserver if it's run from the root directory like this:\n\nphp -S 0.0.0.0:8888 -t public public/index.p...
php
chosen
[ { "from": "system", "value": "Switch revoking and adding trophies to make level trophies possible\n" }, { "from": "human", "value": "<?php\nnamespace wcf\\system\\cronjob;\nuse wcf\\data\\cronjob\\Cronjob;\nuse wcf\\system\\trophy\\condition\\TrophyConditionHandler;\n\n/**\n * Assigns automatica...
php
chosen
[ { "from": "system", "value": "Add missing implementation in StaticAccessControl\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 LIC...
php
chosen
[ { "from": "system", "value": "Fix wrong click-action binding for loggedin menu\n\nSigned-off-by: Fran Diéguez <1a0d2d7b2e688322d0c86dcf5420732151ae4348@mabishu.com>" }, { "from": "human", "value": "<?php\n\nclass Application_View_Helper_Loggedin extends Zend_View_Helper_Abstract\n{\n public f...
php
chosen
[ { "from": "system", "value": "Add time sorting from db\n" }, { "from": "human", "value": "<?php\nclass db_dcs_log extends CI_Model{\n\tfunction get_all(){\n\t\t$q = $this->db->get('dcs_log');\n\t\treturn $q->result();\n\t}\n\t\n\tfunction get_date(){\n\t\t$this->db->distinct();\n\t\t$this->db->s...
php
chosen
[ { "from": "system", "value": "Simplify getter using php 8 syntax\n" }, { "from": "human", "value": "<?php\n\nnamespace App\\Entity;\n\nuse ApiPlatform\\Core\\Annotation\\ApiProperty;\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * @ORM\\Entity\n * @ORM\\InheritanceType(\"JOINED\")\n * @ORM\\Discr...
php
chosen
[ { "from": "system", "value": "Fix bad var name for components\n" }, { "from": "human", "value": "<?php\n\nclass ComponentTableSeeder extends Seeder {\n\n\t/**\n\t * Run the database seeds.\n\t *\n\t * @return void\n\t */\n\tpublic function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t$defaultComp...
php
chosen
[ { "from": "system", "value": "application: Add new static methods to M2DateTime class\n\n -) get_date() for returning a MySQL compatible date string\n -) get_time() for returning a MySQL compatible time string\n" }, { "from": "human", "value": "<?php\n\n/**\n * Date/Time related functions\n * ...
php
chosen
[ { "from": "system", "value": "Remove code to support manifest sub-directories that we will not be using\n" }, { "from": "human", "value": "<?php\nnamespace CFPropertyList;\n\nrequire_once( 'cfpropertylist-2.0.1/CFPropertyList.php' );\n\n// Get the varibles passed by the enroll script\n$identifie...
php
chosen
[ { "from": "system", "value": "Use the highest level in analyser integration tests\n" }, { "from": "human", "value": "<?php declare(strict_types = 1);\n\nuse Nette\\Configurator;\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\nrequire_once __DIR__ . '/TestCase.php';\nrequire_once __DIR__ . ...
php
chosen
[ { "from": "system", "value": "Update deploy process and cleanup\n" }, { "from": "human", "value": "@servers(['demo' => 'timegrid'])\n\n@task('check', ['on' => 'demo'])\n cd /var/www/timegrid.io/dev/htdocs\n phpunit\n@endtask\n\n@task('deploy', ['on' => 'demo'])\n sudo /usr/local/bin/dep...
php
chosen