Open jails opened 9 years ago
Do you have a concrete example where our rating is bad?
Thanks for the feedback btw :)
For example I've this class in mind: https://scrutinizer-ci.com/g/crysalead/kahlan/code-structure/master/class/kahlan%5CSuite
Each time I see the F notification I dig into it but except some functions which should be simplified, the code is pretty straight and I don't think the choosen abstraction is that bad for that class.
Hi,
Imo the current class scoring is irrelevant. If the complexity makes sense for functions, it makes not sense for classes the way it's done by scrutinizer.
Classes score should be evaluated on how good is an abstraction. And if creating a class for each very function will give a score of 10 the resulted abtraction will be really poor. (And no, a class with a lot of functions doesn't indicate that the abstraction is poor, espacially in big projects and reciprocally a project with as many classes as functions can be also a good abstraction, all depends of the application)
So since there's no reliable way to score an abstraction, classes score should only be an average (or weighted average) of functions. It would be better to not lead people to create "irrelevant" classes just to have a better score and a worst code base.
Well my 2 cents.
Thanks for reading.