Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function setPessoa(string $tipoPessoa, $numero): self |
||
20 | { |
||
21 | $this->codigo_tipo_pessoa = $tipoPessoa; |
||
22 | if($this->codigo_tipo_pessoa == self::PESSOA_FISICA){ |
||
23 | $this->numero_cadastro_pessoa_fisica = preg_replace("/[^0-9]/", "", $numero); |
||
24 | } else { |
||
25 | $this->numero_cadastro_nacional_pessoa_juridica = preg_replace("/[^0-9]/", "", $numero); |
||
26 | } |
||
27 | return $this; |
||
28 | } |
||
29 | } |