Kernel/BaseKernel.php
private function sortArray(&$element)
    {
        if (is_array($element)) {
            array_walk($element, [$this, 'sortArray']);
            array_key_exists(0, $element)
                ? sort($element)
                : ksort($element);
        }
    }
private function sortArray(&$element)
    {
        if (is_array($element)) {
            array_walk($element, [$this, 'sortArray']);
            array_key_exists(0, $element)
                ? sort($element)
                : ksort($element);
        }
    }
private function sortArray ( & $ element ) { if ( is_array ( $ element ) ) { array_walk ( $ element , [ $ this , 'sortArray' ] ) ; array_key_exists ( 0 , $ element ) ? sort ( $ element ) : ksort ( $ element ) ; } }
Sort array's first level, taking in account if associative array or
sequential array.

@param mixed $element
Sort array s first level taking in account if associative array or sequential array .