File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1717 }
1818 },
1919 "require-dev" : {
20+ "type-lang/parser" : " ^1.0" ,
2021 "friendsofphp/php-cs-fixer" : " ^3.42" ,
2122 "phpunit/phpunit" : " ^10.5" ,
2223 "rector/rector" : " ^1.0" ,
Original file line number Diff line number Diff line change 44
55namespace TypeLang \PHPDoc \Tag ;
66
7- use TypeLang \Parser \Exception \ParserExceptionInterface ;
87use TypeLang \Parser \Node \Stmt \TypeStatement ;
98use TypeLang \Parser \ParserInterface as TypesParserInterface ;
109use TypeLang \PHPDoc \Exception \InvalidTagException ;
@@ -108,19 +107,20 @@ public function nextOptionalVariable(): ?string
108107 */
109108 public function nextValue (string $ tag , string $ value ): string
110109 {
110+ /** @var T */
111111 return $ this ->apply (new ValueApplicator ($ tag , $ value ));
112112 }
113113
114114 /**
115115 * @template T of non-empty-string
116116 *
117117 * @api
118- * @param non-empty-string $tag
119118 * @param T $value
120119 * @return T|null
121120 */
122121 public function nextOptionalValue (string $ value ): ?string
123122 {
123+ /** @var T|null */
124124 return $ this ->apply (new OptionalValueApplicator ($ value ));
125125 }
126126
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ public function __construct(
3333 */
3434 public function __invoke (Content $ lexer ): string
3535 {
36+ /** @var T */
3637 return ($ this ->identifier )($ lexer )
3738 ?? throw $ lexer ->getTagException (\sprintf (
3839 'Tag @%s contains an incorrect identifier value "%s" ' ,
You can’t perform that action at this time.
0 commit comments