@@ -398,8 +398,8 @@ |
||
398 | 398 | } |
399 | 399 | |
400 | 400 | /** |
401 | - * @param array $curlopts |
|
402 | - */ |
|
401 | + * @param array $curlopts |
|
402 | + */ |
|
403 | 403 | public function setCurlOpts($curlopts) |
404 | 404 | { |
405 | 405 | $this->curlopts = $curlopts; |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | if (extension_loaded('curl')) { |
422 | 422 | $ch = curl_init(); |
423 | 423 | if (!$ch) { |
424 | - throw new \RuntimeException('Unhandled curl error: ' . curl_error($ch)); |
|
424 | + throw new \RuntimeException('Unhandled curl error: '.curl_error($ch)); |
|
425 | 425 | } |
426 | 426 | $timeout = 10; |
427 | 427 | |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | $cookiefile = tmpfile(); |
430 | 430 | $cookiefilepath = stream_get_meta_data($cookiefile)['uri']; |
431 | 431 | |
432 | - foreach ($this->curlopts as $opt => $value){ |
|
432 | + foreach ($this->curlopts as $opt => $value) { |
|
433 | 433 | curl_setopt($ch, $opt, $value); |
434 | 434 | } |
435 | 435 | curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); |
@@ -446,17 +446,17 @@ discard block |
||
446 | 446 | curl_setopt($ch, CURLOPT_POST, 1); |
447 | 447 | curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); |
448 | 448 | curl_setopt($ch, CURLOPT_HTTPHEADER, [ |
449 | - 'Content-type: ' . $contentType, |
|
450 | - 'Content-length: ' . mb_strlen($payload), |
|
449 | + 'Content-type: '.$contentType, |
|
450 | + 'Content-length: '.mb_strlen($payload), |
|
451 | 451 | ]); |
452 | 452 | } |
453 | 453 | $data = curl_exec($ch); |
454 | 454 | if ($data === false) { |
455 | - throw new \RuntimeException('Unhandled curl error: ' . curl_error($ch)); |
|
455 | + throw new \RuntimeException('Unhandled curl error: '.curl_error($ch)); |
|
456 | 456 | } |
457 | 457 | $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE); |
458 | 458 | if ($httpcode < 200 || $httpcode >= 300) { |
459 | - throw new BadResponseException('Bad response, HTTP code: ' . $httpcode); |
|
459 | + throw new BadResponseException('Bad response, HTTP code: '.$httpcode); |
|
460 | 460 | } |
461 | 461 | curl_close($ch); |
462 | 462 | unset($ch); |