======================================== Rule ``no_unneeded_control_parentheses`` ======================================== Removes unneeded parentheses around control statements. Configuration ------------- ``statements`` ~~~~~~~~~~~~~~ List of control statements to fix. Allowed values: a subset of ``['break', 'clone', 'continue', 'echo_print', 'negative_instanceof', 'others', 'return', 'switch_case', 'yield', 'yield_from']`` Default value: ``['break', 'clone', 'continue', 'echo_print', 'return', 'switch_case', 'yield']`` Examples -------- Example #1 ~~~~~~~~~~ *Default* configuration. .. code-block:: diff --- Original +++ New ['break', 'continue']]``. .. code-block:: diff --- Original +++ New `_ with config: ``['statements' => ['break', 'clone', 'continue', 'echo_print', 'negative_instanceof', 'others', 'return', 'switch_case', 'yield', 'yield_from']]`` - `@Symfony <./../../ruleSets/Symfony.rst>`_ with config: ``['statements' => ['break', 'clone', 'continue', 'echo_print', 'others', 'return', 'switch_case', 'yield', 'yield_from']]`` References ---------- - Fixer class: `PhpCsFixer\\Fixer\\ControlStructure\\NoUnneededControlParenthesesFixer <./../../../src/Fixer/ControlStructure/NoUnneededControlParenthesesFixer.php>`_ - Test class: `PhpCsFixer\\Tests\\Fixer\\ControlStructure\\NoUnneededControlParenthesesFixerTest <./../../../tests/Fixer/ControlStructure/NoUnneededControlParenthesesFixerTest.php>`_ The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.