phpdoc_var_without_name.rst 671 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ================================
  2. Rule ``phpdoc_var_without_name``
  3. ================================
  4. ``@var`` and ``@type`` annotations of classy properties should not contain the
  5. name.
  6. Examples
  7. --------
  8. Example #1
  9. ~~~~~~~~~~
  10. .. code-block:: diff
  11. --- Original
  12. +++ New
  13. <?php
  14. final class Foo
  15. {
  16. /**
  17. - * @var int $bar
  18. + * @var int
  19. */
  20. public $bar;
  21. /**
  22. - * @type $baz float
  23. + * @type float
  24. */
  25. public $baz;
  26. }
  27. Rule sets
  28. ---------
  29. The rule is part of the following rule sets:
  30. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  31. - `@Symfony <./../../ruleSets/Symfony.rst>`_