Commit 8e57c25
committed
PHPCSDebug/TokenList: bug fix - do not calculate token length
The output from the `TokenList` sniff should represent the information contained within the `$tokens` array.
While the information in the `$tokens` array may not be correct, the sniff should not try to "fix" it as that will misrepresent the real information contained in the `$tokens` array.
To this end:
* Ensure there is always a `'length'` key available by adding it to the `$tokenDefaults` array.
* Remove any manipulation of the value of the token `length` index.1 parent 3abedb7 commit 8e57c25
1 file changed
+1
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 103 | | |
110 | 104 | | |
111 | 105 | | |
| |||
0 commit comments