Skip to content

"false positive" on return type-hint object with name starting with a scalar type  #85

@VaN-dev

Description

@VaN-dev

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:
image

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions