aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-02-19 16:50:16 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2025-02-19 16:50:16 +0100
commit28ce57d0f474fa675f3d78824fc3ed7bfe1d0daf (patch)
tree8a3b1871af6678cbe0d0cc01979c3fa35ec5336c /lib
parentbdc043dd041f3e9db40fdf66dc7d05400971f1a5 (diff)
downloadnextcloud-server-28ce57d0f474fa675f3d78824fc3ed7bfe1d0daf.tar.gz
nextcloud-server-28ce57d0f474fa675f3d78824fc3ed7bfe1d0daf.zip
chore: Adjust `OCP\Server::get` annotation to work with phpstanchore/server-annotations
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/public/Server.php10
1 files 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<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)
+ * @psalm-template T
+ * @psalm-param class-string<T>|string $serviceName
+ * @psalm-return ($serviceName is class-string<T> ? T : mixed)
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @since 25.0.0