ModelBuildCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 23
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A configure() 0 4 1
A execute() 0 4 2
1
<?php
2
declare(strict_types=1);
3
4
5
namespace Xervice\Database\Communication\Console\Command;
6
7
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
use Xervice\Console\Business\Model\Command\AbstractCommand;
11
12
/**
13
 * @method \Xervice\Database\Business\DatabaseFacade getFacade()
14
 */
15
class ModelBuildCommand extends AbstractCommand
16
{
17
18
    /**
19
     *
20
     * @throws \Symfony\Component\Console\Exception\InvalidArgumentException
21
     */
22
    protected function configure(): void
23
    {
24
        $this->setName('propel:model:build')
25
             ->setDescription('Generate propel models');
26
    }
27
28
    /**
29
     * @param \Symfony\Component\Console\Input\InputInterface $input
30
     * @param \Symfony\Component\Console\Output\OutputInterface $output
31
     *
32
     * @return int|null|void
33
     */
34
    protected function execute(InputInterface $input, OutputInterface $output)
35
    {
36
        foreach ($this->getFacade()->buildModel() as $line) {
37
            $output->write($line);
38
        }
39
    }
40
}
41