@@ -384,7 +384,7 @@ |
||
384 | 384 | * for modifyPermissions |
385 | 385 | * |
386 | 386 | * @param $permissions |
387 | - * @param $action |
|
387 | + * @param string $action |
|
388 | 388 | * @return array |
389 | 389 | * @throws PermissionNotFoundException |
390 | 390 | */ |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | return Cache::remember( |
125 | 125 | 'laravel-acl.getPermissionsFor' . (new ReflectionClass($this))->getShortName() . '_' . $this->id, |
126 | 126 | config('laravel-acl.cacheMinutes'), |
127 | - function () { |
|
127 | + function() { |
|
128 | 128 | return $this->cachegetPermissions(); |
129 | 129 | } |
130 | 130 | ); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | return Cache::remember( |
145 | 145 | 'laravel-acl.getAllPermissionsFor' . (new ReflectionClass($this))->getShortName() . '_' . $this->id, |
146 | 146 | config('laravel-acl.cacheMinutes'), |
147 | - function () { |
|
147 | + function() { |
|
148 | 148 | return $this->cacheGetAllPermissions(); |
149 | 149 | } |
150 | 150 | ); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | return Cache::remember( |
165 | 165 | 'laravel-acl.getInheritedPermissionsFor' . (new ReflectionClass($this))->getShortName() . '_' . $this->id, |
166 | 166 | config('laravel-acl.cacheMinutes'), |
167 | - function () { |
|
167 | + function() { |
|
168 | 168 | return $this->cacheGetInheritedPermissions(); |
169 | 169 | } |
170 | 170 | ); |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | return Cache::remember( |
185 | 185 | 'laravel-acl.getAvailablePermissionsFor' . (new ReflectionClass($this))->getShortName() . '_' . $this->id, |
186 | 186 | config('laravel-acl.cacheMinutes'), |
187 | - function () { |
|
187 | + function() { |
|
188 | 188 | return $this->cacheGetAvailablePermissions(); |
189 | 189 | } |
190 | 190 | ); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | return Cache::remember( |
206 | 206 | 'laravel-acl.hasPermissionTo_' . (new ReflectionClass($this))->getShortName() . '_' . $this->id . '_Permission_' . $permission, |
207 | 207 | config('laravel-acl.cacheMinutes'), |
208 | - function () use ($permission) { |
|
208 | + function() use ($permission) { |
|
209 | 209 | return $this->cacheHasPermissionTo($permission); |
210 | 210 | } |
211 | 211 | ); |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | |
284 | 284 | $allPerms = new Collection(); |
285 | 285 | |
286 | - $levels->each(function ($level, $key) use (&$allPerms) { |
|
286 | + $levels->each(function($level, $key) use (&$allPerms) { |
|
287 | 287 | $allPerms = $allPerms->merge($level->permissions); |
288 | 288 | }); |
289 | 289 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | |
307 | 307 | $inheritedPerms = new Collection(); |
308 | 308 | |
309 | - $levels->each(function ($level, $key) use (&$inheritedPerms) { |
|
309 | + $levels->each(function($level, $key) use (&$inheritedPerms) { |
|
310 | 310 | $inheritedPerms = $inheritedPerms->merge($level->permissions->load('level')); |
311 | 311 | }); |
312 | 312 | |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | } |
438 | 438 | |
439 | 439 | if (is_a($this, config('laravel-acl.level'))) { |
440 | - config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function ($permission) { |
|
440 | + config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function($permission) { |
|
441 | 441 | return $permission->id; |
442 | 442 | }, $permissionObjects))->update(['level_id' => null]); |
443 | 443 | } |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | if (is_a($this, config('laravel-acl.level'))) { |
459 | 459 | $this->clearPermissions(); |
460 | 460 | |
461 | - config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function ($permission) { |
|
461 | + config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function($permission) { |
|
462 | 462 | return $permission->id; |
463 | 463 | }, $permissionObjects)) |
464 | 464 | ->update(['level_id' => $this->id]); |