Passed
Push — master ( 3e205a...970265 )
by Philippe
66:06
created
src/Modules/ModuleManager.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
     {
64 64
         $permission = 'update-page';
65 65
 
66
-        if (in_array($verb, ['index','show'])) {
66
+        if (in_array($verb, ['index', 'show'])) {
67 67
             $permission = 'view-page';
68
-        } elseif (in_array($verb, ['create','store'])) {
68
+        } elseif (in_array($verb, ['create', 'store'])) {
69 69
             $permission = 'create-page';
70 70
         }elseif (in_array($verb, ['archive'])) {
71 71
             $permission = 'archive-page';
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             $permission = 'delete-page';
74 74
         }
75 75
 
76
-        if (! auth()->guard('chief')->user()->hasPermissionTo($permission)) {
76
+        if (!auth()->guard('chief')->user()->hasPermissionTo($permission)) {
77 77
             throw NotAllowedManagerRoute::notAllowedPermission($permission, $this);
78 78
         }
79 79
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     public function saveFields(): Manager
106 106
     {
107 107
         // Store the morph_key upon creation
108
-        if (! $this->model->morph_key) {
108
+        if (!$this->model->morph_key) {
109 109
             $this->model->morph_key = $this->model->morphKey();
110 110
         }
111 111
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             if (is_array_empty($translation)) {
145 145
 
146 146
                 // Nullify all values
147
-                $trans[$locale] = array_map(function ($value) {
147
+                $trans[$locale] = array_map(function($value) {
148 148
                     return null;
149 149
                 }, $translation);
150 150
                 continue;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
             $permission = 'view-page';
68 68
         } elseif (in_array($verb, ['create','store'])) {
69 69
             $permission = 'create-page';
70
-        }elseif (in_array($verb, ['archive'])) {
70
+        } elseif (in_array($verb, ['archive'])) {
71 71
             $permission = 'archive-page';
72 72
         } elseif (in_array($verb, ['delete'])) {
73 73
             $permission = 'delete-page';
Please login to merge, or discard this patch.
src/Management/Assistants/ArchiveAssistant.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
     public function findAll(): Collection
71 71
     {
72
-        return $this->model->archived()->get()->map(function ($model) {
72
+        return $this->model->archived()->get()->map(function($model) {
73 73
             return $this->managers->findByModel($model);
74 74
         });
75 75
     }
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
     {
113 113
         $permission = 'archive-page';
114 114
 
115
-        if (! auth()->guard('chief')->user()->hasPermissionTo($permission)) {
115
+        if (!auth()->guard('chief')->user()->hasPermissionTo($permission)) {
116 116
             throw NotAllowedManagerRoute::notAllowedPermission($permission, $this->manager);
117 117
         }
118 118
     }
119 119
 
120 120
     public function guard($verb): Assistant
121 121
     {
122
-        if (! $this->can($verb)) {
122
+        if (!$this->can($verb)) {
123 123
             NotAllowedManagerRoute::notAllowedVerb($verb, $this->manager);
124 124
         }
125 125
 
Please login to merge, or discard this patch.