aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2025-04-29 16:11:02 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2025-06-05 20:49:58 +0200
commit1bf41550d0b0240809664ccead2661c5467d222f (patch)
treefdea38ec17aee6695d1c9220814e5ea3e4d7a508
parent06c062bebda22f6f3ae01c11bb7f88f0552454a5 (diff)
downloadnextcloud-server-1bf41550d0b0240809664ccead2661c5467d222f.tar.gz
nextcloud-server-1bf41550d0b0240809664ccead2661c5467d222f.zip
chore: Suppress psalm error
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--lib/private/AppFramework/Utility/SimpleContainer.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index d245cc05042..119c5018443 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -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