Passed
Push — main ( bae336...1e821c )
by Roberto
01:48
created
src/Middleware/ACFMiddleware.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@
 block discarded – undo
30 30
     protected function checkPermissions(string $modifier, mixed ...$params): bool
31 31
     {
32 32
 
33
-        if($modifier == LoginRequired::class) {
33
+        if ($modifier == LoginRequired::class) {
34 34
 
35 35
             $level = $params[0] ?? 1;
36 36
             $authenticator = new \Lepton\Authenticator\UserAuthenticator();
37 37
             $loggedIn = $authenticator->isLoggedIn();
38
-            if(! $loggedIn){
38
+            if (!$loggedIn) {
39 39
                 return false;
40 40
             }
41 41
             $user = $authenticator->getLoggedUser();
42 42
             $splitted = explode("__", $this->level_field);
43 43
             $user_level = $user;
44
-            foreach($splitted as $part){
44
+            foreach ($splitted as $part) {
45 45
                 $user_level = $user_level->$part;
46 46
             }
47 47
             return ($user_level >= $level);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
             $level = $params[0] ?? 1;
36 36
             $authenticator = new \Lepton\Authenticator\UserAuthenticator();
37 37
             $loggedIn = $authenticator->isLoggedIn();
38
-            if(! $loggedIn){
38
+            if(! $loggedIn) {
39 39
                 return false;
40 40
             }
41 41
             $user = $authenticator->getLoggedUser();
Please login to merge, or discard this patch.