QueryBus::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
ccs 3
cts 3
cp 1
crap 1
rs 10
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