php-mode icon indicating copy to clipboard operation
php-mode copied to clipboard

Indentation issue with closure/anonymous functions

Open dgiglio opened this issue 1 year ago • 0 comments

For example here:

$tbl_absences[$r++] = array_replace($row,
                                    array_combine(array_map(function($vals): int { return date("d", strtotime($vals));}, $absences),
                                    array_values(array_column($subresult,'sigla'))));

But, since array_values(...) is the second array_map() parameter, it should be:

$tbl_absences[$r++] = array_replace($row,
                                    array_combine(array_map(function($vals): int { return date("d", strtotime($vals));}, $absences),
                                                            array_values(array_column($subresult,'sigla'))));

Do you agree?

dgiglio avatar Jul 18 '23 13:07 dgiglio