mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
chore: Suppress psalm error
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
06c062bebd
commit
1bf41550d0
1 changed files with 3 additions and 2 deletions
|
|
@ -58,6 +58,7 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
|
|||
return $class->newInstance();
|
||||
}
|
||||
return $class->newLazyGhost(function (object $object) use ($constructor): void {
|
||||
/** @psalm-suppress DirectConstructorCall For lazy ghosts we have to call the constructor directly */
|
||||
$object->__construct(...array_map(function (ReflectionParameter $parameter) {
|
||||
$parameterType = $parameter->getType();
|
||||
|
||||
|
|
@ -69,8 +70,8 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
|
|||
}
|
||||
|
||||
try {
|
||||
$builtIn = $parameter->hasType() && ($parameter->getType() instanceof ReflectionNamedType)
|
||||
&& $parameter->getType()->isBuiltin();
|
||||
$builtIn = $parameterType !== null && ($parameterType instanceof ReflectionNamedType)
|
||||
&& $parameterType->isBuiltin();
|
||||
return $this->query($resolveName, !$builtIn);
|
||||
} catch (QueryException $e) {
|
||||
// Service not found, use the default value when available
|
||||
|
|
|
|||
Loading…
Reference in a new issue