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
AvatarUpdatedEventHandler
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\User\Infrastructure\EventHandler;
4
5use App\Shared\Infrastructure\EventHandler\DomainEventHandler;
6use App\User\Domain\Event\AvatarUpdatedEvent;
7use Symfony\Component\Messenger\Attribute\AsMessageHandler;
8
9/**
10 * @implements DomainEventHandler<AvatarUpdatedEvent>
11 * @author Wilhelm Zwertvaegher
12 */
13#[AsMessageHandler]
14readonly class AvatarUpdatedEventHandler implements DomainEventHandler
15{
16    public function __construct()
17    {
18    }
19
20
21    public static function getMessageHandled(): string
22    {
23        return AvatarUpdatedEvent::class;
24    }
25
26    public function __invoke(AvatarUpdatedEvent $event): void
27    {
28        // do nothing for now
29    }
30}

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.

AvatarUpdatedEventHandler->__construct
18    }
AvatarUpdatedEventHandler->__invoke
26    public function __invoke(AvatarUpdatedEvent $event): void
27    {
28        // do nothing for now
29    }
AvatarUpdatedEventHandler->getMessageHandled
23        return AvatarUpdatedEvent::class;
24    }
{main}
3namespace App\User\Infrastructure\EventHandler;
4
5use App\Shared\Infrastructure\EventHandler\DomainEventHandler;
6use App\User\Domain\Event\AvatarUpdatedEvent;
7use Symfony\Component\Messenger\Attribute\AsMessageHandler;
8
9/**
10 * @implements DomainEventHandler<AvatarUpdatedEvent>
11 * @author Wilhelm Zwertvaegher
12 */
13#[AsMessageHandler]
14readonly class AvatarUpdatedEventHandler implements DomainEventHandler
15{
16    public function __construct()
17    {
18    }
19
20
21    public static function getMessageHandled(): string
22    {
23        return AvatarUpdatedEvent::class;
24    }
25
26    public function __invoke(AvatarUpdatedEvent $event): void
27    {
28        // do nothing for now
29    }