Skip to content

Commit 0f7550d

Browse files
committed
Remove duplicate code
1 parent 8626ca8 commit 0f7550d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/DependencyInjection/DoctrineMongoDBExtension.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,6 @@ protected function registerMappingDrivers(array $objectManager, ContainerBuilder
279279
}
280280

281281
$mappingDriverDef->setArguments($args);
282-
} elseif ($driverType === 'attribute') {
283-
$mappingDriverDef = new Definition($this->getMetadataDriverClass($driverType), [
284-
array_values($driverPaths),
285-
]);
286282
} else {
287283
$mappingDriverDef = new Definition($this->getMetadataDriverClass($driverType), [
288284
array_values($driverPaths),
@@ -326,7 +322,7 @@ protected function assertValidMappingConfiguration(
326322
}
327323

328324
if (! in_array($mappingConfig['type'], ['xml', 'attribute'])) {
329-
throw new InvalidArgumentException(sprintf('Can only configure "xml" or "attribute" through the DoctrineMongoDBBundle. Use your own bundle to configure other metadata drivers. You can register them by adding a new driver to the "%s" service definition.', $this->getObjectManagerElementName($objectManagerName . '_metadata_driver')));
325+
throw new InvalidArgumentException(sprintf('Can only configure "xml" or "attribute" through the DoctrineMongoDBBundle. Use your own bundle to configure other metadata drivers. You can register them by adding a new driver to the "%s" service definition.', $this->getObjectManagerElementName($objectManagerName . '_metadata_driver')));
330326
}
331327
}
332328

0 commit comments

Comments
 (0)