@@ -56,7 +56,7 @@ |
||
| 56 | 56 | return null; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - $profile = (array)$profile; |
|
| 59 | + $profile = (array) $profile; |
|
| 60 | 60 | $profile['id'] = $profile['uid']; |
| 61 | 61 | |
| 62 | 62 | return $profile; |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | */ |
| 69 | 69 | public function getIconUrl() |
| 70 | 70 | { |
| 71 | - return Craft::$app->assetManager->getPublishedUrl('@dukt/social/icons/' . $this->getHandle() . '.svg', true); |
|
| 71 | + return Craft::$app->assetManager->getPublishedUrl('@dukt/social/icons/'.$this->getHandle().'.svg', true); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | $query = http_build_query($query); |
| 95 | 95 | |
| 96 | - return $parsedUrl['scheme'] . '://' . $parsedUrl['host'] . $parsedUrl['path'] . '?' . $query; |
|
| 96 | + return $parsedUrl['scheme'].'://'.$parsedUrl['host'].$parsedUrl['path'].'?'.$query; |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | return $url; |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | if ($token) { |
| 189 | 189 | |
| 190 | - $headers['Authorization'] = 'Bearer ' . $token->token; |
|
| 190 | + $headers['Authorization'] = 'Bearer '.$token->token; |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | $options = [ |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | foreach ($loginProviders as $loginProvider) { |
| 65 | 65 | $providerHandle = $loginProvider->getHandle(); |
| 66 | - $key = 'group:' . $providerHandle; |
|
| 66 | + $key = 'group:'.$providerHandle; |
|
| 67 | 67 | |
| 68 | 68 | $sources[] = [ |
| 69 | 69 | 'key' => $key, |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | /** @noinspection PhpInconsistentReturnPointsInspection */ |
| 159 | 159 | public function __toString() |
| 160 | 160 | { |
| 161 | - return (string)$this->socialUid; |
|
| 161 | + return (string) $this->socialUid; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /** |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function init() |
| 22 | 22 | { |
| 23 | - $this->sourcePath = __DIR__ . '/dist'; |
|
| 23 | + $this->sourcePath = __DIR__.'/dist'; |
|
| 24 | 24 | |
| 25 | 25 | $this->depends = [ |
| 26 | 26 | CpAsset::class, |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function init() |
| 22 | 22 | { |
| 23 | - $this->sourcePath = __DIR__ . '/dist'; |
|
| 23 | + $this->sourcePath = __DIR__.'/dist'; |
|
| 24 | 24 | |
| 25 | 25 | $this->depends = [ |
| 26 | 26 | CpAsset::class, |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function init() |
| 22 | 22 | { |
| 23 | - $this->sourcePath = __DIR__ . '/dist'; |
|
| 23 | + $this->sourcePath = __DIR__.'/dist'; |
|
| 24 | 24 | |
| 25 | 25 | $this->depends = [ |
| 26 | 26 | CpAsset::class, |
@@ -53,13 +53,13 @@ |
||
| 53 | 53 | $domainRejected = true; |
| 54 | 54 | |
| 55 | 55 | foreach ($lockDomains as $lockDomain) { |
| 56 | - if (strpos($email, '@' . $lockDomain) !== false) { |
|
| 56 | + if (strpos($email, '@'.$lockDomain) !== false) { |
|
| 57 | 57 | $domainRejected = false; |
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | if ($domainRejected) { |
| 62 | - throw new RegistrationException('Couldn’t register with this email (domain is not allowed): ' . $email); |
|
| 62 | + throw new RegistrationException('Couldn’t register with this email (domain is not allowed): '.$email); |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | */ |
| 164 | 164 | public function saveLoginProviderSettings($handle, $providerSettings) |
| 165 | 165 | { |
| 166 | - $settings = (array)self::getInstance()->getSettings(); |
|
| 166 | + $settings = (array) self::getInstance()->getSettings(); |
|
| 167 | 167 | $storedSettings = Craft::$app->plugins->getStoredPluginInfo('social')['settings']; |
| 168 | 168 | |
| 169 | 169 | $settings['loginProviders'] = []; |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | |
| 223 | 223 | Craft::$app->getView()->registerAssetBundle(LoginAsset::class); |
| 224 | 224 | |
| 225 | - Craft::$app->getView()->registerJs('var socialLoginForm = new Craft.SocialLoginForm(' . json_encode($jsLoginProviders) . ', ' . json_encode($error) . ');'); |
|
| 225 | + Craft::$app->getView()->registerJs('var socialLoginForm = new Craft.SocialLoginForm('.json_encode($jsLoginProviders).', '.json_encode($error).');'); |
|
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | 228 | |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | ->userId($user->id) |
| 370 | 370 | ->all(); |
| 371 | 371 | |
| 372 | - foreach($loginAccounts as $loginAccount) { |
|
| 372 | + foreach ($loginAccounts as $loginAccount) { |
|
| 373 | 373 | Craft::$app->getElements()->deleteElement($loginAccount); |
| 374 | 374 | } |
| 375 | 375 | }); |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | } |
| 407 | 407 | |
| 408 | 408 | // Restore login account elements |
| 409 | - foreach($loginAccounts as $loginAccount) { |
|
| 409 | + foreach ($loginAccounts as $loginAccount) { |
|
| 410 | 410 | Craft::$app->getElements()->restoreElement($loginAccount); |
| 411 | 411 | } |
| 412 | 412 | }); |