Skip to content

Commit 96016a2

Browse files
edenleungStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 8e84c63 commit 96016a2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/Traits/User.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,20 @@ public function isSuper()
104104
* @return void
105105
*/
106106
public function getAllPermissions(): Collection
107-
{
107+
{
108108
// 超级管理员 默认全部规则
109109
if ($this->isSuper()) {
110-
return Permission::select();
110+
return Permission::select();
111111
}
112112

113113
$permissions = [];
114-
114+
115115
foreach ($this->roles as $role) {
116116
$permissions = array_unique(array_merge($permissions, $role->permissions->column('name')));
117117
}
118118

119119
$permissions = Permission::whereIn('name', implode(',', $permissions))->select();
120+
120121
return $permissions;
121122
}
122123
}

0 commit comments

Comments
 (0)