@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | // make sure you have them enabled on your app page at |
15 | 15 | // https://developers.eveonline.com/applications/ |
16 | 16 | $options = [ |
17 | - 'scope' => ['publicData','characterLocationRead'] // array or string |
|
17 | + 'scope' => ['publicData', 'characterLocationRead'] // array or string |
|
18 | 18 | ]; |
19 | 19 | |
20 | 20 | // If we don't have an authorization code then get one |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | |
33 | 33 | } else { |
34 | 34 | // In this example we use php native $_SESSION as data store |
35 | - if(!isset($_SESSION['token'])) |
|
35 | + if (!isset($_SESSION['token'])) |
|
36 | 36 | { |
37 | 37 | // Try to get an access token (using the authorization code grant) |
38 | 38 | $_SESSION['token'] = $provider->getAccessToken('authorization_code', [ |
39 | 39 | 'code' => $_GET['code'] |
40 | 40 | ]); |
41 | 41 | |
42 | - }elseif($_SESSION['token']->hasExpired()){ |
|
42 | + }elseif ($_SESSION['token']->hasExpired()) { |
|
43 | 43 | // This is how you refresh your access token once you have it |
44 | 44 | $new_token = $provider->getAccessToken('refresh_token', [ |
45 | 45 | 'refresh_token' => $_SESSION['token']->getRefreshToken() |
@@ -39,7 +39,7 @@ |
||
39 | 39 | 'code' => $_GET['code'] |
40 | 40 | ]); |
41 | 41 | |
42 | - }elseif($_SESSION['token']->hasExpired()){ |
|
42 | + } elseif($_SESSION['token']->hasExpired()){ |
|
43 | 43 | // This is how you refresh your access token once you have it |
44 | 44 | $new_token = $provider->getAccessToken('refresh_token', [ |
45 | 45 | 'refresh_token' => $_SESSION['token']->getRefreshToken() |
@@ -124,7 +124,7 @@ |
||
124 | 124 | /** |
125 | 125 | * Internal helper function to safe read from an array |
126 | 126 | * @param array $array |
127 | - * @param string|int $key |
|
127 | + * @param string $key |
|
128 | 128 | * @return null |
129 | 129 | */ |
130 | 130 | private function safeRead(array $array, $key) |