======================================== Rule ``no_null_property_initialization`` ======================================== Properties MUST not be explicitly initialized with ``null`` except when they have a type declaration (PHP 7.4). Examples -------- Example #1 ~~~~~~~~~~ .. code-block:: diff --- Original +++ New `_ - `@Symfony <./../../ruleSets/Symfony.rst>`_ References ---------- - Fixer class: `PhpCsFixer\\Fixer\\ClassNotation\\NoNullPropertyInitializationFixer <./../../../src/Fixer/ClassNotation/NoNullPropertyInitializationFixer.php>`_ - Test class: `PhpCsFixer\\Tests\\Fixer\\ClassNotation\\NoNullPropertyInitializationFixerTest <./../../../tests/Fixer/ClassNotation/NoNullPropertyInitializationFixerTest.php>`_ The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.