=========================================== Rule ``single_class_element_per_statement`` =========================================== There MUST NOT be more than one property or constant declared per statement. Configuration ------------- ``elements`` ~~~~~~~~~~~~ List of strings which element should be modified. Allowed values: a subset of ``['const', 'property']`` Default value: ``['const', 'property']`` Examples -------- Example #1 ~~~~~~~~~~ *Default* configuration. .. code-block:: diff --- Original +++ New ['property']]``. .. code-block:: diff --- Original +++ New `_ with config: ``['elements' => ['property']]`` - `@PER-CS <./../../ruleSets/PER-CS.rst>`_ with config: ``['elements' => ['property']]`` - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_ with config: ``['elements' => ['property']]`` - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_ with config: ``['elements' => ['property']]`` - `@PSR2 <./../../ruleSets/PSR2.rst>`_ with config: ``['elements' => ['property']]`` - `@PSR12 <./../../ruleSets/PSR12.rst>`_ with config: ``['elements' => ['property']]`` - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ - `@Symfony <./../../ruleSets/Symfony.rst>`_ References ---------- - Fixer class: `PhpCsFixer\\Fixer\\ClassNotation\\SingleClassElementPerStatementFixer <./../../../src/Fixer/ClassNotation/SingleClassElementPerStatementFixer.php>`_ - Test class: `PhpCsFixer\\Tests\\Fixer\\ClassNotation\\SingleClassElementPerStatementFixerTest <./../../../tests/Fixer/ClassNotation/SingleClassElementPerStatementFixerTest.php>`_ The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.