Completed
Pull Request — master (#85)
by
unknown
02:27
created

ConfigurationDataFinderQueryHandler::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace PhpGitHooks\Module\Configuration\Contract\QueryHandler;
4
5
use Bruli\EventBusBundle\QueryBus\QueryHandlerInterface;
6
use Bruli\EventBusBundle\QueryBus\QueryInterface;
7
use PhpGitHooks\Module\Configuration\Contract\Response\ConfigurationDataResponse;
8
use PhpGitHooks\Module\Configuration\Service\ConfigurationDataFinder;
9
10
class ConfigurationDataFinderQueryHandler implements QueryHandlerInterface
11
{
12
    /**
13
     * @var ConfigurationDataFinder
14
     */
15
    private $configurationDataFinder;
16
17
    /**
18
     * ConfigurationDataFinderQueryHandler constructor.
19
     *
20
     * @param ConfigurationDataFinder $configurationDataFinder
21
     */
22 1
    public function __construct(ConfigurationDataFinder $configurationDataFinder)
23
    {
24 1
        $this->configurationDataFinder = $configurationDataFinder;
25 1
    }
26
27
    /**
28
     * @param QueryInterface $query
29
     *
30
     * @return ConfigurationDataResponse
31
     */
32
    public function handle(QueryInterface $query)
33
    {
34
        return $this->configurationDataFinder->find();
35
    }
36
}
37