Skip to content

Implicit closure return types aren't checked #3115

@BackEndTea

Description

@BackEndTea

Bug report

Closures without an explicit return type aren't checked.

Code snippet that reproduces the problem

https://phpstan.org/r/182afedd-bee5-4b80-9092-9bfca6844b19

Expected output

I'd expect to get an error that the function expects a closure that returns an object.

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