Skip to content

Commit

Permalink
Add generics to ContainerInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
loic425 committed Jan 11, 2024
1 parent 7079847 commit a34d109
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ContainerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 mixed
*
* @param T|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 T|mixed Entry.
*/
public function get(string $id);

Expand Down

0 comments on commit a34d109

Please sign in to comment.