Completed
Branch master (b5c33a)
by Adriano
07:01
created
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.