Passed
Push — master ( 224db0...04cfc9 )
by Thiago
33s
created

Bank::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 5
cts 5
cp 1
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 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