no_multiline_whitespace_around_double_arrow.rst 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ====================================================
  2. Rule ``no_multiline_whitespace_around_double_arrow``
  3. ====================================================
  4. Operator ``=>`` should not be surrounded by multi-line whitespaces.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. -$a = array(1
  14. -
  15. -=> 2);
  16. +$a = array(1 => 2);
  17. Rule sets
  18. ---------
  19. The rule is part of the following rule sets:
  20. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  21. - `@Symfony <./../../ruleSets/Symfony.rst>`_
  22. References
  23. ----------
  24. - Fixer class: `PhpCsFixer\\Fixer\\ArrayNotation\\NoMultilineWhitespaceAroundDoubleArrowFixer <./../../../src/Fixer/ArrayNotation/NoMultilineWhitespaceAroundDoubleArrowFixer.php>`_
  25. - Test class: `PhpCsFixer\\Tests\\Fixer\\ArrayNotation\\NoMultilineWhitespaceAroundDoubleArrowFixerTest <./../../../tests/Fixer/ArrayNotation/NoMultilineWhitespaceAroundDoubleArrowFixerTest.php>`_
  26. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.