Skip to content

Commit

Permalink
generics on DelegatingPathResolver
Browse files Browse the repository at this point in the history
  • Loading branch information
Warxcell committed Jul 14, 2021
1 parent f4cd579 commit 7a1824f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/PathResolver/DelegatingPathResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

class DelegatingPathResolver implements PathResolver
{
/** @var array<class-string<PathResolver>, PathResolver> */
/** @var array<class-string<File>, PathResolver> */
private array $resolvers;

/**
* @param array<class-string<PathResolver>, PathResolver> $resolvers
* @param array<class-string<File>, PathResolver> $resolvers
*/
public function __construct(array $resolvers)
{
Expand All @@ -27,6 +27,9 @@ public function getPath(File $file): string
}

/**
* @template T of File
* @param T $file
* @return PathResolver<T>
* @throws LogicException if no Resolver is found for $file
*/
private function getResolver(File $file): PathResolver
Expand Down

0 comments on commit 7a1824f

Please sign in to comment.