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

Branches

Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once. Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement always has an else as part of its logical flow even if you didn't write one.

IdentityCreatedEventHandler->__construct
19    public function __construct(private IdentityCreatedOrchestrator $orchestrator)
20    {
21    }
IdentityCreatedEventHandler->__invoke
31    public function __invoke(IdentityCreatedEvent $event): void
32    {
33        ($this->orchestrator)($event);
34    }
IdentityCreatedEventHandler->getMessageHandled
28        return IdentityCreatedEvent::class;
29    }
__invoke
31    public function __invoke(IdentityCreatedEvent $event): void
32    {
33        ($this->orchestrator)($event);
34    }
{main}
3namespace App\Auth\Infrastructure\EventHandler;
4
5use App\Auth\Application\Orchestrator\IdentityCreatedOrchestrator;
6use App\Auth\Domain\Event\IdentityCreatedEvent;
7use App\Shared\Infrastructure\EventHandler\DomainEventHandler;
8use App\Shared\Infrastructure\EventHandler\IntegrationEventHandler;
9use App\Shared\Infrastructure\EventHandler\MessageHandler;
10use Symfony\Component\Messenger\Attribute\AsMessageHandler;
11
12/**
13 * @implements DomainEventHandler<IdentityCreatedEvent>
14 * @author Wilhelm Zwertvaegher
15 */
16#[AsMessageHandler]
17readonly class IdentityCreatedEventHandler implements DomainEventHandler
18{
19    public function __construct(private IdentityCreatedOrchestrator $orchestrator)
20    {
21    }
22
23    /**
24     * @return class-string<IdentityCreatedEvent>
25     */
26    public static function getMessageHandled(): string
27    {
28        return IdentityCreatedEvent::class;
29    }
30
31    public function __invoke(IdentityCreatedEvent $event): void
32    {
33        ($this->orchestrator)($event);
34    }