PHPUnit and Software Metrics
The upcoming 3.2 release of PHPUnit adds a couple of software metrics to the data that is stored in PHPUnit's test database. Below is a list of the metrics that are calculated and collected:
- Project Level
- File Level
- Function Level
- Class Level
- Lines of Code (LOC)
- Lines of Executable Code (ELOC)
- Lines of Executed Code
- Code Coverage
- Attribute Inheritance Factor (AIF)
- Attribute Hiding Factor (AHF)
- Class Size (CSZ)
- Class Interface Size (CIS)
- Depth of Inheritance Tree (DIT)
- Method Inheritance Factor (MIF)
- Method Hiding Factor (MHF)
- Number of Children (NOC)
- Number of Interfaces Implemented (IMPL)
- Number of Variables (VARS)
- Number of Non-Private Variables (VARSnp)
- Number of Variables (VARSi)
- Polymorphism Factor (PF)
- Weighted Methods per Class (WMC)
- Weighted Non-Private Methods per Class (WMCnp)
- Weighted Inherited Methods per Class (WMCi)
- Method Level