🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

Closure::bindTo return value wrong #4716

Description

@Firehed

https://phpstan.org/r/2b63b8c5-ff95-4add-ba5c-953763a0c1b6

Closure::bindTo returns Closure|false according to the php docs, but appears to sometimes be treated as ?Closure by PHPStan. Not that this is terribly helpful, but this appears to have been introduced somewhere after... 0.12.40.

I looked in the functionMap file in the PR template and the definition appears correct, so I'm not sure what's up. This only seems to be an issue when the closure signature isn't actually known by PHPStan. Given their nature, I assume there's a lot of special handling that doesn't apply to the standard function signature map.

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