Completed
Push — master ( af57be...69e569 )
by Adriano
02:26
created
src/Integracao/ControlPay/API/PagamentoExternoApi.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@
 block discarded – undo
39 39
                 $this->response->json(),
40 40
                 Contracts\PagamentoExterno\GetByFiltrosResponse::class
41 41
             );
42
-        }catch (RequestException $ex) {
42
+        } catch (RequestException $ex) {
43 43
             $this->requestException($ex);
44
-        }catch (\Exception $ex){
44
+        } catch (\Exception $ex){
45 45
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
46 46
         }
47 47
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/LoginApi.php 1 patch
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
                 $this->response->json(),
41 41
                 Contracts\Login\LoginResponse::class
42 42
             );
43
-        }catch (RequestException $ex) {
43
+        } catch (RequestException $ex) {
44 44
             $this->requestException($ex);
45
-        }catch (\Exception $ex){
45
+        } catch (\Exception $ex){
46 46
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
47 47
         }
48 48
     }
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
             $this->response = $this->_httpClient->post(__FUNCTION__,[]);
58 58
 
59 59
             return true;
60
-        }catch (RequestException $ex) {
60
+        } catch (RequestException $ex) {
61 61
             $this->requestException($ex);
62
-        }catch (\Exception $ex){
62
+        } catch (\Exception $ex){
63 63
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
64 64
         }
65 65
     }
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
                 $this->response->json(),
81 81
                 Contracts\Login\ConsultaLoginResponse::class
82 82
             );
83
-        }catch (RequestException $ex) {
83
+        } catch (RequestException $ex) {
84 84
             $this->requestException($ex);
85
-        }catch (\Exception $ex){
85
+        } catch (\Exception $ex){
86 86
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
87 87
         }
88 88
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/TerminalApi.php 1 patch
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
                 $this->response->json(),
42 42
                 Contracts\Terminal\GetByPessoaIdResponse::class
43 43
             );
44
-        }catch (RequestException $ex) {
44
+        } catch (RequestException $ex) {
45 45
             $this->requestException($ex);
46
-        }catch (\Exception $ex){
46
+        } catch (\Exception $ex){
47 47
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
48 48
         }
49 49
     }
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
                 $this->response->json(),
67 67
                 Contracts\Terminal\GetByIdResponse::class
68 68
             );
69
-        }catch (RequestException $ex) {
69
+        } catch (RequestException $ex) {
70 70
             $this->requestException($ex);
71
-        }catch (\Exception $ex){
71
+        } catch (\Exception $ex){
72 72
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
73 73
         }
74 74
     }
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
                 $this->response->json(),
90 90
                 Contracts\Terminal\InsertResponse::class
91 91
             );
92
-        }catch (RequestException $ex) {
92
+        } catch (RequestException $ex) {
93 93
             $this->requestException($ex);
94
-        }catch (\Exception $ex){
94
+        } catch (\Exception $ex){
95 95
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
96 96
         }
97 97
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/ProdutoApi.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
41 41
                 $this->response->json(),
42 42
                 Contracts\Produto\GetByAtivosByPessoaIdResponse::class
43 43
             );
44
-        }catch (RequestException $ex) {
44
+        } catch (RequestException $ex) {
45 45
             $this->requestException($ex);
46
-        }catch (\Exception $ex){
46
+        } catch (\Exception $ex){
47 47
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
48 48
         }
49 49
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/IntencaoVenda.php 1 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.
ControlPay/Contracts/Pedido/GetByPessoaIdByReferenciaResponse.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,9 @@
 block discarded – undo
66 66
      */
67 67
     public function setPedidos($pedidos)
68 68
     {
69
-        foreach ($pedidos as $pedido)
70
-            $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
69
+        foreach ($pedidos as $pedido) {
70
+                    $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
71
+        }
71 72
 
72 73
         return $this;
73 74
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Pedido/GetByIdResponse.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,9 @@
 block discarded – undo
63 63
     {
64 64
         $this->pedido = $pedido;
65 65
 
66
-        if(is_array($this->pedido))
67
-            $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
66
+        if(is_array($this->pedido)) {
67
+                    $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
68
+        }
68 69
 
69 70
         return $this;
70 71
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Pedido/GetPedidosByPessoaIdResponse.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,9 @@
 block discarded – undo
66 66
      */
67 67
     public function setPedidos($pedidos)
68 68
     {
69
-        foreach ($pedidos as $pedido)
70
-            $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
69
+        foreach ($pedidos as $pedido) {
70
+                    $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
71
+        }
71 72
 
72 73
         return $this;
73 74
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Pedido/CancelarResponse.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,9 @@
 block discarded – undo
63 63
     {
64 64
         $this->pedido = $pedido;
65 65
 
66
-        if(is_array($this->pedido))
67
-            $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
66
+        if(is_array($this->pedido)) {
67
+                    $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
68
+        }
68 69
 
69 70
         return $this;
70 71
     }
Please login to merge, or discard this patch.