-
Notifications
You must be signed in to change notification settings - Fork 96
Open
@mvhirsch
Description
Bug report
I'm passing a non-negative-int
in my method, which is correctly detected by PHPStan. However, it looses it's narrowed type on the way passing through CacheInterface
. I'm not sure why.
I created a reproducer repo, as I'm unable to reproduce this issue on Playground.
https://github.com/mvhirsch/phpstan-symfony-cache-reproducer
Code snippet that reproduces the problem
No response
Expected output
No issues. Return type of $this->cache->get()
should be int<0, max>
, not int
.
Did PHPStan help you today? Did it make you happy in any way?
It helps me keeping calm and settled in a hasty project.
Metadata
Metadata
Assignees
Labels
No labels