I start to learn class in PHP. According to my experience with other language, i can tell class is different then function. So, how we spot if our class start to be too much and too important and how we minimize its impact ?
EDIT : The question is more able how to spot pattern of the writing class problem. Personally. I expect an answer based on experience.
A class is ‘too much’ when you start searching for a piece of code in that class. You know it must be there, but you keep scrolling in the class code. This is a strong sign that this class does ‘too much’.
The same btw. goes for functions. If you’re searching for your functions, you have ‘too much’ of them in one place.