conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add consistency tests for import/export\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace BitWasp\\Secp256k1Tests;\n\n\nuse Symfony\\Component\\Yaml\\Yaml;\n\nclass Secp256k1PrivkeyImportExportTest extends TestCase\n{\n /**\n * @return array\n */\n pu... | php | chosen |
[
{
"from": "human",
"value": "Add proxy class for ext-pcov\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Paraunit\\Proxy;\n\nclass PcovProxy\n{\n public function isReady(): bool \n {\n return $this->isLoaded() && $this->isEnabled();\n }\n\n public function isLoaded(): boo... | php | chosen |
[
{
"from": "human",
"value": "Add an example for MULTI/EXEC transactions using CAS.\n"
},
{
"from": "gpt",
"value": "<?php\nrequire_once 'SharedConfigurations.php';\n\n/*\nThis is an implementation of an atomic client-side ZPOP using the support for \ncheck-and-set (CAS) operations with MULTI/EXE... | php | chosen |
[
{
"from": "human",
"value": "Add columns keyfob_id, fiken_customer_id, valid_until\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AddKeyfobFikecustomerValiduntil extends AbstractMigration\n{\n /**\n * Change Method.\n *\n * Write your r... | php | chosen |
[
{
"from": "system",
"value": "Extend the container interface from app.\n"
},
{
"from": "human",
"value": "<?php namespace Illuminate\\Contracts\\Foundation;\n\ninterface Application {\n\n\t/**\n\t * Register a service provider with the application.\n\t *\n\t * @param \\Illuminate\\Support\\Serv... | php | chosen |
[
{
"from": "human",
"value": "Add functionality for changing profile picture (with bugs)"
},
{
"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$username = $_SESSION[\"username\"];\r\n\r\... | php | chosen |
[
{
"from": "human",
"value": "Add tests for the buffered writer class\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once 'TestBase.php';\n\nclass BufferTest extends TestBase\n{\n\n /** @test */\n public function it_can_buffer_content()\n {\n $buffer = new League\\CLImate\\Util... | php | chosen |
[
{
"from": "human",
"value": "Add command line test script\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/php\n<?php\nrequire('fastcgi.php');\n\nif (!isset($_SERVER['argc'])) {\n die(\"Command line only\\n\");\n}\nif ($_SERVER['argc']<2) {\n die(\"Usage: \".$_SERVER['argv'][0].\" URI\\n\\nEx:... | php | chosen |
[
{
"from": "human",
"value": "Add class to handle attribute metadata (like translations)\n\ngit-svn-id: e77a8db410fc7e53f700994083f7980387c3a882@680 528793b8-127e-4309-9901-b74759c7208d\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * SURFconext EngineBlock\n *\n * LICENSE\n *\n * Copyright 2011 S... | php | chosen |
[
{
"from": "system",
"value": "Add limit and offset to Graph Search\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace SocalNick\\Orchestrate;\n\nclass GraphFetchOperation implements OperationInterface\n{\n protected $collection;\n protected $key;\n protected $kind;\n\n public function __c... | php | chosen |
[
{
"from": "human",
"value": "Add a basic config file, primarily to test against, but could be made publishable by the addition of a service provider.\n"
},
{
"from": "gpt",
"value": "<?php\n\nreturn array(\n\n /*\n |--------------------------------------------------------------------------... | php | chosen |
[
{
"from": "human",
"value": "Add basic RGB color palette example of state transformation\n"
},
{
"from": "gpt",
"value": "<?php\n// A basic example to showcase the usefulness of immutable state and state transformation, as\n// is used in functional programming\n\nclass RGB\n{\n\tprotected $red;\... | php | chosen |
[
{
"from": "human",
"value": "Add example with GET and POST requests\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse donatj\\MockWebServer\\MockWebServer;\nuse donatj\\MockWebServer\\Response;\nuse donatj\\MockWebServer\\RequestInfo;\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\n$server = new ... | php | chosen |
[
{
"from": "human",
"value": "Add file retrieval php code\n"
},
{
"from": "gpt",
"value": "<?php\n$path = $_GET['filename'];\n\nif (is_file($path))\n echo file_get_contents($path);\nelse\n $contents = scandir($path);\n foreach ($contents as $item)\n echo $item . \"\\n\";\n\n?>\n"
... | php | chosen |
[
{
"from": "human",
"value": "[CatalogPromotion] Refactor dispatching events after persisting and updating\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 t... | php | chosen |
[
{
"from": "human",
"value": "Add simple REST controller (GET only) for parameters\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Wanjee\\Shuwee\\ConfigBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Sensio\\Bundle\\FrameworkExtraBundle\\Configuratio... | php | chosen |
[
{
"from": "human",
"value": "Add example for get Venues.\n"
},
{
"from": "gpt",
"value": "<?php\n$companyId = 0; // Company ID\n$staffId = 0; //Staff ID\n$staffSecret = ''; // Staff API Key\n\n$signer = new \\Kobas\\Auth\\Signer($companyId, $staffId, $staffSecret);\n$client = new \\Kobas\\... | php | chosen |
[
{
"from": "human",
"value": "Add unit tests for helpers file\n\nSigned-off-by: Dries Vints <9818b0f8e34f57ac0059d0bc440479771e319166@gmail.com>\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass HelpersTest extends PHPUnit_Framework_TestCase {\n\n\tpublic function testIsFalse()\n\t{\n\t\t$this->ass... | php | chosen |
[
{
"from": "human",
"value": "Move student primary id as first column\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass MoveStudentPrimaryIdToLeft extends Mig... | php | chosen |
[
{
"from": "human",
"value": "Fix last commit: Add components basic API\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Parvula\\FilesSystem;\n\n$path = _PLUGINS_ . '/_Components';\n\n// list components\n$this->get('', function ($req, $res) use ($path) {\n\t$acc = [];\n\tforeach(glob($path . '/*.ph... | php | chosen |
[
{
"from": "human",
"value": "Add a logging helper class\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass Asm_Solr_Helper_Logger\n{\n\tprotected $logFileName = 'solr.log';\n\n\n\tpublic function log($message, $level, $data = null)\n\t{\n\t\tif (!is_null($data)) {\n\t\t\t$message .= ' ' . json_enco... | php | chosen |
[
{
"from": "human",
"value": "Migrate all mapper posts to new type\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass UpdateDiscussionTypeByMapper extends Migration\n{\n /**\n * Run the migrations.\n *\n * @return void\n */\n ... | php | chosen |
[
{
"from": "system",
"value": "Throw Exception if is empty\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace marmelab\\NgAdminGeneratorBundle\\Generator;\n\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse marmelab\\NgAdminGeneratorBundle\\Transformer\\TransformerInterface;\n\nclass Configura... | php | chosen |
[
{
"from": "system",
"value": "Modify API endpoint for adding points to a metric\n"
},
{
"from": "human",
"value": "<?php\n\nRoute::api([\n 'after' => 'allowed_domains',\n 'namespace' => 'CachetHQ\\Cachet\\Http\\Controllers\\Api',\n 'version' => 'v1',\n], function () {\n // Comp... | php | chosen |
[
{
"from": "human",
"value": "Update script from previous version\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @package\t\tCleverStyle CMS\n * @subpackage\tSystem module\n * @category\tmodules\n * @author\t\tNazar Mokrynskyi <nazar@mokrynskyi.com>\n * @copyright\tCopyright (c) 2014, Nazar Mokr... | php | chosen |
[
{
"from": "human",
"value": "Add eloquent cache clear command.\n"
},
{
"from": "gpt",
"value": "<?php namespace Reshadman\\EloquentFaster;\n\nuse Illuminate\\Console\\Command;\nuse Illuminate\\Filesystem\\Filesystem;\n\nclass EloquentCacheClearCommand extends Command\n{\n /**\n * The name... | php | chosen |
[
{
"from": "human",
"value": "Create simplified filesystem service provider.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace FluxBB\\Core;\n\nuse Illuminate\\Filesystem\\Filesystem;\nuse Illuminate\\Filesystem\\FilesystemAdapter;\nuse Illuminate\\Support\\ServiceProvider;\nuse League\\Flysyst... | php | chosen |
[
{
"from": "human",
"value": "Add time generator for pecl-uuid\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * This file is part of the ramsey/uuid library\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n *\n * ... | php | chosen |
[
{
"from": "human",
"value": "Add abstract base class for authorized resources\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Vipps\\Resource;\n\nabstract class AuthorizedResourceBase extends ResourceBase\n{\n\n /**\n * {@inheritdoc}\n */\n public function getHeaders()\n {\n... | php | chosen |
[
{
"from": "system",
"value": "Use constant in test ...\n"
},
{
"from": "human",
"value": "<?php\nclass ImageInfoTest extends TestCaseBase\n{\n const TEST_IMAGE_URL = 'http://www.mixdecultura.ro/wp-content/uploads/2013/03/galicia-locuinte-celtice.jpg';\n const TEST_IMAGE_WIDTH = 600;\n c... | php | chosen |
[
{
"from": "human",
"value": "Add unit tests for existing normalize functionality.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Northstar\\Auth\\Registrar;\n\nclass RegistrarTest extends TestCase\n{\n /**\n * The registrar to be tested.\n * @var Registrar\n */\n protected $regi... | php | chosen |
[
{
"from": "human",
"value": "Add interface for factory to create spec\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Cs278\\BankModulus\\Spec;\n\ninterface SpecFactoryInterface\n{\n /**\n * Create specification and return.\n *\n * Implementations may create and hold singleton... | php | chosen |
[
{
"from": "human",
"value": "Complete each function unit tests.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for each Mimic library function.\n *\n * @since 0.1.0\n *\n * @todo Need to use QuickTest library.\n */\nclass EachFuncTest extends PHPUnit_F... | php | chosen |
[
{
"from": "human",
"value": "Complete basic none unit tests.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for none Mimic library function.\n *\n * @since 0.1.0\n *\n * @todo Need to use QuickTest library.\n */\nclass NoneFuncTest extends PHPUnit_Fram... | php | chosen |
[
{
"from": "human",
"value": "Refactor out signed URL builder\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace MarcL;\n\nclass AmazonUrlBuilder {\n private $url = NULL;\n private $secretKey = NULL;\n\n public function __construct($url, $secretKey) {\n $this->secretKey = $secret... | php | chosen |
[
{
"from": "human",
"value": "Add post request retrieval method\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n This module strictly inputs and outputs associative arrays and raw http data.\n Has no awareness of spec classes.\n*/\n\n// Retrieves the body of a post request and returns it as an as... | php | chosen |
[
{
"from": "human",
"value": "Update messages length limit of questions\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass UpdateMessagesLengthInQuestions exte... | php | chosen |
[
{
"from": "human",
"value": "Add enabled column for menus\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass ModifyMconsoleMenusTableAddEnabledColumn extends Migration\n{\n /**\n * Run the migra... | php | chosen |
[
{
"from": "system",
"value": "Improve by using breadth search instead of depth search"
},
{
"from": "human",
"value": "<?php\n\nclass AlgorithmConnectedComponents extends Algorithm{\n \n /**\n * \n * @var Graph\n */\n private $graph;\n \n /**\n * \n * @param Gr... | php | chosen |
[
{
"from": "human",
"value": "Add simple integration test for SolrSearch + Solr test server\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Solr Search integration test\n */\nnamespace SearchApi\\Test\\Unit;\n\nuse SearchApi;\nuse SearchApi\\Providers\\SolrSearch;\nuse SearchApi\\Models;\n\nuse N... | php | chosen |
[
{
"from": "human",
"value": "openidProvider: Add frontpage hook with link to user page.\n\nFixes issue 227\n\ngit-svn-id: a243b28a2a52d65555a829a95c8c333076d39ae1@1899 44740490-163a-0410-bde0-09ae8108e29a\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Hook to add the OpenID provider to the auth... | php | chosen |
[
{
"from": "human",
"value": "Add unit tests for Statistics\\Descriptive.\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Math\\Statistics;\nrequire_once( __DIR__ . '/../../src/Statistics/Descriptive.php' );\n\nclass DescriptiveTest extends \\PHPUnit_Framework_TestCase {\n\n /**\n * @dataPro... | php | chosen |
[
{
"from": "human",
"value": "Add a script to check for completeness of function signatures\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env php\n<?php\n/**\n * This checks that the function signatures are complete.\n * TODO: Expand to checking classes (methods, and properties)\n * TODO: Refactor ... | php | chosen |
[
{
"from": "human",
"value": "Define what a probability distribution must have."
},
{
"from": "gpt",
"value": "<?php\n\nnamespace mcordingley\\ProbabilityDistribution;\n\ninterface ProbabilityDistributionInterface\n{\n public function getPdf($x);\n\n public function getCdf($x);\n \n p... | php | chosen |
[
{
"from": "human",
"value": "Add a bunch of traits to ZF2\n\nAs requested @\n\nhttps://github.com/protecinnovations/zf2-traits/issues/1\n\nThis is the initial commit to start getting traits into ZF2.\n\nWe need to move our tests over - which are currently using Mockery.\n"
},
{
"from": "gpt",
"v... | php | chosen |
[
{
"from": "human",
"value": "Test case for translation service\n"
},
{
"from": "gpt",
"value": "<?php\n\n/** @var \\Codeception\\Scenario $scenario */\n$I = new AcceptanceTester($scenario);\n$I->populateDBData1();\n\n$I->wantTo('Not see the translation widget');\n$I->gotoConsultationHome();\n$I-... | php | chosen |
[
{
"from": "human",
"value": "Add user account public access in API\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Etu\\Core\\UserBundle\\Api\\Resource;\n\nuse Doctrine\\ORM\\EntityManager;\nuse Etu\\Core\\ApiBundle\\Framework\\Controller\\ApiController;\nuse Nelmio\\ApiDocBundle\\Annotation... | php | chosen |
[
{
"from": "human",
"value": "Add map type Id class which defines the available map types constant\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Ivory\\GoogleMapBundle\\Model;\n\n/**\n * Map type ID which describes a google map type id\n *\n * @see http://code.google.com/apis/maps/documenta... | php | chosen |
[
{
"from": "human",
"value": "Allow editing cms_config.php by manager\n\nThe texts config file can be edited when the user fills in a password (defined in config.php). This editing interface should be improved. (unfinished but it works for now)\n"
},
{
"from": "gpt",
"value": "<!DOCTYPE html>\n<h... | php | chosen |
[
{
"from": "human",
"value": "Add example for annotated aggregates.\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env php\n<?php\ndeclare(strict_types = 1);\n\nnamespace Apha\\Examples;\n\nuse Apha\\CommandHandling\\Gateway\\DefaultCommandGateway;\nuse Apha\\CommandHandling\\Interceptor\\LoggingCom... | php | chosen |
[
{
"from": "human",
"value": "Add graph monitoring page in behat classes\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Copyright 2016 Centreon\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 * You m... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for the bootstrapping class\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * phpDocumentor\n *\n * PHP Version 5.3\n *\n * @copyright 2010-2013 Mike van Riel / Naenius (http://www.naenius.com)\n * @license http://www.opensource.org/licenses/mit-license... | php | chosen |
[
{
"from": "human",
"value": "Add migration for Countdown Module.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Copyright (C) 2020 Xibo Signage Ltd\n *\n * Xibo - Digital Signage - http://www.xibo.org.uk\n *\n * This file is part of Xibo.\n *\n * Xibo is free software: you can redistribute it a... | php | chosen |
[
{
"from": "human",
"value": "Add example on vanilla PHP\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\n/*\n * This file is part of YouTrack REST PHP.\n *\n * (c) Anton Komarev <a.komarev@cybercog.su>\n *\n * For the full copyright and license information, please view the L... | php | chosen |
[
{
"from": "human",
"value": "Add migration for StudyCycle entity\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m141216_151416_create_study_cycle extends Migration\n{\n public function up()\n {\n $tableOptions = null;\n if ($t... | php | chosen |
[
{
"from": "human",
"value": "Add a base trait for allowing undeletion by devs\n"
},
{
"from": "gpt",
"value": "<?php\n\ntrait AdminRestore {\n\t\n\tpublic function getRestore($type, $id) {\n\t\tif (! Auth::user()->isDev())\n\t\t\treturn Redirect::to(\"/admin\");\n\n\t\tif ($type == \"news\") {\n... | php | chosen |
[
{
"from": "human",
"value": "Create the coefficient container class."
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace mcordingley\\Regression;\n\nfinal class CoefficientSet\n{\n private $coefficients;\n\n /**\n * __construct\n *\n * @param array $co... | php | chosen |
[
{
"from": "human",
"value": "Add a bunch of traits to ZF2\n\nAs requested @\n\nhttps://github.com/protecinnovations/zf2-traits/issues/1\n\nThis is the initial commit to start getting traits into ZF2.\n\nWe need to move our tests over - which are currently using Mockery.\n"
},
{
"from": "gpt",
"v... | php | chosen |
[
{
"from": "human",
"value": "Add tests for database wrapper\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Test;\n\nuse Livid\\Config\\SQLite3Config;\nuse Livid\\Database;\nuse Livid\\Exception\\DatabaseConnectionFailed;\nuse PHPUnit_Framework_TestCase as TestCase;\n\nclass DatabaseTest exten... | php | chosen |
[
{
"from": "human",
"value": "Add simple test for dead code\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Psalm\\Tests;\n\nuse PhpParser\\ParserFactory;\nuse PHPUnit_Framework_TestCase;\nuse Psalm\\Checker\\FileChecker;\nuse Psalm\\Config;\nuse Psalm\\Context;\n\nclass DeadCodeTest extends PH... | php | chosen |
[
{
"from": "human",
"value": "Add Controller Extension currently to allow redirecting to primary domain during handleRequest\n"
},
{
"from": "gpt",
"value": "<?php\nclass SubsiteController extends Extension {\n\tpublic function onBeforeInit( $request ) {\n\t\tif( Director::isLive() ) {\n\t\t\t$su... | php | chosen |
[
{
"from": "human",
"value": "Create Custom Controller Class (c4) with check_admin() method\n\nSigned-off-by: JWhy <6a9f7c06e789f829524fd1a3a38b8c7d794c3a1f@jwhy.de>\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass MY_Controller extends CI_Controller{\n\n protected function check_admin() {\n i... | php | chosen |
[
{
"from": "human",
"value": "Add PHPUnit tests for Stripe_ApplicationFeeRefund\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass Stripe_ApplicationFeeRefundTest extends Stripe_TestCase\n{\n public function testUrls()\n {\n $refund = new Stripe_ApplicationFeeRefund();\n $refund->id = 'refun... | php | chosen |
[
{
"from": "human",
"value": "Add migration for new attribute\n\nSigned-off-by: Christoph Wurst <7abde52c298496fa169fb750f91f213a282142af@winzerhof-wurst.at>\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illu... | php | chosen |
[
{
"from": "human",
"value": "Read functionality for the frontend working\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Magium\\Configuration\\View\\Controllers;\n\nuse Interop\\Container\\ContainerInterface;\nuse Magium\\Configuration\\Config\\BuilderInterface;\nuse Magium\\Configuration\\... | php | chosen |
[
{
"from": "human",
"value": "Add test for main class\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n * This file is part of the phpToolBox package.\n *\n * (c) Brack Romain <http://www.cyberomulus.me>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was ... | php | chosen |
[
{
"from": "human",
"value": "Move errors settings to the service provider\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace App\\Support\\ServiceProviders;\n\n/**\n * Class ErrorsServiceProvider\n * @package App\\Support\\ServiceProviders\n * @category ErrorsServiceProvider\n * @author Fruty <ed... | php | chosen |
[
{
"from": "human",
"value": "Add unit tests for self-update command\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace SensioLabs\\AstRunner\\Tests\\Command;\n\nuse Humbug\\SelfUpdate\\Updater;\nuse SensioLabs\\Deptrac\\Command\\SelfUpdateCommand;\nuse Symfony\\Component\\Console\\Input\\InputI... | php | chosen |
[
{
"from": "human",
"value": "Add a sample application for the Google Analytics V3 API.\n\n"
},
{
"from": "gpt",
"value": "<?php\nrequire_once '../../src/apiClient.php';\nrequire_once '../../src/contrib/apiAnalyticsService.php';\nsession_start();\n\n$client = new apiClient();\n$client->setApplica... | php | chosen |
[
{
"from": "human",
"value": "Add test for dependecies implementing interfaces\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Stratadox\\Di\\Test;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Stratadox\\Di\\AutoWiring;\nuse Stratadox\\Di\\Container;\nuse Stratadox\\D... | php | chosen |
[
{
"from": "human",
"value": "Test operands of mixed currencies\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Z38\\SwissPayment\\Tests\\Money;\n\nuse Z38\\SwissPayment\\Money;\nuse Z38\\SwissPayment\\Tests\\TestCase;\n\nclass MixedTest extends TestCase\n{\n /**\n * @covers \\Z38\\Swi... | php | chosen |
[
{
"from": "human",
"value": "Add tests for occ apps:getpath\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @author Thomas Müller <thomas.mueller@tmit.eu>\n *\n * @copyright Copyright (c) 2017, ownCloud GmbH\n * @license AGPL-3.0\n *\n * This code is free software: you can redistribute it and/or... | php | chosen |
[
{
"from": "human",
"value": "Add helper class for plugins"
},
{
"from": "gpt",
"value": "<?php\r\n\r\nnamespace RainLoop\\Plugins;\r\n\r\nclass Helper\r\n{\r\n\t/**\r\n\t * @return void\r\n\t */\r\n\tprivate function __construct()\r\n\t{\r\n\t}\r\n\r\n\t/**\r\n\t * @param string $sString\r\n\t *... | php | chosen |
[
{
"from": "human",
"value": "Add psr closure indentation test\n"
},
{
"from": "gpt",
"value": "--TEST--\nPSR 2 Coding Style Guide Example 6 (c)\n\nhttps://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md\n--FILE--\n<?php\n\n$foo->bar(\n $arg1,\n function ($... | php | chosen |
[
{
"from": "human",
"value": "Add very basic query class\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Purity5 is a HTML5 parser\n *\n * @author Skylar Kelty <skylarkelty@gmail.com>\n */\n\nnamespace SkylarK\\Purity5\\DataStructures;\n\n/**\n * A Query is used to breakup a string into a set of ... | php | chosen |
[
{
"from": "system",
"value": "Change default database info to support vagrant out of the box\n"
},
{
"from": "human",
"value": "<?php\n// define site name\ndefine('SITE_NAME', 'SimpleLance DEV');\n\n// define site URL\ndefine('SITE_URL', 'simplelance.dev');\n\n// define database settings\ndefine... | php | chosen |
[
{
"from": "human",
"value": "Test README describes all available MySQL functions\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace DoctrineExtensions\\Tests\\docs;\n\nuse DoctrineExtensions\\Query\\Mysql;\n\n/**\n * Test that checks the README describes all of the query types\n *\n * @author A... | php | chosen |
[
{
"from": "human",
"value": "Add basic structure of the class\n"
},
{
"from": "gpt",
"value": "<?php\nclass Automatic_Cache {\n\n\tprotected $default = array(\n\t\t'name' => '',\n\t\t'callback' => false,\n\t\t'duration' => HOUR_IN_SECONDS,\n\t);\n\n\tprotected $args = array();\n\n\tpublic $data ... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for BasicAuthenticationCredentials\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Marein\\Nchan\\Http\\Adapter;\n\nuse Marein\\Nchan\\Http\\Request;\nuse PHPUnit\\Framework\\TestCase;\n\nclass BasicAuthenticationCredentialsTest extends TestCase\n{\... | php | chosen |
[
{
"from": "human",
"value": "Add default functionalities (has_kanji, has_hiragana, has_katakana, is_japanese)\n"
},
{
"from": "gpt",
"value": "<?php\r\n\r\n/**\r\n * JpnForPhp library, brings some usefull tools and functionalities\r\n * to interact with Japanese characters.\r\n *\r\n * @author ... | php | chosen |
[
{
"from": "system",
"value": "Save draft button tweak on homepage\n"
},
{
"from": "human",
"value": "<div class=\"card\">\n <div class=\"card-header\">\n <h2>Quick Draft\n <small>Save a quick draft post:</small>\n </h2>\n\n <br>\n\n @include('canvas::sha... | php | chosen |
[
{
"from": "human",
"value": "Add an entity session to let Doctrine generate this table into database automaticaly\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Etu\\Core\\UserBundle\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n * @ORM\\Table(name=\"sessions\")\n * @ORM\\Entity()\... | php | chosen |
[
{
"from": "human",
"value": "Add the notes migration to create notes table.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass CreateNotesTable extends Migration {\n\n\t/**\n\t * Run the migrations.\n\... | php | chosen |
[
{
"from": "human",
"value": "Add twitter CTA at the end of posts\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Template part for displaying posts.\n *\n * @link https://codex.wordpress.org/Template_Hierarchy\n *\n * @package purus\n */\n\n?>\n\n<article id=\"post-<?php the_ID(); ?>\" <?php pos... | php | chosen |
[
{
"from": "human",
"value": "Add services factory to get page configuration parameters from\nmcwork.page.xml\n\nChange-Id: I6c3747b2387d65a50b1cf6caf394af2642407f9d\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * contentinum - accessibility websites\n *\n * LICENSE\n *\n * THIS SOFTWARE IS PROVI... | php | chosen |
[
{
"from": "human",
"value": "Test coverage for directory factory.\n\nSigned-off-by: Jason Lewis <b136be6b8ecc2c62ceb9857ec62bf85489a45e0c@gmail.com>\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Mockery as m;\nuse Basset\\Factory\\FactoryManager;\nuse Basset\\Factory\\DirectoryFactory;\nuse Illu... | php | chosen |
[
{
"from": "human",
"value": "Add phone number entry. HTML5 baby.\n\nsvn commit r59134\n"
},
{
"from": "gpt",
"value": "<?php\n\n/* vim: set noexpandtab tabstop=4 shiftwidth=4 foldmethod=marker: */\n\nrequire_once 'Swat/SwatEntry.php';\n\n/**\n * An phone number entry widget\n *\n * @package Sw... | php | chosen |
[
{
"from": "system",
"value": "Encrypt password what submitted index.ctp form. its make a filter to execute before data save to database\n"
},
{
"from": "human",
"value": "<?php\nApp::uses('AppModel', 'Model');\n\nclass User extends AppModel {\n\n public function getInfo()\n {\n retu... | php | chosen |
[
{
"from": "human",
"value": "Add test for class Route\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @author Thomas Müller <thomas.mueller@tmit.eu>\n *\n * @copyright Copyright (c) 2017, ownCloud GmbH\n * @license AGPL-3.0\n *\n * This code is free software: you can redistribute it and/or modif... | php | chosen |
[
{
"from": "human",
"value": "Add charset in Section object\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Created by PhpStorm.\n * User: \n * Date: 13.04.2017\n * Time: 17:11\n */\n\nnamespace SSilence\\ImapClient;\n\n\nclass SubtypeBody\n{\n\n}"
}
] | php | chosen |
[
{
"from": "human",
"value": "[FIX] Set the new bootstrap theme pref 'theme_active' to the current old 'styles' setting if set to using legacy as the styles directory no longer exists.\nStyle option -> theme option migration TODO when there is one\n\ngit-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@52706... | php | chosen |
[
{
"from": "human",
"value": "Add login and logout controller so we can link to it.\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Criterion\\UI\\Controller;\n\nclass AuthController\n{\n public function login(\\Silex\\Application $app)\n {\n if ($app['user'])\n {\n ... | php | chosen |
[
{
"from": "human",
"value": "Add database migration for a default basic user group\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\nuse \\Illuminate\\Support\\Facades\\DB;\n\nclass InsertDefaultGroups extend... | php | chosen |
[
{
"from": "human",
"value": "Add group notes template to git\n"
},
{
"from": "gpt",
"value": "\n<div id=\"global-notes\" class=\"box\" style=\"display:none;\">\n\t<h3>Notes <a href=\"#\" id=\"global-notes-edit\" class=\"btn btn-xs btn-primary\">edit</a></h3>\n\t<div>\n\t\t<textarea style=\"width... | php | chosen |
[
{
"from": "human",
"value": "Change unique constraint of gear2 splatnet-id\n\nSigned-off-by: AIZAWA Hina <07c779d48779c322a7c5324109202f9012f7aebf@bouhime.com>\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @copyright Copyright (C) 2015-2017 AIZAWA Hina\n * @license https://github.com/fetus-hin... | php | chosen |
[
{
"from": "human",
"value": "Add a client for Client Token auth\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Intercom;\n\nuse Guzzle\\Common\\Collection;\nuse Guzzle\\Service\\Client;\n\nclass IntercomClientTokenAuthClient extends IntercomAbstractClient\n{\n /** @var array The required c... | php | chosen |
[
{
"from": "human",
"value": "test(conf): Enable Full Coverage\ntest(Providers): Add many provider test\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Test\\Providers;\n\nuse Luxury\\Constants\\Services;\nuse Luxury\\Providers\\Http\\Router;\nuse Test\\Stub\\StubKernelEmpty;\nuse Test\\TestCas... | php | chosen |
[
{
"from": "human",
"value": "Add transaction factory test, checks that tx's with a version = null default to TransactionInterface::DEFAULT_VERSION\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace BitWasp\\Bitcoin\\Tests\\Transaction;\n\nuse BitWasp\\Bitcoin\\Tests\\AbstractTestCase;\nuse BitW... | php | chosen |
[
{
"from": "human",
"value": "Add isAdmin column to users table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddAdminRoleUsersTable extends Migration\n{\... | php | chosen |
[
{
"from": "human",
"value": "Add test case for ConsoleInput::dataAvailable().\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * CakePHP : Rapid Development Framework (https://cakephp.org)\n * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)\n *\n * Licensed under The MIT ... | php | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.