@@ -25,7 +25,7 @@ discard block |
||
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 |
||
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 |
||
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 | |
140 | 140 | // Add custom method |
141 | 141 | if (in_array($method, [ |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | // Add body params |
151 | - if (! empty($jsonBody)) { |
|
151 | + if (!empty($jsonBody)) { |
|
152 | 152 | curl_setopt($curl, CURLOPT_POST, 1); |
153 | 153 | curl_setopt($curl, CURLOPT_POSTFIELDS, is_string($jsonBody) ? $jsonBody : json_encode($jsonBody)); |
154 | 154 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | } |
179 | 179 | |
180 | 180 | $responseDecode = json_decode($response, true); |
181 | - if(is_null($responseDecode)){ |
|
181 | + if (is_null($responseDecode)) { |
|
182 | 182 | $responseDecode = ['status_code' => $statusCode]; |
183 | 183 | } else { |
184 | 184 | array_push($responseDecode, ['status_code' => $statusCode]); |