Completed
Push — master ( 5b1557...9caaaf )
by Stephen
02:27
created
src/z1haze/Acl/Models/Permission.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     {
135 135
         parent::boot();
136 136
 
137
-        static::deleting(function ($permission) {
137
+        static::deleting(function($permission) {
138 138
             $permission->users()->detach();
139 139
             $permission->level()->dissociate()->save();
140 140
         });
Please login to merge, or discard this patch.
src/z1haze/Acl/Traits/UserAndPermission.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace z1haze\Acl\Traits;
4 4
 
5
-use z1haze\Acl\Exceptions\LevelNotFoundException;
6 5
 use Illuminate\Support\Facades\Cache;
6
+use z1haze\Acl\Exceptions\LevelNotFoundException;
7 7
 use z1haze\Acl\Models\Level;
8 8
 
9 9
 trait UserAndPermission
Please login to merge, or discard this patch.
src/z1haze/Acl/Traits/UserAndLevel.php 3 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@
 block discarded – undo
3 3
 namespace z1haze\Acl\Traits;
4 4
 
5 5
 use Illuminate\Support\Collection;
6
+use Illuminate\Support\Facades\Cache;
6 7
 use ReflectionClass;
7 8
 use z1haze\Acl\Exceptions\PermissionNotFoundException;
8
-use Illuminate\Support\Facades\Cache;
9 9
 use z1haze\Acl\Models\Level;
10 10
 use z1haze\Acl\Models\Permission;
11 11
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -384,7 +384,7 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -277,13 +277,13 @@  discard block
 block discarded – undo
277 277
      */
278 278
     protected function cacheGetAllPermissions()
279 279
     {
280
-        if(is_a($this, config('laravel-acl.level'), true)) {
280
+        if (is_a($this, config('laravel-acl.level'), true)) {
281 281
             $rank = $this->rank;
282 282
         } else {
283 283
             $rank = $this->level ? $this->level->rank : null;
284 284
         }
285 285
 
286
-        if(!$rank) {
286
+        if (!$rank) {
287 287
             return $this->permissions;
288 288
         }
289 289
 
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 
372 372
         $permissionObjects = $this->buildPermissionsArray($permissions, $action);
373 373
 
374
-        switch($action) {
374
+        switch ($action) {
375 375
             case 'add':
376 376
                 // Add and negate call the same method
377 377
             case 'negate':
Please login to merge, or discard this patch.