Sequence::setValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
namespace MrPrompt\ShipmentCommon\Base;
3
4
/**
5
 * Sequence
6
 *
7
 * @author Thiago Paes <[email protected]>
8
 */
9
class Sequence
10
{
11
    /**
12
     * @var int
13
     */
14
    private $value;
15
16
    /**
17
     * Construtor
18
     * 
19
     * @param string $value
20
     */
21 2
    public function __construct(int $value = 1)
22
    {
23 2
        $this->setValue($value);
24 2
    }
25
26
    /**
27
     * Return the value from sequence
28
     *
29
     * @return int
30
     */
31 2
    public function getValue(): int
32
    {
33 2
        return $this->value;
34
    }
35
36
    /**
37
     * Set the value from sequence
38
     *
39
     * @param int $value
40
     */
41 1
    public function setValue(int $value)
42
    {
43 1
        $this->value = $value;
44 1
    }
45
}
46