Completed
Push — master ( b88100...c1b2a0 )
by Guillaume
02:38
created

GeneratorControllerCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Starkerxp\StructureBundle\Command;
4
5
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
6
use Symfony\Component\Console\Input\InputArgument;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
class GeneratorControllerCommand extends ContainerAwareCommand
11
{
12
    protected function configure()
13
    {
14
        $this->setName('starkerxp:generate:controller')
15
            ->addArgument('controller', InputArgument::REQUIRED, 'Le controller à ajouter')
16
            ->addArgument('entite', InputArgument::REQUIRED, "L'entite à ajouter")
17
            ->setDescription('Génère le gabarit pour travailler avec les controller');
18
    }
19
20
    protected function execute(InputInterface $input, OutputInterface $output)
21
    {
22
        $generator = $this->getContainer()->get("starkerxp_structure.generator.controller_generator");
23
        $generator->generate($input->getArgument('controller'), $input->getArgument('entite'));
24
    }
25
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
26