CliReporter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 15
c 0
b 0
f 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A report() 0 3 1
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