@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public function delete($endpoint, array $parameters = array()) |
| 109 | 109 | { |
| 110 | - return $this->execute("DELETE", sprintf("%s%s", $this->host, $endpoint) . "/", $parameters); |
|
| 110 | + return $this->execute("DELETE", sprintf("%s%s", $this->host, $endpoint)."/", $parameters); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | // Check if the access token needs to be added |
| 156 | 156 | if ($this->access_token != null) { |
| 157 | 157 | $headers = array_merge($headers, array( |
| 158 | - "Authorization: Bearer " . $this->access_token, |
|
| 158 | + "Authorization: Bearer ".$this->access_token, |
|
| 159 | 159 | //"Content-type: application/x-www-form-urlencoded; charset=UTF-8", |
| 160 | 160 | "Content-Type:multipart/form-data" |
| 161 | 161 | )); |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | // Check if we have a valid response |
| 215 | 215 | if (!$response_data || $ch->hasErrors()) { |
| 216 | - throw new PinterestException('Error: execute() - cURL error: ' . $ch->getErrors(), $ch->getErrorNumber()); |
|
| 216 | + throw new PinterestException('Error: execute() - cURL error: '.$ch->getErrors(), $ch->getErrorNumber()); |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | // Initiate the response |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | // Check the response code |
| 223 | 223 | if ($response->getResponseCode() >= 400) { |
| 224 | - throw new PinterestException('Pinterest error (code: ' . $response->getResponseCode() . ') with message: ' . $response->getMessage(), $response->getResponseCode()); |
|
| 224 | + throw new PinterestException('Pinterest error (code: '.$response->getResponseCode().') with message: '.$response->getMessage(), $response->getResponseCode()); |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | // Get headers from last request |
@@ -187,8 +187,7 @@ |
||
| 187 | 187 | |
| 188 | 188 | if (!class_exists("\CURLFile") && defined('CURLOPT_SAFE_UPLOAD')) { |
| 189 | 189 | $ch->setOption(CURLOPT_SAFE_UPLOAD, false); |
| 190 | - } |
|
| 191 | - elseif (class_exists("\CURLFile") && defined('CURLOPT_SAFE_UPLOAD')) { |
|
| 190 | + } elseif (class_exists("\CURLFile") && defined('CURLOPT_SAFE_UPLOAD')) { |
|
| 192 | 191 | $ch->setOption(CURLOPT_SAFE_UPLOAD, true); |
| 193 | 192 | } |
| 194 | 193 | |