Completed
Push — master ( 0f09a1...af57be )
by Adriano
04:45
created
src/Integracao/ControlPay/AbstractAPI.php 1 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/Venda/CancelarVendaResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     {
63 63
         $this->intencaoVenda = $intencaoVenda;
64 64
 
65
-        if(is_array($this->intencaoVenda))
65
+        if (is_array($this->intencaoVenda))
66 66
             $this->intencaoVenda = SerializerHelper::denormalize($this->intencaoVenda, IntencaoVenda::class);
67 67
 
68 68
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/IntencaoVendaApi.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function getByFiltros(Contracts\IntencaoVenda\GetByFiltrosRequest $getByFiltrosRequest)
33 33
     {
34
-        try{
35
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
34
+        try {
35
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
36 36
                 'body' => json_encode($getByFiltrosRequest),
37 37
             ]);
38 38
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             );
43 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
     }
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function getById($intencaoVendaId)
56 56
     {
57
-        try{
58
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
57
+        try {
58
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
59 59
                 'query' => $this->addQueryAdditionalParameters([
60 60
                     'intencaoVendaId' => $intencaoVendaId
61 61
                 ])
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             );
68 68
         }catch (RequestException $ex) {
69 69
             $this->requestException($ex);
70
-        }catch (\Exception $ex){
70
+        }catch (\Exception $ex) {
71 71
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
72 72
         }
73 73
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Client.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function getParameter($key)
72 72
     {
73
-        return isset($this->_params[$key]) ? $this->_params[$key] : null;
73
+        return isset($this->_params[ $key ]) ? $this->_params[ $key ] : null;
74 74
     }
75 75
 
76 76
     /**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function setParameter($key, $value)
84 84
     {
85
-        $this->_params[$key] = $value;
85
+        $this->_params[ $key ] = $value;
86 86
         $this->loadParameters($this->_params, $this->authentication);
87 87
         return $this;
88 88
     }
@@ -96,25 +96,25 @@  discard block
 block discarded – undo
96 96
      */
97 97
     private function loadParameters($params, IAuthentication $authentication = null)
98 98
     {
99
-        $this->_params[ControlPayParameterConst::CONTROLPAY_HOST] = getenv('CONTROLPAY_HOST');
100
-        $this->_params[ControlPayParameterConst::CONTROLPAY_TIMEOUT] = getenv('CONTROLPAY_TIMEOUT');
101
-        $this->_params[ControlPayParameterConst::CONTROLPAY_USER] = getenv('CONTROLPAY_USER');
102
-        $this->_params[ControlPayParameterConst::CONTROLPAY_PWD] = getenv('CONTROLPAY_PWD');
103
-        $this->_params[ControlPayParameterConst::CONTROLPAY_KEY] = getenv('CONTROLPAY_KEY');
104
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_PESSOA_ID] = getenv('CONTROLPAY_DEFAULT_PESSOA_ID');
105
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_PRODUTO_QTDE] = getenv('CONTROLPAY_DEFAULT_PRODUTO_QTDE');
106
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_TERMINAL_ID] = getenv('CONTROLPAY_DEFAULT_TERMINAL_ID');
107
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_PRODUTO_ID] = getenv('CONTROLPAY_DEFAULT_PRODUTO_ID');
108
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_FORMA_PAGAMENTO_ID] = getenv('CONTROLPAY_DEFAULT_FORMA_PAGAMENTO_ID');
109
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_FORMA_AGUARDA_TEF] = getenv('CONTROLPAY_DEFAULT_FORMA_AGUARDA_TEF');
110
-        $this->_params[ControlPayParameterConst::CONTROLPAY_DEFAULT_SENHA_TECNICA] = getenv('CONTROLPAY_DEFAULT_SENHA_TECNICA');
111
-        $this->_params[ControlPayParameterConst::CONTROLPAY_OAUTH_TYPE] = KeyQueryStringAuthentication::class;
112
-
113
-
114
-        if(!is_null($params))
99
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_HOST ] = getenv('CONTROLPAY_HOST');
100
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_TIMEOUT ] = getenv('CONTROLPAY_TIMEOUT');
101
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_USER ] = getenv('CONTROLPAY_USER');
102
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_PWD ] = getenv('CONTROLPAY_PWD');
103
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_KEY ] = getenv('CONTROLPAY_KEY');
104
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_PESSOA_ID ] = getenv('CONTROLPAY_DEFAULT_PESSOA_ID');
105
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_PRODUTO_QTDE ] = getenv('CONTROLPAY_DEFAULT_PRODUTO_QTDE');
106
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_TERMINAL_ID ] = getenv('CONTROLPAY_DEFAULT_TERMINAL_ID');
107
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_PRODUTO_ID ] = getenv('CONTROLPAY_DEFAULT_PRODUTO_ID');
108
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_FORMA_PAGAMENTO_ID ] = getenv('CONTROLPAY_DEFAULT_FORMA_PAGAMENTO_ID');
109
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_FORMA_AGUARDA_TEF ] = getenv('CONTROLPAY_DEFAULT_FORMA_AGUARDA_TEF');
110
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_SENHA_TECNICA ] = getenv('CONTROLPAY_DEFAULT_SENHA_TECNICA');
111
+        $this->_params[ ControlPayParameterConst::CONTROLPAY_OAUTH_TYPE ] = KeyQueryStringAuthentication::class;
112
+
113
+
114
+        if (!is_null($params))
115 115
             foreach ($params as $key => $param)
116 116
             {
117
-                if(!in_array($key, [
117
+                if (!in_array($key, [
118 118
                     ControlPayParameterConst::CONTROLPAY_HOST,
119 119
                     ControlPayParameterConst::CONTROLPAY_TIMEOUT,
120 120
                     ControlPayParameterConst::CONTROLPAY_USER,
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
                     throw new \Exception(sprintf("Parâmetro %s inválido", $key));
133 133
             }
134 134
 
135
-        if(!is_null($params) && is_array($params))
135
+        if (!is_null($params) && is_array($params))
136 136
             foreach ($params as $key => $value)
137
-                $this->_params[$key] = $value;
137
+                $this->_params[ $key ] = $value;
138 138
 
139
-        if(is_null($authentication))
139
+        if (is_null($authentication))
140 140
         {
141 141
             $this->authentication = AuthenticationFactory::getInstance($this->_params, $this);
142 142
             return;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/VendaApi.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -42,19 +42,19 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function vender(Contracts\Venda\VenderRequest $venderRequest)
44 44
     {
45
-        try{
45
+        try {
46 46
 
47
-            if(empty($venderRequest->getTerminalId()))
47
+            if (empty($venderRequest->getTerminalId()))
48 48
                 $venderRequest->setTerminalId(
49 49
                     $this->_client->getParameter(ControlPayParameterConst::CONTROLPAY_DEFAULT_TERMINAL_ID)
50 50
                 );
51 51
 
52
-            if(empty($venderRequest->getFormaPagamentoId()))
52
+            if (empty($venderRequest->getFormaPagamentoId()))
53 53
                 $venderRequest->setFormaPagamentoId(
54 54
                     $this->_client->getParameter(ControlPayParameterConst::CONTROLPAY_DEFAULT_FORMA_PAGAMENTO_ID)
55 55
                 );
56 56
 
57
-            if(empty($venderRequest->isAguardarTefIniciarTransacao()))
57
+            if (empty($venderRequest->isAguardarTefIniciarTransacao()))
58 58
                 $venderRequest->setAguardarTefIniciarTransacao(
59 59
                     boolval(
60 60
                         $this->_client->getParameter(ControlPayParameterConst::CONTROLPAY_DEFAULT_FORMA_AGUARDA_TEF)
@@ -63,18 +63,18 @@  discard block
 block discarded – undo
63 63
 
64 64
             foreach ($venderRequest->getProdutosVendidos() as $key => $produto)
65 65
             {
66
-                if(empty($produto->getId()))
67
-                    $venderRequest->getProdutosVendidos()[$key]->setId(
66
+                if (empty($produto->getId()))
67
+                    $venderRequest->getProdutosVendidos()[ $key ]->setId(
68 68
                         $this->_client->getParameter(ControlPayParameterConst::CONTROLPAY_DEFAULT_PRODUTO_ID)
69 69
                     );
70 70
 
71
-                if(empty($produto->getQuantidade()))
72
-                    $venderRequest->getProdutosVendidos()[$key]->setQuantidade(
71
+                if (empty($produto->getQuantidade()))
72
+                    $venderRequest->getProdutosVendidos()[ $key ]->setQuantidade(
73 73
                         $this->_client->getParameter(ControlPayParameterConst::CONTROLPAY_DEFAULT_PRODUTO_QTDE)
74 74
                     );
75 75
             }
76 76
 
77
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
77
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
78 78
                 'body' => json_encode($venderRequest),
79 79
             ]);
80 80
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             );
85 85
         }catch (RequestException $ex) {
86 86
             $this->requestException($ex);
87
-        }catch (\Exception $ex){
87
+        }catch (\Exception $ex) {
88 88
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
89 89
         }
90 90
     }
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function venderComPedido(Contracts\Venda\VenderComPedidoRequest $venderComPedidoRequest)
98 98
     {
99
-        try{
99
+        try {
100 100
             $response = $this->pedidoApi->insert($venderComPedidoRequest->getPedidoInserirRequest());
101 101
 
102
-            if(empty($response->getPedido()->getId()))
102
+            if (empty($response->getPedido()->getId()))
103 103
                 throw new \Exception("Falha ao inserir pedido");
104 104
 
105 105
             $venderComPedidoRequest->getInventarioVenderRequest()->setPedidoId(
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             return $this->vender($venderComPedidoRequest->getInventarioVenderRequest());
110 110
         }catch (RequestException $ex) {
111 111
             $this->requestException($ex);
112
-        }catch (\Exception $ex){
112
+        }catch (\Exception $ex) {
113 113
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
114 114
         }
115 115
     }
@@ -121,19 +121,19 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function cancelarVenda(Contracts\Venda\CancelarVendaRequest $cancelarVendaRequest)
123 123
     {
124
-        try{
124
+        try {
125 125
 
126
-            if(empty($cancelarVendaRequest->getTerminalId()))
126
+            if (empty($cancelarVendaRequest->getTerminalId()))
127 127
                 $cancelarVendaRequest->setTerminalId(
128 128
                     $this->_client->getParameter(ControlPayParameterConst::CONTROLPAY_DEFAULT_TERMINAL_ID)
129 129
                 );
130 130
 
131
-            if(empty($cancelarVendaRequest->getSenhaTecnica()))
131
+            if (empty($cancelarVendaRequest->getSenhaTecnica()))
132 132
                 $cancelarVendaRequest->setSenhaTecnica(
133 133
                     $this->_client->getParameter(ControlPayParameterConst::CONTROLPAY_DEFAULT_SENHA_TECNICA)
134 134
                 );
135 135
 
136
-            if(empty($cancelarVendaRequest->isAguardarTefIniciarTransacao()))
136
+            if (empty($cancelarVendaRequest->isAguardarTefIniciarTransacao()))
137 137
                 $cancelarVendaRequest->setAguardarTefIniciarTransacao(
138 138
                     boolval(
139 139
                         $this->_client->getParameter(ControlPayParameterConst::CONTROLPAY_DEFAULT_FORMA_AGUARDA_TEF)
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                 );
142 142
 
143 143
 
144
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
144
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
145 145
                 'body' => json_encode($cancelarVendaRequest),
146 146
             ]);
147 147
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             );
152 152
         }catch (RequestException $ex) {
153 153
             $this->requestException($ex);
154
-        }catch (\Exception $ex){
154
+        }catch (\Exception $ex) {
155 155
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
156 156
         }
157 157
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/ProdutoApi.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function getByAtivosByPessoaId($pessoaId)
32 32
     {
33
-        try{
34
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
33
+        try {
34
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
35 35
                 'query' => $this->addQueryAdditionalParameters([
36 36
                     'pessoaId' => $pessoaId
37 37
                 ])
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             );
44 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
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.
ControlPay/Contracts/Pedido/GetByPessoaIdByReferenciaResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     public function setPedidos($pedidos)
68 68
     {
69 69
         foreach ($pedidos as $pedido)
70
-            $this->pedidos[] = SerializerHelper::denormalize($pedido, Pedido::class);
70
+            $this->pedidos[ ] = SerializerHelper::denormalize($pedido, Pedido::class);
71 71
 
72 72
         return $this;
73 73
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Pedido/GetByIdResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     {
64 64
         $this->pedido = $pedido;
65 65
 
66
-        if(is_array($this->pedido))
66
+        if (is_array($this->pedido))
67 67
             $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
68 68
 
69 69
         return $this;
Please login to merge, or discard this patch.