Sequence   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 37
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getValue() 0 4 1
A setValue() 0 4 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