From 722237f48667cd5c742b1f6b4d12c71da30b47f2 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Fri, 4 Jul 2025 20:20:59 +0200 Subject: [PATCH] Lint --- app/Form/Models/Form.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Form/Models/Form.php b/app/Form/Models/Form.php index ca2681b5..2f40c5db 100644 --- a/app/Form/Models/Form.php +++ b/app/Form/Models/Form.php @@ -74,20 +74,20 @@ class Form extends Model implements HasMedia { $this->addMediaCollection('headerImage') ->singleFile() - ->maxWidth(fn () => 500) - ->forceFileName(fn (Form $model, string $name) => $model->slug) - ->convert(fn () => 'jpg') + ->maxWidth(fn() => 500) + ->forceFileName(fn(Form $model, string $name) => $model->slug) + ->convert(fn() => 'jpg') ->registerMediaConversions(function (Media $media) { $this->addMediaConversion('square')->fit(Fit::Crop, 400, 400); }); $this->addMediaCollection('mailattachments') - ->withDefaultProperties(fn () => [ + ->withDefaultProperties(fn() => [ 'conditions' => [ 'mode' => 'all', 'ifs' => [] ], ]) - ->withPropertyValidation(fn () => [ + ->withPropertyValidation(fn() => [ 'conditions.mode' => 'required|string|in:all,any', 'conditions.ifs' => 'array', 'conditions.ifs.*.field' => 'required', @@ -101,7 +101,7 @@ class Form extends Model implements HasMedia */ public function getRegistrationRules(): array { - return $this->getFields()->reduce(fn ($carry, $field) => [ + return $this->getFields()->reduce(fn($carry, $field) => [ ...$carry, ...$field->getRegistrationRules($this), ], []); @@ -112,7 +112,7 @@ class Form extends Model implements HasMedia */ public function getRegistrationMessages(): array { - return $this->getFields()->reduce(fn ($carry, $field) => [ + return $this->getFields()->reduce(fn($carry, $field) => [ ...$carry, ...$field->getRegistrationMessages($this), ], []); @@ -123,7 +123,7 @@ class Form extends Model implements HasMedia */ public function getRegistrationAttributes(): array { - return $this->getFields()->reduce(fn ($carry, $field) => [ + return $this->getFields()->reduce(fn($carry, $field) => [ ...$carry, ...$field->getRegistrationAttributes($this), ], []);