Use `array_walk` instead of `foreach`.md -- Potherca's rules for creating more robust code in PHP · GitHub
GitHub - TopShelfCraft/Walk: A Craft-aware array_walk() method, plus some console commands for extra convenience, to easily apply Craft service/helper/Task methods to a collection of elements.
![php - How to use array_walk on class method that does not fit the $callback parameter order - Stack Overflow php - How to use array_walk on class method that does not fit the $callback parameter order - Stack Overflow](https://i.stack.imgur.com/CWHp5.png)