Skip to content

PSR12.Functions.NullableTypeDeclaration false positive when ternary operator used with instanceof #2791

Closed
@asika32764

Description

@asika32764

This code will return There must not be a space between the question mark and the type in nullable type declarations

return $value instanceof static ? '(' . $value . ')' : $value;

8E7EEA1A-7EEF-45E7-8612-51C7869F6D9E

Snuffer version: 3.5.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions