From 3b90bbc16024f4c95b3ba82df61bddba0dae15bb Mon Sep 17 00:00:00 2001 From: Paul Coudeville Date: Tue, 10 Sep 2024 10:00:51 +0200 Subject: [PATCH] chore(doctrine): unnecessary comments removal --- src/Install/Installer.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Install/Installer.php b/src/Install/Installer.php index d09608a..4247e2a 100644 --- a/src/Install/Installer.php +++ b/src/Install/Installer.php @@ -107,7 +107,7 @@ protected function installSchema(Module $module): bool $this->dynamicDiscriminatorMapService->updateDiscriminatorMap(); $allMetadata = $entityManager->getMetadataFactory()->getAllMetadata(); $namespace = 'PrestaSafe\PrettyBlocks\Entity'; - // Filtrer les métadonnées pour ne prendre en compte que celles du namespace spécifié + $filteredMetadata = array_filter($allMetadata, function ($classMetadata) use ($namespace) { return str_contains($classMetadata->getName(), $namespace); }); @@ -123,17 +123,14 @@ protected function installSchema(Module $module): bool protected function registerDoctrineNamespace(): void { - // Get the Doctrine manager and add the custom driver for PrettyBlocks $entityManager = $this->getEntityManager(); $config = $entityManager->getConfiguration(); - // Define the annotation driver for the PrettyBlocks namespace $annotationDriver = new AnnotationDriver( new AnnotationReader(), [dirname(__DIR__, 2) . '/src/Entity'] ); - // Register the custom annotation driver with Doctrine's configuration ($config->getMetadataDriverImpl())->addDriver($annotationDriver, 'PrestaSafe\PrettyBlocks\Entity'); }