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