/** * @covers \Weasel\Annotation\DocblockLexer::skipToType */ public function testSkipToTypeEmpty() { $lexer = new DocblockLexer(""); $this->assertNull($lexer->skipToType(DocblockLexer::T_AT)); }
protected function _ClassName(DocblockLexer $lexer) { $next = $lexer->next(); $class = ''; if ($next['type'] === DocblockLexer::T_BACKSLASH) { $class .= '\\'; $next = $this->_expectNext($lexer, DocblockLexer::T_IDENTIFIER); } $class .= $next['token']; while ($lexer->peek() === DocblockLexer::T_BACKSLASH) { $this->_expectNext($lexer, DocblockLexer::T_BACKSLASH); $class .= '\\'; $part = $this->_expectNext($lexer, DocblockLexer::T_IDENTIFIER); $class .= $part['token']; } return $class; }