@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | public function setProdutos($produtos) |
205 | 205 | { |
206 | 206 | foreach ($produtos as $produto) |
207 | - $this->produtos[] = SerializerHelper::denormalize($produto, Produto::class); |
|
207 | + $this->produtos[ ] = SerializerHelper::denormalize($produto, Produto::class); |
|
208 | 208 | |
209 | 209 | return $this; |
210 | 210 | } |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | { |
442 | 442 | $this->pedidoStatus = $pedidoStatus; |
443 | 443 | |
444 | - if(is_array($this->pedidoStatus)) |
|
444 | + if (is_array($this->pedidoStatus)) |
|
445 | 445 | $this->pedidoStatus = SerializerHelper::denormalize($this->pedidoStatus, PedidoStatus::class); |
446 | 446 | |
447 | 447 | return $this; |
@@ -203,8 +203,9 @@ discard block |
||
203 | 203 | */ |
204 | 204 | public function setProdutos($produtos) |
205 | 205 | { |
206 | - foreach ($produtos as $produto) |
|
207 | - $this->produtos[] = SerializerHelper::denormalize($produto, Produto::class); |
|
206 | + foreach ($produtos as $produto) { |
|
207 | + $this->produtos[] = SerializerHelper::denormalize($produto, Produto::class); |
|
208 | + } |
|
208 | 209 | |
209 | 210 | return $this; |
210 | 211 | } |
@@ -441,8 +442,9 @@ discard block |
||
441 | 442 | { |
442 | 443 | $this->pedidoStatus = $pedidoStatus; |
443 | 444 | |
444 | - if(is_array($this->pedidoStatus)) |
|
445 | - $this->pedidoStatus = SerializerHelper::denormalize($this->pedidoStatus, PedidoStatus::class); |
|
445 | + if(is_array($this->pedidoStatus)) { |
|
446 | + $this->pedidoStatus = SerializerHelper::denormalize($this->pedidoStatus, PedidoStatus::class); |
|
447 | + } |
|
446 | 448 | |
447 | 449 | return $this; |
448 | 450 | } |
@@ -155,7 +155,7 @@ |
||
155 | 155 | return [ |
156 | 156 | 'status' => $this->status, |
157 | 157 | 'dataInicio' => empty($this->dataInicio) ? null : $this->dataInicio->format('d/m/Y H:i:s'), |
158 | - 'dataFim' => empty($this->dataFim) ? null :$this->dataFim->format('d/m/Y H:i:s'), |
|
158 | + 'dataFim' => empty($this->dataFim) ? null : $this->dataFim->format('d/m/Y H:i:s'), |
|
159 | 159 | 'tipo' => $this->tipo, |
160 | 160 | 'valorComDivergencia' => $this->valorComDivergencia, |
161 | 161 | 'referencia' => $this->referencia |
@@ -21,24 +21,24 @@ |
||
21 | 21 | */ |
22 | 22 | public static function getInstance(array $params, Client $client = null) |
23 | 23 | { |
24 | - if(!isset($params[ControlPayParameterConst::CONTROLPAY_OAUTH_TYPE])) |
|
24 | + if (!isset($params[ ControlPayParameterConst::CONTROLPAY_OAUTH_TYPE ])) |
|
25 | 25 | throw new \Exception("Tipo de autenticação não especificado"); |
26 | 26 | |
27 | - switch ($params[ControlPayParameterConst::CONTROLPAY_OAUTH_TYPE]) |
|
27 | + switch ($params[ ControlPayParameterConst::CONTROLPAY_OAUTH_TYPE ]) |
|
28 | 28 | { |
29 | 29 | case BasicAuthentication::class: |
30 | 30 | return new BasicAuthentication( |
31 | - isset($params[ControlPayParameterConst::CONTROLPAY_USER]) ?$params[ControlPayParameterConst::CONTROLPAY_USER] : null, |
|
32 | - isset($params[ControlPayParameterConst::CONTROLPAY_PWD]) ?$params[ControlPayParameterConst::CONTROLPAY_PWD] : null, |
|
33 | - isset($params[ControlPayParameterConst::CONTROLPAY_KEY]) ?$params[ControlPayParameterConst::CONTROLPAY_KEY] : null |
|
31 | + isset($params[ ControlPayParameterConst::CONTROLPAY_USER ]) ? $params[ ControlPayParameterConst::CONTROLPAY_USER ] : null, |
|
32 | + isset($params[ ControlPayParameterConst::CONTROLPAY_PWD ]) ? $params[ ControlPayParameterConst::CONTROLPAY_PWD ] : null, |
|
33 | + isset($params[ ControlPayParameterConst::CONTROLPAY_KEY ]) ? $params[ ControlPayParameterConst::CONTROLPAY_KEY ] : null |
|
34 | 34 | ); |
35 | 35 | break; |
36 | 36 | case KeyQueryStringAuthentication::class: |
37 | 37 | return new KeyQueryStringAuthentication( |
38 | - isset($params[ControlPayParameterConst::CONTROLPAY_USER]) ?$params[ControlPayParameterConst::CONTROLPAY_USER] : null, |
|
39 | - isset($params[ControlPayParameterConst::CONTROLPAY_PWD]) ?$params[ControlPayParameterConst::CONTROLPAY_PWD] : null, |
|
40 | - isset($params[ControlPayParameterConst::CONTROLPAY_KEY]) ?$params[ControlPayParameterConst::CONTROLPAY_KEY] : null, |
|
41 | - isset($params[ControlPayParameterConst::CONTROLPAY_DEFAULT_PESSOA_ID]) ?$params[ControlPayParameterConst::CONTROLPAY_DEFAULT_PESSOA_ID] : null, |
|
38 | + isset($params[ ControlPayParameterConst::CONTROLPAY_USER ]) ? $params[ ControlPayParameterConst::CONTROLPAY_USER ] : null, |
|
39 | + isset($params[ ControlPayParameterConst::CONTROLPAY_PWD ]) ? $params[ ControlPayParameterConst::CONTROLPAY_PWD ] : null, |
|
40 | + isset($params[ ControlPayParameterConst::CONTROLPAY_KEY ]) ? $params[ ControlPayParameterConst::CONTROLPAY_KEY ] : null, |
|
41 | + isset($params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_PESSOA_ID ]) ? $params[ ControlPayParameterConst::CONTROLPAY_DEFAULT_PESSOA_ID ] : null, |
|
42 | 42 | $client |
43 | 43 | ); |
44 | 44 | break; |
@@ -21,8 +21,9 @@ |
||
21 | 21 | */ |
22 | 22 | public static function getInstance(array $params, Client $client = null) |
23 | 23 | { |
24 | - if(!isset($params[ControlPayParameterConst::CONTROLPAY_OAUTH_TYPE])) |
|
25 | - throw new \Exception("Tipo de autenticação não especificado"); |
|
24 | + if(!isset($params[ControlPayParameterConst::CONTROLPAY_OAUTH_TYPE])) { |
|
25 | + throw new \Exception("Tipo de autenticação não especificado"); |
|
26 | + } |
|
26 | 27 | |
27 | 28 | switch ($params[ControlPayParameterConst::CONTROLPAY_OAUTH_TYPE]) |
28 | 29 | { |