diff --git a/src/ContainerInterface.php b/src/ContainerInterface.php index b2cad40..fdc1c08 100644 --- a/src/ContainerInterface.php +++ b/src/ContainerInterface.php @@ -12,12 +12,14 @@ interface ContainerInterface /** * Finds an entry of the container by its identifier and returns it. * - * @param string $id Identifier of the entry to look for. + * @template T of object + * + * @param class-string|string $id Identifier of the entry to look for. * * @throws NotFoundExceptionInterface No entry was found for **this** identifier. * @throws ContainerExceptionInterface Error while retrieving the entry. * - * @return mixed Entry. + * @return ($id is class-string ? T : mixed) Entry. */ public function get(string $id);