From 98b6fa9b682a29eec798e5c1cc182ff145a80755 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Wed, 18 Oct 2023 10:00:35 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Data/Form/FormLayoutColumnData.php | 2 +- src/Data/Form/FormLayoutFieldsetData.php | 2 +- src/Data/LayoutFieldData.php | 2 +- src/Data/Show/ShowLayoutColumnData.php | 2 +- tests/Unit/Form/Eloquent/SharpFormEloquentUpdaterTest.php | 2 -- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Data/Form/FormLayoutColumnData.php b/src/Data/Form/FormLayoutColumnData.php index 3e9814009..1e76cac77 100644 --- a/src/Data/Form/FormLayoutColumnData.php +++ b/src/Data/Form/FormLayoutColumnData.php @@ -21,7 +21,7 @@ public static function from(array $column): self 'fields' => collect($column['fields'])->map(fn (array $row) => collect($row)->map(fn (array $field) => isset($field['legend']) ? FormLayoutFieldsetData::from($field) : LayoutFieldData::from($field) - ) + ) )->toArray(), ]; diff --git a/src/Data/Form/FormLayoutFieldsetData.php b/src/Data/Form/FormLayoutFieldsetData.php index 97722a806..5e143db3f 100644 --- a/src/Data/Form/FormLayoutFieldsetData.php +++ b/src/Data/Form/FormLayoutFieldsetData.php @@ -19,7 +19,7 @@ public static function from(array $fieldset): self $fieldset = [ ...$fieldset, 'fields' => collect($fieldset['fields'])->map(fn (array $row) => collect($row)->map(fn (array $field) => LayoutFieldData::from($field) - ) + ) )->toArray(), ]; diff --git a/src/Data/LayoutFieldData.php b/src/Data/LayoutFieldData.php index 031f98be1..e9c6bac26 100644 --- a/src/Data/LayoutFieldData.php +++ b/src/Data/LayoutFieldData.php @@ -19,7 +19,7 @@ public static function from(array $field): self ...$field, 'item' => isset($field['item']) ? collect($field['item'])->map(fn (array $row) => collect($row)->map(fn (array $itemField) => LayoutFieldData::from($itemField) - ) + ) )->toArray() : null, ]; diff --git a/src/Data/Show/ShowLayoutColumnData.php b/src/Data/Show/ShowLayoutColumnData.php index 4d40e38e3..ca2a2a2ed 100644 --- a/src/Data/Show/ShowLayoutColumnData.php +++ b/src/Data/Show/ShowLayoutColumnData.php @@ -19,7 +19,7 @@ public static function from(array $column): self $column = [ ...$column, 'fields' => collect($column['fields'])->map(fn (array $row) => collect($row)->map(fn (array $field) => LayoutFieldData::from($field) - ) + ) )->toArray(), ]; diff --git a/tests/Unit/Form/Eloquent/SharpFormEloquentUpdaterTest.php b/tests/Unit/Form/Eloquent/SharpFormEloquentUpdaterTest.php index e2af45a2d..c85df9eae 100644 --- a/tests/Unit/Form/Eloquent/SharpFormEloquentUpdaterTest.php +++ b/tests/Unit/Form/Eloquent/SharpFormEloquentUpdaterTest.php @@ -43,7 +43,6 @@ public function buildFormFields(FieldsContainer $formFields): void $formFields->addField(SharpFormTextField::make('name')); } - public function update($id, array $data) { return $this->save(new Person(), $data); @@ -111,7 +110,6 @@ public function update($id, array $data) ]); }); - it('allows to manually ignore a field', function () { $person = Person::create(['name' => 'Niels Bohr', 'age' => 21]);