@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | return \Cache::remember( |
134 | 134 | 'laravel-acl.getAllPermissionsFor' . $model . '_' . $this->id, |
135 | 135 | config('laravel-acl.cacheMinutes'), |
136 | - function () { |
|
136 | + function() { |
|
137 | 137 | return $this->cacheGetAllPermissions(); |
138 | 138 | } |
139 | 139 | ); |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | return \Cache::remember( |
156 | 156 | 'laravel-acl.getInheritedPermissionsFor' . $model . '_' . $this->id, |
157 | 157 | config('laravel-acl.cacheMinutes'), |
158 | - function () { |
|
158 | + function() { |
|
159 | 159 | return $this->cacheGetInheritedPermissions(); |
160 | 160 | } |
161 | 161 | ); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | return \Cache::remember( |
178 | 178 | 'laravel-acl.getAvailablePermissionsFor' . $model . '_' . $this->id, |
179 | 179 | config('laravel-acl.cacheMinutes'), |
180 | - function () { |
|
180 | + function() { |
|
181 | 181 | return $this->cacheGetAvailablePermissions(); |
182 | 182 | } |
183 | 183 | ); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | return \Cache::remember( |
201 | 201 | 'laravel-acl.hasPermissionTo_' . $model . '_' . $this->id . '_Permission_' . $permission, |
202 | 202 | config('laravel-acl.cacheMinutes'), |
203 | - function () use ($permission) { |
|
203 | + function() use ($permission) { |
|
204 | 204 | return $this->cacheHasPermissionTo($permission); |
205 | 205 | } |
206 | 206 | ); |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | |
267 | 267 | $allPerms = new Collection(); |
268 | 268 | |
269 | - $levels->each(function ($level, $key) use (&$allPerms) { |
|
269 | + $levels->each(function($level, $key) use (&$allPerms) { |
|
270 | 270 | $allPerms = $allPerms->merge($level->permissions); |
271 | 271 | }); |
272 | 272 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | |
288 | 288 | $inheritedPerms = new Collection(); |
289 | 289 | |
290 | - $levels->each(function ($level, $key) use (&$inheritedPerms) { |
|
290 | + $levels->each(function($level, $key) use (&$inheritedPerms) { |
|
291 | 291 | $inheritedPerms = $inheritedPerms->merge($level->permissions->load('level')); |
292 | 292 | }); |
293 | 293 | |
@@ -384,8 +384,7 @@ discard block |
||
384 | 384 | $permissionsObjects[$permission->id] = ['negated' => true]; |
385 | 385 | } else { |
386 | 386 | $model == 'User' ? |
387 | - array_push($permissionsObjects, $permission->id) : |
|
388 | - array_push($permissionsObjects, $permission); |
|
387 | + array_push($permissionsObjects, $permission->id) : array_push($permissionsObjects, $permission); |
|
389 | 388 | } |
390 | 389 | } |
391 | 390 | |
@@ -421,7 +420,7 @@ discard block |
||
421 | 420 | $this->permissions()->detach($permissionObjects); |
422 | 421 | |
423 | 422 | if ($model == 'Level') { |
424 | - config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function ($permission) { |
|
423 | + config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function($permission) { |
|
425 | 424 | return $permission->id; |
426 | 425 | }, $permissionObjects))->update(['level_id' => null]); |
427 | 426 | } |
@@ -442,7 +441,7 @@ discard block |
||
442 | 441 | if ($model == 'Level') { |
443 | 442 | $this->clearPermissions(); |
444 | 443 | |
445 | - config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function ($permission) { |
|
444 | + config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function($permission) { |
|
446 | 445 | return $permission->id; |
447 | 446 | }, $permissionObjects)) |
448 | 447 | ->update(['level_id' => $this->id]); |