File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function buckets(): array
2525 {
2626 $ buckets = $ this ->aggregation ['buckets ' ] ?? [];
2727
28- return array_map (static fn (array $ bucket ) => new Bucket ($ bucket ), $ buckets );
28+ return array_map (fn (array $ bucket ) => new Bucket ($ bucket ), $ buckets );
2929 }
3030
3131 /**
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function hits(): array
2525 {
2626 $ hits = $ this ->response ['hits ' ]['hits ' ];
2727
28- return array_map (static fn (array $ hit ) => new Hit ($ hit ), $ hits );
28+ return array_map (fn (array $ hit ) => new Hit ($ hit ), $ hits );
2929 }
3030
3131 /**
@@ -82,8 +82,8 @@ public function suggestions(): array
8282 $ suggest = $ this ->response ['suggest ' ] ?? [];
8383
8484 return array_map (
85- static fn (array $ suggestions ) => array_map (
86- static fn (array $ suggestion ) => new Suggestion ($ suggestion ),
85+ fn (array $ suggestions ) => array_map (
86+ fn (array $ suggestion ) => new Suggestion ($ suggestion ),
8787 $ suggestions ,
8888 ),
8989 $ suggest ,
@@ -99,7 +99,7 @@ public function aggregations(): array
9999 {
100100 $ aggregations = $ this ->response ['aggregations ' ] ?? [];
101101
102- return array_map (static fn (array $ aggregation ) => new Aggregation ($ aggregation ), $ aggregations );
102+ return array_map (fn (array $ aggregation ) => new Aggregation ($ aggregation ), $ aggregations );
103103 }
104104
105105 /**
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public function length(): int
4848 public function options (): array
4949 {
5050 return array_map (
51- static fn (array $ option ) => new SuggestionOption ($ option ),
51+ fn (array $ option ) => new SuggestionOption ($ option ),
5252 $ this ->suggestion ['options ' ],
5353 );
5454 }
Original file line number Diff line number Diff line change 9898})->with ('mapping property setters ' );
9999
100100test ('object properties may be configured with a closure ' , function () {
101- $ actual = (new MappingProperties )->object ('user ' , static function (MappingProperties $ properties ) {
101+ $ actual = (new MappingProperties )->object ('user ' , function (MappingProperties $ properties ) {
102102 $ properties ->integer ('age ' );
103103
104104 return [
121121});
122122
123123test ('nested properties may be configured with a closure ' , function () {
124- $ actual = (new MappingProperties )->nested ('user ' , static function (MappingProperties $ properties ) {
124+ $ actual = (new MappingProperties )->nested ('user ' , function (MappingProperties $ properties ) {
125125 $ properties ->keyword ('age ' );
126126
127127 return [
You can’t perform that action at this time.
0 commit comments