lint/phpunit/prefer-will-return-callback
In the code-quality set. Safe fix. Runs when phpunit is installed.
What it does
Merge ->with($this->callback()) and ->willReturn() into willReturnCallback().
Configuration
[lint.rules]
"phpunit/prefer-will-return-callback" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Options
| Name | Type | Allowed values | Default | Upstream name |
|---|---|---|---|---|
checks |
list |
merge-with-callable, void-method |
["merge-with-callable", "void-method"] |
None (Pun’s own) |
Replaces
MergeWithCallableAndWillReturn(rector-phpunit)VoidMethodWithCallbackToWillReturnCallback(rector-phpunit)
Merged rules
These old IDs are now this rule. A config that still names one stops with an error. See merged rules.
lint/phpunit/prefer-merged-will-return-callback