8000 minor #27929 [HttpFoundation] Fixed phpdoc for get method of HeaderBa… · symfony/symfony@3b90bc7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3b90bc7

Browse files
committed
minor #27929 [HttpFoundation] Fixed phpdoc for get method of HeaderBag (JanHort)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #27929). Discussion ---------- [HttpFoundation] Fixed phpdoc for get method of HeaderBag | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | none | License | MIT | Doc PR | none Method `\Symfony\Component\HttpFoundation\HeaderBag::get` return type was declared only as `string|string[]` but there is also possibility of returning of `null` value since the `null` is the default value for second parameter. Commits ------- a72f4ec [HttpFoundation] Fixed phpdoc for get method of HeaderBag
2 parents fc41042 + a72f4ec commit 3b90bc7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Symfony/Component/HttpFoundation/HeaderBag.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ public function add(array $headers)
101101
/**
102102
* Returns a header value by name.
103103
*
104-
* @param string $key The header name
105-
* @param string|string[] $default The default value
106-
* @param bool $first Whether to return the first value or all header values
104+
* @param string $key The header name
105+
* @param string|string[]|null $default The default value
106+
* @param bool $first Whether to return the first value or all header values
107107
*
108-
* @return string|string[] The first header value or default value if $first is true, an array of values otherwise
108+
* @return string|string[]|null The first header value or default value if $first is true, an array of values otherwise
109109
*/
110110
public function get($key, $default = null, $first = true)
111111
{

0 commit comments

Comments
 (0)
0