Skip to content

Commit

Permalink
Merge pull request #49 from rafaelstz/patch-4
Browse files Browse the repository at this point in the history
Bugfix validação de CEP de origem e destino iguais
  • Loading branch information
devaguia authored Oct 24, 2024
2 parents 534669a + 5bdd877 commit c74bb62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Includes/Traits/CepHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ private function validateCep(string $cep): string
{
$cleanCep = cep()->validate($cep);

if ($this->originCep === $cleanCep || $this->destinyCep === $cleanCep) {
if ($this->originCep === $cleanCep && $this->destinyCep === $cleanCep) {
throw new SameCepException($cep);
}

return $cleanCep;
}
}
}

0 comments on commit c74bb62

Please sign in to comment.