src/Composer/Repository/Pear/PackageDependencyParser.php
private function parseVersion($version)
    {
        if (preg_match('{^v?(\d{1,3})(\.\d+)?(\.\d+)?(\.\d+)?}i', $version, $matches)) {
            $version = $matches[1]
                .(!empty($matches[2]) ? $matches[2] : '.0')
                .(!empty($matches[3]) ? $matches[3] : '.0')
                .(!empty($matches[4]) ? $matches[4] : '.0');

            return $version;
        }

        return null;
    }
private function parseVersion($version)
    {
        if (preg_match('{^v?(\d{1,3})(\.\d+)?(\.\d+)?(\.\d+)?}i', $version, $matches)) {
            $version = $matches[1]
                .(!empty($matches[2]) ? $matches[2] : '.0')
                .(!empty($matches[3]) ? $matches[3] : '.0')
                .(!empty($matches[4]) ? $matches[4] : '.0');

            return $version;
        }

        return null;
    }
private function parseVersion ( $ version ) { if ( preg_match ( '{^v?(\d{1,3})(\.\d+)?(\.\d+)?(\.\d+)?}i' , $ version , $ matches ) ) { $ version = $ matches [ 1 ] . ( ! empty ( $ matches [ 2 ] ) ? $ matches [ 2 ] : '.0' ) . ( ! empty ( $ matches [ 3 ] ) ? $ matches [ 3 ] : '.0' ) . ( ! empty ( $ matches [ 4 ] ) ? $ matches [ 4 ] : '.0' ) ; return $ version ; } return null ; }
Softened version parser

@param string $version
@return null|string
Softened version parser