Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| UserLogoutEvent | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getAggregateId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | // ╔════════════════════════════════════════════════════════════╗ |
| 4 | // ║ MIT Licence (#Expat) - https://opensource.org/licenses/MIT ║ |
| 5 | // ║ Copyright 2026 Frederic Poeydomenge <dyno@phexium.com> ║ |
| 6 | // ╚════════════════════════════════════════════════════════════╝ |
| 7 | |
| 8 | declare(strict_types=1); |
| 9 | |
| 10 | namespace AppDemo\User\Domain\Event; |
| 11 | |
| 12 | use DateTimeImmutable; |
| 13 | use Phexium\Domain\Event\DomainEventAbstract; |
| 14 | use Phexium\Domain\Id\IdInterface; |
| 15 | |
| 16 | final readonly class UserLogoutEvent extends DomainEventAbstract |
| 17 | { |
| 18 | public function __construct( |
| 19 | IdInterface $eventId, |
| 20 | DateTimeImmutable $occurredOn, |
| 21 | private IdInterface $userId, |
| 22 | ) { |
| 23 | parent::__construct($eventId, $occurredOn); |
| 24 | } |
| 25 | |
| 26 | public function getAggregateId(): IdInterface |
| 27 | { |
| 28 | return $this->userId; |
| 29 | } |
| 30 | } |