conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add Test Cases for Notification Model.\n\nSigned-off-by: Dhananjay Nakrani <9e965ab80219a00627f2dc7fe46b57bdbd34c853@gmail.com>\n"
},
{
"from": "gpt",
"value": "<?php\nApp::uses('Notification', 'Model');\n\n/**\n * Notification Test Case\n *\n */\nclass NotificationT... | php | chosen |
[
{
"from": "human",
"value": "Check if Admin logins created\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Closure;\n\nclass CheckIfAdmin\n{\n /**\n * Handle an incoming request.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param ... | php | chosen |
[
{
"from": "human",
"value": "[OrderSequence] Add version property to an order sequence\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... | php | chosen |
[
{
"from": "human",
"value": "Add a button to generate a qrcode when editing posts\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\nPlugin Name: QR PDF\nPlugin URI: http://labculturadigital.org/\nDescription: Generate ready-to-print-PDFs with QR codes linking to your posts\nAuthor: Laboratório de Cu... | php | chosen |
[
{
"from": "human",
"value": "Add rudimental API to retrieve supported locales for a project\n"
},
{
"from": "gpt",
"value": "<?php\ndate_default_timezone_set('Europe/Rome');\n\n$sources_file = '../config/sources.json';\n$webstatus_file = '../web_status.json';\n\n// Read the JSON files\n$json_sou... | php | chosen |
[
{
"from": "human",
"value": "Allow a model (generated by the discovery schema) get initialized from an array.\n\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... | php | chosen |
[
{
"from": "human",
"value": "Add ContrainerException for psr 11"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * The MIT License\n *\n * Copyright 2017 guillaume.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation ... | php | chosen |
[
{
"from": "human",
"value": "Add tests for Random class methods.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Rych\\Random\\Tests;\n\nuse Rych\\Random\\Random;\nuse PHPUnit_Framework_TestCase as TestCase;\n\nclass RandomTest extends TestCase\n{\n\n /**\n * @test\n * @return voi... | php | chosen |
[
{
"from": "human",
"value": "Add generic reporting for CSP incidents\n"
},
{
"from": "gpt",
"value": "<?php\ntry {\n require_once('../global_functions.php');\n require_once('../connections/parameters.php');\n\n $db = new dbWrapper($hostname_gds_site, $username_gds_site, $password_gds_si... | php | chosen |
[
{
"from": "human",
"value": "Add more coverage for NotFound view\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n * File: ViewNotFoundTest.php\n * Holds: Tests the NotFound view\n * Created: 25.05.2016\n * Project: Youkok2\n *\n */\n\nnamespace Youkok2\\Tests\\Views;\n\nuse Youkok2\\Youkok2;\nuse Yo... | php | chosen |
[
{
"from": "human",
"value": "Add link-test between User and UserGame\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n *\n * @author learp\n */\n\nuse Illuminate\\Support\\Collection;\nuse App\\UserGame;\n\nclass UserWithUserGameTest extends TestCase\n{\n /**\n *\n * @var $userGame\n *... | php | chosen |
[
{
"from": "human",
"value": "Add flatten function test suite.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Mimic\\Test;\n\nuse PHPUnit_Framework_TestCase;\nuse Mimic\\Functional as F;\n\nuse ArrayIterator;\n\n/**\n * Unit Test for flatten Mimic library function.\n *\n * @since 0.1.0\n *\n... | php | chosen |
[
{
"from": "human",
"value": "Add test case for AccountACEinfo\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Zimbra\\Mail\\Tests\\Struct;\n\nuse Zimbra\\Mail\\Tests\\ZimbraMailTestCase;\nuse Zimbra\\Enum\\AceRightType;\nuse Zimbra\\Enum\\GranteeType;\nuse Zimbra\\Mail\\Struct\\AccountACEinf... | php | chosen |
[
{
"from": "system",
"value": "Replace apostrophe to proper HTML char"
},
{
"from": "human",
"value": "<h2>#Laravel IRC Chat</h2>\n\n@if(Auth::check() or Session::has('userLazilyOptsOutOfAuthOnChat'))\n\t<iframe src=\"https://kiwiirc.com/client/irc.freenode.net/?&nick={{ Auth::check() ? Auth::use... | php | chosen |
[
{
"from": "human",
"value": "Add some tests for documents\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Rcms\\Core\\Document;\n\nuse PHPUnit_Framework_TestCase;\nuse Rcms\\Core\\User;\n\nclass DocumentTest extends PHPUnit_Framework_TestCase {\n\n public function testBasics() {\n ... | php | chosen |
[
{
"from": "human",
"value": "[Core][Order] Add migrations for order token value\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Sylius\\Migrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generated Migration: Please modify to... | php | chosen |
[
{
"from": "human",
"value": "Add test case for merging without amendments\n"
},
{
"from": "gpt",
"value": "<?php\n\n/** @var \\Codeception\\Scenario $scenario */\n$I = new AcceptanceTester($scenario);\n$I->populateDBData1();\n\n$I->wantTo('use merging for a motion without amendments');\n$I->goto... | php | chosen |
[
{
"from": "human",
"value": "Add Laravel 4 facade accessor\n"
},
{
"from": "gpt",
"value": "<?php namespace AdamWathan\\Form\\Facades;\n\nuse Illuminate\\Support\\Facades\\Facade;\n\nclass Form extends Facade {\n\n /**\n * Get the registered name of the component.\n *\n * @return ... | php | chosen |
[
{
"from": "human",
"value": "Set Tropicos, SPIRE, Rosario dbase to service_type_id = 2\n\ngit-svn-id: d46fe582d22b46b457d3ac1c55a88da2fbe913a1@1645 baf6b65b-9124-4dc3-b1c0-01155b4af546\n"
},
{
"from": "gpt",
"value": "<?php\n\n include_once(dirname(__FILE__) . \"/../../config/environment.php\... | php | chosen |
[
{
"from": "system",
"value": "Fix a call to environment->debug\n"
},
{
"from": "human",
"value": "<?php\nnamespace Infinario;\n\nclass SynchronousTransport implements Transport\n{\n public function postAndForget(Environment $environment, $url, $payload)\n {\n $this->post($environmen... | php | chosen |
[
{
"from": "human",
"value": "Add placeholder trait for caching mechanism\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Benrowe\\Laravel\\Widgets\\Traits;\n\n/**\n * Caching trait for Widgets\n *\n * By including this trait in with your widget, it will cache it's output\n *\n * @package Ben... | php | chosen |
[
{
"from": "human",
"value": "Add test for callback type.\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Search\\Test\\TestCase\\Type;\n\nuse Cake\\Core\\Configure;\nuse Cake\\ORM\\Entity;\nuse Cake\\ORM\\Table;\nuse Cake\\ORM\\TableRegistry;\nuse Cake\\TestSuite\\TestCase;\nuse Search\\Manage... | php | chosen |
[
{
"from": "human",
"value": "Add HTTP class to api directory\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n This class strictly deals with HTTP requests.\n It has no awareness of object classes and uses primitive types and arrays.\n*/\n\nclass HTTP {\n\n public static function respond ($statu... | php | chosen |
[
{
"from": "human",
"value": "Add server id column to b2sharebridge communities table\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace OCA\\B2shareBridge\\Migration;\n\nuse Closure;\nuse OCP\\DB\\ISchemaWrapper;\nuse OCP\\Migration\\SimpleMigrationStep;\nuse OCP\\Mi... | php | chosen |
[
{
"from": "human",
"value": "Add analytics library to better understand API usage."
},
{
"from": "gpt",
"value": "<?php\nrequire 'Slim/Middleware.php';\n\nclass AnalyticsMiddleware extends \\Slim\\Middleware\n{\n\tprivate $db_server = null;\n\tprivate $connectionInfo = array();\n\t\n\tpublic fun... | php | chosen |
[
{
"from": "human",
"value": "Add compiler with regular expression\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace KTemplate;\nclass Compiler {\n\t/**\n\t * Interpolation regular expression\n\t */\n\tconst INTERPOLATE = '/\\{([#%]|({))(.+)(?(2)\\}|\\1)}/U';\n\n\t/**\n\t * Number of currente lin... | php | chosen |
[
{
"from": "human",
"value": "Add benchmarking script to measure throughput\n\nSee also https://github.com/reactphp/stream/pull/41\n"
},
{
"from": "gpt",
"value": "<?php\n\n// Just start the server and connect to it. It will count the number of bytes\n// sent for each connection and will print th... | php | chosen |
[
{
"from": "human",
"value": "Add tests with 100% coverage for new GraphProperty algorithm"
},
{
"from": "gpt",
"value": "<?php\n\nuse Fhaculty\\Graph\\Graph;\nuse Fhaculty\\Graph\\Algorithm\\Property\\GraphProperty;\n\nclass PropertyGraphTest extends TestCase\n{\n public function testEmptyIsE... | php | chosen |
[
{
"from": "human",
"value": "Add some really simple (probably stupid) tests on version.php\n\ngit-svn-id: d0e296eae3c99886147898d36662a67893ae90b2@4148 653ae4dd-d31e-0410-96ef-6bf7bf53c507\n"
},
{
"from": "gpt",
"value": "<?php\r\n\r\nrequire_once dirname( dirname( dirname( __FILE__ ) ) ) . DIR... | php | chosen |
[
{
"from": "human",
"value": "TASK: Add migration for ComponentContext deprecation"
},
{
"from": "gpt",
"value": "<?php\nnamespace Neos\\Flow\\Core\\Migrations;\n\n/*\n * This file is part of the Neos.Flow package.\n *\n * (c) Contributors of the Neos Project - www.neos.io\n *\n * This package is... | php | chosen |
[
{
"from": "human",
"value": "Add make a wish to the Nova footer\n"
},
{
"from": "gpt",
"value": "<p class=\"mt-8 text-center text-xs text-80\">\n <a href=\"https://github.com/RoboJackets/apiary\">Made with ♥ by RoboJackets</a>\n <span class=\"px-1\">·</span>\n <a class=\"text-mut... | php | chosen |
[
{
"from": "human",
"value": "Add tests for accessing Links controller\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace App\\Test\\TestCase\\Controller;\n\nuse App\\Test\\TestCase\\Controller\\TatoebaControllerTestTrait;\nuse Cake\\Core\\Configure;\nuse Cake\\TestSuite\\IntegrationTestCase;\n\nc... | php | chosen |
[
{
"from": "human",
"value": "Add example for hyperloglog commands\n"
},
{
"from": "gpt",
"value": "<?php\nrequire_once __DIR__ . '/../vendor/autoload.php';\n\nuse Dazzle\\Loop\\Model\\SelectLoop;\nuse Dazzle\\Loop\\Loop;\nuse Dazzle\\Redis\\Redis;\n\n$loop = new Loop(new SelectLoop());\n//create... | php | chosen |
[
{
"from": "human",
"value": "Add automated test for Page Model.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace TCG\\Voyager\\Tests;\n\nuse TCG\\Voyager\\Models\\Page;\nuse Illuminate\\Support\\Facades\\Auth;\n\nclass PageTest extends TestCase\n{\n public function setUp()\n {\n ... | php | chosen |
[
{
"from": "human",
"value": "Add basic test for /reportbacks\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tests\\Http\\Api;\n\nuse Rogue\\Models\\Post;\nuse Rogue\\Models\\Signup;\nuse Tests\\BrowserKitTestCase;\n\nclass ReportbackApiTest extends BrowserKitTestCase\n{\n\n public functi... | php | chosen |
[
{
"from": "human",
"value": "Convert a word into digit values\n\nThe input will be \"one;two;three\", the output should be \"123\".\n"
},
{
"from": "gpt",
"value": "<?php\n$file_data = file_get_contents($argv[1]);\n // File Data \"Sanitation\"\n $file_data = str_replace(\"\\r\\n\",... | php | chosen |
[
{
"from": "human",
"value": "Add classes to add custom filters for post types and ID\n\nReference: #1, #2\n"
},
{
"from": "gpt",
"value": "<?php\ndefine( 'KATANA_WP_FILTER', 'intermediate_image_sizes' );\ndefine( 'KATANA_FILTER', 'katana_refine' );\nclass Katana {\n\tpublic function __construct(... | php | chosen |
[
{
"from": "human",
"value": "Add test for meta collection\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Frontend\\Core\\Tests\\Header;\n\nuse Frontend\\Core\\Header\\MetaCollection;\nuse Frontend\\Core\\Header\\MetaData;\nuse Frontend\\Core\\Header\\MetaLink;\n\nclass MetaCollectionTest ex... | php | chosen |
[
{
"from": "human",
"value": "Add exception in case invalid attachment type\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * This file is part of the MessageX PHP SDK package.\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this so... | php | chosen |
[
{
"from": "human",
"value": "Test database connection and access for TDD/sample data."
},
{
"from": "gpt",
"value": "<?php\n// Database Test Copyright 2014 by WebIS Spring 2014 License Apache 2.0\nrequire_once 'TDD/validator.php';\n\nclass MyTestCase extends WebIS\\Validator {\n\n\tprotected sta... | php | chosen |
[
{
"from": "system",
"value": "Remove php old version check"
},
{
"from": "human",
"value": "<?php\n/*\n $Id$\n\n osCommerce, Open Source E-Commerce Solutions\n http://www.oscommerce.com\n\n Copyright (c) 2003 osCommerce\n\n Released under the GNU General Public License\n*/\n\n if (STORE_PA... | php | chosen |
[
{
"from": "human",
"value": "Extend CI's input class to disable global xss filtering for some controllers\n"
},
{
"from": "gpt",
"value": "<?php defined('BASEPATH') || exit('No direct script access allowed');\n/*\n * Copyright (c) 2011 Karsten Heiken, Eike Foken\n *\n * Permission is hereby gran... | php | chosen |
[
{
"from": "human",
"value": "Add registration plate code extractor test\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 information... | php | chosen |
[
{
"from": "human",
"value": "Sort an array using a case insensitive 'natural orde' algorithm\n"
},
{
"from": "gpt",
"value": "\n<?php\n$array1 = $array2 = array('IMG0.png', 'img12.png', 'img10.png', 'img2.png', 'img1.png', 'IMG3.png');\n\nsort($array1);\necho \"Standard sorting\\n\";\nprint_r($a... | php | chosen |
[
{
"from": "human",
"value": "Add PHP page for running the new parser\n"
},
{
"from": "gpt",
"value": "<?php\n$exec = \"/usr/local/bin/node run.js\";\nexec($exec, $output);\necho \"<!doctype html>\\n<html>\\n<head></head>\\n<body>\\n<script>\\n\" . implode($output, \"\\n\") . \"\\n</script>\\n</b... | php | chosen |
[
{
"from": "human",
"value": "Add a script to generate JWT tokens\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once __DIR__.'/../code/libraries/koowa/libraries/koowa.php';\n\nKoowa::getInstance();\n\n$username = $argv[1];\n$secret = $argv[2];\n\necho KObjectManager::getInstance()->getObjec... | php | chosen |
[
{
"from": "human",
"value": "Add test for Async handler\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace ThisData\\Api\\RequestHandler;\n\nuse GuzzleHttp\\Client;\nuse GuzzleHttp\\Promise\\Promise;\nuse GuzzleHttp\\Psr7\\Request;\nuse ThisData\\Api\\ResponseManager\\AssuredResponseManager;\n\... | php | chosen |
[
{
"from": "human",
"value": "Add interface for key data builders\n"
},
{
"from": "gpt",
"value": "<?php declare(strict_types=1);\n\nnamespace hollodotme\\Readis\\Application\\ReadModel\\Interfaces;\n\nuse hollodotme\\Readis\\Application\\Interfaces\\ProvidesKeyInfo;\n\ninterface BuildsKeyData\n{... | php | chosen |
[
{
"from": "human",
"value": "Add ability to manipulate sources\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Stripe;\n\n/**\n * Class Source\n *\n * @package Stripe\n */\nclass Source extends ApiResource\n{\n /**\n * @param string $id The ID of the Source to retrieve.\n * @param... | php | chosen |
[
{
"from": "human",
"value": "Add test for email controller plugin\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Copyright (c) 2012-2014 Soflomo.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the... | php | chosen |
[
{
"from": "human",
"value": "Add tests for the content extentions themes page\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Backend\\Modules\\ContentBlocks\\Tests\\Action;\n\nuse Common\\WebTestCase;\n\nclass ThemesTest extends WebTestCase\n{\n public function testAuthenticationIsNeeded... | php | chosen |
[
{
"from": "human",
"value": "Drop ip column from short urls tables\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass DropIpColumn extends Migration\n{\n\n /**\n * Run the migrations.\n *\n ... | php | chosen |
[
{
"from": "human",
"value": "Add Timber support to theme\n"
},
{
"from": "gpt",
"value": "<?php\n \nuse Dedato\\SoluForce\\Setup;\n\n/* ==========================================================================\n Timber Setup\n ===============================================================... | php | chosen |
[
{
"from": "human",
"value": "Create a post handler for album downloads\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace duncan3dc\\Twitter\\Posts;\n\nuse function implode;\n\nclass Albums extends AbstractPost\n{\n public $hostname = \"http://twitter.com\";\n\n public function __construc... | php | chosen |
[
{
"from": "human",
"value": "Move logout to a view\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tsugi\\Views;\n\nuse Silex\\Application;\n\nuse \\Tsugi\\Crypt\\SecureCookie;\n\nclass Logout {\n\n const ROUTE = '/logout';\n\n public static function routes(Application $app, $prefix=se... | php | chosen |
[
{
"from": "human",
"value": "[Twig] Add URL twig extension to move reduce dependancy on Symfony (will look into a better way of doing this which does not repeat code)\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace HCLabs\\Bills\\Twig;\n\nuse Symfony\\Component\\Routing\\Generator\\UrlGenera... | php | chosen |
[
{
"from": "human",
"value": "Add a custom twig extension for exposing the raygun api key\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Raygunbundle package.\n *\n * (c) nietonfir <nietonfir@gmail.com>\n *\n * For the full copyright and license information, please view... | php | chosen |
[
{
"from": "human",
"value": "Move the ContentGadget to Site\n\n\nsvn commit r34631\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once 'Site/SiteGadget.php';\nrequire_once 'Swat/SwatString.php';\n\n/**\n * Displays arbitrary content\n *\n * Available settings are:\n *\n * - <code>text cont... | php | chosen |
[
{
"from": "human",
"value": "Add some basic tests for temperature plugin\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Phergie\n *\n * PHP version 5\n *\n * LICENSE\n *\n * This source file is subject to the new BSD license that is bundled\n * with this package in the file LICENSE.\n * It is a... | php | chosen |
[
{
"from": "human",
"value": "Fix sha1 hash length in database\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass FixHashLengthForUploadsTable extends Migration\n{\n /**\n * Run the migrations.\n... | php | chosen |
[
{
"from": "human",
"value": "Test console artisan command added\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace App\\Console\\Commands;\n\nuse Illuminate\\Console\\Command;\n\nclass testCommand extends Command {\n\n /**\n * The name and signature of the console command.\n *\n * @var s... | php | chosen |
[
{
"from": "human",
"value": "Implement slug map entity class.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @author Igor Nikolaev <igor.sv.n@gmail.com>\n * @copyright Copyright (c) 2015, Darvin Studio\n * @link https://www.darvin-studio.ru\n *\n * For the full copyright and license inf... | php | chosen |
[
{
"from": "human",
"value": "Create a cover download command for DergiPark journals\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace OkulBilisim\\OjsImportBundle\\Command;\n\nuse Jb\\Bundle\\FileUploaderBundle\\Entity\\FileHistory;\nuse OkulBilisim\\OjsImportBundle\\Helper\\ImportCommand;\nus... | php | chosen |
[
{
"from": "human",
"value": "Add currency pair class constant\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace DVE\\KrakenClient\\Constant;\n\nclass CurrencyPair\n{\n const BCHEUR = 'BCHEUR';\n const DASHEUR = 'DASHEUR';\n const DASHUSD = 'DASHUSD';\n const DASHXBT = 'DASHXBT... | php | chosen |
[
{
"from": "human",
"value": "Add initial premium plan collection\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Application\\Migrations;\n\nuse SimplyTestable\\BaseMigrationsBundle\\Migration\\EntityModificationMigration,\n SimplyTestable\\ApiBundle\\Entity\\Account\\Plan\\Plan, \n SimplyTe... | php | chosen |
[
{
"from": "human",
"value": "Add Image upload with Auth\n"
},
{
"from": "gpt",
"value": "<?php\n require_once('../../config.php');\n require_once('../main.php');\n $pdo = new PDO('mysql:host=' . $mysql[\"adress\"] . $mysql[\"port\"] .';dbname=' . $mysql[\"database\"], $mysql[\"user\"], ... | php | chosen |
[
{
"from": "human",
"value": "Add test case for create traittype command\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tests\\AppBundle\\Command;\n\nuse AppBundle\\Command\\CreateTraitTypeCommand;\nuse Symfony\\Bundle\\FrameworkBundle\\Console\\Application;\nuse Symfony\\Bundle\\FrameworkBu... | php | chosen |
[
{
"from": "human",
"value": "Add new test class for Administrative Area collections\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Galahad\\LaravelAddressing\\AdministrativeAreaCollection;\nuse Galahad\\LaravelAddressing\\Country;\n\n/**\n * Class AdministrativeAreaCollectionTest\n *\n * @author ... | php | chosen |
[
{
"from": "human",
"value": "Fix for unique identifier export\n"
},
{
"from": "gpt",
"value": "<?php\n /*********************************************************************************\n * Zurmo is a customer relationship management program developed by\n * Zurmo, Inc. Copyright (C) ... | php | chosen |
[
{
"from": "human",
"value": "Add auth controller\n - add login\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * This <skripsi.husni.co.io> project created by : \n * Name : syafiq\n * Date / Time : 03 December 2016, 6:07 PM.\n * Email : syafiq.rezpector@gmail.com\n * Github :... | php | chosen |
[
{
"from": "human",
"value": "Add Class for handle with requests\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Created by PhpStorm.\n * User: mauri870\n * Date: 29/02/16\n * Time: 22:16\n */\n\nnamespace Artesaos\\Zenvia;\n\n\nclass RequestManager\n{\n\n}"
}
] | php | chosen |
[
{
"from": "human",
"value": "Add migration file for v1.5.0\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace DoctrineMigrations;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\nuse Doctrine\\Migrations\\AbstractMigration;\n\n/**\n * Auto-generated Migration: Please modify t... | php | chosen |
[
{
"from": "system",
"value": "Add the URL to the exception messsage.\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace CommerceGuys\\Platform\\Cli\\Api;\n\nuse Guzzle\\Http\\Exception\\ClientErrorResponseException;\nuse Guzzle\\Service\\Client;\nuse Guzzle\\Http\\Message\\RequestInterface;\n... | php | chosen |
[
{
"from": "human",
"value": "Add a openerp console controller"
},
{
"from": "gpt",
"value": "<?php\nnamespace console\\controllers;\n\nuse Yii;\nuse yii\\console\\Controller;\nuse common\\models\\Company;\nuse yii\\helpers\\Security;\n\nclass OpenerpController extends Controller\n{\n public $... | php | chosen |
[
{
"from": "human",
"value": "Add migration for user salt\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": "Create a model for roles table\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace App;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Role extends Model\n{\n public function users()\n {\n \treturn $this->hasMany('App\\User');\n }\n}\n"
}
] | php | chosen |
[
{
"from": "human",
"value": "Add migration to swap E.164 mobile.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass SwapE164ForMobileField extends Migration\n... | php | chosen |
[
{
"from": "human",
"value": "Add migration to remove foreign keys\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nuse Symfony\\Component\\Console\\Output\\Consol... | php | chosen |
[
{
"from": "human",
"value": "Add some generic Calendar example\n"
},
{
"from": "gpt",
"value": "<?php\nuse \\Punic\\Calendar;\n\ninclude '../vendor/autoload.php';\n\n$dt = Calendar::toDateTime('2010-03-07');\n\n// This will output `AD`\necho Calendar::getEraName(1);\n\n// This will output `Mar`\... | php | chosen |
[
{
"from": "system",
"value": "Define a default value for the number of values used to populate KEYS.\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Predis\\Commands;\n\nabstract class ScriptedCommand extends ServerEval {\n public abstract function getScript();\n\n public abstract fu... | php | chosen |
[
{
"from": "human",
"value": "Add radio support using TuneIn\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace duncan3dc\\Sonos\\Services;\n\nuse duncan3dc\\DomParser\\XmlParser;\nuse duncan3dc\\Sonos\\Controller;\nuse duncan3dc\\Sonos\\Tracks\\Stream;\n\n/**\n * Handle radio streams using Tune... | php | chosen |
[
{
"from": "human",
"value": "Add dummy trait for testing\n"
},
{
"from": "gpt",
"value": "<?php;\n\n/**\n * Dummy Trait\n *\n * To be used for testing only!\n *\n * @author Alin Eugen Deac <aedart@gmail.com>\n */\ntrait DummyTrait\n{\n /**\n * Name of something\n *\n * @var string... | php | chosen |
[
{
"from": "system",
"value": "Change identifier of user id by return of method getAuthIdentifier()\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Laravel\\Passport\\Bridge;\n\nuse RuntimeException;\nuse Illuminate\\Contracts\\Hashing\\Hasher;\nuse League\\OAuth2\\Server\\Entities\\ClientE... | php | chosen |
[
{
"from": "human",
"value": "provider: Add trait for JIRA service\n\nThis trait add a method to get a issue walker from a JQL query.\n\nExample:\n$app->issueWalker('assignee = currentUser() DESC');\n"
},
{
"from": "gpt",
"value": "<?php namespace komenco\\provider\\traits;\n/*\n * Copyright (C) ... | php | chosen |
[
{
"from": "human",
"value": "Add new formtype file for lsitem additional fields.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace App\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\n\nclass LsItemAdditionalFieldType extends Abs... | php | chosen |
[
{
"from": "human",
"value": "Add started column to game table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass AddStartedGameColumn extends AbstractMigration\n{\n /**\n * Change Method.\n *\n * Write your reversible migrations using this ... | php | chosen |
[
{
"from": "human",
"value": "Add common auth common lang\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * This <server-gardu-reporter> project created by :\n * Name : syafiq\n * Date / Time : 28 June 2017, 10:16 AM.\n * Email : syafiq.rezpector@gmail.com\n * Github : syafiqq... | php | chosen |
[
{
"from": "human",
"value": "Add task base class for Drupal Console chain execution tasks\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Drubo\\Robo\\Task\\DrupalConsole;\n\n/**\n * Robo task base class for Drupal Console chain execution tasks.\n */\nabstract class ExecChain extends Exec {\... | php | chosen |
[
{
"from": "human",
"value": "Test the subscribe request 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\\SubscribeRequestPacket;\nuse BinSoul\\Net\\Mqtt\\Pa... | php | chosen |
[
{
"from": "human",
"value": "Add command to validate mapping\n"
},
{
"from": "gpt",
"value": "<?php\r\n\r\nnamespace Doctrine\\ODM\\MongoDB\\Tools\\Console\\Command\\Schema;\r\n\r\nuse Doctrine\\Common\\Cache\\VoidCache;\r\nuse Doctrine\\ODM\\MongoDB\\DocumentManager;\r\nuse Symfony\\Component\\... | php | chosen |
[
{
"from": "human",
"value": "Add tests for connection profile steup step\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Contains Class TestInitialSetupConnectionProfile.\n *\n * @package WP-Auth0\n *\n * @since 4.0.0\n */\n\n/**\n * Class TestInitialSetupConnectionProfile.\n */\nclass TestIniti... | php | chosen |
[
{
"from": "human",
"value": "Add a socket wait test script\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Aurora - A HTTP Application Server of PHP Script\n *\n * @author panlatent@gmail.com\n * @link https://github.com/panlatent/aurora\n * @license https://opensource.org/licenses/MIT\n */\... | php | chosen |
[
{
"from": "human",
"value": "Add switch to handle database response differently depending on version.\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass Renderobject extends Resultset { \n# TODO find out why this is different than Resultset and merge or extend\n\t\n\tvar $title = 'Results'; \n v... | php | chosen |
[
{
"from": "human",
"value": "Test case: resolve target document listener\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Doctrine\\ODM\\MongoDB\\Tests\\Tools;\n\nuse Doctrine\\ODM\\MongoDB\\Events;\nuse Doctrine\\ODM\\MongoDB\\Tools\\ResolveTargetDocumentListener;\nuse Doctrine\\ODM\\MongoDB... | php | chosen |
[
{
"from": "human",
"value": "Add plugin to upload file from remote url\n\nAdd plugin to upload file from remote url. Usage: Storage::putRemoteFile($storagePath, $remoteUrl, $options)"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Created by jacob.\n * User: jacob\n * Date: 16/5/20\n * Time: 下午8:3... | php | chosen |
[
{
"from": "human",
"value": "Remove uniqueness from player token\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass RemoveUniquenessFromPlayerToken extends AbstractMigration\n{\n public function up()\n {\n $player = $this->table('player');\n\... | php | chosen |
[
{
"from": "human",
"value": "Add is_valid flag to report\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Fuel\\Migrations;\n\nclass Alter_is_valid\n{\n public function up()\n {\n \\DBUtil::add_fields('reports', array(\n 'is_valid' => array('type' => 'boolean'),\n ... | php | chosen |
[
{
"from": "human",
"value": "Add beginning of mustache class implementation\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * Mustache PHP Compiler\n *\n * This is a straight port of the ruby mustache compiler.\n *\n * (c) July 2011 - Manuel Odendahl - wesen@ruinwesen.com\n */\n\nclass Mustache {... | php | chosen |
[
{
"from": "human",
"value": "Add test to verfy PHP behavior.\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare (strict_types = 1);\n\nnamespace Crell\\Document\\Document\\Test;\n\nclass AccessTest extends \\PHPUnit_Framework_TestCase\n{\n public function testHydrate()\n {\n $s = Sup... | php | chosen |
[
{
"from": "human",
"value": "Add simple callable proxy for slim::halt\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @copyright ©2014 Quicken Loans Inc. All rights reserved. Trade Secret,\n * Confidential and Proprietary. Any dissemination outside of Quicken Loans\n * is strictly prohibit... | php | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.