Skip to content

PHPStan assumes token_name can return empty string #11808

@keradus

Description

@keradus

Bug report

PHPStan assumes token_name can return empty string, while it can't.

Code snippet that reproduces the problem

https://phpstan.org/r/61739c2a-28bf-4a32-ac5e-f881104a5bc5#

Expected output

no error expected

Found during https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/8236/files#r1788655053

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