| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 2 | public static function for(string $channelName, Notification $notification, Recipient $recipient, Throwable $error): self |
|
| 25 | { |
||
| 26 | 2 | $exception = new self(sprintf( |
|
| 27 | 2 | 'Failed to send %s via %s channel', |
|
| 28 | 2 | (new ReflectionClass($notification))->getShortName(), |
|
| 29 | 2 | $channelName |
|
| 30 | 2 | ), 0, $error); |
|
| 31 | |||
| 32 | 2 | $exception->channelName = $channelName; |
|
| 33 | 2 | $exception->notification = $notification; |
|
| 34 | 2 | $exception->recipient = $recipient; |
|
| 35 | |||
| 36 | 2 | return $exception; |
|
| 37 | } |
||
| 38 | |||
| 54 |