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

GeneratorEntiteCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 6 1
A execute() 0 5 1
1
<?php
2
3
namespace Starkerxp\StructureBundle\Command;
4
5
use Starkerxp\StructureBundle\Generator\EntiteGenerator;
6
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
7
use Symfony\Component\Console\Input\InputArgument;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
11
class GeneratorEntiteCommand extends ContainerAwareCommand
12
{
13
    protected function configure()
14
    {
15
        $this->setName('starkerxp:generate:entite')
16
            ->addArgument('entite', InputArgument::REQUIRED, "L'entite à ajouter")
17
            ->setDescription('Génère le gabarit pour travailler avec les entites');
18
    }
19
20
    protected function execute(InputInterface $input, OutputInterface $output)
21
    {
22
        $generator = $this->getContainer()->get("starkerxp_structure.generator.entite_generator");
23
        $generator->generate($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