method_chaining_indentation.rst 1017 B

123456789101112131415161718192021222324252627282930313233343536
  1. ====================================
  2. Rule ``method_chaining_indentation``
  3. ====================================
  4. Method chaining MUST be properly indented. Method chaining with different levels
  5. of indentation is not supported.
  6. Examples
  7. --------
  8. Example #1
  9. ~~~~~~~~~~
  10. .. code-block:: diff
  11. --- Original
  12. +++ New
  13. <?php
  14. $user->setEmail('voff.web@gmail.com')
  15. - ->setPassword('233434');
  16. + ->setPassword('233434');
  17. Rule sets
  18. ---------
  19. The rule is part of the following rule set:
  20. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  21. References
  22. ----------
  23. - Fixer class: `PhpCsFixer\\Fixer\\Whitespace\\MethodChainingIndentationFixer <./../../../src/Fixer/Whitespace/MethodChainingIndentationFixer.php>`_
  24. - Test class: `PhpCsFixer\\Tests\\Fixer\\Whitespace\\MethodChainingIndentationFixerTest <./../../../tests/Fixer/Whitespace/MethodChainingIndentationFixerTest.php>`_
  25. The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.