@@ -13,9 +13,9 @@ discard block |
||
13 | 13 | function load_credentials_from_file() |
14 | 14 | { |
15 | 15 | // Get OAuth 2.0 credentials from auth_credentials.json file. |
16 | - $credentials = file_get_contents(dirname(__FILE__) . '/auth_credentials.json'); |
|
17 | - if ($credentials===false) { |
|
18 | - throw new \Exception("Couldn't read OAuth credentials from auth_credentials.json. Make sure " . |
|
16 | + $credentials = file_get_contents(dirname(__FILE__).'/auth_credentials.json'); |
|
17 | + if ($credentials === false) { |
|
18 | + throw new \Exception("Couldn't read OAuth credentials from auth_credentials.json. Make sure ". |
|
19 | 19 | "the file exists (if not, copy from auth_credentials.json.dist)."); |
20 | 20 | } |
21 | 21 | |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | // Try to read access_token.json and merge it with the rest of credentials. |
28 | - if (is_readable(dirname(__FILE__) . '/access_token.json')) { |
|
29 | - $accessToken = file_get_contents(dirname(__FILE__) . '/access_token.json'); |
|
28 | + if (is_readable(dirname(__FILE__).'/access_token.json')) { |
|
29 | + $accessToken = file_get_contents(dirname(__FILE__).'/access_token.json'); |
|
30 | 30 | |
31 | 31 | $accessToken = json_decode($accessToken, true); |
32 | 32 | if (!is_array($accessToken)) { |