Test Setup Failed
Push — ft/command-palette ( e46615...4ceb60 )
by
unknown
05:58
created
app/Http/Controllers/Back/CommandPalette/CommandPaletteController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 ) {
48 48
                     $resultGroup[$model->modelReference()->getShort()] = [
49 49
                         'label' => $model->title,
50
-                        'url' => '/admin/' . $model->managedModelKey() . '/' . $model->id . '/edit',
50
+                        'url' => '/admin/'.$model->managedModelKey().'/'.$model->id.'/edit',
51 51
                     ];
52 52
                 }
53 53
             }
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
                 $firstModel = $modelGroup['models']->first();
57 57
 
58 58
                 array_push($resultGroup, [
59
-                    'label' => ucfirst($modelGroup['label']) . ' overzicht',
60
-                    'url' => '/admin/' . $firstModel->managedModelKey(),
59
+                    'label' => ucfirst($modelGroup['label']).' overzicht',
60
+                    'url' => '/admin/'.$firstModel->managedModelKey(),
61 61
                 ]);
62 62
 
63 63
                 array_push($results, [
@@ -126,21 +126,21 @@  discard block
 block discarded – undo
126 126
             ],
127 127
         ]);
128 128
 
129
-        $models = $adminPages->filter(function ($adminPage) use ($term) {
129
+        $models = $adminPages->filter(function($adminPage) use ($term) {
130 130
             // Check if label contains search term
131 131
             if (Str::contains(Str::lower($adminPage['label']), $term)) {
132 132
                 return true;
133 133
             }
134 134
 
135 135
             // Check if any of tags contain search term
136
-            if (collect($adminPage['tags'])->contains(function ($tag) use ($term) {
136
+            if (collect($adminPage['tags'])->contains(function($tag) use ($term) {
137 137
                 return Str::contains(Str::lower($tag), $term);
138 138
             })) {
139 139
                 return true;
140 140
             };
141 141
 
142 142
             return false;
143
-        })->map(function ($adminPage) {
143
+        })->map(function($adminPage) {
144 144
             return [
145 145
                 'label' => $adminPage['label'],
146 146
                 'url' => $adminPage['url'],
@@ -163,10 +163,10 @@  discard block
 block discarded – undo
163 163
     {
164 164
         return collect(app(Registry::class)->models())
165 165
             // Filter out fragment models
166
-            ->filter(function ($model) {
167
-                return ! in_array('Thinktomorrow\Chief\Fragments\Fragmentable', class_implements($model));
166
+            ->filter(function($model) {
167
+                return !in_array('Thinktomorrow\Chief\Fragments\Fragmentable', class_implements($model));
168 168
                 // Return all instances of the models
169
-            })->map(function ($model) {
169
+            })->map(function($model) {
170 170
                 $models = $model::all();
171 171
 
172 172
                 return [
@@ -181,15 +181,15 @@  discard block
 block discarded – undo
181 181
     {
182 182
         return collect(app(Registry::class)->models())
183 183
             // Filter out fragment models
184
-            ->filter(function ($model) {
185
-                return ! in_array('Thinktomorrow\Chief\Fragments\Fragmentable', class_implements($model));
184
+            ->filter(function($model) {
185
+                return !in_array('Thinktomorrow\Chief\Fragments\Fragmentable', class_implements($model));
186 186
                 // Return all instances of the models
187
-            })->map(function ($model) {
187
+            })->map(function($model) {
188 188
                 $model = $model::make();
189 189
 
190 190
                 return [
191 191
                     'label' => $model->adminConfig()->getNavTitle(),
192
-                    'url' => '/admin/' . $model->managedModelKey(),
192
+                    'url' => '/admin/'.$model->managedModelKey(),
193 193
                 ];
194 194
             });
195 195
     }
Please login to merge, or discard this patch.