PhpCsFixer.rst 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ========================
  2. Rule set ``@PhpCsFixer``
  3. ========================
  4. Rule set as used by the PHP-CS-Fixer development team, highly opinionated.
  5. Rules
  6. -----
  7. - `@PER-CS <./PER-CS.rst>`_
  8. - `@Symfony <./Symfony.rst>`_
  9. - `blank_line_before_statement <./../rules/whitespace/blank_line_before_statement.rst>`_ with config:
  10. ``['statements' => ['break', 'case', 'continue', 'declare', 'default', 'exit', 'goto', 'include', 'include_once', 'phpdoc', 'require', 'require_once', 'return', 'switch', 'throw', 'try', 'yield', 'yield_from']]``
  11. - `combine_consecutive_issets <./../rules/language_construct/combine_consecutive_issets.rst>`_
  12. - `combine_consecutive_unsets <./../rules/language_construct/combine_consecutive_unsets.rst>`_
  13. - `empty_loop_body <./../rules/control_structure/empty_loop_body.rst>`_
  14. - `explicit_indirect_variable <./../rules/language_construct/explicit_indirect_variable.rst>`_
  15. - `explicit_string_variable <./../rules/string_notation/explicit_string_variable.rst>`_
  16. - `fully_qualified_strict_types <./../rules/import/fully_qualified_strict_types.rst>`_ with config:
  17. ``['import_symbols' => true]``
  18. - `heredoc_to_nowdoc <./../rules/string_notation/heredoc_to_nowdoc.rst>`_
  19. - `method_argument_space <./../rules/function_notation/method_argument_space.rst>`_ with config:
  20. ``['on_multiline' => 'ensure_fully_multiline']``
  21. - `method_chaining_indentation <./../rules/whitespace/method_chaining_indentation.rst>`_
  22. - `multiline_comment_opening_closing <./../rules/comment/multiline_comment_opening_closing.rst>`_
  23. - `multiline_whitespace_before_semicolons <./../rules/semicolon/multiline_whitespace_before_semicolons.rst>`_ with config:
  24. ``['strategy' => 'new_line_for_chained_calls']``
  25. - `no_extra_blank_lines <./../rules/whitespace/no_extra_blank_lines.rst>`_ with config:
  26. ``['tokens' => ['attribute', 'break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'return', 'square_brace_block', 'switch', 'throw', 'use']]``
  27. - `no_superfluous_elseif <./../rules/control_structure/no_superfluous_elseif.rst>`_
  28. - `no_superfluous_phpdoc_tags <./../rules/phpdoc/no_superfluous_phpdoc_tags.rst>`_ with config:
  29. ``['allow_mixed' => true, 'remove_inheritdoc' => true]``
  30. - `no_unneeded_control_parentheses <./../rules/control_structure/no_unneeded_control_parentheses.rst>`_ with config:
  31. ``['statements' => ['break', 'clone', 'continue', 'echo_print', 'negative_instanceof', 'others', 'return', 'switch_case', 'yield', 'yield_from']]``
  32. - `no_useless_else <./../rules/control_structure/no_useless_else.rst>`_
  33. - `no_useless_return <./../rules/return_notation/no_useless_return.rst>`_
  34. - `no_whitespace_before_comma_in_array <./../rules/array_notation/no_whitespace_before_comma_in_array.rst>`_ with config:
  35. ``['after_heredoc' => true]``
  36. - `ordered_class_elements <./../rules/class_notation/ordered_class_elements.rst>`_
  37. - `ordered_types <./../rules/class_notation/ordered_types.rst>`_
  38. - `php_unit_internal_class <./../rules/php_unit/php_unit_internal_class.rst>`_
  39. - `php_unit_test_class_requires_covers <./../rules/php_unit/php_unit_test_class_requires_covers.rst>`_
  40. - `phpdoc_add_missing_param_annotation <./../rules/phpdoc/phpdoc_add_missing_param_annotation.rst>`_
  41. - `phpdoc_no_empty_return <./../rules/phpdoc/phpdoc_no_empty_return.rst>`_
  42. - `phpdoc_order_by_value <./../rules/phpdoc/phpdoc_order_by_value.rst>`_
  43. - `phpdoc_types_order <./../rules/phpdoc/phpdoc_types_order.rst>`_
  44. - `phpdoc_var_annotation_correct_order <./../rules/phpdoc/phpdoc_var_annotation_correct_order.rst>`_
  45. - `protected_to_private <./../rules/class_notation/protected_to_private.rst>`_
  46. - `return_assignment <./../rules/return_notation/return_assignment.rst>`_
  47. - `self_static_accessor <./../rules/class_notation/self_static_accessor.rst>`_
  48. - `single_line_comment_style <./../rules/comment/single_line_comment_style.rst>`_
  49. - `single_line_empty_body <./../rules/basic/single_line_empty_body.rst>`_
  50. - `string_implicit_backslashes <./../rules/string_notation/string_implicit_backslashes.rst>`_
  51. - `trailing_comma_in_multiline <./../rules/control_structure/trailing_comma_in_multiline.rst>`_ with config:
  52. ``['after_heredoc' => true, 'elements' => ['array_destructuring', 'arrays']]``
  53. - `whitespace_after_comma_in_array <./../rules/array_notation/whitespace_after_comma_in_array.rst>`_ with config:
  54. ``['ensure_single_space' => true]``
  55. Disabled rules
  56. --------------
  57. - `single_line_throw <./../rules/function_notation/single_line_throw.rst>`_