Commit 2f77dc5
committed
Tokenizer/PHP: prevent an "Undefined array key" notice during live coding
During live coding or for code containing a parse error, it was possible for the tokenizer to run into an `Undefined array key "parenthesis_closer"` error when trying to verify arrow functions.
As this error happens during the tokenization, this resulted in PHPCS silently not scanning the file - without even showing the error notice.
Fixed now.
Includes tests.1 parent b43e1d8 commit 2f77dc5
File tree
3 files changed
+53
-2
lines changed- src/Tokenizers
- tests/Core/Tokenizers/PHP
3 files changed
+53
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2817 | 2817 | | |
2818 | 2818 | | |
2819 | 2819 | | |
2820 | | - | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
2821 | 2824 | | |
2822 | 2825 | | |
2823 | 2826 | | |
| |||
2995 | 2998 | | |
2996 | 2999 | | |
2997 | 3000 | | |
2998 | | - | |
| 3001 | + | |
2999 | 3002 | | |
3000 | 3003 | | |
3001 | 3004 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments