public static function sanitizeArray($result)
    {
        if (count($result) == 1 && isset($result['list[]'])) {
            $result = $result['list[]'];
        }
        return is_array($result) ? $result : [$result];
    }
public static function sanitizeArray($result)
    {
        if (count($result) == 1 && isset($result['list[]'])) {
            $result = $result['list[]'];
        }
        return is_array($result) ? $result : [$result];
    }
public static function sanitizeArray ( $ result ) { if ( count ( $ result ) == 1 && isset ( $ result [ 'list[]' ] ) ) { $ result = $ result [ 'list[]' ] ; } return is_array ( $ result ) ? $ result : [ $ result ] ; }
Ensures a DA-style response element is wrapped properly as an array.

@param mixed $result Messy input
@return array Sane output
Ensures a DA - style response element is wrapped properly as an array .