phpdoc_line_span.rst 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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'``
  12. Default value: ``'multi'``
  13. ``property``
  14. ~~~~~~~~~~~~
  15. Whether property doc blocks should be single or multi line
  16. Allowed values: ``'multi'``, ``'single'``
  17. Default value: ``'multi'``
  18. ``method``
  19. ~~~~~~~~~~
  20. Whether method doc blocks should be single or multi line
  21. Allowed values: ``'multi'``, ``'single'``
  22. Default value: ``'multi'``
  23. Examples
  24. --------
  25. Example #1
  26. ~~~~~~~~~~
  27. *Default* configuration.
  28. .. code-block:: diff
  29. --- Original
  30. +++ New
  31. @@ -1,6 +1,8 @@
  32. <?php
  33. class Foo{
  34. - /** @var bool */
  35. + /**
  36. + * @var bool
  37. + */
  38. public $var;
  39. }
  40. Example #2
  41. ~~~~~~~~~~
  42. With configuration: ``['property' => 'single']``.
  43. .. code-block:: diff
  44. --- Original
  45. +++ New
  46. @@ -1,8 +1,6 @@
  47. <?php
  48. class Foo{
  49. - /**
  50. - * @var bool
  51. - */
  52. + /** @var bool */
  53. public $var;
  54. }