"false positive" on return type-hint object with name starting with a scalar type
VaN-dev opened this issue · 0 comments
VaN-dev commented
hello,
I found this bug when doing a code review on github. github support told me to look at this repository, which is what they use for php syntax highlighting.
A picture is worth 1000 words:

the regex for scalar types detection (int, string, etc.) seems broken. See how the "Int" part of my "InternalUser" type-hint turned to red, because regex detected it as "int". It should probably be fixed by making sure there is no additional characters behind the pattern (and by making a case-sensitive detection).