Code Duplication    Length = 119-120 lines in 2 locations

src/Integracao/ControlPay/Contracts/Terminal/InsertRequest.php 1 location

@@ 14-133 (lines=120) @@
11
 * Class InsertRequest
12
 * @package Integracao\ControlPay\Contracts\Produto
13
 */
14
class InsertRequest implements \JsonSerializable
15
{
16
    /**
17
     * @var integer
18
     */
19
    private $id;
20
21
    /**
22
     * @var string
23
     */
24
    private $nome;
25
26
    /**
27
     * @var string
28
     */
29
    private $impressora;
30
31
    /**
32
     * @var Pessoa
33
     */
34
    private $pessoa;
35
36
    /**
37
     * FluxoPagamento 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 FluxoPagamento
54
     */
55
    public function setId($id)
56
    {
57
        $this->id = $id;
58
        return $this;
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getNome()
65
    {
66
        return $this->nome;
67
    }
68
69
    /**
70
     * @param string $nome
71
     * @return FluxoPagamento
72
     */
73
    public function setNome($nome)
74
    {
75
        $this->nome = $nome;
76
        return $this;
77
    }
78
79
    /**
80
     * @return string
81
     */
82
    public function getImpressora()
83
    {
84
        return $this->impressora;
85
    }
86
87
    /**
88
     * @param string $impressora
89
     * @return Terminal
90
     */
91
    public function setImpressora($impressora)
92
    {
93
        $this->impressora = $impressora;
94
95
        if(is_array($this->impressora))
96
            $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
97
98
        return $this;
99
    }
100
101
    /**
102
     * @return Pessoa
103
     */
104
    public function getPessoa()
105
    {
106
        return $this->pessoa;
107
    }
108
109
    /**
110
     * @param Pessoa $pessoa
111
     * @return Terminal
112
     */
113
    public function setPessoa($pessoa)
114
    {
115
        $this->pessoa = $pessoa;
116
117
        if(is_array($this->pessoa))
118
            $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
119
120
        return $this;
121
    }
122
123
    function jsonSerialize()
124
    {
125
        return [
126
            'id' => $this->id,
127
            'nome' => $this->nome,
128
            'impressora' => $this->impressora,
129
            'pessoa' => $this->pessoa,
130
        ];
131
    }
132
133
}

src/Integracao/ControlPay/Model/Terminal.php 1 location

@@ 10-128 (lines=119) @@
7
 * Class Terminal
8
 * @package Integracao\ControlPay\Model
9
 */
10
class Terminal implements \JsonSerializable
11
{
12
    /**
13
     * @var integer
14
     */
15
    private $id;
16
17
    /**
18
     * @var string
19
     */
20
    private $nome;
21
22
    /**
23
     * @var string
24
     */
25
    private $impressora;
26
27
    /**
28
     * @var Pessoa
29
     */
30
    private $pessoa;
31
32
    /**
33
     * FluxoPagamento constructor.
34
     */
35
    public function __construct()
36
    {
37
    }
38
39
    /**
40
     * @return int
41
     */
42
    public function getId()
43
    {
44
        return $this->id;
45
    }
46
47
    /**
48
     * @param int $id
49
     * @return FluxoPagamento
50
     */
51
    public function setId($id)
52
    {
53
        $this->id = $id;
54
        return $this;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function getNome()
61
    {
62
        return $this->nome;
63
    }
64
65
    /**
66
     * @param string $nome
67
     * @return FluxoPagamento
68
     */
69
    public function setNome($nome)
70
    {
71
        $this->nome = $nome;
72
        return $this;
73
    }
74
75
    /**
76
     * @return string
77
     */
78
    public function getImpressora()
79
    {
80
        return $this->impressora;
81
    }
82
83
    /**
84
     * @param string $impressora
85
     * @return Terminal
86
     */
87
    public function setImpressora($impressora)
88
    {
89
        $this->impressora = $impressora;
90
91
        if(is_array($this->impressora))
92
            $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
93
94
        return $this;
95
    }
96
97
    /**
98
     * @return Pessoa
99
     */
100
    public function getPessoa()
101
    {
102
        return $this->pessoa;
103
    }
104
105
    /**
106
     * @param Pessoa $pessoa
107
     * @return Terminal
108
     */
109
    public function setPessoa($pessoa)
110
    {
111
        $this->pessoa = $pessoa;
112
113
        if(is_array($this->pessoa))
114
            $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
115
116
        return $this;
117
    }
118
119
    function jsonSerialize()
120
    {
121
        return [
122
            'id' => $this->id,
123
            'nome' => $this->nome,
124
            'impressora' => $this->impressora,
125
            'pessoa' => $this->pessoa,
126
        ];
127
    }
128
}