conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use __NAMESPACE__ because ::class won't work in php 5.3\n\nPatched version of #64\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of composer/semver.\n *\n * (c) Composer <https://github.com/composer>\n *\n * For the full copyright and license i...
php
chosen
[ { "from": "human", "value": "Convert Files array to normal list.\n" }, { "from": "gpt", "value": "<?php \nnamespace Universal\\Http;\n\nclass FilesParameter extends Parameter\n{\n public $hash;\n public $files;\n\n function __construct( $hash )\n {\n $files = array();\n ...
php
chosen
[ { "from": "human", "value": "Add a base Eloquent Repository\n" }, { "from": "gpt", "value": "<?php namespace Exolnet\\Database\\Eloquent;\n\nuse Exolnet\\Core\\Exceptions\\RepositoryException;\nuse Exolnet\\Database\\Repository\\Repository;\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass El...
php
chosen
[ { "from": "human", "value": "Add remember vote delayed command\n" }, { "from": "gpt", "value": "<?php \nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Command;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand;\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse...
php
chosen
[ { "from": "human", "value": "Add tests for TIM status\n" }, { "from": "gpt", "value": "<?php\n\nnamespace QCloudSDKTests\\TIM;\n\nuse GuzzleHttp\\Psr7\\Uri;\nuse QCloudSDK\\TIM\\Status;\nuse QCloudSDKTests\\TestCase;\n\nclass StatusTest extends TestCase\n{\n /**\n * @var Status\n */\n...
php
chosen
[ { "from": "human", "value": "Complete short function unit tests.\n" }, { "from": "gpt", "value": "<?php\n\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for short Mimic library function.\n *\n * @since 0.1.0\n *\n * @todo Need to use QuickTest library.\n */\nclass ShortFuncTest extends PHPUni...
php
chosen
[ { "from": "human", "value": "Add a RSVP deadline column 🕐 (todo: implement this)\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddRsvpDeadlineToApplicationsTable extends Migration\n{\n /**\n ...
php
chosen
[ { "from": "system", "value": "BAP-10985: Update the rules displaying autocomplete result for business unit owner field\n" }, { "from": "human", "value": "<?php\n\nnamespace Oro\\Bundle\\OrganizationBundle\\Autocomplete;\n\nuse Doctrine\\Bundle\\DoctrineBundle\\Registry;\n\nuse Oro\\Bundle\\FormB...
php
chosen
[ { "from": "human", "value": "[Tests] Add an abstract class for extensions tests\n" }, { "from": "gpt", "value": "<?php\nnamespace Bolt\\Tests\\Extensions;\n\nuse Bolt\\Tests\\BoltUnitTest;\nuse Symfony\\Component\\Filesystem\\Exception\\IOException;\nuse Symfony\\Component\\Filesystem\\Filesyste...
php
chosen
[ { "from": "human", "value": "Create Multiply Two N Number\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 N: <input type=\"text\" name=\"num1\" />\n M: <input ty...
php
chosen
[ { "from": "system", "value": "Use new middleware as discussed in chat.\n\nPreviousely, any user could update or delete any menu item. Permissions had no effect for api call." }, { "from": "human", "value": "<?php\n\n$router->post('menuitem/update', ['as' => 'api.menuitem.update', 'uses' => 'Menu...
php
chosen
[ { "from": "human", "value": "Add negative conditional keyword block\n" }, { "from": "gpt", "value": "<!--@@ If this value is empty, show this @@-->\n%begin_globals_site_metadata_jcu.site.logox^eq::1:%\n<h1>If statement passed</h1>\n%end_globals%\n" } ]
php
chosen
[ { "from": "human", "value": "Add the actual markdown service.\n" }, { "from": "gpt", "value": "<?php namespace App\\Services;\n\nclass Markdown {\n\n public function __construct()\n {\n\n }\n\n public function convertHtmlToMarkdown($html)\n {\n\n }\n\n public function conver...
php
chosen
[ { "from": "human", "value": "Update files, Alura, PHP e Orientação a Objetos, Aula 5\n" }, { "from": "gpt", "value": "<?php\nrequire \"classe/Produto.php\";\n\n$livro = new Produto;\n$livro->setNome(\"Livro da casa do codigo\");\n$livro->setPreco(10);\n\n$livro2 = new Produto;\n$livro2->setNome(...
php
chosen
[ { "from": "human", "value": "Create admin role with a seed.\n" }, { "from": "gpt", "value": "<?php\nclass RolesTableSeeder extends Seeder {\n /**\n * Seed the Roles table.\n *\n * @return void\n */\n public function run()\n {\n Role::truncate();\n Role::create(['name' => 'admin'...
php
chosen
[ { "from": "human", "value": "Add example for mysql unix socket.\n" }, { "from": "gpt", "value": "<?php\n\ngo(function(){\n $db = new Swoole\\Coroutine\\Mysql;\n $server = [\n 'host' => 'unix:/tmp/mysql.sock',\n 'user' => 'root',\n 'password' => 'root',\n ...
php
chosen
[ { "from": "human", "value": "Create test code to create call intercept method\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nuse PhpParser\\BuilderFactory;\n\nrequire dirname(__DIR__, 2) . '/vendor/autoload.php';\n\n$factory = new BuilderFactory();\n$voidCall = $factory->m...
php
chosen
[ { "from": "human", "value": "Add kits to db schema\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\nuse Phinx\\Db\\Adapter\\MysqlAdapter;\n\nclass AddKits extends AbstractMigration\n{\n public function change()\n {\n $table= $this->table('kit_item', ...
php
chosen
[ { "from": "human", "value": "Add a class outline for the library functions\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Bolt;\n\n/**\n * Class for Bolt's generic library functions\n *\n * @author Gawain Lynch <gawain.lynch@gmail.com>\n */\nclass Library\n{\n\n}" } ]
php
chosen
[ { "from": "human", "value": "Add a unit test for ActionButton\n" }, { "from": "gpt", "value": "<?php\nnamespace Dms\\Web\\Expressive\\Tests\\Unit\\Renderer\\Action;\n\nuse Dms\\Web\\Expressive\\Renderer\\Action\\ActionButton;\nuse PHPUnit\\Framework\\TestCase;\n\n/**\n * @author Hari KT <kthari8...
php
chosen
[ { "from": "human", "value": "Add base class for OpenSSL signature algorithms" }, { "from": "gpt", "value": "<?php\n\nnamespace JWX\\JWS\\Algorithm;\n\nuse JWX\\JWK\\Feature\\AsymmetricPrivateKey;\nuse JWX\\JWK\\Feature\\AsymmetricPublicKey;\nuse JWX\\JWS\\SignatureAlgorithm;\n\n\n/**\n * Base cl...
php
chosen
[ { "from": "system", "value": "Add tests for colorization and decolorization.\n" }, { "from": "human", "value": "<?php\n\nclass testsCli extends PHPUnit_Framework_TestCase {\n\n\tfunction test_string_length() {\n\t\t$this->assertEquals( \\cli\\Colors::length( 'x' ), 1 );\n\t}\n\n\tfunction test_e...
php
chosen
[ { "from": "human", "value": "Add read index to user notifications\n" }, { "from": "gpt", "value": "<?php\n\n// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.\n// See the LICENCE file in the repository root for full licence text.\n\nuse Illu...
php
chosen
[ { "from": "human", "value": "Add value object for status\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace CultuurNet\\UDB3\\Event\\ValueObjects;\n\nuse Broadway\\Serializer\\SerializableInterface;\nuse InvalidArgumentException;\n\nclass Status implements Serializab...
php
chosen
[ { "from": "human", "value": "Add parser for porter staemming algorithm\n" }, { "from": "gpt", "value": "<?php\n/**\n * \n * @author newloki\n */\n \nclass Parser_Stemmer_Porter_Parser extends Parser_Abstract implements Parser_Interface\n{\n\n /**\n * @var array\n * 'word' => 'format'\...
php
chosen
[ { "from": "human", "value": "Test sample for the framework class\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Scarlett\\Tests;\n\nuse Scarlett\\Framework;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException;\n \nclass Fr...
php
chosen
[ { "from": "human", "value": "Add test for wp core is-installed when WordPress is not installed\n" }, { "from": "gpt", "value": "<?php\nclass CoreTest extends PHPUnit_Framework_TestCase {\n public function testIsInstalledExitsWith1IfWordPressNotInstalled() {\n $temp_dir = self::create_t...
php
chosen
[ { "from": "human", "value": "Add func test for ItemView page\n" }, { "from": "gpt", "value": "<?php\n\nuse tests\\common\\TestCommon;\n\n$I = new FunctionalTester($scenario);\nTestCommon::logMeIn($I);\n\n$I->wantTo('ensure that view tem page works');\n\n$I->amOnPage('/item/1');\n$I->expectTo('se...
php
chosen
[ { "from": "human", "value": "iii-105: Add event bus extension with method to act on first publication of messages\n" }, { "from": "gpt", "value": "<?php\n/**\n * @file\n */\n\nnamespace CultuurNet\\UDB3;\n\n\nuse Broadway\\Domain\\DomainEventStream;\n\n/**\n * Class SimpleEventBus\n * @package C...
php
chosen
[ { "from": "human", "value": "Add some tests for OAuth endpoints.\n" }, { "from": "gpt", "value": "<?php\n\nuse Northstar\\Models\\Client;\nuse Northstar\\Models\\User;\n\nclass OAuthTest extends TestCase\n{\n /**\n * Test that the password grant rejects invalid credentials.\n */\n ...
php
chosen
[ { "from": "human", "value": "Add new DB driver: PDO\n" }, { "from": "gpt", "value": "<?php\n/*\n* MyUCP\n* File Version 4.0.0.1\n* Date: 15.07.2015\n* Developed by Maksa988\n*/\n\nfinal class pdoDriver {\n\tprivate $pdo;\n\tprivate $count = 0;\n\tpublic function __construct($hostname, $username,...
php
chosen
[ { "from": "human", "value": "Add new backend system experiments\n" }, { "from": "gpt", "value": "<?php\ninclude '../app/essentials.php';\n\n\nclass Backend {\n private $categories = array();\n\n public function __get($category) {\n if (!isset($categories[$category])) {\n $this->categor...
php
chosen
[ { "from": "human", "value": "[FEATURE] Add lowercase dashed formatting viewhelper\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the package bk2k/bootstrap-package.\n *\n * For the full copyright and license information, please read the\n * LICENSE file that was distribute...
php
chosen
[ { "from": "human", "value": "Add turn number on game structure\n" }, { "from": "gpt", "value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AddTurnNumberToGame extends AbstractMigration\n{\n /**\n * Change Method.\n *\n * Write your reversible migrations using this ...
php
chosen
[ { "from": "human", "value": "Add autoupdate capabilities to snapshoter.phar\n" }, { "from": "gpt", "value": "<?php\nnamespace Snapshoter\\Command;\n\nuse Herrera\\Phar\\Update\\Manager;\nuse Herrera\\Phar\\Update\\Manifest;\nuse Symfony\\Component\\Console\\Input\\InputInterface;\nuse Symfony\\C...
php
chosen
[ { "from": "human", "value": "Test asset: class with a protected method\n" }, { "from": "gpt", "value": "<?php\n/*\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES...
php
chosen
[ { "from": "human", "value": "Add a table to a section by passing it a two-dimensional array\n\nIs there a better way to do this? Can the table position be controlled?\n" }, { "from": "gpt", "value": "<?php\n/*\n\tTable.class.php\n\n\tCopyright© 2015 Rubicon Communications, LLC (Netgate)\n\tThis ...
php
chosen
[ { "from": "system", "value": "Replace password with more obvious example.\n" }, { "from": "human", "value": "<?php\n\trequire_once('IP2Country.php');\n\n\t$conf = array(\n\t 'db_server' => 'localhost',\n\t 'db_port' => 3306,\n\t 'db_name' => 'dnscheck',\n\t 'db_user' => 'dnscheck_web...
php
chosen
[ { "from": "human", "value": "Create new class for sharing projects\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: sonja\n * Date: 1/26/18\n * Time: 10:30 AM\n */\n\nnamespace AppBundle\\API\\Sharing;\n\n\nclass Projects\n{\n\n}" } ]
php
chosen
[ { "from": "human", "value": "Add a general utilities class\n" }, { "from": "gpt", "value": "<?php\n/**\n * Util_Rewrite class\n *\n * Contains rewrite utils\n *\n * @author Christophe Gosiau <christophe@tigron.be>\n * @author Gerry Demaret <gerry@tigron.be>\n */\n\nnamespace Skeleton\\Email;\n\n...
php
chosen
[ { "from": "human", "value": "Index page for registered users template\n" }, { "from": "gpt", "value": "@extends('layouts.app')\n\n@section('content')\n<div class=\"container\">\n <div class=\"row\">\n <div class=\"col-md-10 col-md-offset-1\">\n <div class=\"panel panel-defau...
php
chosen
[ { "from": "human", "value": "Test to check if half valid content type returns default\n" }, { "from": "gpt", "value": "<?php\n/**\n * Slim Framework (http://slimframework.com)\n *\n * @link https://github.com/slimphp/Slim\n * @copyright Copyright (c) 2011-2016 Josh Lockhart\n * @license h...
php
chosen
[ { "from": "human", "value": "Add entity-to-ID form data transformer.\n" }, { "from": "gpt", "value": "<?php\n/**\n * @author Igor Nikolaev <igor.sv.n@gmail.com>\n * @copyright Copyright (c) 2018, Darvin Studio\n * @link https://www.darvin-studio.ru\n *\n * For the full copyright and lice...
php
chosen
[ { "from": "human", "value": ":white_check_mark: Add test for trello provider.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Risan\\OAuth1\\Test\\Unit\\Provider;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Risan\\OAuth1\\Provider\\Trello;\nuse Risan\\OAuth1\\Signature\\HmacSha1Signer;\nuse Ri...
php
chosen
[ { "from": "human", "value": "Add missing change to eadfe8d\n" }, { "from": "gpt", "value": "<?php\n/**\n * digital-logsheets: A web-based application for tracking the playback of audio segments on a community radio station.\n * Copyright (C) 2015 Mike Dean\n * Copyright (C) 2015-2016 Evan Vass...
php
chosen
[ { "from": "human", "value": "Add PHPUnit tests for Stripe_AuthenticationError\n" }, { "from": "gpt", "value": "<?php\n\nclass Stripe_AuthenticationErrorTest extends Stripe_TestCase\n{\n public function testInvalidCredentials()\n {\n Stripe::setApiKey('invalid');\n try {\n Stripe_Cus...
php
chosen
[ { "from": "human", "value": "Add a test to validate $wgEchoNotifications\n\nChange-Id: I7c9f76f4222f692a2babf47618b869f4c963499f\n" }, { "from": "gpt", "value": "<?php\n\nclass NotificationStructureTest extends MediaWikiTestCase {\n\t/**\n\t * @coversNothing\n\t * @dataProvider provideNotificati...
php
chosen
[ { "from": "human", "value": "Add a standalone user context\n" }, { "from": "gpt", "value": "<?php\n\nnamespace JPB\\WpBehatExtension\\Context;\n\nuse Behat\\MinkExtension\\Context\\RawMinkContext;\n\nclass UserContext extends RawMinkContext {\n\n\tuse Traits\\UserContext;\n\n}\n" } ]
php
chosen
[ { "from": "system", "value": "[TASK] Remove correct addStaticFile function from extension scanner\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the package bk2k/bootstrap-package.\n *\n * For the full copyright and license information, please read the\n * LICENSE file t...
php
chosen
[ { "from": "human", "value": "Add security class which generate activationKey and password\n" }, { "from": "gpt", "value": "<?php\n/**\n * Kebab Framework\n *\n * LICENSE\n *\n * This source file is subject to the Dual Licensing Model that is bundled\n * with this package in the file LICENSE.txt...
php
chosen
[ { "from": "human", "value": "Add tests for Amqp Channel adapter\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Hodor\\MessageQueue\\Adapter\\Amqp;\n\nuse PHPUnit_Framework_TestCase;\n\nclass ChannelTest extends PHPUnit_Framework_TestCase\n{\n /**\n * @covers Hodor\\MessageQueue\\Adap...
php
chosen
[ { "from": "human", "value": "Create tests for the javascript\n" }, { "from": "gpt", "value": "<?php namespace spec\\CeesVanEgmond\\Minify\\Providers;\n\nuse PhpSpec\\ObjectBehavior;\nuse Prophecy\\Argument;\nuse org\\bovigo\\vfs\\vfsStream;\n\nclass JavaScriptSpec extends ObjectBehavior\n{\n ...
php
chosen
[ { "from": "system", "value": "Convert permission IDs into strings\n" }, { "from": "human", "value": "<?php namespace Flarum\\Core\\Groups;\n\nuse Flarum\\Core\\Model;\nuse Illuminate\\Database\\Eloquent\\Builder;\n\n/**\n * @todo document database columns with @property\n */\nclass Permission ex...
php
chosen
[ { "from": "human", "value": "Drop old LiquiBase migration tables\n\nLiquiBase was removed in f673f8a, but on some environments the tables\nwere never removed. This migration removes the tables if they exist.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace OpenConext\\EngineBlock\\Doctrine\\M...
php
chosen
[ { "from": "human", "value": "Add hydrator that (de)hydrates the object using getters/setters\n" }, { "from": "gpt", "value": "<?php\ndeclare(strict_types=1);\n\nnamespace Onion\\Framework\\Hydrator;\n\n/**\n * Hydrates and extracts objects using getters and setters\n */\ntrait MethodHydrator\n{\...
php
chosen
[ { "from": "human", "value": "Add new service provider to register install command\n" }, { "from": "gpt", "value": "<?php\nnamespace Laranix\\Installer;\n\nuse Illuminate\\Support\\ServiceProvider as BaseServiceProvider;\n\nclass ServiceProvider extends BaseServiceProvider\n{\n /**\n * Ind...
php
chosen
[ { "from": "human", "value": "Add backend for tag cloud\n" }, { "from": "gpt", "value": "<?php\r\nrequire_once '../includes/master.inc.php';\r\n\r\n$db = Database::getDatabase();\r\n$result = $db->getRows(\"select tags from search where 1=1\");\r\n\r\n$tags = array();\r\n\r\nforeach($result as $r...
php
chosen
[ { "from": "human", "value": "Add Chinese Traditional language file\n" }, { "from": "gpt", "value": "<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');\n/**\n* Name: Ion Auth Lang - Chinese Traditional\n* \n* Author: Bo-Yi Wu\n* \t\t appleboy.tw@gmail.com\n* @ta...
php
chosen
[ { "from": "system", "value": "Revert - Fix route parameters for a row action\n" }, { "from": "human", "value": "<?php\n\n/*\n * This file is part of the DataGridBundle.\n *\n * (c) Stanislav Turza <sorien@mail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n...
php
chosen
[ { "from": "human", "value": "Mark all as read button toegevoegd.\n" }, { "from": "gpt", "value": "<?php\r\nrequire_once \"lib/page/SpotPage_Abs.php\";\r\n\r\nclass SpotPage_markallasread extends SpotPage_Abs {\r\n\t\r\n\tfunction render() {\r\n\t\t$_SESSION['last_visit'] = time();\r\n\t\techo \"...
php
chosen
[ { "from": "human", "value": "Add middleware class that knows how to create chain of command.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Bernard;\n\n/**\n * Builder of middleware. Takes any number of Callables and handles\n * them as factories returning a new invokable.\n *\n * @package ...
php
chosen
[ { "from": "system", "value": "Add doc block for deprecation.\n" }, { "from": "human", "value": "<?php namespace Illuminate\\Pagination;\n\nuse Illuminate\\Http\\Request;\nuse Illuminate\\View\\Factory as ViewFactory;\nuse Symfony\\Component\\Translation\\TranslatorInterface;\n\nclass Environment...
php
chosen
[ { "from": "human", "value": "Add tests for author view setup\n" }, { "from": "gpt", "value": "<?php\ndeclare (strict_types = 1);\n\nnamespace GrottoPress\\Jentil\\Setups\\Views;\n\nuse Codeception\\Util\\Stub;\nuse GrottoPress\\Jentil\\AbstractTestCase;\nuse GrottoPress\\Jentil\\AbstractTheme;\n...
php
chosen
[ { "from": "human", "value": "Add test file for get*() methods.\n" }, { "from": "gpt", "value": "<?php\ninclude('_inc.php');\n\nuse Oppa\\Database;\n\n$cfg = [\n 'agent' => 'pgsql',\n 'database' => [\n 'host' => 'localhost', 'name' => 'test',\n 'username' => 'test'...
php
chosen
[ { "from": "human", "value": "Add test coverage to addLineItem\n" }, { "from": "gpt", "value": "<?php\n\nnamespace CommerceGuys\\AuthNet\\Tests\\DataType;\n\nuse CommerceGuys\\AuthNet\\DataTypes\\CreditCard;\nuse CommerceGuys\\AuthNet\\DataTypes\\LineItem;\nuse CommerceGuys\\AuthNet\\DataTypes\\T...
php
chosen
[ { "from": "human", "value": "Work toward getting the ADALINE network unit test to pass" }, { "from": "gpt", "value": "<?php\r\n\r\n/*\r\n * Encog(tm) Core v3.3 - PHP Version\r\n * https://github.com/katrinaniolet/encog-php-core\r\n *\r\n * http://www.heatonresearch.com/encog/\r\n * https://githu...
php
chosen
[ { "from": "system", "value": "Add $debug option (which now defaults to false)" }, { "from": "human", "value": "<?php\n\nuse Clue\\Redis\\Server\\Client;\nuse Clue\\Redis\\Server\\Factory;\nuse Clue\\Redis\\Server\\Server;\nuse Clue\\Redis\\Protocol\\Model\\ModelInterface;\n\nrequire __DIR__ . '/...
php
chosen
[ { "from": "human", "value": "Add a view helper to get a reverse URL from a route\n" }, { "from": "gpt", "value": "<?php\n/**\n * @package Neolao\\Site\\Helper\\View\n */\nnamespace Neolao\\Site\\Helper\\View;\n\nuse \\Neolao\\Logger;\nuse \\Neolao\\Site\\Helper\\View\\AbstractHelper;\nuse \\Neol...
php
chosen
[ { "from": "human", "value": "Add soundcloud callback file for saas routing\n" }, { "from": "gpt", "value": "<?php\n\nclass Router {\n\n /**\n * Parse the URL query string and store the key->val pairs\n * into an array, then redirect\n */\n public function reroute() {\n $...
php
chosen
[ { "from": "human", "value": "Add migration to add target file into menu_itens table.\n" }, { "from": "gpt", "value": "<?php\n\n/**\n * @copyright Eliel de Paula <dev@elieldepaula.com.br>\n * @license http://wpanel.org/license\n */\n\ndefined('BASEPATH') || exit('No direct script access allowed')...
php
chosen
[ { "from": "human", "value": "Apply filter for using .less files, needs li3_less" }, { "from": "gpt", "value": "<?php\n\nuse lithium\\core\\Libraries;\nuse lithium\\action\\Dispatcher;\nuse lithium\\action\\Response;\n\nuse li3_less\\core\\Less;\n\n/**\n * Here we check, if there is a library cal...
php
chosen
[ { "from": "human", "value": "Add script to generate a PHP Archive (PHAR).\n" }, { "from": "gpt", "value": "#!/usr/bin/env php\n<?php\n/* PHPUnit\n *\n * Copyright (c) 2002-2009, Sebastian Bergmann <sb@sebastian-bergmann.de>.\n * All rights reserved.\n *\n * Redistribution and use in source and b...
php
chosen
[ { "from": "human", "value": "Add Nessus scanner to scanner_apps table\n" }, { "from": "gpt", "value": "<?php\n\nuse App\\Utils\\RawMigration;\n\nclass AddNessusScanner extends RawMigration\n{\n /**\n * @inheritdoc\n * @return string\n */\n public function getRawSqlMigration()\n...
php
chosen
[ { "from": "human", "value": "Add simple TCP/IP client example" }, { "from": "gpt", "value": "#!/usr/bin/env php\n<?php\n\nuse Socket\\Raw\\Factory;\n\nerror_reporting(-1);\n\nrequire_once __DIR__.'/../vendor/autoload.php';\n\n$factory = new Factory();\n$socket = $factory->createClient('www.googl...
php
chosen
[ { "from": "human", "value": "Add XSLT test on __autoload\n" }, { "from": "gpt", "value": "<?php\n\nfunction __autoload($className) {\n echo $className;\n exit();\n}\n\nfunction test() {\n $xsl = new DomDocument();\n $xsl->loadXML('<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n <xsl:styl...
php
chosen
[ { "from": "human", "value": "Create index for Splatfest power diff page\n" }, { "from": "gpt", "value": "<?php\n/**\n * @copyright Copyright (C) 2015-2019 AIZAWA Hina\n * @license https://github.com/fetus-hina/stat.ink/blob/master/LICENSE MIT\n * @author AIZAWA Hina <hina@bouhime.com>\n */\ndecl...
php
chosen
[ { "from": "human", "value": "Add test for jobs list limit and offset\n" }, { "from": "gpt", "value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Keboola\\Test\\Common;\n\nuse Keboola\\Test\\StorageApiTestCase;\n\nclass JobsListTest extends StorageApiTestCase\n{\n public function testJobsL...
php
chosen
[ { "from": "human", "value": "Add the portuguese municipalities table seeder\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of Bens Penhorados, an undergraduate capstone project.\n *\n * (c) Fábio Santos <ffsantos92@gmail.com>\n *\n * For the full copyright and license informa...
php
chosen
[ { "from": "human", "value": "Add test for recursive requirer.\n" }, { "from": "gpt", "value": "<?php namespace Reshadman\\EloquentFaster\\Tests;\n\nuse Reshadman\\EloquentFaster\\RecursiveRequirer;\n\nclass RecursiveRequirerTest extends \\PHPUnit_Framework_TestCase {\n\n /**\n * @var Recu...
php
chosen
[ { "from": "human", "value": "Add tests for feature description formatter\n" }, { "from": "gpt", "value": "<?php\n\nnamespace KawaiiGherkinTest\\Formatter;\n\nuse KawaiiGherkin\\Formatter\\FeatureDescription;\n\nfinal class FeatureDescriptionTest extends \\PHPUnit_Framework_TestCase\n{\n /**\n...
php
chosen
[ { "from": "human", "value": "Create main AACL class extender\n" }, { "from": "gpt", "value": "<?php defined('SYSPATH') or die ('No direct script access.');\n\n/**\n * Another ACL\n *\n * @see\t\t\thttp://github.com/banks/aacl\n * @package\t\tAACL\n * @uses\t\tAuth\n * @uses\t\tJelly\n * @author\...
php
chosen
[ { "from": "human", "value": "Add message pack testing concerns\nAdd message pack testing concerns.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace App\\Testing\\Concerns;\n\nuse MessagePack\\Packer;\nuse MessagePack\\BufferUnpacker;\nuse PHPUnit\\Framework\\Assert as PHPUnit;\n\ntrait Messag...
php
chosen
[ { "from": "human", "value": "[Form] Create form to open account\n" }, { "from": "gpt", "value": "<?php\n\nnamespace HCLabs\\Bills\\Form;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component\\OptionsResolver\\OptionsResolverIn...
php
chosen
[ { "from": "human", "value": "Add rest function test suite.\n" }, { "from": "gpt", "value": "<?php\n\nnamespace Mimic\\Test;\n\nuse PHPUnit_Framework_TestCase;\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for rest Mimic library function.\n *\n * @since 0.1.0\n */\nclass RestFuncTest extends ...
php
chosen
[ { "from": "human", "value": "Add an example for directly using connection instances.\n" }, { "from": "gpt", "value": "<?php\n\n/*\n * This file is part of the Predis\\Async package.\n *\n * (c) Daniele Alessandri <suppakilla@gmail.com>\n *\n * For the full copyright and license information, plea...
php
chosen
[ { "from": "human", "value": "Add picture change functionality for tutors" }, { "from": "gpt", "value": "<?php\r\n/**\r\n * Created by PhpStorm.\r\n * User: Catalin\r\n * Date: 03-Jun-17\r\n * Time: 18:09\r\n */\r\n\r\nsession_start();\r\n$tutor_id = $_SESSION[\"tutor_id\"];\r\necho $tutor_id;\r\...
php
chosen
[ { "from": "human", "value": "Change unbounded `string` columns to `text` [API-310]\n" }, { "from": "gpt", "value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Support\\Facades\\Schema;\n\nclass ChangeStringToText exten...
php
chosen
[ { "from": "human", "value": "Add abstract bakend to still be backwards compatible with the old logic\n\nSigned-off-by: Roeland Jago Douma <982d370f7dc34a05b4abe8788f899578d515262d@famdouma.nl>\n" }, { "from": "gpt", "value": "<?php\ndeclare(strict_types=1);\n/**\n* @copyright Copyright (c) 2018 ...
php
chosen
[ { "from": "human", "value": "Add command for bosh-init deploy\n" }, { "from": "gpt", "value": "<?php\n\nnamespace BOSH\\Console\\Command;\n\nuse Symfony\\Component\\Console\\Input\\InputArgument;\nuse Symfony\\Component\\Console\\Input\\InputOption;\nuse Symfony\\Component\\Console\\Input\\Input...
php
chosen
[ { "from": "human", "value": "Test setTestNow() method call on DateTimeValue\n" }, { "from": "gpt", "value": "<?php\n\nnamespace ActiveCollab\\DateValue\\Test;\n\nuse ActiveCollab\\DateValue\\DateValueInterface;\nuse ActiveCollab\\DateValue\\DateValue;\nuse ActiveCollab\\DateValue\\DateTimeValueI...
php
chosen
[ { "from": "human", "value": "Add implementation for trait file deletion\n" }, { "from": "gpt", "value": "<?php\n\nnamespace AppBundle\\API\\Delete;\n\nuse AppBundle\\Entity\\Data\\TraitFileUpload;\nuse AppBundle\\Entity\\User\\FennecUser;\nuse AppBundle\\Entity\\User\\Permissions;\nuse AppBundle...
php
chosen
[ { "from": "human", "value": "Add script to verify constants for static methods are present\n" }, { "from": "gpt", "value": "<?php\nrequire 'flourish/fLoader.php';\nrequire 'classes/sLoader.php';\nsLoader::best();\n\n$exceptions = array(\n 'sImage' => array('determineMimeType'),\n 'sNumber' => ...
php
chosen
[ { "from": "system", "value": "Replace userAgent method call - fixes incompatibilty with Illuminate 5.2\n" }, { "from": "human", "value": "<?php\n/**\n * This file is part of the Laravel Auditing package.\n *\n * @author Antério Vieira <anteriovieira@gmail.com>\n * @author Quetzy Garcia ...
php
chosen
[ { "from": "human", "value": "Use data provider to complete collection number operation test suite.\n" }, { "from": "gpt", "value": "<?php\n\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for collectionNumberOperation Mimic library function.\n *\n * @since 0.1.0\n */\nclass CollectionNumberOpe...
php
chosen
[ { "from": "human", "value": "Add property handler unit test\n\nStarted working on testing the property handler. However, this is far\nfrom done at this point!\n" }, { "from": "gpt", "value": "<?php\n\nuse Aedart\\Scaffold\\Contracts\\Templates\\Data\\Type;\nuse Aedart\\Scaffold\\Handlers\\Proper...
php
chosen
[ { "from": "human", "value": "Add a tag formatter that aligns all tag values.\n" }, { "from": "gpt", "value": "<?php\n/**\n * This file is part of phpDocumentor.\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n ...
php
chosen
[ { "from": "human", "value": "Add inventory adjustment api + update gitignore\n" }, { "from": "gpt", "value": "<?php\n/**\n * Created by PhpStorm.\n * User: evgen\n * Date: 21.07.2019\n * Time: 10:26\n */\n\nnamespace OpsWay\\ZohoBooks\\Api;\n\n\nclass ItemAdjustments\n{\n\n}" } ]
php
chosen
[ { "from": "human", "value": "Add Test to perform syntax-checks on Twig-templates\n" }, { "from": "gpt", "value": "<?php\n/**\n * Simple test for syntax-checking Twig-templates.\n *\n * @author Tim van Dijen <tvdijen@gmail.com>\n * @package SimpleSAMLphp\n */\n\nnamespace SimpleSAML\\Test\\Web;\n...
php
chosen
[ { "from": "human", "value": "Add a test class for CommonMark spec regressions.\n\nStart with one example.\n" }, { "from": "gpt", "value": "<?php\nuse FluxBB\\Markdown\\Renderer\\XhtmlRenderer;\n\n/**\n * @author Franz Liedke <franz@fluxbb.org>\n */\nclass CommonMarkTest extends \\PHPUnit_Framewo...
php
chosen
[ { "from": "human", "value": "Add an example to show how to leverage key prefixes.\n" }, { "from": "gpt", "value": "<?php\nrequire_once 'SharedConfigurations.php';\n\n// Predis ships with a KeyPrefixPreprocessor class that is used to transparently\n// prefix each key before sending commands to Re...
php
chosen