Skip to content

Commit

Permalink
Merge pull request #63 from stof/generic_types
Browse files Browse the repository at this point in the history
Add more precise types for the prophesize method
  • Loading branch information
stof committed Mar 13, 2024
2 parents 16e1247 + ba6dc1b commit 0604e27
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ProphecyTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ trait ProphecyTrait
* @throws DoubleException
* @throws InterfaceNotFoundException
*
* @psalm-param class-string|null $classOrInterface
* @template T of object
* @phpstan-param class-string<T>|null $classOrInterface
* @phpstan-return ($classOrInterface is null ? ObjectProphecy<object> : ObjectProphecy<T>)
*
* @not-deprecated
*/
protected function prophesize(?string $classOrInterface = null): ObjectProphecy
Expand Down

0 comments on commit 0604e27

Please sign in to comment.