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

DryRunner::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
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