Pessoa::tipoPessoa()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Itau\API\BoleCode;
4
5
use Itau\API\StringHelper;
6
use Itau\API\TraitEntity;
7
use JsonSerializable;
8
9
class Pessoa implements JsonSerializable
10
{
11
    use TraitEntity;
12
13
    private string $nome_pessoa;
14
    private TipoPessoa $tipo_pessoa;
15
16
    public function setNomePessoa($nome): self
17
    {
18
        $this->nome_pessoa = StringHelper::removerAcentos($nome);
19
        return $this;
20
    }
21
22
    public function tipoPessoa(): TipoPessoa
23
    {
24
        $tipoPessoa = new TipoPessoa();
25
26
        $this->setTipoPessoa($tipoPessoa);
27
28
        return $tipoPessoa;
29
    }
30
31
    public function setTipoPessoa(TipoPessoa $tipoPessoa): self
32
    {
33
        $this->tipo_pessoa = $tipoPessoa;
34
        return $this;
35
    }
36
}