@@ -47,7 +47,7 @@ |
||
| 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) |
@@ -60,7 +60,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | /** |
@@ -35,7 +35,7 @@ discard block |
||
| 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 |
||
| 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 | { |
@@ -44,7 +44,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | { |
@@ -68,7 +68,7 @@ discard block |
||
| 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 |
||
| 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; |
@@ -40,7 +40,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | { |
@@ -50,7 +50,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | { |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | { |
| 93 | 93 | $this->impressora = $impressora; |
| 94 | 94 | |
| 95 | - if(is_array($this->impressora)) |
|
| 95 | + if (is_array($this->impressora)) |
|
| 96 | 96 | $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class); |
| 97 | 97 | |
| 98 | 98 | return $this; |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | { |
| 115 | 115 | $this->pessoa = $pessoa; |
| 116 | 116 | |
| 117 | - if(is_array($this->pessoa)) |
|
| 117 | + if (is_array($this->pessoa)) |
|
| 118 | 118 | $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class); |
| 119 | 119 | |
| 120 | 120 | return $this; |
@@ -182,7 +182,7 @@ |
||
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | /** |
| 185 | - * @return mixed |
|
| 185 | + * @return integer |
|
| 186 | 186 | */ |
| 187 | 187 | public function getId() |
| 188 | 188 | { |
@@ -220,7 +220,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | { |
| 455 | 455 | $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data); |
| 456 | 456 | |
| 457 | - if(!$this->data) |
|
| 457 | + if (!$this->data) |
|
| 458 | 458 | $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data); |
| 459 | 459 | |
| 460 | 460 | return $this; |
@@ -638,9 +638,9 @@ discard block |
||
| 638 | 638 | { |
| 639 | 639 | //$this->itemProdutos = $itemProdutos; |
| 640 | 640 | |
| 641 | - if(is_array($itemProdutos)) |
|
| 641 | + if (is_array($itemProdutos)) |
|
| 642 | 642 | foreach ($itemProdutos as $itemProduto) { |
| 643 | - $this->itemProdutos[] = SerializerHelper::denormalize( |
|
| 643 | + $this->itemProdutos[ ] = SerializerHelper::denormalize( |
|
| 644 | 644 | $itemProduto, ItemProduto::class); |
| 645 | 645 | } |
| 646 | 646 | |
@@ -661,9 +661,9 @@ discard block |
||
| 661 | 661 | */ |
| 662 | 662 | public function setPagamentosExterno($pagamentosExterno) |
| 663 | 663 | { |
| 664 | - if(is_array($pagamentosExterno)) |
|
| 664 | + if (is_array($pagamentosExterno)) |
|
| 665 | 665 | foreach ($pagamentosExterno as $pagamentoExterno) { |
| 666 | - $this->pagamentosExterno[] = SerializerHelper::denormalize( |
|
| 666 | + $this->pagamentosExterno[ ] = SerializerHelper::denormalize( |
|
| 667 | 667 | $pagamentoExterno, PagamentoExterno::class); |
| 668 | 668 | } |
| 669 | 669 | |
@@ -685,9 +685,9 @@ discard block |
||
| 685 | 685 | public function setProdutos($produtos) |
| 686 | 686 | { |
| 687 | 687 | |
| 688 | - if(is_array($produtos)) |
|
| 688 | + if (is_array($produtos)) |
|
| 689 | 689 | foreach ($produtos as $produto) { |
| 690 | - $this->produtos[] = SerializerHelper::denormalize( |
|
| 690 | + $this->produtos[ ] = SerializerHelper::denormalize( |
|
| 691 | 691 | $produto, ItemProduto::class); |
| 692 | 692 | } |
| 693 | 693 | |
@@ -818,7 +818,7 @@ discard block |
||
| 818 | 818 | { |
| 819 | 819 | $this->vendedor = $vendedor; |
| 820 | 820 | |
| 821 | - if(is_array($this->vendedor)) |
|
| 821 | + if (is_array($this->vendedor)) |
|
| 822 | 822 | $this->vendedor = SerializerHelper::denormalize($this->pessoaVendedor, Pessoa::class); |
| 823 | 823 | |
| 824 | 824 | return $this; |
@@ -856,9 +856,9 @@ discard block |
||
| 856 | 856 | */ |
| 857 | 857 | public function setPagamentosExternos($pagamentosExternos) |
| 858 | 858 | { |
| 859 | - if(is_array($pagamentosExternos)) |
|
| 859 | + if (is_array($pagamentosExternos)) |
|
| 860 | 860 | foreach ($pagamentosExternos as $pagamentoExterno) { |
| 861 | - $this->pagamentosExternos[] = SerializerHelper::denormalize( |
|
| 861 | + $this->pagamentosExternos[ ] = SerializerHelper::denormalize( |
|
| 862 | 862 | $pagamentoExterno, PagamentoExterno::class); |
| 863 | 863 | } |
| 864 | 864 | |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
| 74 | - * @return Conta |
|
| 74 | + * @return ContaBancaria |
|
| 75 | 75 | */ |
| 76 | 76 | public function getContaBancaria() |
| 77 | 77 | { |
@@ -86,7 +86,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -46,7 +46,7 @@ discard block |
||
| 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 |
||
| 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 | { |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | { |
| 93 | 93 | $this->impressora = $impressora; |
| 94 | 94 | |
| 95 | - if(is_array($this->impressora)) |
|
| 95 | + if (is_array($this->impressora)) |
|
| 96 | 96 | $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class); |
| 97 | 97 | |
| 98 | 98 | return $this; |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | { |
| 115 | 115 | $this->pessoa = $pessoa; |
| 116 | 116 | |
| 117 | - if(is_array($this->pessoa)) |
|
| 117 | + if (is_array($this->pessoa)) |
|
| 118 | 118 | $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class); |
| 119 | 119 | |
| 120 | 120 | return $this; |
@@ -144,7 +144,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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; |