QueryBus   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A handle() 0 6 1
1
<?php
2
3
namespace Antidot\Tactician;
4
5
use League\Tactician\CommandBus;
6
7
class QueryBus
8
{
9
    private CommandBus $commandBus;
10
11 2
    public function __construct(CommandBus $commandBus)
12
    {
13 2
        $this->commandBus = $commandBus;
14 2
    }
15
16
    /**
17
     * @param object $query
18
     * @return object
19
     */
20 1
    public function handle(object $query): object
21
    {
22
        /** @var object $queryResult */
23 1
        $queryResult = $this->commandBus->handle($query);
24
25 1
        return $queryResult;
26
    }
27
}
28