=========================== Rule ``ordered_attributes`` =========================== Sorts attributes using the configured sort algorithm. Configuration ------------- ``order`` ~~~~~~~~~ A list of FQCNs of attributes defining the desired order used when custom sorting algorithm is configured. Allowed types: ``list`` Default value: ``[]`` ``sort_algorithm`` ~~~~~~~~~~~~~~~~~~ How the attributes should be sorted. Allowed values: ``'alpha'`` and ``'custom'`` Default value: ``'alpha'`` Examples -------- Example #1 ~~~~~~~~~~ *Default* configuration. .. code-block:: diff --- Original +++ New 'custom', 'order' => ['A\\B\\Qux', 'A\\B\\Bar', 'A\\B\\Corge']]``. .. code-block:: diff --- Original +++ New `_ - Test class: `PhpCsFixer\\Tests\\Fixer\\AttributeNotation\\OrderedAttributesFixerTest <./../../../tests/Fixer/AttributeNotation/OrderedAttributesFixerTest.php>`_ The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.