| Total Complexity | 2 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | #[Immutable] |
||
| 11 | final class DispatchException extends \LogicException |
||
| 12 | { |
||
| 13 | private const MESSAGE_SIGNAL_CONSOLE_EVENT = 'Rollback transaction: Message was interrupted in "%s" command on signal'; |
||
| 14 | |||
| 15 | public static function fromSignal(ConsoleSignalEvent $event): self |
||
| 16 | { |
||
| 17 | $message = sprintf(self::MESSAGE_SIGNAL_CONSOLE_EVENT, $event->getCommand()); |
||
| 18 | |||
| 19 | return new self($message, $event->getHandlingSignal()); |
||
| 20 | } |
||
| 21 | |||
| 22 | public static function fromThrowable(\Throwable $previous): self |
||
| 25 | } |
||
| 26 | } |
||
| 27 |