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

Formatter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 17
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

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