phpdoc_no_useless_inheritdoc.rst 734 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. <?php
  13. -/** {@inheritdoc} */
  14. +/** */
  15. class Sample
  16. {
  17. }
  18. Example #2
  19. ~~~~~~~~~~
  20. .. code-block:: diff
  21. --- Original
  22. +++ New
  23. <?php
  24. class Sample
  25. {
  26. /**
  27. - * @inheritdoc
  28. + *
  29. */
  30. public function Test()
  31. {
  32. }
  33. }
  34. Rule sets
  35. ---------
  36. The rule is part of the following rule sets:
  37. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  38. - `@Symfony <./../../ruleSets/Symfony.rst>`_