conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add an (unsupported) sample application for the Google Contacts API.\n\n" }, { "from": "gpt", "value": "<?php\n/*\n * Copyright 2012 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in complian...
php
chosen
[ { "from": "human", "value": "Define entity for user permissions\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AppBundle\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n\n/**\n * @ORM\\Entity\n * @ORM\\Table(name=\"permissions\", uniqueConstraints={@ORM\\UniqueConstraint(name=\"db_name_un...
php
chosen
[ { "from": "human", "value": "Add unit tests for Liizi Payment Link\n" }, { "from": "gpt", "value": "<?php\n\nnamespace RKD\\BanklinkTests;\n\n/**\n * Test suite for Liizi banklink.\n *\n * @author Rene Korss <rene.korss@gmail.com>\n */\nclass LiiziTest extends SEBTest\n{\n protected $bankCla...
php
chosen
[ { "from": "human", "value": "Fix issue with TableNode when using Helper\n" }, { "from": "gpt", "value": "<?php\nnamespace Helper;\n\nuse Behat\\Gherkin\\Node\\TableNode;\nuse Codeception\\Util\\Fixtures;\n\nclass Acceptance extends \\Codeception\\Module\n{\n /**\n * @When /I have (paramet...
php
chosen
[ { "from": "human", "value": "Add ground overlay helper tests\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Ivory\\GoogleMapBundle\\Tests\\Templating\\Helper;\n\nuse Ivory\\GoogleMapBundle\\Templating\\Helper\\Overlays\\GroundOverlayHelper;\nuse Ivory\\GoogleMapBundle\\Templating\\Helper\\B...
php
chosen
[ { "from": "human", "value": "Add controller for project routes\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: s216121\n * Date: 12.10.16\n * Time: 09:34\n */\n\nnamespace AppBundle\\Controller;\n\n\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Bu...
php
chosen
[ { "from": "human", "value": "Implement Aura package types: package and include\n" }, { "from": "gpt", "value": "<?php\nnamespace Composer\\Installers;\n\nclass AuraInstaller extends BaseInstaller\n{\n protected $locations = array(\n 'package' => 'package/{$name}/',\n 'include...
php
chosen
[ { "from": "human", "value": ":sparkles: Add new factory class to create OAuth1.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Risan\\OAuth1;\n\nuse Risan\\OAuth1\\Request\\RequestConfigFactory;\nuse Risan\\OAuth1\\Credentials\\CredentialsFactory;\n\nclass OAuth1Factory\n{\n /**\n * ...
php
chosen
[ { "from": "human", "value": "Add new shorthand static methods to access to the current application\n" }, { "from": "gpt", "value": "<?php\n\n/* This file is part of the Staq project, which is under MIT license */\n\n\nnamespace Staq;\n\nabstract class Application {\n\n\n\n\t/********************...
php
chosen
[ { "from": "human", "value": "Add backend code to return the last edited node the same skeleton as a treenode\n" }, { "from": "gpt", "value": "<?php\n\ninclude_once( 'errors.inc.php' );\ninclude_once( 'db.pg.class.php' );\ninclude_once( 'session.class.php' );\ninclude_once( 'tools.inc.php' );\nin...
php
chosen
[ { "from": "human", "value": "Add a user index on the participants table\n\nSigned-off-by: Joas Schilling <ab43a7c9cb5b2380afc4ddf8b3e2583169b39a02@schilljs.com>\n" }, { "from": "gpt", "value": "<?php\ndeclare(strict_types=1);\n/**\n * @copyright Copyright (c) 2020, Joas Schilling <coding@schillj...
php
chosen
[ { "from": "human", "value": "Add migration for contest submission changes.\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddVisibleToContests extends Migration\n{\n /**\n * Run the migratio...
php
chosen
[ { "from": "human", "value": "Prepare migration inserting record_status columns\n\nAffected tables: assessments, assessmemnts_history, characters,\ndevelopers\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Ill...
php
chosen
[ { "from": "human", "value": "Create migration for previous_password table.\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass CreatePreviousPasswordTable extends AbstractMigration\n{\n public function change()\n {\n $table = $this->table('pre...
php
chosen
[ { "from": "human", "value": "Prepare seeder to update developer names\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Seeder;\nuse Illuminate\\Database\\Eloquent\\Model;\n\nuse App\\Developer;\n\nclass UpdateDeveloperName extends Seeder\n{\n /**\n * Run the database se...
php
chosen
[ { "from": "human", "value": "Add locale detection for testing.\n" }, { "from": "gpt", "value": "<?php\n/** \n * @license http://opensource.org/licenses/MIT MIT\n */\n\n\n// The locale on `setlocale()` function may accepted different value depend on PHP version.\n// Read more at https://stackover...
php
chosen
[ { "from": "human", "value": "Add configurations for pre-existing institutions using migrations\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Surfnet\\StepupMiddleware\\Migrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL\\Schema\\Schema;\nuse Rhumsaa\\Uuid\...
php
chosen
[ { "from": "system", "value": "Fix for PHP < 5 error " }, { "from": "human", "value": "<?php\n\n# let people know if they are running an unsupported version of PHP\nif(phpversion() < 5) {\n\techo '<h3>Stacey requires PHP/5.0 or higher.<br>You are currently running PHP/\".phpversion().\".</h3><p>Y...
php
chosen
[ { "from": "human", "value": "Add basic Clearboard configuration file\n" }, { "from": "gpt", "value": "<?php\n\nreturn [\n \n /*\n * Name of community.\n */\n 'sitename' => 'Clearboard',\n\n /*\n * Default theme to apply to visitors.\n */\n 'theme' => 'default'\n ...
php
chosen
[ { "from": "human", "value": "Add test for fetching swagger YAML\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Tests\\CoreBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\nclass ApiDocsControllerTest extends...
php
chosen
[ { "from": "human", "value": "Fix cascade deletetion of signed off wines\n\nFixes https://github.com/ChristophWurst/weinstein_server/issues/255\n\nSigned-off-by: Christoph Wurst <7abde52c298496fa169fb750f91f213a282142af@winzerhof-wurst.at>\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\...
php
chosen
[ { "from": "human", "value": "Add snippet for redirecting from restricted posts.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Plugin Name: Restrict Content Pro - Restrict from Restricted Posts\n * Description: Prevents unauthorized users from accessing restricted pages by redirecting them to a...
php
chosen
[ { "from": "human", "value": "Add small filter for filtering out other than .xml-files\n" }, { "from": "gpt", "value": "<?php\n\nnamespace PIKI\\MARCXML\\Iterator;\n\nuse FilterIterator;\n\nclass XmlFilter extends FilterIterator\n{\n public function accept() : bool\n {\n $current = p...
php
chosen
[ { "from": "human", "value": "Test the publish ack packet\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace BinSoul\\Test\\Net\\Mqtt\\Packet;\n\nuse BinSoul\\Net\\Mqtt\\Packet;\nuse BinSoul\\Net\\Mqtt\\Packet\\PublishAckPacket;\nuse BinSoul\\Net\\Mqtt\\PacketStream;\...
php
chosen
[ { "from": "human", "value": "Add an abstract service provider\n\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * @author TheHostingTool Group\n * @version 2.0.0\n * @package thehostingtool/core\n * @license MIT\n */\n\nnamespace TheHostingTool\\Kernel;\n\nuse Illuminate\\Support\\Servi...
php
chosen
[ { "from": "human", "value": "Add tests with 100% coverage for new Algorithm\\Loop" }, { "from": "gpt", "value": "<?php\n\nuse Fhaculty\\Graph\\Algorithm\\Loop as AlgorithmLoop;\nuse Fhaculty\\Graph\\Graph;\n\nclass LoopTest extends TestCase\n{\n public function testGraphEmpty()\n {\n ...
php
chosen
[ { "from": "human", "value": "Add example for upload field\n" }, { "from": "gpt", "value": "<?php\nclass Doc_Example_Upload extends Doc_Example {\n\tfunction init(){\n\t\tparent::init();\n\n\t\t$this->add('H2')->set('File Uploading');\n\t\t$this->add('P')->set('File management in PHP is often mes...
php
chosen
[ { "from": "human", "value": "Add basic unit test for memory usage.\n" }, { "from": "gpt", "value": "<?php\n/*\n * This file is part of the QuipXml package.\n *\n * (c) Greg Payne\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with th...
php
chosen
[ { "from": "human", "value": "Add class to add websiteSettings during plugin installation\n" }, { "from": "gpt", "value": "<?php\n/**\n * @copyright Copyright (c) 2017 Studio Emma. (http://www.studioemma.com)\n */\n\n\nnamespace PluginInstallationStep\\Installation;\n\n\nuse Pimcore\\Cache;\nuse ...
php
chosen
[ { "from": "human", "value": "Add a mocked GitHub repository to streamline testing\n" }, { "from": "gpt", "value": "<?php declare(strict_types=1);\n\nnamespace ins0\\GitHub;\n\nuse Generator;\n\n/**\n * Mocks responses from GitHub's API. Used for testing purposes only.\n */\nfinal class MockRepos...
php
chosen
[ { "from": "human", "value": "Change content_blocks column in records table to longtext type\n" }, { "from": "gpt", "value": "<?php namespace JanVince\\SmallRecords\\Updates;\r\n\r\nuse Schema;\r\nuse October\\Rain\\Database\\Updates\\Migration;\r\n\r\nclass SmallRecordsTablesUpdate10 extends Mig...
php
chosen
[ { "from": "human", "value": "Add some basic unit tests for the Lang class\n" }, { "from": "gpt", "value": "<?php\n\nclass LangTest extends \\Codeception\\TestCase\\Test\n{\n\tpublic function testLang()\n\t{\n\t\t$ko = Rhymix\\Framework\\Lang::getInstance('ko');\n\t\t$en = Rhymix\\Framework\\Lang...
php
chosen
[ { "from": "human", "value": "Add step listener unit tests" }, { "from": "gpt", "value": "<?php\nnamespace Wizard;\n\nuse Zend\\Mvc\\MvcEvent;\nuse Zend\\Session\\Container as SessionContainer;\nuse Zend\\Session\\SessionManager;\nuse Zend\\Session\\Storage\\ArrayStorage as SessionStorage;\n\ncla...
php
chosen
[ { "from": "human", "value": "Add a sample application for the google affiliate network.\n\n\ngit-svn-id: 6c6eb0d3cc6e8d5f6d3a0c71e6b3abc7e9845ff1@294 6c5fc399-1a2c-022f-82ce-feb0d0b4916c\n" }, { "from": "gpt", "value": "<?php\n/*\n * Copyright 2011 Google Inc.\n *\n * Licensed under the Apache L...
php
chosen
[ { "from": "human", "value": "Add a simple plugin to experiment with auto-deployment process for production server github master changes. This plugin should be deactivated or removed once no longer needed for experimentation.\n" }, { "from": "gpt", "value": "<?php\n/*\nPlugin Name: JW Filter\nPlu...
php
chosen
[ { "from": "human", "value": "Move the handling of facebook into a separate class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Frontend\\Core\\Header;\n\nuse Common\\ModulesSettings;\nuse Frontend\\Core\\Engine\\Header;\nuse Frontend\\Core\\Engine\\Theme;\n\nfinal class Facebook\n{\n /*...
php
chosen
[ { "from": "human", "value": "Add a file with example usage\n" }, { "from": "gpt", "value": "<?php\n/*\n * The MIT License\n *\n * Copyright 2016 Jordi Jolink.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation fi...
php
chosen
[ { "from": "human", "value": "Add an interface for a Regexp action\n" }, { "from": "gpt", "value": "<?php\n\nnamespace SpreadsheetsReplacement\\Action\\Regexp;\n\nuse SpreadsheetsReplacement\\Action\\IAction;\n\n/**\n *\n * @author florian\n */\ninterface IRegexp extends IAction {\n\n /**\n ...
php
chosen
[ { "from": "human", "value": "Create ASF User Entity Manager\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of Artscore Studio Framework Package\n *\n * (c) 2012-2015 Artscore Studio <info@artscore-studio.fr>\n *\n * This source file is subject to the MIT Licence that is bundle...
php
chosen
[ { "from": "human", "value": "Add a test for the app repository model\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Regis\\AppContext\\Domain\\Model;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Regis\\AppContext\\Domain\\Model\\Repository;\n\nclass Repositor...
php
chosen
[ { "from": "human", "value": "Add test for Factory::create() to satisfy code coverage tester.\n" }, { "from": "gpt", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace ParagonIE\\EasyDB\\Tests;\n\nuse ParagonIE\\EasyDB\\{\n EasyDB,\n Factory\n};\nuse PHPUnit\\Framework\\TestCase;\n\n/**...
php
chosen
[ { "from": "human", "value": "Add migration for GroupActivity entity\n" }, { "from": "gpt", "value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m141222_063039_create_group_activity_table extends Migration\n{\n public function up()\n {\n $tableOptions = null;\n ...
php
chosen
[ { "from": "human", "value": "Create tests for AclFieldUpdate command\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AdobeConnectClient\\Tests\\Commands;\n\nuse AdobeConnectClient\\Commands\\AclFieldUpdate;\nuse AdobeConnectClient\\Parameter;\n\nclass AclFieldUpdateTest extends TestCommandBa...
php
chosen
[ { "from": "human", "value": "Add empty webservice class and change the error of the failing test\n" }, { "from": "gpt", "value": "<?php\n\nnamespace fennecweb\\ajax\\details;\n\nuse \\PDO as PDO;\n\n/**\n * Web Service.\n * Returns a project according to the project ID.\n */\nclass Project exten...
php
chosen
[ { "from": "human", "value": "Add upcoming event template for vanilla.\n\n" }, { "from": "gpt", "value": "<h4 class=\"upcoming-header\">Upcoming Events:</h4>\n<?php\n UNL_UCBCN::displayRegion($this->output);\n echo '<p id=\"feeds\">\n <a id=\"icsformat\" title=\"ics format for up...
php
chosen
[ { "from": "human", "value": "Add custom archive list for udstillere\n" }, { "from": "gpt", "value": "\n<?php // get_search_form(); ?>\n<?php\n echo '<ul class=\"udstiller__list row\">';\n while (have_posts()) : the_post();\n get_template_part('templates/content-udstiller', get_post_type());...
php
chosen
[ { "from": "human", "value": "Create Product Of Three Numbers\n" }, { "from": "gpt", "value": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <title>First Steps Into PHP</title>\n</head>\n\n<body>\n<form>\n X: <input type=\"text\" name=\"num1\" />\n Y: <input...
php
chosen
[ { "from": "human", "value": "Add class migration to create slugName in table cfg_binaries\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Data object containing the SQL and PHP code to migrate the database\n * up to version 1434022787.\n * Generated on 2015-06-11 13:39:47 by root\n */\nclass P...
php
chosen
[ { "from": "system", "value": "Add a slash after port number" }, { "from": "human", "value": "<?php namespace Illuminate\\Foundation\\Console;\n\nuse Illuminate\\Console\\Command;\nuse Symfony\\Component\\Console\\Input\\InputOption;\n\nclass ServeCommand extends Command {\n\n\t/**\n\t * The cons...
php
chosen
[ { "from": "human", "value": "Migrate: Implement our own 'sw_file_uri' process plugin to massively cleanup filenames on import.\n\n- Transliterate to fix special chars, other languages, and all non-ASCII\n- Strip punctuation + spaces other than '-' '_' and '.'\n- Consolidate chains of punctuation\n- Convert ...
php
chosen
[ { "from": "human", "value": "Add font awesome script setup tests\n" }, { "from": "gpt", "value": "<?php\ndeclare (strict_types = 1);\n\nnamespace GrottoPress\\Jentil\\Setups\\Scripts;\n\nuse Codeception\\Util\\Stub;\nuse GrottoPress\\Jentil\\AbstractTestCase;\nuse GrottoPress\\Jentil\\Utilities\...
php
chosen
[ { "from": "system", "value": "Add filter argument to filter aggregation.\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the ONGR package.\n *\n * (c) NFQ Technologies UAB <info@nfq.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * f...
php
chosen
[ { "from": "human", "value": "Make article title nullable (working as title deleted flag)\n\nremp/remp#514\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass M...
php
chosen
[ { "from": "human", "value": "Introduce adapter resolver strategy pattern\n" }, { "from": "gpt", "value": "<?php\nnamespace Application\\Service;\n\nuse Zend\\ServiceManager\\FactoryInterface;\nuse Zend\\ServiceManager\\ServiceLocatorInterface;\nuse ZendExtension\\Authentication\\OAuth2\\MockOAut...
php
chosen
[ { "from": "human", "value": "Add permissions to list event notification template by admin console users\n" }, { "from": "gpt", "value": "<?php\n/**\n * @package deployment\n * @subpackage falcon.roles_and_permissions\n * \n * Adds widevine plugin permissions\n * No need to re-run after server co...
php
chosen
[ { "from": "human", "value": "Add middlware for optimistic token refreshes.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace DoSomething\\Gateway\\Laravel\\Middleware;\n\nuse Closure;\nuse DoSomething\\Gateway\\Northstar;\n\nclass RefreshTokenMiddleware\n{\n /**\n * The Northstar API cl...
php
chosen
[ { "from": "human", "value": "Add common auth login language\n" }, { "from": "gpt", "value": "<?php\n/**\n * This <server-gardu-reporter> project created by :\n * Name : syafiq\n * Date / Time : 30 June 2017, 4:56 AM.\n * Email : syafiq.rezpector@gmail.com\n * Github : syafi...
php
chosen
[ { "from": "system", "value": "Fix componet build on iterator" }, { "from": "human", "value": "<!-- Notifications Menu -->\n<li class=\"dropdown notifications-menu\">\n <!-- Menu toggle button -->\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"fa fa-calendar...
php
chosen
[ { "from": "human", "value": "Add migration to get rid of unneeded shipping info table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\n\nclass DropShippingsTable extends Migration {\n\n\t/**\n\t * Run the mi...
php
chosen
[ { "from": "human", "value": "Implement quick-and-dirty test using real API connector.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * Tests for the Pickr model.\n *\n * @package\t\t\tPickr\n * @author \t\t\tStephen Lewis <stephen@experienceinternet.co.uk>\n * @copyright \t\tExperience Internet...
php
chosen
[ { "from": "human", "value": "Add migration for email notification templates\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateNotificationTemplatesTabl...
php
chosen
[ { "from": "human", "value": "Remove Skip Link action to fix AMP tests.\n" }, { "from": "gpt", "value": "<?php\n/**\n * Plugin Name: Disable Skip Link Script Tag in WP Footer\n *\n * @package Google\\Site_Kit\n * @copyright 2021 Google LLC\n * @license https://www.apache.org/licenses/LICENSE-...
php
chosen
[ { "from": "human", "value": "Add unit tests for Dirichlet PDF.\n" }, { "from": "gpt", "value": "<?php\nnamespace MathPHP\\Tests\\Probability\\Distribution\\Continuous\\Multivariate;\n\nuse MathPHP\\Probability\\Distribution\\Continuous\\Multivariate\\Dirichlet;\nuse MathPHP\\Exception;\n\nclass ...
php
chosen
[ { "from": "human", "value": "Add soft delete column to posts table\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddSoftDeleteColumnToPosts extends Migration\n{\n /**\n * Run the migrations...
php
chosen
[ { "from": "human", "value": "Create CSV report of all distribution-profile that require auth" }, { "from": "gpt", "value": "<?php\n/**\n * This script lists all distribution profiles and check if they have a valid authentication info\n */\n\n\nrequire_once(__DIR__.'/../bootstrap.php');\n\n$distr...
php
chosen
[ { "from": "human", "value": "Add Test case for AddressBookTest.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Zimbra\\Mail\\Tests\\Struct;\n\nuse Zimbra\\Mail\\Tests\\ZimbraMailTestCase;\nuse Zimbra\\Mail\\Struct\\AddressBookTest;\n\n/**\n * Testcase class for AddressBookTest.\n */\nclass ...
php
chosen
[ { "from": "human", "value": "Add fullName to the registration form type\n\n(extends FOS RegistrationType)\n" }, { "from": "gpt", "value": "<?php\n// eveg/UserBundle/Form/RegistrationType.php\n\nnamespace eveg\\UserBundle\\Form;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Compone...
php
chosen
[ { "from": "system", "value": "Refactor job prepare command tests\n" }, { "from": "human", "value": "<?php\n\nnamespace SimplyTestable\\ApiBundle\\Tests\\Command\\Job\\PrepareCommand;\n\nuse SimplyTestable\\ApiBundle\\Tests\\Command\\CommandTest as BaseCommandTest;\n\nclass CommandTest extends Ba...
php
chosen
[ { "from": "human", "value": "Add class to handle YAML import input file\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Bolt\\Database\\Migration\\Input;\n\nuse Bolt\\Database\\Migration\\Import;\nuse Symfony\\Component\\HttpFoundation\\File\\File;\nuse Symfony\\Component\\Yaml\\Exception\\P...
php
chosen
[ { "from": "human", "value": "Add object to SwatDB to represent database ranges.\n\nsvn commit r18109\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once 'Swat/SwatObject.php';\n\n/**\n * A single object to represent a database query range\n *\n * Objects of this class can be passed too and fr...
php
chosen
[ { "from": "human", "value": "Add the Google Custom Search sample application.\n" }, { "from": "gpt", "value": "<?php\n/*\n * Copyright 2011 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n...
php
chosen
[ { "from": "human", "value": "Add tests for the store events listener.\n" }, { "from": "gpt", "value": "<?php\n/**\n * PHP version 7.0\n *\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\nnamespace Ewallet\\SymfonyConsole\\Listeners;\n\nu...
php
chosen
[ { "from": "human", "value": "Fix name of login_type column\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Application\\Migrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generated Migration: Please modify to your needs!\n *...
php
chosen
[ { "from": "human", "value": "Add wowtransfer helper for UI\n" }, { "from": "gpt", "value": "<?php\n\nclass WowtransferUI extends Wowtransfer\n{\n\tprivate static $_cores = null;\n\tprivate static $_tconfigs = null;\n\n\t/**\n\t * @return array Associative array kind of 'id' => 'name'\n\t */\n\tp...
php
chosen
[ { "from": "human", "value": "Add a class with orders statuses\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Voronkovich\\SberbankAcquiring;\n\n/**\n * Order statuses.\n *\n * @author Oleg Voronkovich <oleg-voronkovich@yandex.ru>\n */\nclass OrderStatus\n{\n // An order was successfully ...
php
chosen
[ { "from": "human", "value": "Create tests for PermissionUpdate command\n" }, { "from": "gpt", "value": "<?php\r\n/**\r\n * Created by PhpStorm.\r\n * User: Bruno\r\n * Date: 04/03/2018\r\n * Time: 20:29\r\n */\r\n\r\nnamespace AdobeConnectClient\\Tests\\Commands;\r\n\r\nuse AdobeConnectClient\\C...
php
chosen
[ { "from": "system", "value": "[MIGRATION] Add table existence check as the table is renamed in 2.1\n" }, { "from": "human", "value": "<?php\n\nuse Hubzero\\Content\\Migration\\Base;\n\n/**\n * Migration script for replacing HUBADDRESS references in KB article\n **/\nclass Migration20151026173235...
php
chosen
[ { "from": "human", "value": "Add a hacky override for add_filter so we can test the Hooks trait\n" }, { "from": "gpt", "value": "<?php\n\nnamespace JPB\\WP\\Dev {\n\n\tfunction add_filter( $hook, $callback, $priority = 10, $argCount = 1 ) {\n\t\treturn \\add_filter( $hook, $callback, $priority, ...
php
chosen
[ { "from": "human", "value": "Add test with 100% coverage for new Algorithm\\Directed" }, { "from": "gpt", "value": "<?php\n\nuse Fhaculty\\Graph\\Algorithm\\Directed as AlgorithmDirected;\nuse Fhaculty\\Graph\\Graph;\n\nclass DirectedTest extends TestCase\n{\n public function testGraphEmpty()...
php
chosen
[ { "from": "human", "value": "Add bootstrap for use with tests\n" }, { "from": "gpt", "value": "<?php\n\nrequire_once 'lib/Proem/Loader/Autoloader.php';\n\nuse Proem\\Loader\\Autoloader;\n\n$loader = new AutoLoader();\n$loader->registerNamespaces([\n 'Proem\\\\Tests' => 'tests/lib',\n 'Pro...
php
chosen
[ { "from": "human", "value": "Move tests to each component\n" }, { "from": "gpt", "value": "<?php\n\nnamespace React\\Tests\\SocketClient;\n\nuse React\\EventLoop\\StreamSelectLoop;\nuse React\\Socket\\Server;\nuse React\\SocketClient\\Connector;\nuse React\\Tests\\Socket\\TestCase;\n\nclass Conn...
php
chosen
[ { "from": "human", "value": "[RPC] Add a RPC Server Processor\n" }, { "from": "gpt", "value": "<?php\nnamespace Swarrot\\Processor\\RPC;\n\nuse Psr\\Log\\LoggerInterface;\n\nuse Symfony\\Component\\OptionsResolver\\OptionsResolverInterface;\n\nuse Swarrot\\Broker\\Message;\nuse Swarrot\\Broker\\...
php
chosen
[ { "from": "system", "value": "Fix token setting on create new GaClient instance\n" }, { "from": "human", "value": "<?php\n/**\n * Yandex PHP Library\n *\n * @copyright NIX Solutions Ltd.\n * @link https://github.com/nixsolutions/yandex-php-library\n */\n\n/**\n * @namespace\n */\nnamespace Yande...
php
chosen
[ { "from": "human", "value": "Add tests for request method rule\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of Slim JSON Web Token Authentication middleware\n *\n * Copyright (c) 2015 Mika Tuupola\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licen...
php
chosen
[ { "from": "human", "value": "BB-10613: Check and fix/update tests\n- conflicts were resolved\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Oro\\Bundle\\AddressBundle\\Tests\\Unit\\Entity\\Stub;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\nuse Oro\\Bundle\\AddressBundle\\Entity\\AbstractAddress...
php
chosen
[ { "from": "human", "value": "Add test connection script for getting d2moddin games\n" }, { "from": "gpt", "value": "<?php\nrequire_once('../../../connections/parameters.php');\nrequire_once('../../../global_functions.php');\n\ntry {\n // connect\n $m = new MongoClient(\"mongodb://$d2moddin...
php
chosen
[ { "from": "human", "value": "Test coverage for factory manager.\n\nSigned-off-by: Jason Lewis <b136be6b8ecc2c62ceb9857ec62bf85489a45e0c@gmail.com>\n" }, { "from": "gpt", "value": "<?php\n\nuse Mockery as m;\nuse Basset\\Factory\\Manager;\n\nclass ManagerTest extends PHPUnit_Framework_TestCase {\...
php
chosen
[ { "from": "human", "value": "Add test to cover AbstractFacade\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Glenn\\Config\\Test\\Facade;\n\nuse PHPUnit_Framework_TestCase;\n\nuse ReflectionClass;\n\nuse Glenn\\Config\\Manager;\nuse Glenn\\Config\\Facade\\AbstractFacade;\n\nclass AbstractFa...
php
chosen
[ { "from": "human", "value": "Add service manager, empty drivers\n" }, { "from": "gpt", "value": "<?php namespace Nathanmac\\InstantMessenger;\n\nuse Illuminate\\Support\\Manager;\n\nclass ServiceManager extends Manager {\n\n\n public function createHipchatDriver()\n {\n\n }\n\n publi...
php
chosen
[ { "from": "human", "value": "Add test coverage for Itafroma\\Zork\\Oblist.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * @file\n * Tests for Itafroma\\Zork\\Oblist\n */\n\nnamespace Itafroma\\Zork\\Tests;\n\nuse Itafroma\\Zork\\Oblist;\n\nclass OblistTest extends ZorkTest\n{\n /**\n *...
php
chosen
[ { "from": "human", "value": "Add exception if image URL is not valid\n" }, { "from": "gpt", "value": "<?php\n/**\n * @author Pierre-Henry Soria <hello@ph7cms.com>\n * @copyright (c) 2017, Pierre-Henry Soria. All Rights Reserved.\n * @license GNU General Public License; ...
php
chosen
[ { "from": "human", "value": "Set up client that uses Guzzle 5.\n" }, { "from": "gpt", "value": "<?php\nnamespace Sil\\DevPortal\\components\\Http;\n\nuse \\GuzzleHttp\\Message\\Response as GuzzleResponse;\n\n/**\n * A simple wrapper class around Guzzle (version 5).\n */\nclass ClientG5 extends A...
php
chosen
[ { "from": "human", "value": "Add a method to handle mutlibyte ical wrapping\n" }, { "from": "gpt", "value": "<?php\nnamespace UNL\\UCBCN\\Frontend;\n\nclass Util\n{\n /**\n * Multibye safe splitting for ical as per rfc2445\n * \n * based on code from https://gist.github.com/hugowe...
php
chosen
[ { "from": "human", "value": "Move events definitions into proper components\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 d...
php
chosen
[ { "from": "human", "value": "Add events php for kwc_editable_events to delete cache if component changed\n" }, { "from": "gpt", "value": "<?php\nclass Kwc_Editable_Events extends Kwf_Component_Abstract_Events\n{\n public function getListeners()\n {\n $ret = parent::getListeners();\n...
php
chosen
[ { "from": "human", "value": "Implement PHP iterator based on the SSCAN command (Redis 2.8).\n\nThis iterator allows to perform full iterations over the members of a set\nby wrapping the incremental nature of SSCAN just like we did for SCAN:\n\n $client = new Predis\\Client('tcp://127.0.0.1', ['profile' => ...
php
chosen
[ { "from": "human", "value": "Fix errors of seccode component and add base tests for it\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\n/*\n * This file is part of the ************************ package.\n * _____________ _______________\n * ______/ ...
php
chosen
[ { "from": "human", "value": "Add a type of Response that allows us to run a callback.\n\nThis allows us to use the router even with old code that won't return an actual Response object, but perform a redirection or print directly to the standard output.\n" }, { "from": "gpt", "value": "<?php\n\n...
php
chosen
[ { "from": "human", "value": "Add front-end to get-api-key service.\n" }, { "from": "gpt", "value": "<?php\nif (isset($_REQUEST[\"email\"])) {\n $email = $_REQUEST[\"email\"];\n} else {\n $email = \"\";\n}\nif (isset($_REQUEST[\"otp\"])) {\n $otp = $_REQUEST[\"otp\"];\n} else {\n $otp = \"\";...
php
chosen
[ { "from": "human", "value": "Add transformation for applying ICC profiles\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of the Imbo package\n *\n * (c) Christer Edvartsen <cogo@starzinger.net>\n *\n * For the full copyright and license information, please view the LICENSE fil...
php
chosen