CliReporter::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
nc 1
nop 1
dl 0
loc 3
c 0
b 0
f 0
cc 1
rs 10
1
<?php
2
3
namespace Startwind\Inventorio\Reporter;
4
5
use Symfony\Component\Console\Output\OutputInterface;
6
7
/**
8
 * Report the data to the command line. Used for testing purposes.
9
 */
10
class CliReporter implements Reporter
11
{
12
    private OutputInterface $output;
13
14
    public function __construct(OutputInterface $output)
15
    {
16
        $this->output = $output;
17
    }
18
19
    /**
20
     * @inheritDoc
21
     */
22
    public function report(array $collectionData): void
23
    {
24
        $this->output->writeln(json_encode($collectionData, JSON_PRETTY_PRINT));
25
    }
26
}
27