Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| IntegrationEventBus | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| dispatch | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Shared\Infrastructure\Messenger; |
| 4 | |
| 5 | use MyLegoCollection\SharedContracts\Event\IntegrationEvent; |
| 6 | use Symfony\Component\Messenger\MessageBusInterface; |
| 7 | |
| 8 | /** |
| 9 | * Global shared bus for integration (i.e. cross-slices events) |
| 10 | * @author Wilhelm Zwertvaegher |
| 11 | */ |
| 12 | readonly class IntegrationEventBus |
| 13 | { |
| 14 | |
| 15 | public function __construct(private MessageBusInterface $integrationBus) |
| 16 | { |
| 17 | } |
| 18 | |
| 19 | public function dispatch(IntegrationEvent $event): void |
| 20 | { |
| 21 | $this->integrationBus->dispatch($event); |
| 22 | } |
| 23 | } |