File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
parameters :
2
- ignoreErrors :
3
- -
4
- message : ' #Unreachable statement - code above always terminates\.#'
5
- path : */src/Parser/PhpDocParser.php
2
+ ignoreErrors : []
Original file line number Diff line number Diff line change @@ -65,23 +65,26 @@ private function parseText(TokenIterator $tokens): Ast\PhpDoc\PhpDocTextNode
65
65
while (true ) {
66
66
// If we received a Lexer::TOKEN_PHPDOC_EOL, exit early to prevent
67
67
// them from being processed.
68
- if ($ tokens ->currentTokenType () === Lexer::TOKEN_PHPDOC_EOL ) {
68
+ $ currentTokenType = $ tokens ->currentTokenType ();
69
+ if ($ currentTokenType === Lexer::TOKEN_PHPDOC_EOL ) {
69
70
break ;
70
71
}
71
72
$ text .= $ tokens ->joinUntil (Lexer::TOKEN_PHPDOC_EOL , Lexer::TOKEN_CLOSE_PHPDOC , Lexer::TOKEN_END );
72
73
$ text = rtrim ($ text , " \t" );
73
74
74
75
// If we joined until TOKEN_PHPDOC_EOL, peak at the next tokens to see
75
76
// if we have a multiline string to join.
76
- if ($ tokens ->currentTokenType () !== Lexer::TOKEN_PHPDOC_EOL ) {
77
+ $ currentTokenType = $ tokens ->currentTokenType ();
78
+ if ($ currentTokenType !== Lexer::TOKEN_PHPDOC_EOL ) {
77
79
break ;
78
80
}
79
81
80
82
// Peek at the next token to determine if it is more text that needs
81
83
// to be combined.
82
84
$ tokens ->pushSavePoint ();
83
85
$ tokens ->next ();
84
- if ($ tokens ->currentTokenType () !== Lexer::TOKEN_IDENTIFIER ) {
86
+ $ currentTokenType = $ tokens ->currentTokenType ();
87
+ if ($ currentTokenType !== Lexer::TOKEN_IDENTIFIER ) {
85
88
$ tokens ->rollback ();
86
89
break ;
87
90
}
You can’t perform that action at this time.
0 commit comments