minor #29437 [HttpFoundation] Fix HeaderBag::get phpdoc (jvasseur)
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpFoundation] Fix HeaderBag::get phpdoc
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
When setting `$first` to `false`, the default value is wrapped into an array meaning you need to pass a string as the default value instead of an array of strings.
Commits
-------
5196dac7a8
Fix HeaderBag::get phpdoc
This commit is contained in:
commit
9c84b149c5
@ -101,9 +101,9 @@ class HeaderBag implements \IteratorAggregate, \Countable
|
||||
/**
|
||||
* Returns a header value by name.
|
||||
*
|
||||
* @param string $key The header name
|
||||
* @param string|string[]|null $default The default value
|
||||
* @param bool $first Whether to return the first value or all header values
|
||||
* @param string $key The header name
|
||||
* @param string|null $default The default value
|
||||
* @param bool $first Whether to return the first value or all header values
|
||||
*
|
||||
* @return string|string[]|null The first header value or default value if $first is true, an array of values otherwise
|
||||
*/
|
||||
|
Reference in New Issue
Block a user