@@ -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 | } |
@@ -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 | } |