phpdoc_trim.rst 903 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ====================
  2. Rule ``phpdoc_trim``
  3. ====================
  4. PHPDoc should start and end with content, excluding the very first and last line
  5. of the docblocks.
  6. Examples
  7. --------
  8. Example #1
  9. ~~~~~~~~~~
  10. .. code-block:: diff
  11. --- Original
  12. +++ New
  13. <?php
  14. /**
  15. - *
  16. * Foo must be final class.
  17. - *
  18. - *
  19. */
  20. final class Foo {}
  21. Rule sets
  22. ---------
  23. The rule is part of the following rule sets:
  24. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  25. - `@Symfony <./../../ruleSets/Symfony.rst>`_
  26. References
  27. ----------
  28. - Fixer class: `PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTrimFixer <./../../../src/Fixer/Phpdoc/PhpdocTrimFixer.php>`_
  29. - Test class: `PhpCsFixer\\Tests\\Fixer\\Phpdoc\\PhpdocTrimFixerTest <./../../../tests/Fixer/Phpdoc/PhpdocTrimFixerTest.php>`_
  30. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.