diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-07-28 07:50:17 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2022-10-14 10:45:16 +0200 |
commit | cea2f79bbd02ba9eafa9993baa513ce8900d9f3f (patch) | |
tree | d0773ba1390941c0d4c82d41c64ce74e9805236e /lib/public | |
parent | f49ccd140fd5ada0aa640f6642464ad149c980e6 (diff) | |
download | nextcloud-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.php | 8 |
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 |