Passed
Push — analysis-d0javj ( beb222 )
by Philippe
76:14 queued 64:26
created
src/Fields/Types/DocumentField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
             return preg_replace('#(:locale)#', $locale, $name);
29 29
         }
30 30
 
31
-        return 'files[' . $name . '][' . $locale . ']';
31
+        return 'files['.$name.']['.$locale.']';
32 32
     }
33 33
 
34 34
     public function getFieldValue(Model $model, $locale = null)
Please login to merge, or discard this patch.
src/Fields/Types/CheckboxField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\Fields\Types;
4 4
 
Please login to merge, or discard this patch.
src/Fields/Types/Field.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\Fields\Types;
4 4
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
     public function optional(): bool
78 78
     {
79
-        return ! $this->required();
79
+        return !$this->required();
80 80
     }
81 81
 
82 82
     public function name(string $name = null)
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
     private function defaultValueResolver(): callable
159 159
     {
160
-        return function (Model $model, $locale) {
160
+        return function(Model $model, $locale) {
161 161
             if ($this->isTranslatable() && $locale) {
162 162
                 return $model->getTranslationFor($this->column(), $locale);
163 163
             }
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         }
233 233
 
234 234
         if (!in_array($name, ['label', 'key', 'description', 'column', 'name', 'prepend', 'append'])) {
235
-            throw new \InvalidArgumentException('Cannot set value by ['. $name .'].');
235
+            throw new \InvalidArgumentException('Cannot set value by ['.$name.'].');
236 236
         }
237 237
 
238 238
         $this->values[$name] = $arguments[0];
Please login to merge, or discard this patch.
src/Fields/Types/MediaField.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\Fields\Types;
4 4
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             return $this;
39 39
         }
40 40
 
41
-        return 'files['. ($this->values['name'] ?? $this->key()).']';
41
+        return 'files['.($this->values['name'] ?? $this->key()).']';
42 42
     }
43 43
 
44 44
     public function sluggifyName()
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $images = [];
57 57
         $locale = $locale ?? app()->getLocale();
58 58
 
59
-        $assets = $model->assetRelation->where('pivot.type', $this->key())->filter(function ($asset) use ($locale) {
59
+        $assets = $model->assetRelation->where('pivot.type', $this->key())->filter(function($asset) use ($locale) {
60 60
             return $asset->pivot->locale == $locale;
61 61
         })->sortBy('pivot.order');
62 62
 
Please login to merge, or discard this patch.
src/Filters/Filter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\Filters;
4 4
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function render(array $requestInput = []): string
50 50
     {
51
-        $path = $this->viewpath ?? 'chief::back._filters.' . $this->type;
51
+        $path = $this->viewpath ?? 'chief::back._filters.'.$this->type;
52 52
         $this->default($requestInput[$this->name] ?? null);
53 53
 
54 54
         return view($path, ['filter' => $this])->render();
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         }
63 63
 
64 64
         if (!in_array($name, ['name', 'label', 'description', 'query', 'viewpath', 'default'])) {
65
-            throw new \InvalidArgumentException('Cannot set value by ['. $name .'].');
65
+            throw new \InvalidArgumentException('Cannot set value by ['.$name.'].');
66 66
         }
67 67
 
68 68
         $this->values[$name] = $arguments[0];
Please login to merge, or discard this patch.
src/Management/Assistants/UrlAssistant.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                         'url-slugs.*' => 'taalspecifieke link',
53 53
                     ])
54 54
                 ->view('chief::back._fields.url-slugs')
55
-                ->viewData(['fields' => UrlSlugFields::fromModel($this->manager->hasExistingModel() ? $this->manager->existingModel() : $this->manager->modelInstance()) ]),
55
+                ->viewData(['fields' => UrlSlugFields::fromModel($this->manager->hasExistingModel() ? $this->manager->existingModel() : $this->manager->modelInstance())]),
56 56
         ]);
57 57
     }
58 58
 
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
 
63 63
         // Push update to homepage setting value
64 64
         // TODO: we should just fetch the homepages and push that instead...
65
-        UrlRecord::getByModel($this->manager->existingModel())->reject(function ($record) {
65
+        UrlRecord::getByModel($this->manager->existingModel())->reject(function($record) {
66 66
             return ($record->isRedirect() || !$record->isHomepage());
67
-        })->each(function ($record) {
67
+        })->each(function($record) {
68 68
             app(ChangeHomepage::class)->onUrlChanged($record);
69 69
         });
70 70
     }
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 
77 77
     private function validateModel()
78 78
     {
79
-        if (! $this->manager->existingModel() instanceof ProvidesUrl) {
80
-            throw new \Exception('UrlAssistant requires the model interfaced by ' . ProvidesUrl::class . '.');
79
+        if (!$this->manager->existingModel() instanceof ProvidesUrl) {
80
+            throw new \Exception('UrlAssistant requires the model interfaced by '.ProvidesUrl::class.'.');
81 81
         }
82 82
     }
83 83
 }
Please login to merge, or discard this patch.
src/Snippets/FileLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\Snippets;
4 4
 
Please login to merge, or discard this patch.
src/HealthMonitor/Notifiers/AlertBarNotifier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\HealthMonitor\Notifiers;
4 4
 
Please login to merge, or discard this patch.
src/Fields/Types/TextField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Thinktomorrow\Chief\Fields\Types;
4 4
 
Please login to merge, or discard this patch.