@@ -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 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | */ |
53 | 53 | public function getAuthorization() |
54 | 54 | { |
55 | - if(!empty($this->key)) |
|
55 | + if (!empty($this->key)) |
|
56 | 56 | return $this->key; |
57 | 57 | |
58 | 58 | $response = $this->_loginApi->login( |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |