-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation] Added "null" type on Request::create docblock #25878
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
Conversation
@@ -130,7 +130,7 @@ class Request | ||
public $headers; | ||
|
||
/** | ||
* @var string|resource | ||
* @var null|string|resource |
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.
actually, this could also be false
, as we have false === $this->content
several times
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.
then add false?
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.
at 1st glance i was wondering why it's false-able when it's already null-able...
looks like way too many types are allowed
* @param array $cookies The COOKIE parameters | ||
* @param array $files The FILES parameters | ||
* @param array $server The SERVER parameters | ||
* @param null|string|resource $content The raw body data |
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.
please put null last, it's the less useful type to tell about (personally I don't even get its value at all: it's already on the signature, but anyway...)
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.
array
s are also in the signatures you know ;)
Thank you @keradus. |
…cblock (keradus) This PR was squashed before being merged into the 2.7 branch (closes #25878). Discussion ---------- [HttpFoundation] Added "null" type on Request::create docblock | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | n/a | Fixed tickets | n/a | License | MIT | Doc PR | n/a Continuation of #24902 and #25875 Commits ------- b18f9e7 [HttpFoundation] Added "null" type on Request::create docblock
Continuation of #24902 and #25875