From 8cda9d1eb136286a85b65b25bfc2c0a9edcad842 Mon Sep 17 00:00:00 2001 From: Younes ENNAJI Date: Sun, 1 Mar 2026 20:08:28 +0000 Subject: [PATCH] fix: rename shadowed variable in Request::getType() The parameter \$type was being reassigned to the session value, which shadows the original parameter and causes confusion for static analysis tools and maintainers. Renamed the session value variable to \$value for clarity. --- src/Laravel/Http/Request.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Laravel/Http/Request.php b/src/Laravel/Http/Request.php index 25167c2e..9acd90cb 100644 --- a/src/Laravel/Http/Request.php +++ b/src/Laravel/Http/Request.php @@ -56,14 +56,14 @@ final readonly class Request implements RequestInterface { $session = $this->getSession(); - /** @var false|string|string[] $type */ - $type = $session?->get($type); + /** @var false|string|string[] $value */ + $value = $session?->get($type); - if (!\is_string($type) && !\is_array($type)) { + if (!\is_string($value) && !\is_array($value)) { return []; } - return $type; + return $value; } public function forgetType(string $type): void