phpdoc_indent.rst 648 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. ======================
  2. Rule ``phpdoc_indent``
  3. ======================
  4. Docblocks should have the same indentation as the documented subject.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. @@ -1,8 +1,8 @@
  13. <?php
  14. class DocBlocks
  15. {
  16. -/**
  17. - * Test constants
  18. - */
  19. + /**
  20. + * Test constants
  21. + */
  22. const INDENT = 1;
  23. }
  24. Rule sets
  25. ---------
  26. The rule is part of the following rule sets:
  27. @Symfony
  28. Using the ``@Symfony`` rule set will enable the ``phpdoc_indent`` rule.
  29. @PhpCsFixer
  30. Using the ``@PhpCsFixer`` rule set will enable the ``phpdoc_indent`` rule.