• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nepada / message-bus / 4581487412

pending completion
4581487412

push

github

GitHub
Update spaze/phpstan-disallowed-calls requirement from 2.11.6 to 2.12.1 (#75)

303 of 315 relevant lines covered (96.19%)

0.96 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.0
/src/MessageBus/Commands/MessengerCommandBus.php
1
<?php
2
declare(strict_types = 1);
3

4
namespace Nepada\MessageBus\Commands;
5

6
use Symfony\Component\Messenger\Exception\HandlerFailedException;
7
use Symfony\Component\Messenger\MessageBusInterface;
8

9
final class MessengerCommandBus implements CommandBus
10
{
11

12
    private MessageBusInterface $messageBus;
13

14
    public function __construct(MessageBusInterface $messageBus)
1✔
15
    {
16
        $this->messageBus = $messageBus;
1✔
17
    }
1✔
18

19
    public function handle(Command $command): void
1✔
20
    {
21
        try {
22
            $this->messageBus->dispatch($command);
1✔
23

24
        } catch (HandlerFailedException $exception) {
1✔
25
            $nestedExceptions = $exception->getNestedExceptions();
1✔
26
            if (count($nestedExceptions) === 1) {
1✔
27
                throw reset($nestedExceptions);
1✔
28
            }
29
            throw $exception;
×
30
        }
31
    }
32

33
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc