no_binary_string.rst 995 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. =========================
  2. Rule ``no_binary_string``
  3. =========================
  4. There should not be a binary flag before strings.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. -<?php $a = b'foo';
  13. +<?php $a = 'foo';
  14. Example #2
  15. ~~~~~~~~~~
  16. .. code-block:: diff
  17. --- Original
  18. +++ New
  19. -<?php $a = b<<<EOT
  20. +<?php $a = <<<EOT
  21. foo
  22. EOT;
  23. Rule sets
  24. ---------
  25. The rule is part of the following rule sets:
  26. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  27. - `@Symfony <./../../ruleSets/Symfony.rst>`_
  28. References
  29. ----------
  30. - Fixer class: `PhpCsFixer\\Fixer\\StringNotation\\NoBinaryStringFixer <./../../../src/Fixer/StringNotation/NoBinaryStringFixer.php>`_
  31. - Test class: `PhpCsFixer\\Tests\\Fixer\\StringNotation\\NoBinaryStringFixerTest <./../../../tests/Fixer/StringNotation/NoBinaryStringFixerTest.php>`_
  32. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.