Test Setup Failed
Push — a-simpler-manager ( 964eee...986de8 )
by Ben
07:36
created
src/ManagedModels/Fields/Types/AllowsTags.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
     public function tagged($tag): bool
10 10
     {
11
-        $tags = (array) $tag;
11
+        $tags = (array)$tag;
12 12
 
13 13
         return count(array_intersect($this->tags, $tags)) > 0;
14 14
     }
Please login to merge, or discard this patch.
src/ManagedModels/Fields/Types/ImageField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     {
21 21
         return (new static(new FieldType(FieldType::IMAGE), $key))
22 22
             ->locales([config('app.fallback_locale', 'nl')])
23
-            ->valueResolver(function ($model = null, $locale = null, ImageField $field) {
23
+            ->valueResolver(function($model = null, $locale = null, ImageField $field) {
24 24
                 return $field->getMedia($model, $locale);
25 25
             });
26 26
     }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $images = [];
40 40
         $locale = $locale ?? app()->getLocale();
41 41
 
42
-        $assets = $model->assetRelation->where('pivot.type', $this->getKey())->filter(function ($asset) use ($locale) {
42
+        $assets = $model->assetRelation->where('pivot.type', $this->getKey())->filter(function($asset) use ($locale) {
43 43
             return $asset->pivot->locale == $locale;
44 44
         })->sortBy('pivot.order');
45 45
 
Please login to merge, or discard this patch.
src/ManagedModels/Fields/Types/FileField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         return (new static(new FieldType(FieldType::FILE), $key))
23 23
             ->locales([config('app.fallback_locale', 'nl')])
24
-            ->valueResolver(function ($model = null, $locale = null, FileField $field) {
24
+            ->valueResolver(function($model = null, $locale = null, FileField $field) {
25 25
                 return $field->getMedia($model, $locale);
26 26
             });
27 27
     }
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $files = [];
36 36
         $locale = $locale ?? app()->getLocale();
37 37
 
38
-        $assets = $model->assetRelation->where('pivot.type', $this->getKey())->filter(function ($asset) use ($locale) {
38
+        $assets = $model->assetRelation->where('pivot.type', $this->getKey())->filter(function($asset) use ($locale) {
39 39
             return $asset->pivot->locale == $locale;
40 40
         })->sortBy('pivot.order');
41 41
 
Please login to merge, or discard this patch.
src/ManagedModels/Fields/Types/AbstractField.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
      */
264 264
     private function defaultEloquentValueResolver(): \Closure
265 265
     {
266
-        return function (Model $model = null, $locale = null) {
266
+        return function(Model $model = null, $locale = null) {
267 267
             if ($this->value) {
268 268
                 return $this->value;
269 269
             }
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 
421 421
         return $this->isLocalized()
422 422
             ? 'chief::back._formgroups.fieldgroup_translatable'
423
-            : 'chief::back._fields.' . $this->type->get();
423
+            : 'chief::back._fields.'.$this->type->get();
424 424
     }
425 425
 
426 426
     public function viewData(array $viewData = []): Field
Please login to merge, or discard this patch.
src/ManagedModels/Fields/Types/FieldType.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@
 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)
9
+    const INPUT = 'input'; // oneliner text (input)
10
+    const TEXT = 'text'; // Plain text (textarea)
11 11
     const NUMBER = 'number'; // number
12 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
-    const FILE = 'file';  // regular file
18
-    const IMAGE = 'image';  // image (slim uploader)
19
-    const RADIO = 'radio';  // radio select
20
-    const CHECKBOX = 'checkbox';  // checkbox select
21
-    const PAGEBUILDER = 'pagebuilder';  // the most special field there is...
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
+    const FILE = 'file'; // regular file
18
+    const IMAGE = 'image'; // image (slim uploader)
19
+    const RADIO = 'radio'; // radio select
20
+    const CHECKBOX = 'checkbox'; // checkbox select
21
+    const PAGEBUILDER = 'pagebuilder'; // the most special field there is...
22 22
     const FRAGMENT = 'fragment';
23 23
     const PAGE = 'page'; // select a page (also a special field)
24 24
 
Please login to merge, or discard this patch.
src/ManagedModels/Fields/FieldName.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
             return $value;
80 80
         }
81 81
 
82
-        $value = str_replace('.', '][', $value) . ']';
82
+        $value = str_replace('.', '][', $value).']';
83 83
 
84 84
         return substr_replace($value, '', strpos($value, ']'), 1);
85 85
     }
Please login to merge, or discard this patch.
src/ManagedModels/Fields/ValidationRules/FileFieldMaxRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     protected function getSize($attribute, $value)
42 42
     {
43 43
         if (!$value instanceof File) {
44
-            throw new \InvalidArgumentException('Value is expected to be of type ' . File::class);
44
+            throw new \InvalidArgumentException('Value is expected to be of type '.File::class);
45 45
         }
46 46
 
47 47
         return $value->getSize() / 1024;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     private function addCustomValidationMessage($attribute, $params, $validator): void
56 56
     {
57 57
         $validator->setCustomMessages([
58
-            'filefield_max' => ':attribute is te groot en dient kleiner te zijn dan ' . implode(',', $params) . 'Kb.',
58
+            'filefield_max' => ':attribute is te groot en dient kleiner te zijn dan '.implode(',', $params).'Kb.',
59 59
         ]);
60 60
 
61 61
         if (!isset($validator->customAttributes[$attribute])) {
Please login to merge, or discard this patch.
src/ManagedModels/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/ManagedModels/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.