@@ -63,9 +63,9 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -67,7 +67,7 @@ |
||
| 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'; |
@@ -69,7 +69,7 @@ discard block |
||
| 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 |
||
| 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 | |