ContainerException.php
2 days ago
FailedToSaveListScreen.php
2 days ago
HookTimingException.php
2 days ago
InvalidTableScreenException.php
2 days ago
IteratorException.php
2 days ago
RequestException.php
2 days ago
ValueNotFoundException.php
2 days ago
HookTimingException.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Exception; |
| 6 | |
| 7 | use BadFunctionCallException; |
| 8 | |
| 9 | final class HookTimingException extends BadFunctionCallException |
| 10 | { |
| 11 | public static function called_too_early(string $hook_name): self |
| 12 | { |
| 13 | return new self(sprintf('Call this after the `%s` hook.', $hook_name)); |
| 14 | } |
| 15 | |
| 16 | public static function called_too_late(string $hook_name): self |
| 17 | { |
| 18 | return new self(sprintf('Call this before the `%s` hook triggers.', $hook_name)); |
| 19 | } |
| 20 | |
| 21 | } |
| 22 |