Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation issue with closure/anonymous functions #749

Open
dgiglio opened this issue Jul 18, 2023 · 0 comments
Open

Indentation issue with closure/anonymous functions #749

dgiglio opened this issue Jul 18, 2023 · 0 comments

Comments

@dgiglio
Copy link

dgiglio commented Jul 18, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant