conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add CLI task for fontcustom iconfont-generation\n" }, { "from": "gpt", "value": "<?php\n\nclass CM_App_Cli extends CM_Cli_Runnable_Abstract {\n\n\t/**\n\t * @synchronized\n\t */\n\tpublic function iconRefresh() {\n\t\t/** @var CM_File[] $svgFileList */\n\t\t$svgFileL...
php
chosen
[ { "from": "human", "value": "Add class to handle YAML export output file\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Bolt\\Database\\Migration\\Output;\n\nuse Bolt\\Database\\Migration\\Export;\nuse Symfony\\Component\\HttpFoundation\\File\\File;\nuse Symfony\\Component\\Yaml\\Dumper;\n\...
php
chosen
[ { "from": "human", "value": "Add Default template handler (incomplete)\n\nStarted working on Twig Template handler implementation.\n" }, { "from": "gpt", "value": "<?php namespace Aedart\\Scaffold\\Handlers;\n\nuse Aedart\\Scaffold\\Contracts\\Handlers\\TemplateHandler;\nuse Aedart\\Scaffold\\Co...
php
chosen
[ { "from": "human", "value": "Add Industries table Combined With subindustries\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateIndustriesTable extends...
php
chosen
[ { "from": "human", "value": "Add GraphQL base class (stdlib types)\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of Railgun package.\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\ndecl...
php
chosen
[ { "from": "human", "value": "Add basic quick-n-dirty test for GitRef\n" }, { "from": "gpt", "value": "#!/usr/bin/php\n<?php\n\n/*\n * This file is part of the Git4P library.\n *\n * Copyright (c) 2015 Martijn van der Kleijn <martijn.niji@gmail.com>\n * Licensed under the MIT license <http://open...
php
chosen
[ { "from": "human", "value": "Complete fixing of improperly named tf2 in db\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nuse Pterodactyl\\Models\\ServiceOption...
php
chosen
[ { "from": "system", "value": "Remove extra forward slash after navbar home_url()\n" }, { "from": "human", "value": "<header class=\"banner navbar navbar-default navbar-static-top\" role=\"banner\">\n <div class=\"container\">\n <div class=\"navbar-header\">\n <button type=\"button\" cla...
php
chosen
[ { "from": "human", "value": "Add user column to the events table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddUserColumnToEventsTable extends Migration\n{\n /**\n * Run the migrations.\...
php
chosen
[ { "from": "human", "value": "Add the main class template\n" }, { "from": "gpt", "value": "<{{'?'}}php namespace {{$namespace}};\n\n/**\n * Main workflow class.\n *\n@if($author)\n * @author\t{{$author}}\n@endif\n */\nclass {{$name}} implements {{$name}}Interface\n{\n\n\t/**\n\t * Trigger the wor...
php
chosen
[ { "from": "human", "value": "Create a translation group VO\n" }, { "from": "gpt", "value": "<?php namespace Modules\\Translation\\ValueObjects;\n\nclass TranslationGroup\n{\n /**\n * @var array\n */\n private $translations;\n\n public function __construct(array $translations)\n ...
php
chosen
[ { "from": "human", "value": "[TASK] Move archive search date range VO into domain\n" }, { "from": "gpt", "value": "<?php\nnamespace DreadLabs\\VantomasWebsite\\Archive;\n\nclass SearchDateRange {\n\n\t/**\n\t *\n\t * @var \\DateTime\n\t */\n\tprotected $startDate;\n\n\t/**\n\t *\n\t * @var \\Dat...
php
chosen
[ { "from": "human", "value": "Add form for new manager name\n" }, { "from": "gpt", "value": "<?php\n\nnamespace InsaLan\\TournamentBundle\\Form;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component\\OptionsResolver\\OptionsRes...
php
chosen
[ { "from": "human", "value": "Make sure entry options are respected by ResourceTranslationsType\n" }, { "from": "gpt", "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 LICENSE\...
php
chosen
[ { "from": "human", "value": "Add class connection to the database with PDO\n" }, { "from": "gpt", "value": "<?php\nclass dbConnection{\n\npublic static function connectedDB(){\n try{\n\n $base = new PDO('mysql:host=localhost; dbname=FirstConnection','root','7lp3cqmfF4:13');\n //ec...
php
chosen
[ { "from": "human", "value": "[ENH] Add function to neatly display date + time ranges\n\ngit-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@56187 b456876b-0849-0410-b77d-98878d47e9d5\n" }, { "from": "gpt", "value": "<?php\n// (c) Copyright 2002-2013 by authors of the Tiki Wiki CMS Groupware Pro...
php
chosen
[ { "from": "human", "value": "Add Visibility trait (lost migration for Post)\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass UpdatePostsTableWithVisibilityFields extends Migration\n{\n /**\n *...
php
chosen
[ { "from": "human", "value": "Add a few tests for the users repository\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\Regis\\Infrastructure\\Repository;\n\nuse Doctrine\\Common\\Persistence\\ObjectRepository;\nuse Doctrine\\ORM\\EntityManagerInterface;\n\nuse Regis\\Domain\\Entity;\nu...
php
chosen
[ { "from": "human", "value": "Test using oxd-php library for adding new client and reading information about client.\n" }, { "from": "gpt", "value": "<p>Hello world user testing page...</p>\n<?php\nrequire_once '../Register_client.php';\nrequire_once '../Client_read.php';\n\n$client = new Registe...
php
chosen
[ { "from": "human", "value": "Add EventManager unit test code\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Core;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Prob\\Handler\\ParameterMap;\nuse JBZoo\\Event\\EventManager as ZooEventManager;\n\nclass EventManagerTest extends TestCase\n{\n pub...
php
chosen
[ { "from": "human", "value": "Add command to resend DearSanta email\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Console\\Commands;\n\nuse App\\Notifications\\DearSanta as DearSantaNotification;\nuse App\\Models\\DearSanta;\nuse DrawCrypt;\nuse Illuminate\\Console\\Command;\n\nclass S...
php
chosen
[ { "from": "human", "value": "Add additional field form type file.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Form\\Type;\n\nuse App\\Entity\\Framework\\AdditionalField;\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\C...
php
chosen
[ { "from": "human", "value": "Add Splatoon 2 version 4.3 data\n\nSigned-off-by: AIZAWA Hina <07c779d48779c322a7c5324109202f9012f7aebf@bouhime.com>\n" }, { "from": "gpt", "value": "<?php\n/**\n * @copyright Copyright (C) 2015-2018 AIZAWA Hina\n * @license https://github.com/fetus-hina/stat.ink/blo...
php
chosen
[ { "from": "human", "value": "Cover optimize step with tests\n" }, { "from": "gpt", "value": "<?php namespace Lanin\\Laravel\\SetupWizard\\Tests\\Commands\\Steps;\n\nuse Lanin\\Laravel\\SetupWizard\\Commands\\Setup;\nuse Lanin\\Laravel\\SetupWizard\\Commands\\Steps\\Optimize;\nuse Lanin\\Laravel\...
php
chosen
[ { "from": "system", "value": "Fix filter bug on empty value\n" }, { "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": "human", "value": "Add a class for mining genesis blocks.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Bitcoin\\Block;\n\n/**\n * Class GenesisMiningBlockHeader\n * @package Bitcoin\\Block\n */\nclass GenesisMiningBlockHeader extends BlockHeader\n{\n public function getBlockH...
php
chosen
[ { "from": "human", "value": "Create a session wrapper decorator for the HTTP kernel.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace FluxBB\\Web;\n\nuse Carbon\\Carbon;\nuse Illuminate\\Contracts\\Cookie\\QueueingFactory;\nuse Illuminate\\Session\\DatabaseSessionHandler;\nuse Illuminate\\Ses...
php
chosen
[ { "from": "system", "value": "Fix blackfire io PR warning\n" }, { "from": "human", "value": "<?php\n\nnamespace Phansible\\Roles;\n\nuse Phansible\\BaseRole;\n\nclass Blackfire extends BaseRole\n{\n protected $name = 'BlackFire';\n protected $slug = 'blackfire';\n protected $role = 'bla...
php
chosen
[ { "from": "human", "value": "AEIV-573: Update API REST and SOAP\n\nConflicts:\n\tsrc/Oro/Bundle/CalendarBundle/Form/EventListener/AttendeesSubscriber.php\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Oro\\Bundle\\CalendarBundle\\Form\\EventListener;\n\nuse Doctrine\\Common\\Persistence\\Ma...
php
chosen
[ { "from": "human", "value": "Add some tests for Shares\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Unit tests for citation handling\n * REQUIREMENTS: web server running as specified in phpunit.xml + Selenium\n *\n * PHP Version 5.5\n *\n * @author David P. Shorthouse <davidpshorthouse@gma...
php
chosen
[ { "from": "human", "value": "[FACTFINDER-80] Add product identifier source model\n" }, { "from": "gpt", "value": "<?php\nclass FACTFinder_Core_Model_System_Config_Source_Identifier\n{\n /**\n * Get possible identifiers as Option Array\n *\n * @return array\n */\n public fun...
php
chosen
[ { "from": "human", "value": "FEAUTRE: Enable the opening of the user and global configs\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * This file is part of the Statistical Classifier package.\n *\n * (c) Cam Spiers <camspiers@gmail.com>\n *\n * For the full copyright and license information, ...
php
chosen
[ { "from": "human", "value": "[TASK] Add command for key export\n" }, { "from": "gpt", "value": "<?php\nnamespace TYPO3\\SingleSignOn\\Client\\Command;\n\n/* *\n * This script belongs to the TYPO3 Flow package \"TYPO3.SingleSi...
php
chosen
[ { "from": "human", "value": "Use PHP script for namespacing\n" }, { "from": "gpt", "value": "<?php\n\n$path = __DIR__ . '/../src/DebugBar/Resources/vendor/font-awesome/css/font-awesome.min.css';\n$contents = file_get_contents($path);\n\nif (strpos($contents, 'PhpDebugbarFontAwesome') !== false )...
php
chosen
[ { "from": "human", "value": "Add default_transaction_type column to users table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddDefaultTransactionTypeCo...
php
chosen
[ { "from": "system", "value": "Use paragraphs instead of BRs\n" }, { "from": "human", "value": "@extends('layouts.default')\n\n@section('content')\n <h1>Admin Dashboard</h1>\n\n <h3>Support Tickets</h3>\n Open Tickets: {{ count($data['openTickets']) }} /\n In Progress Tickets: {{ coun...
php
chosen
[ { "from": "human", "value": "Test for nested directory and invalid directory names (to avoid permissive file system for testing).\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Orbt\\ResourceMirror\\Resource;\n\n/**\n * A resource that exists locally, i.e. not on the backend server.\n *\n *...
php
chosen
[ { "from": "human", "value": "Add the application file into the repo - not the final one, just a provisional one to get things working\n" }, { "from": "gpt", "value": "<?php\n\n$autoloader = require __DIR__ . '/../src/autoload.php';\n\nif (!$autoloader()) {\n die('uh-oh');\n}\n\n$app = new Str...
php
chosen
[ { "from": "human", "value": "Add API method to remind about birthdays\n\nPeople who turned 16 should be reminded that they could be\nSP members too.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * ROOD.Sendbirthdaysixteenmail API\n *\n * Sends a mail to all certain contacts on their x-th birth...
php
chosen
[ { "from": "human", "value": "Add new refresh token repository\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Laravel\\Passport;\n\nclass RefreshTokenRepository\n{\n /**\n * Creates a new refresh token.\n *\n * @param array $attributes\n * @return \\Laravel\\Passport\\Re...
php
chosen
[ { "from": "human", "value": "Add new service provider to inject new factory\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Benrowe\\Laravel\\Widgets;\n\nuse Arrilot\\Widgets\\ServiceProvider as BaseServiceProvider;\nuse Benrowe\\Laravel\\Widgets\\Factories\\WidgetFactory;\nuse Arrilot\\Widg...
php
chosen
[ { "from": "human", "value": "Add new page with events sidebar hard coded\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Template Name: Page with Event Sidebar\n */\n\n\nget_header();\n\n\nif (Bunyad::posts()->meta('featured_slider')):\nget_template_part('partial-sliders');\nendif;\n\n?>\n\n<d...
php
chosen
[ { "from": "human", "value": "Test for the one and only method in our permission model. Because.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Config;\n\nclass EntrustPermissionTest extends PHPUnit_Framework_TestCase\n{\n public function tearDown()\n {\n ...
php
chosen
[ { "from": "human", "value": "Add <small> element rendering support\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Chromabits\\Nucleus\\View\\Common;\n\nuse Chromabits\\Nucleus\\View\\Interfaces\\Renderable;\nuse Chromabits\\Nucleus\\View\\Node;\n\n/**\n * Class Small\n *\n * @author Eduardo...
php
chosen
[ { "from": "human", "value": "Use constant for transition names\n" }, { "from": "gpt", "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 LICENSE\n * file that was distributed wi...
php
chosen
[ { "from": "human", "value": "Add some tests for the Tokenizer\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Metroplex\\Edifact\\Tests;\n\nuse Metroplex\\Edifact\\Token;\nuse Metroplex\\Edifact\\Tokenizer;\n\nclass TokenizerTest extends \\PHPUnit_Framework_TestCase\n{\n protected $tokeni...
php
chosen
[ { "from": "human", "value": "Test code - very primitive code\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once \"GoogleSpreadsheets.php\";\n\n$gs = new GoogleSpreadsheets();\n// $gs->login(\"email@gmail.com\", \"\");\n$gs->setAuth(\"auth key\");\n$gs->key = \"spreadsheetkey\";\n$gs->ws = \"...
php
chosen
[ { "from": "human", "value": "Add plugin to enable loopback.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Plugin Name: E2E Enable Loopback\n * Description: Plugin to filter http requests to remove the port.\n *\n * @package Google\\Site_Kit\n * @copyright 2020 Google LLC\n * @license https...
php
chosen
[ { "from": "human", "value": "Add snippet for requiring first and last name\n" }, { "from": "gpt", "value": "<?php\n/**\n * Make first and last name required fields during registration and profile edit.\n */\n\n/**\n * Require first and last names during registration\n *\n * @param array $posted ...
php
chosen
[ { "from": "human", "value": "Add tests on the ContainerBag\n\n" }, { "from": "gpt", "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 * file that ...
php
chosen
[ { "from": "human", "value": "Add a new logger class that logs all messages to standard error.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace SimpleSAML\\Logger;\n\n/**\n * A logging handler that outputs all messages to standard error.\n *\n * @author Jaime Perez Crespo, UNINETT AS <jaime.pe...
php
chosen
[ { "from": "human", "value": "Add a command to sync the files with db values\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Console\\Command;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\n\nclass SyncCrontab extends Comma...
php
chosen
[ { "from": "human", "value": "Create admin user from CLI command added\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Console\\Commands;\n\nuse Illuminate\\Console\\Command;\n\nclass USerCommand extends Command\n{\n /**\n * The name and signature of the console command.\n *\n...
php
chosen
[ { "from": "human", "value": "Add a exception in contentinum components tools package" }, { "from": "gpt", "value": "<?php\n/**\n * contentinum - accessibility websites\n *\n * LICENSE\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMP...
php
chosen
[ { "from": "human", "value": "Add a new container object, a subclass of SwatDisclosure that looks like a SwatFrame.\n\n\nsvn commit r13487\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once 'Swat/SwatDisclosure.php';\nrequire_once 'Swat/SwatHtmlTag.php';\nrequire_once 'YUI/YUI.php';\n\n/**\n ...
php
chosen
[ { "from": "human", "value": "Add a simple test for the PCRETokenizer\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Kibo\\Phast\\Parsing\\HTML;\n\n\nuse Kibo\\Phast\\Parsing\\HTML\\HTMLStreamElements\\ClosingTag;\nuse Kibo\\Phast\\Parsing\\HTML\\HTMLStreamElements\\Element;\nuse Kibo\\Phast...
php
chosen
[ { "from": "human", "value": "Add simple HTTP client as example\n" }, { "from": "gpt", "value": "<?php // basic (and dumb) HTTP client\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\n// This is a very simple HTTP client that just prints the response without parsing.\n\nuse Amp\\ByteStream\\Res...
php
chosen
[ { "from": "human", "value": "Add new unit test to check the casting feature of HttpRequest\n" }, { "from": "gpt", "value": "<?php\n/**\n * @author Pierre-Henry Soria <hello@ph7cms.com>\n * @copyright (c) 2017-2018, Pierre-Henry Soria. All Rights Reserved.\n * @license G...
php
chosen
[ { "from": "human", "value": "Fix grouped campaign display with new page container.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Generates minimal site-wide page chrome.\n * @see https://drupal.org/node/1728148\n **/\n\n?>\n\n<?php if (!empty($tabs['#primary'])): ?><nav class=\"admin--tabs\"...
php
chosen
[ { "from": "human", "value": "Add new adminarea auth layout\n" }, { "from": "gpt", "value": "<!doctype html>\n<html lang=\"{{ config('app.locale') }}\">\n<head>\n <meta charset=\"utf-8\" />\n <title>@yield('title', config('app.name'))</title>\n\n {{-- Meta Data --}}\n @include('cortex...
php
chosen
[ { "from": "human", "value": "Add features enumeration to use instead of associative keys in the configuration\n" }, { "from": "gpt", "value": "<?php\n/**\n * Go! AOP framework\n *\n * @copyright Copyright 2014, Lisachenko Alexander <lisachenko.it@gmail.com>\n *\n * This source file is subject to...
php
chosen
[ { "from": "human", "value": "Add a few tests for the PragmaParser class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Rusty\\Tests;\n\nuse Rusty\\PragmaParser;\n\nclass PragmaParserTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n * @dataProvider inputProvider\n */\n publi...
php
chosen
[ { "from": "human", "value": "Add a sample application for the webfonts API.\n\n\ngit-svn-id: 6c6eb0d3cc6e8d5f6d3a0c71e6b3abc7e9845ff1@332 6c5fc399-1a2c-022f-82ce-feb0d0b4916c\n" }, { "from": "gpt", "value": "<?php\nrequire_once '../../src/apiClient.php';\nrequire_once '../../src/contrib/apiWebfo...
php
chosen
[ { "from": "human", "value": "Add tests for Google Fonts preconnect\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AmpProject\\Optimizer\\Transformer;\n\nuse AmpProject\\Dom\\Document;\nuse AmpProject\\Optimizer\\Error;\nuse AmpProject\\Optimizer\\ErrorCollection;\nuse AmpProject\\Tests\\Err...
php
chosen
[ { "from": "human", "value": "Add abstract command class to regroup common class members\n" }, { "from": "gpt", "value": "<?php\nnamespace Hipay\\SilexIntegration\\Command;\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse Symfony\\Component\\Console\\Command\\Command;\n\n/**\n * File AbstractComm...
php
chosen
[ { "from": "human", "value": "Add example page for link 3\n" }, { "from": "gpt", "value": "<?php \n$currentPage = \"link_3\";\nrequire_once(\"config.php\"); \n?>\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\" />\n <meta http-equiv=\"x-ua-compatible\" content=\"ie=edg...
php
chosen
[ { "from": "human", "value": "Add escaper implementation for Doctrine DBAL\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Mdd\\QueryBuilder\\Escapers;\n\nuse Mdd\\QueryBuilder\\Escaper;\nuse Doctrine\\DBAL\\Driver\\Connection;\n\nclass DoctrineDbalAdapter implements Escaper\n{\n private\n...
php
chosen
[ { "from": "human", "value": "Add unit tests to AmCharts\\Chart\\Axis\\Value class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AmCharts\\Chart\\Axis;\n\nclass ValueTest extends \\PHPUnit_Framework_TestCase\n{ \n /**\n * @var Value\n */\n protected $axis;\n \n public ...
php
chosen
[ { "from": "human", "value": "chore: Add Sigma Scheduled Queries API\n\nSigned-off-by: Bruno Gaspar <367518169777ee9ae71cfcee56304a59ac5423c1@gmail.com>\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Part of the Stripe package.\n *\n * NOTICE OF LICENSE\n *\n * Licensed under the 3-clause BSD ...
php
chosen
[ { "from": "human", "value": "Add Curl custom exception class\n" }, { "from": "gpt", "value": "<?php\n\nclass CurlException extends Exception {\n \n private $curl_headers;\n\n public function __construct($message, $code = 0, Exception $previous = null, $headers = null) {\n parent::__constru...
php
chosen
[ { "from": "human", "value": "ISSUE-119: Add Generate Route integration test\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Pulsestorm\\Pestle\\TestsIntegration;\n\nrequire_once 'PestleTestIntegration.php';\n\nclass GenerateRouteTest extends PestleTestIntegration\n{\n const COMMAND = 'gen...
php
chosen
[ { "from": "human", "value": "Add tests for new boolean assertions\n" }, { "from": "gpt", "value": "<?php\n\nuse Phillip\\Assertion;\nuse Phillip\\Exceptions\\AssertionFailureException;\n\n/*\n * Test `boolean()` method.\n */\ntest('Test boolean with true', function ($t) {\n $t->is(true)->bool...
php
chosen
[ { "from": "human", "value": "Update news table. Add preview column.\n" }, { "from": "gpt", "value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m150406_135109_update_news_table_add_preview_column extends Migration\n{\n private $_table = 'news';\n\n public function up()...
php
chosen
[ { "from": "human", "value": "Work towards new promote page\n" }, { "from": "gpt", "value": "<div class=\"page-header\">\n\t<h1>Promote ownCloud</h1>\n</div>\n<p>Help spread the word about ownCloud. Tell your friends about your experience.</p>\n<div class=\"row\">\n\t<div style=\"text-align: cent...
php
chosen
[ { "from": "human", "value": "Add unit test for SVGRenderer::render\n" }, { "from": "gpt", "value": "<?php\n\nuse SVG\\Rasterization\\Renderers\\SVGRenderer;\n\n/**\n * @SuppressWarnings(PHPMD)\n */\nclass SVGRendererTest extends PHPUnit_Framework_TestCase\n{\n public function testRender()\n ...
php
chosen
[ { "from": "human", "value": "Remove a portion of the array and replace it with something else\n" }, { "from": "gpt", "value": "\n<?php\n$input = array(\"red\", \"green\", \"blue\", \"yellow\");\narray_splice($input, 2);\n// $input is now array(\"red\", \"green\")\n\n$input = array(\"red\", \"gre...
php
chosen
[ { "from": "human", "value": "Add rudimentary functionality to create legislators menu\n\nToward #296, this is really basic functionality that will create the legislators menu. It's not grouping alphabetically (that's going to require some thinking), but it's a start.\n" }, { "from": "gpt", "valu...
php
chosen
[ { "from": "human", "value": "Create a bootstrap 4 configurable navbar.\n" }, { "from": "gpt", "value": "<nav class=\"navbar navbar-toggleable-md navbar-inverse fixed-top bg-inverse\">\n <button class=\"navbar-toggler navbar-toggler-right\" type=\"button\" data-toggle=\"collapse\" data-target=...
php
chosen
[ { "from": "human", "value": "Add test for large amounts of data\n" }, { "from": "gpt", "value": "<?php\n\nuse Doctrine\\DBAL\\Configuration;\nuse Doctrine\\Common\\EventManager;\nuse Doctrine\\DBAL\\Driver\\PDOMySql\\Driver;\nuse Pharako\\DBAL\\Connection;\n\nclass LargeDataCest\n{\n public f...
php
chosen
[ { "from": "human", "value": "Add interface for retrieval of code activity data (for drawing graphs)\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once 'activity_data_source.php';\n\n$db = init_db();\n\n$team_ids = isset($_GET['team_id']) ? csv_to_string_array($_GET['team_id']) : array();\n$p...
php
chosen
[ { "from": "system", "value": "Change the interface to allow \"getFileExtension\" to return either a string or an array." }, { "from": "human", "value": "<?php\n\nnamespace ServerGrove\\Bundle\\TranslationEditorBundle\\Translation\\Exporter;\n\nuse Doctrine\\Common\\Collections\\ArrayCollection;\...
php
chosen
[ { "from": "human", "value": "Add test for resource mirror.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Orbt\\ResourceMirror\\Tests;\n\nuse Orbt\\ResourceMirror\\ResourceMirror;\nuse Symfony\\Component\\EventDispatcher\\EventDispatcher;\n\nclass ResourceMirrorTest extends \\PHPUnit_Framew...
php
chosen
[ { "from": "human", "value": "Add examples for the get_series call\n" }, { "from": "gpt", "value": "<?php\n\nrequire('./tempodb.php');\ndate_default_timezone_set(\"America/Chicago\");\n\n$tdb = new TempoDB(\"api-key\", \"api-secret\");\n\n$result = $tdb->get_series();\nvar_dump($result);\n\n?>\n"...
php
chosen
[ { "from": "human", "value": "Add basic test class for CostScheme model.\n" }, { "from": "gpt", "value": "<?php\nnamespace Sil\\DevPortal\\tests\\unit;\n\nclass CostSchemeTest extends \\CDbTestCase\n{\n public $fixtures = array(\n 'costSchemes' => 'CostScheme',\n );\n \n public...
php
chosen
[ { "from": "human", "value": "Complete every function unit tests.\n" }, { "from": "gpt", "value": "<?php\n\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for every Mimic library function.\n *\n * @since 0.1.0\n */\nclass EveryFuncTest extends PHPUnit_Framework_TestCase {\n\tpublic function dat...
php
chosen
[ { "from": "human", "value": "Add tool to generate Acls programatically\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Croogo\\Acl;\n\nuse Acl\\AclExtras;\nuse Cake\\Database\\Exception;\nuse Cake\\Datasource\\ConnectionInterface;\nuse Cake\\ORM\\TableRegistry;\nuse Croogo\\Core\\Plugin;\n\n...
php
chosen
[ { "from": "human", "value": "Add default value for `representative_approved` column.\n\nA default column was missing what resulted in a service which could\nnot be saves because a validation error occurred and was not visible\nif you tried to save the service with type=institute.\n" }, { "from": "gp...
php
chosen
[ { "from": "human", "value": "Add a listener to guarantee initialized AuthenticationState\n" }, { "from": "gpt", "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...
php
chosen
[ { "from": "human", "value": "Add slot ID column to worlds table.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass AddSlotIdToWorldsTable extends Migration\n...
php
chosen
[ { "from": "human", "value": "Add system utility (password generator)\n" }, { "from": "gpt", "value": "<?php\nnamespace Mapbender\\DigitizerBundle\\Utils;\n\n/**\n * Class System\n *\n * @package Mapbender\\DigitizerBundle\\Utils\n * @author Andriy Oblivantsev <eslider@gmail.com>\n */\nclass Sys...
php
chosen
[ { "from": "human", "value": "Add Drupal 7 Field API snippets\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Drupal 7 - Field API snippets\n * \n * Sources :\n * http://www.computerminds.co.uk/articles/rendering-drupal-7-fields-right-way\n * http://stackoverflow.com/questions/11694770/pri...
php
chosen
[ { "from": "system", "value": "Remove the urlencode, it was breaking things.\n" }, { "from": "human", "value": "<?php\n\n$template->assign('PageTopic','Space Merchant Realms Chat Room Rules');\n\n$autoChannels = '#SMR';\nif($player->hasAlliance()) {\n\t$allianceChan = $player->getAlliance()->getI...
php
chosen
[ { "from": "human", "value": "Add E2E proxy auth utility plugin.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Plugin Name: E2E Tests Proxy Auth Plugin\n * Plugin URI: https://github.com/google/site-kit-wp\n * Description: Utility plugin for bypassing set up and authentication during E2E tests...
php
chosen
[ { "from": "human", "value": "Add example which removes any control codes from input" }, { "from": "gpt", "value": "<?php\n\n// this simple example reads from STDIN, removes ALL codes and then prints to STDOUT.\n// you can run this example and notice that special keys will be filtered out:\n// $ ...
php
chosen
[ { "from": "human", "value": "Remove location and add ipaddress instead\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Fuel\\Migrations;\n\nclass Alter_reports\n{\n public function up()\n {\n \\DBUtil::drop_fields('reports', array(\n 'location'\n ));\n\n ...
php
chosen
[ { "from": "human", "value": "Test coverage for clean command.\n\nSigned-off-by: Jason Lewis <b136be6b8ecc2c62ceb9857ec62bf85489a45e0c@gmail.com>\n" }, { "from": "gpt", "value": "<?php\n\nuse Mockery as m;\nuse Basset\\Console\\CleanCommand;\n\nclass CleanCommandTest extends PHPUnit_Framework_Tes...
php
chosen
[ { "from": "human", "value": "Add tests for the new OOD\n" }, { "from": "gpt", "value": "<?php\n\nrequire \"Student.php\";\nrequire \"OCCPortal.php\";\n\n$myOCC = new OCCPortal();\n$student = new Student($myOCC);\n$student->setUsername('username');\n$student->setPassword('password');\n$transcript...
php
chosen
[ { "from": "human", "value": "Add new rule for method naming in tests\n" }, { "from": "gpt", "value": "<?php\n\nnamespace MS\\PHPMD\\Rule\\Test;\n\nuse PHPMD\\AbstractNode;\nuse PHPMD\\Node\\ClassNode;\n\n/**\n * Class MethodNameUnderstandable\n *\n * The method names in your test should describe...
php
chosen
[ { "from": "human", "value": "Add a service for interacting with Packagist.\n" }, { "from": "gpt", "value": "<?php\n\nuse Composer\\Factory;\nuse Composer\\IO\\NullIO;\nuse Composer\\Package\\Loader\\ArrayLoader;\nuse Composer\\Repository\\ComposerRepository;\nuse Guzzle\\Http\\Client;\n\n/**\n *...
php
chosen
[ { "from": "human", "value": "Add container loader for Symfony2 service container\n" }, { "from": "gpt", "value": "<?php\n/*\n * Copyright (c) 2011 \n * Kirill chEbba Cheunin <iam@chebba.org>\n *\n * This source file is subject to the MIT license that is bundled\n * with this package in the file ...
php
chosen