8000 Fix phpdocs by mschop · Pull Request #28714 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Fix phpdocs #28714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2018
Merged

Fix phpdocs #28714

merged 1 commit into from
Oct 6, 2018

Conversation

mschop
Copy link
@mschop mschop commented Oct 3, 2018
Q A
Branch? all supported releases and master
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes (I didn't run them, but just changed docs)
Fixed tickets None
License MIT

See phan/phan#2025 for details.
Fix phpdocs for Command for preventing static code analysis tools to emit false positives.

@chalasr chalasr added this to the 2.8 milestone Oct 4, 2018
@chalasr chalasr self-requested a review October 4, 2018 01:02
* @param string $name The argument name
* @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
* @param string $description A description text
* @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Params should be the same as InputArgument::__construct() which has been corrected recently

* @param string $name The argument name
* @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL
* @param string $description A description text
* @param string|string[]|null $default The default value (for self::OPTIONAL mode only)

* @param int $mode The option mode: One of the InputOption::VALUE_* constants
* @param string $description A description text
* @param mixed $default The default value (must be null for InputOption::VALUE_NONE)
* @param string $name The option name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same but for InputOption

* @param string $name The option name
* @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts
* @param int|null $mode The option mode: One of the VALUE_* constants
* @param string $description A description text
* @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE)

@mschop
Copy link
Author
mschop commented Oct 4, 2018

@chalasr Fixed it. Docs are now equal to the docs from the object constructors (InputArgument/InputOption)

@chalasr
Copy link
Member
chalasr commented Oct 5, 2018

For 2.8

@fabpot fabpot changed the base branch from master to 2.8 October 6, 2018 07:37
See phan/phan#2025 for explaination
@fabpot
Copy link
Member
fabpot commented Oct 6, 2018

Thank you @mschop.

@fabpot fabpot merged commit 7196e49 into symfony:2.8 Oct 6, 2018
fabpot added a commit that referenced this pull request Oct 6, 2018
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #28714).

Discussion
----------

Fix phpdocs

| Q             | A
| ------------- | ---
| Branch?       | all supported releases and master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes (I didn't run them, but just changed docs)
| Fixed tickets | None
| License       | MIT

See phan/phan#2025 for details.
Fix phpdocs for Command for preventing static code analysis tools to emit false positives.

Commits
-------

7196e49 Fix phpdocs
chalasr pushed a commit that referenced this pull request Nov 14, 2018
This PR was merged into the 2.8 branch.

Discussion
----------

Command::addOption should allow int in $default

| Q             | A
| ------------- | ---
| Branch?       | all
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        |

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

In #28714 the documentation for `$default` on `Command::addOption` was changed to specify more specifically than `mixed`. However, there is an inconsistency as `InputOption::__construct` allows int in its `$default`, but not `Command::addOption`. This PR makes fixes that inconsistency.

Commits
-------

5f8bd89 Command::addOption should allow int in $default
mhujer added a commit to mhujer/symfony that referenced this pull request Dec 23, 2018
fabpot added a commit that referenced this pull request Dec 23, 2018
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] fix PHPDoc in Command

| Q             | A
| ------------- | ---
| Branch?       | 3.4 up to 4.2 for bug fixes <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| License       | MIT

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Issue was introduced in #28714, this PR fixes copy&paste from `InputArgument` and `InputOption`.

Commits
-------

13bcd6a [Console] fix PHPDoc in Command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0