Test Failed
Pull Request — 4.2 (#140)
by David
12:30
created

GenerateCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
namespace Mouf\Database\TDBM\Commands;
3
4
5
use Mouf\Database\TDBM\TDBMService;
6
use Symfony\Component\Console\Command\Command;
7
8
class GenerateCommand extends Command
9
{
10
11
    /**
12
     * @var TDBMService
13
     */
14
    private $tdbmService;
15
16
    public function __construct(TDBMService $tdbmService)
17
    {
18
        $this->tdbmService = $tdbmService;
19
    }
20
21
    protected function configure()
22
    {
23
        $this->setName('tdbm:generate')
24
            ->setDescription('Generates DAOs and beans.')
25
            ->setHelp('Use this command to generate or regenerate the DAOs and beans for your project.')
26
        ;
27
    }
28
29
    protected function execute(InputInterface $input, OutputInterface $output)
30
    {
31
        // TODO: wrap MultiLogger in configuration.
32
        // TODO: externalize composer.json file for autoloading (no more parameters for generateAllDaosAndBeans)
33
34
        $this->tdbmService->generateAllDaosAndBeans();
35
    }
36
}
37