By piccoloprincipe
via css.dzone.com
Published: Jul 04 2011 / 09:58
The scenario of today follows from the previous article: you're reusing the parameter variable by assigning to it a new value. This time, we focus on the parameter case, and not to the generic violence against local variables.
The refactoring is about introducing new, temporary variables to avoid assignment to formal parameters: the only assignment is made by PHP during the method call.
Add your comment