-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
[TypeDeclaration] Add missing usage of ClassMethodReturnTypeOverrideGuard on ReturnTypeFromMockObjectRector #6169
Conversation
…uard on ReturnTypeFromMockObjectRector
…uard on ReturnTypeFromMockObjectRector
@@ -8,7 +8,7 @@ use PHPUnit\Framework\TestCase; | |||
|
|||
final class SomeTestWithMock extends TestCase | |||
{ | |||
public function createMock() | |||
public function test() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated method name due to child without type is error early if parent method already have type, also consistent with example
All checks have passed 🎉 @TomasVotruba I am merging it ;) |
public function test(): \PHPUnit\Framework\MockObject\MockObject | ||
{ | ||
return $this->createMock('SomeType'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the createSomeMock()
should be used instead, as a factory method, not a test one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure #6171
No description provided.