public function generate(
        BundleInterface $bundle,
        $document,
        $annotation,
        $type,
        array $properties
    ) {
        $documentPath = $bundle->getPath() . '/Document/' . str_replace('\\', '/', $document) . '.php';
        $class = [
            'name' => $bundle->getNamespace() . '\\Document\\' . $document,
            'annotation' => $annotation,
            'type' => $type,
            'properties' => $properties,
        ];

        $documentCode = $this->generator->generateDocumentClass($class);

        $this->filesystem->mkdir(dirname($documentPath));
        file_put_contents($documentPath, $documentCode);
    }