@@ -112,7 +112,7 @@ |
||
112 | 112 | { |
113 | 113 | $this->fluxoPagamento = $fluxoPagamento; |
114 | 114 | |
115 | - if(is_array($this->fluxoPagamento)) |
|
115 | + if (is_array($this->fluxoPagamento)) |
|
116 | 116 | $this->fluxoPagamento = SerializerHelper::denormalize($this->fluxoPagamento, FluxoPagamento::class); |
117 | 117 | |
118 | 118 | return $this; |
@@ -112,8 +112,9 @@ |
||
112 | 112 | { |
113 | 113 | $this->fluxoPagamento = $fluxoPagamento; |
114 | 114 | |
115 | - if(is_array($this->fluxoPagamento)) |
|
116 | - $this->fluxoPagamento = SerializerHelper::denormalize($this->fluxoPagamento, FluxoPagamento::class); |
|
115 | + if(is_array($this->fluxoPagamento)) { |
|
116 | + $this->fluxoPagamento = SerializerHelper::denormalize($this->fluxoPagamento, FluxoPagamento::class); |
|
117 | + } |
|
117 | 118 | |
118 | 119 | return $this; |
119 | 120 | } |
@@ -221,7 +221,7 @@ |
||
221 | 221 | { |
222 | 222 | $this->produtoStatus = $produtoStatus; |
223 | 223 | |
224 | - if(is_array($this->produtoStatus)) |
|
224 | + if (is_array($this->produtoStatus)) |
|
225 | 225 | $this->produtoStatus = SerializerHelper::denormalize($this->produtoStatus, ProdutoStatus::class); |
226 | 226 | |
227 | 227 | return $this; |
@@ -221,8 +221,9 @@ |
||
221 | 221 | { |
222 | 222 | $this->produtoStatus = $produtoStatus; |
223 | 223 | |
224 | - if(is_array($this->produtoStatus)) |
|
225 | - $this->produtoStatus = SerializerHelper::denormalize($this->produtoStatus, ProdutoStatus::class); |
|
224 | + if(is_array($this->produtoStatus)) { |
|
225 | + $this->produtoStatus = SerializerHelper::denormalize($this->produtoStatus, ProdutoStatus::class); |
|
226 | + } |
|
226 | 227 | |
227 | 228 | return $this; |
228 | 229 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | { |
76 | 76 | $this->pessoa = $pessoa; |
77 | 77 | |
78 | - if(is_array($this->pessoa)) |
|
78 | + if (is_array($this->pessoa)) |
|
79 | 79 | $this->pessoa = SerializerHelper::denormalize($pessoa, Pessoa::class); |
80 | 80 | |
81 | 81 | return $this; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | foreach ($contaRecebimentoLancamentos as $contaRecebimentoLancamento) |
136 | 136 | { |
137 | - $this->contaRecebimentoLancamentos[] = SerializerHelper::denormalize( |
|
137 | + $this->contaRecebimentoLancamentos[ ] = SerializerHelper::denormalize( |
|
138 | 138 | $contaRecebimentoLancamento, ContaRecebimentoLancamento::class); |
139 | 139 | } |
140 | 140 |
@@ -75,8 +75,9 @@ |
||
75 | 75 | { |
76 | 76 | $this->pessoa = $pessoa; |
77 | 77 | |
78 | - if(is_array($this->pessoa)) |
|
79 | - $this->pessoa = SerializerHelper::denormalize($pessoa, Pessoa::class); |
|
78 | + if(is_array($this->pessoa)) { |
|
79 | + $this->pessoa = SerializerHelper::denormalize($pessoa, Pessoa::class); |
|
80 | + } |
|
80 | 81 | |
81 | 82 | return $this; |
82 | 83 | } |
@@ -579,7 +579,7 @@ |
||
579 | 579 | public function setDataLogin($dataLogin) |
580 | 580 | { |
581 | 581 | $this->dataLogin = \DateTime::createFromFormat('d/m/Y H:i:s.u', $dataLogin); |
582 | - return $this; |
|
582 | + return $this; |
|
583 | 583 | } |
584 | 584 | |
585 | 585 | /** |
@@ -252,7 +252,7 @@ |
||
252 | 252 | { |
253 | 253 | $this->pessoaStatus = $pessoaStatus; |
254 | 254 | |
255 | - if(is_array($this->pessoaStatus)) |
|
255 | + if (is_array($this->pessoaStatus)) |
|
256 | 256 | $this->pessoaStatus = SerializerHelper::denormalize($this->pessoaStatus, PessoaStatus::class); |
257 | 257 | |
258 | 258 | return $this; |
@@ -252,8 +252,9 @@ |
||
252 | 252 | { |
253 | 253 | $this->pessoaStatus = $pessoaStatus; |
254 | 254 | |
255 | - if(is_array($this->pessoaStatus)) |
|
256 | - $this->pessoaStatus = SerializerHelper::denormalize($this->pessoaStatus, PessoaStatus::class); |
|
255 | + if(is_array($this->pessoaStatus)) { |
|
256 | + $this->pessoaStatus = SerializerHelper::denormalize($this->pessoaStatus, PessoaStatus::class); |
|
257 | + } |
|
257 | 258 | |
258 | 259 | return $this; |
259 | 260 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | { |
106 | 106 | $this->contaRecebimento = $contaRecebimento; |
107 | 107 | |
108 | - if(is_array($this->contaRecebimento)) |
|
108 | + if (is_array($this->contaRecebimento)) |
|
109 | 109 | $this->contaRecebimento = SerializerHelper::denormalize($this->contaRecebimento, ContaRecebimento::class); |
110 | 110 | |
111 | 111 | return $this; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | { |
128 | 128 | $this->contaPayLancamento = $contaPayLancamento; |
129 | 129 | |
130 | - if(is_array($this->contaPayLancamento)) |
|
130 | + if (is_array($this->contaPayLancamento)) |
|
131 | 131 | $this->contaPayLancamento = SerializerHelper::denormalize($this->contaPayLancamento, ContaPayLancamento::class); |
132 | 132 | |
133 | 133 | return $this; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | { |
150 | 150 | $this->pagamento = $pagamento; |
151 | 151 | |
152 | - if(is_array($this->pagamento)) |
|
152 | + if (is_array($this->pagamento)) |
|
153 | 153 | $this->pagamento = SerializerHelper::denormalize($this->pagamento, Pagamento::class); |
154 | 154 | |
155 | 155 | return $this; |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | { |
172 | 172 | $this->lancamentoTipo = $lancamentoTipo; |
173 | 173 | |
174 | - if(is_array($this->lancamentoTipo)) |
|
174 | + if (is_array($this->lancamentoTipo)) |
|
175 | 175 | $this->lancamentoTipo = SerializerHelper::denormalize($this->lancamentoTipo, LancamentoTipo::class); |
176 | 176 | |
177 | 177 | return $this; |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | { |
284 | 284 | $this->intencaoVenda = $intencaoVenda; |
285 | 285 | |
286 | - if(is_array($this->intencaoVenda)) |
|
286 | + if (is_array($this->intencaoVenda)) |
|
287 | 287 | $this->intencaoVenda = SerializerHelper::denormalize($this->intencaoVenda, IntencaoVenda::class); |
288 | 288 | |
289 | 289 | return $this; |
@@ -105,8 +105,9 @@ discard block |
||
105 | 105 | { |
106 | 106 | $this->contaRecebimento = $contaRecebimento; |
107 | 107 | |
108 | - if(is_array($this->contaRecebimento)) |
|
109 | - $this->contaRecebimento = SerializerHelper::denormalize($this->contaRecebimento, ContaRecebimento::class); |
|
108 | + if(is_array($this->contaRecebimento)) { |
|
109 | + $this->contaRecebimento = SerializerHelper::denormalize($this->contaRecebimento, ContaRecebimento::class); |
|
110 | + } |
|
110 | 111 | |
111 | 112 | return $this; |
112 | 113 | } |
@@ -127,8 +128,9 @@ discard block |
||
127 | 128 | { |
128 | 129 | $this->contaPayLancamento = $contaPayLancamento; |
129 | 130 | |
130 | - if(is_array($this->contaPayLancamento)) |
|
131 | - $this->contaPayLancamento = SerializerHelper::denormalize($this->contaPayLancamento, ContaPayLancamento::class); |
|
131 | + if(is_array($this->contaPayLancamento)) { |
|
132 | + $this->contaPayLancamento = SerializerHelper::denormalize($this->contaPayLancamento, ContaPayLancamento::class); |
|
133 | + } |
|
132 | 134 | |
133 | 135 | return $this; |
134 | 136 | } |
@@ -149,8 +151,9 @@ discard block |
||
149 | 151 | { |
150 | 152 | $this->pagamento = $pagamento; |
151 | 153 | |
152 | - if(is_array($this->pagamento)) |
|
153 | - $this->pagamento = SerializerHelper::denormalize($this->pagamento, Pagamento::class); |
|
154 | + if(is_array($this->pagamento)) { |
|
155 | + $this->pagamento = SerializerHelper::denormalize($this->pagamento, Pagamento::class); |
|
156 | + } |
|
154 | 157 | |
155 | 158 | return $this; |
156 | 159 | } |
@@ -171,8 +174,9 @@ discard block |
||
171 | 174 | { |
172 | 175 | $this->lancamentoTipo = $lancamentoTipo; |
173 | 176 | |
174 | - if(is_array($this->lancamentoTipo)) |
|
175 | - $this->lancamentoTipo = SerializerHelper::denormalize($this->lancamentoTipo, LancamentoTipo::class); |
|
177 | + if(is_array($this->lancamentoTipo)) { |
|
178 | + $this->lancamentoTipo = SerializerHelper::denormalize($this->lancamentoTipo, LancamentoTipo::class); |
|
179 | + } |
|
176 | 180 | |
177 | 181 | return $this; |
178 | 182 | } |
@@ -283,8 +287,9 @@ discard block |
||
283 | 287 | { |
284 | 288 | $this->intencaoVenda = $intencaoVenda; |
285 | 289 | |
286 | - if(is_array($this->intencaoVenda)) |
|
287 | - $this->intencaoVenda = SerializerHelper::denormalize($this->intencaoVenda, IntencaoVenda::class); |
|
290 | + if(is_array($this->intencaoVenda)) { |
|
291 | + $this->intencaoVenda = SerializerHelper::denormalize($this->intencaoVenda, IntencaoVenda::class); |
|
292 | + } |
|
288 | 293 | |
289 | 294 | return $this; |
290 | 295 | } |
@@ -28,16 +28,16 @@ discard block |
||
28 | 28 | */ |
29 | 29 | private static function getInstance() |
30 | 30 | { |
31 | - if(empty(self::$instance['jms.serializer'])) |
|
31 | + if (empty(self::$instance[ 'jms.serializer' ])) |
|
32 | 32 | { |
33 | - self::$instance['jms.serializer'] = SerializerBuilder::create() |
|
33 | + self::$instance[ 'jms.serializer' ] = SerializerBuilder::create() |
|
34 | 34 | ->setPropertyNamingStrategy(new SerializedNameAnnotationStrategy(new IdenticalPropertyNamingStrategy())) |
35 | 35 | ->build(); |
36 | 36 | } |
37 | 37 | |
38 | - if(empty(self::$instance['symfony.serializer'])) |
|
38 | + if (empty(self::$instance[ 'symfony.serializer' ])) |
|
39 | 39 | { |
40 | - self::$instance['symfony.serializer'] = new Serializer([new ObjectNormalizer()], |
|
40 | + self::$instance[ 'symfony.serializer' ] = new Serializer([ new ObjectNormalizer() ], |
|
41 | 41 | [ |
42 | 42 | 'xml' => new XmlEncoder(), |
43 | 43 | 'json' => new JsonEncoder() |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public static function deserialize($data, $class, $format = 'json') |
59 | 59 | { |
60 | - return self::getInstance()['symfony.serializer']->deserialize($data, $class, $format); |
|
60 | + return self::getInstance()[ 'symfony.serializer' ]->deserialize($data, $class, $format); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public static function denormalize($data, $class) |
71 | 71 | { |
72 | - return self::getInstance()['symfony.serializer']->denormalize($data, $class); |
|
72 | + return self::getInstance()[ 'symfony.serializer' ]->denormalize($data, $class); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public static function serialize($data, $format = 'json') |
81 | 81 | { |
82 | - return self::getInstance()['jms.serializer']->serialize($data, $format); |
|
82 | + return self::getInstance()[ 'jms.serializer' ]->serialize($data, $format); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | public static function toArray($object) |
90 | 90 | { |
91 | - return self::getInstance()['jms.serializer']->toArray($object); |
|
91 | + return self::getInstance()[ 'jms.serializer' ]->toArray($object); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | } |
95 | 95 | \ No newline at end of file |
@@ -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 | } |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function getByPessoaId($pessoaId) |
32 | 32 | { |
33 | - try{ |
|
34 | - $response = $this->_httpClient->post(__FUNCTION__,[ |
|
33 | + try { |
|
34 | + $response = $this->_httpClient->post(__FUNCTION__, [ |
|
35 | 35 | 'query' => $this->addQueryAdditionalParameters([ |
36 | 36 | 'pessoaId' => $pessoaId |
37 | 37 | ]) |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | ); |
44 | 44 | }catch (RequestException $ex) { |
45 | 45 | $responseBody = $ex->getResponse()->json(); |
46 | - throw new \Exception($responseBody['message']); |
|
47 | - }catch (\Exception $ex){ |
|
46 | + throw new \Exception($responseBody[ 'message' ]); |
|
47 | + }catch (\Exception $ex) { |
|
48 | 48 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
49 | 49 | } |
50 | 50 | } |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function getById($terminalId) |
58 | 58 | { |
59 | - try{ |
|
60 | - $response = $this->_httpClient->post(__FUNCTION__,[ |
|
59 | + try { |
|
60 | + $response = $this->_httpClient->post(__FUNCTION__, [ |
|
61 | 61 | 'query' => $this->addQueryAdditionalParameters([ |
62 | 62 | 'terminalId' => $terminalId |
63 | 63 | ]) |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | ); |
70 | 70 | }catch (RequestException $ex) { |
71 | 71 | $responseBody = $ex->getResponse()->json(); |
72 | - throw new \Exception($responseBody['message']); |
|
73 | - }catch (\Exception $ex){ |
|
72 | + throw new \Exception($responseBody[ 'message' ]); |
|
73 | + }catch (\Exception $ex) { |
|
74 | 74 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
75 | 75 | } |
76 | 76 | } |
@@ -82,8 +82,8 @@ discard block |
||
82 | 82 | */ |
83 | 83 | public function insert(Contracts\Terminal\InsertRequest $insertRequest) |
84 | 84 | { |
85 | - try{ |
|
86 | - $response = $this->_httpClient->post(__FUNCTION__,[ |
|
85 | + try { |
|
86 | + $response = $this->_httpClient->post(__FUNCTION__, [ |
|
87 | 87 | 'body' => json_encode($insertRequest) |
88 | 88 | ]); |
89 | 89 | |
@@ -93,8 +93,8 @@ discard block |
||
93 | 93 | ); |
94 | 94 | }catch (RequestException $ex) { |
95 | 95 | $responseBody = $ex->getResponse()->json(); |
96 | - throw new \Exception($responseBody['message']); |
|
97 | - }catch (\Exception $ex){ |
|
96 | + throw new \Exception($responseBody[ 'message' ]); |
|
97 | + }catch (\Exception $ex) { |
|
98 | 98 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
99 | 99 | } |
100 | 100 | } |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | $response->json(), |
41 | 41 | Contracts\Login\LoginResponse::class |
42 | 42 | ); |
43 | - }catch (RequestException $ex) { |
|
43 | + } catch (RequestException $ex) { |
|
44 | 44 | $responseBody = $ex->getResponse()->json(); |
45 | 45 | throw new \Exception($responseBody['message']); |
46 | - }catch (\Exception $ex){ |
|
46 | + } catch (\Exception $ex){ |
|
47 | 47 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
48 | 48 | } |
49 | 49 | } |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | $this->_httpClient->post(__FUNCTION__,[]); |
59 | 59 | |
60 | 60 | return true; |
61 | - }catch (RequestException $ex) { |
|
61 | + } catch (RequestException $ex) { |
|
62 | 62 | $responseBody = $ex->getResponse()->json(); |
63 | 63 | throw new \Exception($responseBody['message']); |
64 | - }catch (\Exception $ex){ |
|
64 | + } catch (\Exception $ex){ |
|
65 | 65 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
66 | 66 | } |
67 | 67 | } |
@@ -82,10 +82,10 @@ discard block |
||
82 | 82 | $response->json(), |
83 | 83 | Contracts\Login\ConsultaLoginResponse::class |
84 | 84 | ); |
85 | - }catch (RequestException $ex) { |
|
85 | + } catch (RequestException $ex) { |
|
86 | 86 | $responseBody = $ex->getResponse()->json(); |
87 | 87 | throw new \Exception($responseBody['message']); |
88 | - }catch (\Exception $ex){ |
|
88 | + } catch (\Exception $ex){ |
|
89 | 89 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
90 | 90 | } |
91 | 91 | } |
@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function getByAtivosByPessoaId($pessoaId) |
32 | 32 | { |
33 | - try{ |
|
34 | - $response = $this->_httpClient->get(__FUNCTION__,[ |
|
33 | + try { |
|
34 | + $response = $this->_httpClient->get(__FUNCTION__, [ |
|
35 | 35 | 'query' => $this->addQueryAdditionalParameters([ |
36 | 36 | 'pessoaId' => $pessoaId |
37 | 37 | ]) |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | ); |
44 | 44 | }catch (RequestException $ex) { |
45 | 45 | $responseBody = $ex->getResponse()->json(); |
46 | - throw new \Exception($responseBody['message']); |
|
47 | - }catch (\Exception $ex){ |
|
46 | + throw new \Exception($responseBody[ 'message' ]); |
|
47 | + }catch (\Exception $ex) { |
|
48 | 48 | throw new \Exception($ex->getMessage(), $ex->getCode(), $ex); |
49 | 49 | } |
50 | 50 | } |
@@ -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 | } |