Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
3 / 3 |
|
66.67% |
2 / 3 |
|
66.67% |
2 / 3 |
|
100.00% |
3 / 3 |
CRAP | |
0.00% |
0 / 1 |
| AvatarUpdatedEventHandler | |
100.00% |
3 / 3 |
|
66.67% |
2 / 3 |
|
66.67% |
2 / 3 |
|
100.00% |
3 / 3 |
3.33 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getMessageHandled | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| __invoke | |
100.00% |
1 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\User\Infrastructure\EventHandler; |
| 4 | |
| 5 | use App\Shared\Infrastructure\EventHandler\DomainEventHandler; |
| 6 | use App\User\Domain\Event\AvatarUpdatedEvent; |
| 7 | use Symfony\Component\Messenger\Attribute\AsMessageHandler; |
| 8 | |
| 9 | /** |
| 10 | * @implements DomainEventHandler<AvatarUpdatedEvent> |
| 11 | * @author Wilhelm Zwertvaegher |
| 12 | */ |
| 13 | #[AsMessageHandler] |
| 14 | readonly 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 | } |