mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user