Bank   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 94
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 0
dl 0
loc 94
ccs 20
cts 20
cp 1
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A getAgency() 0 4 1
A setAgency() 0 4 1
A getDigit() 0 4 1
A setDigit() 0 4 1
A getCode() 0 4 1
A setCode() 0 4 1
1
<?php
2
namespace MrPrompt\ShipmentCommon\Base;
3
4
/**
5
 * Bank
6
 *
7
 * @author Thiago Paes <[email protected]>
8
 */
9
class Bank
10
{
11
    const BANCO_DO_BRASIL           = 30;
12
    const HSBC                      = 36;
13
    const SANTANDER                 = 54;
14
    const CAIXA_ECONOMICA_FEDERAL   = 55;
15
    const SICRED                    = 79;
16
17
    /**
18
     * Agency number
19
     * 
20
     * @var int
21
     */
22
    private $agency;
23
24
    /**
25
     * Agency Digit
26
     *
27
     * @var number
28
     */
29
    private $digit;
30
31
    /**
32
     * Bank code
33
     *
34
     * @var number
35
     */
36
    private $code;
37
38
    /**
39
     * Constructor
40
     */
41 9
    public function __construct(
42
        int $agency = 0,
43
        int $digit = 0,
44
        int $code = 0
45
    ) {
46 9
        $this->agency = $agency;
47 9
        $this->digit = $digit;
48 9
        $this->code = $code;
49 9
    }
50
51
    /**
52
     * @return the $agency
53
     */
54 1
    public function getAgency(): int
55
    {
56 1
        return $this->agency;
57
    }
58
59
    /**
60
     * Set the agency
61
     *
62
     * @param number $agency
63
     */
64 1
    public function setAgency(int $agency)
65
    {
66 1
        $this->agency = $agency;
67 1
    }
68
69
    /**
70
     * @return the $agencyDigit
71
     */
72 1
    public function getDigit(): int
73
    {
74 1
        return $this->digit;
75
    }
76
77
    /**
78
     * Set the digt
79
     *
80
     * @param number $digit
81
     */
82 1
    public function setDigit(int $digit)
83
    {
84 1
        $this->digit = $digit;
85 1
    }
86
87
    /**
88
     * @return number
89
     */
90 1
    public function getCode(): int
91
    {
92 1
        return $this->code;
93
    }
94
95
    /**
96
     * @param number $code
97
     */
98 1
    public function setCode(int $code)
99
    {
100 1
        $this->code = $code;
101 1
    }
102
}
103