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