| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function __invoke(InputInterface $input, OutputInterface $output) |
||
| 21 | { |
||
| 22 | if (!$input->getOption('no-template')) { |
||
| 23 | $controller = explode('/', $input->getArgument('route')); |
||
| 24 | $app = $this->appContainer; |
||
| 25 | |||
| 26 | /** @var Application $application */ |
||
| 27 | $application = $app->resolve(Application::class); |
||
| 28 | $command = $application->find('create:template'); |
||
| 29 | |||
| 30 | $inputs = array( |
||
| 31 | 'namespace' => $input->getArgument('namespace'), |
||
| 32 | 'template-name' => $controller[2] |
||
| 33 | ); |
||
| 34 | |||
| 35 | if ($input->getOption('admin')) { |
||
| 36 | $inputs['--admin'] = true; |
||
| 37 | } |
||
| 38 | |||
| 39 | $greetInput = new ArrayInput($inputs); |
||
| 40 | $command->run($greetInput, $output); |
||
| 41 | } |
||
| 43 | } |