Pagador::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
namespace CbCaio\Boletos\Models\Pagador;
3
4
use CbCaio\Boletos\Models\Pagador\Contracts\PagadorInterface;
5
6
class Pagador implements PagadorInterface
7
{
8
    /**
9
     * All of the user's attributes.
10
     *
11
     * @var array
12
     */
13
    protected $attributes;
14
15
    public function __construct(array $attributes)
16
    {
17
        $this->attributes = $attributes;
18
    }
19
20
    public function getNome()
21
    {
22
        return $this->attributes['nome'];
23
    }
24
25
    public function getEndereco()
26
    {
27
        return $this->attributes['endereco'];
28
    }
29
30
    public function getCidade()
31
    {
32
        return $this->attributes['cidade'];
33
    }
34
35
    public function getEstado()
36
    {
37
        return $this->attributes['estado'];
38
    }
39
40
    public function getCep()
41
    {
42
        return $this->attributes['cep'];
43
    }
44
45
    public function getCpfCnpj()
46
    {
47
        return $this->attributes['cpf_cnpj'];
48
    }
49
50
    public function getCidadeEstadoCep()
51
    {
52
        return $this->getCidade() . ', ' . $this->getEstado() . ' - ' . $this->getCep();
53
    }
54
}