Passed
Push — main ( 16bfb3...e20955 )
by Leandro
01:42
created
src/Itau/API/Request.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function __construct(Itau $credentials)
27 27
     {
28
-        if (! $credentials->getAuthorizationToken()) {
28
+        if (!$credentials->getAuthorizationToken()) {
29 29
             $this->auth($credentials);
30 30
         }
31 31
     }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             ];
87 87
         }
88 88
 
89
-        if (! $response) {
89
+        if (!$response) {
90 90
             throw new ItauException("Empty response, curl_error: $errorMessage", $statusCode);
91 91
         }
92 92
 
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
             CURLOPT_SSL_VERIFYPEER => 0
135 135
         );
136 136
 
137
-        $defaultCurlOptions[CURLOPT_HTTPHEADER][] = 'Authorization: Bearer ' . $credentials->getAuthorizationToken();
138
-        $defaultCurlOptions[CURLOPT_HTTPHEADER][] = 'x-itau-apikey: ' . $credentials->getClientId();
137
+        $defaultCurlOptions[CURLOPT_HTTPHEADER][] = 'Authorization: Bearer '.$credentials->getAuthorizationToken();
138
+        $defaultCurlOptions[CURLOPT_HTTPHEADER][] = 'x-itau-apikey: '.$credentials->getClientId();
139 139
         $defaultCurlOptions[CURLOPT_HTTPHEADER][] = 'x-itau-correlationID: 2';
140 140
 
141 141
         // Add custom method
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         }
150 150
 
151 151
         // Add body params
152
-        if (! empty($jsonBody)) {
152
+        if (!empty($jsonBody)) {
153 153
             curl_setopt($curl, CURLOPT_POST, 1);
154 154
             curl_setopt($curl, CURLOPT_POSTFIELDS, is_string($jsonBody) ? $jsonBody : json_encode($jsonBody));
155 155
         }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         }
180 180
 
181 181
         $responseDecode = json_decode($response, true);
182
-        if(is_null($responseDecode)){
182
+        if (is_null($responseDecode)) {
183 183
             $responseDecode = ['status_code' => $statusCode];
184 184
         } else {
185 185
             array_push($responseDecode, ['status_code' => $statusCode]);
Please login to merge, or discard this patch.