diff --git a/lib/classes/DIContainer.php b/lib/classes/DIContainer.php
index 9f0721b67d590354bc296c05a5bca83244284ce1..818d19102677798c38a3cf676ffaf090139aaff8 100644
--- a/lib/classes/DIContainer.php
+++ b/lib/classes/DIContainer.php
@@ -17,7 +17,7 @@ class DIContainer
     /**
      * Get the globally available instance of the container.
      *
-     * @return static
+     * @return ContainerInterface
      */
     public static function getInstance()
     {
diff --git a/lib/helpers.php b/lib/helpers.php
index 6c7accd91d22ff988fc19fdda22e390cf4fef9ed..a44f10b9b97ebb2d5f5b4a69a83e7562d4b0146c 100644
--- a/lib/helpers.php
+++ b/lib/helpers.php
@@ -14,13 +14,13 @@ use Psr\Container\ContainerInterface;
  * ```
  * $logger = app(LoggerInterface::class);
  * ```
- *
- * @param string|null $entryId    entry name or a class name
+ * @template T
+ * @param class-string<T>|string|null $entryId    entry name or a class name
  * @param array       $parameters Optional parameters to use to build the entry.
  *                                Use this to force specific parameters to specific values.
  *                                Parameters not defined in this array will be resolved using the container.
  *
- * @return ContainerInterface|mixed either the DI container or the entry associated to the $entryId
+ * @return T|ContainerInterface|mixed either the DI container or the entry associated to the $entryId
  */
 function app($entryId = null, $parameters = [])
 {