manuelpichler/de.xplib.execution

WMCi calculation is incorrect for overwritten methods

manuelpichler opened this issue · 0 comments

PHP_Depend's implementation of the WMCi metric is incorrect. Instead of the WMCi of the current class, the current analyzer calculates the complexity of the highest method in the inheritance tree.

File: PHP/Depend/Metrics/ClassLevel/Analyzer.php +363

The expression should be:
if (!$m->isPrivate() && !isset($ccn[$m->getName()])) {

[Synced from PivotalTracker: 'http://www.pivotaltracker.com/story/show/9936901']