コード例 #1
0
 /**
  * @covers \Weasel\Annotation\DocblockLexer::skipToType
  */
 public function testSkipToTypeEmpty()
 {
     $lexer = new DocblockLexer("");
     $this->assertNull($lexer->skipToType(DocblockLexer::T_AT));
 }
コード例 #2
0
ファイル: DocblockParser.php プロジェクト: siad007/php-weasel
 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;
 }