Total Complexity | 6 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class RedirectResponse implements LazyResponseInterface |
||
10 | { |
||
11 | 3 | public function __construct(private string $routeName, private array $routeParams = [], private bool $isPermanent = false, private array $headers = []) |
|
12 | { |
||
13 | 3 | } |
|
14 | |||
15 | 3 | public function getRouteName(): string |
|
16 | { |
||
17 | 3 | return $this->routeName; |
|
18 | } |
||
19 | |||
20 | 3 | public function getRouteParams(): array |
|
21 | { |
||
22 | 3 | return $this->routeParams; |
|
23 | } |
||
24 | |||
25 | 3 | public function getStatusCode(): int |
|
26 | { |
||
27 | 3 | return $this->isPermanent ? 301 : 302; |
|
28 | } |
||
29 | |||
30 | 3 | public function getHeaders(): array |
|
33 | } |
||
34 | } |
||
35 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.