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

lint/phpunit/prefer-short-will-return

In the code-quality set. Unsafe fix: it can change behaviour. Runs when phpunit is installed.

What it does

Use willReturn() and similar instead of will($this->returnValue()).

Configuration

[lint.rules]
"phpunit/prefer-short-will-return" = "error"

To skip it in some files, add an override or a @pun-ignore-file comment.

Replaces

More lint/phpunit rules · Edit this page

Last updated on

Was this page helpful?