============================== Rule ``statement_indentation`` ============================== Each statement must be indented. Configuration ------------- ``stick_comment_to_next_continuous_control_statement`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Last comment of code block counts as comment for next block. Allowed types: ``bool`` Default value: ``false`` Examples -------- Example #1 ~~~~~~~~~~ *Default* configuration. .. code-block:: diff --- Original +++ New false]``. .. code-block:: diff --- Original +++ New true]``. .. code-block:: diff --- Original +++ New `_ - `@PER-CS <./../../ruleSets/PER-CS.rst>`_ - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_ - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_ - `@PSR2 <./../../ruleSets/PSR2.rst>`_ - `@PSR12 <./../../ruleSets/PSR12.rst>`_ - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ with config: ``['stick_comment_to_next_continuous_control_statement' => true]`` - `@Symfony <./../../ruleSets/Symfony.rst>`_ with config: ``['stick_comment_to_next_continuous_control_statement' => true]`` References ---------- - Fixer class: `PhpCsFixer\\Fixer\\Whitespace\\StatementIndentationFixer <./../../../src/Fixer/Whitespace/StatementIndentationFixer.php>`_ - Test class: `PhpCsFixer\\Tests\\Fixer\\Whitespace\\StatementIndentationFixerTest <./../../../tests/Fixer/Whitespace/StatementIndentationFixerTest.php>`_ The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.