string_line_ending.rst 664 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. ===========================
  2. Rule ``string_line_ending``
  3. ===========================
  4. All multi-line strings must use correct line ending.
  5. Warning
  6. -------
  7. Using this rule is risky
  8. ~~~~~~~~~~~~~~~~~~~~~~~~
  9. Changing the line endings of multi-line strings might affect string comparisons
  10. and outputs.
  11. Examples
  12. --------
  13. Example #1
  14. ~~~~~~~~~~
  15. .. code-block:: diff
  16. --- Original
  17. +++ New
  18. -<?php $a = 'my^M
  19. +<?php $a = 'my
  20. multi
  21. -line^M
  22. +line
  23. string';^M
  24. Rule sets
  25. ---------
  26. The rule is part of the following rule sets:
  27. - `@PhpCsFixer:risky <./../../ruleSets/PhpCsFixerRisky.rst>`_
  28. - `@Symfony:risky <./../../ruleSets/SymfonyRisky.rst>`_