Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
33.33% |
1 / 3 |
|
33.33% |
1 / 3 |
|
33.33% |
1 / 3 |
|
33.33% |
1 / 3 |
CRAP | |
0.00% |
0 / 1 |
| IdentityCompletedEventHandler | |
33.33% |
1 / 3 |
|
33.33% |
1 / 3 |
|
33.33% |
1 / 3 |
|
33.33% |
1 / 3 |
5.67 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getMessageHandled | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| __invoke | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Auth\Infrastructure\EventHandler; |
| 4 | |
| 5 | use App\Auth\Application\Orchestrator\IdentityCompletedOrchestrator; |
| 6 | use App\Auth\Domain\Event\IdentityCompletedEvent; |
| 7 | use App\Auth\Domain\Event\IdentityCreatedEvent; |
| 8 | use App\Shared\Infrastructure\EventHandler\DomainEventHandler; |
| 9 | use Symfony\Component\Messenger\Attribute\AsMessageHandler; |
| 10 | |
| 11 | /** |
| 12 | * @implements DomainEventHandler<IdentityCreatedEvent> |
| 13 | * @author Wilhelm Zwertvaegher |
| 14 | */ |
| 15 | #[AsMessageHandler] |
| 16 | readonly class IdentityCompletedEventHandler implements DomainEventHandler |
| 17 | { |
| 18 | public function __construct(private IdentityCompletedOrchestrator $orchestrator) |
| 19 | { |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * @return class-string<IdentityCompletedEvent> |
| 24 | */ |
| 25 | public static function getMessageHandled(): string |
| 26 | { |
| 27 | return IdentityCompletedEvent::class; |
| 28 | } |
| 29 | |
| 30 | public function __invoke(IdentityCompletedEvent $event): void |
| 31 | { |
| 32 | ($this->orchestrator)($event); |
| 33 | } |
| 34 | } |