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

CoversValidatorSymfony6   A

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 getDefaultCommands() 0 6 1
A getDefinition() 0 6 1
A getCommandName() 0 3 1
A __construct() 0 3 1
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