Skip to content

False positive with try-catch #1597

@enumag

Description

@enumag

Summary of a problem or a feature request

PHPStan assumes that $date will be \DateTime instance in the catch block which may not be true.

Code snippet that reproduces the problem

https://phpstan.org/r/16f4221ff88c24829994a285304c13f8

Expected output

no error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions