| Conditions | 3 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | private function runApp($command, $params = [], $return = true) |
||
| 21 | { |
||
| 22 | $data = [ |
||
| 23 | 'command' => $command, |
||
| 24 | ]; |
||
| 25 | if (!empty($params)) { |
||
| 26 | $data = array_merge($data, $params); |
||
| 27 | } |
||
| 28 | |||
| 29 | $application = new Application($this->container->get('kernel')); |
||
| 30 | $application->setAutoExit(false); |
||
| 31 | $input = new ArrayInput($data); |
||
| 32 | $application->run($input); |
||
| 33 | |||
| 34 | if ($return === true) { |
||
| 35 | return $this->result(); |
||
| 36 | } |
||
| 38 | } |