It seems like $this->pool->getItem($th...this->prefix . $class)) of type Psr\Cache\CacheItemInterface is incompatible with the declared type Psr\Cache\CacheItemPoolInterface of property $lastItem.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
Loading history...
39
40
return $this->lastItem->get();
41
}
42
43
/**
44
* {@inheritDoc}
45
*/
46
public function put(ClassMetadata $metadata): void
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
It seems like $this->pool->getItem($key) of type Psr\Cache\CacheItemInterface is incompatible with the declared type Psr\Cache\CacheItemPoolInterface of property $lastItem.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
It seems like $this->lastItem->set($metadata) can also be of type Psr\Cache\CacheItemPoolInterface; however, parameter $item of Psr\Cache\CacheItemPoolInterface::save() does only seem to accept Psr\Cache\CacheItemInterface, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..