-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for ProphecySubjectInterface::getProphecy() #228
Comments
Example:
PHPStan output:
|
This |
Shouldnt that be: /**
* @var ObjectProphecy<TestInterface>
*/
private $test; But looks like $this->test
- ->getProphecy()
->func()
->willReturn('hello'); As I'm not sure if there is any easy way to fix the getProphecy |
My own usage is indeed to store the ObjectProphecy instead of the revealed double, which makes it easier. |
@stof Same for me make it a lot easier. I'm thinking of that /**
* @template T of object
* @template-implements ProphecyInterface<T>
*/
class ObjectProphecy implements ProphecyInterface
{
/**
* @return ProphecySubjectInterface<T>
*/
public function reveal()
{
}
} And /**
* @template T of object
* @extends T
*/
interface ProphecySubjectInterface
{
/**
* @return ObjectProphecy<T>
*/
public function getProphecy()
{
}
} But not sure and did not yet test it. |
There should be support for
ProphecySubjectInterface::getProphecy()
.It should be handled the same way as
prophesize()
.The text was updated successfully, but these errors were encountered: