From a0a1f5eae9b5a9284054f68a64b93b3209c59509 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Thu, 2 Aug 2007 13:14:24 +0000 Subject: [PATCH] Merge [892]. --- PHPUnit/Util/Class.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/PHPUnit/Util/Class.php b/PHPUnit/Util/Class.php index e2f266a9de8..225290dc688 100644 --- a/PHPUnit/Util/Class.php +++ b/PHPUnit/Util/Class.php @@ -271,5 +271,19 @@ public static function getCCN($className, $methodName) return $ccn; } + + /** + * Returns the Depth of Inheritance Tree (DIT) for a class. + * + * @param string $className + * @return integer + * @access public + * @static + * @since Method available since Release 3.1.6 + */ + public static function getDIT($className) + { + return count(self::getHierarchy($className)); + } } ?>