Skip to content

Commit

Permalink
Fixed scanClasses() iteration value generic type
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Wright <[email protected]>
  • Loading branch information
betterthanclay committed Nov 27, 2023
1 parent ba2587a commit 69a5919
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Fixed scanClasses() iteration value generic type
* Made PHP8.1 minimum version

## v0.2.21 (2023-11-09)
Expand Down
6 changes: 4 additions & 2 deletions src/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,9 @@ public function findFile(
/**
* Scan Resolvers for available classes
*
* @param class-string $interface
* @return Generator<string, class-string>
* @template T of object
* @param class-string<T> $interface
* @return Generator<string, class-string<T>>
*/
public function scanClasses(
string $interface
Expand All @@ -393,6 +394,7 @@ public function scanClasses(
continue;
}

/** @var class-string<T> $class */
yield $path => $class;
}
}
Expand Down

0 comments on commit 69a5919

Please sign in to comment.