-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PHPDoc] Fix some union type cases #40728
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,7 +123,7 @@ public function getHeaders() | |
* @param string $header The header name | ||
* @param bool $first Whether to return the first value or all header values | ||
* | ||
* @return string|array The first header value if $first is true, an array of values otherwise | ||
* @return string|array|null The first header value if $first is true, an array of values otherwise | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
*/ | ||
public function getHeader($header, $first = true) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 = []); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We never return anything in the implementations and the class is @internal. |
||
|
||
/** | ||
* 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 = []); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -298,7 +298,7 @@ private function formatDefaultValue($default): string | |
} | ||
|
||
/** | ||
* @param (Command|string)[] $commands | ||
* @param array<Command|string> $commands | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know about this notation, I think |
||
*/ | ||
private function getColumnWidth(array $commands): int | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ public static function disableStty() | |
/** | ||
* Asks the question to the user. | ||
* | ||
* @return bool|mixed|string|null | ||
* @return mixed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that we should be strict and clean. But could be be more specific?
I know that Is it reasonable to do anything else than There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not look at the code here. |
||
* | ||
* @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,15 +97,15 @@ public function cancel(): void; | |
* - response_headers (array) - an array modelled after the special $http_response_header variable | ||
* - start_time (float) - the time when the request was sent or 0.0 when it's pending | ||
* - url (string) - the last effective URL of the request | ||
* - user_data (mixed|null) - the value of the "user_data" request option, null if not set | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should keep all There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm.. but There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually yes, callable is a very valid type here - this is really There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using just |
||
* - user_data (mixed) - the value of the "user_data" request option, null if not set | ||
* | ||
* When the "capture_peer_cert_chain" option is true, the "peer_certificate_chain" | ||
* attribute SHOULD list the peer certificates as an array of OpenSSL X.509 resources. | ||
* | ||
* Other info SHOULD be named after curl_getinfo()'s associative return value. | ||
* | ||
* @return array|mixed|null An array of all available info, or one of them when $type is | ||
* provided, or null when an unsupported type is requested | ||
* @return array|mixed An array of all available info, or one of them when $type is | ||
* provided, or null when an unsupported type is requested | ||
*/ | ||
public function getInfo(string $type = null); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->data['firewall'] = null;
line 194