protected static function cleanVersion($version, array $matches)
    {
        $end = substr($version, \strlen($matches[1][0][0]));
        $version = $matches[1][0][0].'-';

        $matches = array();
        if (preg_match('/^(\-|\+)/', $end, $matches)) {
            $end = substr($end, 1);
        }

        $matches = array();
        preg_match('/^[a-z]+/', $end, $matches);
        $type = isset($matches[0]) ? VersionParser::normalizeStability($matches[0]) : null;
        $end = substr($end, \strlen($type));

        return array($type, $version, $end);
    }
protected static function cleanVersion($version, array $matches)
    {
        $end = substr($version, \strlen($matches[1][0][0]));
        $version = $matches[1][0][0].'-';

        $matches = array();
        if (preg_match('/^(\-|\+)/', $end, $matches)) {
            $end = substr($end, 1);
        }

        $matches = array();
        preg_match('/^[a-z]+/', $end, $matches);
        $type = isset($matches[0]) ? VersionParser::normalizeStability($matches[0]) : null;
        $end = substr($end, \strlen($type));

        return array($type, $version, $end);
    }
protected static function cleanVersion ( $ version , array $ matches ) { $ end = substr ( $ version , \ strlen ( $ matches [ 1 ] [ 0 ] [ 0 ] ) ) ; $ version = $ matches [ 1 ] [ 0 ] [ 0 ] . '-' ; $ matches = array ( ) ; if ( preg_match ( '/^(\-|\+)/' , $ end , $ matches ) ) { $ end = substr ( $ end , 1 ) ; } $ matches = array ( ) ; preg_match ( '/^[a-z]+/' , $ end , $ matches ) ; $ type = isset ( $ matches [ 0 ] ) ? VersionParser :: normalizeStability ( $ matches [ 0 ] ) : null ; $ end = substr ( $ end , \ strlen ( $ type ) ) ; return array ( $ type , $ version , $ end ) ; }
Clean the raw version.

@param string $version The version
@param array  $matches The match of pattern asset version

@return array The list of $type, $version and $end
Clean the raw version .