| Total Complexity | 4 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | class RegexUrlChecker 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 | 16 | * @return $this |
|
| 39 | */ |
||
| 40 | 16 | public function checkFullUrl(bool $fullUrl): self |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | 28 | * {@inheritdoc} |
|
| 49 | */ |
||
| 50 | 28 | public function check(ServerRequestInterface $request, string $regex): bool |
|
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Returns current url. |
||
| 59 | * |
||
| 60 | * @param \Psr\Http\Message\UriInterface $uri Server Request |
||
| 61 | 28 | * @return string |
|
| 62 | */ |
||
| 63 | 28 | protected function getUrlFromRequest(UriInterface $uri): string |
|
| 72 |