Rule array_indentation
¶
Each element of an array must be indented exactly once.
Examples¶
Example #1¶
--- Original
+++ New
<?php
$foo = [
- 'bar' => [
- 'baz' => true,
- ],
+ 'bar' => [
+ 'baz' => true,
+ ],
];
Rule sets¶
The rule is part of the following rule sets:
References¶
Fixer class: PhpCsFixer\Fixer\Whitespace\ArrayIndentationFixer
Test class: PhpCsFixer\Tests\Fixer\Whitespace\ArrayIndentationFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.