Fork me on GitHub
a Sensio Labs Product

I ate three cookies πŸͺ (v3.40.2) edition

Rule no_trailing_whitespace_in_stringΒΆ

There must be no trailing whitespace in strings.

WarningΒΆ

Using this rule is riskyΒΆ

Changing the whitespaces in strings might affect string comparisons and outputs.

ExamplesΒΆ

Example #1ΒΆ

--- Original
+++ New
-<?php $a = '
-    foo
+<?php $a = '
+    foo
 ';

Rule setsΒΆ

The rule is part of the following rule sets:

Source classΒΆ

PhpCsFixer\Fixer\StringNotation\NoTrailingWhitespaceInStringFixer