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

Ability to set scope of $this for closures #11010

Description

@simon-tma

Feature request

Closure::bind/bindTo allow resetting the scope of a closure as well as $this. Having a way of providing this information along with @param-closure-this (perhaps @param-closure-scope?) will allow for exposing this to PHPStan.

Example that is valid code but have no way of telling PHPStan: https://phpstan.org/r/87263bfb-cb77-4bdf-a8b8-8a9a8cab7e97

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

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions