I would like to get an opinion on this section when using array shorthand. IMHO an exception should be made if I am going to build the array into the function.
Consider the simple example for: $keys = array_values(['foo', 'bar', 'baz', 'bat']); If I were to break this out across multiple lines, following the current spec I would have to do the following:
$keys = array_values(
[
'foo' => 'bar',
'baz' => 'bat'
]
);
Or:
$keys = array_values(
['foo' => 'bar',
'baz' => 'bat']
);
Or:
$keys = array_values(
[
'foo' => 'bar',
'baz' => 'bat'
]
);
All will pass the sniffer.
IMHO I would like to be able to do the following:
$keys = array_values([
'foo' => 'bar',
'baz' => 'bat'
]);
Keep the opening and closing brackets on the same line as the opening and closing parentheses. Any thoughts on this manner?