Skip to content

Commit

Permalink
Add more precise types for the prophesize method
Browse files Browse the repository at this point in the history
This matches the type used in Prophecy as the method is forwarded to it.
  • Loading branch information
stof committed Mar 13, 2024
1 parent 16e1247 commit ba6dc1b
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 ba6dc1b

Please sign in to comment.