Passed
Push — main ( ae5779...6a81dd )
by TARIQ
75:08 queued 17:49
created
brighty/vendor/myth/auth/src/Authorization/FlatAuthorization.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -124,8 +124,7 @@  discard block
 block discarded – undo
124 124
 				{
125 125
 					return true;
126 126
 				}
127
-			}
128
-			else if (is_string($group))
127
+			} else if (is_string($group))
129 128
 			{
130 129
 				$names = array_column($userGroups, 'name');
131 130
 
@@ -754,8 +753,7 @@  discard block
 block discarded – undo
754 753
 		if (is_numeric($group))
755 754
 		{
756 755
 			return $this->groupModel->getPermissionsForGroup($group);
757
-		}
758
-		else
756
+		} else
759 757
 		{
760 758
 			$g = $this->groupModel->where('name', $group)->first();
761 759
 			return $this->groupModel->getPermissionsForGroup($g->id);
@@ -775,8 +773,7 @@  discard block
 block discarded – undo
775 773
 		if (is_numeric($group))
776 774
 		{
777 775
 			return $this->groupModel->getUsersForGroup($group);
778
-		}
779
-		else
776
+		} else
780 777
 		{
781 778
 			$g = $this->groupModel->where('name', $group)->first();
782 779
 			return $this->groupModel->getUsersForGroup($g->id);
Please login to merge, or discard this patch.
brighty/vendor/myth/auth/src/Views/login.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,8 @@  discard block
 block discarded – undo
23 23
 								<?= session('errors.login') ?>
24 24
 							</div>
25 25
 						</div>
26
-				<?php else: ?>
26
+				<?php else {
27
+    : ?>
27 28
 						<div class="form-group">
28 29
 							<label for="login"><?=lang('Auth.emailOrUsername')?></label>
29 30
 							<input type="text" class="form-control <?php if(session('errors.login')) : ?>is-invalid<?php endif ?>"
@@ -32,7 +33,9 @@  discard block
 block discarded – undo
32 33
 								<?= session('errors.login') ?>
33 34
 							</div>
34 35
 						</div>
35
-				<?php endif; ?>
36
+				<?php endif;
37
+}
38
+?>
36 39
 
37 40
 						<div class="form-group">
38 41
 							<label for="password"><?=lang('Auth.password')?></label>
Please login to merge, or discard this patch.
brighty/vendor/myth/auth/src/Filters/RoleFilter.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
 			$redirectURL = session('redirect_url') ?? '/';
60 60
 			unset($_SESSION['redirect_url']);
61 61
 			return redirect()->to($redirectURL)->with('error', lang('Auth.notEnoughPrivilege'));
62
-		}
63
-		else {
62
+		} else {
64 63
 			throw new PermissionException(lang('Auth.notEnoughPrivilege'));
65 64
 		}
66 65
 	}
Please login to merge, or discard this patch.
brighty/vendor/myth/auth/src/Filters/PermissionFilter.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
 				$redirectURL = session('redirect_url') ?? '/';
60 60
 				unset($_SESSION['redirect_url']);
61 61
 				return redirect()->to($redirectURL)->with('error', lang('Auth.notEnoughPrivilege'));
62
-			}
63
-			else {
62
+			} else {
64 63
 				throw new PermissionException(lang('Auth.notEnoughPrivilege'));
65 64
 			}
66 65
 		}
Please login to merge, or discard this patch.
brighty/vendor/myth/auth/src/Authentication/Passwords/ValidationRules.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@  discard block
 block discarded – undo
36 36
         if (function_exists('user') && user())
37 37
         {
38 38
             $user = user();
39
-        }
40
-        else
39
+        } else
41 40
         {
42 41
             $user = empty($data) ? $this->buildUserFromRequest() : $this->buildUserFromData($data);
43 42
         }
@@ -49,8 +48,7 @@  discard block
 block discarded – undo
49 48
             if (empty($data))
50 49
             {
51 50
                 $error1 = $checker->error();
52
-            }
53
-            else
51
+            } else
54 52
             {
55 53
                 $error2 = $checker->error();
56 54
             }
Please login to merge, or discard this patch.
brighty/vendor/myth/auth/src/Authentication/Passwords/PwnedValidator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
             $response = $client->get('range/'.$rangeHash,
62 62
                 ['headers' => ['Accept' => 'text/plain']]
63 63
             );
64
-        }
65
-        catch(HTTPException $e)
64
+        } catch(HTTPException $e)
66 65
         {
67 66
             $exception = AuthException::forHIBPCurlFail($e);
68 67
             service('logger')->error('[ERROR] {exception}', ['exception' => $exception]);
@@ -81,8 +80,7 @@  discard block
 block discarded – undo
81 80
         if($endPos !== false)
82 81
         {
83 82
             $hits = (int) substr($range, $startPos, $endPos - $startPos);
84
-        }
85
-        else
83
+        } else
86 84
         {
87 85
             // match is the last item in the range which does not end with "\r\n"
88 86
             $hits = (int) substr($range, $startPos);
Please login to merge, or discard this patch.
vendor/myth/auth/src/Authentication/Passwords/NothingPersonalValidator.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -171,8 +171,7 @@
 block discarded – undo
171 171
         if($maxSimilarity < 1)
172 172
         {
173 173
             $maxSimilarity = 0;
174
-        }
175
-        elseif($maxSimilarity > 100)
174
+        } elseif($maxSimilarity > 100)
176 175
         {
177 176
             $maxSimilarity = 100;
178 177
         }
Please login to merge, or discard this patch.
brighty/vendor/myth/auth/src/Collectors/Auth.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,7 @@
 block discarded – undo
75 75
 			$html .= "<tr><td>Email</td><td>{$user->email}</td></tr>";
76 76
 			$html .= "<tr><td>Groups</td><td>{$groupsForUser}</td></tr>";
77 77
 			$html .= '</tbody></table>';
78
-		}
79
-		else
78
+		} else
80 79
 		{
81 80
 			$html = '<p>Not logged in.</p>';
82 81
 		}
Please login to merge, or discard this patch.
brighty/vendor/myth/auth/src/Commands/SetPassword.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,16 +40,14 @@
 block discarded – undo
40 40
 		if (! $user)
41 41
 		{
42 42
             CLI::write('User with identity: '. $identity .' not found.', 'red');
43
-		}
44
-		else
43
+		} else
45 44
 		{
46 45
 			$user->password = $password;
47 46
 
48 47
 			if ($userModel->save($user))
49 48
 			{
50 49
                 CLI::write('Password successfully set for user with identity: ' . $identity , 'green');
51
-			}
52
-			else
50
+			} else
53 51
 			{
54 52
                 CLI::write('Failed to set password for user with identity: ' . $identity , 'red');
55 53
 			}
Please login to merge, or discard this patch.