Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
updates for file exist checking
Browse files Browse the repository at this point in the history
  • Loading branch information
dmzoneill committed May 2, 2018
1 parent 731d6ab commit f4382d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions php-binance-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private function setupApiConfigFromFile(string $file = null)
return;
}
if (file_exists($file) === false) {
die( "Unable to load config from: " . $file . PHP_EOL );
die("Unable to load config from: " . $file . PHP_EOL);
}
$contents = json_decode(file_get_contents($file), true);
$this->api_key = isset($contents['api-key']) ? $contents['api-key'] : "";
Expand All @@ -146,7 +146,7 @@ private function setupCurlOptsFromFile(string $file = null)
return;
}
if (file_exists($file) === false) {
die( "Unable to load config from: " . $file . PHP_EOL );
die("Unable to load config from: " . $file . PHP_EOL);
}
$contents = json_decode(file_get_contents($file), true);
$this->curlOpts = isset($contents['curlOpts']) && is_array($contents['curlOpts']) ? $contents['curlOpts'] : [];
Expand All @@ -167,7 +167,7 @@ private function setupProxyConfigFromFile(string $file = null)
return;
}
if (file_exists($file) === false) {
die( "Unable to load config from: " . $file . PHP_EOL );
die("Unable to load config from: " . $file . PHP_EOL);
}
$contents = json_decode(file_get_contents($file), true);
if (isset($contents['proto']) === false) {
Expand Down

0 comments on commit f4382d9

Please sign in to comment.