@@ -19,11 +19,11 @@ |
||
| 19 | 19 | { |
| 20 | 20 | parent::register(); |
| 21 | 21 | |
| 22 | - if (class_exists('Laravel\Lumen\Application') && ! defined('SOCIALITEPROVIDERS_STATELESS')) { |
|
| 22 | + if (class_exists('Laravel\Lumen\Application') && !defined('SOCIALITEPROVIDERS_STATELESS')) { |
|
| 23 | 23 | define('SOCIALITEPROVIDERS_STATELESS', true); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - $this->app->singleton(ConfigRetrieverInterface::class, function () { |
|
| 26 | + $this->app->singleton(ConfigRetrieverInterface::class, function() { |
|
| 27 | 27 | return new ConfigRetriever(); |
| 28 | 28 | }); |
| 29 | 29 | } |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | { |
| 25 | 25 | // check manually if a key is given and if it exists in the config |
| 26 | 26 | // this has to be done to check for spoofed additional config keys so that null isn't returned |
| 27 | - if (! empty($key) && empty($this->config[$key])) { |
|
| 27 | + if (!empty($key) && empty($this->config[$key])) { |
|
| 28 | 28 | return $default; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function user() |
| 37 | 37 | { |
| 38 | - if (! $this->hasNecessaryVerifier()) { |
|
| 38 | + if (!$this->hasNecessaryVerifier()) { |
|
| 39 | 39 | throw new \InvalidArgumentException('Invalid request. Missing OAuth verifier.'); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | if ($user instanceof User) { |
| 50 | 50 | parse_str($token['credentialsResponseBody'], $credentialsResponseBody); |
| 51 | 51 | |
| 52 | - if (! $credentialsResponseBody || ! is_array($credentialsResponseBody)) { |
|
| 52 | + if (!$credentialsResponseBody || !is_array($credentialsResponseBody)) { |
|
| 53 | 53 | throw new CredentialsException('Unable to parse token credentials response.'); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public function redirect() |
| 85 | 85 | { |
| 86 | - if (! $this->isStateless()) { |
|
| 86 | + if (!$this->isStateless()) { |
|
| 87 | 87 | $this->request->getSession()->put( |
| 88 | 88 | 'oauth.temp', $temp = $this->server->getTemporaryCredentials() |
| 89 | 89 | ); |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | protected function getToken() |
| 104 | 104 | { |
| 105 | - if (! $this->isStateless()) { |
|
| 105 | + if (!$this->isStateless()) { |
|
| 106 | 106 | $temp = $this->request->getSession()->get('oauth.temp'); |
| 107 | 107 | |
| 108 | 108 | return $this->server->getTokenCredentials( |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $socialite->extend( |
| 63 | 63 | $providerName, |
| 64 | - function () use ($socialite, $providerName, $providerClass, $oauth1Server) { |
|
| 64 | + function() use ($socialite, $providerName, $providerClass, $oauth1Server) { |
|
| 65 | 65 | $provider = $this->buildProvider($socialite, $providerName, $providerClass, $oauth1Server); |
| 66 | 66 | if (defined('SOCIALITEPROVIDERS_STATELESS') && SOCIALITEPROVIDERS_STATELESS) { |
| 67 | 67 | return $provider->stateless(); |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | private function isOAuth1($oauth1Server) |
| 175 | 175 | { |
| 176 | - return ! empty($oauth1Server); |
|
| 176 | + return !empty($oauth1Server); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /** |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | */ |
| 197 | 197 | private function classExists($providerClass) |
| 198 | 198 | { |
| 199 | - if (! class_exists($providerClass)) { |
|
| 199 | + if (!class_exists($providerClass)) { |
|
| 200 | 200 | throw new InvalidArgumentException("{$providerClass} doesn't exist"); |
| 201 | 201 | } |
| 202 | 202 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $this->getFromServices('client_id'), |
| 48 | 48 | $this->getFromServices('client_secret'), |
| 49 | 49 | $this->getFromServices('redirect'), |
| 50 | - $this->getConfigItems($additionalConfigKeys, function ($key) { |
|
| 50 | + $this->getConfigItems($additionalConfigKeys, function($key) { |
|
| 51 | 51 | return $this->getFromServices(strtolower($key)); |
| 52 | 52 | }) |
| 53 | 53 | ); |
@@ -97,12 +97,12 @@ discard block |
||
| 97 | 97 | $keyExists = array_key_exists($key, $this->servicesArray); |
| 98 | 98 | |
| 99 | 99 | // ADDITIONAL value is empty |
| 100 | - if (! $keyExists && $this->isAdditionalConfig($key)) { |
|
| 100 | + if (!$keyExists && $this->isAdditionalConfig($key)) { |
|
| 101 | 101 | return; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | // REQUIRED value is empty |
| 105 | - if (! $keyExists) { |
|
| 105 | + if (!$keyExists) { |
|
| 106 | 106 | throw new MissingConfigException("Missing services entry for {$this->providerName}.$key"); |
| 107 | 107 | } |
| 108 | 108 | |