I use them when it goes over two arguments sometimes. It helps the code review for me. Jetbrains doesn't have issues with renaming arguments appropriately so named calls don't break.
I like having each named argument on a separate line. It looks neat, readable, and I haven't had a misordered argument recently.
The feature is rather new; so don't quote me on this. I might run into some problems at some point. So far it's been good.
I acknowledge your work, and here are some things to look into:
Line 21: The iterable is mixed? And then iterablity is checked loosely as an assertion? It probably could have been a bit more type strict.
Line 21: Would be nice to use a generic phpdoc for T of iterable in arg, and then generator T type.
Line 26: Usage of md5 is highly questionable. Md5 is not a cheap function.
Line 63: I personally would use sprintf instead of multiple echos
IO(or rather output) buffering is not considered. Meaning if you print progress on a low-computation loop, your output might introduce significant lag to your main loop.
Line 12: I'd use phpstan array shape for $stack
Line 28: Missing consistent style: I see a sneaky space missing near the end.
Missing tests: Tests not only tell the users that your package works, but also acts as an extensive documentation for your use cases.
You might wanna refactor your main wrap function and Extract Method to reduce the cognitive load of the code in that section.
With a sufficient number of users of an API,
it does not matter what you promise in the contract:
all observable behaviors of your system
will be depended on by somebody.
I use them when it goes over two arguments sometimes. It helps the code review for me. Jetbrains doesn't have issues with renaming arguments appropriately so named calls don't break.
I like having each named argument on a separate line. It looks neat, readable, and I haven't had a misordered argument recently.
The feature is rather new; so don't quote me on this. I might run into some problems at some point. So far it's been good.
I acknowledge your work, and here are some things to look into:
If I missed something, pardon.
war flashbacks
Reminds me of Hyrum's law:
bashes the project. Contributes to the same project