| @@ -2,7 +2,6 @@ | ||
| 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 | |
| @@ -68,8 +68,9 @@ discard block | ||
| 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 | ||
| 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 | } | 
| @@ -144,9 +144,10 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | } | 
| @@ -215,8 +215,9 @@ discard block | ||
| 215 | 215 |      { | 
| 216 | 216 | $this->pessoaVendedor = $pessoaVendedor; | 
| 217 | 217 | |
| 218 | - if(is_array($this->pessoaVendedor)) | |
| 219 | - $this->pessoaVendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class); | |
| 218 | +        if(is_array($this->pessoaVendedor)) { | |
| 219 | + $this->pessoaVendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class); | |
| 220 | + } | |
| 220 | 221 | |
| 221 | 222 | return $this; | 
| 222 | 223 | } | 
| @@ -237,8 +238,9 @@ discard block | ||
| 237 | 238 |      { | 
| 238 | 239 | $this->pessoaCliente = $pessoaCliente; | 
| 239 | 240 | |
| 240 | - if(is_array($this->pessoaCliente)) | |
| 241 | - $this->pessoaCliente = SerializerHelper::denormalize($this->pessoaCliente, Pessoa::class); | |
| 241 | +        if(is_array($this->pessoaCliente)) { | |
| 242 | + $this->pessoaCliente = SerializerHelper::denormalize($this->pessoaCliente, Pessoa::class); | |
| 243 | + } | |
| 242 | 244 | |
| 243 | 245 | return $this; | 
| 244 | 246 | } | 
| @@ -259,8 +261,9 @@ discard block | ||
| 259 | 261 |      { | 
| 260 | 262 | $this->formaPagamento = $formaPagamento; | 
| 261 | 263 | |
| 262 | - if(is_array($this->formaPagamento)) | |
| 263 | - $this->formaPagamento = SerializerHelper::denormalize($this->formaPagamento, FormaPagamento::class); | |
| 264 | +        if(is_array($this->formaPagamento)) { | |
| 265 | + $this->formaPagamento = SerializerHelper::denormalize($this->formaPagamento, FormaPagamento::class); | |
| 266 | + } | |
| 264 | 267 | |
| 265 | 268 | return $this; | 
| 266 | 269 | } | 
| @@ -281,8 +284,9 @@ discard block | ||
| 281 | 284 |      { | 
| 282 | 285 | $this->terminal = $terminal; | 
| 283 | 286 | |
| 284 | - if(is_array($this->terminal)) | |
| 285 | - $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class); | |
| 287 | +        if(is_array($this->terminal)) { | |
| 288 | + $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class); | |
| 289 | + } | |
| 286 | 290 | |
| 287 | 291 | return $this; | 
| 288 | 292 | } | 
| @@ -303,8 +307,9 @@ discard block | ||
| 303 | 307 |      { | 
| 304 | 308 | $this->pedido = $pedido; | 
| 305 | 309 | |
| 306 | - if(is_array($this->pedido)) | |
| 307 | - $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class); | |
| 310 | +        if(is_array($this->pedido)) { | |
| 311 | + $this->pedido = SerializerHelper::denormalize($this->pedido, Pedido::class); | |
| 312 | + } | |
| 308 | 313 | |
| 309 | 314 | return $this; | 
| 310 | 315 | } | 
| @@ -325,8 +330,9 @@ discard block | ||
| 325 | 330 |      { | 
| 326 | 331 | $this->operador = $operador; | 
| 327 | 332 | |
| 328 | - if(is_array($this->operador)) | |
| 329 | - $this->operador = SerializerHelper::denormalize($this->operador, Operador::class); | |
| 333 | +        if(is_array($this->operador)) { | |
| 334 | + $this->operador = SerializerHelper::denormalize($this->operador, Operador::class); | |
| 335 | + } | |
| 330 | 336 | |
| 331 | 337 | return $this; | 
| 332 | 338 | } | 
| @@ -347,8 +353,9 @@ discard block | ||
| 347 | 353 |      { | 
| 348 | 354 | $this->contaRecebimentoLancamento = $contaRecebimentoLancamento; | 
| 349 | 355 | |
| 350 | - if(is_array($this->contaRecebimentoLancamento)) | |
| 351 | - $this->contaRecebimentoLancamento = SerializerHelper::denormalize($this->contaRecebimentoLancamento, ContaRecebimentoLancamento::class); | |
| 356 | +        if(is_array($this->contaRecebimentoLancamento)) { | |
| 357 | + $this->contaRecebimentoLancamento = SerializerHelper::denormalize($this->contaRecebimentoLancamento, ContaRecebimentoLancamento::class); | |
| 358 | + } | |
| 352 | 359 | |
| 353 | 360 | return $this; | 
| 354 | 361 | } | 
| @@ -369,8 +376,9 @@ discard block | ||
| 369 | 376 |      { | 
| 370 | 377 | $this->pagamentoRecorrenteLancamento = $pagamentoRecorrenteLancamento; | 
| 371 | 378 | |
| 372 | - if(is_array($this->pagamentoRecorrenteLancamento)) | |
| 373 | - $this->pagamentoRecorrenteLancamento = SerializerHelper::denormalize($this->pagamentoRecorrenteLancamento, PagamentoRecorrenteLancamento::class); | |
| 379 | +        if(is_array($this->pagamentoRecorrenteLancamento)) { | |
| 380 | + $this->pagamentoRecorrenteLancamento = SerializerHelper::denormalize($this->pagamentoRecorrenteLancamento, PagamentoRecorrenteLancamento::class); | |
| 381 | + } | |
| 374 | 382 | |
| 375 | 383 | return $this; | 
| 376 | 384 | } | 
| @@ -391,8 +399,9 @@ discard block | ||
| 391 | 399 |      { | 
| 392 | 400 | $this->intencaoVendaStatus = $intencaoVendaStatus; | 
| 393 | 401 | |
| 394 | - if(is_array($this->intencaoVendaStatus)) | |
| 395 | - $this->intencaoVendaStatus = SerializerHelper::denormalize($this->intencaoVendaStatus, IntencaoVendaStatus::class); | |
| 402 | +        if(is_array($this->intencaoVendaStatus)) { | |
| 403 | + $this->intencaoVendaStatus = SerializerHelper::denormalize($this->intencaoVendaStatus, IntencaoVendaStatus::class); | |
| 404 | + } | |
| 396 | 405 | |
| 397 | 406 | return $this; | 
| 398 | 407 | } | 
| @@ -449,8 +458,9 @@ discard block | ||
| 449 | 458 |      { | 
| 450 | 459 |          $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data); | 
| 451 | 460 | |
| 452 | - if(!$this->data) | |
| 453 | -            $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data); | |
| 461 | +        if(!$this->data) { | |
| 462 | +                    $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data); | |
| 463 | + } | |
| 454 | 464 | |
| 455 | 465 | return $this; | 
| 456 | 466 | } | 
| @@ -633,10 +643,11 @@ discard block | ||
| 633 | 643 |      { | 
| 634 | 644 | //$this->itemProdutos = $itemProdutos; | 
| 635 | 645 | |
| 636 | - if(is_array($itemProdutos)) | |
| 637 | -            foreach ($itemProdutos as $itemProduto) { | |
| 646 | +        if(is_array($itemProdutos)) { | |
| 647 | +                    foreach ($itemProdutos as $itemProduto) { | |
| 638 | 648 | $this->itemProdutos[] = SerializerHelper::denormalize( | 
| 639 | 649 | $itemProduto, ItemProduto::class); | 
| 650 | + } | |
| 640 | 651 | } | 
| 641 | 652 | |
| 642 | 653 | return $this; | 
| @@ -656,10 +667,11 @@ discard block | ||
| 656 | 667 | */ | 
| 657 | 668 | public function setPagamentosExterno($pagamentosExterno) | 
| 658 | 669 |      { | 
| 659 | - if(is_array($pagamentosExterno)) | |
| 660 | -            foreach ($pagamentosExterno as $pagamentoExterno) { | |
| 670 | +        if(is_array($pagamentosExterno)) { | |
| 671 | +                    foreach ($pagamentosExterno as $pagamentoExterno) { | |
| 661 | 672 | $this->pagamentosExterno[] = SerializerHelper::denormalize( | 
| 662 | 673 | $pagamentoExterno, PagamentoExterno::class); | 
| 674 | + } | |
| 663 | 675 | } | 
| 664 | 676 | |
| 665 | 677 | return $this; | 
| @@ -680,10 +692,11 @@ discard block | ||
| 680 | 692 | public function setProdutos($produtos) | 
| 681 | 693 |      { | 
| 682 | 694 | |
| 683 | - if(is_array($produtos)) | |
| 684 | -            foreach ($produtos as $produto) { | |
| 695 | +        if(is_array($produtos)) { | |
| 696 | +                    foreach ($produtos as $produto) { | |
| 685 | 697 | $this->produtos[] = SerializerHelper::denormalize( | 
| 686 | 698 | $produto, ItemProduto::class); | 
| 699 | + } | |
| 687 | 700 | } | 
| 688 | 701 | |
| 689 | 702 | return $this; | 
| @@ -813,8 +826,9 @@ discard block | ||
| 813 | 826 |      { | 
| 814 | 827 | $this->vendedor = $vendedor; | 
| 815 | 828 | |
| 816 | - if(is_array($this->vendedor)) | |
| 817 | - $this->vendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class); | |
| 829 | +        if(is_array($this->vendedor)) { | |
| 830 | + $this->vendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class); | |
| 831 | + } | |
| 818 | 832 | |
| 819 | 833 | return $this; | 
| 820 | 834 | } | 
| @@ -112,8 +112,9 @@ | ||
| 112 | 112 |      { | 
| 113 | 113 | $this->fluxoPagamento = $fluxoPagamento; | 
| 114 | 114 | |
| 115 | - if(is_array($this->fluxoPagamento)) | |
| 116 | - $this->fluxoPagamento = SerializerHelper::denormalize($this->fluxoPagamento, FluxoPagamento::class); | |
| 115 | +        if(is_array($this->fluxoPagamento)) { | |
| 116 | + $this->fluxoPagamento = SerializerHelper::denormalize($this->fluxoPagamento, FluxoPagamento::class); | |
| 117 | + } | |
| 117 | 118 | |
| 118 | 119 | return $this; | 
| 119 | 120 | } | 
| @@ -221,8 +221,9 @@ | ||
| 221 | 221 |      { | 
| 222 | 222 | $this->produtoStatus = $produtoStatus; | 
| 223 | 223 | |
| 224 | - if(is_array($this->produtoStatus)) | |
| 225 | - $this->produtoStatus = SerializerHelper::denormalize($this->produtoStatus, ProdutoStatus::class); | |
| 224 | +        if(is_array($this->produtoStatus)) { | |
| 225 | + $this->produtoStatus = SerializerHelper::denormalize($this->produtoStatus, ProdutoStatus::class); | |
| 226 | + } | |
| 226 | 227 | |
| 227 | 228 | return $this; | 
| 228 | 229 | } | 
| @@ -86,8 +86,9 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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; | 
| @@ -75,8 +75,9 @@ | ||
| 75 | 75 |      { | 
| 76 | 76 | $this->pessoa = $pessoa; | 
| 77 | 77 | |
| 78 | - if(is_array($this->pessoa)) | |
| 79 | - $this->pessoa = SerializerHelper::denormalize($pessoa, Pessoa::class); | |
| 78 | +        if(is_array($this->pessoa)) { | |
| 79 | + $this->pessoa = SerializerHelper::denormalize($pessoa, Pessoa::class); | |
| 80 | + } | |
| 80 | 81 | |
| 81 | 82 | return $this; | 
| 82 | 83 | } | 
| @@ -252,8 +252,9 @@ | ||
| 252 | 252 |      { | 
| 253 | 253 | $this->pessoaStatus = $pessoaStatus; | 
| 254 | 254 | |
| 255 | - if(is_array($this->pessoaStatus)) | |
| 256 | - $this->pessoaStatus = SerializerHelper::denormalize($this->pessoaStatus, PessoaStatus::class); | |
| 255 | +        if(is_array($this->pessoaStatus)) { | |
| 256 | + $this->pessoaStatus = SerializerHelper::denormalize($this->pessoaStatus, PessoaStatus::class); | |
| 257 | + } | |
| 257 | 258 | |
| 258 | 259 | return $this; | 
| 259 | 260 | } | 
| @@ -105,8 +105,9 @@ discard block | ||
| 105 | 105 |      { | 
| 106 | 106 | $this->contaRecebimento = $contaRecebimento; | 
| 107 | 107 | |
| 108 | - if(is_array($this->contaRecebimento)) | |
| 109 | - $this->contaRecebimento = SerializerHelper::denormalize($this->contaRecebimento, ContaRecebimento::class); | |
| 108 | +        if(is_array($this->contaRecebimento)) { | |
| 109 | + $this->contaRecebimento = SerializerHelper::denormalize($this->contaRecebimento, ContaRecebimento::class); | |
| 110 | + } | |
| 110 | 111 | |
| 111 | 112 | return $this; | 
| 112 | 113 | } | 
| @@ -127,8 +128,9 @@ discard block | ||
| 127 | 128 |      { | 
| 128 | 129 | $this->contaPayLancamento = $contaPayLancamento; | 
| 129 | 130 | |
| 130 | - if(is_array($this->contaPayLancamento)) | |
| 131 | - $this->contaPayLancamento = SerializerHelper::denormalize($this->contaPayLancamento, ContaPayLancamento::class); | |
| 131 | +        if(is_array($this->contaPayLancamento)) { | |
| 132 | + $this->contaPayLancamento = SerializerHelper::denormalize($this->contaPayLancamento, ContaPayLancamento::class); | |
| 133 | + } | |
| 132 | 134 | |
| 133 | 135 | return $this; | 
| 134 | 136 | } | 
| @@ -149,8 +151,9 @@ discard block | ||
| 149 | 151 |      { | 
| 150 | 152 | $this->pagamento = $pagamento; | 
| 151 | 153 | |
| 152 | - if(is_array($this->pagamento)) | |
| 153 | - $this->pagamento = SerializerHelper::denormalize($this->pagamento, Pagamento::class); | |
| 154 | +        if(is_array($this->pagamento)) { | |
| 155 | + $this->pagamento = SerializerHelper::denormalize($this->pagamento, Pagamento::class); | |
| 156 | + } | |
| 154 | 157 | |
| 155 | 158 | return $this; | 
| 156 | 159 | } | 
| @@ -171,8 +174,9 @@ discard block | ||
| 171 | 174 |      { | 
| 172 | 175 | $this->lancamentoTipo = $lancamentoTipo; | 
| 173 | 176 | |
| 174 | - if(is_array($this->lancamentoTipo)) | |
| 175 | - $this->lancamentoTipo = SerializerHelper::denormalize($this->lancamentoTipo, LancamentoTipo::class); | |
| 177 | +        if(is_array($this->lancamentoTipo)) { | |
| 178 | + $this->lancamentoTipo = SerializerHelper::denormalize($this->lancamentoTipo, LancamentoTipo::class); | |
| 179 | + } | |
| 176 | 180 | |
| 177 | 181 | return $this; | 
| 178 | 182 | } | 
| @@ -283,8 +287,9 @@ discard block | ||
| 283 | 287 |      { | 
| 284 | 288 | $this->intencaoVenda = $intencaoVenda; | 
| 285 | 289 | |
| 286 | - if(is_array($this->intencaoVenda)) | |
| 287 | - $this->intencaoVenda = SerializerHelper::denormalize($this->intencaoVenda, IntencaoVenda::class); | |
| 290 | +        if(is_array($this->intencaoVenda)) { | |
| 291 | + $this->intencaoVenda = SerializerHelper::denormalize($this->intencaoVenda, IntencaoVenda::class); | |
| 292 | + } | |
| 288 | 293 | |
| 289 | 294 | return $this; | 
| 290 | 295 | } |