summaryrefslogtreecommitdiffstats
path: root/library/Director/RestApi/RestApiClient.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Director/RestApi/RestApiClient.php')
-rw-r--r--library/Director/RestApi/RestApiClient.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/library/Director/RestApi/RestApiClient.php b/library/Director/RestApi/RestApiClient.php
index 2ebc4d4..6dcf93c 100644
--- a/library/Director/RestApi/RestApiClient.php
+++ b/library/Director/RestApi/RestApiClient.php
@@ -8,7 +8,6 @@ use RuntimeException;
class RestApiClient
{
- /** @var resource */
private $curl;
/** @var string HTTP or HTTPS */
@@ -287,7 +286,7 @@ class RestApiClient
if ($statusCode >= 400) {
throw new RuntimeException(
- "Got $statusCode: " . \var_export($res, 1)
+ "Got $statusCode: " . \var_export($res, true)
);
}
@@ -295,14 +294,14 @@ class RestApiClient
}
/**
- * @return resource
+ * @throws RuntimeException
*/
protected function curl()
{
if ($this->curl === null) {
- $this->curl = \curl_init(\sprintf('https://%s:%d', $this->host, $this->port));
+ $this->curl = curl_init(sprintf('https://%s:%d', $this->host, $this->port));
if (! $this->curl) {
- throw new RuntimeException('CURL INIT ERROR: ' . \curl_error($this->curl));
+ throw new RuntimeException('CURL INIT FAILED');
}
}