| Total Complexity | 4 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | final class RegisterException extends ShortcodeException |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @const string |
||
| 14 | */ |
||
| 15 | const DUPLICATE = 'The shortcode \'%s\' has already been registered'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @const string |
||
| 19 | */ |
||
| 20 | const NO_ALIAS = 'Cannot alias a shortcode that does not implement '.AliasInterface::class; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @return static |
||
| 24 | */ |
||
| 25 | 2 | public static function blank(): self |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $name |
||
| 32 | * |
||
| 33 | * @return static |
||
| 34 | */ |
||
| 35 | 4 | public static function missing(string $name): self |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string $name |
||
| 44 | * |
||
| 45 | * @return static |
||
| 46 | */ |
||
| 47 | 1 | public static function duplicate(string $name): self |
|
| 48 | { |
||
| 49 | 1 | $e = sprintf(self::DUPLICATE, $name); |
|
| 50 | |||
| 51 | 1 | return new static($e); |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return static |
||
| 56 | */ |
||
| 57 | 2 | public static function noAlias(): self |
|
| 60 | } |
||
| 61 | } |
||
| 62 |