protected static function matchVersion($version, $type)
    {
        $patchVersion = true;

        if (\in_array($type, array('dev', 'snapshot'), true)) {
            $type = 'dev';
            $patchVersion = false;
        } elseif ('a' === $type) {
            $type = 'alpha';
        } elseif (\in_array($type, array('b', 'pre'), true)) {
            $type = 'beta';
        } elseif (!\in_array($type, array('alpha', 'beta', 'RC'), true)) {
            $type = 'patch';
        }

        $version .= $type;

        return array($version, $patchVersion);
    }
protected static function matchVersion($version, $type)
    {
        $patchVersion = true;

        if (\in_array($type, array('dev', 'snapshot'), true)) {
            $type = 'dev';
            $patchVersion = false;
        } elseif ('a' === $type) {
            $type = 'alpha';
        } elseif (\in_array($type, array('b', 'pre'), true)) {
            $type = 'beta';
        } elseif (!\in_array($type, array('alpha', 'beta', 'RC'), true)) {
            $type = 'patch';
        }

        $version .= $type;

        return array($version, $patchVersion);
    }
protected static function matchVersion ( $ version , $ type ) { $ patchVersion = true ; if ( \ in_array ( $ type , array ( 'dev' , 'snapshot' ) , true ) ) { $ type = 'dev' ; $ patchVersion = false ; } elseif ( 'a' === $ type ) { $ type = 'alpha' ; } elseif ( \ in_array ( $ type , array ( 'b' , 'pre' ) , true ) ) { $ type = 'beta' ; } elseif ( ! \ in_array ( $ type , array ( 'alpha' , 'beta' , 'RC' ) , true ) ) { $ type = 'patch' ; } $ version .= $ type ; return array ( $ version , $ patchVersion ) ; }
Match the version.

@param string $version
@param string $type

@return array The list of $version and $patchVersion
Match the version .