lint/classes/prefer-self-in-final
In the modernize and code-quality sets. Safe fix.
What it does
Inside an enum or final/anonymous class, self should be preferred over static.
Configuration
[lint.rules]
"classes/prefer-self-in-final" = "error"
To skip it in some files, add an override or a @pun-ignore-file comment.
Replaces
self_static_accessor(php-cs-fixer)ConvertStaticToSelf(rector)redundant-static(mago-linter)
Merged rules
These old IDs are now this rule. A config that still names one stops with an error. See merged rules.
lint/classes/prefer-self-over-static
Rector also rewrote static:: to self:: for private members of non-final classes; that case is not covered yet.