From 28ce57d0f474fa675f3d78824fc3ed7bfe1d0daf Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 19 Feb 2025 16:50:16 +0100 Subject: chore: Adjust `OCP\Server::get` annotation to work with phpstan Signed-off-by: Ferdinand Thiessen --- lib/public/Server.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/public/Server.php b/lib/public/Server.php index 55dbfed578e..e30d67701f6 100644 --- a/lib/public/Server.php +++ b/lib/public/Server.php @@ -15,6 +15,7 @@ use Psr\Container\NotFoundExceptionInterface; * use whenever possible dependency injections instead. * * ```php + * use OCP\ITagManager; * use OCP\Server; * * $tagManager = Server::get(ITagManager::class); @@ -24,12 +25,9 @@ use Psr\Container\NotFoundExceptionInterface; */ final class Server { /** - * @template T - * @param class-string|string $serviceName - * @return T|mixed - * @psalm-template S as class-string|string - * @psalm-param S $serviceName - * @psalm-return (S is class-string ? T : mixed) + * @psalm-template T + * @psalm-param class-string|string $serviceName + * @psalm-return ($serviceName is class-string ? T : mixed) * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface * @since 25.0.0 -- cgit v1.2.3