Skip to content

Commit

Permalink
minor #40728 [PHPDoc] Fix some union type cases (fancyweb)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.4 branch.

Discussion
----------

[PHPDoc] Fix some union type cases

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

While working on symfony/symfony#40154, I discovered some PHPDoc issues, I'm going to comment in the review. Upper branches will need some fixes too.

Commits
-------

dd1481642b [PHPDoc] Fix some union type cases
  • Loading branch information
Nyholm committed Apr 8, 2021
2 parents 1b95e23 + d53ddf9 commit 2ac7479
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions Descriptor/Descriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,36 +72,26 @@ protected function write($content, $decorated = false)

/**
* Describes an InputArgument instance.
*
* @return string|mixed
*/
abstract protected function describeInputArgument(InputArgument $argument, array $options = []);

/**
* Describes an InputOption instance.
*
* @return string|mixed
*/
abstract protected function describeInputOption(InputOption $option, array $options = []);

/**
* Describes an InputDefinition instance.
*
* @return string|mixed
*/
abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []);

/**
* Describes a Command instance.
*
* @return string|mixed
*/
abstract protected function describeCommand(Command $command, array $options = []);

/**
* Describes an Application instance.
*
* @return string|mixed
*/
abstract protected function describeApplication(Application $application, array $options = []);
}
2 changes: 1 addition & 1 deletion Descriptor/TextDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ private function formatDefaultValue($default): string
}

/**
* @param (Command|string)[] $commands
* @param array<Command|string> $commands
*/
private function getColumnWidth(array $commands): int
{
Expand Down
2 changes: 1 addition & 1 deletion Helper/QuestionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static function disableStty()
/**
* Asks the question to the user.
*
* @return bool|mixed|string|null
* @return mixed
*
* @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden
*/
Expand Down

0 comments on commit 2ac7479

Please sign in to comment.