'final' modifier is redundant, property with private 'set' visibility is implicitly final

Last modified: 03 December 2024

Reports a redundant final modifier used for the private(set) property. private(set) makes the property implicitly final, so the final keyword can be removed.

private(set) syntax and asymmetric visibility properties are supported in PHP 8.4 and later. For details, see PHP RFC: Asymmetric Visibility v2.