phpdoc_trim.rst 613 B

12345678910111213141516171819202122232425262728293031323334353637
  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. @@ -1,8 +1,5 @@
  14. <?php
  15. /**
  16. - *
  17. * Foo must be final class.
  18. - *
  19. - *
  20. */
  21. final class Foo {}
  22. Rule sets
  23. ---------
  24. The rule is part of the following rule sets:
  25. @Symfony
  26. Using the ``@Symfony`` rule set will enable the ``phpdoc_trim`` rule.
  27. @PhpCsFixer
  28. Using the ``@PhpCsFixer`` rule set will enable the ``phpdoc_trim`` rule.