TacticianCommandBus   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 12
ccs 0
cts 4
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Antidot\EventSource\Infrastructure\Bus;
6
7
use Antidot\EventSource\Application\Bus\CommandBus as BaseCommandBus;
8
use League\Tactician\CommandBus;
9
10
class TacticianCommandBus implements BaseCommandBus
11
{
12
    private CommandBus $commandBus;
13
14
    public function __construct(CommandBus $commandBus)
15
    {
16
        $this->commandBus = $commandBus;
17
    }
18
19
    public function __invoke(object $command): void
20
    {
21
        $this->commandBus->handle($command);
22
    }
23
}
24