Passed
Push — master ( 5ba0c7...1a52dc )
by Oliver
01:34
created

CoversValidatorSymfony6::getDefaultCommands()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
namespace OckCyp\CoversValidator\Application;
4
5
use Composer\InstalledVersions;
6
use OckCyp\CoversValidator\Command\ValidateCommand;
7
use Symfony\Component\Console\Application;
8
use Symfony\Component\Console\Input\InputDefinition;
9
use Symfony\Component\Console\Input\InputInterface;
10
11
/**
12
 * @codeCoverageIgnore
13
 */
14
class CoversValidatorSymfony6 extends Application
15
{
16
    const NAME = 'CoversValidator';
17
    const VERSION = '1.4.0';
18
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function __construct($name = self::NAME, $version = self::VERSION)
23
    {
24
        parent::__construct($name, $version);
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    protected function getCommandName(InputInterface $input): ?string
31
    {
32
        return 'validate';
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    protected function getDefaultCommands(): array
39
    {
40
        $defaultCommands = parent::getDefaultCommands();
41
        $defaultCommands[] = new ValidateCommand;
42
43
        return $defaultCommands;
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function getDefinition(): InputDefinition
50
    {
51
        $inputDefinition = parent::getDefinition();
52
        $inputDefinition->setArguments();
53
54
        return $inputDefinition;
55
    }
56
}
57