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

lint/classes/no-null-property-default

In the dead-code set. Safe fix.

What it does

Properties MUST not be explicitly initialised with null except when they have a type declaration (PHP 7.4).

Configuration

[lint.rules]
"classes/no-null-property-default" = "error"

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

Replaces

Merged rules

These old IDs are now this rule. A config that still names one stops with an error. See merged rules.

  • lint/classes/no-null-property-init

More lint/classes rules · Edit this page

Last updated on

Was this page helpful?