QueryHandlerMiddleware::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
/*
4
 * cqrs-tactician (https://github.com/phpgears/cqrs-tactician).
5
 * CQRS implementation with League Tactician.
6
 *
7
 * @license MIT
8
 * @link https://github.com/phpgears/cqrs-tactician
9
 * @author Julián Gutiérrez <[email protected]>
10
 */
11
12
declare(strict_types=1);
13
14
namespace Gears\CQRS\Tactician;
15
16
use League\Tactician\Handler\CommandHandlerMiddleware as TacticianHandlerMiddleware;
17
use League\Tactician\Handler\Locator\HandlerLocator;
18
19
final class QueryHandlerMiddleware extends TacticianHandlerMiddleware
20
{
21
    /**
22
     * QueryHandlerMiddleware constructor.
23
     *
24
     * @param HandlerLocator $handlerLocator
25
     */
26
    public function __construct(HandlerLocator $handlerLocator)
27
    {
28
        parent::__construct(
29
            new QueryExtractor(),
30
            $handlerLocator,
31
            new QueryInflector()
32
        );
33
    }
34
}
35