statement_indentation.rst 736 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. ==============================
  2. Rule ``statement_indentation``
  3. ==============================
  4. Each statement must be indented.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. <?php
  13. if ($baz == true) {
  14. - echo "foo";
  15. + echo "foo";
  16. }
  17. else {
  18. - echo "bar";
  19. + echo "bar";
  20. }
  21. Rule sets
  22. ---------
  23. The rule is part of the following rule sets:
  24. - `@PER <./../../ruleSets/PER.rst>`_
  25. - `@PER-CS1.0 <./../../ruleSets/PER-CS1.0.rst>`_
  26. - `@PER-CS2.0 <./../../ruleSets/PER-CS2.0.rst>`_
  27. - `@PSR2 <./../../ruleSets/PSR2.rst>`_
  28. - `@PSR12 <./../../ruleSets/PSR12.rst>`_
  29. - `@PhpCsFixer <./../../ruleSets/PhpCsFixer.rst>`_
  30. - `@Symfony <./../../ruleSets/Symfony.rst>`_