@@ -6988,6 +6988,23 @@ public function testNegatedAssertionToString(): void
6988
6988
$ this ->assertSame ('@phpstan-assert !Type $param ' , $ assertNode ->__toString ());
6989
6989
}
6990
6990
6991
+ /**
6992
+ * @dataProvider provideLexerData
6993
+ */
6994
+ public function testClosingBraceInlineTag (
6995
+ string $ input ,
6996
+ array $ expectedTokens ,
6997
+ ): void {
6998
+ $ tokens = new TokenIterator ($ this ->lexer ->tokenize ($ input ));
6999
+ $ this ->assertEquals ($ expectedTokens , array_map (
7000
+ fn ($ token ) => [
7001
+ $ token [Lexer::TYPE_OFFSET ],
7002
+ $ token [Lexer::VALUE_OFFSET ],
7003
+ ],
7004
+ $ tokens ->getTokens (),
7005
+ ));
7006
+ }
7007
+
6991
7008
/**
6992
7009
* @return array<mixed>
6993
7010
*/
@@ -7664,6 +7681,32 @@ public function dataTextBetweenTagsBelongsToDescription(): iterable
7664
7681
];
7665
7682
}
7666
7683
7684
+ public function provideLexerData (): Iterator
7685
+ {
7686
+ yield ['{@link https://example.com} ' , [
7687
+ [Lexer::TOKEN_OPEN_CURLY_BRACKET , '{ ' ],
7688
+ [Lexer::TOKEN_PHPDOC_TAG , '@link ' ],
7689
+ [Lexer::TOKEN_HORIZONTAL_WS , ' ' ],
7690
+ [Lexer::TOKEN_IDENTIFIER , 'https ' ],
7691
+ [Lexer::TOKEN_COLON , ': ' ],
7692
+ [Lexer::TOKEN_OTHER , '//example.com ' ],
7693
+ [Lexer::TOKEN_CLOSE_CURLY_BRACKET , '} ' ],
7694
+ [Lexer::TOKEN_END , '' ],
7695
+ ]];
7696
+
7697
+ yield ['{@link https://example.com } ' , [
7698
+ [Lexer::TOKEN_OPEN_CURLY_BRACKET , '{ ' ],
7699
+ [Lexer::TOKEN_PHPDOC_TAG , '@link ' ],
7700
+ [Lexer::TOKEN_HORIZONTAL_WS , ' ' ],
7701
+ [Lexer::TOKEN_IDENTIFIER , 'https ' ],
7702
+ [Lexer::TOKEN_COLON , ': ' ],
7703
+ [Lexer::TOKEN_OTHER , '//example.com ' ],
7704
+ [Lexer::TOKEN_HORIZONTAL_WS , ' ' ],
7705
+ [Lexer::TOKEN_CLOSE_CURLY_BRACKET , '} ' ],
7706
+ [Lexer::TOKEN_END , '' ],
7707
+ ]];
7708
+ }
7709
+
7667
7710
/**
7668
7711
* @dataProvider dataTextBetweenTagsBelongsToDescription
7669
7712
*/
0 commit comments