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

lint/classes/add-stringable

In the modernize set. Safe fix.

What it does

A class that implements the __toString() method must explicitly implement the Stringable interface.

Configuration

[lint.rules]
"classes/add-stringable" = "error"

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

Replaces

More lint/classes rules · Edit this page

Last updated on

Was this page helpful?