Completed
Push — master ( 924818...a51019 )
by Adriano
02:59
created
src/Integracao/ControlPay/Factory/AuthenticationFactory.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,24 +21,24 @@
 block discarded – undo
21 21
      */
22 22
     public static function getInstance(array $params, Client $client = null)
23 23
     {
24
-        if(!isset($params[ControlPayParameter::CONTROLPAY_OAUTH_TYPE]))
24
+        if (!isset($params[ ControlPayParameter::CONTROLPAY_OAUTH_TYPE ]))
25 25
             throw new \Exception("Tipo de autenticação não especificado");
26 26
 
27
-        switch ($params[ControlPayParameter::CONTROLPAY_OAUTH_TYPE])
27
+        switch ($params[ ControlPayParameter::CONTROLPAY_OAUTH_TYPE ])
28 28
         {
29 29
             case BasicAuthentication::class:
30 30
                 return new BasicAuthentication(
31
-                    isset($params[ControlPayParameter::CONTROLPAY_USER]) ?$params[ControlPayParameter::CONTROLPAY_USER] : null,
32
-                    isset($params[ControlPayParameter::CONTROLPAY_PWD]) ?$params[ControlPayParameter::CONTROLPAY_PWD] : null,
33
-                    isset($params[ControlPayParameter::CONTROLPAY_KEY]) ?$params[ControlPayParameter::CONTROLPAY_KEY] : null
31
+                    isset($params[ ControlPayParameter::CONTROLPAY_USER ]) ? $params[ ControlPayParameter::CONTROLPAY_USER ] : null,
32
+                    isset($params[ ControlPayParameter::CONTROLPAY_PWD ]) ? $params[ ControlPayParameter::CONTROLPAY_PWD ] : null,
33
+                    isset($params[ ControlPayParameter::CONTROLPAY_KEY ]) ? $params[ ControlPayParameter::CONTROLPAY_KEY ] : null
34 34
                 );
35 35
                 break;
36 36
             case KeyQueryStringAuthentication::class:
37 37
                 return new KeyQueryStringAuthentication(
38
-                    isset($params[ControlPayParameter::CONTROLPAY_USER]) ?$params[ControlPayParameter::CONTROLPAY_USER] : null,
39
-                    isset($params[ControlPayParameter::CONTROLPAY_PWD]) ?$params[ControlPayParameter::CONTROLPAY_PWD] : null,
40
-                    isset($params[ControlPayParameter::CONTROLPAY_KEY]) ?$params[ControlPayParameter::CONTROLPAY_KEY] : null,
41
-                    isset($params[ControlPayParameter::CONTROLPAY_PESSOAID]) ?$params[ControlPayParameter::CONTROLPAY_PESSOAID] : null,
38
+                    isset($params[ ControlPayParameter::CONTROLPAY_USER ]) ? $params[ ControlPayParameter::CONTROLPAY_USER ] : null,
39
+                    isset($params[ ControlPayParameter::CONTROLPAY_PWD ]) ? $params[ ControlPayParameter::CONTROLPAY_PWD ] : null,
40
+                    isset($params[ ControlPayParameter::CONTROLPAY_KEY ]) ? $params[ ControlPayParameter::CONTROLPAY_KEY ] : null,
41
+                    isset($params[ ControlPayParameter::CONTROLPAY_PESSOAID ]) ? $params[ ControlPayParameter::CONTROLPAY_PESSOAID ] : null,
42 42
                     $client
43 43
                 );
44 44
                 break;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/PagamentoExterno.php 1 patch
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.
src/Integracao/ControlPay/Model/IntencaoVenda.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     {
216 216
         $this->pessoaVendedor = $pessoaVendedor;
217 217
 
218
-        if(is_array($this->pessoaVendedor))
218
+        if (is_array($this->pessoaVendedor))
219 219
             $this->pessoaVendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class);
220 220
 
221 221
         return $this;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
     {
238 238
         $this->pessoaCliente = $pessoaCliente;
239 239
 
240
-        if(is_array($this->pessoaCliente))
240
+        if (is_array($this->pessoaCliente))
241 241
             $this->pessoaCliente = SerializerHelper::denormalize($this->pessoaCliente, Pessoa::class);
242 242
 
243 243
         return $this;
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     {
260 260
         $this->formaPagamento = $formaPagamento;
261 261
 
262
-        if(is_array($this->formaPagamento))
262
+        if (is_array($this->formaPagamento))
263 263
             $this->formaPagamento = SerializerHelper::denormalize($this->formaPagamento, FormaPagamento::class);
264 264
 
265 265
         return $this;
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     {
282 282
         $this->terminal = $terminal;
283 283
 
284
-        if(is_array($this->terminal))
284
+        if (is_array($this->terminal))
285 285
             $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
286 286
 
287 287
         return $this;
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
     {
304 304
         $this->pedido = $pedido;
305 305
 
306
-        if(is_array($this->pedido))
306
+        if (is_array($this->pedido))
307 307
             $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class);
308 308
 
309 309
         return $this;
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
     {
326 326
         $this->operador = $operador;
327 327
 
328
-        if(is_array($this->operador))
328
+        if (is_array($this->operador))
329 329
             $this->operador = SerializerHelper::denormalize($this->operador, Operador::class);
330 330
 
331 331
         return $this;
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
     {
348 348
         $this->contaRecebimentoLancamento = $contaRecebimentoLancamento;
349 349
 
350
-        if(is_array($this->contaRecebimentoLancamento))
350
+        if (is_array($this->contaRecebimentoLancamento))
351 351
             $this->contaRecebimentoLancamento = SerializerHelper::denormalize($this->contaRecebimentoLancamento, ContaRecebimentoLancamento::class);
352 352
 
353 353
         return $this;
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
     {
370 370
         $this->pagamentoRecorrenteLancamento = $pagamentoRecorrenteLancamento;
371 371
 
372
-        if(is_array($this->pagamentoRecorrenteLancamento))
372
+        if (is_array($this->pagamentoRecorrenteLancamento))
373 373
             $this->pagamentoRecorrenteLancamento = SerializerHelper::denormalize($this->pagamentoRecorrenteLancamento, PagamentoRecorrenteLancamento::class);
374 374
 
375 375
         return $this;
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
     {
392 392
         $this->intencaoVendaStatus = $intencaoVendaStatus;
393 393
 
394
-        if(is_array($this->intencaoVendaStatus))
394
+        if (is_array($this->intencaoVendaStatus))
395 395
             $this->intencaoVendaStatus = SerializerHelper::denormalize($this->intencaoVendaStatus, IntencaoVendaStatus::class);
396 396
 
397 397
         return $this;
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
     {
450 450
         $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data);
451 451
 
452
-        if(!$this->data)
452
+        if (!$this->data)
453 453
             $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
454 454
 
455 455
         return $this;
@@ -633,9 +633,9 @@  discard block
 block discarded – undo
633 633
     {
634 634
         //$this->itemProdutos = $itemProdutos;
635 635
 
636
-        if(is_array($itemProdutos))
636
+        if (is_array($itemProdutos))
637 637
             foreach ($itemProdutos as $itemProduto) {
638
-                $this->itemProdutos[] = SerializerHelper::denormalize(
638
+                $this->itemProdutos[ ] = SerializerHelper::denormalize(
639 639
                     $itemProduto, ItemProduto::class);
640 640
             }
641 641
 
@@ -656,9 +656,9 @@  discard block
 block discarded – undo
656 656
      */
657 657
     public function setPagamentosExterno($pagamentosExterno)
658 658
     {
659
-        if(is_array($pagamentosExterno))
659
+        if (is_array($pagamentosExterno))
660 660
             foreach ($pagamentosExterno as $pagamentoExterno) {
661
-                $this->pagamentosExterno[] = SerializerHelper::denormalize(
661
+                $this->pagamentosExterno[ ] = SerializerHelper::denormalize(
662 662
                     $pagamentoExterno, PagamentoExterno::class);
663 663
             }
664 664
 
@@ -680,9 +680,9 @@  discard block
 block discarded – undo
680 680
     public function setProdutos($produtos)
681 681
     {
682 682
 
683
-        if(is_array($produtos))
683
+        if (is_array($produtos))
684 684
             foreach ($produtos as $produto) {
685
-                $this->produtos[] = SerializerHelper::denormalize(
685
+                $this->produtos[ ] = SerializerHelper::denormalize(
686 686
                     $produto, ItemProduto::class);
687 687
             }
688 688
 
@@ -813,7 +813,7 @@  discard block
 block discarded – undo
813 813
     {
814 814
         $this->vendedor = $vendedor;
815 815
 
816
-        if(is_array($this->vendedor))
816
+        if (is_array($this->vendedor))
817 817
             $this->vendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class);
818 818
 
819 819
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/FormaPagamento.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     {
113 113
         $this->fluxoPagamento = $fluxoPagamento;
114 114
 
115
-        if(is_array($this->fluxoPagamento))
115
+        if (is_array($this->fluxoPagamento))
116 116
             $this->fluxoPagamento = SerializerHelper::denormalize($this->fluxoPagamento, FluxoPagamento::class);
117 117
 
118 118
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/Produto.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
221 221
     {
222 222
         $this->produtoStatus = $produtoStatus;
223 223
 
224
-        if(is_array($this->produtoStatus))
224
+        if (is_array($this->produtoStatus))
225 225
             $this->produtoStatus = SerializerHelper::denormalize($this->produtoStatus, ProdutoStatus::class);
226 226
 
227 227
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/Pagamento.php 1 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.
src/Integracao/ControlPay/Model/ContaRecebimento.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     {
76 76
         $this->pessoa = $pessoa;
77 77
 
78
-        if(is_array($this->pessoa))
78
+        if (is_array($this->pessoa))
79 79
             $this->pessoa = SerializerHelper::denormalize($pessoa, Pessoa::class);
80 80
 
81 81
         return $this;
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
         foreach ($contaRecebimentoLancamentos as $contaRecebimentoLancamento)
136 136
         {
137
-            $this->contaRecebimentoLancamentos[] = SerializerHelper::denormalize(
137
+            $this->contaRecebimentoLancamentos[ ] = SerializerHelper::denormalize(
138 138
                 $contaRecebimentoLancamento, ContaRecebimentoLancamento::class);
139 139
         }
140 140
 
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/Pessoa.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@
 block discarded – undo
252 252
     {
253 253
         $this->pessoaStatus = $pessoaStatus;
254 254
 
255
-        if(is_array($this->pessoaStatus))
255
+        if (is_array($this->pessoaStatus))
256 256
             $this->pessoaStatus = SerializerHelper::denormalize($this->pessoaStatus, PessoaStatus::class);
257 257
 
258 258
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/ContaRecebimentoLancamento.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     {
106 106
         $this->contaRecebimento = $contaRecebimento;
107 107
 
108
-        if(is_array($this->contaRecebimento))
108
+        if (is_array($this->contaRecebimento))
109 109
             $this->contaRecebimento = SerializerHelper::denormalize($this->contaRecebimento, ContaRecebimento::class);
110 110
 
111 111
         return $this;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     {
128 128
         $this->contaPayLancamento = $contaPayLancamento;
129 129
 
130
-        if(is_array($this->contaPayLancamento))
130
+        if (is_array($this->contaPayLancamento))
131 131
             $this->contaPayLancamento = SerializerHelper::denormalize($this->contaPayLancamento, ContaPayLancamento::class);
132 132
 
133 133
         return $this;
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     {
150 150
         $this->pagamento = $pagamento;
151 151
 
152
-        if(is_array($this->pagamento))
152
+        if (is_array($this->pagamento))
153 153
             $this->pagamento = SerializerHelper::denormalize($this->pagamento, Pagamento::class);
154 154
 
155 155
         return $this;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     {
172 172
         $this->lancamentoTipo = $lancamentoTipo;
173 173
 
174
-        if(is_array($this->lancamentoTipo))
174
+        if (is_array($this->lancamentoTipo))
175 175
             $this->lancamentoTipo = SerializerHelper::denormalize($this->lancamentoTipo, LancamentoTipo::class);
176 176
 
177 177
         return $this;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
     {
284 284
         $this->intencaoVenda = $intencaoVenda;
285 285
 
286
-        if(is_array($this->intencaoVenda))
286
+        if (is_array($this->intencaoVenda))
287 287
             $this->intencaoVenda = SerializerHelper::denormalize($this->intencaoVenda, IntencaoVenda::class);
288 288
 
289 289
         return $this;
Please login to merge, or discard this patch.