conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add i18n for Boolean Field"
},
{
"from": "human",
"value": "<?php defined('SYSPATH') or die('No direct script access.');\n\nclass Jelly_Field_Boolean extends Jelly_Field\n{\t\n\t/**\n\t * @var mixed How TRUE is represented in the database\n\t */\n\tpublic $true = 1;... | php | chosen |
[
{
"from": "system",
"value": "Fix example code broken by After lib API changes\n"
},
{
"from": "human",
"value": "<?php // 101_parallel_async_requests.php\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\n(new Alert\\ReactorFactory)->select()->run(function($reactor) {\n $client = new Artax\\... | php | chosen |
[
{
"from": "system",
"value": "Add a default error handler\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace duncan3dc\\Proxy;\n\nuse duncan3dc\\Guzzle\\Request;\nuse GuzzleHttp\\Client;\nuse Psr\\Http\\Message\\RequestInterface;\nuse Psr\\Http\\Message\\ResponseInterface;\n\nclass App\n{\n ... | php | chosen |
[
{
"from": "system",
"value": "Use manual route definition over the route resource shortcut\n"
},
{
"from": "human",
"value": "<?php\n\nuse Illuminate\\Routing\\Router;\n\n$router->group(['prefix' => '/setting'], function (Router $router) {\n $router->get('settings/{module}', ['as' => 'dashboa... | php | chosen |
[
{
"from": "system",
"value": "Add placeholder attribute to textarea"
},
{
"from": "human",
"value": "<?php namespace Laraplus\\Form\\Fields;\n\nuse Laraplus\\Form\\Fields\\Base\\Element;\n\nclass TextArea extends Element\n{\n /**\n * @param string $cols\n * @return $this\n */\n ... | php | chosen |
[
{
"from": "system",
"value": "Set release version to 0.8.7\n"
},
{
"from": "human",
"value": "<?php\n\nrequire_once __DIR__ . '/Zigra/Core.php';\n/**\n * This class only exists for backwards compatability. All code was moved to\n * Zigra_Core and this class extends Zigra_Core\n *\n * @author Ma... | php | chosen |
[
{
"from": "system",
"value": "Fix tests (needed some delay)\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Tests\\Browser;\n\nuse Tests\\DuskTestCase;\nuse Illuminate\\Foundation\\Testing\\DatabaseMigrations;\nuse App\\Trio;\n\nclass SolveTest extends DuskTestCase\n{\n\n public functio... | php | chosen |
[
{
"from": "system",
"value": "Revert force debug on prod.\n"
},
{
"from": "human",
"value": "<?php\n\nuse Symfony\\Component\\ClassLoader\\ApcClassLoader;\nuse Symfony\\Component\\HttpFoundation\\Request;\n\n$loader = require_once __DIR__.'/../app/bootstrap.php.cache';\n\n// Use APC for autoload... | php | chosen |
[
{
"from": "system",
"value": "Update Tar Parse adapter tests"
},
{
"from": "human",
"value": "<?php\n\nnamespace Alchemy\\Zippy\\Tests\\Parser;\n\nuse Alchemy\\Zippy\\Parser\\GNUTarOutputParser;\nuse Alchemy\\Zippy\\Tests\\AbstractTestFramework;\n\nclass GNUTarOutputParserTest extends AbstractTe... | php | chosen |
[
{
"from": "system",
"value": "Add assertions for login test\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Tests\\Feature;\n\nuse Tests\\TestCase;\nuse Illuminate\\Foundation\\Testing\\WithoutMiddleware;\nuse Illuminate\\Foundation\\Testing\\DatabaseMigrations;\nuse Illuminate\\Foundation... | php | chosen |
[
{
"from": "system",
"value": "Add admin page tree view helper to helper map\n"
},
{
"from": "human",
"value": "<?php\nreturn array(\n 'router' => array(\n 'routes' => array(\n 'admin' => array(\n 'type' => 'literal',\n 'options' => array(\n ... | php | chosen |
[
{
"from": "system",
"value": "Fix builder delete test 2"
},
{
"from": "human",
"value": "<?php\n\n/**\n * @author Michael Slyshkin <m.slyshkin@gmail.com>\n */\n\nnamespace RsORMTest\\Query\\Engine\\MySQL\\Builder;\n\nuse RsORMTest;\nuse RsORM\\Query\\Engine\\MySQL\\Builder;\nuse RsORM\\Query\\En... | php | chosen |
[
{
"from": "system",
"value": "UCLALIB-58: Replace pane-block class with pane-bean- class.\n"
},
{
"from": "human",
"value": "<?php\n\n/**\n * @file\n * Template overrides as well as (pre-)process and alter hooks for the\n * UCLALIB Omega theme.\n */\n\n/**\n * Implements template_preprocess_pane... | php | chosen |
[
{
"from": "system",
"value": "Fix in getLimitQuery not valid result\n"
},
{
"from": "human",
"value": "<?php \n\nnamespace Helper;\n\nuse APIJet\\Config;\nuse \\PDO;\n\nclass Db\n{\n private static $instance = null;\n private static $options = [\n PDO::MYSQL_ATTR_INIT_COMMAND => \"S... | php | chosen |
[
{
"from": "system",
"value": "Add request time format to the broadcasts feed\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Bamboo\\Feeds;\n\nuse Bamboo\\Models\\Broadcast;\n\nclass Broadcasts extends BaseParallel\n{\n\n protected $_feedName = '/channels/{channel_id}/broadcasts';\n ... | php | chosen |
[
{
"from": "system",
"value": "Add method to grab sample data json file\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Memvents;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Event extends Model\n{\n\n protected $table = 'events';\n\n protected $fillable = [\n 'name',... | php | chosen |
[
{
"from": "system",
"value": "Allow messgae in preffered class sniff\n\nSigned-off-by: Tomas Votruba <5445cc846624f8e1309aa4cd2a2306f4bc110566@gmail.com>\n"
},
{
"from": "human",
"value": "<?php declare(strict_types=1);\n\nnamespace Symplify\\CodingStandard\\Sniffs\\Architecture;\n\nuse PHP_Code... | php | chosen |
[
{
"from": "system",
"value": "Return readable date format in toString"
},
{
"from": "human",
"value": "<?php\n\nnamespace Opifer\\EavBundle\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\n\n/**\n* DateTimeValue\n*\n* @ORM\\Entity\n*/\nclass DateTimeValue extends Value\n{\n /**\n * Turn val... | php | chosen |
[
{
"from": "system",
"value": "Fix table name in migration\n"
},
{
"from": "human",
"value": "<?php\n\n/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner <toby.zerner@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed ... | php | chosen |
[
{
"from": "system",
"value": "[FIX] Revert r49045 which caused rogue ~np~ tags to appear in searchindex results. Still looking for a better fix for the original {list} plugin double-parsing issues... (thanks Nelson)\n\ngit-svn-id: fe65cb8b726aa1bab0c239f321eb4f822d15ce08@49435 b456876b-0849-0410-b77d-98878d... | php | chosen |
[
{
"from": "system",
"value": "Fix ce firsttime visit page\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace App\\Http\\Middleware;\n\nuse Closure;\nuse DB;\nuse Session;\nuse Route;\nuse Request;\nuse Redirect;\nuse EtuUTT;\n\nclass Dashboard\n{\n /**\n * Handle an incoming request.\n... | php | chosen |
[
{
"from": "system",
"value": "Fix docblock for return type\n\nSigned-off-by: Daniel Kesselberg <1d6e1cf70ec6f9ab28d3ea4b27a49a77654d370e@danielkesselberg.de>\n"
},
{
"from": "human",
"value": "<?php\n/**\n * @copyright Copyright (c) 2016, ownCloud, Inc.\n *\n * @author Morris Jobke <hey@morrisjo... | php | chosen |
[
{
"from": "system",
"value": "Fix twitterUsername formfield validation chaining\n"
},
{
"from": "human",
"value": "<?php\n\nclass Denkmal_FormField_TwitterUsername extends CM_FormField_Text {\n\n public function validate(CM_Frontend_Environment $environment, $userInput) {\n if ('@' ===... | php | chosen |
[
{
"from": "system",
"value": "Fix tooltips in item editor inside existing items\n"
},
{
"from": "human",
"value": "<?php\n/** @var \\WEEEOpen\\Tarallo\\User $user */\n/** @var \\WEEEOpen\\Tarallo\\Item $item */\n/** @var string $url */\n/** @var int|null $depth */\n/** @var string|null $add */\n... | php | chosen |
[
{
"from": "system",
"value": "Allow for self executeable phar so it can be put into */bin\n\nDoesn't break cross platform and makes life a little nicer.\r\n\r\nSee https://github.com/composer/composer/blob/master/src/Composer/Compiler.php#L170"
},
{
"from": "human",
"value": "<?php\n\n$phar = __... | php | chosen |
[
{
"from": "system",
"value": "Add return types to tests and final|internal|private methods\n\n"
},
{
"from": "human",
"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, plea... | php | chosen |
[
{
"from": "system",
"value": "Replace double quotes with single"
},
{
"from": "human",
"value": "<?php \n\nnamespace Acd;\n\n/** \n* Request Class\n* @author Acidvertigo MIT Licence\n*/\n\nclass Request \n{\n\n private $headers = [];\n\n /**\n * Check HTTP request headers\n * @retu... | php | chosen |
[
{
"from": "system",
"value": "Fix des alertes sur des attributs inexistants\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace ETNA\\FeatureContext;\n\ntrait setUpScenarioDirectories\n{\n /**\n * @BeforeScenario\n */\n public function setUpScenarioDirectories($event)\n {\n ... | php | chosen |
[
{
"from": "system",
"value": "Use HTTPS frame in clickjacking example\n"
},
{
"from": "human",
"value": "<div style=\"left: 110px; top: 90px; position: absolute;\">SCROLL DOWN</div>\n<img src=\"play.png\" onclick=\"alert('never triggered');\" width=\"80\" height=\"80\" style=\"left: 110px; top: ... | php | chosen |
[
{
"from": "system",
"value": "Add bgset default size to template.\n"
},
{
"from": "human",
"value": "<?php // [1] Regular responsivebackground image; default sized thumb (e.g. `responsiveimages.default`) ?>\n<?php if($lazyload == false): ?>\n\t<div style=\"background-image:url(<?php echo $defaul... | php | chosen |
[
{
"from": "system",
"value": "Change formatting of help output"
},
{
"from": "human",
"value": "<?php\n\nnamespace Psocksd\\Command;\n\nuse Psocksd\\App;\n\nclass Help implements CommandInterface\n{\n private $app;\n\n public function __construct(App $app)\n {\n $this->app = $app... | php | chosen |
[
{
"from": "system",
"value": "Remove incorrect debugging line, leave var_dump\n"
},
{
"from": "human",
"value": "<?php\n require_once('./config.php');\n \n echo \"The POST is $_POST\";\n \n var_dump($_POST);\n\n $state = $_POST['shippingState'];\n \n if ( !strcmp(\"GA\", $state) ) {\n\n ... | php | chosen |
[
{
"from": "system",
"value": "Fix always returning invalid parameter"
},
{
"from": "human",
"value": "<?php\nif(!isset($_GET['list']))\n die();\n\n$type = $_GET['list'];\n\nif($type !== \"white\" || $type !== \"black\")\n die(\"Invalid list parameter\");\n\n$rawList = file_get_contents(\"/... | php | chosen |
[
{
"from": "system",
"value": "Update old reference to talk class\n\nSigned-off-by: Alex Ross <d74d0b805f1f1a75a685a24ac9c38635e4306e23@gmail.com>\n"
},
{
"from": "human",
"value": "<?php\n/**\n * Created by PhpStorm.\n * User: alex\n * Date: 21/04/2014\n * Time: 23:01\n */\n\nnamespace PhpDorset... | php | chosen |
[
{
"from": "system",
"value": "FIX: Remove leading space that caused the pages tab to break\n"
},
{
"from": "human",
"value": " <?php\n/**\n* Defines the SupportingProjectPage page type - initial code created by ss generator\n*/\nclass PageWithImage extends Page implements RenderableAsPortlet {\n... | php | chosen |
[
{
"from": "system",
"value": "Add type hints to functions"
},
{
"from": "human",
"value": "<?php\n\nnamespace UghAuthentication\\Authentication;\n\nuse Zend\\Authentication\\Adapter\\AdapterInterface;\nuse Zend\\Authentication\\AuthenticationServiceInterface;\nuse Zend\\Authentication\\Storage\\... | php | chosen |
[
{
"from": "system",
"value": "Add method to remove an export git ignore.\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Construct;\n\nclass GitAttributes\n{\n /**\n * The files to ignore on exporting.\n *\n * @var array\n */\n private $exportIgnores = [];\n\n /**\... | php | chosen |
[
{
"from": "system",
"value": "Remove some hidden magic + adjust output to be compatible with view block\n"
},
{
"from": "human",
"value": "<?php\ndeclare(strict_types=1);\n\nnamespace block\\dbblock;\n\nuse app;\nuse arr;\nuse attr;\n\nfunction render(array $block): string\n{\n $data = $block... | php | chosen |
[
{
"from": "system",
"value": "Change news layout to 3columns\n"
},
{
"from": "human",
"value": "<?php\nreturn [\n 'module_layouts' => [\n 'Application' => 'layout/admin',\n 'User' => 'layout/admin',\n 'Admin' => 'layout/admin',\n 'Landing' => 'layout/3columns',\n ... | php | chosen |
[
{
"from": "system",
"value": "Add default widget area as recommended in best practices\n"
},
{
"from": "human",
"value": "<?php\n/**\n * The sidebar containing the main widget area\n * Implement your custom sidebar to this file.\n *\n * @link https://developer.wordpress.org/themes/basics/templat... | php | chosen |
[
{
"from": "system",
"value": "Fix name of config keys\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace KnpU\\OAuth2ClientBundle\\DependencyInjection\\Providers;\n\nuse KnpU\\OAuth2ClientBundle\\Client\\Provider\\InstagramClient;\nuse League\\OAuth2\\Client\\Provider\\Instagram;\nuse Symfony... | php | chosen |
[
{
"from": "system",
"value": "BB-7975: Add to configuration select with segment lists\n- cs fix\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Oro\\Bundle\\SegmentBundle\\Form\\Type;\n\nuse Doctrine\\Common\\Persistence\\ManagerRegistry;\n\nuse Symfony\\Component\\Form\\AbstractType;\nuse... | php | chosen |
[
{
"from": "system",
"value": "Add a condition to check a directory deeper for autoload file\n"
},
{
"from": "human",
"value": "<?php\nchdir(__DIR__);\nif (file_exists(__DIR__ . '/../vendor/autoload.php')){\n require_once __DIR__ . '/../vendor/autoload.php';\n} elseif (file_exists(__DIR__ . '/... | php | chosen |
[
{
"from": "system",
"value": "Return types in repositories & dataset\n"
},
{
"from": "human",
"value": "<?php\n/*\n * WellCommerce Open-Source E-Commerce Platform\n *\n * This file is part of the WellCommerce package.\n *\n * (c) Adam Piotrowski <adam@wellcommerce.org>\n *\n * For the full copyr... | php | chosen |
[
{
"from": "system",
"value": "BB-4399: Create MenuUpdateBuilder with methods\n- added $menu argument to MenuUpateProviderInterface\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Oro\\Bundle\\NavigationBundle\\Provider;\n\nuse Oro\\Bundle\\NavigationBundle\\Entity\\AbstractMenuUpdate;\n\ni... | php | chosen |
[
{
"from": "system",
"value": "Set $initialized flag after initialization in EmailTemplateEngine\n"
},
{
"from": "human",
"value": "<?php\nnamespace wcf\\system\\template;\nuse wcf\\system\\WCF;\n\n/**\n * Loads and displays templates in emails.\n * \n * @author\tTim Duesterhus\n * @copyright\t20... | php | chosen |
[
{
"from": "system",
"value": "Throw RuntimeException is scandir returns false.\n"
},
{
"from": "human",
"value": "<?php\r\n\r\n/**\r\n * Utility class that works with deleting files and directories.\r\n */\r\nclass DeleteUtils {\r\n\r\n /**\r\n * Delete all files and directories within the ... | php | chosen |
[
{
"from": "system",
"value": "Fix unit test that uses PHP7+ functionality\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Tests\\Result;\n\nuse Stratedge\\Wye\\Result;\nuse Stratedge\\Wye\\Wye;\n\nclass SetNumRowsTest extends \\Tests\\TestCase\n{\n public function testReturnsSelf()\n ... | php | chosen |
[
{
"from": "system",
"value": "Allow empty date/time to be set of date fields\n"
},
{
"from": "human",
"value": "<?php\nnamespace Craft;\n\nuse Cake\\Utility\\Hash as Hash;\n\nclass DateFeedMeFieldType extends BaseFeedMeFieldType\n{\n // Templates\n // ======================================... | php | chosen |
[
{
"from": "system",
"value": "Add don't move the file if he'snt uploaded\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Keosu\\Gadget\\PushNotificationBundle\\EventListener;\n\nuse Keosu\\CoreBundle\\KeosuEvents;\nuse Keosu\\CoreBundle\\Event\\PackageSaveAppEvent;\n\nuse Keosu\\Gadget\\Pu... | php | chosen |
[
{
"from": "system",
"value": "Fix KernalAwareTest to use the correct kernel\n"
},
{
"from": "human",
"value": "<?php\n\ndeclare(strict_types=1);\n\n/*\n * This file is part of SolidInvoice project.\n *\n * (c) 2013-2017 Pierre du Plessis <info@customscripts.co.za>\n *\n * This source file is sub... | php | chosen |
[
{
"from": "system",
"value": "Set whether to use count walker for iterator count\n\nCan get the following error:\r\n\r\n```\r\nCannot count query that uses a HAVING clause. Use the output walkers for pagination\r\n```\r\n\r\nThis can happen when attempting to iterate over a query containing a 'HAVING' claus... | php | chosen |
[
{
"from": "system",
"value": "Check before use array item.\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Modularity\\Module\\Text;\n\nclass Text extends \\Modularity\\Module\n{\n public $slug = 'text';\n public $supports = array('editor');\n\n public function init()\n {\n ... | php | chosen |
[
{
"from": "system",
"value": "Extend base listener not implement\n"
},
{
"from": "human",
"value": "<?php\n/**\n * Humbug\n *\n * @category Humbug\n * @package Humbug\n * @copyright Copyright (c) 2015 Pádraic Brady (http://blog.astrumfutura.com)\n * @license https://github.com/padraic/h... | php | chosen |
[
{
"from": "system",
"value": "Remove getDriverName method call from the exception message\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Maghead\\TableParser;\n\nuse InvalidArgumentException;\nuse Magsql\\Driver\\BaseDriver;\nuse Magsql\\Driver\\MySQLDriver;\nuse Magsql\\Driver\\PgSQLDriv... | php | chosen |
[
{
"from": "system",
"value": "Remove row class and show only 2 columns"
},
{
"from": "human",
"value": "<div class=\"row\">\n<?php\n $html = '<div id=\"shopProducts\" class=\"row\">';\n if(count($items) > 0) { \n foreach ($items as $item){\n $html.= '<div id=\"'.$item['product'].'-... | php | chosen |
[
{
"from": "system",
"value": "Fix user modding page title and description\n"
},
{
"from": "human",
"value": "{{--\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-... | php | chosen |
[
{
"from": "system",
"value": "openidProvider: Change the default directory for the data store.\n\nThe default configuration uses a directory in /tmp, which may allow\nan user to create this directory before simpleSAMLphp attempts to\ncreate it. This can allow the user to overwrite files the webserver has\na... | php | chosen |
[
{
"from": "system",
"value": "Add tests for isvalid and current\n"
},
{
"from": "human",
"value": "#!/usr/bin/php -q\n<?php\nrequire_once('../lib/YleApi.php');\n\nif (file_exists(\"config.ini\"))\n\t$config=parse_ini_file(\"config.ini\", true);\nelse\n\tdie(\"Configuration file config.ini is mis... | php | chosen |
[
{
"from": "system",
"value": "Add 'entityManager' as possible annotation value\n\nReason for this change is that the IDE parses the private attributes of the annotation and provides those as autocomplete.\r\nSo this is simply a convenience change."
},
{
"from": "human",
"value": "<?php\n\ndeclar... | php | chosen |
[
{
"from": "system",
"value": "Check for autoload.php and tell the user to run composer if it's not found\n"
},
{
"from": "human",
"value": "<?php\n\nuse OCA\\Mail\\HordeTranslationHandler;\n\nrequire_once __DIR__ . '/../vendor/autoload.php';\n$l = OC_L10N::get('mail');\n\n// bypass Horde Transl... | php | chosen |
[
{
"from": "system",
"value": "Disable Internet Banking method if Omise extension is either disabled or uninstalled.\n"
},
{
"from": "human",
"value": "<?php\nclass ModelPaymentOmiseOffsite extends Model {\n public function getMethod($address, $total) {\n $this->load->language('payment/... | php | chosen |
[
{
"from": "system",
"value": "Improve UX on demo instance.\n\n"
},
{
"from": "human",
"value": "<?php\nnamespace App\\Entity\\Fixture;\n\nuse App\\Entity;\nuse Doctrine\\Common\\DataFixtures\\AbstractFixture;\nuse Doctrine\\Persistence\\ObjectManager;\n\nclass Settings extends AbstractFixture\n{... | php | chosen |
[
{
"from": "system",
"value": "Return instead of throw the exception\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Speicher210\\Estimote;\n\nuse GuzzleHttp\\Client;\nuse GuzzleHttp\\Exception\\ClientException;\nuse JMS\\Serializer\\SerializerInterface;\nuse Speicher210\\Estimote\\Exceptio... | php | chosen |
[
{
"from": "system",
"value": "Use private on the src property.\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Construct\\Constructors;\n\nuse League\\Container\\Container;\n\nclass Src extends Constructor implements ConstructorContract\n{\n /**\n * Folder to store source files.\n ... | php | chosen |
[
{
"from": "system",
"value": "Update for course format changes etc\n"
},
{
"from": "human",
"value": "<?PHP //$Id$\n// This file defines the current version of the\n// Moodle code that is being used. This can be\n// compared against the values stored in the \n// database to determine whether u... | php | chosen |
[
{
"from": "system",
"value": "Add viewBox attr to top level <svg>\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Bitverse\\Identicon\\SVG;\n\nclass Svg extends SvgNode\n{\n private $width;\n\n private $height;\n\n private $children = [];\n\n /**\n * @param integer $width\n... | php | chosen |
[
{
"from": "system",
"value": "Disable PluginsCategories till it is fixed"
},
{
"from": "human",
"value": "<?php\n\n/*\n * This file is part of PhuninCake.\n *\n ** (c) 2013 Cees-Jan Kiewiet\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distribu... | php | chosen |
[
{
"from": "system",
"value": "Read More module: refactoring and made regex more forgiving\n"
},
{
"from": "human",
"value": "<?php\n class ReadMore extends Modules {\n public function __init() {\n $this->addAlias(\"markup_post_text\", \"more\", 4); # Replace \"<!--more-->\" ... | php | chosen |
[
{
"from": "system",
"value": "Allow Drush location to be overridden for tests\n"
},
{
"from": "human",
"value": "<?php\n/**\n * @file\n * A script containing any set-up steps required for PHPUnit testing.\n */\n\nrequire __DIR__ . '/../vendor/autoload.php';\n\nputenv((new \\Platformsh\\Cli\\CliC... | php | chosen |
[
{
"from": "system",
"value": "Fix bug - wrong variable after her rename\n"
},
{
"from": "human",
"value": "<?php\n/**\n * Model\n * \n * @author: Michal Hojgr <michal.hojgr@gmail.com>\n * \n */\n\nclass ModLoader {\n\n\t/**\n\t * @var Cache\n\t */\n\tprivate $cache;\n\t/**\n\t * @var ModMapper\n... | php | chosen |
[
{
"from": "system",
"value": "[PhpUnitBridge] Enforce @-silencing of deprecation notices according to new policy\n\n"
},
{
"from": "human",
"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 lic... | php | chosen |
[
{
"from": "system",
"value": "Make sure to use top-level phpunit class"
},
{
"from": "human",
"value": "<?php\n/**\n * The TestHelper.php file is loaded before running a test suite,\n * so it can be used to bootstrap the test suite with common helpers,\n * and configuration.\n */\n\n// Require s... | php | chosen |
[
{
"from": "system",
"value": "Fix bug with the collection validation.\n"
},
{
"from": "human",
"value": "<?php declare(strict_types=1);\n\nnamespace Thepixeldeveloper\\Sitemap;\n\nuse Thepixeldeveloper\\Sitemap\\Interfaces\\VisitorInterface;\n\nabstract class Collection implements VisitorInterfa... | php | chosen |
[
{
"from": "system",
"value": "Fix search bundle name space\n"
},
{
"from": "human",
"value": "<?php\nnamespace Mapbender\\QuerySearchBundle;\n\nuse Mapbender\\CoreBundle\\Component\\MapbenderBundle;\n\n/**\n * Mapbender search bundle\n *\n * @author Andriy Oblivantsev\n */\nclass MapbenderSearch... | php | chosen |
[
{
"from": "system",
"value": "Make test model metadata configurable\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace AlgoWeb\\PODataLaravel\\Models;\n\nuse AlgoWeb\\PODataLaravel\\Models\\MetadataTrait;\nuse Illuminate\\Database\\Eloquent\\Model as Model;\nuse Illuminate\\Database\\Schema\\... | php | chosen |
[
{
"from": "system",
"value": "[task/fix-test-autoloader] Fix autoloader to support failing/erroring tests.\n\nBefore showing error output PHPUnit 3.7.x calls class_exists() on some PHPUnit\nExtension class names that may not exist. Calling class_exists() already\ntriggers the autoload function in which requ... | php | chosen |
[
{
"from": "system",
"value": "Change from short to standard open tag\n\nhttps://wiki.php.net/rfc/deprecate_php_short_tags"
},
{
"from": "human",
"value": "<?\n// Send a reply with information when an incoming SMS is received\n//\n// 1. Upload the below script to your web server\n// 2. Allocate a... | php | chosen |
[
{
"from": "system",
"value": "Remove phpdocs from lens as it is messing up with the IDE\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Md\\Phunkie\\Cats;\n\n/**\n * Lens<A,B>\n */\nclass Lens\n{\n private $g;\n private $s;\n\n /**\n * @param callable<A, B> $g\n * @param c... | php | chosen |
[
{
"from": "system",
"value": "Apply tenantable global scope on Eloquent Presence Verifier (i.e. used in validation rules like unique & exists)\n"
},
{
"from": "human",
"value": "<?php\n\ndeclare(strict_types=1);\n\nnamespace Cortex\\Foundation\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Mode... | php | chosen |
[
{
"from": "system",
"value": "Change the visibility mode {protected => public}\n"
},
{
"from": "human",
"value": "<?php namespace Sauce\\Plugins;\n\nabstract class Plugin {\n\n /**\n * The plugin settings\n *\n * @var array\n */\n protected $settings = [];\n\n /**\n ... | php | chosen |
[
{
"from": "system",
"value": "Add the http method to the route caching key to make it work with FOSRestBundle\n"
},
{
"from": "human",
"value": "<?php\n\n/**\n * @author Aaron Scherer\n * @date 12/11/13\n * @license http://www.apache.org/licenses/LICENSE-2.0.html Apache License, Versio... | php | chosen |
[
{
"from": "system",
"value": "Add source code and length to submissions.\n\nHave to utf8_encode the source because it can be non-ascii.\n"
},
{
"from": "human",
"value": "<?php\nreturn function(MongoDB $db) {\n $collection = $db->holes;\n\n $findOne = function($id) use($collection) {\n ... | php | chosen |
[
{
"from": "system",
"value": "Handle the guest-POST case better"
},
{
"from": "human",
"value": "<?php\r\nnamespace autoauth;\r\n\r\n$config = require('config.php');\r\n\r\n$class = new \\ReflectionClass($config->hook->class);\r\nif(!$class->isSubclassOf(hooks\\IHook::class))\r\n\treturn http_re... | php | chosen |
[
{
"from": "system",
"value": "[TASK] Switch lastUpdated pages rendering to PageType usage\n"
},
{
"from": "human",
"value": "<?php\nnamespace DreadLabs\\VantomasWebsite\\Page;\n\nuse DreadLabs\\VantomasWebsite\\Archive\\SearchInterface;\nuse DreadLabs\\VantomasWebsite\\RssFeed\\ConfigurationInte... | php | chosen |
[
{
"from": "system",
"value": "Correct the model in the trait\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace Junaidnasir\\Larainvite;\n\ntrait InviteTrait\n{\n /**\n * return all invitation as laravel collection\n * @return hasMany invitation Models\n */\n public function... | php | chosen |
[
{
"from": "system",
"value": "[web] Add code to check if conf.php exists, if not, then an error message is displayed\n\n\ngit-svn-id: 27e0aca8c7a52a9ae65dfba2e16879604119af8c@2318 93a4e39c-3214-0410-bb16-828d8e3bcd0f\n"
},
{
"from": "human",
"value": "<?php\n# $Id$\n#\n# read and evaluate the co... | php | chosen |
[
{
"from": "system",
"value": "Fix Pivot table losing its connection.\n\nThis hopefully fixes #1198 and while it doesn't solve the underlying problem mentioned in #1429, it does the tackle the resulting mess. :)"
},
{
"from": "human",
"value": "<?php namespace Laravel\\Database\\Eloquent;\n\nclas... | php | chosen |
[
{
"from": "system",
"value": "Update index for Debug class location\n"
},
{
"from": "human",
"value": "<?php\nerror_reporting(E_ALL);\nif (! defined('DS')) {\n\tdefine('DS', DIRECTORY_SEPARATOR);\n\tdefine('ROOT', __DIR__ . \\DS . '..' . \\DS . 'app' . \\DS);\n}\n$config = include ROOT . 'config... | php | chosen |
[
{
"from": "system",
"value": "Move repo code to vendor installer.\n"
},
{
"from": "human",
"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 inform... | php | chosen |
[
{
"from": "system",
"value": "Introduce brace break for __construct"
},
{
"from": "human",
"value": "<?php\nclass Person\n{\n protected $name;\n\n public function __construct($name)\n {\n $this->name = $name;\n }\n\n public function getName()\n {\n return $this->n... | php | chosen |
[
{
"from": "system",
"value": "Improve code coverage for String\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace test\\Widmogrod\\Primitive;\n\nuse Widmogrod\\FantasyLand\\Monoid;\nuse Widmogrod\\Helpful\\MonoidLaws;\nuse Widmogrod\\Primitive\\Stringg;\nuse Widmogrod\\Functional as f;\n\ncla... | php | chosen |
[
{
"from": "system",
"value": "Set the relationships for the notification model.\n"
},
{
"from": "human",
"value": "<?php namespace App;\n\nuse Illuminate\\Database\\Eloquent\\Model;\n\nclass Notification extends Model {\n\n\t//\n\n}\n"
},
{
"from": "gpt",
"value": "<?php namespace Ap... | php | chosen |
[
{
"from": "system",
"value": "Add helpers to properly parse lines"
},
{
"from": "human",
"value": "<?php\n\nabstract class LoaderFile extends Loader{\n protected $fileName;\n \n public function __construct($filename){\n $this->fileName = $filename;\n }\n \n protected fun... | php | chosen |
[
{
"from": "system",
"value": "Update OpenOrchestraThemeExtensionTest to use Phake\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace OpenOrchestra\\ThemeBundle\\Tests\\DependencyInjection;\n\nuse \\OpenOrchestra\\ThemeBundle\\DependencyInjection\\OpenOrchestraThemeExtension;\n\n/**\n * OpenOr... | php | chosen |
[
{
"from": "system",
"value": "Add a feature to trimming spaces\n"
},
{
"from": "human",
"value": "<?php\n\nclass Tag\n{\n\t/**\n\t * 입력받은 태그 string을 규칙에 맞게 정리하는 함수\n\t * @param $tag_string\n\t * @return string\n\t */\n\tpublic function refine_tags($tag_string)\n\t{\n\t\t$tags = '';\n\t\t$tag_arr... | php | chosen |
[
{
"from": "system",
"value": "Set up Mockery and add PHPDoc to default test case\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace SebastiaanLuca\\Router\\Tests;\n\nuse Orchestra\\Testbench\\TestCase as OrchestraTestCase;\nuse SebastiaanLuca\\Router\\RouterServiceProvider;\n\nclass TestCase ... | php | chosen |
[
{
"from": "system",
"value": "Update to follow DTC website changes\n\nNow, entry title is optionnal and may be found in h3 HTML element.\r\nEntry content is mandatory and may be found in div[class=\"item-content\"] HTML element.\r\n\r\nMoreover, the title may contain simple quotes (here, encoded) so the bri... | php | chosen |
[
{
"from": "system",
"value": "Fix IP retrieval for PHP server"
},
{
"from": "human",
"value": "<?php\n\nprint $_SERVER['REMOTE_ADDR'];\n"
},
{
"from": "gpt",
"value": "<?php\n\nprint $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['HTTP_X_REAL_IP'] ?? $_SERVER['REMOTE_ADDR'];\n"
}
] | php | chosen |
[
{
"from": "system",
"value": "Add exists() method to active record files\n"
},
{
"from": "human",
"value": "<?php\n\nnamespace ATP\\ActiveRecord;\n\nclass File\n{\n\tpublic $name = \"\";\n\tpublic $type = \"\";\n\tpublic $size = \"\";\n\t\n\tpublic function setFrom($data)\n\t{\n\t\tif(is_null($d... | php | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.