| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 2 | public static function create($commandToHandlerMap): CommandBus |
|
| 34 | { |
||
| 35 | 2 | $handlerMiddleware = new CommandHandlerMiddleware( |
|
| 36 | 2 | new ClassNameExtractor(), |
|
| 37 | 2 | new InMemoryLocator($commandToHandlerMap), |
|
| 38 | 2 | new HandleInflector() |
|
| 39 | ); |
||
| 40 | |||
| 41 | 2 | $lockingMiddleware = new LockingMiddleware(); |
|
| 42 | |||
| 43 | 2 | return new CommandBus([$lockingMiddleware, $handlerMiddleware]); |
|
| 44 | } |
||
| 45 | } |
||
| 46 |