Test Setup Failed
Push — 0.7 ( 098c24...38226e )
by
unknown
05:57
created
app/Http/Middleware/OptimizeImages.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@
 block discarded – undo
12 12
     {
13 13
         $optimizerChain = app(OptimizerChain::class);
14 14
 
15
-        collect($request->allFiles())->each(function ($file) use ($optimizerChain) {
15
+        collect($request->allFiles())->each(function($file) use ($optimizerChain) {
16 16
             if (is_array($file)) {
17
-                collect($file)->each(function ($media) use ($optimizerChain) {
17
+                collect($file)->each(function($media) use ($optimizerChain) {
18 18
                     $optimizerChain->optimize($media->getPathname());
19 19
                 });
20
-            } else {
20
+            }else {
21 21
                 $optimizerChain->optimize($file->getPathname());
22 22
             }
23 23
         });
Please login to merge, or discard this patch.
app/Http/Requests/MenuRequest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
                 continue;
49 49
             }
50 50
 
51
-            $rules['trans.' . $locale . '.label'] = 'required';
52
-            if ($this->request->get('trans.' . $locale . '.url') != null) {
53
-                $rules['trans.' . $locale . '.url'] = 'url';
51
+            $rules['trans.'.$locale.'.label'] = 'required';
52
+            if ($this->request->get('trans.'.$locale.'.url') != null) {
53
+                $rules['trans.'.$locale.'.url'] = 'url';
54 54
             }
55 55
         }
56 56
 
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
         $attributes = [];
63 63
 
64 64
         foreach (array_keys($this->request->get('trans', [])) as $locale) {
65
-            $attributes['trans.' . $locale . '.label'] = $locale . ' label';
66
-            $attributes['trans.' . $locale . '.url'] = $locale . ' link';
65
+            $attributes['trans.'.$locale.'.label'] = $locale.' label';
66
+            $attributes['trans.'.$locale.'.url'] = $locale.' link';
67 67
         }
68 68
 
69 69
         $attributes['owner_reference'] = 'Interne pagina';
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
 
95 95
             // Check if it is a relative
96 96
             if ($this->isRelativeUrl($trans['url'])) {
97
-                $data['trans'][$locale]['url'] = '/' . trim($trans['url'], '/');
98
-            } else {
97
+                $data['trans'][$locale]['url'] = '/'.trim($trans['url'], '/');
98
+            }else {
99 99
                 $data['trans'][$locale]['url'] = Url::fromString($trans['url'])->secure()->get();
100 100
             }
101 101
 
@@ -112,6 +112,6 @@  discard block
 block discarded – undo
112 112
         // Check if passed url is not intended as a host instead of a relative path
113 113
         $notIntentedAsRoot = (null == Root::fromString($url)->scheme() && false === strpos($url, '.'));
114 114
 
115
-        return ($notIntentedAsRoot && in_array($url, [$nakedUrl, '/' . $nakedUrl]));
115
+        return ($notIntentedAsRoot && in_array($url, [$nakedUrl, '/'.$nakedUrl]));
116 116
     }
117 117
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Api/InternalLinksController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@
 block discarded – undo
18 18
 
19 19
         $onlineModels = UrlHelper::onlineModels();
20 20
 
21
-        $links = $onlineModels->reject(function (Visitable $model) {
22
-            return ! $model->url();
23
-        })->map(function ($model) {
21
+        $links = $onlineModels->reject(function(Visitable $model) {
22
+            return !$model->url();
23
+        })->map(function($model) {
24 24
             $name = (method_exists($model, 'menuLabel') && $model->menuLabel()) ? $model->menuLabel() : (isset($model->title) ? $model->title : $model->url());
25 25
 
26 26
             return [
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
@@ -21,10 +21,10 @@
 block discarded – undo
21 21
 
22 22
         $excluded = isset($request->query()['excluded']) ? explode(",", $request->query()['excluded']) : $excluded;
23 23
 
24
-        $links = Asset::with('media')->orderBy('created_at', 'DESC')->whereNotIn('id', $excluded)->whereHas('media', function (Builder $query) use ($search) {
24
+        $links = Asset::with('media')->orderBy('created_at', 'DESC')->whereNotIn('id', $excluded)->whereHas('media', function(Builder $query) use ($search) {
25 25
             $query->where('mime_type', 'LIKE', '%image%');
26
-            $query->where('name', 'LIKE', '%' . $search . '%');
27
-        })->offset($offset)->limit($limit)->get()->map(function ($asset) {
26
+            $query->where('name', 'LIKE', '%'.$search.'%');
27
+        })->offset($offset)->limit($limit)->get()->map(function($asset) {
28 28
             return [
29 29
                 "id" => $asset->id,
30 30
                 "url" => $asset->url(),
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/ResetPasswordController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
         // Here we will attempt to reset the user's password. If it is successful we
66 66
         // will update the password on an actual user model and persist it to the
67 67
         // database. Otherwise we will parse the error and return the response.
68
-        $response = $this->broker()->reset($this->credentials($request), function ($user, $password) {
68
+        $response = $this->broker()->reset($this->credentials($request), function($user, $password) {
69 69
             $this->resetPassword($user, $password);
70 70
         });
71 71
 
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/ChangePasswordController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
         $user = auth()->guard('chief')->user();
18 18
 
19
-        return view('chief::admin.auth.passwords.edit', ['new_password' => ! $user->password]);
19
+        return view('chief::admin.auth.passwords.edit', ['new_password' => !$user->password]);
20 20
     }
21 21
 
22 22
     public function update(Request $request)
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
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $this->authorize('create-page');
32 32
 
33 33
         $menuitem = new MenuItem();
34
-        $menuitem->type = MenuItem::TYPE_INTERNAL;  // Default menu type
34
+        $menuitem->type = MenuItem::TYPE_INTERNAL; // Default menu type
35 35
         $menuitem->menu_type = $menutype;
36 36
 
37 37
         $menuitems = $this->prepareMenuItemsForAdminSelect->prepare(ChiefMenu::fromMenuItems($menuitem->menuType())->items());
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             ->performedOn($menu)
55 55
             ->log('created');
56 56
 
57
-        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label . ' is aangemaakt');
57
+        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label.' is aangemaakt');
58 58
     }
59 59
 
60 60
     /**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             ->performedOn($menu)
87 87
             ->log('updated');
88 88
 
89
-        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label . ' is aangepast');
89
+        return redirect()->route('chief.back.menus.show', $menu->menu_type)->with('messages.success', $menu->label.' is aangepast');
90 90
     }
91 91
 
92 92
     public function destroy($id)
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                 ->log('deleted');
104 104
 
105 105
             return redirect()->route('chief.back.menus.show', $menuItem->menuType())->with('messages.warning', $message);
106
-        } else {
106
+        }else {
107 107
             return redirect()->back()->with('messages.warning', 'Je menu item is niet verwijderd. Probeer opnieuw');
108 108
         }
109 109
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Back/Authorization/RoleController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $role->givePermissionTo($request->permission_names);
49 49
 
50 50
         return redirect()->route('chief.back.roles.index')
51
-                         ->with('messages.success', 'Rol ' . $role->name . ' is toegevoegd.');
51
+                            ->with('messages.success', 'Rol ' . $role->name . ' is toegevoegd.');
52 52
     }
53 53
 
54 54
     /**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $role->givePermissionTo($request->permission_names);
49 49
 
50 50
         return redirect()->route('chief.back.roles.index')
51
-                         ->with('messages.success', 'Rol ' . $role->name . ' is toegevoegd.');
51
+                         ->with('messages.success', 'Rol '.$role->name.' is toegevoegd.');
52 52
     }
53 53
 
54 54
     /**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $this->authorize('update-role');
70 70
 
71 71
         $this->validate($request, [
72
-            'name' => 'required|alpha_dash|unique:roles,name,' . $id,
72
+            'name' => 'required|alpha_dash|unique:roles,name,'.$id,
73 73
             'permission_names' => 'required|array',
74 74
             'permission_names.*' => 'required', // Avoid null array entry
75 75
         ]);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $role->syncPermissions($request->permission_names);
81 81
 
82 82
         return redirect()->route('chief.back.roles.index')
83
-            ->with('messages.success', 'Rol ' . $role->name . ' is aangepast.');
83
+            ->with('messages.success', 'Rol '.$role->name.' is aangepast.');
84 84
     }
85 85
 
86 86
     public function destroy($id)
@@ -91,6 +91,6 @@  discard block
 block discarded – undo
91 91
         $role->delete();
92 92
 
93 93
         return redirect()->route('chief.back.roles.index')
94
-            ->with('messages.success', 'Rol ' . $role->name . ' is verwijderd.');
94
+            ->with('messages.success', 'Rol '.$role->name.' is verwijderd.');
95 95
     }
96 96
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Back/Authorization/PermissionController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $roles = $request['roles'];
49 49
 
50 50
         $permission->save();
51
-        if (! empty($request['roles'])) {
51
+        if (!empty($request['roles'])) {
52 52
             foreach ($roles as $role) {
53 53
                 $r = Role::where('id', '=', $role)->firstOrFail(); //Match input role to db record
54 54
                 $permission = Permission::where('name', '=', $name)->first();
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         }
58 58
 
59 59
         return redirect()->route('chief.back.permissions.index')
60
-            ->with('flash_message',     'Permission' . $permission->name . ' added!');
60
+            ->with('flash_message', 'Permission'.$permission->name.' added!');
61 61
     }
62 62
     /**
63 63
      * Display the specified resource.
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $permission->fill($input)->save();
102 102
 
103 103
         return redirect()->route('chief.back.permissions.index')
104
-            ->with('flash_message',     'Permission' . $permission->name . ' updated!');
104
+            ->with('flash_message', 'Permission'.$permission->name.' updated!');
105 105
     }
106 106
     /**
107 107
      * Remove the specified resource from storage.
@@ -115,12 +115,12 @@  discard block
 block discarded – undo
115 115
 
116 116
         if ($permission->name == "Administer roles & permissions") {
117 117
             return redirect()->route('chief.back.permissions.index')
118
-                ->with('flash_message',         'Cannot delete this Permission!');
118
+                ->with('flash_message', 'Cannot delete this Permission!');
119 119
         }
120 120
 
121 121
         $permission->delete();
122 122
 
123 123
         return redirect()->route('chief.back.permissions.index')
124
-            ->with('flash_message',     'Permission deleted!');
124
+            ->with('flash_message', 'Permission deleted!');
125 125
     }
126 126
 }
Please login to merge, or discard this patch.