It seems like $adapters of type iterable is incompatible with the declared type App\Infrastructure\Objec...\ObjectStorageAdapter[] of property $adapters.
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...
19
6
$this->defaultAdapter = $defaultAdapter;
20
6
}
21
22
6
public function __invoke(?string $name = null): ObjectStorageAdapter
23
{
24
6
$name ??= $this->defaultAdapter;
25
6
$adapters = iterator_to_array($this->adapters);
26
27
6
if (!\array_key_exists($name, $adapters)) {
28
1
throw new \UnexpectedValueException(sprintf('Invalid adapter name "%s" provided. Available options are: %s', $name, implode(', ', array_keys($adapters))));
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..