conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add the Request class tests\n"
},
{
"from": "gpt",
"value": "<?php\nclass RequestTest extends PHPUnit_Framework_TestCase\n{\n public function testSetup()\n {\n $filename = \"test.php\";\n $method = \"POST\";\n $host = \"www.test.com\";\n ... | php | chosen |
[
{
"from": "human",
"value": "Allow update of some fields\n"
},
{
"from": "gpt",
"value": "<?php\n\n namespace App\\Http\\Requests\\Admin;\n\n use Illuminate\\Support\\Facades\\Auth;\n use Illuminate\\Foundation\\Http\\FormRequest;\n\n /**\n * Class UpdateUser\n *\n * @pac... | php | chosen |
[
{
"from": "human",
"value": "Add example printing all functions and types from given WSDL"
},
{
"from": "gpt",
"value": "<?php\n\nuse Clue\\React\\Soap\\Factory;\nuse Clue\\React\\Soap\\Proxy;\nuse Clue\\React\\Soap\\Client;\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\n$loop = React\\Event... | php | chosen |
[
{
"from": "human",
"value": "Add an example test to show \"real world\" usage\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Lstr\\Upcrypto;\n\nuse Lstr\\Upcrypto\\CryptoVersionLoader\\ArrayCryptoVersionLoader;\nuse PHPUnit_Framework_TestCase;\n\nclass ExampleTest extends PHPUnit_Framework_... | php | chosen |
[
{
"from": "human",
"value": "Add main class with static functions to convert dates\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace GeniusTS\\HijriDate;\n\n\nuse Carbon\\Carbon;\n\n/**\n * Class Hijri\n *\n * @package GeniusTS\\HijriDate\n */\nclass Hijri\n{\n\n /**\n * Convert Gregori... | php | chosen |
[
{
"from": "human",
"value": "Add request to month report\n"
},
{
"from": "gpt",
"value": "<?php\ninclude_once 'db_queries.php';\nif(!isset($_REQUEST['region'])) {\n $rregion = ''; \n} else {\n $rregion = $_REQUEST['region'];\n}\n\nif($_REQUEST[\"report\"] == \"total\") {\n\techo json_encode(ge... | php | chosen |
[
{
"from": "human",
"value": "Create a class to hold future SQL query parameters\n\nThis class will hold parameters for prepared statements. Parameters are\ngenerated so that they do not repeat when creating the final prepared\nstatement to be executed at the database.\n"
},
{
"from": "gpt",
"val... | php | chosen |
[
{
"from": "human",
"value": "Introduce CLI for migrating institution configurations\n\nWe need this in order to be able to case-insensitively deal with InstitutionConfigurationIds\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * Copyright 2017 SURFnet B.V.\n *\n * Licensed under the Apache Lice... | php | chosen |
[
{
"from": "human",
"value": "Add rudimentary unit test for z_mime_content_type.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * this file contains tests for the uploader\n * \n * @package test.util\n */\n\n/** required, it is the file under test */\nrequire_once('include/attach.php');\n\n/**\n *... | php | chosen |
[
{
"from": "human",
"value": "Add test for shopping session manager\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Created by enea dhack - 13/06/2017 08:44 PM\n */\n\nnamespace Enea\\Tests;\n\nuse Enea\\Cashier\\ShoppingCard;\nuse Enea\\Cashier\\ShoppingManager;\nuse Enea\\Tests\\Models\\BuyerMo... | php | chosen |
[
{
"from": "human",
"value": "Add Rollback command as alias.\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n * This file is part of the Magallanes package.\n*\n* (c) Andrés Montañez <andres@andresmontanez.com>\n*\n* For the full copyright and license information, please view the LICENSE\n* file that... | php | chosen |
[
{
"from": "human",
"value": "Implement the essential verification object\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Nietonfir\\Google\\ReCaptchaBundle\\DependencyInjection\\ReCaptcha;\n\nuse Nietonfir\\Google\\ReCaptchaBundle\\Api\\RequestDataWrapperInterface;\nuse Nietonfir\\Google\\Re... | php | chosen |
[
{
"from": "human",
"value": "Add constant scalar expressions demo.\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * Constant scalar expressions allow you to define constants as the result of\n * a scalar expression. The expression may involve other constants.\n *\n * All arithmetic operators ar... | php | chosen |
[
{
"from": "human",
"value": "Add Retry from csv api command\n"
},
{
"from": "gpt",
"value": "<?php\n\nfunction _civicrm_api3_notification_log_retryfromcsv_spec(&$params) {\n $params['csv']['api.required'] = TRUE;\n $params['payment_processor']['api.required'] = TRUE;\n // @Todo: Additional pa... | php | chosen |
[
{
"from": "human",
"value": "Add metrics class to library\n"
},
{
"from": "gpt",
"value": "<?php\n\tnamespace Bolt;\n\n\tclass Metrics extends Base\n\t{\n\t\tpublic $success = false;\n\t\tpublic $message;\n\t\tpublic $data;\n\n\t\tpublic function __toString()\n\t\t{\n\t\t\treturn (string)$this->... | php | chosen |
[
{
"from": "human",
"value": "Add annoted document for Unit Tests\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Plemi\\Bundle\\BoomgoBundle\\Tests\\Documents;\n\n/**\n * Annotation class comment\n * \n * @author John Doe <john@doe.com>\n * @Boomgo({\"type\": \"Document\", \"connection\": \"... | php | chosen |
[
{
"from": "human",
"value": "test: Add test for new OS class\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace nochso\\Omni\\Test;\n\nuse nochso\\Omni\\OS;\n\nclass OSTest extends \\PHPUnit_Framework_TestCase\n{\n public function isWindowsProvider()\n {\n return [\n [tr... | php | chosen |
[
{
"from": "human",
"value": "Add test stub for an ArrayAccess(ible) object\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Bstoots\\WOX\\Tests\\Stubs;\n\nuse Bstoots\\WOX\\Contracts\\ArrayAccess;\n\nclass Building implements ArrayAccess {\n \n /**\n * @var array\n */\n protected $data... | php | chosen |
[
{
"from": "human",
"value": "Add the custom search form template.\n\ngit-svn-id: 71ac0145df79e26b076d62e50011532b62ebd840@82 9841916d-1f77-4d57-ab71-7f08b6dd89e2\n"
},
{
"from": "gpt",
"value": "<form role=\"search\" method=\"get\" id=\"searchform\" action=\"<?php echo home_url(); ?>\">\n\t<labe... | php | chosen |
[
{
"from": "human",
"value": "Add file AbstracModel.php from main Subscribo project - part vendor/subscribo/modelbase/src/Subscribo/ModelBase into doc/examples\nand modified\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace App\\Models\\ModelBase;\n\nuse Illuminate\\Database\\Eloquent\\Model as... | php | chosen |
[
{
"from": "human",
"value": "Add replace if hit function test in App class.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Hikouki\\Stigma\\PHPUnit;\n\nuse PHPUnit_Framework_TestCase;\nuse Hikouki\\Stigma\\App;\nuse Closure;\n\nclass AppTest extends PHPUnit_Framework_TestCase\n{\n public... | php | chosen |
[
{
"from": "human",
"value": "Add a script to periodically delete all visits older than 3 months\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Delete visits older than 3 months\n */\n\nif(php_sapi_name() !== 'cli') {\n\tdie('CLI only');\n}\n\ndate_default_timezone_set('Europe/London');\n\nrequi... | php | chosen |
[
{
"from": "human",
"value": "Change to phitly account for tests.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n* @package Phitly\n*/\n\nerror_reporting(-1);\nini_set('display_errors', 1);\n\n// Date setup\ndate_default_timezone_set('America/Vancouver');\n\nfunction get_credentials() {\n\treturn (... | php | chosen |
[
{
"from": "human",
"value": "Add magic method syntax tests\n"
},
{
"from": "gpt",
"value": "// SYNTAX TEST \"Packages/php-grammar/PHP.tmLanguage\"\n<?php\n\nclass x\n{\n public function __foobar()\n// ^^^^^^^^ -support.function.magic.php\n {}\n\n public function __const... | php | chosen |
[
{
"from": "human",
"value": "Add Unit tests for Revoke route\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace ChadicusTest\\Slim\\OAuth2\\Routes;\n\nuse Chadicus\\Slim\\OAuth2\\Routes\\Revoke;\n\n/**\n * Unit tests for the \\Chadicus\\Slim\\OAuth2\\Routes\\Revoke class.\n *\n * @coversDefault... | php | chosen |
[
{
"from": "human",
"value": "Standardize save to json php\n"
},
{
"from": "gpt",
"value": "<?php\n\t$filename = $_SERVER['DOCUMENT_ROOT'] . $_POST['file'];\n\t$decoded = base64_decode($_POST['json']);\n\t$jsonFile = fopen($filename,'w') or die(\"Unable to open file!\");\n\tfwrite($jsonFile,$deco... | php | chosen |
[
{
"from": "human",
"value": "Allow view routes for pages\n"
},
{
"from": "gpt",
"value": "<?php namespace Anomaly\\PagesModule\\Page;\n\nuse Anomaly\\PagesModule\\Page\\Contract\\PageInterface;\nuse Anomaly\\Streams\\Platform\\Entry\\EntryRouter;\n\n/**\n * Class PageRouter\n *\n * @link http:... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for domain object EventStatus\n"
},
{
"from": "gpt",
"value": "<?php declare(strict_types=1);\n\nnamespace CultuurNet\\UDB3\\Event\\ValueObjects;\n\nuse CultuurNet\\UDB3\\Model\\ValueObject\\Translation\\Language;\nuse PHPUnit\\Framework\\TestCase;\n\nc... | php | chosen |
[
{
"from": "human",
"value": "Add a commit helper to get URL, and branch url\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Criterion\\Helper;\n\nclass Commit\n{\n public static function getURL($commit, $repo)\n {\n \tif (strpos($repo, 'github.com') !== false)\n \t{\n \t\treturn... | php | chosen |
[
{
"from": "human",
"value": "[DI][Routing] Fix tracking of globbed resources\n\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LICE... | php | chosen |
[
{
"from": "human",
"value": "Test documentation example for Attr\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Gt\\Dom;\n\nuse Gt\\Dom\\TokenList;\n\nclass AttrTest extends \\PHPUnit_Framework_TestCase {\n\npublic function testAttrMove() {\n\t$document = new HTMLDocument(test\\Helper::DOCS_A... | php | chosen |
[
{
"from": "human",
"value": "Add support for ini files\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace RocketTheme\\Toolbox\\File;\n\n/**\n * Implements INI File reader.\n *\n * @package RocketTheme\\Toolbox\\File\n * @author RocketTheme\n * @license MIT\n */\nclass IniFile extends File\n{\n ... | php | chosen |
[
{
"from": "system",
"value": "Test should test projects, not tickets\n"
},
{
"from": "human",
"value": "<?php\n$I = new AcceptanceTester($scenario);\n$I->wantTo('ensure that the projects index works');\nTestCommonAdmin::logMeIn($I);\n$I->amOnPage('/tickets');\n$I->see('Title', 'th');\n$I->see('U... | php | chosen |
[
{
"from": "human",
"value": "Remove the Masonry lib used in Twenty-Thirteen\n\nIt seems an overkill to use this lib for a footer with just a couple of\nwidgets and it even makes laying them out harder.\n\nFollowed the instructions here to deactivate it:\nhttp://slobodanmanic.com/444/flexible-horizontal-side... | php | chosen |
[
{
"from": "human",
"value": "Throw exception if connection fails\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Michaels\\Spider\\Drivers;\n\nuse Exception;\n\n/**\n * Exception for broken or refused connection\n * @package Michaels\\Spider\\Drivers\n */\nclass ConnectionException extends Exc... | php | chosen |
[
{
"from": "human",
"value": "Add interface for applications using plugins\n\nAdding another interface will let applications not use plugins if they\ndon't want to, and also customize how their plugin hooks are implemented\nif they really need to.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * C... | php | chosen |
[
{
"from": "human",
"value": "Test for SPIRE connector API.\n\ngit-svn-id: d46fe582d22b46b457d3ac1c55a88da2fbe913a1@1633 baf6b65b-9124-4dc3-b1c0-01155b4af546\n"
},
{
"from": "gpt",
"value": "<?php\nrequire_library('connectors/SpireAPI');\nclass test_connector_spire_api extends SimpletestUnitBase\... | php | chosen |
[
{
"from": "human",
"value": "Update model untuk modul topic\n"
},
{
"from": "gpt",
"value": "<?php \n\nclass Model_topic extends CI_Model \n{\n function save($data)\n {\n if($this->db->insert('topics',$data)){\n return TRUE;\n } else {\n return FALSE;\n ... | php | chosen |
[
{
"from": "human",
"value": "Add tests for occ apps:list\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 mo... | php | chosen |
[
{
"from": "human",
"value": "Add simple test for Modules\\Cron\\Job class.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @package BC Security\n */\n\nnamespace BlueChip\\Security\\Tests\\Cases\\Modules\\Cron;\n\nuse BlueChip\\Security\\Modules\\Cron;\n\nclass JobTest extends \\BlueChip\\Securi... | php | chosen |
[
{
"from": "human",
"value": "Add interface for storage classes to enforce consistent API\n"
},
{
"from": "gpt",
"value": "<?php if ( ! defined('DENY_ACCESS')) exit('403: No direct file access allowed');\n\n/**\n * A Bright CMS\n * \n * Open source, lightweight, web application framework and cont... | php | chosen |
[
{
"from": "human",
"value": "Update model untuk CRUD FAQ\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass Model_faq extends CI_Model\n{\n public function save($data)\n {\n $insert = $this->db->insert('faq', $data);\n if($insert){\n return TRUE;\n }else{\n ... | php | chosen |
[
{
"from": "human",
"value": "Update area of Camp Triggerfish\n\nSigned-off-by: AIZAWA Hina <07c779d48779c322a7c5324109202f9012f7aebf@bouhime.com>\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @copyright Copyright (C) 2015-2018 AIZAWA Hina\n * @license https://github.com/fetus-hina/stat.ink/blo... | php | chosen |
[
{
"from": "human",
"value": "Add tests to cover prompt/select\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Zend Framework (http://framework.zend.com/)\n *\n * @link http://github.com/zendframework/zf2 for the canonical source repository\n * @copyright Copyright (c) 2005-2013 Zend Technol... | php | chosen |
[
{
"from": "human",
"value": "Add a sample to create an issue\n"
},
{
"from": "gpt",
"value": "<?php\ninclude dirname( dirname( __FILE__ ) ) . '/MantisPhpClient.php';\n\n# TODO:\n# Set the username\n# Set the api token or password\n# Set the project name\n# Set the url\n#\n# For information about... | php | chosen |
[
{
"from": "human",
"value": "Create Moip\\Exceptions and class for the 401 exception\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Moip\\Exceptions;\n\n\n/**\n * Class AuthException\n *\n * This exception is thrown when the Moip API returns a 401 http code.\n * The error message was extracte... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for Account API\n"
},
{
"from": "gpt",
"value": "<?php\nrequire_once 'vendor/autoload.php';\n\ndescribe('Account API', function () {\n\n $this->url = 'http://localhost:8000/api/account.php';\n\n describe('get list', function () {\n $headers = array... | php | chosen |
[
{
"from": "human",
"value": "Add some fields and php docs\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * (c) Smalte - 2012 ~ Until the end of the world...\n *\n * Julien Breux <julien@smalte.org>\n * Fabien Serny <fabien@smalte.org>\n * Grégoire Poulain <gregoire@smalte.org>\n * Alain Folletet... | php | chosen |
[
{
"from": "human",
"value": ":sparkles: Add new factory for RequestConfig.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Risan\\OAuth\\Request;\n\nuse Risan\\OAuth1\\Config;\nuse Risan\\OAuth1\\Signature\\HmacSha1Signer;\n\nclass RequestConfigFactory\n{\n public static function create(a... | php | chosen |
[
{
"from": "human",
"value": "Add migration to fix missing primary keys\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass FixPrimaryKeys extends Migration\n{\... | php | chosen |
[
{
"from": "human",
"value": "Add initial hosts page template\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n Template Name: Hosts Page\n *\n * This is your custom page template. You can create as many of these as you need.\n * Simply name is \"page-whatever.php\" and in add the \"Template Name\" ti... | php | chosen |
[
{
"from": "human",
"value": "Add enable'able interface for entities\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @package johnpancoast/php-common\n * @copyright (c) 2015-2017 John Pancoast\n * @license MIT\n */\n\nnamespace Pancoast\\Common\\Entity;\n\n/**\n * Contract for entitie... | php | chosen |
[
{
"from": "human",
"value": "Test sur l'object de configuration et les cépages autorisé\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once(dirname(__FILE__).'/../bootstrap/common.php');\n\n$t = new lime_test(3);\n$t->comment(\"Tests du document de Configuration\");\n\n$t->comment(\"Tests sur... | php | chosen |
[
{
"from": "human",
"value": "Add test cases for JsonHelper\n"
},
{
"from": "gpt",
"value": "<?php\nuse fproject\\amqp\\ActivityNoticeSerializer;\nuse fproject\\amqp\\JsonHelper;\n\ninclude_once('TestModel01.php');\ninclude_once('TestModel02.php');\nclass JsonHelperTest extends PHPUnit_Framework_... | php | chosen |
[
{
"from": "human",
"value": "[TASK] Add doctrine migration for entities\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace TYPO3\\Flow\\Persistence\\Doctrine\\Migrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration,\n\tDoctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Auto-generated Migration: ... | php | chosen |
[
{
"from": "human",
"value": "Add ACL default value for entity_table\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Civi\\Api4\\Service\\Spec\\Provider;\n\nuse Civi\\Api4\\Service\\Spec\\RequestSpec;\n\nclass ACLCreationSpecProvider implements Generic\\SpecProviderInterface {\n\n /**\n * ... | php | chosen |
[
{
"from": "human",
"value": "Add order email attachment download\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * [RO] Descarca un atasament aferent email-ului unei comenzi si informatii relevante despre acesta (https://github.com/celdotro/marketplace/wiki/Descarca-atasamentul-email-ului-comenzii... | php | chosen |
[
{
"from": "human",
"value": "Add (lame) spec for broken matchers\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Spec\\PHPSpec\\Specification;\n\nuse \\PHPSpec\\Specification\\CustomMatcher;\n\nrequire_once \"PHPSpec/Matcher/Functions.php\";\n\nclass ExampleCustomMatcherMatchSuccessful exten... | php | chosen |
[
{
"from": "human",
"value": "Improve code coverage for Message.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Copyright 2012 Splunk, Inc.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\"): you may\n * not use this file except in compliance with the License. You may obta... | php | chosen |
[
{
"from": "human",
"value": "Add test for css library response\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass CM_Response_Resource_Css_LibraryTest extends CMTest_TestCase {\n\n public function testProcess() {\n $render = new CM_Frontend_Render(new CM_Frontend_Environment());\n ... | php | chosen |
[
{
"from": "human",
"value": "Add task base class for encapsulated command executions\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Drubo\\Robo\\Task\\Base;\n\nuse Drubo\\DruboAwareTrait;\nuse Robo\\Task\\BaseTask;\nuse Robo\\TaskAccessor;\n\n/**\n * Robo task base class for encapsulated co... | php | chosen |
[
{
"from": "human",
"value": "Add support for SelectableOption input.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace ProcessWire\\GraphQL\\Type\\Enum;\n\nuse Youshido\\GraphQL\\Type\\Enum\\AbstractEnumType;\nuse ProcessWire\\Field;\n\nclass SelectableOptionEnumType extends AbstractEnumType {... | php | chosen |
[
{
"from": "human",
"value": "Test coverage added for Deposit entity.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Opteck\\Tests;\n\nuse Opteck\\Entities\\Deposit;\nuse Opteck\\Payload;\nuse Opteck\\Responses\\GetDeposits;\n\nclass EntitiesTest extends TestCase\n{\n public function test... | php | chosen |
[
{
"from": "human",
"value": "[Migration] Add nullable for product price\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace DoctrineMigrations;\n\nuse Doctrine\\DBAL\\Schema\\Schema;\nuse Doctrine\\Migrations\\AbstractMigration;\n\nfinal class Version20200916093101 ex... | php | chosen |
[
{
"from": "human",
"value": "Add a convenience class for eventdatetime & event details in one"
},
{
"from": "gpt",
"value": "<?php\nnamespace UNL\\UCBCN\\Frontend;\n\nuse UNL\\UCBCN\\Event\\Occurrence;\n\nclass EventInstance\n{\n /**\n * The event date & time record\n *\n * @var \... | php | chosen |
[
{
"from": "human",
"value": "Add test case for Cast utility\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Buybrain\\Buybrain\\Util;\n\nuse PHPUnit\\Framework\\TestCase;\n\nclass CastTest extends TestCase\n{\n public function testCastToString()\n {\n $this->assertEquals('abc', Ca... | php | chosen |
[
{
"from": "human",
"value": "Add IoC destroyer test helper trait\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Aedart\\Scaffold\\Resolvers\\IoC;\n\n/**\n * IoC Destroyer\n *\n * @author Alin Eugen Deac <aedart@gmail.com>\n */\ntrait IoCDestroyer\n{\n\n /**\n * Destroy the IoC\n *\n ... | php | chosen |
[
{
"from": "human",
"value": "Rename 'password' fields to 'password_hash' for clarity.\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass RenamePasswordFields extends AbstractMigration\n{\n public function change()\n {\n $userTable = $this->ta... | php | chosen |
[
{
"from": "human",
"value": "Add a test for SEO Helper\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Concrete\\Tests\\Core\\Html\\Service;\n\nclass SeoTest extends \\PHPUnit_Framework_TestCase\n{\n public function testSeoTitle()\n {\n $seo = new \\Concrete\\Core\\Html\\Service\\... | php | chosen |
[
{
"from": "human",
"value": "Create script printing controller name based on URL\n\nSummary:\nWith this script, I am able to add bookmarklet to my browser which edits the\ncontroller responsible for displaying current page by a single click.\nPlus it can be useful also for other uses.\n\nTest Plan:\n ./aph... | php | chosen |
[
{
"from": "human",
"value": "Add a class for setUpBeforeClass event\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace pyd\\testkit\\events;\n\n/**\n * Event triggered by {@see pyd\\testkit\\TestCase::setUpBeforeClass()}.\n *\n * @author Pierre-Yves DELETTRE <pierre.yves.delettre@gmail.com>\n */\... | php | chosen |
[
{
"from": "human",
"value": "Add test for type hints\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Psalm\\Tests;\n\nuse PhpParser;\nuse PhpParser\\ParserFactory;\nuse PHPUnit_Framework_TestCase;\nuse Psalm\\Context;\nuse Psalm\\Checker\\TypeChecker;\nuse Psalm\\Type;\n\nclass Php70Test ext... | php | chosen |
[
{
"from": "human",
"value": "Create tamplates for Cisco vNAM"
},
{
"from": "gpt",
"value": "<?php\n# vim: syntax=php tabstop=4 softtabstop=0 noexpandtab laststatus=1 ruler\n\n/**\n * html/templates/vnam.php\n *\n * Cisco vNAM template for UNetLab.\n *\n * LICENSE:\n *\n * This file is part of UN... | php | chosen |
[
{
"from": "system",
"value": "Fix template insertion in twig.form.resources\n\nWe can't be sure that the core template will be in first position (see https://github.com/symfony-cmf/RoutingExtraBundle/pull/48/files#r2514138)\r\n\r\nNow the core template is searched and if it exists, mopa's template is insert... | php | chosen |
[
{
"from": "human",
"value": "Add new service for extracting content from URLs.\n"
},
{
"from": "gpt",
"value": "<?php namespace App\\Services;\n\nuse Goose\\Client as GooseClient;\nuse Readability;\nuse \\Log;\n\nclass ContentExtractor {\n\n\n /**\n * @var \\GuzzleHttp\\Client $httpClient... | php | chosen |
[
{
"from": "human",
"value": "Add functionality to get NetVend settings via HTTP.\n"
},
{
"from": "gpt",
"value": "<?php\nrequire('config.php');\n\necho json_encode(array(\n 'deposit_address' => DEPOSIT_ADDRESS,\n 'deposit_confirmation' => DEPOSIT_CONFIRMATIONS,\n 'fee_per_byte' => FEE_P... | php | chosen |
[
{
"from": "human",
"value": "Add new example for isset and array_key_exists\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once __DIR__.'/../vendor/autoload.php';\n\n/*\n * You can use an closure or a class that implements TestInterface.\n *\n * Data that will be processed by the tested funct... | php | chosen |
[
{
"from": "human",
"value": "Add \"null\" task - which does not do anything\n\nNeeded a dummy task for testing certain conditions in the task\nrunner. Therefore, a null task has been added, which might just be\nuseful in a few very specific situations\n"
},
{
"from": "gpt",
"value": "<?php names... | php | chosen |
[
{
"from": "human",
"value": "Add test for Extracts class\n"
},
{
"from": "gpt",
"value": "<?php\n/*\nCopyright 2002-2012 MarkLogic Corporation. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the Lice... | php | chosen |
[
{
"from": "human",
"value": "Add unit test for helper.\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n *\n *\n * @author Sam Schmidt <samuel@dersam.net>\n * @since 2015-12-15\n * @company Linus Shops\n */\nclass LinusCanadaPostHelperDataTest extends PHPUnit_Framework_TestCase\n{\n public func... | php | chosen |
[
{
"from": "human",
"value": "Add a home page template\n\nTo use this for your home page, please follow these instructions:\n* Login to the admin dashboard\n* Go to the settings option in the main left-side navigation menu and select the “reading” option.\n* Tick the option for a static home page and find yo... | php | chosen |
[
{
"from": "human",
"value": "Add Kosovo phone number specifications\n\nhttp://en.wikipedia.org/wiki/Telephone_numbers_in_Kosovo"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Zend Framework (http://framework.zend.com/)\n *\n * @link http://github.com/zendframework/zf2 for the canonical sourc... | php | chosen |
[
{
"from": "human",
"value": "Add `update:netx` to fill out `netx_uuid` [WEB-1892]\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace App\\Console\\Commands\\Update;\n\nuse App\\Models\\Collections\\Asset;\n\nuse Aic\\Hub\\Foundation\\AbstractCommand as BaseCommand;\n\nclass UpdateNetx extends B... | php | chosen |
[
{
"from": "human",
"value": "Add google street view test\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace ZpgRtf\\Tests\\Objects;\n\nuse PHPUnit\\Framework\\TestCase;\nuse ZpgRtf\\Objects\\CoordinatesObject;\nuse ZpgRtf\\Objects\\GoogleStreetViewObject;\n\nclass GoogleStreetViewObjectTest ext... | php | chosen |
[
{
"from": "human",
"value": "Add fieldset class needed by Zend\\Form\\FormTest::testPreserveEntitiesBoundToCollectionAfterValidation\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace ZendTest\\Form\\TestAsset;\n\nclass ProductCategoriesFieldset extends ProductFieldset\n{\n public function _... | php | chosen |
[
{
"from": "human",
"value": "Add an (unsupported) sample application for the Google Contacts API.\n\n\n\ngit-svn-id: 6c6eb0d3cc6e8d5f6d3a0c71e6b3abc7e9845ff1@371 6c5fc399-1a2c-022f-82ce-feb0d0b4916c\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n * Copyright 2012 Google Inc.\n *\n * Licensed under ... | php | chosen |
[
{
"from": "human",
"value": "[Exception] Create exception if no command handler exists to handle command\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace HCLabs\\Bills\\Exception;\n\nclass NoCommandHandlerFoundException extends \\Exception\n{\n public function __construct()\n {\n ... | php | chosen |
[
{
"from": "human",
"value": "[zen-18] Add date format view helper\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Zend Framework\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.txt.\n * It is also available thro... | php | chosen |
[
{
"from": "human",
"value": "Move product type list to the left\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * @author Nikolai Kordulla\n */\nclass PBString extends PBScalar\n{\n\tvar $wired_type = PBMessage::WIRED_LENGTH_DELIMITED;\n\n\t/**\n\t * Parses the message for this type\n\t *\n\t * @p... | php | chosen |
[
{
"from": "human",
"value": "Introduce util for serialising and deserialising objects\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Copyright (c) 2020, Nosto Solutions Ltd\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification,\n * are ... | php | chosen |
[
{
"from": "human",
"value": "Add test for DDC-1436 and DDC-1452 showing they are the same issues\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Doctrine\\Tests\\ORM\\Functional\\Ticket;\nuse Doctrine\\ORM\\UnitOfWork;\n\n/**\n * @group DDC-1436\n */\nclass DDC1436Test extends \\Doctrine\\Te... | php | chosen |
[
{
"from": "human",
"value": "III-1344: Add a projector to build the organizer_website projection\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace CultuurNet\\UDB3\\Organizer\\ReadModel\\Search;\n\nuse Broadway\\Domain\\DomainMessage;\nuse Broadway\\EventHandling\\EventListenerInterface;\nuse ... | php | chosen |
[
{
"from": "system",
"value": "Enforce permissions for new & updated thread list\n"
},
{
"from": "human",
"value": "<?php namespace Riari\\Forum\\Repositories;\n\nuse Riari\\Forum\\Models\\Thread;\n\nclass Threads extends BaseRepository {\n\n public function __construct(Thread $model)\n {\n... | php | chosen |
[
{
"from": "human",
"value": "Add tables for 4k and 7k mania stats\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 test class for OperationEvent.\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Gamegos\\NoSql\\Tests\\Storage\\Event;\n\n/* Imports from PHPUnit */\nuse PHPUnit_Framework_TestCase;\n\n/* Imports from gamegos/nosql */\nuse Gamegos\\NoSql\\Storage\\Event\\Operati... | php | chosen |
[
{
"from": "human",
"value": "Fix partner zero playlists file syncs"
},
{
"from": "gpt",
"value": "<?php\nrequire_once(dirname(__FILE__).'/../bootstrap.php');\n\n\n$playlists = entryPeer::retrieveByPKs(array('_KMCSPL1', '_KMCSPL2'));\nforeach($playlists as $playlist)\n{\n\t/* @var $playlist entry... | php | chosen |
[
{
"from": "human",
"value": "Add a utility class to help with generating different types of errors / warnings when testing\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace AllenJB\\Notifications;\n\nclass TriggerError\n{\n\n /** @noinspection PhpUndefinedFieldInspection PhpUnusedLocalVaria... | php | chosen |
[
{
"from": "human",
"value": "Make this run from the command line\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nif ($argc != 3) {\n echo getHelp($argv);\n\n die();\n}\n\n$day = $argv[1];\n$puzzle = $argv[2];\n\n$day = ucfirst(strtolower($day));\... | php | chosen |
[
{
"from": "human",
"value": "Add possible replacement for ContentFilter.\n"
},
{
"from": "gpt",
"value": "<?php\n// Jivoo\n// Copyright (c) 2015 Niels Sonnich Poulsen (http://nielssp.dk)\n// Licensed under the MIT license.\n// See the LICENSE file or http://opensource.org/licenses/MIT for more ... | php | chosen |
[
{
"from": "human",
"value": "Add test for eloquent class finder.\n"
},
{
"from": "gpt",
"value": "<?php namespace Reshadman\\EloquentFaster\\Tests;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse Reshadman\\EloquentFaster\\EloquentClassFinder;\nuse Reshadman\\EloquentFaster\\FasterModel;\n\nc... | php | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.