Console   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 3
eloc 8
c 2
b 0
f 1
dl 0
loc 21
ccs 6
cts 8
cp 0.75
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A run() 0 3 1
A getInput() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Antidot\Cli\Application;
6
7
use Symfony\Component\Console\Application;
8
use Symfony\Component\Console\Input\ArgvInput;
9
use Symfony\Component\Console\Input\InputInterface;
10
use Symfony\Component\Console\Output\OutputInterface;
11
12
final class Console extends Application
13
{
14
    public const NAME = 'AntiDot Framework Console Tool';
15
    public const VERSION = '1.0.0';
16
17
    private InputInterface $input;
18
19 2
    public function __construct(string $name = self::NAME, string $version = self::VERSION)
20
    {
21 2
        $this->input = new ArgvInput();
22 2
        parent::__construct($name, $version);
23 2
    }
24
25
    public function run(InputInterface $input = null, OutputInterface $output = null)
26
    {
27
        return parent::run($input ?? $this->input, $output);
28
    }
29
30 1
    public function getInput(): InputInterface
31
    {
32 1
        return $this->input;
33
    }
34
}
35