line_ending.rst 652 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. ====================
  2. Rule ``line_ending``
  3. ====================
  4. All PHP files must use same line ending.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. @@ -1,5 +1,5 @@
  13. <?php $b = " $a ^M
  14. - 123"; $a = <<<TEST^M
  15. -AAAAA ^M
  16. - |^M
  17. + 123"; $a = <<<TEST
  18. +AAAAA
  19. + |
  20. TEST;
  21. Rule sets
  22. ---------
  23. The rule is part of the following rule sets:
  24. @PSR2
  25. Using the ``@PSR2`` rule set will enable the ``line_ending`` rule.
  26. @Symfony
  27. Using the ``@Symfony`` rule set will enable the ``line_ending`` rule.
  28. @PhpCsFixer
  29. Using the ``@PhpCsFixer`` rule set will enable the ``line_ending`` rule.