Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
66.67% |
2 / 3 |
|
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
| NotificationLogCreatedEvent | |
66.67% |
2 / 3 |
|
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
|
50.00% |
1 / 2 |
2.50 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getNotificationLog | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Notification\Domain\Event; |
| 4 | |
| 5 | use App\Auth\Domain\Model\Identity; |
| 6 | use App\Notification\Domain\Model\NotificationLog; |
| 7 | use App\Shared\Domain\Event\DomainEvent; |
| 8 | |
| 9 | /** |
| 10 | * @author Wilhelm Zwertvaegher |
| 11 | */ |
| 12 | class NotificationLogCreatedEvent extends DomainEvent |
| 13 | { |
| 14 | private const string TYPE = 'notification.log.created'; |
| 15 | |
| 16 | private readonly NotificationLog $notificationLog; |
| 17 | |
| 18 | /** |
| 19 | * @param NotificationLog $notificationLog |
| 20 | * @param array<string, string|int>|null $metadata |
| 21 | */ |
| 22 | public function __construct(NotificationLog $notificationLog, ?array $metadata = null) |
| 23 | { |
| 24 | parent::__construct(self::TYPE, $metadata); |
| 25 | $this->notificationLog = $notificationLog; |
| 26 | } |
| 27 | |
| 28 | public function getNotificationLog(): NotificationLog |
| 29 | { |
| 30 | return $this->notificationLog; |
| 31 | } |
| 32 | } |