Test Setup Failed
Push — a-simpler-manager ( cc67c7...cc5aa5 )
by Ben
07:45
created
src/Managers/Assistants/FragmentAssistant.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function routeFragmentAssistant(string $action, $model = null, ...$parameters): ?string
34 34
     {
35
-        if(!in_array($action, ['fragment-edit','fragment-update','fragment-delete','fragment-create','fragment-store', 'fragment-status'])) {
35
+        if (!in_array($action, ['fragment-edit', 'fragment-update', 'fragment-delete', 'fragment-create', 'fragment-store', 'fragment-status'])) {
36 36
             return null;
37 37
         }
38 38
 
39 39
         $modelKey = $this->managedModelClass()::managedModelKey();
40 40
 
41
-        if(in_array($action, ['fragment-create', 'fragment-store'])) {
41
+        if (in_array($action, ['fragment-create', 'fragment-store'])) {
42 42
             if (!$model || !$model instanceof FragmentsOwner) {
43 43
                 throw new \Exception('Fragment route definition for '.$action.' requires the owning Model as second argument.');
44 44
             }
45 45
 
46
-            return route('chief.' . $modelKey . '.' . $action, array_merge([
46
+            return route('chief.'.$modelKey.'.'.$action, array_merge([
47 47
                 $model::managedModelKey(),
48 48
                 $model->modelReference()->id(),
49 49
             ], $parameters));
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
             throw new \Exception('Fragment route definition for '.$action.' requires the fragment model as second argument.');
54 54
         }
55 55
 
56
-        return route('chief.' . $modelKey . '.' . $action, $model->fragmentModel()->id);
56
+        return route('chief.'.$modelKey.'.'.$action, $model->fragmentModel()->id);
57 57
     }
58 58
 
59 59
     public function canFragmentAssistant(string $action, $model = null): bool
60 60
     {
61
-        return in_array($action, ['fragment-edit','fragment-update','fragment-delete','fragment-create','fragment-store', 'fragment-status']);
61
+        return in_array($action, ['fragment-edit', 'fragment-update', 'fragment-delete', 'fragment-create', 'fragment-store', 'fragment-status']);
62 62
     }
63 63
 
64 64
     public function fragmentCreate(Request $request, string $ownerKey, $ownerId)
@@ -159,13 +159,13 @@  discard block
 block discarded – undo
159 159
         $model = $this->managedModelClass()::findOrFail($id);
160 160
 
161 161
         if ($request->get('deleteconfirmation') !== 'DELETE') {
162
-            return redirect()->back()->with('messages.warning', $model->adminLabel('title') . ' is niet verwijderd.');
162
+            return redirect()->back()->with('messages.warning', $model->adminLabel('title').' is niet verwijderd.');
163 163
         }
164 164
 
165 165
         app(DeleteModel::class)->handle($model);
166 166
 
167 167
         return redirect()->to($this->route('index'))
168
-            ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i>  "' . $model->adminLabel('title') . '" is verwijderd.');
168
+            ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i>  "'.$model->adminLabel('title').'" is verwijderd.');
169 169
     }
170 170
 
171 171
     private function owner(string $ownerKey, $ownerId): FragmentsOwner
Please login to merge, or discard this patch.