Community
Participate
Working Groups
When manually formatting code you sometimes make a choice to wrap some array or function arguments to make them more readable. If you then format automatically, your choices are overridden. I propose a new option that detects your choice and respects it. Suggested fix: Put every element on a new line only if the first element is on a new line. Otherwise, wrap only when necessary. So if I have manually put the first item on a new line, the formatter sees this and respects it by wrapping all following items on new lines too. Examples This stays on the same line: var $a = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); But these stay wrapped: var $a = array( 'a' => 'list', 'of' => array( 'key' => 'value', 'pairs' => 0 ) );