From e0fd73df2a7e4be0e1bf805a0c59d31183c07b70 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Wed, 7 Apr 2021 17:14:41 +0200 Subject: [PATCH 1/2] [CS] Replace easy occurences of ?: with ?? --- Client.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Client.php b/Client.php index e5bf8b7..7ad8f42 100644 --- a/Client.php +++ b/Client.php @@ -55,8 +55,8 @@ abstract class Client public function __construct(array $server = [], History $history = null, CookieJar $cookieJar = null) { $this->setServerParameters($server); - $this->history = $history ?: new History(); - $this->cookieJar = $cookieJar ?: new CookieJar(); + $this->history = $history ?? new History(); + $this->cookieJar = $cookieJar ?? new CookieJar(); } /** From fbc6ebf6ba0d41d2043be20d950e700236f87fc5 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Wed, 7 Apr 2021 18:12:22 +0200 Subject: [PATCH 2/2] [PHPDoc] Fix some union type cases --- Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Response.php b/Response.php index 46838ed..6ec30e5 100644 --- a/Response.php +++ b/Response.php @@ -123,7 +123,7 @@ public function getHeaders() * @param string $header The header name * @param bool $first Whether to return the first value or all header values * - * @return string|array The first header value if $first is true, an array of values otherwise + * @return string|array|null The first header value if $first is true, an array of values otherwise */ public function getHeader($header, $first = true) {