Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overview "Average Class Length" and "Average Method Length" Display NaN #273

Closed
DPStokesNZ opened this issue May 19, 2016 · 2 comments
Closed

Comments

@DPStokesNZ
Copy link

DPStokesNZ commented May 19, 2016

phpDox (0.8.1.1) Overview page displays Average Class Length and Average Method Length as NaN in Class section.

phpdox/templates/html/index.xsl appears to be attempting to use items llocByNoc and llocByNom from the phploc.xml file, however the the appropriate items (as generated by phploc 3.0.0) are classLlocAvg (Average Class Length) and methodLlocAvg (Average Method Length).

Excerpt from index.xsl:

 <td class="indent">Average Class Length</td>
 <td class="nummeric"><xsl:value-of select="round($phploc/pdx:llocByNoc)" /></td>
 ...
 <td class="indent">Average Method Length</td>
 <td class="nummeric"><xsl:value-of select="round($phploc/pdx:llocByNom)" /></td>

Output from phploc log:

   ....
   [phploc]       Average Class Length                           9
   [phploc]         Minimum Class Length                         0
   [phploc]         Maximum Class Length                        53
   [phploc]       Average Method Length                          2
   [phploc]         Minimum Method Length                        1
   [phploc]         Maximum Method Length                       12

Excerpt from phploc.xml:

# grep -Ern 'classLlocAvg|methodLlocAvg|llocByNoc|llocByNom' .
./workspace/app/build/logs/phploc.xml:47:  <classLlocAvg>8.65</classLlocAvg>
./workspace/app/build/logs/phploc.xml:53:  <methodLlocAvg>2.1746031746032</methodLlocAvg>

Suggest an update to index.xsl is required?

Regards,
Duncan.

@theseer
Copy link
Owner

theseer commented May 26, 2016

Looks like it. I'll have a look at it.

@Szasza
Copy link

Szasza commented Jun 20, 2016

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants