lint/phpunit/no-stub-with-expectations
In the code-quality set. Safe fix. Runs when phpunit is installed.
What it does
Change createStub() to createMock(), when the created variable is passed to a method that requires MockObject type
Configuration
[lint.rules]
"phpunit/no-stub-with-expectations" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
MockObjectArgCreateStubToCreateMock(rector-phpunit)