array_indentation.rst 546 B

12345678910111213141516171819202122232425262728293031323334
  1. ==========================
  2. Rule ``array_indentation``
  3. ==========================
  4. Each element of an array must be indented exactly once.
  5. Examples
  6. --------
  7. Example #1
  8. ~~~~~~~~~~
  9. .. code-block:: diff
  10. --- Original
  11. +++ New
  12. @@ -1,6 +1,6 @@
  13. <?php
  14. $foo = [
  15. - 'bar' => [
  16. - 'baz' => true,
  17. - ],
  18. + 'bar' => [
  19. + 'baz' => true,
  20. + ],
  21. ];
  22. Rule sets
  23. ---------
  24. The rule is part of the following rule set:
  25. @PhpCsFixer
  26. Using the ``@PhpCsFixer`` rule set will enable the ``array_indentation`` rule.