SimpleCounter::__construct()   A
last analyzed

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 3
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace AlecRabbit\Counters;
4
5
use AlecRabbit\Counters\Core\AbstractCounter;
6
use AlecRabbit\Formatters\SimpleCounterReportFormatter;
7
use AlecRabbit\Reports\SimpleCounterReport;
8
9
class SimpleCounter extends AbstractCounter
10
{
11
    /** {@inheritDoc} */
12 25
    public function __construct(?string $name = null, ?int $step = null, int $initialValue = 0)
13
    {
14 25
        parent::__construct($name, $step, $initialValue);
15 25
        $this->setBindings(
16 25
            SimpleCounterReport::class,
17 25
            SimpleCounterReportFormatter::class
18
        );
19 25
    }
20
}
21