@@ -62,7 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | |
64 | 64 | foreach ($intencoesVendas as $intencaoVenda) |
65 | - $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
65 | + $this->intencoesVendas[ ] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
66 | 66 | |
67 | 67 | return $this; |
68 | 68 | } |
@@ -61,8 +61,9 @@ |
||
61 | 61 | public function setIntencoesVendas($intencoesVendas) |
62 | 62 | { |
63 | 63 | |
64 | - foreach ($intencoesVendas as $intencaoVenda) |
|
65 | - $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
64 | + foreach ($intencoesVendas as $intencaoVenda) { |
|
65 | + $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
66 | + } |
|
66 | 67 | |
67 | 68 | return $this; |
68 | 69 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | { |
45 | 45 | $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data); |
46 | 46 | |
47 | - if(!$this->data) |
|
47 | + if (!$this->data) |
|
48 | 48 | $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data); |
49 | 49 | |
50 | 50 | return $this; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | $this->terminal = $terminal; |
68 | 68 | |
69 | - if(is_array($this->terminal)) |
|
69 | + if (is_array($this->terminal)) |
|
70 | 70 | $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class); |
71 | 71 | |
72 | 72 | return $this; |
@@ -44,8 +44,9 @@ discard block |
||
44 | 44 | { |
45 | 45 | $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data); |
46 | 46 | |
47 | - if(!$this->data) |
|
48 | - $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data); |
|
47 | + if(!$this->data) { |
|
48 | + $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data); |
|
49 | + } |
|
49 | 50 | |
50 | 51 | return $this; |
51 | 52 | } |
@@ -66,8 +67,9 @@ discard block |
||
66 | 67 | { |
67 | 68 | $this->terminal = $terminal; |
68 | 69 | |
69 | - if(is_array($this->terminal)) |
|
70 | - $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class); |
|
70 | + if(is_array($this->terminal)) { |
|
71 | + $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class); |
|
72 | + } |
|
71 | 73 | |
72 | 74 | return $this; |
73 | 75 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | |
64 | 64 | foreach ($intencoesVendas as $intencaoVenda) |
65 | - $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
65 | + $this->intencoesVendas[ ] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
66 | 66 | |
67 | 67 | return $this; |
68 | 68 | } |
@@ -61,8 +61,9 @@ |
||
61 | 61 | public function setIntencoesVendas($intencoesVendas) |
62 | 62 | { |
63 | 63 | |
64 | - foreach ($intencoesVendas as $intencaoVenda) |
|
65 | - $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
64 | + foreach ($intencoesVendas as $intencaoVenda) { |
|
65 | + $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
66 | + } |
|
66 | 67 | |
67 | 68 | return $this; |
68 | 69 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | { |
63 | 63 | |
64 | 64 | foreach ($intencoesVendas as $intencaoVenda) |
65 | - $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
65 | + $this->intencoesVendas[ ] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
66 | 66 | |
67 | 67 | return $this; |
68 | 68 | } |
@@ -61,8 +61,9 @@ |
||
61 | 61 | public function setIntencoesVendas($intencoesVendas) |
62 | 62 | { |
63 | 63 | |
64 | - foreach ($intencoesVendas as $intencaoVenda) |
|
65 | - $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
64 | + foreach ($intencoesVendas as $intencaoVenda) { |
|
65 | + $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class); |
|
66 | + } |
|
66 | 67 | |
67 | 68 | return $this; |
68 | 69 | } |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function getByFiltros(Contracts\IntencaoVenda\GetByFiltrosRequest $getByFiltrosRequest) |
32 | 32 | { |
33 | - try{ |
|
34 | - $response = $this->_httpClient->post(__FUNCTION__,[ |
|
33 | + try { |
|
34 | + $response = $this->_httpClient->post(__FUNCTION__, [ |
|
35 | 35 | 'body' => json_encode($getByFiltrosRequest), |
36 | 36 | ]); |
37 | 37 | |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | ); |
42 | 42 | }catch (RequestException $ex) { |
43 | 43 | $responseBody = $ex->getResponse()->json(); |
44 | - throw new \Exception($responseBody['message']); |
|
45 | - }catch (\Exception $ex){ |
|
44 | + throw new \Exception($responseBody[ 'message' ]); |
|
45 | + }catch (\Exception $ex) { |
|
46 | 46 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
47 | 47 | } |
48 | 48 | } |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function getById($intencaoVendaId) |
56 | 56 | { |
57 | - try{ |
|
58 | - $response = $this->_httpClient->post(__FUNCTION__,[ |
|
57 | + try { |
|
58 | + $response = $this->_httpClient->post(__FUNCTION__, [ |
|
59 | 59 | 'query' => $this->addQueryAdditionalParameters([ |
60 | 60 | 'intencaoVendaId' => $intencaoVendaId |
61 | 61 | ]) |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | ); |
68 | 68 | }catch (RequestException $ex) { |
69 | 69 | $responseBody = $ex->getResponse()->json(); |
70 | - throw new \Exception($responseBody['message']); |
|
71 | - }catch (\Exception $ex){ |
|
70 | + throw new \Exception($responseBody[ 'message' ]); |
|
71 | + }catch (\Exception $ex) { |
|
72 | 72 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
73 | 73 | } |
74 | 74 | } |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | $response->json(), |
46 | 46 | Contracts\Venda\VenderResponse::class |
47 | 47 | ); |
48 | - }catch (RequestException $ex) { |
|
48 | + } catch (RequestException $ex) { |
|
49 | 49 | $responseBody = $ex->getResponse()->json(); |
50 | 50 | throw new \Exception($responseBody['message']); |
51 | - }catch (\Exception $ex){ |
|
51 | + } catch (\Exception $ex){ |
|
52 | 52 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
53 | 53 | } |
54 | 54 | } |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | $response->json(), |
73 | 73 | Contracts\Venda\ConsultarVendasResponse::class |
74 | 74 | ); |
75 | - }catch (RequestException $ex) { |
|
75 | + } catch (RequestException $ex) { |
|
76 | 76 | $responseBody = $ex->getResponse()->json(); |
77 | 77 | var_dump($responseBody); |
78 | 78 | throw new \Exception($responseBody['message']); |
79 | - }catch (\Exception $ex){ |
|
79 | + } catch (\Exception $ex){ |
|
80 | 80 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
81 | 81 | } |
82 | 82 | } |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function getByFiltros(Contracts\PagamentoExterno\GetByFiltrosRequest $getByFiltrosRequest) |
32 | 32 | { |
33 | - try{ |
|
34 | - $response = $this->_httpClient->post(__FUNCTION__,[ |
|
33 | + try { |
|
34 | + $response = $this->_httpClient->post(__FUNCTION__, [ |
|
35 | 35 | 'body' => json_encode($getByFiltrosRequest), |
36 | 36 | ]); |
37 | 37 | |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | ); |
42 | 42 | }catch (RequestException $ex) { |
43 | 43 | $responseBody = $ex->getResponse()->json(); |
44 | - throw new \Exception($responseBody['message']); |
|
45 | - }catch (\Exception $ex){ |
|
44 | + throw new \Exception($responseBody[ 'message' ]); |
|
45 | + }catch (\Exception $ex) { |
|
46 | 46 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
47 | 47 | } |
48 | 48 | } |
@@ -41,10 +41,10 @@ |
||
41 | 41 | $response->json(), |
42 | 42 | Contracts\Produto\GetByAtivosByPessoaIdResponse::class |
43 | 43 | ); |
44 | - }catch (RequestException $ex) { |
|
44 | + } catch (RequestException $ex) { |
|
45 | 45 | $responseBody = $ex->getResponse()->json(); |
46 | 46 | throw new \Exception($responseBody['message']); |
47 | - }catch (\Exception $ex){ |
|
47 | + } catch (\Exception $ex){ |
|
48 | 48 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
49 | 49 | } |
50 | 50 | } |
@@ -337,7 +337,7 @@ |
||
337 | 337 | { |
338 | 338 | |
339 | 339 | foreach ($produtosVendidos as $produto) |
340 | - $this->produtosVendidos[] = is_array($produto) ? SerializerHelper::denormalize($produto, Produto::class) : $produto; |
|
340 | + $this->produtosVendidos[ ] = is_array($produto) ? SerializerHelper::denormalize($produto, Produto::class) : $produto; |
|
341 | 341 | |
342 | 342 | return $this; |
343 | 343 | } |
@@ -336,8 +336,9 @@ |
||
336 | 336 | public function setProdutosVendidos($produtosVendidos) |
337 | 337 | { |
338 | 338 | |
339 | - foreach ($produtosVendidos as $produto) |
|
340 | - $this->produtosVendidos[] = is_array($produto) ? SerializerHelper::denormalize($produto, Produto::class) : $produto; |
|
339 | + foreach ($produtosVendidos as $produto) { |
|
340 | + $this->produtosVendidos[] = is_array($produto) ? SerializerHelper::denormalize($produto, Produto::class) : $produto; |
|
341 | + } |
|
341 | 342 | |
342 | 343 | return $this; |
343 | 344 | } |