@@ 385-390 (lines=6) @@ | ||
382 | private function theLastDigitsValidation($value, $type) |
|
383 | { |
|
384 | switch ($type) { |
|
385 | case self::NaturalPerson: |
|
386 | $lastDigits = config('laravel-ecuador-identification.natural-ruc.last-digits'); |
|
387 | if ($value != $lastDigits) { |
|
388 | throw new EcuadorIdentificationException("Field does not have the last digits equal to {$lastDigits}"); |
|
389 | } |
|
390 | break; |
|
391 | ||
392 | case self::PrivateCompany: |
|
393 | $lastDigits = config('laravel-ecuador-identification.private-ruc.last-digits'); |
|
@@ 392-397 (lines=6) @@ | ||
389 | } |
|
390 | break; |
|
391 | ||
392 | case self::PrivateCompany: |
|
393 | $lastDigits = config('laravel-ecuador-identification.private-ruc.last-digits'); |
|
394 | if ($value != $lastDigits) { |
|
395 | throw new EcuadorIdentificationException("Field does not have the last digits equal to {$lastDigits}"); |
|
396 | } |
|
397 | break; |
|
398 | ||
399 | case self::PublicCompany: |
|
400 | $lastDigits = config('laravel-ecuador-identification.public-ruc.last-digits'); |
|
@@ 399-404 (lines=6) @@ | ||
396 | } |
|
397 | break; |
|
398 | ||
399 | case self::PublicCompany: |
|
400 | $lastDigits = config('laravel-ecuador-identification.public-ruc.last-digits'); |
|
401 | if ($value != $lastDigits) { |
|
402 | throw new EcuadorIdentificationException("Field does not have the last digits equal to {$lastDigits}"); |
|
403 | } |
|
404 | break; |
|
405 | ||
406 | default: |
|
407 | throw new EcuadorIdentificationException('Field does not have this type of identification.'); |