Inspectopedia
 
2024.3

Visibility modifier can be removed

Info
New
Last modified: 03 December 2024

Reports a public visibility modifier that may be omitted for a property which has reduced set visibility specified. PHP properties are implicitly publicly readable if not otherwise specified.

Asymmetric visibility is supported in PHP 8.4 and later. For details, see PHP RFC: Asymmetric Visibility v2.