As you mentioned, this is a non-functional code issue. With that in mind ...
It is difficult to give a final rule about this, since it is completely context-specific. Is the variable set once and is forgotten about it or is it constantly updated? How many methods uses the same variable? How will the code be used?
In my experience, variables that control the behavior of an object, but rarely (if at all) are changed, are set in the initialization method or given to a method that will be cascading behavior. Libraries and leaf methods have a variable passed into it, because someone will probably want to call it in isolation.
I suggest that you start all over again and then refactor if you notice that the same variable is passed throughout the class.
source share