Test Failed
Pull Request — master (#293)
by Philippe
26:27 queued 17:40
created
src/Fields/ValidationRules/ImageFieldMaxRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
     private function addCustomValidationMessage($attribute, $params, $validator): void
60 60
     {
61 61
         $validator->setCustomMessages([
62
-            'imagefield_max' => ':attribute is te groot en dient kleiner te zijn dan ' . implode(',', $params) . 'Kb.',
62
+            'imagefield_max' => ':attribute is te groot en dient kleiner te zijn dan '.implode(',', $params).'Kb.',
63 63
         ]);
64 64
 
65 65
         if (!isset($validator->customAttributes[$attribute])) {
Please login to merge, or discard this patch.
src/Fields/ValidationRules/FileFieldMimetypesRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     private function addCustomValidationMessage($attribute, $params, $validator): void
39 39
     {
40 40
         $validator->setCustomMessages([
41
-            'filefield_mimetypes' => ':attribute is niet het juiste bestandstype. Volgende types zijn geldig: ' . implode(', ', $params),
41
+            'filefield_mimetypes' => ':attribute is niet het juiste bestandstype. Volgende types zijn geldig: '.implode(', ', $params),
42 42
         ]);
43 43
 
44 44
         if (!isset($validator->customAttributes[$attribute])) {
Please login to merge, or discard this patch.
src/Fields/ValidationRules/ImageFieldMinRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     private function addCustomValidationMessage($attribute, $params, $validator): void
55 55
     {
56 56
         $validator->setCustomMessages([
57
-            'imagefield_min' => ':attribute is te klein en dient groter te zijn dan ' . implode(',', $params) . 'Kb.',
57
+            'imagefield_min' => ':attribute is te klein en dient groter te zijn dan '.implode(',', $params).'Kb.',
58 58
         ]);
59 59
 
60 60
         if (!isset($validator->customAttributes[$attribute])) {
Please login to merge, or discard this patch.
src/Fields/ValidationRules/ImageFieldMimetypesRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         $mimetype = json_decode($value)->output->type;
39 39
 
40 40
         return (in_array($mimetype, $parameters) ||
41
-            in_array(explode('/', $mimetype)[0] . '/*', $parameters));
41
+            in_array(explode('/', $mimetype)[0].'/*', $parameters));
42 42
     }
43 43
 
44 44
     /**
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     private function addCustomValidationMessage($attribute, $params, $validator): void
50 50
     {
51 51
         $validator->setCustomMessages([
52
-            'imagefield_mimetypes' => ':attribute is niet het juiste bestandstype. Volgende types zijn geldig: ' . implode(', ', $params),
52
+            'imagefield_mimetypes' => ':attribute is niet het juiste bestandstype. Volgende types zijn geldig: '.implode(', ', $params),
53 53
         ]);
54 54
 
55 55
         if (!isset($validator->customAttributes[$attribute])) {
Please login to merge, or discard this patch.
src/Management/Assistants/PublishAssistant.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             ->performedOn($this->manager->existingModel())
62 62
             ->log('published');
63 63
 
64
-        return redirect()->back()->with('messages.success', $this->manager->details()->title . ' is online gezet.');
64
+        return redirect()->back()->with('messages.success', $this->manager->details()->title.' is online gezet.');
65 65
     }
66 66
 
67 67
     public function unpublish()
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
             ->performedOn($this->manager->existingModel())
76 76
             ->log('unpublished');
77 77
 
78
-        return redirect()->back()->with('messages.success', $this->manager->details()->title . ' is offline gehaald.');
78
+        return redirect()->back()->with('messages.success', $this->manager->details()->title.' is offline gehaald.');
79 79
     }
80 80
 
81 81
     public function findAll(): Collection
82 82
     {
83
-        return $this->manager->existingModel()->published()->get()->map(function ($model) {
83
+        return $this->manager->existingModel()->published()->get()->map(function($model) {
84 84
             return $this->managers->findByModel($model);
85 85
         });
86 86
     }
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
             $class = 'text-warning';
138 138
         }
139 139
 
140
-        $statusAsLabel = '<span class="' . $class . '">' . $label . '</span>';
140
+        $statusAsLabel = '<span class="'.$class.'">'.$label.'</span>';
141 141
 
142 142
         if (!$plain && $this->hasPreviewUrl()) {
143
-            $statusAsLabel = '<a href="' . $this->previewUrl() . '" target="_blank">' . $statusAsLabel . '</a>';
143
+            $statusAsLabel = '<a href="'.$this->previewUrl().'" target="_blank">'.$statusAsLabel.'</a>';
144 144
         }
145 145
 
146 146
         return $statusAsLabel;
Please login to merge, or discard this patch.
src/Media/Application/AbstractMediaFieldHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
141 141
             return $filename;
142 142
         }
143 143
 
144
-        $extension = substr($filename, strrpos($filename, '.') + 1);
144
+        $extension = substr($filename, strrpos($filename, '.')+1);
145 145
         $filename = substr($filename, 0, strrpos($filename, '.'));
146 146
 
147
-        return Str::slug($filename) . '.' . $extension;
147
+        return Str::slug($filename).'.'.$extension;
148 148
     }
149 149
 
150 150
     protected function sort(HasAsset $model, MediaField $field, Request $request)
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
         $values = isset($fileIdInput[$key])
171 171
             ? $fileIdInput[$key]
172 172
             : (
173
-                isset($fileIdInput['files-' . $key])
174
-                ? $fileIdInput['files-' . $key]
173
+                isset($fileIdInput['files-'.$key])
174
+                ? $fileIdInput['files-'.$key]
175 175
                 : ''
176 176
             );
177 177
 
Please login to merge, or discard this patch.
src/Fields/Types/FieldType.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -6,22 +6,22 @@
 block discarded – undo
6 6
 
7 7
 class FieldType
8 8
 {
9
-    const INPUT       = 'input';        // oneliner text (input)
10
-    const TEXT        = 'text';         // Plain text (textarea)
11
-    const NUMBER      = 'number';       // number
12
-    const RANGE       = 'range';        // range slider
13
-    const DATE        = 'date';         // Timestamp input
14
-    const PHONENUMBER = 'phonenumber';  // Timestamp input
15
-    const HTML        = 'html';         // Html text (wysiwyg)
16
-    const SELECT      = 'select';       // Select options
9
+    const INPUT       = 'input'; // oneliner text (input)
10
+    const TEXT        = 'text'; // Plain text (textarea)
11
+    const NUMBER      = 'number'; // number
12
+    const RANGE       = 'range'; // range slider
13
+    const DATE        = 'date'; // Timestamp input
14
+    const PHONENUMBER = 'phonenumber'; // Timestamp input
15
+    const HTML        = 'html'; // Html text (wysiwyg)
16
+    const SELECT      = 'select'; // Select options
17 17
     //const MEDIA = 'media';  // media file
18
-    const FILE        = 'file';         // regular file
19
-    const IMAGE       = 'image';        // image (slim uploader)
20
-    const DOCUMENT    = 'document';     // documents
21
-    const RADIO       = 'radio';        // radio select
22
-    const CHECKBOX    = 'checkbox';     // checkbox select
23
-    const PAGEBUILDER = 'pagebuilder';  // the most special field there is...
24
-    const PAGE        = 'page';         // select a page (also a special field)
18
+    const FILE        = 'file'; // regular file
19
+    const IMAGE       = 'image'; // image (slim uploader)
20
+    const DOCUMENT    = 'document'; // documents
21
+    const RADIO       = 'radio'; // radio select
22
+    const CHECKBOX    = 'checkbox'; // checkbox select
23
+    const PAGEBUILDER = 'pagebuilder'; // the most special field there is...
24
+    const PAGE        = 'page'; // select a page (also a special field)
25 25
 
26 26
     /** @var string */
27 27
     private $type;
Please login to merge, or discard this patch.
src/Fields/Types/PageField.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@
 block discarded – undo
20 20
 
21 21
     public function options(array $morphKeys = [])
22 22
     {
23
-        if (! empty($morphKeys)) {
24
-            $morphKeys = collect($morphKeys)->map(function ($key) {
23
+        if (!empty($morphKeys)) {
24
+            $morphKeys = collect($morphKeys)->map(function($key) {
25 25
                 return (new $key())->getMorphClass();
26 26
             });
27 27
 
28 28
             $pages = UrlHelper::modelsByType($morphKeys->toArray())->get();
29 29
             $pages = FlatReferencePresenter::toGroupedSelectValues($pages)->toArray();
30
-        } else {
30
+        }else {
31 31
             $pages = UrlHelper::allModelsWithoutSelf($this->model);
32 32
         }
33 33
 
Please login to merge, or discard this patch.
src/Urls/UrlHelper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
     public static function modelsByType(array $types, Model $ignoredModel = null, $online = true)
77 77
     {
78
-        $models = chiefMemoize('all-online-models', function () use ($types, $online) {
78
+        $models = chiefMemoize('all-online-models', function() use ($types, $online) {
79 79
             $builder = UrlRecord::whereNull('redirect_id')
80 80
                 ->select('model_type', 'model_id')
81 81
                 ->groupBy('model_type', 'model_id');
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
                 $builder->whereIn('model_type', $types);
85 85
             }
86 86
 
87
-            return $builder->get()->mapToGroups(function ($record) {
87
+            return $builder->get()->mapToGroups(function($record) {
88 88
                 return [$record->model_type => $record->model_id];
89
-            })->map(function ($record, $key) {
89
+            })->map(function($record, $key) {
90 90
                 return Morphables::instance($key)->find($record->toArray());
91
-            })->map->reject(function ($model) use ($online) {
91
+            })->map->reject(function($model) use ($online) {
92 92
                 if ($online) {
93 93
                     return is_null($model) || !$model->isPublished();
94 94
                 } // Invalid references to archived or removed models where url record still exists.
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         });
99 99
 
100 100
         if ($ignoredModel) {
101
-            $models = $models->reject(function ($model) use ($ignoredModel) {
101
+            $models = $models->reject(function($model) use ($ignoredModel) {
102 102
                 return (get_class($model) === get_class($ignoredModel) && $model->id === $ignoredModel->id);
103 103
             });
104 104
         }
Please login to merge, or discard this patch.