Test Setup Failed
Push — ft/command-palette ( 46b036...db4959 )
by
unknown
14:31 queued 17s
created
app/Console/GenerateSitemap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@
 block discarded – undo
25 25
         $locales = config('chief.locales');
26 26
 
27 27
         foreach ($locales as $locale) {
28
-            $filepath = public_path('sitemap-' . $locale . '.xml');
28
+            $filepath = public_path('sitemap-'.$locale.'.xml');
29 29
 
30
-            $this->info('Generating a sitemap for locale: ' . $locale . ' at: ' . $filepath);
30
+            $this->info('Generating a sitemap for locale: '.$locale.' at: '.$filepath);
31 31
 
32 32
             $this->sitemapXmlFile->create($locale, $filepath, $this->createAlternateLocales($locales, $locale));
33 33
         }
Please login to merge, or discard this patch.
app/Console/CreateAdmin.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
         $firstname = null;
18 18
         $lastname = null;
19 19
 
20
-        while (! $firstname) {
20
+        while (!$firstname) {
21 21
             $firstname = $this->ask('firstname');
22 22
         }
23 23
 
24
-        while (! $lastname) {
24
+        while (!$lastname) {
25 25
             $lastname = $this->ask('lastname');
26 26
         }
27 27
 
@@ -31,22 +31,22 @@  discard block
 block discarded – undo
31 31
 
32 32
         if ($this->option('dev')) {
33 33
             $role = 'developer';
34
-        } else {
34
+        }else {
35 35
             $role = 'admin';
36 36
         }
37 37
 
38 38
         $this->createUser($firstname, $lastname, $email, $password, [$role]);
39 39
 
40
-        $this->info($firstname . ' ' . $lastname . ' succesfully added as admin user.');
40
+        $this->info($firstname.' '.$lastname.' succesfully added as admin user.');
41 41
     }
42 42
 
43 43
     private function settingPermissionsAndRoles(): void
44 44
     {
45
-        AuthorizationDefaults::permissions()->each(function ($permissionName) {
45
+        AuthorizationDefaults::permissions()->each(function($permissionName) {
46 46
             Artisan::call('chief:permission', ['name' => $permissionName]);
47 47
         });
48 48
 
49
-        AuthorizationDefaults::roles()->each(function ($defaultPermissions, $roleName) {
49
+        AuthorizationDefaults::roles()->each(function($defaultPermissions, $roleName) {
50 50
             Artisan::call('chief:role', ['name' => $roleName, '--permissions' => implode(',', $defaultPermissions)]);
51 51
         });
52 52
 
Please login to merge, or discard this patch.
app/Http/Controllers/Back/CommandPalette/CommandPaletteController.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
                 ) {
50 50
                     $resultGroup[$model->modelReference()->getShort()] = [
51 51
                         'label' => $model->title,
52
-                        'url' => '/admin/' . $model->managedModelKey() . '/' . $model->id . '/edit',
52
+                        'url' => '/admin/'.$model->managedModelKey().'/'.$model->id.'/edit',
53 53
                     ];
54 54
                 }
55 55
             }
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
 
60 60
                 // Add model index page to result group
61 61
                 array_push($resultGroup, [
62
-                    'label' => ucfirst($modelGroup['label']) . ' overzicht',
63
-                    'url' => '/admin/' . $firstModel->managedModelKey(),
62
+                    'label' => ucfirst($modelGroup['label']).' overzicht',
63
+                    'url' => '/admin/'.$firstModel->managedModelKey(),
64 64
                 ]);
65 65
 
66 66
                 // Add result group to search results
@@ -78,20 +78,20 @@  discard block
 block discarded – undo
78 78
     {
79 79
         // Can we generate this in a different way, or move these out of this method
80 80
         $adminPages = collect([
81
-            [ 'label' => 'Dashboard', 'url' => route('chief.back.dashboard'), 'permission' => null, 'tags' => ['home'], ],
82
-            [ 'label' => 'Menu', 'url' => route('chief.back.menus.index'), 'permission' => 'update-page', 'tags' => ['navigatie'], ],
83
-            [ 'label' => 'Media', 'url' => route('chief.mediagallery.index'), 'permission' => 'update-page', 'tags' => ['mediagalerij', 'mediabibliotheek', 'assets'], ],
84
-            [ 'label' => 'Teksten', 'url' => route('squanto.index'), 'permission' => 'view-squanto', 'tags' => ['squanto', 'mediagalerij', 'mediabibliotheek', 'assets'], ],
85
-            [ 'label' => 'Sitemap', 'url' => route('chief.back.sitemap.show'), 'permission' => null, 'tags' => [], ],
86
-            [ 'label' => 'Admins', 'url' => route('chief.back.users.index'), 'permission' => 'view-user', 'tags' => [], ],
87
-            [ 'label' => 'Rechten', 'url' => route('chief.back.roles.index'), 'permission' => 'view-role', 'tags' => ['roles'], ],
88
-            [ 'label' => 'Settings', 'url' => route('chief.back.settings.edit'), 'permission' => 'update-setting', 'tags' => ['instellingen'], ],
89
-            [ 'label' => 'Audit', 'url' => route('chief.back.audit.index'), 'permission' => 'view-audit', 'tags' => [], ],
90
-            [ 'label' => chiefAdmin()->firstname, 'url' => route('chief.back.you.edit'), 'permission' => 'update-you', 'tags' => ['account'], ],
91
-            [ 'label' => 'Logout', 'url' => route('chief.back.logout'), 'permission' => null, 'tags' => [], ],
81
+            ['label' => 'Dashboard', 'url' => route('chief.back.dashboard'), 'permission' => null, 'tags' => ['home'], ],
82
+            ['label' => 'Menu', 'url' => route('chief.back.menus.index'), 'permission' => 'update-page', 'tags' => ['navigatie'], ],
83
+            ['label' => 'Media', 'url' => route('chief.mediagallery.index'), 'permission' => 'update-page', 'tags' => ['mediagalerij', 'mediabibliotheek', 'assets'], ],
84
+            ['label' => 'Teksten', 'url' => route('squanto.index'), 'permission' => 'view-squanto', 'tags' => ['squanto', 'mediagalerij', 'mediabibliotheek', 'assets'], ],
85
+            ['label' => 'Sitemap', 'url' => route('chief.back.sitemap.show'), 'permission' => null, 'tags' => [], ],
86
+            ['label' => 'Admins', 'url' => route('chief.back.users.index'), 'permission' => 'view-user', 'tags' => [], ],
87
+            ['label' => 'Rechten', 'url' => route('chief.back.roles.index'), 'permission' => 'view-role', 'tags' => ['roles'], ],
88
+            ['label' => 'Settings', 'url' => route('chief.back.settings.edit'), 'permission' => 'update-setting', 'tags' => ['instellingen'], ],
89
+            ['label' => 'Audit', 'url' => route('chief.back.audit.index'), 'permission' => 'view-audit', 'tags' => [], ],
90
+            ['label' => chiefAdmin()->firstname, 'url' => route('chief.back.you.edit'), 'permission' => 'update-you', 'tags' => ['account'], ],
91
+            ['label' => 'Logout', 'url' => route('chief.back.logout'), 'permission' => null, 'tags' => [], ],
92 92
         ]);
93 93
 
94
-        $results = $adminPages->filter(function ($adminPage) use ($term) {
94
+        $results = $adminPages->filter(function($adminPage) use ($term) {
95 95
             // TODO: check if current user has necessary permissions to view page
96 96
             // if(! chiefAdmin()->hasPermissionTo($adminPage['permission'])) {
97 97
             //     return false;
@@ -103,14 +103,14 @@  discard block
 block discarded – undo
103 103
             }
104 104
 
105 105
             // Check if any of tags contain search term
106
-            if (collect($adminPage['tags'])->contains(function ($tag) use ($term) {
106
+            if (collect($adminPage['tags'])->contains(function($tag) use ($term) {
107 107
                 return Str::contains(Str::lower($tag), $term);
108 108
             })) {
109 109
                 return true;
110 110
             };
111 111
 
112 112
             return false;
113
-        })->map(function ($adminPage) {
113
+        })->map(function($adminPage) {
114 114
             return [
115 115
                 'label' => $adminPage['label'],
116 116
                 'url' => $adminPage['url'],
@@ -133,10 +133,10 @@  discard block
 block discarded – undo
133 133
     {
134 134
         return collect(app(Registry::class)->models())
135 135
             // Filter out fragment models
136
-            ->filter(function ($model) {
137
-                return ! in_array('Thinktomorrow\Chief\Fragments\Fragmentable', class_implements($model));
136
+            ->filter(function($model) {
137
+                return !in_array('Thinktomorrow\Chief\Fragments\Fragmentable', class_implements($model));
138 138
                 // Return all instances of the models
139
-            })->map(function ($model) {
139
+            })->map(function($model) {
140 140
                 $models = $model::all();
141 141
 
142 142
                 return [
Please login to merge, or discard this patch.