@@ -62,15 +62,15 @@ discard block |
||
| 62 | 62 | { |
| 63 | 63 | $permission = 'update-page'; |
| 64 | 64 | |
| 65 | - if (in_array($verb, ['index','show'])) { |
|
| 65 | + if (in_array($verb, ['index', 'show'])) { |
|
| 66 | 66 | $permission = 'view-page'; |
| 67 | - } elseif (in_array($verb, ['create','store'])) { |
|
| 67 | + } elseif (in_array($verb, ['create', 'store'])) { |
|
| 68 | 68 | $permission = 'create-page'; |
| 69 | 69 | } elseif (in_array($verb, ['delete'])) { |
| 70 | 70 | $permission = 'delete-page'; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - if (! auth()->guard('chief')->user()->hasPermissionTo($permission)) { |
|
| 73 | + if (!auth()->guard('chief')->user()->hasPermissionTo($permission)) { |
|
| 74 | 74 | throw NotAllowedManagerRoute::notAllowedPermission($permission, $this); |
| 75 | 75 | } |
| 76 | 76 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | public function fieldArrangement($key = null): FieldArrangement |
| 133 | 133 | { |
| 134 | 134 | if ($key == 'create') { |
| 135 | - return new FieldArrangement($this->fieldsWithAssistantFields()->filterBy(function ($field) { |
|
| 135 | + return new FieldArrangement($this->fieldsWithAssistantFields()->filterBy(function($field) { |
|
| 136 | 136 | return in_array($field->key, ['title']); |
| 137 | 137 | })); |
| 138 | 138 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | new FieldsTab('seo', ['seo_title', 'seo_description', 'seo_keywords', 'seo_image']), |
| 147 | 147 | ]; |
| 148 | 148 | |
| 149 | - if (! Module::available()->values()->isEmpty()) { |
|
| 149 | + if (!Module::available()->values()->isEmpty()) { |
|
| 150 | 150 | array_splice($tabs, 1, 0, [new FieldsTab('modules', [], 'chief::back.pages._partials.modules')]); |
| 151 | 151 | } |
| 152 | 152 | |
@@ -159,8 +159,8 @@ discard block |
||
| 159 | 159 | if ($this->model->id) { |
| 160 | 160 | return parent::details() |
| 161 | 161 | ->set('title', ucfirst($this->model->title)) |
| 162 | - ->set('intro', 'Aangepast ' . $this->model->updated_at->format('d/m/Y H:i')) |
|
| 163 | - ->set('context', '<span class="inline-xs stack-s">' . $this->assistant('publish')->publicationStatusAsLabel() . '</span>'); |
|
| 162 | + ->set('intro', 'Aangepast '.$this->model->updated_at->format('d/m/Y H:i')) |
|
| 163 | + ->set('context', '<span class="inline-xs stack-s">'.$this->assistant('publish')->publicationStatusAsLabel().'</span>'); |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | return parent::details(); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | public function saveFields(Request $request) |
| 170 | 170 | { |
| 171 | 171 | // Store the morph_key upon creation |
| 172 | - if ($this->model instanceof MorphableContract && ! $this->model->morph_key) { |
|
| 172 | + if ($this->model instanceof MorphableContract && !$this->model->morph_key) { |
|
| 173 | 173 | $this->model->morph_key = $this->model->morphKey(); |
| 174 | 174 | } |
| 175 | 175 | |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | if (is_array_empty($translation)) { |
| 215 | 215 | |
| 216 | 216 | // Nullify all values |
| 217 | - $trans[$locale] = array_map(function ($value) { |
|
| 217 | + $trans[$locale] = array_map(function($value) { |
|
| 218 | 218 | return null; |
| 219 | 219 | }, $translation); |
| 220 | 220 | continue; |