public function csvToArray($value)
    {
        if ($value === null) {
            return [];
        }

        $result = explode(',', $value);
        $result = array_map('trim', $result);
        $result = array_filter($result);

        return array_values($result);
    }
public function csvToArray($value)
    {
        if ($value === null) {
            return [];
        }

        $result = explode(',', $value);
        $result = array_map('trim', $result);
        $result = array_filter($result);

        return array_values($result);
    }
public function csvToArray ( $ value ) { if ( $ value === null ) { return [ ] ; } $ result = explode ( ',' , $ value ) ; $ result = array_map ( 'trim' , $ result ) ; $ result = array_filter ( $ result ) ; return array_values ( $ result ) ; }
Convert a CSV string to an array.

Remove empties and surrounding spaces.

@param string|null $value

@return array
Convert a CSV string to an array .