Application   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
namespace ComposerRequireChecker\Cli;
4
5
use PackageVersions\Versions;
6
use Symfony\Component\Console\Application as AbstractApplication;
7
8
class Application extends AbstractApplication
9
{
10 10
    public function __construct()
11
    {
12 10
        parent::__construct(
13 10
            'ComposerRequireChecker',
14 10
            Versions::getVersion('maglnet/composer-require-checker')
15
        );
16
17 10
        $check = new CheckCommand();
18 10
        $this->add($check);
19 10
        $this->setDefaultCommand($check->getName());
0 ignored issues
show
Bug introduced by
It seems like $check->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

19
        $this->setDefaultCommand(/** @scrutinizer ignore-type */ $check->getName());
Loading history...
20 10
    }
21
}
22