@@ -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 | |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | |
| 366 | 366 | $permissionObjects = $this->buildPermissionsArray($permissions, $action); |
| 367 | 367 | |
| 368 | - switch($action) { |
|
| 368 | + switch ($action) { |
|
| 369 | 369 | case 'add': |
| 370 | 370 | case 'negate': |
| 371 | 371 | $this->addOrNegate($permissionObjects, $action); |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | } |
| 439 | 439 | |
| 440 | 440 | if (is_a($this, config('laravel-acl.level'))) { |
| 441 | - config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function ($permission) { |
|
| 441 | + config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function($permission) { |
|
| 442 | 442 | return $permission->id; |
| 443 | 443 | }, $permissionObjects))->update(['level_id' => null]); |
| 444 | 444 | } |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | if (is_a($this, config('laravel-acl.level'))) { |
| 460 | 460 | $this->clearPermissions(); |
| 461 | 461 | |
| 462 | - config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function ($permission) { |
|
| 462 | + config('laravel-acl.permission', Permission::class)::whereIn('id', array_map(function($permission) { |
|
| 463 | 463 | return $permission->id; |
| 464 | 464 | }, $permissionObjects)) |
| 465 | 465 | ->update(['level_id' => $this->id]); |