diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php index 3bb275a4d3c13..4e8b5e37b5e62 100644 --- a/lib/private/AppFramework/Utility/SimpleContainer.php +++ b/lib/private/AppFramework/Utility/SimpleContainer.php @@ -52,6 +52,12 @@ public function __construct() { $this->container = new Container(); } + /** + * @template T + * @param class-string $id + * @return T + * @throws QueryException + */ public function get($id) { return $this->query($id); } diff --git a/lib/public/IContainer.php b/lib/public/IContainer.php index 74fdf4aba5b52..9cedbcccd1679 100644 --- a/lib/public/IContainer.php +++ b/lib/public/IContainer.php @@ -66,9 +66,10 @@ public function resolve($name); /** * Look up a service for a given name in the container. * - * @param string $name + * @template T + * @param class-string $name * @param bool $autoload Should we try to autoload the service. If we are trying to resolve built in types this makes no sense for example - * @return mixed + * @return T * @throws ContainerExceptionInterface if the query could not be resolved * @throws QueryException if the query could not be resolved * @since 6.0.0