| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function handle(CheckerHasRecovered $event) |
||
| 18 | { |
||
| 19 | $checker = $event->checker; |
||
| 20 | |||
| 21 | if (!$checker instanceof CheckerSendsNotifications) { |
||
| 22 | return; |
||
| 23 | } |
||
| 24 | |||
| 25 | $notificationClass = $checker->recoveredNotificationClass(); |
||
| 26 | |||
| 27 | $this->sendNotification( |
||
| 28 | new $notificationClass($checker, $event->failedData) |
||
| 29 | ); |
||
| 30 | } |
||
| 31 | } |
||
| 32 |