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

CounterReport::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 10
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