Completed
Push — master ( 907ff1...83cfba )
by Julián
01:21
created

CommandHandlerMiddleware   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 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\CommandNameExtractor\ClassNameExtractor;
18
use League\Tactician\Handler\Locator\HandlerLocator;
19
20
final class CommandHandlerMiddleware extends TacticianHandlerMiddleware
21
{
22
    /**
23
     * CommandHandlerMiddleware constructor.
24
     *
25
     * @param HandlerLocator $handlerLocator
26
     */
27
    public function __construct(HandlerLocator $handlerLocator)
28
    {
29
        parent::__construct(
30
            new ClassNameExtractor(),
31
            $handlerLocator,
32
            new CommandInflector()
33
        );
34
    }
35
}
36