public static function getVersionConstraint($normalizedVersion, VersionParser $versionParser)
    {
        if (preg_match('/^\d+(\.\d+)(\.\d+)(\.\d+)\-[A-Za-z0-9]+$/', $normalizedVersion)) {
            $normalizedVersion = substr($normalizedVersion, 0, strpos($normalizedVersion, '-'));
        }

        return $versionParser->parseConstraints($normalizedVersion);
    }
public static function getVersionConstraint($normalizedVersion, VersionParser $versionParser)
    {
        if (preg_match('/^\d+(\.\d+)(\.\d+)(\.\d+)\-[A-Za-z0-9]+$/', $normalizedVersion)) {
            $normalizedVersion = substr($normalizedVersion, 0, strpos($normalizedVersion, '-'));
        }

        return $versionParser->parseConstraints($normalizedVersion);
    }
public static function getVersionConstraint ( $ normalizedVersion , VersionParser $ versionParser ) { if ( preg_match ( '/^\d+(\.\d+)(\.\d+)(\.\d+)\-[A-Za-z0-9]+$/' , $ normalizedVersion ) ) { $ normalizedVersion = substr ( $ normalizedVersion , 0 , strpos ( $ normalizedVersion , '-' ) ) ; } return $ versionParser -> parseConstraints ( $ normalizedVersion ) ; }
Get the link constraint of normalized version.

@param string        $normalizedVersion The normalized version
@param VersionParser $versionParser     The version parser

@return ConstraintInterface The constraint
Get the link constraint of normalized version .