Skip to content

Commit

Permalink
Merge pull request #3 from stellarwp/feature/improve-generics
Browse files Browse the repository at this point in the history
Add specific phpstan-return and update return
  • Loading branch information
borkweb authored Sep 5, 2023
2 parents b1568be + 778b156 commit b2c42c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ContainerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public function bind( string $id, $implementation = null );
*
* @param string|class-string<T> $id Identifier of the entry to look for.
*
* @return ($id is class-string<T> ? T : mixed) Entry.
* @return T|mixed
* @phpstan-return ($id is class-string ? T : mixed)
*/
public function get( string $id );

Expand Down

0 comments on commit b2c42c7

Please sign in to comment.