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

lint/statements/add-safe-strict-types

In the code-quality set. Safe fix where types prove it, unsafe otherwise. Intent: suspicious.

What it does

Add declare(strict_types=1) if missing and only if the file is type-safe (no scalar type coercions).

Configuration

[lint.rules]
"statements/add-safe-strict-types" = "error"

To skip it in some files or lines, add an override or an ignore comment.

Replaces

More lint/statements rules · Edit this page

Last updated on

Was this page helpful?