=================================== Rule ``get_class_to_class_keyword`` =================================== Replace ``get_class`` calls on object variables with class keyword syntax. Warning ------- Using this rule is risky ~~~~~~~~~~~~~~~~~~~~~~~~ Risky if the ``get_class`` function is overridden. Examples -------- Example #1 ~~~~~~~~~~ .. code-block:: diff --- Original +++ New `_ - `@PHP82Migration:risky <./../../ruleSets/PHP82MigrationRisky.rst>`_ - `@Symfony:risky <./../../ruleSets/SymfonyRisky.rst>`_ References ---------- - Fixer class: `PhpCsFixer\\Fixer\\LanguageConstruct\\GetClassToClassKeywordFixer <./../../../src/Fixer/LanguageConstruct/GetClassToClassKeywordFixer.php>`_ - Test class: `PhpCsFixer\\Tests\\Fixer\\LanguageConstruct\\GetClassToClassKeywordFixerTest <./../../../tests/Fixer/LanguageConstruct/GetClassToClassKeywordFixerTest.php>`_ The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.