phpdoc_no_package.rst 927 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ==========================
  2. Rule ``phpdoc_no_package``
  3. ==========================
  4. ``@package`` and ``@subpackage`` annotations should be omitted from PHPDoc.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. /**
  14. * @internal
  15. - * @package Foo
  16. - * subpackage Bar
  17. */
  18. class Baz
  19. {
  20. }
  21. Rule sets
  22. ---------
  23. The rule is part of the following rule sets:
  24. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  25. - `@Symfony <./../../ruleSets/Symfony.rst>`_
  26. References
  27. ----------
  28. - Fixer class: `PhpCsFixer\\Fixer\\Phpdoc\\PhpdocNoPackageFixer <./../../../src/Fixer/Phpdoc/PhpdocNoPackageFixer.php>`_
  29. - Test class: `PhpCsFixer\\Tests\\Fixer\\Phpdoc\\PhpdocNoPackageFixerTest <./../../../tests/Fixer/Phpdoc/PhpdocNoPackageFixerTest.php>`_
  30. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.