@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace Lifeboat; |
4 | 4 | |
5 | -require_once __DIR__ . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'functions.php'; |
|
5 | +require_once __DIR__.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR.'functions.php'; |
|
6 | 6 | |
7 | 7 | use Lifeboat\Exceptions\BadMethodException; |
8 | 8 | use Lifeboat\Exceptions\OAuthException; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | public function curl_api(string $url, string $method = 'GET', array $data = [], array $headers = []): CurlResponse |
166 | 166 | { |
167 | 167 | $url = URL::is_absolute_url($url) ? $url |
168 | - : 'https://' . rtrim($this->getHost(), '/') . '/' . ltrim($url, '/'); |
|
168 | + : 'https://'.rtrim($this->getHost(), '/').'/'.ltrim($url, '/'); |
|
169 | 169 | |
170 | 170 | $curl = new Curl($url, $data, $headers); |
171 | 171 | |
@@ -184,6 +184,6 @@ discard block |
||
184 | 184 | */ |
185 | 185 | protected function auth_url(string $path): string |
186 | 186 | { |
187 | - return rtrim($this->_auth_domain, '/') . '/' . ltrim($path, '/'); |
|
187 | + return rtrim($this->_auth_domain, '/').'/'.ltrim($path, '/'); |
|
188 | 188 | } |
189 | 189 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | */ |
15 | 15 | class App extends Connector { |
16 | 16 | |
17 | - const CODE_URL = '/oauth/code'; |
|
17 | + const CODE_URL = '/oauth/code'; |
|
18 | 18 | |
19 | 19 | const ACCESS_TOKEN_PARAM = 'lb_app_access_token'; |
20 | 20 | const API_CHALLENGE_PARAM = 'lb_app_api_challenge'; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | public function __construct(string $app_id, string $app_secret, string $auth_domain = self::AUTH_DOMAIN) |
32 | 32 | { |
33 | 33 | if (!$app_id || !$app_secret) { |
34 | - throw new InvalidArgumentException(static::class . "expects an app_id and app_secret"); |
|
34 | + throw new InvalidArgumentException(static::class."expects an app_id and app_secret"); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | $this->setAppID($app_id); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | if (!$response->isValid() || !$json || !array_key_exists('access_token', $json)) { |
165 | 165 | if (array_key_exists('error', $json)) throw new OAuthException($json['error']); |
166 | 166 | return ''; |
167 | - } else { |
|
167 | + }else { |
|
168 | 168 | $this->setAccessToken($json['access_token']); |
169 | 169 | |
170 | 170 | if (array_key_exists('store_data', $json) && |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | |
214 | 214 | if (!$response->isValid() || !$json || !array_key_exists('access_token', $json)) { |
215 | 215 | throw new OAuthException($response->getError()); |
216 | - } else { |
|
216 | + }else { |
|
217 | 217 | $this->setAccessToken($json['access_token']); |
218 | 218 | } |
219 | 219 |