From 40de8852c8e42d694122aa46df65115596696345 Mon Sep 17 00:00:00 2001 From: uzdevid Date: Fri, 13 Dec 2024 18:16:40 +0500 Subject: [PATCH] Removed extra call get request --- src/RequestHeaders.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RequestHeaders.php b/src/RequestHeaders.php index 9d8ff26..2fc100a 100644 --- a/src/RequestHeaders.php +++ b/src/RequestHeaders.php @@ -26,7 +26,8 @@ public function __construct( * @return string|null The header value as a string, or null if the header is not present. */ public function getHeaderLine(string $name, string|null $default = null): string|null { - return $this->requestProvider->get()->hasHeader($name) ? $this->requestProvider->get()->getHeaderLine($name) : $default; + $request = $this->requestProvider->get(); + return $request->hasHeader($name) ? $request->getHeaderLine($name) : $default; } /**