PSR12.rst 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ===================
  2. Rule set ``@PSR12``
  3. ===================
  4. Rules that follow `PSR-12 <https://www.php-fig.org/psr/psr-12/>`_ 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. - `class_definition <./../rules/class_notation/class_definition.rst>`_
  13. config:
  14. ``['space_before_parenthesis' => true]``
  15. - `compact_nullable_typehint <./../rules/whitespace/compact_nullable_typehint.rst>`_
  16. - `declare_equal_normalize <./../rules/language_construct/declare_equal_normalize.rst>`_
  17. - `lowercase_cast <./../rules/cast_notation/lowercase_cast.rst>`_
  18. - `lowercase_static_reference <./../rules/casing/lowercase_static_reference.rst>`_
  19. - `new_with_braces <./../rules/operator/new_with_braces.rst>`_
  20. - `no_blank_lines_after_class_opening <./../rules/class_notation/no_blank_lines_after_class_opening.rst>`_
  21. - `no_leading_import_slash <./../rules/import/no_leading_import_slash.rst>`_
  22. - `no_whitespace_in_blank_line <./../rules/whitespace/no_whitespace_in_blank_line.rst>`_
  23. - `ordered_class_elements <./../rules/class_notation/ordered_class_elements.rst>`_
  24. config:
  25. ``['order' => ['use_trait']]``
  26. - `ordered_imports <./../rules/import/ordered_imports.rst>`_
  27. config:
  28. ``['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'none']``
  29. - `return_type_declaration <./../rules/function_notation/return_type_declaration.rst>`_
  30. - `short_scalar_cast <./../rules/cast_notation/short_scalar_cast.rst>`_
  31. - `single_blank_line_before_namespace <./../rules/namespace_notation/single_blank_line_before_namespace.rst>`_
  32. - `single_trait_insert_per_statement <./../rules/class_notation/single_trait_insert_per_statement.rst>`_
  33. - `ternary_operator_spaces <./../rules/operator/ternary_operator_spaces.rst>`_
  34. - `visibility_required <./../rules/class_notation/visibility_required.rst>`_