Skip to content

Commit ba6dc1b

Browse files
committed
Add more precise types for the prophesize method
This matches the type used in Prophecy as the method is forwarded to it.
1 parent 16e1247 commit ba6dc1b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ProphecyTrait.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ trait ProphecyTrait
3636
* @throws DoubleException
3737
* @throws InterfaceNotFoundException
3838
*
39-
* @psalm-param class-string|null $classOrInterface
39+
* @template T of object
40+
* @phpstan-param class-string<T>|null $classOrInterface
41+
* @phpstan-return ($classOrInterface is null ? ObjectProphecy<object> : ObjectProphecy<T>)
42+
*
4043
* @not-deprecated
4144
*/
4245
protected function prophesize(?string $classOrInterface = null): ObjectProphecy

0 commit comments

Comments
 (0)