fbpx
May 10, 2024

About the lack of code styling guides for array functions (map, reduce, filter) – March 21, 2023 at 02:19PM

I’m a big fan of array functions, been using them almost daily since the 7.4 era. Formatting them is a bit iffy though, specially when using fn ($args) => short syntax, sometimes it gets too long for just one line, but putting one argument per line might look awkward, sometimes the callback doesn’t fit in a properly manner, etc.

I was looking through the PSR12 and there’s no mention on array functions. Are there any code styling guides for these bad boys? How do you usually place them on your code?

submitted by /u/nukeaccounteveryweek
[link] [comments]

%d bloggers like this: