phpdoc_indent.rst 942 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. <?php
  13. class DocBlocks
  14. {
  15. -/**
  16. - * Test constants
  17. - */
  18. + /**
  19. + * Test constants
  20. + */
  21. const INDENT = 1;
  22. }
  23. Rule sets
  24. ---------
  25. The rule is part of the following rule sets:
  26. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  27. - `@Symfony <./../../ruleSets/Symfony.rst>`_
  28. References
  29. ----------
  30. - Fixer class: `PhpCsFixer\\Fixer\\Phpdoc\\PhpdocIndentFixer <./../../../src/Fixer/Phpdoc/PhpdocIndentFixer.php>`_
  31. - Test class: `PhpCsFixer\\Tests\\Fixer\\Phpdoc\\PhpdocIndentFixerTest <./../../../tests/Fixer/Phpdoc/PhpdocIndentFixerTest.php>`_
  32. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.