| @@ -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) | 
| @@ -55,7 +55,7 @@ discard block | ||
| 55 | 55 | $this->endpoint = $endpoint; | 
| 56 | 56 | $this->_client = $client; | 
| 57 | 57 | |
| 58 | - if(is_null($this->_client)) | |
| 58 | + if (is_null($this->_client)) | |
| 59 | 59 | $this->_client = new Client(); | 
| 60 | 60 | |
| 61 | 61 | $this->query = new GuzzleHttp\Query(); | 
| @@ -67,7 +67,7 @@ discard block | ||
| 67 | 67 |                  $this->query->set('key', $this->_client->getAuthentication()); | 
| 68 | 68 | break; | 
| 69 | 69 | case BasicAuthentication::class: | 
| 70 | - $this->headers['Authorization'] = $this->_client->getAuthentication(); | |
| 70 | + $this->headers[ 'Authorization' ] = $this->_client->getAuthentication(); | |
| 71 | 71 | break; | 
| 72 | 72 | default: | 
| 73 | 73 |                  $this->query->set('key', $this->_client->getAuthentication()); | 
| @@ -98,8 +98,8 @@ discard block | ||
| 98 | 98 |      { | 
| 99 | 99 | $this->query = new GuzzleHttp\Query(); | 
| 100 | 100 | |
| 101 | - if(isset($this->_httpClient->getDefaultOption()['query'])) | |
| 102 | - $this->query = $this->_httpClient->getDefaultOption()['query']; | |
| 101 | + if (isset($this->_httpClient->getDefaultOption()[ 'query' ])) | |
| 102 | + $this->query = $this->_httpClient->getDefaultOption()[ 'query' ]; | |
| 103 | 103 | |
| 104 | 104 | foreach ($params as $key => $value) | 
| 105 | 105 | $this->query->set($key, $value); | 
| @@ -55,8 +55,9 @@ discard block | ||
| 55 | 55 | $this->endpoint = $endpoint; | 
| 56 | 56 | $this->_client = $client; | 
| 57 | 57 | |
| 58 | - if(is_null($this->_client)) | |
| 59 | - $this->_client = new Client(); | |
| 58 | +        if(is_null($this->_client)) { | |
| 59 | + $this->_client = new Client(); | |
| 60 | + } | |
| 60 | 61 | |
| 61 | 62 | $this->query = new GuzzleHttp\Query(); | 
| 62 | 63 | $this->query->setEncodingType(false); | 
| @@ -98,11 +99,13 @@ discard block | ||
| 98 | 99 |      { | 
| 99 | 100 | $this->query = new GuzzleHttp\Query(); | 
| 100 | 101 | |
| 101 | - if(isset($this->_httpClient->getDefaultOption()['query'])) | |
| 102 | - $this->query = $this->_httpClient->getDefaultOption()['query']; | |
| 102 | +        if(isset($this->_httpClient->getDefaultOption()['query'])) { | |
| 103 | + $this->query = $this->_httpClient->getDefaultOption()['query']; | |
| 104 | + } | |
| 103 | 105 | |
| 104 | - foreach ($params as $key => $value) | |
| 105 | - $this->query->set($key, $value); | |
| 106 | +        foreach ($params as $key => $value) { | |
| 107 | + $this->query->set($key, $value); | |
| 108 | + } | |
| 106 | 109 | |
| 107 | 110 | return $this->query; | 
| 108 | 111 | } | 
| @@ -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 |      { | 
| @@ -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,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; | 
| @@ -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 | } | 
| @@ -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; | 
| @@ -92,8 +92,9 @@ discard block | ||
| 92 | 92 |      { | 
| 93 | 93 | $this->impressora = $impressora; | 
| 94 | 94 | |
| 95 | - if(is_array($this->impressora)) | |
| 96 | - $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class); | |
| 95 | +        if(is_array($this->impressora)) { | |
| 96 | + $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class); | |
| 97 | + } | |
| 97 | 98 | |
| 98 | 99 | return $this; | 
| 99 | 100 | } | 
| @@ -114,8 +115,9 @@ discard block | ||
| 114 | 115 |      { | 
| 115 | 116 | $this->pessoa = $pessoa; | 
| 116 | 117 | |
| 117 | - if(is_array($this->pessoa)) | |
| 118 | - $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class); | |
| 118 | +        if(is_array($this->pessoa)) { | |
| 119 | + $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class); | |
| 120 | + } | |
| 119 | 121 | |
| 120 | 122 | return $this; | 
| 121 | 123 | } | 
| @@ -95,7 +95,7 @@ discard block | ||
| 95 | 95 | |
| 96 | 96 | /** | 
| 97 | 97 | * @param int $operadorId | 
| 98 | - * @return Venda | |
| 98 | + * @return VenderRequest | |
| 99 | 99 | */ | 
| 100 | 100 | public function setOperadorId($operadorId) | 
| 101 | 101 |      { | 
| @@ -113,7 +113,7 @@ discard block | ||
| 113 | 113 | |
| 114 | 114 | /** | 
| 115 | 115 | * @param int $pessoaClienteId | 
| 116 | - * @return Venda | |
| 116 | + * @return VenderRequest | |
| 117 | 117 | */ | 
| 118 | 118 | public function setPessoaClienteId($pessoaClienteId) | 
| 119 | 119 |      { | 
| @@ -131,7 +131,7 @@ discard block | ||
| 131 | 131 | |
| 132 | 132 | /** | 
| 133 | 133 | * @param int $formaPagamentoId | 
| 134 | - * @return Venda | |
| 134 | + * @return VenderRequest | |
| 135 | 135 | */ | 
| 136 | 136 | public function setFormaPagamentoId($formaPagamentoId) | 
| 137 | 137 |      { | 
| @@ -149,7 +149,7 @@ discard block | ||
| 149 | 149 | |
| 150 | 150 | /** | 
| 151 | 151 | * @param int $terminalId | 
| 152 | - * @return Venda | |
| 152 | + * @return VenderRequest | |
| 153 | 153 | */ | 
| 154 | 154 | public function setTerminalId($terminalId) | 
| 155 | 155 |      { | 
| @@ -167,7 +167,7 @@ discard block | ||
| 167 | 167 | |
| 168 | 168 | /** | 
| 169 | 169 | * @param int $pedidoId | 
| 170 | - * @return Venda | |
| 170 | + * @return VenderRequest | |
| 171 | 171 | */ | 
| 172 | 172 | public function setPedidoId($pedidoId) | 
| 173 | 173 |      { | 
| @@ -185,7 +185,7 @@ discard block | ||
| 185 | 185 | |
| 186 | 186 | /** | 
| 187 | 187 | * @param int $integracaoId | 
| 188 | - * @return Venda | |
| 188 | + * @return VenderRequest | |
| 189 | 189 | */ | 
| 190 | 190 | public function setIntegracaoId($integracaoId) | 
| 191 | 191 |      { | 
| @@ -203,7 +203,7 @@ discard block | ||
| 203 | 203 | |
| 204 | 204 | /** | 
| 205 | 205 | * @param float $valorTotalVendido | 
| 206 | - * @return Venda | |
| 206 | + * @return VenderRequest | |
| 207 | 207 | */ | 
| 208 | 208 | public function setValorTotalVendido($valorTotalVendido) | 
| 209 | 209 |      { | 
| @@ -221,7 +221,7 @@ discard block | ||
| 221 | 221 | |
| 222 | 222 | /** | 
| 223 | 223 | * @param float $valorAcrescimo | 
| 224 | - * @return Venda | |
| 224 | + * @return VenderRequest | |
| 225 | 225 | */ | 
| 226 | 226 | public function setValorAcrescimo($valorAcrescimo) | 
| 227 | 227 |      { | 
| @@ -239,7 +239,7 @@ discard block | ||
| 239 | 239 | |
| 240 | 240 | /** | 
| 241 | 241 | * @param float $valorDesconto | 
| 242 | - * @return Venda | |
| 242 | + * @return VenderRequest | |
| 243 | 243 | */ | 
| 244 | 244 | public function setValorDesconto($valorDesconto) | 
| 245 | 245 |      { | 
| @@ -257,7 +257,7 @@ discard block | ||
| 257 | 257 | |
| 258 | 258 | /** | 
| 259 | 259 | * @param string $observacao | 
| 260 | - * @return Venda | |
| 260 | + * @return VenderRequest | |
| 261 | 261 | */ | 
| 262 | 262 | public function setObservacao($observacao) | 
| 263 | 263 |      { | 
| @@ -275,7 +275,7 @@ discard block | ||
| 275 | 275 | |
| 276 | 276 | /** | 
| 277 | 277 | * @param boolean $parcelamentoAdmin | 
| 278 | - * @return Venda | |
| 278 | + * @return VenderRequest | |
| 279 | 279 | */ | 
| 280 | 280 | public function setParcelamentoAdmin($parcelamentoAdmin) | 
| 281 | 281 |      { | 
| @@ -293,7 +293,7 @@ discard block | ||
| 293 | 293 | |
| 294 | 294 | /** | 
| 295 | 295 | * @param int $quantidadeParcelas | 
| 296 | - * @return Venda | |
| 296 | + * @return VenderRequest | |
| 297 | 297 | */ | 
| 298 | 298 | public function setQuantidadeParcelas($quantidadeParcelas) | 
| 299 | 299 |      { | 
| @@ -311,7 +311,7 @@ discard block | ||
| 311 | 311 | |
| 312 | 312 | /** | 
| 313 | 313 | * @param boolean $aguardarTefIniciarTransacao | 
| 314 | - * @return Venda | |
| 314 | + * @return VenderRequest | |
| 315 | 315 | */ | 
| 316 | 316 | public function setAguardarTefIniciarTransacao($aguardarTefIniciarTransacao) | 
| 317 | 317 |      { | 
| @@ -329,7 +329,7 @@ discard block | ||
| 329 | 329 | |
| 330 | 330 | /** | 
| 331 | 331 | * @param array $produtosVendidos | 
| 332 | - * @return Venda | |
| 332 | + * @return VenderRequest | |
| 333 | 333 | */ | 
| 334 | 334 | public function setProdutosVendidos($produtosVendidos) | 
| 335 | 335 |      { | 
| @@ -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 |      { | 
| @@ -215,7 +215,7 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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; | 
| @@ -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 | } | 
| @@ -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 | |
| @@ -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; | 
| @@ -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; | 
| @@ -92,8 +92,9 @@ discard block | ||
| 92 | 92 |      { | 
| 93 | 93 | $this->impressora = $impressora; | 
| 94 | 94 | |
| 95 | - if(is_array($this->impressora)) | |
| 96 | - $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class); | |
| 95 | +        if(is_array($this->impressora)) { | |
| 96 | + $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class); | |
| 97 | + } | |
| 97 | 98 | |
| 98 | 99 | return $this; | 
| 99 | 100 | } | 
| @@ -114,8 +115,9 @@ discard block | ||
| 114 | 115 |      { | 
| 115 | 116 | $this->pessoa = $pessoa; | 
| 116 | 117 | |
| 117 | - if(is_array($this->pessoa)) | |
| 118 | - $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class); | |
| 118 | +        if(is_array($this->pessoa)) { | |
| 119 | + $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class); | |
| 120 | + } | |
| 119 | 121 | |
| 120 | 122 | return $this; | 
| 121 | 123 | } |