Skip to content

Incorrect return type for ResourceBundle::getLocales() #12579

Closed
phpstan/phpstan-src
#3840
@dtdesign

Description

@dtdesign

Bug report

The return type of ResourceBundle::getLocales() is array|false, but PHPStan recognizes it as just array.

Code snippet that reproduces the problem

https://phpstan.org/r/6b4bfb74-1295-4764-9790-2f26c4a42084

Expected output

The possible false value needs to be recognized.

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions