ContainerException.php
3 months ago
FailedToSaveListScreen.php
3 months ago
HookTimingException.php
3 months ago
InvalidTableScreenException.php
3 months ago
RequestException.php
3 months ago
ValueNotFoundException.php
3 months 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 | |
| 12 | public static function called_too_early(string $hook_name): self |
| 13 | { |
| 14 | return new self(sprintf('Call this after the `%s` hook.', $hook_name)); |
| 15 | } |
| 16 | |
| 17 | public static function called_too_late(string $hook_name): self |
| 18 | { |
| 19 | return new self(sprintf('Call this before the `%s` hook triggers.', $hook_name)); |
| 20 | } |
| 21 | |
| 22 | } |