public static function validateBranch($branch, VersionParser $parser = null)
    {
        if (null === $parser) {
            $parser = new VersionParser();
        }

        $normalize = $parser->normalizeBranch($branch);

        if (false !== strpos($normalize, '.9999999-dev')) {
            return false;
        }

        return $normalize;
    }
public static function validateBranch($branch, VersionParser $parser = null)
    {
        if (null === $parser) {
            $parser = new VersionParser();
        }

        $normalize = $parser->normalizeBranch($branch);

        if (false !== strpos($normalize, '.9999999-dev')) {
            return false;
        }

        return $normalize;
    }
public static function validateBranch ( $ branch , VersionParser $ parser = null ) { if ( null === $ parser ) { $ parser = new VersionParser ( ) ; } $ normalize = $ parser -> normalizeBranch ( $ branch ) ; if ( false !== strpos ( $ normalize , '.9999999-dev' ) ) { return false ; } return $ normalize ; }
Validates the branch.

@param string             $branch
@param null|VersionParser $parser

@return false|string
Validates the branch .