Completed
Pull Request — master (#15)
by James
02:25
created

SymfonyConsoleTextFormatter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Roave\ApiCompare\Formatter;
5
6
use Roave\ApiCompare\Change;
7
use Roave\ApiCompare\Changes;
8
use Symfony\Component\Console\Output\OutputInterface;
9
10
final class SymfonyConsoleTextFormatter implements OutputFormatter
11
{
12
    /**
13
     * @var OutputInterface
14
     */
15
    private $output;
16
17
    public function __construct(OutputInterface $output)
18
    {
19
        $this->output = $output;
20
    }
21
22
    public function write(Changes $changes) : void
23
    {
24
        /** @var Change $change */
25
        foreach ($changes as $change) {
26
            $this->output->writeln((string)$change);
27
        }
28
    }
29
}
30