Completed
Push — master ( ac28ba...d1c608 )
by Adriano
05:00
created

GetByFiltrosRequest::setDataFim()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Integracao\ControlPay\Contracts\Pedido;
4
5
/**
6
 * Class GetByFiltrosRequest
7
 * @package Integracao\ControlPay\Contracts\Pedido
8
 */
9
class GetByFiltrosRequest implements \JsonSerializable
10
{
11
12
    /**
13
     * @var string
14
     */
15
    private $status;
16
17
    /**
18
     * @var string
19
     */
20
    private $tipo;
21
22
    /**
23
     * @var \DateTime
24
     */
25
    private $dataInicio;
26
27
    /**
28
     * @var \DateTime
29
     */
30
    private $dataFim;
31
32
    /**
33
     * @var boolean
34
     */
35
    private $valorComDivergencia;
36
37
    /**
38
     * @var string
39
     */
40
    private $referencia;
41
42
    /**
43
     * @return string
44
     */
45
    public function getStatus()
46
    {
47
        return $this->status;
48
    }
49
50
    /**
51
     * @param string $status
52
     * @return GetByFiltrosRequest
53
     */
54
    public function setStatus($status)
55
    {
56
        $this->status = $status;
57
        return $this;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getTipo()
64
    {
65
        return $this->tipo;
66
    }
67
68
    /**
69
     * @param string $tipo
70
     * @return GetByFiltrosRequest
71
     */
72
    public function setTipo($tipo)
73
    {
74
        $this->tipo = $tipo;
75
        return $this;
76
    }
77
78
    /**
79
     * @return \DateTime
80
     */
81
    public function getDataInicio()
82
    {
83
        return $this->dataInicio;
84
    }
85
86
    /**
87
     * @param \DateTime $dataInicio
88
     * @return GetByFiltrosRequest
89
     */
90
    public function setDataInicio($dataInicio)
91
    {
92
        $this->dataInicio = $dataInicio;
93
        return $this;
94
    }
95
96
    /**
97
     * @return \DateTime
98
     */
99
    public function getDataFim()
100
    {
101
        return $this->dataFim;
102
    }
103
104
    /**
105
     * @param \DateTime $dataFim
106
     * @return GetByFiltrosRequest
107
     */
108
    public function setDataFim($dataFim)
109
    {
110
        $this->dataFim = $dataFim;
111
        return $this;
112
    }
113
114
    /**
115
     * @return boolean
116
     */
117
    public function isValorComDivergencia()
118
    {
119
        return $this->valorComDivergencia;
120
    }
121
122
    /**
123
     * @param boolean $valorComDivergencia
124
     * @return GetByFiltrosRequest
125
     */
126
    public function setValorComDivergencia($valorComDivergencia)
127
    {
128
        $this->valorComDivergencia = $valorComDivergencia;
129
        return $this;
130
    }
131
132
    /**
133
     * @return string
134
     */
135
    public function getReferencia()
136
    {
137
        return $this->referencia;
138
    }
139
140
    /**
141
     * @param string $referencia
142
     * @return GetByFiltrosRequest
143
     */
144
    public function setReferencia($referencia)
145
    {
146
        $this->referencia = $referencia;
147
        return $this;
148
    }
149
150
    /**
151
     * @return array
152
     */
153
    function jsonSerialize()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
154
    {
155
        return [
156
            'status' => $this->status,
157
            'dataInicio' => empty($this->dataInicio) ? null : $this->dataInicio->format('d/m/Y H:i:s'),
158
            'dataFim' => empty($this->dataFim) ? null :$this->dataFim->format('d/m/Y H:i:s'),
159
            'tipo' => $this->tipo,
160
            'valorComDivergencia' => $this->valorComDivergencia,
161
            'referencia' => $this->referencia
162
        ];
163
    }
164
165
}