Completed
Push — master ( 924818...a51019 )
by Adriano
02:59
created
src/Integracao/ControlPay/Contracts/IntencaoVenda/GetByIdResponse.php 1 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/AbstractAPI.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,8 +55,9 @@  discard block
 block discarded – undo
55 55
         $this->endpoint = $endpoint;
56 56
         $this->_client = $client;
57 57
 
58
-        if(is_null($this->_client))
59
-            $this->_client = new Client();
58
+        if(is_null($this->_client)) {
59
+                    $this->_client = new Client();
60
+        }
60 61
 
61 62
         $this->query = new GuzzleHttp\Query();
62 63
         $this->query->setEncodingType(false);
@@ -98,11 +99,13 @@  discard block
 block discarded – undo
98 99
     {
99 100
         $this->query = new GuzzleHttp\Query();
100 101
 
101
-        if(isset($this->_httpClient->getDefaultOption()['query']))
102
-            $this->query = $this->_httpClient->getDefaultOption()['query'];
102
+        if(isset($this->_httpClient->getDefaultOption()['query'])) {
103
+                    $this->query = $this->_httpClient->getDefaultOption()['query'];
104
+        }
103 105
 
104
-        foreach ($params as $key => $value)
105
-            $this->query->set($key, $value);
106
+        foreach ($params as $key => $value) {
107
+                    $this->query->set($key, $value);
108
+        }
106 109
 
107 110
         return $this->query;
108 111
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Impl/BasicAuthentication.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@
 block discarded – undo
47 47
     {
48 48
         throw new \Exception("Basic authenticanão não é suportado pela api por enquanto");
49 49
 
50
-        if(!empty($this->key))
51
-            return sprintf("Basic %s", $this->key);
50
+        if(!empty($this->key)) {
51
+                    return sprintf("Basic %s", $this->key);
52
+        }
52 53
 
53 54
         return sprintf("Basic %s", base64_encode(sprintf("%s:%s", $this->user, $this->password)));
54 55
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Impl/KeyQueryStringAuthentication.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@
 block discarded – undo
52 52
      */
53 53
     public function getAuthorization()
54 54
     {
55
-        if(!empty($this->key))
56
-            return $this->key;
55
+        if(!empty($this->key)) {
56
+                    return $this->key;
57
+        }
57 58
 
58 59
         $response = $this->_loginApi->login(
59 60
             (new LoginRequest())
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Model/Terminal.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,8 +92,9 @@  discard block
 block discarded – undo
92 92
     {
93 93
         $this->impressora = $impressora;
94 94
 
95
-        if(is_array($this->impressora))
96
-            $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
95
+        if(is_array($this->impressora)) {
96
+                    $this->impressora = SerializerHelper::denormalize($this->impressora, Impressora::class);
97
+        }
97 98
 
98 99
         return $this;
99 100
     }
@@ -114,8 +115,9 @@  discard block
 block discarded – undo
114 115
     {
115 116
         $this->pessoa = $pessoa;
116 117
 
117
-        if(is_array($this->pessoa))
118
-            $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
118
+        if(is_array($this->pessoa)) {
119
+                    $this->pessoa = SerializerHelper::denormalize($this->pessoa, Pessoa::class);
120
+        }
119 121
 
120 122
         return $this;
121 123
     }
Please login to merge, or discard this patch.
src/Integracao/ControlPay/Contracts/Venda/ConsultarVendasResponse.php 1 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 1 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 1 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 1 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.