@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | { |
| 146 | 146 | $this->formatMethod($method); |
| 147 | 147 | |
| 148 | - $url = $this->api_endpoint . $method . '.' . $this->format; |
|
| 148 | + $url = $this->api_endpoint.$method.'.'.$this->format; |
|
| 149 | 149 | |
| 150 | 150 | $response = $this->prepareStateForRequest($http_verb, $method, $url, $timeout); |
| 151 | 151 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | ]; |
| 156 | 156 | |
| 157 | 157 | if (isset($args["language"])) { |
| 158 | - $httpHeader[] = "Accept-Language: " . $args["language"]; |
|
| 158 | + $httpHeader[] = "Accept-Language: ".$args["language"]; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | $ch = curl_init(); |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | curl_setopt($ch, CURLOPT_USERAGENT, |
| 165 | 165 | 'CliveWalkden/CampaignMonitor-API/3.1 (github.com/clivewalkden/campaign-monitor-api)'); |
| 166 | 166 | curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); |
| 167 | - curl_setopt($ch, CURLOPT_USERPWD, $this->api_key . ':nopass'); |
|
| 167 | + curl_setopt($ch, CURLOPT_USERPWD, $this->api_key.':nopass'); |
|
| 168 | 168 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
| 169 | 169 | curl_setopt($ch, CURLOPT_VERBOSE, true); |
| 170 | 170 | curl_setopt($ch, CURLOPT_HEADER, true); |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | case 'get': |
| 184 | 184 | $query = http_build_query($args, '', '&'); |
| 185 | - curl_setopt($ch, CURLOPT_URL, $url . '?' . $query); |
|
| 185 | + curl_setopt($ch, CURLOPT_URL, $url.'?'.$query); |
|
| 186 | 186 | break; |
| 187 | 187 | |
| 188 | 188 | case 'delete': |
@@ -377,11 +377,11 @@ discard block |
||
| 377 | 377 | private function findHTTPStatus($response, $formattedResponse) |
| 378 | 378 | { |
| 379 | 379 | if (!empty($response['headers']) && isset($response['headers']['http_code'])) { |
| 380 | - return (int)$response['headers']['http_code']; |
|
| 380 | + return (int) $response['headers']['http_code']; |
|
| 381 | 381 | } |
| 382 | 382 | |
| 383 | 383 | if (!empty($response['body']) && isset($formattedResponse['status'])) { |
| 384 | - return (int)$formattedResponse['status']; |
|
| 384 | + return (int) $formattedResponse['status']; |
|
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 | return 418; |