FormaPagamento::getModalidade()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: a.moreira
5
 * Date: 20/10/2016
6
 * Time: 10:00
7
 */
8
9
namespace Integracao\ControlPay\Model;
10
use Integracao\ControlPay\Helpers\SerializerHelper;
11
12
/**
13
 * Class FormaPagamento
14
 * @package Integracao\ControlPay\Model
15
 */
16
class FormaPagamento implements \JsonSerializable
17
{
18
    /**
19
     * @var integer
20
     */
21
    private $id;
22
23
    /**
24
     * @var string
25
     */
26
    private $nome;
27
28
    /**
29
     * @var string
30
     */
31
    private $modalidade;
32
33
    /**
34
     * @var FluxoPagamento
35
     */
36
    private $fluxoPagamento;
37
38
    /**
39
     * FormaPagamento constructor.
40
     */
41
    public function __construct()
42
    {
43
    }
44
45
    /**
46
     * @return int
47
     */
48
    public function getId()
49
    {
50
        return $this->id;
51
    }
52
53
    /**
54
     * @param int $id
55
     * @return FormaPagamento
56
     */
57
    public function setId($id)
58
    {
59
        $this->id = $id;
60
        return $this;
61
    }
62
63
    /**
64
     * @return string
65
     */
66
    public function getNome()
67
    {
68
        return $this->nome;
69
    }
70
71
    /**
72
     * @param string $nome
73
     * @return FormaPagamento
74
     */
75
    public function setNome($nome)
76
    {
77
        $this->nome = $nome;
78
        return $this;
79
    }
80
81
    /**
82
     * @return string
83
     */
84
    public function getModalidade()
85
    {
86
        return $this->modalidade;
87
    }
88
89
    /**
90
     * @param string $modalidade
91
     * @return FormaPagamento
92
     */
93
    public function setModalidade($modalidade)
94
    {
95
        $this->modalidade = $modalidade;
96
        return $this;
97
    }
98
99
    /**
100
     * @return FluxoPagamento
101
     */
102
    public function getFluxoPagamento()
103
    {
104
        return $this->fluxoPagamento;
105
    }
106
107
    /**
108
     * @param FluxoPagamento $fluxoPagamento
109
     * @return FormaPagamento
110
     */
111
    public function setFluxoPagamento($fluxoPagamento)
112
    {
113
        $this->fluxoPagamento = $fluxoPagamento;
114
115
        if(is_array($this->fluxoPagamento))
116
            $this->fluxoPagamento = SerializerHelper::denormalize($this->fluxoPagamento, FluxoPagamento::class);
117
118
        return $this;
119
    }
120
121
    function jsonSerialize()
122
    {
123
        return [
124
            'id' => $this->id,
125
            'nome' => $this->nome,
126
            'modalidade' => $this->modalidade,
127
            'fluxoPagamento' => $this->fluxoPagamento,
128
        ];
129
    }
130
131
132
}