Total Complexity | 4 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
8 | abstract class AbstractReport extends Formattable implements ReportInterface |
||
9 | { |
||
10 | /** @var array */ |
||
11 | protected $data; |
||
12 | |||
13 | /** @var null|AbstractReportable */ |
||
14 | protected $reportable; |
||
15 | |||
16 | public function __construct(FormatterInterface $formatter = null, AbstractReportable $reportable = null) |
||
17 | { |
||
18 | parent::__construct($formatter); |
||
19 | $this->reportable = $reportable; |
||
20 | $this->extractDataFrom($reportable); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @param AbstractReportable $reportable |
||
25 | */ |
||
26 | protected function extractDataFrom(AbstractReportable $reportable = null): void |
||
27 | { |
||
28 | $this->data = []; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @return array |
||
33 | */ |
||
34 | public function getData(): array |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return mixed |
||
41 | */ |
||
42 | public function getReportable() |
||
47 |