Customer   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 106
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 9
lcom 0
cbo 1
dl 0
loc 106
ccs 26
cts 26
cp 1
rs 10
c 0
b 0
f 0

9 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A getCode() 0 4 1
A setCode() 0 4 1
A getIdentityNumber() 0 4 1
A setIdentityNumber() 0 4 1
A getHelpfulMaturity() 0 4 1
A setHelpfulMaturity() 0 4 1
A getWorkingDays() 0 4 1
A setWorkingDays() 0 4 1
1
<?php
2
namespace MrPrompt\ShipmentCommon\Base;
3
4
/**
5
 *
6
 * @author Thiago Paes <[email protected]>
7
 */
8
class Customer extends Person
9
{
10
    /**
11
     * @var int
12
     */
13
    private $code;
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
14
15
    /**
16
     * @var int
17
     */
18
    private $identityNumber;
19
20
    /**
21
     * @var bool
22
     */
23
    private $helpfulMaturity;
24
25
    /**
26
     * @var int
27
     */
28
    private $workingDays;
29
30
    /**
31
     * Constructor
32
     * 
33
     * @param int $code
34
     * @param int $identityNumber
35
     * @param bool $helpfulMaturity
36
     * @param int $workingDays
37
     */
38 15
    public function __construct(
39
        int $code = 0,
40
        int $identityNumber = 0,
41
        bool $helpfulMaturity = false,
42
        int $workingDays = 0
43
    ) {
44 15
        $this->code = $code;
45 15
        $this->identityNumber = $identityNumber;
46 15
        $this->helpfulMaturity = $helpfulMaturity;
47 15
        $this->workingDays = $workingDays;
48 15
    }
49
50
    /**
51
     * @return int
52
     */
53 1
    public function getCode(): int
54
    {
55 1
        return $this->code;
56
    }
57
58
    /**
59
     * @param int $code
60
     */
61 2
    public function setCode(int $code)
62
    {
63 2
        $this->code = $code;
64 2
    }
65
66
    /**
67
     * @return int
68
     */
69 1
    public function getIdentityNumber(): int
70
    {
71 1
        return $this->identityNumber;
72
    }
73
74
    /**
75
     * @param int $identityNumber
76
     */
77 1
    public function setIdentityNumber(int $identityNumber)
78
    {
79 1
        $this->identityNumber = $identityNumber;
80 1
    }
81
82
    /**
83
     * @return mixed
84
     */
85 1
    public function getHelpfulMaturity(): bool
86
    {
87 1
        return $this->helpfulMaturity;
88
    }
89
90
    /**
91
     * @param boolean $helpfulMaturity
92
     */
93 1
    public function setHelpfulMaturity(bool $helpfulMaturity = true)
94
    {
95 1
        $this->helpfulMaturity = $helpfulMaturity;
96 1
    }
97
98
    /**
99
     * @return int
100
     */
101 1
    public function getWorkingDays(): int
102
    {
103 1
        return $this->workingDays;
104
    }
105
106
    /**
107
     * @param int $workingDays
108
     */
109 1
    public function setWorkingDays(int $workingDays)
110
    {
111 1
        $this->workingDays = $workingDays;
112 1
    }
113
}
114