public function visitFile(\SplFileInfo $file, MessageCatalogue $catalogue)
    {
        if ($file->getExtension() != 'yml') {
            return;
        }
        $path = strtr($file->getRealPath(), DIRECTORY_SEPARATOR, '/');
        if (strpos($path, 'Resources/config/pageparts') === false) {
            return;
        }
        $parser = $this->getYmlParser();
        $pagePartConfigs = $parser->parse(file_get_contents($file));
        if (array_key_exists('types', $pagePartConfigs) && is_array($pagePartConfigs['types'])) {
            foreach ($pagePartConfigs['types'] as $type) {
                if (is_array($type) && array_key_exists('name', $type)) {
                    $message = new Message($type['name']);
                    $message->addSource(new FileSource((string)$file));
                    $catalogue->add($message);
                }
            }
        }
    }