getTypes()) > self::MAX_NUMBER_OF_TYPES; } if ($type instanceof ConstantArrayType) { return \count($type->getValueTypes()) > self::MAX_NUMBER_OF_TYPES; } if ($type instanceof GenericObjectType) { return $this->isTooDetailedGenericObjectType($type); } return \false; } private function isTooDetailedGenericObjectType(GenericObjectType $genericObjectType) : bool { if (\count($genericObjectType->getTypes()) !== 1) { return \false; } $genericType = $genericObjectType->getTypes()[0]; return $this->isTooDetailed($genericType); } }