phpdoc_no_useless_inheritdoc.rst 915 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. =====================================
  2. Rule ``phpdoc_no_useless_inheritdoc``
  3. =====================================
  4. Classy that does not inherit must not have ``@inheritdoc`` tags.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. @@ -1,5 +1,5 @@
  13. <?php
  14. -/** {@inheritdoc} */
  15. +/** */
  16. class Sample
  17. {
  18. }
  19. Example #2
  20. ~~~~~~~~~~
  21. .. code-block:: diff
  22. --- Original
  23. +++ New
  24. @@ -2,7 +2,7 @@
  25. class Sample
  26. {
  27. /**
  28. - * @inheritdoc
  29. + *
  30. */
  31. public function Test()
  32. {
  33. Rule sets
  34. ---------
  35. The rule is part of the following rule sets:
  36. @PhpCsFixer
  37. Using the `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ rule set will enable the ``phpdoc_no_useless_inheritdoc`` rule.
  38. @Symfony
  39. Using the `@Symfony <./../../ruleSets/Symfony.rst>`_ rule set will enable the ``phpdoc_no_useless_inheritdoc`` rule.