CoversValidator   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 41
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getCommandName() 0 3 1
A getDefaultCommands() 0 6 1
A getDefinition() 0 6 1
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\InputDefinition;
8
use Symfony\Component\Console\Input\InputInterface;
9
10
class CoversValidator extends Application
11
{
12
    public const NAME = 'CoversValidator';
13
    public const VERSION = '1.6.0';
14
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function __construct($name = self::NAME, $version = self::VERSION)
19
    {
20
        parent::__construct($name, $version);
21
    }
22
23
    /**
24
     * {@inheritdoc}
25
     */
26
    protected function getCommandName(InputInterface $input): ?string
27
    {
28
        return 'validate';
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    protected function getDefaultCommands(): array
35
    {
36
        $defaultCommands = parent::getDefaultCommands();
37
        $defaultCommands[] = new ValidateCommand();
38
39
        return $defaultCommands;
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    public function getDefinition(): InputDefinition
46
    {
47
        $inputDefinition = parent::getDefinition();
48
        $inputDefinition->setArguments();
49
50
        return $inputDefinition;
51
    }
52
}
53