Passed
Push — main ( ae5779...6a81dd )
by TARIQ
75:08 queued 17:49
created
brighty-backend/vendor/myth/auth/src/Commands/Publish.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -327,8 +327,7 @@
 block discarded – undo
327 327
         if (write_file($filename, $content))
328 328
         {
329 329
             CLI::write(CLI::color('  Created: ', 'green') . $path);
330
-        }
331
-        else
330
+        } else
332 331
         {
333 332
             CLI::error("  Error creating {$path}.");
334 333
         }
Please login to merge, or discard this patch.
brighty-backend/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.
brighty-backend/vendor/myth/auth/src/Commands/ListGroups.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
 		if (empty($rows))
24 24
 		{
25 25
 			CLI::write( CLI::color("There are no groups.", 'yellow') );
26
-		}
27
-		else
26
+		} else
28 27
 		{
29 28
 			$thead = ['Group ID', 'Name', 'Description'];
30 29
 			CLI::table($rows, $thead);
Please login to merge, or discard this patch.
brighty-backend/vendor/myth/auth/src/Commands/CreateGroup.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@
 block discarded – undo
42 42
 					CLI::write($message, 'red');
43 43
 				}
44 44
 			}
45
-		}
46
-		catch (\Exception $e)
45
+		} catch (\Exception $e)
47 46
 		{
48 47
 			$this->showError($e);
49 48
 		}
Please login to merge, or discard this patch.
brighty-backend/vendor/myth/auth/src/Commands/CreateUser.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@
 block discarded – undo
46 46
 		if ($userId = $users->insert($user))
47 47
 		{
48 48
 			CLI::write(lang('Auth.registerCLI', [$row['username'], $userId]), 'green');
49
-		}
50
-		else
49
+		} else
51 50
 		{
52 51
 			foreach ($users->errors() as $message)
53 52
 			{
Please login to merge, or discard this patch.
brighty-backend/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-backend/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-backend/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-backend/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.