phpdoc_to_comment.rst 812 B

123456789101112131415161718192021222324252627282930313233343536
  1. ==========================
  2. Rule ``phpdoc_to_comment``
  3. ==========================
  4. Docblocks should only be used on structural elements.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. @@ -1,7 +1,7 @@
  13. <?php
  14. $first = true;// needed because by default first docblock is never fixed.
  15. -/** This should not be a docblock */
  16. +/* This should not be a docblock */
  17. foreach($connections as $key => $sqlite) {
  18. $sqlite->open($path);
  19. }
  20. Rule sets
  21. ---------
  22. The rule is part of the following rule sets:
  23. @PhpCsFixer
  24. Using the `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ rule set will enable the ``phpdoc_to_comment`` rule.
  25. @Symfony
  26. Using the `@Symfony <./../../ruleSets/Symfony.rst>`_ rule set will enable the ``phpdoc_to_comment`` rule.