Completed
Push — master ( 69e569...e5954a )
by Adriano
02:22
created
src/Integracao/ControlPay/AbstractAPI.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
     /**
49 49
      * AbstractAPI constructor.
50
-     * @param $endpoint
50
+     * @param string $endpoint
51 51
      * @param Client|null $client
52 52
      */
53 53
     protected function __construct($endpoint, Client $client = null)
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,8 +55,9 @@  discard block
 block discarded – undo
55 55
         $this->endpoint = $endpoint;
56 56
         $this->_client = $client;
57 57
 
58
-        if(is_null($this->_client))
59
-            $this->_client = new Client();
58
+        if(is_null($this->_client)) {
59
+                    $this->_client = new Client();
60
+        }
60 61
 
61 62
         $this->query = new GuzzleHttp\Query();
62 63
         $this->query->setEncodingType(false);
@@ -98,11 +99,13 @@  discard block
 block discarded – undo
98 99
     {
99 100
         $this->query = new GuzzleHttp\Query();
100 101
 
101
-        if(isset($this->_httpClient->getDefaultOption()['query']))
102
-            $this->query = $this->_httpClient->getDefaultOption()['query'];
102
+        if(isset($this->_httpClient->getDefaultOption()['query'])) {
103
+                    $this->query = $this->_httpClient->getDefaultOption()['query'];
104
+        }
103 105
 
104
-        foreach ($params as $key => $value)
105
-            $this->query->set($key, $value);
106
+        foreach ($params as $key => $value) {
107
+                    $this->query->set($key, $value);
108
+        }
106 109
 
107 110
         return $this->query;
108 111
     }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $this->endpoint = $endpoint;
61 61
         $this->_client = $client;
62 62
 
63
-        if(is_null($this->_client))
63
+        if (is_null($this->_client))
64 64
             $this->_client = new Client();
65 65
 
66 66
         $this->query = new GuzzleHttp\Query();
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 $this->query->set('key', $this->_client->getAuthentication());
73 73
                 break;
74 74
             case BasicAuthentication::class:
75
-                $this->headers['Authorization'] = $this->_client->getAuthentication();
75
+                $this->headers[ 'Authorization' ] = $this->_client->getAuthentication();
76 76
                 break;
77 77
             default:
78 78
                 $this->query->set('key', $this->_client->getAuthentication());
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
     {
104 104
         $this->query = new GuzzleHttp\Query();
105 105
 
106
-        if(isset($this->_httpClient->getDefaultOption()['query']))
107
-            $this->query = $this->_httpClient->getDefaultOption()['query'];
106
+        if (isset($this->_httpClient->getDefaultOption()[ 'query' ]))
107
+            $this->query = $this->_httpClient->getDefaultOption()[ 'query' ];
108 108
 
109 109
         foreach ($params as $key => $value)
110 110
             $this->query->set($key, $value);
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function getQueryParameters()
127 127
     {
128
-        return isset($this->_httpClient->getDefaultOption()['query']) ?
129
-            $this->_httpClient->getDefaultOption()['query'] : [];
128
+        return isset($this->_httpClient->getDefaultOption()[ 'query' ]) ?
129
+            $this->_httpClient->getDefaultOption()[ 'query' ] : [ ];
130 130
     }
131 131
 
132 132
     /**
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function getHeaders()
136 136
     {
137
-        return isset($this->_httpClient->getDefaultOption()['headers']) ?
138
-            $this->_httpClient->getDefaultOption()['headers'] : [];
137
+        return isset($this->_httpClient->getDefaultOption()[ 'headers' ]) ?
138
+            $this->_httpClient->getDefaultOption()[ 'headers' ] : [ ];
139 139
     }
140 140
 
141 141
     /**
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Login/ConsultaLoginRequest.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     /**
37 37
      * @param string $cpfCnpj
38
-     * @return Login
38
+     * @return ConsultaLoginRequest
39 39
      */
40 40
     public function setCpfCnpj($cpfCnpj)
41 41
     {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     /**
55 55
      * @param string $senha
56
-     * @return Login
56
+     * @return ConsultaLoginRequest
57 57
      */
58 58
     public function setSenha($senha)
59 59
     {
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Login/ConsultaLoginResponse.php 4 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     /**
46 46
      * @param \DateTime $data
47
-     * @return LoginResponse
47
+     * @return ConsultaLoginResponse
48 48
      */
49 49
     public function setData($data)
50 50
     {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     /**
64 64
      * @param Pessoa $pessoa
65
-     * @return LoginResponse
65
+     * @return ConsultaLoginResponse
66 66
      */
67 67
     public function setPessoa($pessoa)
68 68
     {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
     /**
86 86
      * @param Operador $operador
87
-     * @return LoginResponse
87
+     * @return ConsultaLoginResponse
88 88
      */
89 89
     public function setOperador($operador)
90 90
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Integracao\ControlPay\Contracts\Login;
4 4
 use Integracao\ControlPay\Helpers\SerializerHelper;
5
-use Integracao\ControlPay\Model\Device;
6 5
 use Integracao\ControlPay\Model\Operador;
7 6
 use Integracao\ControlPay\Model\Pessoa;
8 7
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $this->pessoa = $pessoa;
70 70
 
71
-        if(is_array($pessoa))
71
+        if (is_array($pessoa))
72 72
             $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
73 73
 
74 74
         return $this;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $this->operador = $operador;
92 92
 
93
-        if(is_array($this->operador))
93
+        if (is_array($this->operador))
94 94
             $this->operador = SerializerHelper::denormalize($this->operador, Operador::class);
95 95
 
96 96
         return $this;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,8 +68,9 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $this->pessoa = $pessoa;
70 70
 
71
-        if(is_array($pessoa))
72
-            $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
71
+        if(is_array($pessoa)) {
72
+                    $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
73
+        }
73 74
 
74 75
         return $this;
75 76
     }
@@ -90,8 +91,9 @@  discard block
 block discarded – undo
90 91
     {
91 92
         $this->operador = $operador;
92 93
 
93
-        if(is_array($this->operador))
94
-            $this->operador = SerializerHelper::denormalize($this->operador, Operador::class);
94
+        if(is_array($this->operador)) {
95
+                    $this->operador = SerializerHelper::denormalize($this->operador, Operador::class);
96
+        }
95 97
 
96 98
         return $this;
97 99
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Login/LoginRequest.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     /**
42 42
      * @param string $cpfCnpj
43
-     * @return Login
43
+     * @return LoginRequest
44 44
      */
45 45
     public function setCpfCnpj($cpfCnpj)
46 46
     {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     /**
60 60
      * @param string $senha
61
-     * @return Login
61
+     * @return LoginRequest
62 62
      */
63 63
     public function setSenha($senha)
64 64
     {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
     /**
78 78
      * @param int $pessoaId
79
-     * @return Login
79
+     * @return LoginRequest
80 80
      */
81 81
     public function setPessoaId($pessoaId)
82 82
     {
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Terminal/InsertRequest.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     /**
52 52
      * @param int $id
53
-     * @return FluxoPagamento
53
+     * @return InsertRequest
54 54
      */
55 55
     public function setId($id)
56 56
     {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
     /**
70 70
      * @param string $nome
71
-     * @return FluxoPagamento
71
+     * @return InsertRequest
72 72
      */
73 73
     public function setNome($nome)
74 74
     {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 
87 87
     /**
88 88
      * @param string $impressora
89
-     * @return Terminal
89
+     * @return InsertRequest
90 90
      */
91 91
     public function setImpressora($impressora)
92 92
     {
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
     /**
110 110
      * @param Pessoa $pessoa
111
-     * @return Terminal
111
+     * @return InsertRequest
112 112
      */
113 113
     public function setPessoa($pessoa)
114 114
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     {
89 89
         $this->impressora = $impressora;
90 90
 
91
-        if(is_array($this->impressora))
91
+        if (is_array($this->impressora))
92 92
             $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
93 93
 
94 94
         return $this;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $this->pessoa = $pessoa;
112 112
 
113
-        if(is_array($this->pessoa))
113
+        if (is_array($this->pessoa))
114 114
             $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
115 115
 
116 116
         return $this;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,8 +88,9 @@  discard block
 block discarded – undo
88 88
     {
89 89
         $this->impressora = $impressora;
90 90
 
91
-        if(is_array($this->impressora))
92
-            $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
91
+        if(is_array($this->impressora)) {
92
+                    $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
93
+        }
93 94
 
94 95
         return $this;
95 96
     }
@@ -110,8 +111,9 @@  discard block
 block discarded – undo
110 111
     {
111 112
         $this->pessoa = $pessoa;
112 113
 
113
-        if(is_array($this->pessoa))
114
-            $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
114
+        if(is_array($this->pessoa)) {
115
+                    $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
116
+        }
115 117
 
116 118
         return $this;
117 119
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/IntencaoVenda.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@
 block discarded – undo
182 182
     }
183 183
 
184 184
     /**
185
-     * @return mixed
185
+     * @return integer
186 186
      */
187 187
     public function getId()
188 188
     {
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     {
221 221
         $this->pessoaVendedor = $pessoaVendedor;
222 222
 
223
-        if(is_array($this->pessoaVendedor))
223
+        if (is_array($this->pessoaVendedor))
224 224
             $this->pessoaVendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class);
225 225
 
226 226
         return $this;
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
     {
243 243
         $this->pessoaCliente = $pessoaCliente;
244 244
 
245
-        if(is_array($this->pessoaCliente))
245
+        if (is_array($this->pessoaCliente))
246 246
             $this->pessoaCliente = SerializerHelper::denormalize($this->pessoaCliente, Pessoa::class);
247 247
 
248 248
         return $this;
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
     {
265 265
         $this->formaPagamento = $formaPagamento;
266 266
 
267
-        if(is_array($this->formaPagamento))
267
+        if (is_array($this->formaPagamento))
268 268
             $this->formaPagamento = SerializerHelper::denormalize($this->formaPagamento, FormaPagamento::class);
269 269
 
270 270
         return $this;
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
     {
287 287
         $this->terminal = $terminal;
288 288
 
289
-        if(is_array($this->terminal))
289
+        if (is_array($this->terminal))
290 290
             $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
291 291
 
292 292
         return $this;
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
     {
309 309
         $this->pedido = $pedido;
310 310
 
311
-        if(is_array($this->pedido))
311
+        if (is_array($this->pedido))
312 312
             $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
313 313
 
314 314
         return $this;
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     {
331 331
         $this->operador = $operador;
332 332
 
333
-        if(is_array($this->operador))
333
+        if (is_array($this->operador))
334 334
             $this->operador = SerializerHelper::denormalize($this->operador, Operador::class);
335 335
 
336 336
         return $this;
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     {
353 353
         $this->contaRecebimentoLancamento = $contaRecebimentoLancamento;
354 354
 
355
-        if(is_array($this->contaRecebimentoLancamento))
355
+        if (is_array($this->contaRecebimentoLancamento))
356 356
             $this->contaRecebimentoLancamento = SerializerHelper::denormalize($this->contaRecebimentoLancamento, ContaRecebimentoLancamento::class);
357 357
 
358 358
         return $this;
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
     {
375 375
         $this->pagamentoRecorrenteLancamento = $pagamentoRecorrenteLancamento;
376 376
 
377
-        if(is_array($this->pagamentoRecorrenteLancamento))
377
+        if (is_array($this->pagamentoRecorrenteLancamento))
378 378
             $this->pagamentoRecorrenteLancamento = SerializerHelper::denormalize($this->pagamentoRecorrenteLancamento, PagamentoRecorrenteLancamento::class);
379 379
 
380 380
         return $this;
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
     {
397 397
         $this->intencaoVendaStatus = $intencaoVendaStatus;
398 398
 
399
-        if(is_array($this->intencaoVendaStatus))
399
+        if (is_array($this->intencaoVendaStatus))
400 400
             $this->intencaoVendaStatus = SerializerHelper::denormalize($this->intencaoVendaStatus, IntencaoVendaStatus::class);
401 401
 
402 402
         return $this;
@@ -455,10 +455,10 @@  discard block
 block discarded – undo
455 455
 
456 456
         $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data);
457 457
 
458
-        if(empty($this->data))
458
+        if (empty($this->data))
459 459
             $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
460 460
 
461
-        if(empty($this->data))
461
+        if (empty($this->data))
462 462
             $this->data = \DateTime::createFromFormat('d/m/Y H:i', $data);
463 463
 
464 464
         return $this;
@@ -642,9 +642,9 @@  discard block
 block discarded – undo
642 642
     {
643 643
         //$this->itemProdutos = $itemProdutos;
644 644
 
645
-        if(is_array($itemProdutos))
645
+        if (is_array($itemProdutos))
646 646
             foreach ($itemProdutos as $itemProduto) {
647
-                $this->itemProdutos[] = SerializerHelper::denormalize(
647
+                $this->itemProdutos[ ] = SerializerHelper::denormalize(
648 648
                     $itemProduto, ItemProduto::class);
649 649
             }
650 650
 
@@ -665,9 +665,9 @@  discard block
 block discarded – undo
665 665
      */
666 666
     public function setPagamentosExterno($pagamentosExterno)
667 667
     {
668
-        if(is_array($pagamentosExterno))
668
+        if (is_array($pagamentosExterno))
669 669
             foreach ($pagamentosExterno as $pagamentoExterno) {
670
-                $this->pagamentosExterno[] = SerializerHelper::denormalize(
670
+                $this->pagamentosExterno[ ] = SerializerHelper::denormalize(
671 671
                     $pagamentoExterno, PagamentoExterno::class);
672 672
             }
673 673
 
@@ -689,9 +689,9 @@  discard block
 block discarded – undo
689 689
     public function setProdutos($produtos)
690 690
     {
691 691
 
692
-        if(is_array($produtos))
692
+        if (is_array($produtos))
693 693
             foreach ($produtos as $produto) {
694
-                $this->produtos[] = SerializerHelper::denormalize(
694
+                $this->produtos[ ] = SerializerHelper::denormalize(
695 695
                     $produto, ItemProduto::class);
696 696
             }
697 697
 
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
     {
823 823
         $this->vendedor = $vendedor;
824 824
 
825
-        if(is_array($this->vendedor))
825
+        if (is_array($this->vendedor))
826 826
             $this->vendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class);
827 827
 
828 828
         return $this;
@@ -860,9 +860,9 @@  discard block
 block discarded – undo
860 860
      */
861 861
     public function setPagamentosExternos($pagamentosExternos)
862 862
     {
863
-        if(is_array($pagamentosExternos))
863
+        if (is_array($pagamentosExternos))
864 864
             foreach ($pagamentosExternos as $pagamentoExterno) {
865
-                $this->pagamentosExternos[] = SerializerHelper::denormalize(
865
+                $this->pagamentosExternos[ ] = SerializerHelper::denormalize(
866 866
                     $pagamentoExterno, PagamentoExterno::class);
867 867
             }
868 868
 
Please login to merge, or discard this patch.
Braces   +48 added lines, -32 removed lines patch added patch discarded remove patch
@@ -220,8 +220,9 @@  discard block
 block discarded – undo
220 220
     {
221 221
         $this->pessoaVendedor = $pessoaVendedor;
222 222
 
223
-        if(is_array($this->pessoaVendedor))
224
-            $this->pessoaVendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class);
223
+        if(is_array($this->pessoaVendedor)) {
224
+                    $this->pessoaVendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class);
225
+        }
225 226
 
226 227
         return $this;
227 228
     }
@@ -242,8 +243,9 @@  discard block
 block discarded – undo
242 243
     {
243 244
         $this->pessoaCliente = $pessoaCliente;
244 245
 
245
-        if(is_array($this->pessoaCliente))
246
-            $this->pessoaCliente = SerializerHelper::denormalize($this->pessoaCliente, Pessoa::class);
246
+        if(is_array($this->pessoaCliente)) {
247
+                    $this->pessoaCliente = SerializerHelper::denormalize($this->pessoaCliente, Pessoa::class);
248
+        }
247 249
 
248 250
         return $this;
249 251
     }
@@ -264,8 +266,9 @@  discard block
 block discarded – undo
264 266
     {
265 267
         $this->formaPagamento = $formaPagamento;
266 268
 
267
-        if(is_array($this->formaPagamento))
268
-            $this->formaPagamento = SerializerHelper::denormalize($this->formaPagamento, FormaPagamento::class);
269
+        if(is_array($this->formaPagamento)) {
270
+                    $this->formaPagamento = SerializerHelper::denormalize($this->formaPagamento, FormaPagamento::class);
271
+        }
269 272
 
270 273
         return $this;
271 274
     }
@@ -286,8 +289,9 @@  discard block
 block discarded – undo
286 289
     {
287 290
         $this->terminal = $terminal;
288 291
 
289
-        if(is_array($this->terminal))
290
-            $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
292
+        if(is_array($this->terminal)) {
293
+                    $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
294
+        }
291 295
 
292 296
         return $this;
293 297
     }
@@ -308,8 +312,9 @@  discard block
 block discarded – undo
308 312
     {
309 313
         $this->pedido = $pedido;
310 314
 
311
-        if(is_array($this->pedido))
312
-            $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
315
+        if(is_array($this->pedido)) {
316
+                    $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
317
+        }
313 318
 
314 319
         return $this;
315 320
     }
@@ -330,8 +335,9 @@  discard block
 block discarded – undo
330 335
     {
331 336
         $this->operador = $operador;
332 337
 
333
-        if(is_array($this->operador))
334
-            $this->operador = SerializerHelper::denormalize($this->operador, Operador::class);
338
+        if(is_array($this->operador)) {
339
+                    $this->operador = SerializerHelper::denormalize($this->operador, Operador::class);
340
+        }
335 341
 
336 342
         return $this;
337 343
     }
@@ -352,8 +358,9 @@  discard block
 block discarded – undo
352 358
     {
353 359
         $this->contaRecebimentoLancamento = $contaRecebimentoLancamento;
354 360
 
355
-        if(is_array($this->contaRecebimentoLancamento))
356
-            $this->contaRecebimentoLancamento = SerializerHelper::denormalize($this->contaRecebimentoLancamento, ContaRecebimentoLancamento::class);
361
+        if(is_array($this->contaRecebimentoLancamento)) {
362
+                    $this->contaRecebimentoLancamento = SerializerHelper::denormalize($this->contaRecebimentoLancamento, ContaRecebimentoLancamento::class);
363
+        }
357 364
 
358 365
         return $this;
359 366
     }
@@ -374,8 +381,9 @@  discard block
 block discarded – undo
374 381
     {
375 382
         $this->pagamentoRecorrenteLancamento = $pagamentoRecorrenteLancamento;
376 383
 
377
-        if(is_array($this->pagamentoRecorrenteLancamento))
378
-            $this->pagamentoRecorrenteLancamento = SerializerHelper::denormalize($this->pagamentoRecorrenteLancamento, PagamentoRecorrenteLancamento::class);
384
+        if(is_array($this->pagamentoRecorrenteLancamento)) {
385
+                    $this->pagamentoRecorrenteLancamento = SerializerHelper::denormalize($this->pagamentoRecorrenteLancamento, PagamentoRecorrenteLancamento::class);
386
+        }
379 387
 
380 388
         return $this;
381 389
     }
@@ -396,8 +404,9 @@  discard block
 block discarded – undo
396 404
     {
397 405
         $this->intencaoVendaStatus = $intencaoVendaStatus;
398 406
 
399
-        if(is_array($this->intencaoVendaStatus))
400
-            $this->intencaoVendaStatus = SerializerHelper::denormalize($this->intencaoVendaStatus, IntencaoVendaStatus::class);
407
+        if(is_array($this->intencaoVendaStatus)) {
408
+                    $this->intencaoVendaStatus = SerializerHelper::denormalize($this->intencaoVendaStatus, IntencaoVendaStatus::class);
409
+        }
401 410
 
402 411
         return $this;
403 412
     }
@@ -455,11 +464,13 @@  discard block
 block discarded – undo
455 464
 
456 465
         $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data);
457 466
 
458
-        if(empty($this->data))
459
-            $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
467
+        if(empty($this->data)) {
468
+                    $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
469
+        }
460 470
 
461
-        if(empty($this->data))
462
-            $this->data = \DateTime::createFromFormat('d/m/Y H:i', $data);
471
+        if(empty($this->data)) {
472
+                    $this->data = \DateTime::createFromFormat('d/m/Y H:i', $data);
473
+        }
463 474
 
464 475
         return $this;
465 476
     }
@@ -642,10 +653,11 @@  discard block
 block discarded – undo
642 653
     {
643 654
         //$this->itemProdutos = $itemProdutos;
644 655
 
645
-        if(is_array($itemProdutos))
646
-            foreach ($itemProdutos as $itemProduto) {
656
+        if(is_array($itemProdutos)) {
657
+                    foreach ($itemProdutos as $itemProduto) {
647 658
                 $this->itemProdutos[] = SerializerHelper::denormalize(
648 659
                     $itemProduto, ItemProduto::class);
660
+        }
649 661
             }
650 662
 
651 663
         return $this;
@@ -665,10 +677,11 @@  discard block
 block discarded – undo
665 677
      */
666 678
     public function setPagamentosExterno($pagamentosExterno)
667 679
     {
668
-        if(is_array($pagamentosExterno))
669
-            foreach ($pagamentosExterno as $pagamentoExterno) {
680
+        if(is_array($pagamentosExterno)) {
681
+                    foreach ($pagamentosExterno as $pagamentoExterno) {
670 682
                 $this->pagamentosExterno[] = SerializerHelper::denormalize(
671 683
                     $pagamentoExterno, PagamentoExterno::class);
684
+        }
672 685
             }
673 686
 
674 687
         return $this;
@@ -689,10 +702,11 @@  discard block
 block discarded – undo
689 702
     public function setProdutos($produtos)
690 703
     {
691 704
 
692
-        if(is_array($produtos))
693
-            foreach ($produtos as $produto) {
705
+        if(is_array($produtos)) {
706
+                    foreach ($produtos as $produto) {
694 707
                 $this->produtos[] = SerializerHelper::denormalize(
695 708
                     $produto, ItemProduto::class);
709
+        }
696 710
             }
697 711
 
698 712
         return $this;
@@ -822,8 +836,9 @@  discard block
 block discarded – undo
822 836
     {
823 837
         $this->vendedor = $vendedor;
824 838
 
825
-        if(is_array($this->vendedor))
826
-            $this->vendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class);
839
+        if(is_array($this->vendedor)) {
840
+                    $this->vendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class);
841
+        }
827 842
 
828 843
         return $this;
829 844
     }
@@ -860,10 +875,11 @@  discard block
 block discarded – undo
860 875
      */
861 876
     public function setPagamentosExternos($pagamentosExternos)
862 877
     {
863
-        if(is_array($pagamentosExternos))
864
-            foreach ($pagamentosExternos as $pagamentoExterno) {
878
+        if(is_array($pagamentosExternos)) {
879
+                    foreach ($pagamentosExternos as $pagamentoExterno) {
865 880
                 $this->pagamentosExternos[] = SerializerHelper::denormalize(
866 881
                     $pagamentoExterno, PagamentoExterno::class);
882
+        }
867 883
             }
868 884
 
869 885
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/Pagamento.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     }
72 72
 
73 73
     /**
74
-     * @return Conta
74
+     * @return ContaBancaria
75 75
      */
76 76
     public function getContaBancaria()
77 77
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     {
87 87
         $this->contaBancaria = $contaBancaria;
88 88
 
89
-        if(is_array($this->contaBancaria))
89
+        if (is_array($this->contaBancaria))
90 90
             $this->contaBancaria = SerializerHelper::denormalize($this->contaBancaria, ContaBancaria::class);
91 91
 
92 92
         return $this;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $this->pagamentoStatus = $pagamentoStatus;
110 110
 
111
-        if(is_array($this->pagamentoStatus))
111
+        if (is_array($this->pagamentoStatus))
112 112
             $this->pagamentoStatus = SerializerHelper::denormalize($this->pagamentoStatus, PagamentoStatus::class);
113 113
 
114 114
         return $this;
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
      */
165 165
     public function setContaRecebimentoLancamentos($contaRecebimentoLancamentos)
166 166
     {
167
-        if(is_array($contaRecebimentoLancamentos))
167
+        if (is_array($contaRecebimentoLancamentos))
168 168
             foreach ($contaRecebimentoLancamentos as $contaRecebimentoLancamento) {
169
-                $this->contaRecebimentoLancamentos[] = SerializerHelper::denormalize(
169
+                $this->contaRecebimentoLancamentos[ ] = SerializerHelper::denormalize(
170 170
                     $contaRecebimentoLancamento, ContaRecebimentoLancamento::class);
171 171
             }
172 172
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,8 +86,9 @@  discard block
 block discarded – undo
86 86
     {
87 87
         $this->contaBancaria = $contaBancaria;
88 88
 
89
-        if(is_array($this->contaBancaria))
90
-            $this->contaBancaria = SerializerHelper::denormalize($this->contaBancaria, ContaBancaria::class);
89
+        if(is_array($this->contaBancaria)) {
90
+                    $this->contaBancaria = SerializerHelper::denormalize($this->contaBancaria, ContaBancaria::class);
91
+        }
91 92
 
92 93
         return $this;
93 94
     }
@@ -108,8 +109,9 @@  discard block
 block discarded – undo
108 109
     {
109 110
         $this->pagamentoStatus = $pagamentoStatus;
110 111
 
111
-        if(is_array($this->pagamentoStatus))
112
-            $this->pagamentoStatus = SerializerHelper::denormalize($this->pagamentoStatus, PagamentoStatus::class);
112
+        if(is_array($this->pagamentoStatus)) {
113
+                    $this->pagamentoStatus = SerializerHelper::denormalize($this->pagamentoStatus, PagamentoStatus::class);
114
+        }
113 115
 
114 116
         return $this;
115 117
     }
@@ -164,10 +166,11 @@  discard block
 block discarded – undo
164 166
      */
165 167
     public function setContaRecebimentoLancamentos($contaRecebimentoLancamentos)
166 168
     {
167
-        if(is_array($contaRecebimentoLancamentos))
168
-            foreach ($contaRecebimentoLancamentos as $contaRecebimentoLancamento) {
169
+        if(is_array($contaRecebimentoLancamentos)) {
170
+                    foreach ($contaRecebimentoLancamentos as $contaRecebimentoLancamento) {
169 171
                 $this->contaRecebimentoLancamentos[] = SerializerHelper::denormalize(
170 172
                     $contaRecebimentoLancamento, ContaRecebimentoLancamento::class);
173
+        }
171 174
             }
172 175
 
173 176
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/Terminal.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
     /**
48 48
      * @param int $id
49
-     * @return FluxoPagamento
49
+     * @return Terminal
50 50
      */
51 51
     public function setId($id)
52 52
     {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
     /**
66 66
      * @param string $nome
67
-     * @return FluxoPagamento
67
+     * @return Terminal
68 68
      */
69 69
     public function setNome($nome)
70 70
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     {
89 89
         $this->impressora = $impressora;
90 90
 
91
-        if(is_array($this->impressora))
91
+        if (is_array($this->impressora))
92 92
             $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
93 93
 
94 94
         return $this;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $this->pessoa = $pessoa;
112 112
 
113
-        if(is_array($this->pessoa))
113
+        if (is_array($this->pessoa))
114 114
             $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
115 115
 
116 116
         return $this;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -88,8 +88,9 @@  discard block
 block discarded – undo
88 88
     {
89 89
         $this->impressora = $impressora;
90 90
 
91
-        if(is_array($this->impressora))
92
-            $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
91
+        if(is_array($this->impressora)) {
92
+                    $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
93
+        }
93 94
 
94 95
         return $this;
95 96
     }
@@ -110,8 +111,9 @@  discard block
 block discarded – undo
110 111
     {
111 112
         $this->pessoa = $pessoa;
112 113
 
113
-        if(is_array($this->pessoa))
114
-            $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
114
+        if(is_array($this->pessoa)) {
115
+                    $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
116
+        }
115 117
 
116 118
         return $this;
117 119
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/PagamentoExterno.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     {
145 145
         $this->pagamentoExternoStatus = $pagamentoExternoStatus;
146 146
 
147
-        if(is_array($this->pagamentoExternoStatus))
147
+        if (is_array($this->pagamentoExternoStatus))
148 148
             $this->pagamentoExternoStatus = SerializerHelper::denormalize(
149 149
                 $this->pagamentoExternoStatus, PagamentoExternoStatus::class);
150 150
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     {
168 168
         $this->pessoa = $pessoa;
169 169
 
170
-        if(is_array($this->pessoa))
170
+        if (is_array($this->pessoa))
171 171
             $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
172 172
 
173 173
         return $this;
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     {
190 190
         $this->intencoesVenda = $intencoesVenda;
191 191
 
192
-        if(is_array($this->intencoesVenda))
192
+        if (is_array($this->intencoesVenda))
193 193
             $this->intencoesVenda = SerializerHelper::denormalize($this->intencoesVenda, IntencaoVenda::class);
194 194
 
195 195
         return $this;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     {
212 212
         $this->terminal = $terminal;
213 213
 
214
-        if(is_array($this->terminal))
214
+        if (is_array($this->terminal))
215 215
             $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
216 216
 
217 217
         return $this;
Please login to merge, or discard this patch.
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -144,9 +144,10 @@  discard block
 block discarded – undo
144 144
     {
145 145
         $this->pagamentoExternoStatus = $pagamentoExternoStatus;
146 146
 
147
-        if(is_array($this->pagamentoExternoStatus))
148
-            $this->pagamentoExternoStatus = SerializerHelper::denormalize(
147
+        if(is_array($this->pagamentoExternoStatus)) {
148
+                    $this->pagamentoExternoStatus = SerializerHelper::denormalize(
149 149
                 $this->pagamentoExternoStatus, PagamentoExternoStatus::class);
150
+        }
150 151
 
151 152
         return $this;
152 153
     }
@@ -167,8 +168,9 @@  discard block
 block discarded – undo
167 168
     {
168 169
         $this->pessoa = $pessoa;
169 170
 
170
-        if(is_array($this->pessoa))
171
-            $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
171
+        if(is_array($this->pessoa)) {
172
+                    $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
173
+        }
172 174
 
173 175
         return $this;
174 176
     }
@@ -189,8 +191,9 @@  discard block
 block discarded – undo
189 191
     {
190 192
         $this->intencoesVenda = $intencoesVenda;
191 193
 
192
-        if(is_array($this->intencoesVenda))
193
-            $this->intencoesVenda = SerializerHelper::denormalize($this->intencoesVenda, IntencaoVenda::class);
194
+        if(is_array($this->intencoesVenda)) {
195
+                    $this->intencoesVenda = SerializerHelper::denormalize($this->intencoesVenda, IntencaoVenda::class);
196
+        }
194 197
 
195 198
         return $this;
196 199
     }
@@ -211,8 +214,9 @@  discard block
 block discarded – undo
211 214
     {
212 215
         $this->terminal = $terminal;
213 216
 
214
-        if(is_array($this->terminal))
215
-            $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
217
+        if(is_array($this->terminal)) {
218
+                    $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
219
+        }
216 220
 
217 221
         return $this;
218 222
     }
Please login to merge, or discard this patch.