| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class NotFoundShortUrlOptions extends AbstractOptions |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var bool |
||
| 12 | */ |
||
| 13 | private $enableRedirection = false; |
||
| 14 | /** |
||
| 15 | * @var string|null |
||
| 16 | */ |
||
| 17 | private $redirectTo; |
||
| 18 | |||
| 19 | 2 | public function isRedirectionEnabled(): bool |
|
| 20 | { |
||
| 21 | 2 | return $this->enableRedirection; |
|
| 22 | } |
||
| 23 | |||
| 24 | 1 | protected function setEnableRedirection(bool $enableRedirection = true): self |
|
| 28 | } |
||
| 29 | |||
| 30 | 1 | public function getRedirectTo(): string |
|
| 31 | { |
||
| 32 | 1 | return $this->redirectTo ?? ''; |
|
| 33 | } |
||
| 34 | |||
| 35 | 1 | protected function setRedirectTo(?string $redirectTo): self |
|
| 39 | } |
||
| 40 | } |
||
| 41 |