PSR2.rst 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ==================
  2. Rule set ``@PSR2``
  3. ==================
  4. Rules that follow `PSR-2 <https://www.php-fig.org/psr/psr-2/>`_ standard.
  5. Rules
  6. -----
  7. - `@PSR1 <./PSR1.rst>`_
  8. - `blank_line_after_namespace <./../rules/namespace_notation/blank_line_after_namespace.rst>`_
  9. - `class_definition <./../rules/class_notation/class_definition.rst>`_
  10. - `constant_case <./../rules/casing/constant_case.rst>`_
  11. - `control_structure_braces <./../rules/control_structure/control_structure_braces.rst>`_
  12. - `control_structure_continuation_position <./../rules/control_structure/control_structure_continuation_position.rst>`_
  13. - `curly_braces_position <./../rules/basic/curly_braces_position.rst>`_
  14. - `elseif <./../rules/control_structure/elseif.rst>`_
  15. - `function_declaration <./../rules/function_notation/function_declaration.rst>`_
  16. - `indentation_type <./../rules/whitespace/indentation_type.rst>`_
  17. - `line_ending <./../rules/whitespace/line_ending.rst>`_
  18. - `lowercase_keywords <./../rules/casing/lowercase_keywords.rst>`_
  19. - `method_argument_space <./../rules/function_notation/method_argument_space.rst>`_ with config:
  20. ``['on_multiline' => 'ensure_fully_multiline']``
  21. - `no_break_comment <./../rules/control_structure/no_break_comment.rst>`_
  22. - `no_closing_tag <./../rules/php_tag/no_closing_tag.rst>`_
  23. - `no_multiple_statements_per_line <./../rules/basic/no_multiple_statements_per_line.rst>`_
  24. - `no_space_around_double_colon <./../rules/operator/no_space_around_double_colon.rst>`_
  25. - `no_spaces_after_function_name <./../rules/function_notation/no_spaces_after_function_name.rst>`_
  26. - `no_trailing_whitespace <./../rules/whitespace/no_trailing_whitespace.rst>`_
  27. - `no_trailing_whitespace_in_comment <./../rules/comment/no_trailing_whitespace_in_comment.rst>`_
  28. - `single_blank_line_at_eof <./../rules/whitespace/single_blank_line_at_eof.rst>`_
  29. - `single_class_element_per_statement <./../rules/class_notation/single_class_element_per_statement.rst>`_ with config:
  30. ``['elements' => ['property']]``
  31. - `single_import_per_statement <./../rules/import/single_import_per_statement.rst>`_
  32. - `single_line_after_imports <./../rules/import/single_line_after_imports.rst>`_
  33. - `spaces_inside_parentheses <./../rules/whitespace/spaces_inside_parentheses.rst>`_
  34. - `statement_indentation <./../rules/whitespace/statement_indentation.rst>`_
  35. - `switch_case_semicolon_to_colon <./../rules/control_structure/switch_case_semicolon_to_colon.rst>`_
  36. - `switch_case_space <./../rules/control_structure/switch_case_space.rst>`_
  37. - `visibility_required <./../rules/class_notation/visibility_required.rst>`_ with config:
  38. ``['elements' => ['method', 'property']]``