diff --git a/src/DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php b/src/DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php index 59ad2a14d7..73900a03c9 100644 --- a/src/DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php +++ b/src/DependencyInjection/Compiler/AddDependencyCallsCompilerPass.php @@ -186,10 +186,10 @@ public function process(ContainerBuilder $container) } elseif ($container->getParameter('sonata.admin.configuration.sort_admins')) { $groups = $groupDefaults; - $elementSort = static function (&$element) { + $elementSort = static function (array &$element): void { usort( $element['items'], - static function ($a, $b) { + static function (array $a, array $b): int { $a = !empty($a['label']) ? $a['label'] : $a['admin']; $b = !empty($b['label']) ? $b['label'] : $b['admin'];