File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ public function getFilledLayouts(): LayoutCollection
125
125
);
126
126
}
127
127
128
- $ filled = $ values ->map (function (LayoutItem $ data ) use ($ layouts ) {
128
+ $ filled = $ values ? $ values ->map (function (LayoutItem $ data ) use ($ layouts ) {
129
129
/** @var ?Layout $layout */
130
130
$ layout = $ layouts ->findByName ($ data ->getName ());
131
131
@@ -168,7 +168,7 @@ public function getFilledLayouts(): LayoutCollection
168
168
->headingAdditionalFields ($ fields );
169
169
170
170
return $ layout ->removeButton ($ this ->getRemoveButton ());
171
- })->filter ();
171
+ })->filter () : [] ;
172
172
173
173
return LayoutCollection::make ($ filled );
174
174
}
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ public function it_simple_create(): void
44
44
45
45
$ model = TestModel::query ()->first ();
46
46
47
- $ first = static fn (TestModel $ model ): array => $ model ->data ->findByName ('first ' )->get ('json ' );
48
- $ second = static fn (TestModel $ model ): array => $ model ->data ->findByName ('second ' )->get ('json ' );
47
+ $ first = static fn (TestModel $ model ): array => $ model ->data ->findByName ('first ' )->get ('json ' );
48
+ $ second = static fn (TestModel $ model ): array => $ model ->data ->findByName ('second ' )->get ('json ' );
49
49
50
50
$ this ->assertEquals (['key 1 ' => 'value 1 ' , 'key 2 ' => 'value 2 ' ], $ first ($ model ));
51
51
$ this ->assertEquals ([['title ' => 'Title 1 ' , 'image ' => $ image ->hashName ()]], $ second ($ model ));
You can’t perform that action at this time.
0 commit comments