|
@@ -121,7 +121,7 @@ discard block |
|
|
block discarded – undo |
|
121
|
121
|
*/ |
|
122
|
122
|
public function delete($endpoint, array $parameters = array()) |
|
123
|
123
|
{ |
|
124
|
|
- return $this->execute("DELETE", sprintf("%s%s", $this->host, $endpoint) . "/", $parameters); |
|
|
124
|
+ return $this->execute("DELETE", sprintf("%s%s", $this->host, $endpoint)."/", $parameters); |
|
125
|
125
|
} |
|
126
|
126
|
|
|
127
|
127
|
/** |
|
@@ -171,7 +171,7 @@ discard block |
|
|
block discarded – undo |
|
171
|
171
|
// Check if the access token needs to be added |
|
172
|
172
|
if ($this->access_token != null) { |
|
173
|
173
|
$headers = array_merge($headers, array( |
|
174
|
|
- "Authorization: Bearer " . $this->access_token, |
|
|
174
|
+ "Authorization: Bearer ".$this->access_token, |
|
175
|
175
|
)); |
|
176
|
176
|
} |
|
177
|
177
|
|
|
@@ -234,8 +234,8 @@ discard block |
|
|
block discarded – undo |
|
234
|
234
|
if ($response_data === false && !$ch->hasErrors()) { |
|
235
|
235
|
throw new CurlException("Error: Curl request failed"); |
|
236
|
236
|
} |
|
237
|
|
- else if($ch->hasErrors()) { |
|
238
|
|
- throw new PinterestException('Error: execute() - cURL error: ' . $ch->getErrors(), $ch->getErrorNumber()); |
|
|
237
|
+ else if ($ch->hasErrors()) { |
|
|
238
|
+ throw new PinterestException('Error: execute() - cURL error: '.$ch->getErrors(), $ch->getErrorNumber()); |
|
239
|
239
|
} |
|
240
|
240
|
|
|
241
|
241
|
// Initiate the response |
|
@@ -243,7 +243,7 @@ discard block |
|
|
block discarded – undo |
|
243
|
243
|
|
|
244
|
244
|
// Check the response code |
|
245
|
245
|
if ($response->getResponseCode() >= 400) { |
|
246
|
|
- throw new PinterestException('Pinterest error (code: ' . $response->getResponseCode() . ') with message: ' . (is_array($response->getMessage()) ? implode(' ', $response->getMessage()) : $response->getMessage()), $response->getResponseCode()); |
|
|
246
|
+ throw new PinterestException('Pinterest error (code: '.$response->getResponseCode().') with message: '.(is_array($response->getMessage()) ? implode(' ', $response->getMessage()) : $response->getMessage()), $response->getResponseCode()); |
|
247
|
247
|
} |
|
248
|
248
|
|
|
249
|
249
|
// Get headers from last request |