@@ -55,7 +55,7 @@ public static function keysProvider(): array {
5555 * @return array<int|string, mixed>
5656 */
5757 public function sortKeys (array $ keys ): array {
58- usort ($ keys , static fn ($ a , $ b ) => strcmp ($ a ['key ' ], $ b ['key ' ]));
58+ usort ($ keys , static fn ($ a , $ b ): int => strcmp (( string ) $ a ['key ' ], ( string ) $ b ['key ' ]));
5959
6060 return $ keys ;
6161 }
@@ -68,8 +68,8 @@ public function sortKeys(array $keys): array {
6868 public function sortTreeKeys (array $ tree ): array {
6969 foreach ($ tree as &$ item ) {
7070 if (isset ($ item ['children ' ])) {
71- usort ($ item ['children ' ], static fn ($ a , $ b ) => strcmp ($ a ['key ' ], $ b ['key ' ]));
72- $ item ['children ' ] = self :: sortTreeKeys ($ item ['children ' ]);
71+ usort ($ item ['children ' ], static fn ($ a , $ b ): int => strcmp (( string ) $ a ['key ' ], ( string ) $ b ['key ' ]));
72+ $ item ['children ' ] = $ this -> sortTreeKeys ($ item ['children ' ]);
7373 }
7474 }
7575
@@ -91,7 +91,7 @@ public function normalizeInfoFields(array $data, array $fields): array {
9191 }
9292
9393 if (isset ($ item ['children ' ]) && is_array ($ item ['children ' ])) {
94- $ item ['children ' ] = array_map (static function (array $ child ) use ($ fields ) {
94+ $ item ['children ' ] = array_map (static function (array $ child ) use ($ fields ): array {
9595 foreach ($ fields as $ field ) {
9696 if (isset ($ child ['info ' ][$ field ])) {
9797 $ child ['info ' ][$ field ] = 0 ;
0 commit comments