mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 21:23:36 +00:00
Autoformat lol
This commit is contained in:
@@ -47,7 +47,7 @@ class UpdateRequest extends FormRequest
|
||||
'title' => ['title', 'convertString'],
|
||||
'notes' => ['notes', 'stringWithNewlines'],
|
||||
'attachable_type' => ['attachable_type', 'convertString'],
|
||||
'attachable_id' => ['attachable_id', 'convertInteger'],
|
||||
'attachable_id' => ['attachable_id', 'convertInteger']
|
||||
];
|
||||
|
||||
return $this->getAllData($fields);
|
||||
@@ -59,10 +59,7 @@ class UpdateRequest extends FormRequest
|
||||
public function rules(): array
|
||||
{
|
||||
$models = config('firefly.valid_attachment_models');
|
||||
$models = array_map(
|
||||
static fn (string $className): string => str_replace('FireflyIII\Models\\', '', $className),
|
||||
$models
|
||||
);
|
||||
$models = array_map(static fn(string $className): string => str_replace('FireflyIII\Models\\', '', $className), $models);
|
||||
$models = implode(',', $models);
|
||||
$model = $this->convertString('attachable_type');
|
||||
|
||||
@@ -71,7 +68,7 @@ class UpdateRequest extends FormRequest
|
||||
'title' => ['min:1', 'max:255'],
|
||||
'notes' => 'min:1|max:32768',
|
||||
'attachable_type' => sprintf('in:%s', $models),
|
||||
'attachable_id' => ['numeric', new IsValidAttachmentModel($model)],
|
||||
'attachable_id' => ['numeric', new IsValidAttachmentModel($model)]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user