@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | { |
| 172 | 172 | $method = $this->formatMethod($method); |
| 173 | 173 | |
| 174 | - $url = $this->api_endpoint . $method . '.' . $this->format; |
|
| 174 | + $url = $this->api_endpoint.$method.'.'.$this->format; |
|
| 175 | 175 | |
| 176 | 176 | $response = $this->prepareStateForRequest($http_verb, $method, $url, $timeout); |
| 177 | 177 | |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | ]; |
| 182 | 182 | |
| 183 | 183 | if (isset($args["language"])) { |
| 184 | - $httpHeader[] = "Accept-Language: " . $args["language"]; |
|
| 184 | + $httpHeader[] = "Accept-Language: ".$args["language"]; |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | $ch = curl_init(); |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | curl_setopt($ch, CURLOPT_USERAGENT, |
| 191 | 191 | 'CliveWalkden/CampaignMonitor-API/3.1 (github.com/clivewalkden/campaign-monitor-api)'); |
| 192 | 192 | curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); |
| 193 | - curl_setopt($ch, CURLOPT_USERPWD, $this->api_key . ':nopass'); |
|
| 193 | + curl_setopt($ch, CURLOPT_USERPWD, $this->api_key.':nopass'); |
|
| 194 | 194 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
| 195 | 195 | curl_setopt($ch, CURLOPT_VERBOSE, true); |
| 196 | 196 | curl_setopt($ch, CURLOPT_HEADER, true); |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | case 'get': |
| 215 | 215 | $query = http_build_query($args, '', '&'); |
| 216 | - curl_setopt($ch, CURLOPT_URL, $url . '?' . $query); |
|
| 216 | + curl_setopt($ch, CURLOPT_URL, $url.'?'.$query); |
|
| 217 | 217 | break; |
| 218 | 218 | |
| 219 | 219 | case 'delete': |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | case 'put': |
| 229 | 229 | if ($args['email']) { |
| 230 | 230 | $query = http_build_query(['email' => $args['email']], '', '&'); |
| 231 | - curl_setopt($ch, CURLOPT_URL, $url . '?' . $query); |
|
| 231 | + curl_setopt($ch, CURLOPT_URL, $url.'?'.$query); |
|
| 232 | 232 | } |
| 233 | 233 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); |
| 234 | 234 | $this->attachRequestPayload($ch, $args); |
@@ -412,11 +412,11 @@ discard block |
||
| 412 | 412 | private function findHTTPStatus($response, $formattedResponse) |
| 413 | 413 | { |
| 414 | 414 | if (!empty($response['headers']) && isset($response['headers']['http_code'])) { |
| 415 | - return (int)$response['headers']['http_code']; |
|
| 415 | + return (int) $response['headers']['http_code']; |
|
| 416 | 416 | } |
| 417 | 417 | |
| 418 | 418 | if (!empty($response['body']) && isset($formattedResponse['status'])) { |
| 419 | - return (int)$formattedResponse['status']; |
|
| 419 | + return (int) $formattedResponse['status']; |
|
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | return 418; |