| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | 6 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 38 | { |
||
| 39 | 6 | $contents = (new DataGenerator($this->describe, $input))->generate(); |
|
| 40 | 6 | $filename = ucfirst(plural(underscore($input->getArgument('table')))); |
|
| 41 | 6 | $rendered = $this->renderer->render('Controller.twig', $contents); |
|
| 42 | |||
| 43 | 6 | $this->filesystem->write('application/controllers/' . $filename . '.php', $rendered); |
|
| 44 | |||
| 45 | 6 | $output->writeln('<info>Controller created successfully!</info>'); |
|
| 46 | 6 | } |
|
| 47 | } |
||
| 48 |