File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public function __toString(): string
3737 if (empty ($ arguments )) {
3838 return $ this ->spec ->name ;
3939 }
40- $ arguments = array_map (fn ( mixed $ item ): string => $ this ->enforce ($ item ), $ arguments );
40+ $ arguments = array_map ($ this ->enforce (... ), $ arguments );
4141 $ definition = implode (', ' , $ arguments );
4242 return sprintf ('%s:%s ' , $ this ->spec ->name , $ definition );
4343 }
@@ -54,7 +54,7 @@ private function enforce(mixed $item): string
5454 is_iterable ($ item ) => implode (
5555 ', ' ,
5656 array_map (
57- fn ( $ element ): string => $ this ->enforce ($ element ),
57+ $ this ->enforce (... ),
5858 is_array ($ item )
5959 ? $ item
6060 : iterator_to_array ($ item , false )
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ protected function resolve(string $name): mixed
5050 return $ value ;
5151 }
5252 $ keys = array_keys ($ value );
53- $ filtered = array_filter ($ keys , fn ( mixed $ item ) => is_string ($ item ));
53+ $ filtered = array_filter ($ keys , is_string (... ));
5454 if (count ($ keys ) !== count ($ filtered )) {
5555 return $ value ;
5656 }
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ protected function detectCollectionType(ReflectionClass $collection): ?string
102102 */
103103 private function joinReflectionTypeNames (array $ types , string $ separator ): string
104104 {
105- $ array = array_map (fn ( ReflectionType $ type ) => $ this ->formatTypeName ($ type ), $ types );
105+ $ array = array_map ($ this ->formatTypeName (... ), $ types );
106106 sort ($ array );
107107 return implode ($ separator , $ array );
108108 }
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public function __construct(mixed $data = [])
2828 throw new SchemaException ('Values must be an array. ' );
2929 }
3030 $ keys = array_keys ($ data );
31- $ filtered = array_filter ($ keys , fn ( mixed $ item ) => is_string ($ item ));
31+ $ filtered = array_filter ($ keys , is_string (... ));
3232 if (count ($ keys ) !== count ($ filtered )) {
3333 throw new SchemaException ('All keys must be strings. ' );
3434 }
You can’t perform that action at this time.
0 commit comments