コード例 #1
0
ファイル: Cep.php プロジェクト: gabrielfs7/brasil-utils
 /**
  * @param string $uf
  * @throws EnderecoInvalidoException
  */
 protected function validaUf($uf)
 {
     if (Uf::getUfPorCep($this->cep) !== $uf) {
         throw new EnderecoInvalidoException('O CEP ' . $this->cep . ' não pertence ao estado ' . $uf . '.');
     }
 }
コード例 #2
0
ファイル: Placa.php プロジェクト: gabrielfs7/brasil-utils
 /**
  * @param Uf $uf
  * @return string[]
  */
 protected function limitePorEstado(Uf $uf)
 {
     $limites = $this->limitesEstados();
     return $limites[$uf->getUf()];
 }