conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add a default edit form for Shuwee users\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Wanjee\\Shuwee\\AdminBundle\\Form;\n\nuse Symfony\\Component\\Form\\Extension\\Core\\Type\\ChoiceType;\nuse Symfony\\Component\\Form\\Extension\\Core\\Type\\PasswordType;\nus... | php | chosen |
[
{
"from": "human",
"value": "Add permutation algo in PHP language\n"
},
{
"from": "gpt",
"value": "<?php\n\nfunction permute(string $entry, int $level = 0)\n{\n static $num = 0;\n $length = strlen($entry);\n\n if ($level === $length) {\n print(++$num.\". $entry\\n\");\n re... | php | chosen |
[
{
"from": "human",
"value": "Add custom exception for when stuck in authentication loop\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * Copyright 2016 SURFnet B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with ... | php | chosen |
[
{
"from": "human",
"value": "Add proxy credentials e2e plugin.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Plugin Name: E2E Tests Proxy Credentials Plugin\n * Plugin URI: https://github.com/google/site-kit-wp\n * Description: Utility plugin for forcing proxy OAuth credentials during E2E tes... | php | chosen |
[
{
"from": "human",
"value": "Add unit tests for logOffResponse class\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * Copyright (C) 2013 Kolibre\n *\n * This file is part of Kolibre-KADOS.\n * Kolibre-KADOS is free software: you can redistribute it and/or modify\n * it under the terms of the GNU... | php | chosen |
[
{
"from": "human",
"value": "Add the snapshot util test suite\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Ob\\CampaignBundle\\Utils\\Snapshot;\n\nclass SnapshotTest extends \\PHPUnit_Framework_TestCase\n{\n public function test_render_image()\n {\n $binaryPath = '/usr/local/bin/wk... | php | chosen |
[
{
"from": "human",
"value": "Add tests for getting the list of assemblies in several formats\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Tests\\Feature;\n\nuse Tests\\TestCase;\nuse App\\Models\\Assembly;\nuse Symfony\\Component\\HttpFoundation\\Response;\nuse Illuminate\\Foundation\\Tes... | php | chosen |
[
{
"from": "human",
"value": "Test case to see what headers fetch() sends"
},
{
"from": "gpt",
"value": "<?php\nif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n foreach (apache_request_headers() as $header => $value)\n echo $header . ': ' . $value . PHP_EOL;\n\n exit;\n}\n?>\n<!doctype html>\n... | php | chosen |
[
{
"from": "system",
"value": "Add full classpath to autoloader so that packages can run from their own directories.\n"
},
{
"from": "human",
"value": "<?php\nfunction pfsense_www_class_autoloader($classname) {\n\t// Convert classname to match filename conventions\n\t$filename = str_replace('_', ... | php | chosen |
[
{
"from": "human",
"value": "Add tests for Emotes route.\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass ApiFastTest extends TestCase\n{\n\tprotected $baseUrl = '';\n\n\t/**\n\t * ApiFastTest constructor.\n\t */\n\tpublic function __construct()\n\t{\n\t\tparent::__construct();\n\t}\n\n\t/**\n\t ... | php | chosen |
[
{
"from": "human",
"value": "Add candidacy step 6 form type\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Listabierta\\Bundle\\MunicipalesBundle\\Form\\Type;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component\\Options... | php | chosen |
[
{
"from": "human",
"value": "Fix ItemJson to accomodate Json class changes\n"
},
{
"from": "gpt",
"value": "<?php\n// Service\nrequire_once('./json.php');\n\nclass ItemJson {\n\n /*\n This will retrieve a list of items stored in the item json resource.\n\n parameters - none\n return\n ... | php | chosen |
[
{
"from": "human",
"value": "Add basic api server for test purposes\n"
},
{
"from": "gpt",
"value": "<?php\n\n$verb = strtolower($_SERVER['REQUEST_METHOD']);\n\nfunction output($data) {\n\techo json_encode([\n\t\t\t\"result\" => $data\n\t\t]);\n}\n\nheader('Content-Type: application/json');\n\n$... | php | chosen |
[
{
"from": "human",
"value": "Add variants to media table (for storing different variations of images).\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Support\\Facades\\Schema;\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddV... | php | chosen |
[
{
"from": "human",
"value": "Create example of extended Table class."
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * SQLayerExampleTable\n * Example of SQLayerTable implemented as singleton\n *\n * This class will reference a table called 'example' within a database called 'example'.\n * Referen... | php | chosen |
[
{
"from": "human",
"value": "Test the bitbucket send violations command handler\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Tests\\Regis\\BitbucketContext\\Application\\CommandHandler\\Inspection;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Regis\\BitbucketConte... | php | chosen |
[
{
"from": "human",
"value": "Add new module loader class.\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 information.\nna... | php | chosen |
[
{
"from": "human",
"value": "Add path to new bundle transfer definitions. Project only.\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * This file is part of the Spryker Demoshop.\n * For full license information, please view the LICENSE file that was distributed with this source code.\n */\n\n... | php | chosen |
[
{
"from": "human",
"value": "Create a test event mediator class\nIts responsability is to inform observers when a test\nevent occurs.\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace pyd\\testkit;\n\nuse yii\\base\\InvalidParamException;\nuse pyd\\testkit\\Testkit;\nuse pyd\\testkit\\interfaces... | php | chosen |
[
{
"from": "human",
"value": "Add polygon type to Berberlei MySQL Types\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Doctrine\\DBAL\\Types;\nuse Doctrine\\DBAL\\Platforms\\AbstractPlatform;\n\nclass PolygonType extends Type\n{\n const FIELD = 'polygon';\n\n public function getSQLDecl... | php | chosen |
[
{
"from": "human",
"value": "Add new model cuz admin page fails without it\n"
},
{
"from": "gpt",
"value": "<?php defined('BASEPATH') or exit('No direct script access allowed');\n\n/**\n * Poll model\n *\n * @author Victor Michnowicz\n * @category Modules\n */\nclass Poll_m extends MY_Model {}"
... | php | chosen |
[
{
"from": "human",
"value": "Add migration for Instructor entity\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse yii\\db\\Schema;\nuse yii\\db\\Migration;\n\nclass m141218_102439_create_instructor_table extends Migration\n{\n public function up()\n {\n $tableOptions = null;\n i... | php | chosen |
[
{
"from": "human",
"value": "Add tests for Version class\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the composer-changelogs project.\n *\n * (c) Loïck Piera <pyrech@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that... | php | chosen |
[
{
"from": "human",
"value": "Create migration for format related tables\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass Format extends AbstractMigration\n{\n /**\n * Change Method.\n *\n * Write your reversible migrations using this meth... | php | chosen |
[
{
"from": "human",
"value": "Add app config unit test.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Jivoo\\Core;\n\nclass AppConfigTest extends \\Codeception\\TestCase\\Test {\n\n /**\n *\n * @var \\UnitTester\n */\n protected $tester;\n \n protected function _before() {}\n\n p... | php | chosen |
[
{
"from": "system",
"value": "Allow to create multiple modules using module:make command\n"
},
{
"from": "human",
"value": "<?php namespace Pingpong\\Modules\\Commands;\n\nuse Illuminate\\Console\\Command;\nuse Pingpong\\Modules\\Generators\\ModuleGenerator;\nuse Symfony\\Component\\Console\\Inp... | php | chosen |
[
{
"from": "human",
"value": "Add migration for the configuration key\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace OC\\Migrations;\n\nuse OCP\\Migration\\ISimpleMigration;\nuse OCP\\Migration\\IOutput;\n\n/**\n * Split shareapi_enforce_links_password config key into 3 different keys for read... | php | chosen |
[
{
"from": "human",
"value": "Add the item category model\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace App\\Models\\Items\\Attributes;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\n/**\n * This is the item's category model class.\n *\n * @property int $id\n * @property string $name\n * ... | php | chosen |
[
{
"from": "human",
"value": "Add class Bitrix24\\Presets\\Events for Bitrix24 event codes\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Bitrix24\\Presets;\n\nclass Events\n{\n\t/**\n\t * event code when bitrix24 application has uninstall\n\t */\n\tconst ON_APP_UNINSTALL = 'ONAPPUNINSTALL';\n... | php | chosen |
[
{
"from": "human",
"value": "Add linked resource fetcher to subscribe to the resource mirror.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Orbt\\StyleMirror\\Css;\n\nuse Symfony\\Component\\EventDispatcher\\EventSubscriberInterface;\nuse Orbt\\ResourceMirror\\ResourceMirror;\nuse Orbt\\Re... | php | chosen |
[
{
"from": "human",
"value": "Add separate snippet for excerpt content\n"
},
{
"from": "gpt",
"value": "<div class=\"entry-content\">\n <?php\n /* translators: %s: Name of current post */\n echo apply_filters('the_excerpt', get_the_excerpt());\n// the_content(sprintf(\... | php | chosen |
[
{
"from": "human",
"value": "Add common function to load class and it's necessary file...\n"
},
{
"from": "gpt",
"value": "<?php\n\n if (!function_exists('loadClass'))\n {\n function loadClass($className, $package='library', $vendors=[APP_PATH, SYSTEM_PATH])\n {\n ... | php | chosen |
[
{
"from": "human",
"value": "Fix issue supportsSchemaTransactions() on null\n\ngot this issue while fixing existing issue fix this issue \r\nCall to a member function supportsSchemaTransactions() on null\r\nby adding Grammar.php and editing Connection.php"
},
{
"from": "gpt",
"value": "<?php\n\n... | php | chosen |
[
{
"from": "human",
"value": "ADD: Test for TestCase::hexDump() helper function.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Serialized - PHP Library for Serialized Data\n *\n * Copyright (C) 2010 Tom Klingenberg\n *\n * This program is free software: you can redistribute it and/or modify\n ... | php | chosen |
[
{
"from": "human",
"value": " Sort an array by keys using a user-defined comparison function\n"
},
{
"from": "gpt",
"value": "\n<?php\nfunction cmp($a, $b)\n{\n $a = preg_replace('@^(a|an|the) @', '', $a);\n $b = preg_replace('@^(a|an|the) @', '', $b);\n return strcasecmp($a, $b);\n}\n\... | php | chosen |
[
{
"from": "human",
"value": "Add beer specific archive, with alphabetic paging controls."
},
{
"from": "gpt",
"value": "<?php get_header(); ?>\n<div class=\"row\">\n<!-- Row for main content area -->\n\t<div class=\"small-12 large-8 columns\" role=\"main\">\n\n\t<?php if ( have_posts() ) : ?>\n\... | php | chosen |
[
{
"from": "human",
"value": "Add usecase to test an application with the starter disabled\n"
},
{
"from": "gpt",
"value": "<?php\n\n$staq_path = substr( __DIR__, 0, strrpos( __DIR__, '/Staq/' ) + 5 );\nrequire_once( $staq_path . '/util/tests.php' );\ninclude_once( $staq_path . '/include.php' );\... | php | chosen |
[
{
"from": "human",
"value": "Add tests for validate response types\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Artesaos\\Zenvia\\Tests;\n\nuse Artesaos\\Zenvia\\Http\\ResponseHandler;\nuse GuzzleHttp\\Psr7\\Response;\nuse GuzzleHttp\\Psr7\\Stream;\nuse Psr\\Http\\Message\\ResponseInterface... | php | chosen |
[
{
"from": "human",
"value": "Build a caching repository decorator for settings\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Flarum\\Core\\Settings;\n\nclass CachedSettingsRepository implements SettingsRepository\n{\n protected $inner;\n\n protected $isCached;\n\n protected $cache... | php | chosen |
[
{
"from": "human",
"value": "PLAT-23626: Add script to clean admin users by partnerId\n"
},
{
"from": "gpt",
"value": "<?php\nfunction usage()\n{\n die(\"\\nUsage - clear admin user data: php clearAdminUserData.php <PartnerId> <partnerAdminEmail> <Are you sure : yes/no>\\n\\n\".\n \"FY... | php | chosen |
[
{
"from": "human",
"value": "Add index on profile_id to races table\n"
},
{
"from": "gpt",
"value": "<?php\n\nuse Illuminate\\Database\\Schema\\Blueprint;\nuse Illuminate\\Database\\Migrations\\Migration;\n\nclass AddIndexOnProfileIdToRacesTable extends Migration\n{\n /**\n * Run the migr... | php | chosen |
[
{
"from": "human",
"value": "Add unit tests for TextApp\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace React\\Chatroulette;\n\nuse React\\Socket\\ConnectionInterface;\n\nclass TextAppTest extends \\PHPUnit_Framework_TestCase\n{\n private $appMock;\n private $app;\n\n public functio... | php | chosen |
[
{
"from": "human",
"value": "Add simple Elasticsearch reindex script\n"
},
{
"from": "gpt",
"value": "<?php\n\n// Feed it UUIDs from STDIN like this:\n// % docker compose exec neo4j cypher-shell -u neo4j -p secret --format plain 'MATCH (n) RETURN n.uuid;'\n\nnamespace StrehleDe\\TopicCards\\Sear... | php | chosen |
[
{
"from": "system",
"value": "Change exception to die() in order to always show a message when these fatal errors are found\n\nAs proposed by @mahagr\n"
},
{
"from": "human",
"value": "<?php\nnamespace Grav;\n\n\n// Ensure vendor libraries exist\n$autoload = __DIR__ . '/vendor/autoload.php';\nif... | php | chosen |
[
{
"from": "human",
"value": "Add image link block template\n"
},
{
"from": "gpt",
"value": "<?php\n// An image above a title and paragraph, with optional link.\n\n$src = '';\nif (is_object($f) && $f->getFileID()) {\n if ($f->getTypeObject()->isSVG()) {\n $src = $f->getRelativePath();\n... | php | chosen |
[
{
"from": "human",
"value": "Add gridColumns for Textfield component\n\nusually this is a one-liner so it makes sense to use as gridColumn\n"
},
{
"from": "gpt",
"value": "<?php\nclass Kwc_Basic_Textfield_Admin extends Kwc_Abstract_Composite_Admin\n{\n public function gridColumns()\n {\n ... | php | chosen |
[
{
"from": "human",
"value": ":sparkles: Add new interface for NonceGenerator.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Risan\\OAuth1;\n\ninterface NonceGeneratorInterface\n{\n /**\n * Generate a random string for nonce.\n *\n * @param integer $length\n * @return st... | php | chosen |
[
{
"from": "human",
"value": "Add feature description formatter class\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace KawaiiGherkin\\Formatter;\n\nfinal class FeatureDescription\n{\n public function format($shortDescription, array $descriptionLines, $indentation = 4)\n {\n $inden... | php | chosen |
[
{
"from": "human",
"value": "Add service for audio caching\n"
},
{
"from": "gpt",
"value": "<?php\nfunction cacheAudio($url, $file_type) {\n $cacheFile = $_SERVER['DOCUMENT_ROOT'] . '/cache/audio/' . md5($url). '.' . $file_type;\n $file_directory = 'http://' . $_SERVER['SERVER_NAME'] . '/c... | php | chosen |
[
{
"from": "human",
"value": "Add service for image caching\n"
},
{
"from": "gpt",
"value": "<?php\nfunction getimg($url) { \n $headers[] = 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg'; \n $headers[] = 'Connection: Keep-Alive'; \n $headers[] =... | php | chosen |
[
{
"from": "human",
"value": "Add an interface for mutable addresses\n"
},
{
"from": "gpt",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace BinSoul\\Common\\I18n;\n\n/**\n * Represents an address which is mutable.\n */\ninterface MutableAddress extends Address\n{\n /**\n * Sets th... | php | chosen |
[
{
"from": "human",
"value": "Add dummy-request class for tests.\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace Sil\\SilAuth\\tests\\unit\\http;\n\nuse Sil\\SilAuth\\http\\Request;\n\nclass DummyRequest extends Request\n{\n protected $dummyIpAddress;\n \n /**\n * Get the DUMMY IP ... | php | chosen |
[
{
"from": "human",
"value": "Add bootstrap override to allow zf2 style bootstrapping\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Zf2for1\\Application;\n\nuse Zend_Application_Bootstrap_Bootstrap;\nuse Zend_Application_Bootstrap_Exception;\nuse Zf2for1\\Resource\\Zf2;\n\nclass Bootstrap e... | php | chosen |
[
{
"from": "human",
"value": "Add test for base64 encoding\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Emarref\\Jwt\\Encoding;\n\nclass Base64Test extends \\PHPUnit_Framework_TestCase\n{\n private static $value = 'føøbarbaz';\n\n /**\n * @var Base64\n */\n private $defaul... | php | chosen |
[
{
"from": "human",
"value": "Add functional test for unicode.\n"
},
{
"from": "gpt",
"value": "<?php\n/*\n * Copyright (c) 2011 Litle & Co.\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Soft... | php | chosen |
[
{
"from": "human",
"value": "Add Text-related Drupal 7 snippets\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * Text-related Drupal 7 snippets\n */\n\n// String placeholders :\n// format_string($string, array $args = array())\n// @variable: Escaped to HTML using check_plain(). Use this... | php | chosen |
[
{
"from": "human",
"value": "Add missing alias for Point Sensor\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * @copyright Copyright (C) 2015-2022 AIZAWA Hina\n * @license https://github.com/fetus-hina/stat.ink/blob/master/LICENSE MIT\n * @author AIZAWA Hina <hina@fetus.jp>\n */\n\ndeclare(str... | php | chosen |
[
{
"from": "human",
"value": "Add update script to let broken links again be tested\n"
},
{
"from": "gpt",
"value": "<?php\n\n/** @var Denkmal_Model_Link $link */\nforeach (new Denkmal_Paging_Link_Broken() as $link) {\n $link->setFailedCount(0);\n}\n"
}
] | php | chosen |
[
{
"from": "human",
"value": "Add simple value resolver component for extracting values from constants\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Parser Reflection API\n *\n * @copyright Copyright 2015, Lisachenko Alexander <lisachenko.it@gmail.com>\n *\n * This source file is subject to the... | php | chosen |
[
{
"from": "human",
"value": "Rename ReplicatorFormField to ReplicableFormField and extend ReplicableContainer. This also has the side-effect of removing the fieldset around form fields. This can/should be added manually.\n\nsvn commit r13628\n"
},
{
"from": "gpt",
"value": "<?php\n\n/* vim: set ... | php | chosen |
[
{
"from": "human",
"value": "Add file to help updates to AudioDidact by transfering configurations\n"
},
{
"from": "gpt",
"value": "<?php \n$globals = [\"LOCAL_URL\" => \"https://localhost/podtube/src\", \"SUBDIR\" => \"podtube/src/\", \"GOOGLE_API_KEY\" => \"****\", \n\t\t\t\t\"DOWNLOAD_PATH\" ... | php | chosen |
[
{
"from": "human",
"value": "Add mail form (is not used).\n"
},
{
"from": "gpt",
"value": "<?php\n// Check for empty fields\nif(empty($_POST['name']) \t\t||\n empty($_POST['email']) \t\t||\n empty($_POST['phone']) \t\t||\n empty($_POST['message'])\t||\n !filter_var($_POST['email'],FILTE... | php | chosen |
[
{
"from": "human",
"value": "Add test for preventRendering a block\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Concrete\\Tests\\Block;\n\nuse Concrete\\Core\\Block\\Block;\nuse Concrete\\Core\\Block\\View\\BlockView;\nuse Concrete\\Core\\Entity\\Block\\BlockType\\BlockType;\nuse Concrete... | php | chosen |
[
{
"from": "human",
"value": "Add sorted set sub key data builder\n"
},
{
"from": "gpt",
"value": "<?php declare(strict_types=1);\n\nnamespace hollodotme\\Readis\\Application\\ReadModel\\KeyDataBuilders;\n\nuse hollodotme\\Readis\\Application\\Interfaces\\ProvidesKeyInfo;\nuse hollodotme\\Readis\... | php | chosen |
[
{
"from": "human",
"value": "Add data view renderer Twig extension.\n"
},
{
"from": "gpt",
"value": "<?php declare(strict_types=1);\n/**\n * @author Igor Nikolaev <igor.sv.n@gmail.com>\n * @copyright Copyright (c) 2021, Darvin Studio\n * @link https://www.darvin-studio.ru\n *\n * For the... | php | chosen |
[
{
"from": "human",
"value": "Add support for HTTPS proxies\n"
},
{
"from": "gpt",
"value": "<?php\n\t// support for HTTPS proxies\n\tif(\n\t\t!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])\n\t\t&& strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https'\n\t) $_SERVER['HTTPS'] = 'on';\n\n\t// real I... | php | chosen |
[
{
"from": "human",
"value": "Add basic tests for Utxo\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace BitWasp\\Bitcoin\\Tests\\Utxo;\n\n\nuse BitWasp\\Bitcoin\\Script\\Script;\nuse BitWasp\\Bitcoin\\Tests\\AbstractTestCase;\nuse BitWasp\\Bitcoin\\Transaction\\TransactionOutput;\nuse BitWasp\... | php | chosen |
[
{
"from": "human",
"value": "Add Cannot Execute Task Exception\n"
},
{
"from": "gpt",
"value": "<?php namespace Aedart\\Scaffold\\Exceptions;\n\nuse RuntimeException;\n\n/**\n * Cannot Execute Task Exception\n *\n * Throw this exception whenever a console task cannot be executed\n *\n * @author ... | php | chosen |
[
{
"from": "human",
"value": "t520: Add entry point for all CM commands\n"
},
{
"from": "gpt",
"value": "#!/usr/bin/env php\n<?php\n\ndefine(\"IS_CRON\", true);\ndefine('DIR_ROOT', dirname(__DIR__) . DIRECTORY_SEPARATOR);\nrequire_once DIR_ROOT . 'library/CM/Bootloader.php';\nCM_Bootloader::load(... | php | chosen |
[
{
"from": "human",
"value": "Add service to add a new api key on validation server.\n\n"
},
{
"from": "gpt",
"value": "<?php\nrequire_once 'ykval-common.php';\nrequire_once 'ykval-config.php';\nrequire_once 'Auth/Yubico.php';\n\nheader(\"content-type: text/plain\");\n\ndebug(\"Request: \" . $_SE... | php | chosen |
[
{
"from": "human",
"value": "Add lv_LV, thanks to agrisans"
},
{
"from": "gpt",
"value": "<?php\n// +-----------------------------------------------------------------------+\r\n// | Piwigo - a PHP based photo gallery |\r\n// +-----------------------------------... | php | chosen |
[
{
"from": "human",
"value": "[Order] Create add to cart command factory\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distr... | php | chosen |
[
{
"from": "human",
"value": "Add tests with 100% coverage for Algorithm\\Groups"
},
{
"from": "gpt",
"value": "<?php\n\nuse Fhaculty\\Graph\\Algorithm\\Groups as AlgorithmGroups;\nuse Fhaculty\\Graph\\Graph;\n\nclass GroupsTest extends TestCase\n{\n public function testGraphEmpty()\n {\n ... | php | chosen |
[
{
"from": "human",
"value": "Create new shell to generate data, currently Scribbles only.\n"
},
{
"from": "gpt",
"value": "<?php\nclass FactoryShell extends AppShell {\n\tpublic $uses = array('Scribble');\n\n\tpublic function scribble() {\n\t\t// $this->out('How many Scribbles to generate? [30]'... | php | chosen |
[
{
"from": "human",
"value": "Add snippet for unrestricting RSS feeds.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Plugin Name: Restrict Content Pro - Unrestrict RSS Feed\n * Description: Removes post restrictions from RSS feeds. Note that RSS feeds are publicly accessible so this will make y... | php | chosen |
[
{
"from": "human",
"value": "Add cURL example showing how to use ExitNodes from a specific country\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire '../src/ControlClient.php';\nrequire '../src/TorCurlWrapper.php';\n\n// list of country codes to use\n$countries = array('US', 'FR', 'RU', 'GB', 'C... | php | chosen |
[
{
"from": "human",
"value": "Add new Service provider specific for development\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Wdi\\Providers;\n\nuse Barryvdh\\Debugbar\\Facade as DebugbarFacade;\nuse Barryvdh\\Debugbar\\ServiceProvider as DebugbarServiceProvider;\nuse Barryvdh\\LaravelIdeHe... | php | chosen |
[
{
"from": "human",
"value": "Add clone handler code, pull together last functionality.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace App\\Handler\\Framework;\n\nuse App\\Command\\Framework\\CopyFrameworkCommand;\nuse App\\Event\\CommandEvent;\nuse App\\Event\\NotificationEvent;\nuse App\\H... | php | chosen |
[
{
"from": "human",
"value": "Add new webservice class for getting all trait info to an organism by its id\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace ajax\\listing;\n\nuse \\PDO as PDO;\n\n/**\n * Web Service.\n * Returns Trait informatio\n */\nclass Traits_to_organism extends \\WebServi... | php | chosen |
[
{
"from": "human",
"value": "openidProvider: Add frontpage hook with link to user page.\n\nFixes issue 227\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Hook to add the OpenID provider to the authentication tab.\n *\n * @param array &$links The links on the frontpage, split into sections.\n *... | php | chosen |
[
{
"from": "human",
"value": "Add unit tests for Cache\\Serializer\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Chadicus\\Marvel\\Api\\Cache;\n\nuse Zend\\Diactoros\\Response;\nuse Zend\\Diactoros\\Stream;\n\n/**\n * @coversDefaultClass \\Chadicus\\Marvel\\Api\\Cache\\Serializer\n * @cover... | php | chosen |
[
{
"from": "human",
"value": "Implement disk storage of sessions\n"
},
{
"from": "gpt",
"value": "<?php\nnamespace RedditApiClient\\Session\\Storage;\n\nuse RedditApiClient\\Session;\n\nclass Disk implements Session\\Storage\n{\n\tprivate $directory;\n\n\tpublic function __construct($directory = ... | php | chosen |
[
{
"from": "human",
"value": "Add comparsion of single and double quotes\n"
},
{
"from": "gpt",
"value": "<?php\n\nrequire_once __DIR__.'/../vendor/autoload.php';\n\nabstract class AbstractTest implements \\mre\\PHPench\\TestInterface\n{\n protected $test;\n\n function setUp($arrSize)\n ... | php | chosen |
[
{
"from": "human",
"value": "Fix event_stream table primary key.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Surfnet\\StepupMiddleware\\Migrations;\n\nuse Doctrine\\DBAL\\Migrations\\AbstractMigration;\nuse Doctrine\\DBAL\\Schema\\Schema;\n\n/**\n * Drops the UUID primary key, removes th... | php | chosen |
[
{
"from": "human",
"value": "Fix incorrect index on events\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 New Image and draw some text\n\n Dynamically create a 300x300 PNG image with a yellow background and draw some text on top of it later"
},
{
"from": "gpt",
"value": "<?php\n/*\n * PixLab PHP Client which is just a single class PHP file without any dependency t... | php | chosen |
[
{
"from": "human",
"value": "Add map type id helper tests\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Ivory\\GoogleMapBundle\\Tests\\Templating\\Helper;\n\nuse Ivory\\GoogleMapBundle\\Templating\\Helper\\MapTypeIdHelper;\nuse Ivory\\GoogleMapBundle\\Model\\MapTypeId;\n\n/**\n * Map type ... | php | chosen |
[
{
"from": "human",
"value": "Test forms, generate UUID command\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Rednose\\FrameworkBundle\\Command;\n\nuse Doctrine\\ORM\\Id\\UuidGenerator;\nuse Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand;\nuse Symfony\\Component\\Console\\... | php | chosen |
[
{
"from": "human",
"value": "Add snippet for confirming email address.\n"
},
{
"from": "gpt",
"value": "<?php\n/**\n * Plugin Name: Restrict Content Pro - Confirm Email\n * Description: Adds a second field to the registration form to confirm email address.\n * Version: 1.0\n * Author: Restrict C... | php | chosen |
[
{
"from": "human",
"value": "Add script to fetch sports to cube\n"
},
{
"from": "gpt",
"value": "<?php\n\n header (\"Access-Control-Allow-Origin: *\");\n\n# define('DB_DATABASE', 'clubs');\n //cp query.php ..; cp -r includes ..;\n require('includes/application_top.php');\n\n// $sports = wh_d... | php | chosen |
[
{
"from": "human",
"value": "Add envoy config file to handle deployments and running memvents:update artisan command remotely\n"
},
{
"from": "gpt",
"value": "@servers(['prod' => 'memvents@memvents.memphistechnology.org'])\n\n@task('deploy:prod', ['on' => 'prod'])\ncd /home/memvents/memvents/\nc... | php | chosen |
[
{
"from": "human",
"value": "Implement mailer that use sendmail.\n"
},
{
"from": "gpt",
"value": "<?php\ndeclare(strict_types=1);\n\nnamespace Fc2blog\\Repo;\n\nuse Exception;\nuse Fc2blog\\Model\\Email;\nuse Swift_Mailer;\nuse Swift_Message;\nuse Swift_RfcComplianceException;\nuse Swift_Sendmai... | php | chosen |
[
{
"from": "human",
"value": "Add type casting syntax tests\n"
},
{
"from": "gpt",
"value": "// SYNTAX TEST \"Packages/php-grammar/PHP.tmLanguage\"\n<?php\n\n(bool);\n// ^ storage.type\n(boolean);\n// ^ storage.type\n\n(int);\n// ^ storage.type\n(integer);\n// ^ storage.type\n\n(float);\n// ^ sto... | php | chosen |
[
{
"from": "system",
"value": "Add support for using IAM Roles for SQS queues.\n\nThe AWS PHP SDK allows for specifying a location on EC2 instances that will allow the instance to assume an IAM role and connect to different services. You just need to add a `default_cache_config` option to the config array fo... | php | chosen |
[
{
"from": "human",
"value": "Implement the hook for regionlookup.\n"
},
{
"from": "gpt",
"value": "<?php\n\nclass CRM_Regionlookuprepresent_BAO_RegionLookup {\n /**\n *\n * Returns an array of results.\n */\n static function lookup($value) {\n $results = array();\n $results[0] = ar... | php | chosen |
[
{
"from": "human",
"value": "[tests] Add missing tests for Predis\\Option\\ClientReplication.\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Predis package.\n *\n * (c) Daniele Alessandri <suppakilla@gmail.com>\n *\n * For the full copyright and license information, pl... | php | chosen |
[
{
"from": "human",
"value": "Add divide function test suite. This is incomplete and missing additional code path.\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace Mimic\\Test;\n\nuse PHPUnit_Framework_TestCase;\nuse Mimic\\Functional as F;\n\n/**\n * Unit Test for true Mimic library function.... | php | chosen |
[
{
"from": "human",
"value": "Add plugin configuaration file and directory.\n\ngit-svn-id: 8b63d55bfce53776e695723f332a61dd420f6f8d@30436 ee427ae8-e902-0410-961c-c3ed070cd9f9\n"
},
{
"from": "gpt",
"value": "<?php\n\n/**\n * sfiCalCreatorPlugin configuration.\n * \n * @package sfiCalCreatorPl... | php | chosen |
[
{
"from": "human",
"value": "Add controller to enforce auth and redirect to React app\n"
},
{
"from": "gpt",
"value": "<?php\n\nnamespace App\\Http\\Controllers;\n\nuse App\\Http\\Requests;\nuse Illuminate\\Http\\Request;\n\nclass HomeController extends Controller\n{\n /**\n * Create a ne... | php | chosen |
[
{
"from": "human",
"value": "Move events definitions into proper components\n"
},
{
"from": "gpt",
"value": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was d... | php | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.