private function generateDocumentDocBlock(array $metadata)
    {
        return str_replace(
            ['<className>', '<annotation>', '<options>'],
            [
                $this->getClassName($metadata),
                ucfirst($metadata['annotation']),
                $metadata['annotation'] != 'object' ? ($metadata['type'] != lcfirst($this->getClassName($metadata))
                    ? sprintf('type="%s"', $metadata['type']) : '') : '',
            ],
            '/**
 * <className>
 *
 * @ES\<annotation>(<options>)
 */'
        );
    }