@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | */ |
| 158 | 158 | public function getSiteUrl($endpoint = '', array $query = array()) |
| 159 | 159 | { |
| 160 | - if(count($query) != '0') { |
|
| 160 | + if (count($query) != '0') { |
|
| 161 | 161 | $endpoint .= '&'.http_build_query($query); |
| 162 | 162 | } |
| 163 | 163 | |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | //being sent versus what's expected to be sent. So we remove them and prepare for |
| 221 | 221 | //query usage |
| 222 | 222 | $query = array(); |
| 223 | - if(strtolower($method)== 'get') { |
|
| 223 | + if (strtolower($method) == 'get') { |
|
| 224 | 224 | $query = $payload; |
| 225 | 225 | $payload = array(); |
| 226 | 226 | } |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | $request = new Request($method, $endpoint, $payload); |
| 230 | 230 | $headers = $request->sign($token, 'm62_auth_'); |
| 231 | 231 | |
| 232 | - if(strtolower($method)== 'get') { |
|
| 232 | + if (strtolower($method) == 'get') { |
|
| 233 | 233 | $payload = array(); |
| 234 | 234 | } |
| 235 | 235 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | { |
| 262 | 262 | $ch = $this->getCurlHandle(); |
| 263 | 263 | $parsed_headers = array(); |
| 264 | - foreach($headers AS $key => $value) { |
|
| 264 | + foreach ($headers AS $key => $value) { |
|
| 265 | 265 | $parsed_headers[] = $key.': '.$value; |
| 266 | 266 | } |
| 267 | 267 | |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | $json_payload = json_encode($payload); |
| 281 | 281 | |
| 282 | 282 | $options[CURLOPT_POSTFIELDS] = $json_payload; |
| 283 | - $parsed_headers[] = 'Content-Length: ' . strlen($json_payload); |
|
| 283 | + $parsed_headers[] = 'Content-Length: '.strlen($json_payload); |
|
| 284 | 284 | $parsed_headers[] = 'Content-Type: application/json'; |
| 285 | 285 | $options[CURLOPT_HTTPHEADER] = $parsed_headers; |
| 286 | 286 | } |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | $this->debug_info = curl_getinfo($ch); |
| 298 | 298 | |
| 299 | 299 | if ($response_raw === false) { |
| 300 | - throw new \RuntimeException('Request Error: ' . curl_error($ch)); |
|
| 300 | + throw new \RuntimeException('Request Error: '.curl_error($ch)); |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | curl_getinfo($ch, CURLINFO_HTTP_CODE); |