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

CoversValidatorSymfony5::getCommandName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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