Skip to content

numeric-string is non considered non-empty-string #7265

@staabm

Description

@staabm

Bug report

I have a method, for which I want to define a contract that it is returning a non-empty-string.

I consider it an implementation detail, that technically the method is returning a numeric-string.
Isn't a numeric-string always a non-empty-string and therefore this error should not appear?

Code snippet that reproduces the problem

https://phpstan.org/r/7a8ac4a2-9417-456c-9ec3-330a92d7fff2

expected no error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions