LoadFixturesCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 27
ccs 0
cts 15
cp 0
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 3 1
A __construct() 0 4 1
A configure() 0 5 1
1
<?php declare(strict_types = 1);
2
3
namespace Simplex\Quickstart\Shared\Console;
4
5
use Simplex\Quickstart\Shared\Testing\FixtureLoader;
6
use Symfony\Component\Console\Command\Command;
7
use Symfony\Component\Console\Input\InputInterface;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
final class LoadFixturesCommand extends Command
11
{
12
    public const COMMAND_NAME = 'app:load-fixtures';
13
14
    /** @var FixtureLoader */
15
    private $loader;
16
17
    public function __construct(FixtureLoader $loader)
18
    {
19
        $this->loader = $loader;
20
        parent::__construct();
21
    }
22
23
    protected function configure()
24
    {
25
        $this
26
            ->setName(self::COMMAND_NAME)
27
            ->setDescription('Loads the database fixtures')
28
        ;
29
    }
30
31
    /**
32
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
33
     */
34
    protected function execute(InputInterface $input, OutputInterface $output)
35
    {
36
        $this->loader->load();
37
    }
38
}
39