Application   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 10
ccs 0
cts 5
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the DataImporter package.
7
 *
8
 * (c) Loïc Sapone <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace IQ2i\DataImporter\Bundle\Console;
15
16
use IQ2i\DataImporter\Command\GenerateDtoCommand;
17
use Symfony\Component\Console\Application as BaseApplication;
18
19
class Application extends BaseApplication
20
{
21
    public function __construct()
22
    {
23
        parent::__construct('DataImporter');
24
25
        $generateDtoCommand = new GenerateDtoCommand();
26
27
        $this->add($generateDtoCommand);
28
        $this->setDefaultCommand($generateDtoCommand->getName(), true);
0 ignored issues
show
Bug introduced by
It seems like $generateDtoCommand->getName() can also be of type null; however, parameter $commandName of Symfony\Component\Consol...on::setDefaultCommand() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

28
        $this->setDefaultCommand(/** @scrutinizer ignore-type */ $generateDtoCommand->getName(), true);
Loading history...
29
    }
30
}
31