PSR12.rst 1.9 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ===================
  2. Rule set ``@PSR12``
  3. ===================
  4. Rules that follow `PSR-2 <https://www.php-fig.org/psr/psr-2/>`_ standard.
  5. Rules
  6. -----
  7. - `@PSR2 <./PSR2.rst>`_
  8. - `blank_line_after_opening_tag <./../rules/php_tag/blank_line_after_opening_tag.rst>`_
  9. - `braces <./../rules/basic/braces.rst>`_
  10. config:
  11. ``['allow_single_line_anonymous_class_with_empty_body' => true]``
  12. - `compact_nullable_typehint <./../rules/whitespace/compact_nullable_typehint.rst>`_
  13. - `declare_equal_normalize <./../rules/language_construct/declare_equal_normalize.rst>`_
  14. - `lowercase_cast <./../rules/cast_notation/lowercase_cast.rst>`_
  15. - `lowercase_static_reference <./../rules/casing/lowercase_static_reference.rst>`_
  16. - `new_with_braces <./../rules/operator/new_with_braces.rst>`_
  17. - `no_blank_lines_after_class_opening <./../rules/class_notation/no_blank_lines_after_class_opening.rst>`_
  18. - `no_leading_import_slash <./../rules/import/no_leading_import_slash.rst>`_
  19. - `no_whitespace_in_blank_line <./../rules/whitespace/no_whitespace_in_blank_line.rst>`_
  20. - `ordered_class_elements <./../rules/class_notation/ordered_class_elements.rst>`_
  21. config:
  22. ``['order' => ['use_trait']]``
  23. - `ordered_imports <./../rules/import/ordered_imports.rst>`_
  24. config:
  25. ``['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'none']``
  26. - `return_type_declaration <./../rules/function_notation/return_type_declaration.rst>`_
  27. - `short_scalar_cast <./../rules/cast_notation/short_scalar_cast.rst>`_
  28. - `single_blank_line_before_namespace <./../rules/namespace_notation/single_blank_line_before_namespace.rst>`_
  29. - `single_trait_insert_per_statement <./../rules/class_notation/single_trait_insert_per_statement.rst>`_
  30. - `ternary_operator_spaces <./../rules/operator/ternary_operator_spaces.rst>`_
  31. - `visibility_required <./../rules/class_notation/visibility_required.rst>`_
  32. config:
  33. ``['elements' => ['const', 'method', 'property']]``