@@ 52-61 (lines=10) @@ | ||
49 | * @return void |
|
50 | * @throws \InvalidArgumentException |
|
51 | */ |
|
52 | private function validateDocumentNumber() |
|
53 | { |
|
54 | $documentNumber = $this->card->documentNumber; |
|
55 | if (empty($documentNumber) || !is_string($documentNumber) || !is_numeric($documentNumber)) { |
|
56 | throw new \InvalidArgumentException('document number should be a numeric string'); |
|
57 | } |
|
58 | ||
59 | $documentValidator = new CpfCnpjValidator($documentNumber); |
|
60 | $documentValidator->validate(); |
|
61 | } |
|
62 | ||
63 | /** |
|
64 | * This validates a card name |
@@ 82-91 (lines=10) @@ | ||
79 | * @return void |
|
80 | * @throws \InvalidArgumentException |
|
81 | */ |
|
82 | private function validateDocumentNumber() |
|
83 | { |
|
84 | $documentNumber = $this->duplicateCard->documentNumber; |
|
85 | if (empty($documentNumber) || !is_string($documentNumber) || !is_numeric($documentNumber)) { |
|
86 | throw new \InvalidArgumentException('document number should be a numeric string'); |
|
87 | } |
|
88 | ||
89 | $documentValidator = new CpfCnpjValidator($documentNumber); |
|
90 | $documentValidator->validate(); |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * This validate a duplicate card password |