It seems like $factories of type iterable is incompatible with the declared type BenTools\MercurePHP\Stor...orageFactoryInterface[] of property $factories.
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...
17
}
18
19
2
public function supports(string $dsn): bool
20
{
21
2
foreach ($this->getFactories() as $factory) {
22
2
if ($factory->supports($dsn)) {
23
return true;
24
1
}
25
}
26
1
27
1
return false;
28
1
}
29
30
public function create(string $dsn): PromiseInterface
31
{
32
foreach ($this->getFactories() as $factory) {
33
if (!$factory->supports($dsn)) {
34
continue;
35
1
}
36
37
1
return $factory->create($dsn);
38
1
}
39
1
40
throw new \RuntimeException(\sprintf('Invalid storage DSN %s', $dsn));
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..