heredoc_to_nowdoc.rst 504 B

1234567891011121314151617181920212223242526272829
  1. ==========================
  2. Rule ``heredoc_to_nowdoc``
  3. ==========================
  4. Convert ``heredoc`` to ``nowdoc`` where possible.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. @@ -1,3 +1,3 @@
  13. -<?php $a = <<<"TEST"
  14. +<?php $a = <<<'TEST'
  15. Foo
  16. TEST;
  17. Rule sets
  18. ---------
  19. The rule is part of the following rule set:
  20. @PhpCsFixer
  21. Using the `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_ rule set will enable the ``heredoc_to_nowdoc`` rule.