Passed
Push — master ( 3339d1...a2b216 )
by Koldo
05:46
created

Console::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 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
    /** @var InputInterface */
18
    private $input;
19
20 1
    public function __construct(string $name = self::NAME, string $version = self::VERSION)
21
    {
22 1
        $this->input = new ArgvInput();
23 1
        parent::__construct($name, $version);
24 1
    }
25
26
    public function run(InputInterface $input = null, OutputInterface $output = null)
27
    {
28
        return parent::run($input ?? $this->input, $output);
29
    }
30
31 1
    public function getInput(): InputInterface
32
    {
33 1
        return $this->input;
34
    }
35
}
36