I'm working with the last version of PHP Depend (1.1.0) which handles now the PHP Trait. I tried to apply PHPDepend (--summary-xml) to some code using Trait and then parse the xml files with Sonar Plugin. I have this error message :
Element method of type org.sonar.plugins.php.phpdepend.summaryxml.MethodNode is not defined as field in type org.sonar.plugins.php.phpdepend.summaryxml.PackageNode
As an attachment, you can find the (truncated) generated file. As you can see, directly under the package, there are the tree Trait methods.
I tried to generate the report using --jdepend-xml but it seems that there's not jdepend option in sonar plugin.
Let me know if my issue is not clear and I will add some details.