Completed
Push — master ( 924818...a51019 )
by Adriano
02:59
created
src/Integracao/ControlPay/API/IntencaoVendaApi.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/VendaApi.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,10 +41,10 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Venda/VenderRequest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -337,7 +337,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -336,8 +336,9 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.