Completed
Push — develop ( fe1195...b733eb )
by Alec
05:48
created

Formatter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * User: alec
4
 * Date: 10.12.18
5
 * Time: 14:25
6
 */
7
declare(strict_types=1);
8
9
namespace AlecRabbit\Tools\Reports\Formatters;
10
11
use AlecRabbit\Tools\Internal\Theme;
12
use AlecRabbit\Tools\Reports\Contracts\ReportInterface;
13
use AlecRabbit\Tools\Reports\Factory;
14
use AlecRabbit\Tools\Reports\Formatters\Contracts\ReportFormatter;
15
16
abstract class Formatter implements ReportFormatter
17
{
18
    /** @var ReportInterface */
19
    protected $report;
20
    /** @var Theme */
21
    protected $theme;
22
23 9
    public function __construct(ReportInterface $report)
24
    {
25 9
        $this->report = $report;
26 9
        $this->theme = Factory::getThemeObject();
27 9
        $this->setStyles();
28 9
    }
29
30
    abstract public function setStyles(): void;
31
32
    abstract public function getString(): string;
33
}
34