Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
18 | public static function create(ContainerInterface $container) |
||
19 | { |
||
20 | $commandToHandlerMap = self::gatherMapping(); |
||
21 | |||
22 | $containerLocator = new ContainerLocator( |
||
23 | $container, |
||
24 | $commandToHandlerMap |
||
25 | ); |
||
26 | |||
27 | $commandHandlerMiddleware = new CommandHandlerMiddleware( |
||
28 | new ClassNameExtractor(), |
||
29 | $containerLocator, |
||
30 | new HandleInflector() |
||
31 | ); |
||
32 | |||
33 | return new CommandBus( |
||
34 | $container->get(LoopInterface::class), |
||
35 | $commandHandlerMiddleware |
||
36 | ); |
||
37 | } |
||
38 | |||
64 |