Passed
Push — master ( c9a7c7...1fb46e )
by Jakub
01:37
created

DryRunner   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A run() 0 5 1
A __construct() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Zalas\Toolbox\Cli\Runner;
4
5
use Symfony\Component\Console\Output\OutputInterface;
6
use Zalas\Toolbox\Runner\Runner;
7
use Zalas\Toolbox\Tool\Command;
8
9
final class DryRunner implements Runner
10
{
11
    private $output;
12
13 4
    public function __construct(OutputInterface $output)
14
    {
15 4
        $this->output = $output;
16
    }
17
18 2
    public function run(Command $command): int
19
    {
20 2
        $this->output->writeln((string) $command);
21
22 2
        return 0;
23
    }
24
}
25