multiline_comment_opening_closing.rst 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ==========================================
  2. Rule ``multiline_comment_opening_closing``
  3. ==========================================
  4. DocBlocks must start with two asterisks, multiline comments must start with a
  5. single asterisk, after the opening slash. Both must end with a single asterisk
  6. before the closing slash.
  7. Examples
  8. --------
  9. Example #1
  10. ~~~~~~~~~~
  11. .. code-block:: diff
  12. --- Original
  13. +++ New
  14. <?php
  15. -/******
  16. +/*
  17. * Multiline comment with arbitrary asterisks count
  18. - ******/
  19. + */
  20. -/**\
  21. +/*\
  22. * Multiline comment that seems a DocBlock
  23. */
  24. /**
  25. * DocBlock with arbitrary asterisk count at the end
  26. - **/
  27. + */
  28. Rule sets
  29. ---------
  30. The rule is part of the following rule set:
  31. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  32. References
  33. ----------
  34. - Fixer class: `PhpCsFixer\\Fixer\\Comment\\MultilineCommentOpeningClosingFixer <./../../../src/Fixer/Comment/MultilineCommentOpeningClosingFixer.php>`_
  35. - Test class: `PhpCsFixer\\Tests\\Fixer\\Comment\\MultilineCommentOpeningClosingFixerTest <./../../../tests/Fixer/Comment/MultilineCommentOpeningClosingFixerTest.php>`_
  36. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.