Skip to content

Support truthy-string/non-falsy-string pseudo-type #302

@ZebulanStanphill

Description

@ZebulanStanphill

PHPStan and Psalm both support a pseudo-type called truthy-string (with alias non-falsy-string), which represents a string that is not '' and not '0'... in other words, a string that will always be true when cast to bool. (Another way it can be thought of is as a subset of non-empty-string that excludes 0.)

The PHP Tools extension does not currently support this pseudo-type, and treats it like a class.
image

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