Passed
Push — develop ( 426f7e...1496d6 )
by Benjamin
03:24
created
src/loginproviders/Twitter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/base/LoginProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/loginproviders/Facebook.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 = [
Please login to merge, or discard this patch.
src/elements/LoginAccount.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/web/assets/login/LoginAsset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/web/assets/loginaccountindex/LoginAccountIndexAsset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/web/assets/social/SocialAsset.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/services/LoginAccounts.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
             try {
271 271
                 $photoUrl = html_entity_decode(Craft::$app->getView()->renderString($userFieldMapping['photo'], ['profile' => $profile]));
272 272
             } catch (\Exception $e) {
273
-                Craft::warning('Could not map:' . print_r(['photo', $userFieldMapping['photo'], $profile, $e->getMessage()], true), __METHOD__);
273
+                Craft::warning('Could not map:'.print_r(['photo', $userFieldMapping['photo'], $profile, $e->getMessage()], true), __METHOD__);
274 274
             }
275 275
         }
276 276
 
@@ -295,14 +295,14 @@  discard block
 block discarded – undo
295 295
     {
296 296
         $filename = 'photo';
297 297
 
298
-        $tempPath = Craft::$app->path->getTempPath() . '/social/userphotos/' . $user->email . '/';
298
+        $tempPath = Craft::$app->path->getTempPath().'/social/userphotos/'.$user->email.'/';
299 299
 
300 300
         FileHelper::createDirectory($tempPath);
301 301
 
302 302
         $client = new \GuzzleHttp\Client();
303 303
 
304 304
         $response = $client->request('GET', $photoUrl, [
305
-            'save_to' => $tempPath . $filename
305
+            'save_to' => $tempPath.$filename
306 306
         ]);
307 307
 
308 308
         if ($response->getStatusCode() !== 200) {
@@ -327,15 +327,15 @@  discard block
 block discarded – undo
327 327
                     break;
328 328
 
329 329
                 default:
330
-                    throw new ImageTypeException('Image type “' . $contentTypes[0] . '” not supported');
330
+                    throw new ImageTypeException('Image type “'.$contentTypes[0].'” not supported');
331 331
             }
332 332
         } else {
333 333
             throw new ImageTypeException('Image type not supported');
334 334
         }
335 335
 
336
-        rename($tempPath . $filename, $tempPath . $filename . '.' . $extension);
336
+        rename($tempPath.$filename, $tempPath.$filename.'.'.$extension);
337 337
 
338
-        $image = Craft::$app->images->loadImage($tempPath . $filename . '.' . $extension);
338
+        $image = Craft::$app->images->loadImage($tempPath.$filename.'.'.$extension);
339 339
         $imageWidth = $image->getWidth();
340 340
         $imageHeight = $image->getHeight();
341 341
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
         $verticalMargin = ($imageHeight - $dimension) / 2;
345 345
         $image->crop($horizontalMargin, $imageWidth - $horizontalMargin, $verticalMargin, $imageHeight - $verticalMargin);
346 346
 
347
-        Craft::$app->users->saveUserPhoto($tempPath . $filename . '.' . $extension, $user, $filename . '.' . $extension);
347
+        Craft::$app->users->saveUserPhoto($tempPath.$filename.'.'.$extension, $user, $filename.'.'.$extension);
348 348
 
349 349
         return true;
350 350
     }
Please login to merge, or discard this patch.
src/controllers/BaseController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,13 +53,13 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.