Test Setup Failed
Pull Request — master (#1261)
by Ben
17:49 queued 10:03
created
Category
app/Http/Middleware/VerifyCsrfToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         $adminRoute = config('chief.route.prefix', '/admin');
21 21
 
22 22
         // Add exception routes for all chief admin endpoints.
23
-        $this->except[] = rtrim($adminRoute, '/') . '/*';
23
+        $this->except[] = rtrim($adminRoute, '/').'/*';
24 24
 
25 25
         return parent::handle($request, $next);
26 26
     }
Please login to merge, or discard this patch.
app/Http/Middleware/AuthenticateSuperadmin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,10 +38,10 @@
 block discarded – undo
38 38
     {
39 39
         // Low level way to only allow TT users
40 40
         // this is not a safe way to handle security and is only used for convenience, not to secure page restriction!!
41
-        if (! $this->auth->user() || ! $this->authorize('update-squanto')) {
41
+        if (!$this->auth->user() || !$this->authorize('update-squanto')) {
42 42
             if ($request->ajax()) {
43 43
                 return response('Unauthorized.', 401);
44
-            } else {
44
+            }else {
45 45
                 return redirect()->guest('admin/login');
46 46
             }
47 47
         }
Please login to merge, or discard this patch.
app/Http/Middleware/PermissionMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
             return redirect('/');
21 21
         }
22 22
 
23
-        if (! $request->user('chief')->can($permission)) {
23
+        if (!$request->user('chief')->can($permission)) {
24 24
             abort(403);
25 25
         }
26 26
 
Please login to merge, or discard this patch.
app/Console/BaseCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         $password = $passwordConfirm = null;
30 30
         $tries = 0;
31 31
 
32
-        while (! $password || strlen($password) < 4 || $password != $passwordConfirm) {
32
+        while (!$password || strlen($password) < 4 || $password != $passwordConfirm) {
33 33
             if ($tries > 2) {
34 34
                 throw new \Exception('Aborting. Too many failed attempts to set password');
35 35
             }
Please login to merge, or discard this patch.
app/Console/RefreshDatabase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         }
18 18
 
19 19
         if ($this->option('reset')) {
20
-            if (! $this->confirm('You are about to force reset the database in the ' . app()->environment() . ' environment! ARE YOU SURE?')) {
20
+            if (!$this->confirm('You are about to force reset the database in the '.app()->environment().' environment! ARE YOU SURE?')) {
21 21
                 $this->info('aborting.');
22 22
 
23 23
                 return;
Please login to merge, or discard this patch.
app/Console/Seed.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@  discard block
 block discarded – undo
14 14
      */
15 15
     public function handle()
16 16
     {
17
-        if (app()->environment() != 'local' && ! $this->option('force')) {
17
+        if (app()->environment() != 'local' && !$this->option('force')) {
18 18
             throw new \Exception('You can only run the seeder in the local environment since this will inject a ton of default data');
19 19
         }
20 20
 
21 21
         if (app()->environment() != 'local' && $this->option('force')) {
22
-            if (! $this->confirm('You are about to inject default seeding data in the ' . app()->environment() . ' database! Are you sure?')) {
22
+            if (!$this->confirm('You are about to inject default seeding data in the '.app()->environment().' database! Are you sure?')) {
23 23
                 $this->info('You are welcome. I have just saved your job.');
24 24
 
25 25
                 return;
@@ -29,6 +29,6 @@  discard block
 block discarded – undo
29 29
         $seederClass = $this->argument('seeder');
30 30
         app($seederClass)->run();
31 31
 
32
-        $this->info($seederClass . ' has run successfully.');
32
+        $this->info($seederClass.' has run successfully.');
33 33
     }
34 34
 }
Please login to merge, or discard this patch.
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/Http/Controllers/Back/Menu/MenuItemController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         $this->authorize('create-page');
33 33
 
34 34
         $menuitem = new MenuItem();
35
-        $menuitem->type = MenuItem::TYPE_INTERNAL;  // Default menu type
35
+        $menuitem->type = MenuItem::TYPE_INTERNAL; // Default menu type
36 36
         $menuitem->menu_type = $menutype;
37 37
 
38 38
         $menuitems = $this->prepareMenuItemsForAdminSelect->prepare(
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             ->performedOn($menu)
58 58
             ->log('created');
59 59
 
60
-        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label . ' is aangemaakt');
60
+        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label.' is aangemaakt');
61 61
     }
62 62
 
63 63
     /**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             ->performedOn($menu)
96 96
             ->log('updated');
97 97
 
98
-        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label . ' is aangepast');
98
+        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label.' is aangepast');
99 99
     }
100 100
 
101 101
     public function destroy($id)
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                 ->log('deleted');
113 113
 
114 114
             return redirect()->route('chief.back.menus.show', $menuItem->menuType())->with('messages.warning', $message);
115
-        } else {
115
+        }else {
116 116
             return redirect()->back()->with('messages.warning', 'Je menu item is niet verwijderd. Probeer opnieuw');
117 117
         }
118 118
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Api/MediaGalleryController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@
 block discarded – undo
25 25
         $links = Asset::with('media')
26 26
             ->orderBy('created_at', 'DESC')
27 27
             ->whereNotIn('id', $excluded)
28
-            ->whereHas('media', function (Builder $query) use ($search) {
28
+            ->whereHas('media', function(Builder $query) use ($search) {
29 29
                 $query->where('mime_type', 'LIKE', '%image%');
30
-                $query->where('name', 'LIKE', '%' . $search . '%');
30
+                $query->where('name', 'LIKE', '%'.$search.'%');
31 31
             })
32 32
             ->offset($offset)
33 33
             ->limit($limit)
34 34
             ->get()
35
-            ->map(function ($asset) use ($conversion) {
35
+            ->map(function($asset) use ($conversion) {
36 36
                 return [
37 37
                     "id" => $asset->id,
38 38
                     "url" => $asset->url($conversion),
Please login to merge, or discard this patch.