protected function getNameFromRuleSet($ruleSetXmlPath)
    {
        try {
            $ruleSet = new \SimpleXMLElement(file_get_contents($ruleSetXmlPath));
            $name = trim($ruleSet->attributes()['name']);
            if ($name !== '') {
                return $name;
            }
        } catch (\Exception $e) {
            // Nothing todo, use folder name.
        }

        return basename(dirname($ruleSetXmlPath));
    }