@@ -54,10 +54,10 @@ |
||
54 | 54 | { |
55 | 55 | $app = new App('id', 'secret', 'http://test.domain'); |
56 | 56 | $url = $app->getAuthURL('process.php', 'error.php', 'challenge'); |
57 | - $expect = 'http://test.domain/oauth/code?app_id=id&process_url=' . |
|
58 | - urlencode('process.php') . |
|
59 | - '&error_url=' . urlencode('error.php') . |
|
60 | - '&challenge=' . Utils::pack('challenge'); |
|
57 | + $expect = 'http://test.domain/oauth/code?app_id=id&process_url='. |
|
58 | + urlencode('process.php'). |
|
59 | + '&error_url='.urlencode('error.php'). |
|
60 | + '&challenge='.Utils::pack('challenge'); |
|
61 | 61 | |
62 | 62 | $this->assertEquals($expect, $url); |
63 | 63 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | public function __construct(string $app_id, string $app_secret, $auth_domain = self::AUTH_DOMAIN) |
23 | 23 | { |
24 | 24 | if (!$app_id || !$app_secret) { |
25 | - throw new InvalidArgumentException(static::class . "expects an app_id and app_secret"); |
|
25 | + throw new InvalidArgumentException(static::class."expects an app_id and app_secret"); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | $this->setAppID($app_id); |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | if (!$response->isValid() || !$json || !array_key_exists('access_token', $json)) { |
130 | 130 | return $json['access_token']; |
131 | - } else { |
|
131 | + }else { |
|
132 | 132 | return ''; |
133 | 133 | } |
134 | 134 | } |