src/Configuration/ActionConfiguration.php
private function getOrderNormalizer()
    {
        return function(Options $options, $order) {
            foreach ($order as $field => $sort) {
                if (!is_string($sort) || !is_string($field) || !in_array(strtolower($sort), ['asc', 'desc'])) {
                    throw new Exception(
                        'Order value should be an array of string (["field" => $key]), got '.gettype($sort)
                    );
                }
            }

            return $order;
        };
    }
private function getOrderNormalizer()
    {
        return function(Options $options, $order) {
            foreach ($order as $field => $sort) {
                if (!is_string($sort) || !is_string($field) || !in_array(strtolower($sort), ['asc', 'desc'])) {
                    throw new Exception(
                        'Order value should be an array of string (["field" => $key]), got '.gettype($sort)
                    );
                }
            }

            return $order;
        };
    }
private function getOrderNormalizer ( ) { return function ( Options $ options , $ order ) { foreach ( $ order as $ field => $ sort ) { if ( ! is_string ( $ sort ) || ! is_string ( $ field ) || ! in_array ( strtolower ( $ sort ) , [ 'asc' , 'desc' ] ) ) { throw new Exception ( 'Order value should be an array of string (["field" => $key]), got ' . gettype ( $ sort ) ) ; } } return $ order ; } ; }
Return the order normalizer. It will check if the order value passed are valid.

@return Closure
Return the order normalizer . It will check if the order value passed are valid .