Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
35 | 2 | public function dispatchCommand(Command $command, CommandMetadata $metadata = null) |
|
36 | { |
||
37 | 2 | $errors = $this->commandValidator->validateCommand($command); |
|
38 | |||
39 | 2 | if (!empty($errors)) { |
|
40 | 1 | throw new CommandValidationFailed($errors); |
|
41 | } |
||
42 | |||
43 | 1 | $this->commandDispatcher->dispatchCommand($command, $metadata); |
|
44 | } |
||
45 | } |