protected function getParser(?array $options): Parser
    {
        if (($tag = $options['tag'] ?? null) !== null) {
            $class = self::TAG_PARSER;

            return (new $class())->setTag($tag);
        }

        if (($group = $options['group'] ?? null) !== null) {
            $class = self::GROUP_PARSER;

            return (new $class())->setGroup($group);
        }

        return new Parser();
    }
protected function getParser(?array $options): Parser
    {
        if (($tag = $options['tag'] ?? null) !== null) {
            $class = self::TAG_PARSER;

            return (new $class())->setTag($tag);
        }

        if (($group = $options['group'] ?? null) !== null) {
            $class = self::GROUP_PARSER;

            return (new $class())->setGroup($group);
        }

        return new Parser();
    }
protected function getParser ( ? array $ options ) : Parser { if ( ( $ tag = $ options [ 'tag' ] ?? null ) !== null ) { $ class = self :: TAG_PARSER ; return ( new $ class ( ) ) -> setTag ( $ tag ) ; } if ( ( $ group = $ options [ 'group' ] ?? null ) !== null ) { $ class = self :: GROUP_PARSER ; return ( new $ class ( ) ) -> setGroup ( $ group ) ; } return new Parser ( ) ; }
Get the right parser.

@param null|array $options

@return \Viserio\Component\Parser\Parser
Get the right parser .