| Total Complexity | 5 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 70% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class UrlShortenerOptions extends AbstractOptions |
||
| 9 | { |
||
| 10 | public const DEFAULT_CHARS = '123456789bcdfghjkmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ'; |
||
| 11 | |||
| 12 | // phpcs:disable |
||
| 13 | protected $__strictMode__ = false; |
||
| 14 | // phpcs:enable |
||
| 15 | |||
| 16 | private $shortcodeChars = self::DEFAULT_CHARS; |
||
| 17 | private $validateUrl = true; |
||
| 18 | |||
| 19 | 3 | public function getChars(): string |
|
| 20 | { |
||
| 21 | 3 | return $this->shortcodeChars; |
|
| 22 | } |
||
| 23 | |||
| 24 | protected function setShortcodeChars(string $shortcodeChars): self |
||
| 25 | { |
||
| 26 | $this->shortcodeChars = empty($shortcodeChars) ? self::DEFAULT_CHARS : $shortcodeChars; |
||
| 27 | return $this; |
||
| 28 | } |
||
| 29 | |||
| 30 | 5 | public function isUrlValidationEnabled(): bool |
|
| 33 | } |
||
| 34 | |||
| 35 | 7 | protected function setValidateUrl($validateUrl): self |
|
| 39 | } |
||
| 40 | } |
||
| 41 |