You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Process token 0 on line 1 [col:1;len:5;lvl:0;]: T_OPEN_TAG => <?php\n
Process token 1 on line 2 [col:1;len:0;lvl:0;]: T_WHITESPACE => \n
Process token 2 on line 3 [col:1;len:2;lvl:0;]: T_VARIABLE => $a
Process token 3 on line 3 [col:3;len:1;lvl:0;]: T_WHITESPACE => ·
Process token 4 on line 3 [col:4;len:1;lvl:0;]: T_EQUAL => =
Process token 5 on line 3 [col:5;len:1;lvl:0;]: T_WHITESPACE => ·
Process token 6 on line 3 [col:6;len:2;lvl:0;]: T_FN => fn
Process token 7 on line 3 [col:8;len:1;lvl:0;]: T_WHITESPACE => ·
Process token 8 on line 3 [col:9;len:1;lvl:0;]: T_OPEN_PARENTHESIS => (
Process token 9 on line 3 [col:10;len:1;lvl:0;]: T_INLINE_THEN => ? // <!-- should be T_NULLABLE
Process token 10 on line 3 [col:11;len:1;lvl:0;]: T_NS_SEPARATOR => \
Process token 11 on line 3 [col:12;len:8;lvl:0;]: T_STRING => DateTime
Process token 12 on line 3 [col:20;len:1;lvl:0;]: T_WHITESPACE => ·
Process token 13 on line 3 [col:21;len:2;lvl:0;]: T_VARIABLE => $x
Process token 14 on line 3 [col:23;len:1;lvl:0;]: T_CLOSE_PARENTHESIS => )
Process token 15 on line 3 [col:24;len:1;lvl:0;]: T_WHITESPACE => ·
Process token 16 on line 3 [col:25;len:1;lvl:0;]: T_INLINE_ELSE => : // <!-- should be T_COLON
Process token 17 on line 3 [col:26;len:1;lvl:0;]: T_WHITESPACE => ·
Process token 18 on line 3 [col:27;len:1;lvl:0;]: T_NULLABLE => ?
Process token 19 on line 3 [col:28;len:1;lvl:0;]: T_NS_SEPARATOR => \
Process token 20 on line 3 [col:29;len:8;lvl:0;]: T_STRING => DateTime
Process token 21 on line 3 [col:37;len:1;lvl:0;]: T_WHITESPACE => ·
Process token 22 on line 3 [col:38;len:2;lvl:0;]: T_DOUBLE_ARROW => =>
Process token 23 on line 3 [col:40;len:1;lvl:0;]: T_WHITESPACE => ·
Process token 24 on line 3 [col:41;len:2;lvl:0;]: T_VARIABLE => $x
Process token 25 on line 3 [col:43;len:1;lvl:0;]: T_SEMICOLON => ;
Process token 26 on line 3 [col:44;len:0;lvl:0;]: T_WHITESPACE => \n
also in src/Tokenizers/PHP.php we are missing the following two ignored tokens:
as we can have any FQN in return type hint definition of the closure (ie ?\DateTime).
The text was updated successfully, but these errors were encountered:
I've fixed up the detection of T_NULLABLE in the tokenizer to resolve one of the issues. The other was resolved by the change you showed in the screenshot above. Thanks again.
Relates to #2523
Example:
tokenized as:
also in
src/Tokenizers/PHP.php
we are missing the following two ignored tokens:as we can have any FQN in return type hint definition of the closure (ie
?\DateTime
).The text was updated successfully, but these errors were encountered: