no_binary_string.rst 566 B

123456789101112131415161718192021222324252627282930313233343536373839
  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>`_