Closed
Description
When passing an anonymous function to another function (eg, array_map()
), and putting both the called arguments on new lines, Generic.WhiteSpace.ScopeIndent
identifies the arguments and correctly allows the following:
array_map(
function ( $item ) {
echo $item;
},
$some_array
);
However, when using the static
keyword on the anonymous function, as in:
1 | array_map(
2 | static function ( $item ) {
3 | echo $item;
4 | },
5 | $some_array
6 | );
The following error is triggered:
2 | ERROR | [x] Line indented incorrectly; expected 0 tabs, found 1 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)