Code Coverage
 
Lines
Branches
Paths
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
IdentityCompletedEvent
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getIdentity
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace App\Auth\Domain\Event;
4
5use App\Auth\Domain\Model\Identity;
6use App\Shared\Domain\Event\DomainEvent;
7
8/**
9 * @author Wilhelm Zwertvaegher
10 */
11class IdentityCompletedEvent extends DomainEvent
12{
13    private const string TYPE = 'auth.identity.completed';
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}