Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2.0054 |
Changes | 0 |
1 | <?php |
||
64 | 1 | protected function runCommand($name, array $args) |
|
65 | { |
||
66 | 1 | if (! $this->output) { |
|
67 | throw new \LogicException('Output is needed for running other command. Sent it via class property.'); |
||
68 | } |
||
69 | |||
70 | $defaults = array( |
||
71 | 1 | 'command' => $name, |
|
72 | 1 | ); |
|
73 | |||
74 | 1 | $mergedArgs = array_merge($defaults, $args); |
|
75 | |||
76 | 1 | $command = $this->getApplication()->find($name); |
|
77 | 1 | $input = new ArrayInput($mergedArgs); |
|
78 | |||
79 | 1 | return $command->run($input, $this->output); |
|
80 | } |
||
81 | } |
||
82 |