Skip to content

Commit

Permalink
Improved type signature for parse_cookie_header() return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Jul 7, 2022
1 parent 2539f32 commit dfa990d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions psalm-baseline.xml
Expand Up @@ -471,6 +471,14 @@
<code>func_get_args()</code>
</MixedArgument>
</file>
<file src="src/functions/parse_cookie_header.php">
<LessSpecificReturnStatement occurrences="1">
<code>$cookies</code>
</LessSpecificReturnStatement>
<MoreSpecificReturnType occurrences="1">
<code>array&lt;non-empty-string, string&gt;</code>
</MoreSpecificReturnType>
</file>
<file src="test/CallbackStreamTest.php">
<MissingClosureReturnType occurrences="1">
<code>function () {</code>
Expand Down
2 changes: 1 addition & 1 deletion src/functions/parse_cookie_header.php
Expand Up @@ -16,7 +16,7 @@
* overwriting. Thus, the server request should take the cookies from the request header instead.
*
* @param string $cookieHeader A string cookie header value.
* @return array<string, string> key/value cookie pairs.
* @return array<non-empty-string, string> key/value cookie pairs.
*/
function parseCookieHeader($cookieHeader): array
{
Expand Down

0 comments on commit dfa990d

Please sign in to comment.