Passed
Push — master ( 9f14f5...dcd510 )
by Artem
06:31 queued 11s
created
src/Exceptions/ValidationException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         $messages = [];
47 47
 
48 48
         foreach (json_decode($message, true) as $property => $attributeMessages) {
49
-            if(in_array($property, static::$attributeHides)) {
49
+            if (in_array($property, static::$attributeHides)) {
50 50
                 continue;
51 51
             }
52 52
 
Please login to merge, or discard this patch.
src/Concerns/ResetsPasswords.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function showResetForm(string $token, string $email)
30 30
     {
31
-        if(!$email = AuthService::validatePasswordResetToken($token, $email)) {
31
+        if (!$email = AuthService::validatePasswordResetToken($token, $email)) {
32 32
             throw new \Symfony\Component\HttpKernel\Exception\NotFoundHttpException();
33 33
         }
34 34
 
@@ -48,13 +48,13 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $this->validate($request, $this->rules(), $this->validationErrorMessages());
50 50
 
51
-        if(AuthService::resetPassword(
51
+        if (AuthService::resetPassword(
52 52
             $request->input('token'),
53 53
             $email = $request->input('email'),
54 54
             $password = $request->input('password'),
55 55
             $request->input('password_confirmation')
56 56
         )) {
57
-            if(AuthService::login($email, $password)) {
57
+            if (AuthService::login($email, $password)) {
58 58
                 return $this->sendResetResponse(PasswordBroker::PASSWORD_RESET);
59 59
             }
60 60
         }
Please login to merge, or discard this patch.
src/Sync/HandlesActions.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     {
29 29
         $handler = 'action' . studly_case($action);
30 30
 
31
-        if(!method_exists($this, $handler)) {
31
+        if (!method_exists($this, $handler)) {
32 32
             throw new \Slides\Connector\Auth\Exceptions\SyncException("User action handler {$handler} cannot be found.");
33 33
         }
34 34
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     protected function actionCreate(RemoteUser $remote)
46 46
     {
47 47
         // If a user with the same email was found, we need to skip the process
48
-        if(Auth::getProvider()->retrieveByCredentials(['email' => strtolower($remote->getEmail())])) {
48
+        if (Auth::getProvider()->retrieveByCredentials(['email' => strtolower($remote->getEmail())])) {
49 49
             return;
50 50
         }
51 51
 
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
     protected function actionUpdate(RemoteUser $remote)
65 65
     {
66 66
         // If a user with the same email cannot be found, we should skip the process
67
-        if(!$local = Auth::getProvider()->retrieveByCredentials(['email' => $remote->getEmail()])) {
67
+        if (!$local = Auth::getProvider()->retrieveByCredentials(['email' => $remote->getEmail()])) {
68 68
             return;
69 69
         }
70 70
 
71 71
         // If a local user was updated later than remote one, we should skip the process
72 72
         // Since we have a latest one
73
-        if($this->localNewerThanRemote($local, $remote)) {
73
+        if ($this->localNewerThanRemote($local, $remote)) {
74 74
             return;
75 75
         }
76 76
 
77 77
         // If "password" mode is not enabled, we cannot update local passwords, so we simply resetting it
78
-        if(!$this->hasMode(static::MODE_PASSWORDS)) {
78
+        if (!$this->hasMode(static::MODE_PASSWORDS)) {
79 79
             $remote->resetPassword();
80 80
         }
81 81
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     protected function actionDelete(RemoteUser $remote)
98 98
     {
99
-        if(!$local = Auth::getProvider()->retrieveByCredentials(['email' => $remote->getEmail()])) {
99
+        if (!$local = Auth::getProvider()->retrieveByCredentials(['email' => $remote->getEmail()])) {
100 100
             return;
101 101
         }
102 102
 
@@ -115,15 +115,15 @@  discard block
 block discarded – undo
115 115
      */
116 116
     private function localNewerThanRemote(LocalUser $local, RemoteUser $remote)
117 117
     {
118
-        if(!$local->retrieveRemoteId()) {
118
+        if (!$local->retrieveRemoteId()) {
119 119
             return false;
120 120
         }
121 121
 
122
-        if(!$remoteUpdated = $remote->getUpdated()) {
122
+        if (!$remoteUpdated = $remote->getUpdated()) {
123 123
             return false;
124 124
         }
125 125
 
126
-        if(!$localUpdate = $local->retrieveUpdatedAt()) {
126
+        if (!$localUpdate = $local->retrieveUpdatedAt()) {
127 127
             return false;
128 128
         }
129 129
 
Please login to merge, or discard this patch.
src/Sync/ImportsUsers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $difference = $this->parseDump($path, $sharedKey, $importModes);
33 33
 
34
-        $foreigners = array_map(function (array $user) {
34
+        $foreigners = array_map(function(array $user) {
35 35
             return $this->createRemoteUserFromResponse($user);
36 36
         }, $difference);
37 37
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     private function parseDump(string $filename, string $sharedKey, bool $importModes): array
56 56
     {
57
-        if(!file_exists($filename)) {
57
+        if (!file_exists($filename)) {
58 58
             throw new \InvalidArgumentException($filename . ' cannot be found');
59 59
         }
60 60
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         // Then delete from a dump so we can proceed with decryption
67 67
         $this->extractHeaders($payload);
68 68
 
69
-        if($importModes) {
69
+        if ($importModes) {
70 70
             $this->modes = array_get($this->importHeaders, 'modes', []);
71 71
         }
72 72
 
Please login to merge, or discard this patch.
src/Sync/ExportsUsers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
      */
55 55
     public function getEncryptionKey()
56 56
     {
57
-        if(!$this->encryptionKey) {
57
+        if (!$this->encryptionKey) {
58 58
             return null;
59 59
         }
60 60
 
Please login to merge, or discard this patch.
src/Sync/Syncer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     protected function parseResponse(array $response)
159 159
     {
160
-        $foreigners = array_map(function (array $user) {
160
+        $foreigners = array_map(function(array $user) {
161 161
             return $this->createRemoteUserFromResponse($user);
162 162
         }, array_get($response, 'difference'));
163 163
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                     $action = $foreigner->getRemoteAction()
198 198
                 );
199 199
             }
200
-            catch(\Slides\Connector\Auth\Exceptions\SyncException $e) {
200
+            catch (\Slides\Connector\Auth\Exceptions\SyncException $e) {
201 201
                 \Illuminate\Support\Facades\Log::error(
202 202
                     "Cannot $action the user {$foreigner->getEmail()}: " . $e->getMessage()
203 203
                 );
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
     {
359 359
         $output[] = $message;
360 360
 
361
-        if($this->outputCallback instanceof \Closure) {
361
+        if ($this->outputCallback instanceof \Closure) {
362 362
             call_user_func($this->outputCallback, $message);
363 363
         }
364 364
     }
Please login to merge, or discard this patch.
src/Http/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
2 2
 
3 3
 use Illuminate\Support\Facades\Route;
4 4
 
5
-Route::group(['namespace' => 'Slides\Connector\Auth\Http\Controllers'], function () {
5
+Route::group(['namespace' => 'Slides\Connector\Auth\Http\Controllers'], function() {
6 6
     Route::post('connector/webhook/{key}', 'WebhookController');
7 7
 });
8 8
\ No newline at end of file
Please login to merge, or discard this patch.
src/Concerns/PassesModes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     {
65 65
         $modes = $this->formatModes($modes ?? $this->modes());
66 66
 
67
-        if($modes) {
67
+        if ($modes) {
68 68
             $this->output->block('Passed modes: ' . $modes, null, 'comment');
69 69
         }
70 70
     }
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     protected function loadConsoleCommands()
66 66
     {
67
-        if(!$this->app->runningInConsole()) {
67
+        if (!$this->app->runningInConsole()) {
68 68
             return;
69 69
         }
70 70
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     protected function loadGuards()
85 85
     {
86 86
         // Skip loading guards if an application running in the console
87
-        if($this->app->runningInConsole()) {
87
+        if ($this->app->runningInConsole()) {
88 88
             return;
89 89
         }
90 90
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             $this->app['auth']->guard('authService')
93 93
         );
94 94
 
95
-        if(!$this->enabled()) {
95
+        if (!$this->enabled()) {
96 96
             $this->app['authService']->setFallbackGuard(
97 97
                 $this->app['auth']->guard('fallback')
98 98
             );
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         });
147 147
 
148 148
         // Register the fallback driver if service is disabled
149
-        if(!$this->app->runningInConsole() && !$this->enabled()) {
149
+        if (!$this->app->runningInConsole() && !$this->enabled()) {
150 150
             $this->app['auth']->shouldUse('fallback');
151 151
         }
152 152
     }
Please login to merge, or discard this patch.