]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/ExternalAuthService.php
Fixes for CodeStyle vol.2
[bookstack] / app / Auth / Access / ExternalAuthService.php
index 4c71db21adff7a559b929353ec4974512c16df14..7bd3679ac0653829989a090778ed7e0062bc2c4e 100644 (file)
@@ -1,10 +1,10 @@
-<?php namespace BookStack\Auth\Access;
+<?php
+
+namespace BookStack\Auth\Access;
 
 use BookStack\Auth\Role;
 use BookStack\Auth\User;
-use Illuminate\Database\Eloquent\Builder;
 use Illuminate\Support\Collection;
-use Illuminate\Support\Facades\DB;
 
 class ExternalAuthService
 {
@@ -19,6 +19,7 @@ class ExternalAuthService
         }
 
         $roleName = str_replace(' ', '-', trim(strtolower($role->display_name)));
+
         return in_array($roleName, $groupNames);
     }
 
@@ -57,7 +58,7 @@ class ExternalAuthService
     }
 
     /**
-     * Sync the groups to the user roles for the current user
+     * Sync the groups to the user roles for the current user.
      */
     public function syncWithGroups(User $user, array $userGroups): void
     {