Completed
Push — master ( 32d2b8...7fbd09 )
by Alec
03:03
created

Report   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 4 1
A __construct() 0 3 1
1
<?php
2
/**
3
 * User: alec
4
 * Date: 29.11.18
5
 * Time: 20:57
6
 */
7
8
namespace AlecRabbit\Tools\Reports\Base;
9
10
use AlecRabbit\Tools\Reports\Contracts\ReportableInterface;
11
use AlecRabbit\Tools\Reports\Contracts\ReportInterface;
12
use AlecRabbit\Tools\Reports\Factory;
13
14
abstract class Report implements ReportInterface
15
{
16
17
    protected $formatter;
18
19 9
    public function __construct()
20
    {
21 9
        $this->formatter = Factory::makeFormatter($this);
22 9
    }
23
24
    /**
25
     * @return string
26
     */
27 2
    public function __toString(): string
28
    {
29
        return
30 2
            $this->formatter->getString();
31
    }
32
}
33