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

GeneratorControllerCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 7 1
A execute() 0 5 1
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