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

CounterReport::__toString()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 18
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 2.3931

Importance

Changes 0
Metric Value
cc 2
eloc 14
nc 2
nop 0
dl 0
loc 18
ccs 7
cts 13
cp 0.5385
crap 2.3931
rs 9.7998
c 0
b 0
f 0
1
<?php
2
/**
3
 * User: alec
4
 * Date: 29.11.18
5
 * Time: 21:02
6
 */
7
8
namespace AlecRabbit\Tools\Reports;
9
10
use AlecRabbit\Tools\Counter;
11
use AlecRabbit\Tools\Reports\Base\Report;
12
use AlecRabbit\Tools\Traits\CounterFields;
13
14
class CounterReport extends Report
15
{
16
    use CounterFields;
17
18
    /**
19
     * CounterReport constructor.
20
     * @param Counter $counter
21
     */
22 7
    public function __construct(Counter $counter)
23
    {
24 7
        $this->name = $counter->getName();
25 7
        $this->value = $counter->getValue();
26 7
        $this->step = $counter->getStep();
27 7
        parent::__construct();
28 7
    }
29
}
30