File tree 3 files changed +4
-2
lines changed
3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 17
17
}
18
18
},
19
19
"require-dev" : {
20
+ "type-lang/parser" : " ^1.0" ,
20
21
"friendsofphp/php-cs-fixer" : " ^3.42" ,
21
22
"phpunit/phpunit" : " ^10.5" ,
22
23
"rector/rector" : " ^1.0" ,
Original file line number Diff line number Diff line change 4
4
5
5
namespace TypeLang \PHPDoc \Tag ;
6
6
7
- use TypeLang \Parser \Exception \ParserExceptionInterface ;
8
7
use TypeLang \Parser \Node \Stmt \TypeStatement ;
9
8
use TypeLang \Parser \ParserInterface as TypesParserInterface ;
10
9
use TypeLang \PHPDoc \Exception \InvalidTagException ;
@@ -108,19 +107,20 @@ public function nextOptionalVariable(): ?string
108
107
*/
109
108
public function nextValue (string $ tag , string $ value ): string
110
109
{
110
+ /** @var T */
111
111
return $ this ->apply (new ValueApplicator ($ tag , $ value ));
112
112
}
113
113
114
114
/**
115
115
* @template T of non-empty-string
116
116
*
117
117
* @api
118
- * @param non-empty-string $tag
119
118
* @param T $value
120
119
* @return T|null
121
120
*/
122
121
public function nextOptionalValue (string $ value ): ?string
123
122
{
123
+ /** @var T|null */
124
124
return $ this ->apply (new OptionalValueApplicator ($ value ));
125
125
}
126
126
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ public function __construct(
33
33
*/
34
34
public function __invoke (Content $ lexer ): string
35
35
{
36
+ /** @var T */
36
37
return ($ this ->identifier )($ lexer )
37
38
?? throw $ lexer ->getTagException (\sprintf (
38
39
'Tag @%s contains an incorrect identifier value "%s" ' ,
You can’t perform that action at this time.
0 commit comments