public function getParser()
    {
        if (true === empty($this->parser)) {
            $typeParserClassName = sprintf('\ReadmeGen\Vcs\Type\%s', ucfirst($this->config['vcs']));

            if (false === class_exists($typeParserClassName)) {
                throw new \InvalidArgumentException(sprintf('Class "%s" does not exist', $typeParserClassName));
            }

            $this->parser = new Parser(new $typeParserClassName());
        }

        return $this->parser;
    }
public function getParser()
    {
        if (true === empty($this->parser)) {
            $typeParserClassName = sprintf('\ReadmeGen\Vcs\Type\%s', ucfirst($this->config['vcs']));

            if (false === class_exists($typeParserClassName)) {
                throw new \InvalidArgumentException(sprintf('Class "%s" does not exist', $typeParserClassName));
            }

            $this->parser = new Parser(new $typeParserClassName());
        }

        return $this->parser;
    }
public function getParser ( ) { if ( true === empty ( $ this -> parser ) ) { $ typeParserClassName = sprintf ( '\ReadmeGen\Vcs\Type\%s' , ucfirst ( $ this -> config [ 'vcs' ] ) ) ; if ( false === class_exists ( $ typeParserClassName ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Class "%s" does not exist' , $ typeParserClassName ) ) ; } $ this -> parser = new Parser ( new $ typeParserClassName ( ) ) ; } return $ this -> parser ; }
Returns the parser.

@return Parser
@throws \InvalidArgumentException When the VCS parser class does not exist.
Returns the parser .