@@ -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 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | protected $config; |
13 | 13 | |
14 | 14 | /** |
15 | - * @param \SocialiteProviders\Manager\Contracts\OAuth1\ProviderInterface|\SocialiteProviders\Manager\Contracts\OAuth2\ProviderInterface $config |
|
15 | + * @param ConfigInterface $config |
|
16 | 16 | */ |
17 | 17 | public function setConfig(ConfigInterface $config) |
18 | 18 | { |
@@ -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 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function user() |
47 | 47 | { |
48 | - if (! $this->hasNecessaryVerifier()) { |
|
48 | + if (!$this->hasNecessaryVerifier()) { |
|
49 | 49 | throw new InvalidArgumentException('Invalid request. Missing OAuth verifier.'); |
50 | 50 | } |
51 | 51 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | if ($user instanceof User) { |
60 | 60 | parse_str($token['credentialsResponseBody'], $credentialsResponseBody); |
61 | 61 | |
62 | - if (! $credentialsResponseBody || ! is_array($credentialsResponseBody)) { |
|
62 | + if (!$credentialsResponseBody || !is_array($credentialsResponseBody)) { |
|
63 | 63 | throw new CredentialsException('Unable to parse token credentials response.'); |
64 | 64 | } |
65 | 65 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function redirect() |
95 | 95 | { |
96 | - if (! $this->isStateless()) { |
|
96 | + if (!$this->isStateless()) { |
|
97 | 97 | $this->request->getSession()->put( |
98 | 98 | 'oauth.temp', $temp = $this->server->getTemporaryCredentials() |
99 | 99 | ); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | */ |
167 | 167 | protected function getToken() |
168 | 168 | { |
169 | - if (! $this->isStateless()) { |
|
169 | + if (!$this->isStateless()) { |
|
170 | 170 | $temp = $this->request->getSession()->get('oauth.temp'); |
171 | 171 | |
172 | 172 | return $this->server->getTokenCredentials( |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $this->getFromServices('client_id'), |
49 | 49 | $this->getFromServices('client_secret'), |
50 | 50 | $this->getFromServices('redirect'), |
51 | - $this->getConfigItems($additionalConfigKeys, function ($key) { |
|
51 | + $this->getConfigItems($additionalConfigKeys, function($key) { |
|
52 | 52 | return $this->getFromServices(strtolower($key)); |
53 | 53 | }) |
54 | 54 | ); |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | $keyExists = array_key_exists($key, $this->servicesArray); |
95 | 95 | |
96 | 96 | // ADDITIONAL value is empty |
97 | - if (! $keyExists && $this->isAdditionalConfig($key)) { |
|
97 | + if (!$keyExists && $this->isAdditionalConfig($key)) { |
|
98 | 98 | return $key == 'guzzle' ? [] : null; |
99 | 99 | } |
100 | 100 | |
101 | 101 | // REQUIRED value is empty |
102 | - if (! $keyExists) { |
|
102 | + if (!$keyExists) { |
|
103 | 103 | throw new MissingConfigException("Missing services entry for {$this->providerName}.$key"); |
104 | 104 | } |
105 | 105 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | { |
16 | 16 | if ($this->app instanceof \Illuminate\Foundation\Application) { |
17 | 17 | // Laravel |
18 | - $this->app->booted(function () { |
|
18 | + $this->app->booted(function() { |
|
19 | 19 | $socialiteWasCalled = app(SocialiteWasCalled::class); |
20 | 20 | |
21 | 21 | event($socialiteWasCalled); |
@@ -35,12 +35,12 @@ discard block |
||
35 | 35 | { |
36 | 36 | parent::register(); |
37 | 37 | |
38 | - if (class_exists('Laravel\Lumen\Application') && ! defined('SOCIALITEPROVIDERS_STATELESS')) { |
|
38 | + if (class_exists('Laravel\Lumen\Application') && !defined('SOCIALITEPROVIDERS_STATELESS')) { |
|
39 | 39 | define('SOCIALITEPROVIDERS_STATELESS', true); |
40 | 40 | } |
41 | 41 | |
42 | - if (! $this->app->bound(ConfigRetrieverInterface::class)) { |
|
43 | - $this->app->singleton(ConfigRetrieverInterface::class, function () { |
|
42 | + if (!$this->app->bound(ConfigRetrieverInterface::class)) { |
|
43 | + $this->app->singleton(ConfigRetrieverInterface::class, function() { |
|
44 | 44 | return new ConfigRetriever(); |
45 | 45 | }); |
46 | 46 | } |