Completed
Push — master ( dc1ac5...ac28ba )
by Adriano
07:48
created
src/Integracao/ControlPay/API/VendaApi.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function vender(Contracts\Venda\VenderRequest $venderRequest)
38 38
     {
39
-        try{
40
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
39
+        try {
40
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
41 41
                 'body' => json_encode($venderRequest),
42 42
             ]);
43 43
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
             );
48 48
         }catch (RequestException $ex) {
49 49
             $responseBody = $ex->getResponse()->json();
50
-            throw new \Exception($responseBody['message']);
51
-        }catch (\Exception $ex){
50
+            throw new \Exception($responseBody[ 'message' ]);
51
+        }catch (\Exception $ex) {
52 52
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
53 53
         }
54 54
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/ProdutoApi.php 1 patch
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 getByAtivosByPessoaId($pessoaId)
32 32
     {
33
-        try{
34
-            $this->response = $this->_httpClient->get(__FUNCTION__,[
33
+        try {
34
+            $this->response = $this->_httpClient->get(__FUNCTION__, [
35 35
                 'query' => $this->addQueryAdditionalParameters([
36 36
                     'pessoaId' => $pessoaId
37 37
                 ])
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/IntencaoVenda/GetByIdResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     {
63 63
         $this->intencaoVenda = $intencaoVenda;
64 64
 
65
-        if(is_array($this->intencaoVenda))
65
+        if (is_array($this->intencaoVenda))
66 66
             $this->intencaoVenda = SerializerHelper::denormalize($this->intencaoVenda, IntencaoVenda::class);
67 67
 
68 68
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/PagamentoExternoApi.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function vender(Contracts\Venda\VenderRequest $venderRequest)
38 38
     {
39
-        try{
40
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
39
+        try {
40
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
41 41
                 'body' => json_encode($venderRequest),
42 42
             ]);
43 43
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
             );
48 48
         }catch (RequestException $ex) {
49 49
             $responseBody = $ex->getResponse()->json();
50
-            throw new \Exception($responseBody['message']);
51
-        }catch (\Exception $ex){
50
+            throw new \Exception($responseBody[ 'message' ]);
51
+        }catch (\Exception $ex) {
52 52
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
53 53
         }
54 54
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/API/IntencaoVendaApi.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function getByPessoaId($pessoaId)
32 32
     {
33
-        try{
34
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
33
+        try {
34
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
35 35
                 'query' => $this->addQueryAdditionalParameters([
36 36
                     'pessoaId' => $pessoaId
37 37
                 ])
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
56 56
      */
57 57
     public function getById($terminalId)
58 58
     {
59
-        try{
60
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
59
+        try {
60
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
61 61
                 'query' => $this->addQueryAdditionalParameters([
62 62
                     'terminalId' => $terminalId
63 63
                 ])
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
82 82
      */
83 83
     public function insert(Contracts\Terminal\InsertRequest $insertRequest)
84 84
     {
85
-        try{
86
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
85
+        try {
86
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
87 87
                 'body' => json_encode($insertRequest)
88 88
             ]);
89 89
 
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
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
     }
Please login to merge, or discard this patch.