| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 2 | public function execute(Notification $notification): void |
|
| 30 | { |
||
| 31 | 2 | if ($notification->isLocked()) { |
|
| 32 | 1 | throw new NotificationLockedException($notification); |
|
| 33 | } |
||
| 34 | 1 | $notification->lock(); |
|
| 35 | 1 | $this->notificationRepository->persist($notification); |
|
| 36 | 1 | parent::execute($notification); |
|
| 37 | 1 | $notification->unlock(); |
|
| 38 | 1 | $this->notificationRepository->persist($notification); |
|
| 39 | 1 | } |
|
| 40 | } |
||
| 41 |