X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/1b46c19849820d4d500f0d9e7424228ab5f0712c..refs/pull/846/head:/app/Role.php diff --git a/app/Role.php b/app/Role.php index 8d0a79e75..e86854e79 100644 --- a/app/Role.php +++ b/app/Role.php @@ -1,6 +1,5 @@ getRelationValue('permissions'); foreach ($permissions as $permission) { - if ($permission->getRawAttribute('name') === $permissionName) return true; + if ($permission->getRawAttribute('name') === $permissionName) { + return true; + } } return false; } @@ -66,7 +67,7 @@ class Role extends Model /** * Get the role object for the specified role. * @param $roleName - * @return mixed + * @return Role */ public static function getRole($roleName) { @@ -76,7 +77,7 @@ class Role extends Model /** * Get the role object for the specified system role. * @param $roleName - * @return mixed + * @return Role */ public static function getSystemRole($roleName) { @@ -91,5 +92,4 @@ class Role extends Model { return static::where('hidden', '=', false)->orderBy('name')->get(); } - }