SimpleCounterFields::getValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php declare(strict_types=1);
2
3
namespace AlecRabbit\Counters\Core\Traits;
4
5
use AlecRabbit\Traits\GettableName;
6
use AlecRabbit\Traits\Startable;
7
8
trait SimpleCounterFields
9
{
10
    use GettableName, Startable;
11
12
    /** @var int */
13
    protected $value = 0;
14
15
    /** @var int */
16
    protected $initialValue = 0;
17
18
    /** @var int */
19
    protected $step = 1;
20
21
    /** @var int */
22
    protected $bumped = 0;
23
24
    /**
25
     * @return int
26
     */
27 22
    public function getValue(): int
28
    {
29 22
        return $this->value;
30
    }
31
32
    /**
33
     * @return int
34
     */
35 20
    public function getInitialValue(): int
36
    {
37 20
        return $this->initialValue;
38
    }
39
40
    /**
41
     * @return int
42
     */
43 20
    public function getStep(): int
44
    {
45 20
        return $this->step;
46
    }
47
48
    /**
49
     * @return int
50
     */
51 20
    public function getBumped(): int
52
    {
53 20
        return $this->bumped;
54
    }
55
}
56