Skip to content

Commit 0b7b3b6

Browse files
authored
Automatically resolve the flag's type if it's a class string (#146)
1 parent ae29537 commit 0b7b3b6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Drivers/Decorator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,10 @@ public function nameMap(): array
602602
/**
603603
* Retrieve the feature's class.
604604
*
605-
* @param string $name
606-
* @return mixed
605+
* @template TFlag
606+
*
607+
* @param TFlag|string $name
608+
* @return (TFlag is class-string<TFlag> ? TFlag : mixed)
607609
*/
608610
public function instance($name)
609611
{

0 commit comments

Comments
 (0)