$graph
$graph :
CodeMetrics analyses a graph and counts number of vertices per type Design Pattern : Decorator
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.
__construct(\Trismegiste\Mondrian\Graph\Graph $g)
Decorates the graph
\Trismegiste\Mondrian\Graph\Graph | $g |
addEdge(\Trismegiste\Mondrian\Graph\Vertex $source, \Trismegiste\Mondrian\Graph\Vertex $target)
Add a (un)directed edge if it does not already exist
\Trismegiste\Mondrian\Graph\Vertex | $source | |
\Trismegiste\Mondrian\Graph\Vertex | $target |
addVertex(\Trismegiste\Mondrian\Graph\Vertex $v)
Add a vertex to the graph without edge
\Trismegiste\Mondrian\Graph\Vertex | $v |
searchEdge(\Trismegiste\Mondrian\Graph\Vertex $source, \Trismegiste\Mondrian\Graph\Vertex $target) : \Trismegiste\Mondrian\Graph\Edge
Searches an existing (directed or not) edge between two vertices
\Trismegiste\Mondrian\Graph\Vertex | $source | |
\Trismegiste\Mondrian\Graph\Vertex | $target |
getSuccessor(\Trismegiste\Mondrian\Graph\Vertex $v) : null|array
Get successors of a vertex
\Trismegiste\Mondrian\Graph\Vertex | $v |
null if the vertex is not in this graph
or an array of vertices
getEdgeIterator(\Trismegiste\Mondrian\Graph\Vertex $v) : \Trismegiste\Mondrian\Graph\Iterator
Get an iterator on edges for one vertex
\Trismegiste\Mondrian\Graph\Vertex | $v |
extractShortName(\Trismegiste\Mondrian\Graph\Vertex $v) : string
Extract the class name of a vertex to get a printable result
\Trismegiste\Mondrian\Graph\Vertex | $v |