no_trailing_whitespace_in_string.rst 893 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. =========================================
  2. Rule ``no_trailing_whitespace_in_string``
  3. =========================================
  4. There must be no trailing whitespace in strings.
  5. Warning
  6. -------
  7. Using this rule is risky
  8. ~~~~~~~~~~~~~~~~~~~~~~~~
  9. Changing the whitespaces in strings might affect string comparisons and outputs.
  10. Examples
  11. --------
  12. Example #1
  13. ~~~~~~~~~~
  14. .. code-block:: diff
  15. --- Original
  16. +++ New
  17. -<?php $a = '
  18. - foo
  19. +<?php $a = '
  20. + foo
  21. ';
  22. Rule sets
  23. ---------
  24. The rule is part of the following rule sets:
  25. - `@PER-CS1.0:risky <./../../ruleSets/PER-CS1.0Risky.rst>`_
  26. - `@PER-CS2.0:risky <./../../ruleSets/PER-CS2.0Risky.rst>`_
  27. - `@PER:risky <./../../ruleSets/PERRisky.rst>`_
  28. - `@PSR12:risky <./../../ruleSets/PSR12Risky.rst>`_
  29. - `@PhpCsFixer:risky <./../../ruleSets/PhpCsFixerRisky.rst>`_
  30. - `@Symfony:risky <./../../ruleSets/SymfonyRisky.rst>`_