Completed
Push — master ( dc1ac5...ac28ba )
by Adriano
07:48
created
src/Integracao/ControlPay/Impl/KeyQueryStringAuthentication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      */
53 53
     public function getAuthorization()
54 54
     {
55
-        if(!empty($this->key))
55
+        if (!empty($this->key))
56 56
             return $this->key;
57 57
 
58 58
         $response = $this->_loginApi->login(
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/Terminal.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     {
93 93
         $this->impressora = $impressora;
94 94
 
95
-        if(is_array($this->impressora))
95
+        if (is_array($this->impressora))
96 96
             $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
97 97
 
98 98
         return $this;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     {
115 115
         $this->pessoa = $pessoa;
116 116
 
117
-        if(is_array($this->pessoa))
117
+        if (is_array($this->pessoa))
118 118
             $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
119 119
 
120 120
         return $this;
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Venda/ConsultarVendasResponse.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
 
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.
src/Integracao/ControlPay/Contracts/Terminal/GetByIdResponse.php 1 patch
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.
src/Integracao/ControlPay/Contracts/IntencaoVenda/GetByFiltrosResponse.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
 
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.
Integracao/ControlPay/Contracts/IntencaoVenda/GetByIntegracaoIdResponse.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
 
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.
src/Integracao/ControlPay/Impl/BasicAuthentication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
      */
53 53
     public function getAuthorization()
54 54
     {
55
-        if(!empty($this->key))
55
+        if (!empty($this->key))
56 56
             return $this->key;
57 57
 
58 58
         $response = $this->_loginApi->login(
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Venda/VenderRequest.php 1 patch
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.
src/Integracao/ControlPay/API/LoginApi.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function login(Contracts\Login\LoginRequest $loginRequest)
33 33
     {
34
-        try{
35
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
34
+        try {
35
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
36 36
                 'body' => json_encode($loginRequest)
37 37
             ]);
38 38
 
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
             );
43 43
         }catch (RequestException $ex) {
44 44
             $responseBody = $ex->getResponse()->json();
45
-            throw new \Exception($responseBody['message']);
46
-        }catch (\Exception $ex){
45
+            throw new \Exception($responseBody[ 'message' ]);
46
+        }catch (\Exception $ex) {
47 47
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
48 48
         }
49 49
     }
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function logOut()
56 56
     {
57
-        try{
58
-            $this->response = $this->_httpClient->post(__FUNCTION__,[]);
57
+        try {
58
+            $this->response = $this->_httpClient->post(__FUNCTION__, [ ]);
59 59
 
60 60
             return true;
61 61
         }catch (RequestException $ex) {
62 62
             $responseBody = $ex->getResponse()->json();
63
-            throw new \Exception($responseBody['message']);
64
-        }catch (\Exception $ex){
63
+            throw new \Exception($responseBody[ 'message' ]);
64
+        }catch (\Exception $ex) {
65 65
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
66 66
         }
67 67
     }
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function consultaLogin(Contracts\Login\ConsultaLoginRequest $consultaLoginRequest)
75 75
     {
76
-        try{
77
-            $this->response = $this->_httpClient->post(__FUNCTION__,[
76
+        try {
77
+            $this->response = $this->_httpClient->post(__FUNCTION__, [
78 78
                 'body' => json_encode($consultaLoginRequest)
79 79
             ]);
80 80
 
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
             );
85 85
         }catch (RequestException $ex) {
86 86
             $responseBody = $ex->getResponse()->json();
87
-            throw new \Exception($responseBody['message']);
88
-        }catch (\Exception $ex){
87
+            throw new \Exception($responseBody[ 'message' ]);
88
+        }catch (\Exception $ex) {
89 89
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
90 90
         }
91 91
     }
Please login to merge, or discard this patch.