1 | <?php |
||
7 | class AndorraBban implements BbanInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $bankCode; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $branchCode; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | private $accountNumber; |
||
23 | |||
24 | /** |
||
25 | * AndorraBban constructor. |
||
26 | * |
||
27 | * @param string $bankCode |
||
28 | * @param string $branchCode |
||
29 | * @param string $accountNumber |
||
30 | * |
||
31 | * @throws InvalidArgumentException |
||
32 | */ |
||
33 | public function __construct( |
||
46 | |||
47 | /** |
||
48 | * @param string $bban |
||
49 | * |
||
50 | * @throws InvalidArgumentException |
||
51 | * |
||
52 | * @return static |
||
53 | */ |
||
54 | public static function fromString($bban) |
||
68 | |||
69 | /** |
||
70 | * @return string |
||
71 | */ |
||
72 | public function bankCode() |
||
76 | |||
77 | /** |
||
78 | * @return string |
||
79 | */ |
||
80 | public function branchCode() |
||
84 | |||
85 | /** |
||
86 | * @return string |
||
87 | */ |
||
88 | public function checkDigits() |
||
92 | |||
93 | /** |
||
94 | * @return string |
||
95 | */ |
||
96 | public function accountNumber() |
||
100 | |||
101 | /** |
||
102 | * @return string |
||
103 | */ |
||
104 | public function __toString() |
||
108 | |||
109 | /** |
||
110 | * @param $bankCode |
||
111 | * |
||
112 | * @throws InvalidArgumentException |
||
113 | */ |
||
114 | private static function validateBankCodeFormat($bankCode) |
||
120 | |||
121 | /** |
||
122 | * @param $branchCode |
||
123 | * |
||
124 | * @throws InvalidArgumentException |
||
125 | */ |
||
126 | private static function validateBranchCodeFormat($branchCode) |
||
132 | |||
133 | /** |
||
134 | * @param $accountNumber |
||
135 | * |
||
136 | * @throws InvalidArgumentException |
||
137 | */ |
||
138 | private static function validateAccountNumberFormat($accountNumber) |
||
144 | } |