From dfa990d294c2e6300699978e78c63724647c5d2a Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Thu, 7 Jul 2022 14:17:05 +0200 Subject: [PATCH] Improved type signature for `parse_cookie_header()` return type Ref: https://github.com/laminas/laminas-diactoros/pull/106#discussion_r915795683 --- psalm-baseline.xml | 8 ++++++++ src/functions/parse_cookie_header.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index e80f22d4..17bb976e 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -471,6 +471,14 @@ func_get_args() + + + $cookies + + + array<non-empty-string, string> + + function () { diff --git a/src/functions/parse_cookie_header.php b/src/functions/parse_cookie_header.php index 10cac8fc..acb187fa 100644 --- a/src/functions/parse_cookie_header.php +++ b/src/functions/parse_cookie_header.php @@ -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 key/value cookie pairs. + * @return array key/value cookie pairs. */ function parseCookieHeader($cookieHeader): array {