protected function getEnumOptions($type)
    {
        $match = [];

        preg_match('#enum\((.*?)\)#', $type, $match);

        if (!isset($match[1])) {
            return null;
        }

        $options = array_map(function ($option) {
            return trim($option, "'");
        }, explode(',', $match[1]));

        $finals = [];

        foreach ($options as $option) {
            $finals[$option] = $option;
        }

        return $finals;
    }
protected function getEnumOptions($type)
    {
        $match = [];

        preg_match('#enum\((.*?)\)#', $type, $match);

        if (!isset($match[1])) {
            return null;
        }

        $options = array_map(function ($option) {
            return trim($option, "'");
        }, explode(',', $match[1]));

        $finals = [];

        foreach ($options as $option) {
            $finals[$option] = $option;
        }

        return $finals;
    }
protected function getEnumOptions ( $ type ) { $ match = [ ] ; preg_match ( '#enum\((.*?)\)#' , $ type , $ match ) ; if ( ! isset ( $ match [ 1 ] ) ) { return null ; } $ options = array_map ( function ( $ option ) { return trim ( $ option , "'" ) ; } , explode ( ',' , $ match [ 1 ] ) ) ; $ finals = [ ] ; foreach ( $ options as $ option ) { $ finals [ $ option ] = $ option ; } return $ finals ; }
Parses out the options from a given type

@param string $type

@return mix (null|array)
Parses out the options from a given type