File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 11parameters :
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
6565 while (true ) {
6666 // If we received a Lexer::TOKEN_PHPDOC_EOL, exit early to prevent
6767 // them from being processed.
68- if ($ tokens ->currentTokenType () === Lexer::TOKEN_PHPDOC_EOL ) {
68+ $ currentTokenType = $ tokens ->currentTokenType ();
69+ if ($ currentTokenType === Lexer::TOKEN_PHPDOC_EOL ) {
6970 break ;
7071 }
7172 $ text .= $ tokens ->joinUntil (Lexer::TOKEN_PHPDOC_EOL , Lexer::TOKEN_CLOSE_PHPDOC , Lexer::TOKEN_END );
7273 $ text = rtrim ($ text , " \t" );
7374
7475 // If we joined until TOKEN_PHPDOC_EOL, peak at the next tokens to see
7576 // 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 ) {
7779 break ;
7880 }
7981
8082 // Peek at the next token to determine if it is more text that needs
8183 // to be combined.
8284 $ tokens ->pushSavePoint ();
8385 $ tokens ->next ();
84- if ($ tokens ->currentTokenType () !== Lexer::TOKEN_IDENTIFIER ) {
86+ $ currentTokenType = $ tokens ->currentTokenType ();
87+ if ($ currentTokenType !== Lexer::TOKEN_IDENTIFIER ) {
8588 $ tokens ->rollback ();
8689 break ;
8790 }
You can’t perform that action at this time.
0 commit comments