phpdoc_line_span.rst 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. =========================
  2. Rule ``phpdoc_line_span``
  3. =========================
  4. Changes doc blocks from single to multi line, or reversed. Works for class
  5. constants, properties and methods only.
  6. Configuration
  7. -------------
  8. ``const``
  9. ~~~~~~~~~
  10. Whether const blocks should be single or multi line.
  11. Allowed values: ``'multi'``, ``'single'`` and ``null``
  12. Default value: ``'multi'``
  13. ``property``
  14. ~~~~~~~~~~~~
  15. Whether property doc blocks should be single or multi line.
  16. Allowed values: ``'multi'``, ``'single'`` and ``null``
  17. Default value: ``'multi'``
  18. ``method``
  19. ~~~~~~~~~~
  20. Whether method doc blocks should be single or multi line.
  21. Allowed values: ``'multi'``, ``'single'`` and ``null``
  22. Default value: ``'multi'``
  23. Examples
  24. --------
  25. Example #1
  26. ~~~~~~~~~~
  27. *Default* configuration.
  28. .. code-block:: diff
  29. --- Original
  30. +++ New
  31. <?php
  32. class Foo{
  33. - /** @var bool */
  34. + /**
  35. + * @var bool
  36. + */
  37. public $var;
  38. }
  39. Example #2
  40. ~~~~~~~~~~
  41. With configuration: ``['property' => 'single']``.
  42. .. code-block:: diff
  43. --- Original
  44. +++ New
  45. <?php
  46. class Foo{
  47. - /**
  48. - * @var bool
  49. - */
  50. + /** @var bool */
  51. public $var;
  52. }