Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

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

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

More lint/phpunit rules · Edit this page

Last updated on

Was this page helpful?