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.
This commit is contained in:
Younes ENNAJI
2026-03-01 20:08:28 +00:00
parent 6d314dbc07
commit 8cda9d1eb1
+4 -4
View File
@@ -56,14 +56,14 @@ final readonly class Request implements RequestInterface
{ {
$session = $this->getSession(); $session = $this->getSession();
/** @var false|string|string[] $type */ /** @var false|string|string[] $value */
$type = $session?->get($type); $value = $session?->get($type);
if (!\is_string($type) && !\is_array($type)) { if (!\is_string($value) && !\is_array($value)) {
return []; return [];
} }
return $type; return $value;
} }
public function forgetType(string $type): void public function forgetType(string $type): void