ItemProduto   A
last analyzed

Complexity

Total Complexity 12

Size/Duplication

Total Lines 136
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 12
lcom 1
cbo 0
dl 0
loc 136
rs 10
c 0
b 0
f 0

12 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getId() 0 4 1
A setId() 0 5 1
A getItemProdutoId() 0 4 1
A setItemProdutoId() 0 5 1
A getNome() 0 4 1
A setNome() 0 5 1
A getQuantidade() 0 4 1
A setQuantidade() 0 5 1
A getValor() 0 4 1
A setValor() 0 5 1
A jsonSerialize() 0 10 1
1
<?php
2
3
namespace Integracao\ControlPay\Model;
4
5
/**
6
 * Class ItemProduto
7
 * @package Integracao\ControlPay\Model
8
 */
9
class ItemProduto implements \JsonSerializable
10
{
11
    /**
12
     * @var integer
13
     */
14
    private $id;
15
16
    /**
17
     * @var integer
18
     */
19
    private $itemProdutoId;
20
21
    /**
22
     * @var string
23
     */
24
    private $nome;
25
26
    /**
27
     * @var integer
28
     */
29
    private $quantidade;
30
31
    /**
32
     * @var double
33
     */
34
    private $valor;
35
36
    /**
37
     * ItemProduto constructor.
38
     */
39
    public function __construct()
40
    {
41
    }
42
43
    /**
44
     * @return int
45
     */
46
    public function getId()
47
    {
48
        return $this->id;
49
    }
50
51
    /**
52
     * @param int $id
53
     * @return ItemProduto
54
     */
55
    public function setId($id)
56
    {
57
        $this->id = $id;
58
        return $this;
59
    }
60
61
    /**
62
     * @return int
63
     */
64
    public function getItemProdutoId()
65
    {
66
        return $this->itemProdutoId;
67
    }
68
69
    /**
70
     * @param int $itemProdutoId
71
     * @return ItemProduto
72
     */
73
    public function setItemProdutoId($itemProdutoId)
74
    {
75
        $this->itemProdutoId = $itemProdutoId;
76
        return $this;
77
    }
78
79
    /**
80
     * @return string
81
     */
82
    public function getNome()
83
    {
84
        return $this->nome;
85
    }
86
87
    /**
88
     * @param string $nome
89
     * @return ItemProduto
90
     */
91
    public function setNome($nome)
92
    {
93
        $this->nome = $nome;
94
        return $this;
95
    }
96
97
    /**
98
     * @return int
99
     */
100
    public function getQuantidade()
101
    {
102
        return $this->quantidade;
103
    }
104
105
    /**
106
     * @param int $quantidade
107
     * @return ItemProduto
108
     */
109
    public function setQuantidade($quantidade)
110
    {
111
        $this->quantidade = $quantidade;
112
        return $this;
113
    }
114
115
    /**
116
     * @return float
117
     */
118
    public function getValor()
119
    {
120
        return $this->valor;
121
    }
122
123
    /**
124
     * @param float $valor
125
     * @return ItemProduto
126
     */
127
    public function setValor($valor)
128
    {
129
        $this->valor = $valor;
130
        return $this;
131
    }
132
133
    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...
134
    {
135
        return [
136
            'id' => $this->id,
137
            'itemProdutoId' => $this->itemProdutoId,
138
            'nome' => $this->nome,
139
            'quantidade' => $this->quantidade,
140
            'valor' => $this->valor,
141
        ];
142
    }
143
144
}