private static function countClasses(Zone $zone): int
    {
        $classes = [];

        foreach ($zone as $rr) {
            if (null !== $rr->getClass()) {
                $classes[$rr->getClass()] = null;
            }
        }

        return count($classes);
    }
private static function countClasses(Zone $zone): int
    {
        $classes = [];

        foreach ($zone as $rr) {
            if (null !== $rr->getClass()) {
                $classes[$rr->getClass()] = null;
            }
        }

        return count($classes);
    }
private static function countClasses ( Zone $ zone ) : int { $ classes = [ ] ; foreach ( $ zone as $ rr ) { if ( null !== $ rr -> getClass ( ) ) { $ classes [ $ rr -> getClass ( ) ] = null ; } } return count ( $ classes ) ; }
Determine the number of unique non-null classes in a Zone. In a valid zone this MUST be 1.

@param Zone $zone

@return int
Determine the number of unique non - null classes in a Zone . In a valid zone this MUST be 1 .