summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-07-28 07:50:17 +0200
committerJulius Härtl <jus@bitgrid.net>2022-10-14 10:45:16 +0200
commitcea2f79bbd02ba9eafa9993baa513ce8900d9f3f (patch)
treed0773ba1390941c0d4c82d41c64ce74e9805236e /lib/public
parentf49ccd140fd5ada0aa640f6642464ad149c980e6 (diff)
downloadnextcloud-server-cea2f79bbd02ba9eafa9993baa513ce8900d9f3f.tar.gz
nextcloud-server-cea2f79bbd02ba9eafa9993baa513ce8900d9f3f.zip
Improve container return type annotations
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Server.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/public/Server.php b/lib/public/Server.php
index f4522e8ae10..92560e2b17e 100644
--- a/lib/public/Server.php
+++ b/lib/public/Server.php
@@ -41,9 +41,11 @@ use Psr\Container\NotFoundExceptionInterface;
final class Server {
/**
* @template T
- * @template S as class-string<T>|string
- * @param S $serviceName
- * @return (S is class-string<T> ? T : mixed)
+ * @param class-string<T>|string $serviceName
+ * @return T|mixed
+ * @psalm-template S as class-string<T>|string
+ * @psalm-param S $serviceName
+ * @psalm-return (S is class-string<T> ? T : mixed)
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @since 25.0.0