Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 156b412

Browse filesBrowse files
committed
minor #28834 Allow integers as default console option value (curry684)
This PR was squashed before being merged into the 2.8 branch (closes #28834). Discussion ---------- Allow integers as default console option value | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> B/C break fix for static analysis tools. Ref #28374 (comment) Commits ------- 064950a Allow integers as default console option value
2 parents 5e6ea4e + 064950a commit 156b412
Copy full SHA for 156b412

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed

‎src/Symfony/Component/Console/Input/InputOption.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Console/Input/InputOption.php
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ class InputOption
3333
private $description;
3434

3535
/**
36-
* @param string $name The option name
37-
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
38-
* @param int|null $mode The option mode: One of the VALUE_* constants
39-
* @param string $description A description text
40-
* @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE)
36+
* @param string $name The option name
37+
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
38+
* @param int|null $mode The option mode: One of the VALUE_* constants
39+
* @param string $description A description text
40+
* @param string|string[]|int|bool|null $default The default value (must be null for self::VALUE_NONE)
4141
*
4242
* @throws InvalidArgumentException If option mode is invalid or incompatible
4343
*/
@@ -149,7 +149,7 @@ public function isArray()
149149
/**
150150
* Sets the default value.
151151
*
152-
* @param string|string[]|bool|null $default The default value
152+
* @param string|string[]|int|bool|null $default The default value
153153
*
154154
* @throws LogicException When incorrect default value is given
155155
*/
@@ -173,7 +173,7 @@ public function setDefault($default = null)
173173
/**
174174
* Returns the default value.
175175
*
176-
* @return string|string[]|bool|null The default value
176+
* @return string|string[]|int|bool|null The default value
177177
*/
178178
public function getDefault()
179179
{

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.