| @@ 49-55 (lines=7) @@ | ||
| 46 | * @return void |
|
| 47 | * @throws InvalidArgumentException |
|
| 48 | */ |
|
| 49 | private function validateBankBranch() |
|
| 50 | { |
|
| 51 | $bankBranch = $this->billPayment->bankBranch; |
|
| 52 | if (is_null($bankBranch) || !is_string($bankBranch) || !is_numeric($bankBranch)) { |
|
| 53 | throw new \InvalidArgumentException('branch should be a numeric string'); |
|
| 54 | } |
|
| 55 | } |
|
| 56 | ||
| 57 | /** |
|
| 58 | * This validate a bank account |
|
| @@ 63-69 (lines=7) @@ | ||
| 60 | * @return void |
|
| 61 | * @throws InvalidArgumentException |
|
| 62 | */ |
|
| 63 | private function validateBankAccount() |
|
| 64 | { |
|
| 65 | $bankAccount = $this->billPayment->bankAccount; |
|
| 66 | if (is_null($bankAccount) || !is_string($bankAccount) || !is_numeric($bankAccount)) { |
|
| 67 | throw new \InvalidArgumentException('account should be a numeric string'); |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * This validates a amount |
|
| @@ 91-97 (lines=7) @@ | ||
| 88 | * @return void |
|
| 89 | * @throws InvalidArgumentException |
|
| 90 | */ |
|
| 91 | private function validateId() |
|
| 92 | { |
|
| 93 | $id = $this->billPayment->id; |
|
| 94 | if (is_null($id) || !is_string($id)) { |
|
| 95 | throw new \InvalidArgumentException('ID should be a string'); |
|
| 96 | } |
|
| 97 | } |
|
| 98 | } |
|
| 99 | ||