Total Complexity | 4 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
27 | class DefaultUrlChecker implements UrlCheckerInterface |
||
28 | { |
||
29 | /** |
||
30 | * @var bool |
||
31 | */ |
||
32 | protected bool $checkFullUrl = false; |
||
33 | |||
34 | /** |
||
35 | * Check the full URL |
||
36 | * |
||
37 | * @param bool $fullUrl Full URL to check or not |
||
38 | 8 | * @return $this |
|
39 | */ |
||
40 | 8 | public function checkFullUrl(bool $fullUrl): self |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | 44 | * {@inheritdoc} |
|
49 | */ |
||
50 | 44 | public function check(ServerRequestInterface $request, string $loginUrl): bool |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * Returns current url. |
||
59 | * |
||
60 | * @param \Psr\Http\Message\UriInterface $uri Server Request |
||
61 | 44 | * @return string |
|
62 | */ |
||
63 | 44 | protected function getUrlFromRequest(UriInterface $uri): string |
|
72 |