| @@ 83-89 (lines=7) @@ | ||
| 80 | * @return void |
|
| 81 | * @throws InvalidArgumentException |
|
| 82 | */ |
|
| 83 | private function validateAlias() |
|
| 84 | { |
|
| 85 | $alias = $this->card->alias; |
|
| 86 | if (empty($alias) || !is_string($alias)) { |
|
| 87 | throw new \InvalidArgumentException('alias should be a string'); |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||
| 91 | /** |
|
| 92 | * This validate a virtual card bank agency |
|
| @@ 165-171 (lines=7) @@ | ||
| 162 | * @return void |
|
| 163 | * @throws InvalidArgumentException |
|
| 164 | */ |
|
| 165 | private function validateType() |
|
| 166 | { |
|
| 167 | $type = $this->card->type; |
|
| 168 | if (empty($type) || !is_string($type)) { |
|
| 169 | throw new \InvalidArgumentException('type should be a string'); |
|
| 170 | } |
|
| 171 | } |
|
| 172 | } |
|
| 173 | ||