You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any of the following fixes the issue and pdepend finds only one class AB:
Remove phpDoc for the $ab field
Declare whole namespace A in the same B.php file instead of requiring it
The text was updated successfully, but these errors were encountered:
buskamuza
changed the title
Loaded Class is Considered in Global Namespace
Partial Class Namespace is Calculated Twice: in Global and Its Own Namespace
Jul 15, 2015
Discovered that it happens only if pdepend analyzes a single file. If it analyzed a folder with both files (for class AB and BB), everything is calculated correctly.
I have same issue. Efferent coupling depends on analyze scope.
In my case:
ce = 15 when only one file is analyzed
ce = 13 when my code is analyzed
In fact correct value is 11 because 2 classes are outside of scope (in vendor)
Tested on version 2.1.0.
Preparations:
\PDepend\Metrics\Analyzer\CouplingAnalyzer::calculateCoupling()
to collect names and namespaces of dependencies\PDepend\Metrics\Analyzer\CouplingAnalyzer::postProcessTemporaryCouplingMap()
to display the resultTested classes:
Testing
Run
./vendor/bin/pdepend --summary-xml=sum.xml --debug B.php
Result:
Any of the following fixes the issue and pdepend finds only one class
AB
:$ab
fieldA
in the sameB.php
file instead of requiring itThe text was updated successfully, but these errors were encountered: