PhpStorm 2020.2 Help

Code Inspection: Typed Property might be uninitialized

Reports the attempts to read from an uninitialized typed property. Such attempts will result in TypeError .

Typed properties should be initialized in any of the following ways:

  • by a default value

  • in the constructor

  • by the __get() magic getter

  • in-place, at the moment of usage



See Uninitialized and Unset Properties (php.net) for details.

Last modified: 31 July 2020