Skip to content

Commit

Permalink
feat: Add ordered_types to @Symfony (PHP-CS-Fixer#7356)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored and danog committed Feb 2, 2024
1 parent e220df0 commit 4c19775
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions doc/ruleSets/Symfony.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ Rules

``['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha']``

- `ordered_types <./../rules/class_notation/ordered_types.rst>`_ with config:

``['null_adjustment' => 'always_last', 'sort_algorithm' => 'none']``

- `php_unit_fqcn_annotation <./../rules/php_unit/php_unit_fqcn_annotation.rst>`_
- `php_unit_method_casing <./../rules/php_unit/php_unit_method_casing.rst>`_
- `phpdoc_align <./../rules/phpdoc/phpdoc_align.rst>`_
Expand Down
6 changes: 5 additions & 1 deletion doc/rules/class_notation/ordered_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,13 @@ With configuration: ``['sort_algorithm' => 'none', 'null_adjustment' => 'always_
Rule sets
---------

The rule is part of the following rule set:
The rule is part of the following rule sets:

- `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
- `@Symfony <./../../ruleSets/Symfony.rst>`_ with config:

``['null_adjustment' => 'always_last', 'sort_algorithm' => 'none']``


References
----------
Expand Down
4 changes: 4 additions & 0 deletions src/RuleSet/Sets/SymfonySet.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ public function getRules(): array
],
'sort_algorithm' => 'alpha',
],
'ordered_types' => [
'null_adjustment' => 'always_last',
'sort_algorithm' => 'none',
],
'php_unit_fqcn_annotation' => true,
'php_unit_method_casing' => true,
'phpdoc_align' => true,
Expand Down

0 comments on commit 4c19775

Please sign in to comment.