for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Basster\LazyResponseBundle\Response;
/**
* Class RedirectResponse.
*/
final class RedirectResponse implements LazyResponseInterface
{
public function __construct(private string $routeName, private array $routeParams = [], private bool $isPermanent = false, private array $headers = [])
$headers
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function __construct(private string $routeName, private array $routeParams = [], private bool $isPermanent = false, /** @scrutinizer ignore-unused */ private array $headers = [])
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$isPermanent
public function __construct(private string $routeName, private array $routeParams = [], /** @scrutinizer ignore-unused */ private bool $isPermanent = false, private array $headers = [])
$routeParams
public function __construct(private string $routeName, /** @scrutinizer ignore-unused */ private array $routeParams = [], private bool $isPermanent = false, private array $headers = [])
$routeName
public function __construct(/** @scrutinizer ignore-unused */ private string $routeName, private array $routeParams = [], private bool $isPermanent = false, private array $headers = [])
}
public function getRouteName(): string
return $this->routeName;
public function getRouteParams(): array
return $this->routeParams;
public function getStatusCode(): int
return $this->isPermanent ? 301 : 302;
public function getHeaders(): array
return $this->headers;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.