Skip to content

handle Serializable::unserialize() parameter typehint #1682

@babaorum

Description

@babaorum

Summary of a problem or a feature request

When implementing \Serializable, PHPStan complain about no typehint in unserialize method.

Code snippet that reproduces the problem

https://phpstan.org/r/e9fc7142-9acd-4f64-a279-46aeb718690c

Expected output

No error detected with an {@inheritdoc}.

More informations

The method unserialize is working as expected since we already say only a string may be given.
https://phpstan.org/r/109509b6-a84e-41de-af57-8c9930713a60
I think it should be identical here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions