PHP Класс Trismegiste\Mondrian\Analysis\CodeMetrics

Metrics are usefull to fast evaluate what kind of project you have to refactor. But it is not a guide where you have to go. Of course a project with a 50/50 ratio in interfaces/classes can be a good thing but if classes are used in parameters of methods instead of interfaces, interfaces are not really usefull. It's easy to fake good metrics. This analyser also counts where methods are declared first in the inheritance tree. A good point can be that you have low count of method first declared in class. This can mean you can decouple your concrete classes (remember LSP) From my experience, it's better to have dirty code in loosely coupled classes than beautiful code in highly coupled classes, because your beautiful code does not stand a chance against the entropy of changing. Dirty code can be refactored, even in paralell process, if you have loosely coupling. In short : Bad coding practices has bad metrics but good metrics does not means good coding practices. That's why I didn't push too far these statistics. See the others tool to find out where the coupling is.
Наследование: extends Trismegiste\Mondrian\Graph\Algorithm
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getCardinal ( ) : array Makes the statistics on the code

Приватные методы

Метод Описание
extractShortName ( Vertex $v ) : string Extract the class name of a vertex to get a printable result

Описание методов

getCardinal() публичный Метод

Makes the statistics on the code
public getCardinal ( ) : array
Результат array hashmap of stat