phpdoc_trim_consecutive_blank_line_separation.rst 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ======================================================
  2. Rule ``phpdoc_trim_consecutive_blank_line_separation``
  3. ======================================================
  4. Removes extra blank lines after summary and after description in PHPDoc.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. /**
  14. * Summary.
  15. *
  16. - *
  17. * Description that contain 4 lines,
  18. *
  19. *
  20. * while 2 of them are blank!
  21. *
  22. - *
  23. * @param string $foo
  24. - *
  25. *
  26. * @dataProvider provideFixCases
  27. */
  28. function fnc($foo) {}
  29. Rule sets
  30. ---------
  31. The rule is part of the following rule sets:
  32. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  33. - `@Symfony <./../../ruleSets/Symfony.rst>`_
  34. References
  35. ----------
  36. - Fixer class: `PhpCsFixer\\Fixer\\Phpdoc\\PhpdocTrimConsecutiveBlankLineSeparationFixer <./../../../src/Fixer/Phpdoc/PhpdocTrimConsecutiveBlankLineSeparationFixer.php>`_
  37. - Test class: `PhpCsFixer\\Tests\\Fixer\\Phpdoc\\PhpdocTrimConsecutiveBlankLineSeparationFixerTest <./../../../tests/Fixer/Phpdoc/PhpdocTrimConsecutiveBlankLineSeparationFixerTest.php>`_
  38. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.