protected function analyzeDuplicates(string $mapName, string $language, array $map, array $inverse): void
    {
        if (\count($inverse) !== \count($map)) {
            $diff = array_diff(array_keys($map), array_values($inverse));
            foreach ($diff as $mapId) {
                $mainId   = $map[$mapId];
                $multiple = [];
                foreach ($map as $checkMapId => $checkMainId) {
                    if ($checkMainId === $mainId) {
                        $multiple[] = $checkMapId;
                    }
                }

                $this->logger->warning(
                    ucfirst($mapName) . ' map {mainLanguage} => {language}: multiple elements map to {mainId}: ' .
                    implode(', ', $multiple),
                    [
                        'language'       => $language,
                        'mainLanguage'   => $this->mainLanguage,
                        'mainId'         => $mainId,
                        'multiple'       => $multiple,
                        'msg_type'       => 'multiple_mapping_in_' . $mapName,
                        'class'          => \get_class($this),
                    ]
                );
            }
        }
    }