Completed
Push — master ( 924818...a51019 )
by Adriano
02:59
created
src/Integracao/ControlPay/Contracts/Venda/ConsultarVendasResponse.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,9 @@
 block discarded – undo
61 61
     public function setIntencoesVendas($intencoesVendas)
62 62
     {
63 63
 
64
-        foreach ($intencoesVendas as $intencaoVenda)
65
-            $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class);
64
+        foreach ($intencoesVendas as $intencaoVenda) {
65
+                    $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class);
66
+        }
66 67
 
67 68
         return $this;
68 69
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Terminal/GetByIdResponse.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data);
46 46
 
47
-        if(!$this->data)
47
+        if (!$this->data)
48 48
             $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
49 49
 
50 50
         return $this;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         $this->terminal = $terminal;
68 68
 
69
-        if(is_array($this->terminal))
69
+        if (is_array($this->terminal))
70 70
             $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
71 71
 
72 72
         return $this;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,8 +44,9 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $this->data = \DateTime::createFromFormat('d/m/Y H:i:s.u', $data);
46 46
 
47
-        if(!$this->data)
48
-            $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
47
+        if(!$this->data) {
48
+                    $this->data = \DateTime::createFromFormat('d/m/Y H:i:s', $data);
49
+        }
49 50
 
50 51
         return $this;
51 52
     }
@@ -66,8 +67,9 @@  discard block
 block discarded – undo
66 67
     {
67 68
         $this->terminal = $terminal;
68 69
 
69
-        if(is_array($this->terminal))
70
-            $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
70
+        if(is_array($this->terminal)) {
71
+                    $this->terminal = SerializerHelper::denormalize($this->terminal, Terminal::class);
72
+        }
71 73
 
72 74
         return $this;
73 75
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/IntencaoVenda/GetByFiltrosResponse.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,9 @@
 block discarded – undo
61 61
     public function setIntencoesVendas($intencoesVendas)
62 62
     {
63 63
 
64
-        foreach ($intencoesVendas as $intencaoVenda)
65
-            $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class);
64
+        foreach ($intencoesVendas as $intencaoVenda) {
65
+                    $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class);
66
+        }
66 67
 
67 68
         return $this;
68 69
     }
Please login to merge, or discard this patch.
Integracao/ControlPay/Contracts/IntencaoVenda/GetByIntegracaoIdResponse.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,9 @@
 block discarded – undo
61 61
     public function setIntencoesVendas($intencoesVendas)
62 62
     {
63 63
 
64
-        foreach ($intencoesVendas as $intencaoVenda)
65
-            $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class);
64
+        foreach ($intencoesVendas as $intencaoVenda) {
65
+                    $this->intencoesVendas[] = SerializerHelper::denormalize($intencaoVenda, IntencaoVenda::class);
66
+        }
66 67
 
67 68
         return $this;
68 69
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/IntencaoVendaApi.php 2 patches
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.
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
                 $response->json(),
46 46
                 Contracts\Venda\VenderResponse::class
47 47
             );
48
-        }catch (RequestException $ex) {
48
+        } catch (RequestException $ex) {
49 49
             $responseBody = $ex->getResponse()->json();
50 50
             throw new \Exception($responseBody['message']);
51
-        }catch (\Exception $ex){
51
+        } catch (\Exception $ex){
52 52
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
53 53
         }
54 54
     }
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
                 $response->json(),
73 73
                 Contracts\Venda\ConsultarVendasResponse::class
74 74
             );
75
-        }catch (RequestException $ex) {
75
+        } catch (RequestException $ex) {
76 76
             $responseBody = $ex->getResponse()->json();
77 77
             var_dump($responseBody);
78 78
             throw new \Exception($responseBody['message']);
79
-        }catch (\Exception $ex){
79
+        } catch (\Exception $ex){
80 80
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
81 81
         }
82 82
     }
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.