Interface Depth in Inheritance Tree

Following the longest path composed only of implements edges from self to Object

Property definitions

nitc :: inheritance_metrics $ MClass :: diti
	# Interface Depth in Inheritance Tree
	#
	# Following the longest path composed only of implements edges from self to Object
	fun diti(mainmodule: MModule): Int do
		if in_hierarchy(mainmodule).direct_greaters.is_empty then
			return 0
		end
		var min = -1
		for p in in_hierarchy(mainmodule).direct_greaters do
			if p.kind != interface_kind then continue
			var d = p.diti(mainmodule) + 1
			if min == -1 or d < min then
				min = d
			end
		end
		if min == -1 then min = 0
		return min
	end
src/metrics/inheritance_metrics.nit:528,2--545,4