@@ -205,14 +205,12 @@ protected function overrideParameters(array $options, ContainerBuilder $containe
205
205
];
206
206
207
207
foreach ($ overrides as $ key ) {
208
- if (! isset ($ options [$ key ])) {
209
- continue ;
210
- }
211
-
212
- $ container ->setParameter ('doctrine_mongodb.odm. ' . $ key , $ options [$ key ]);
208
+ if (isset ($ options [$ key ])) {
209
+ $ container ->setParameter ('doctrine_mongodb.odm. ' . $ key , $ options [$ key ]);
213
210
214
- // the option should not be used, the parameter should be referenced
215
- unset($ options [$ key ]);
211
+ // the option should not be used, the parameter should be referenced
212
+ unset($ options [$ key ]);
213
+ }
216
214
}
217
215
218
216
return $ options ;
@@ -325,11 +323,9 @@ protected function loadDocumentManager(array $documentManager, string|null $defa
325
323
foreach ($ documentManager ['filters ' ] as $ name => $ filter ) {
326
324
$ parameters = $ filter ['parameters ' ] ?? [];
327
325
$ odmConfigDef ->addMethodCall ('addFilter ' , [$ name , $ filter ['class ' ], $ parameters ]);
328
- if (! $ filter ['enabled ' ]) {
329
- continue ;
326
+ if ($ filter ['enabled ' ]) {
327
+ $ enabledFilters [] = $ name ;
330
328
}
331
-
332
- $ enabledFilters [] = $ name ;
333
329
}
334
330
335
331
$ managerConfiguratorName = sprintf ('doctrine_mongodb.odm.%s_manager_configurator ' , $ documentManager ['name ' ]);
@@ -534,11 +530,9 @@ protected function loadDocumentManagerBundlesMappingInformation(array $documentM
534
530
// TODO: Can we make a method out of it on Definition? replaceMethodArguments() or something.
535
531
$ calls = $ odmConfigDef ->getMethodCalls ();
536
532
foreach ($ calls as $ call ) {
537
- if ($ call [0 ] ! == 'setDocumentNamespaces ' ) {
538
- continue ;
533
+ if ($ call [0 ] = == 'setDocumentNamespaces ' ) {
534
+ $ this -> aliasMap = array_merge ( $ call [ 1 ][ 0 ], $ this -> aliasMap ) ;
539
535
}
540
-
541
- $ this ->aliasMap = array_merge ($ call [1 ][0 ], $ this ->aliasMap );
542
536
}
543
537
544
538
$ method = $ odmConfigDef ->removeMethodCall ('setDocumentNamespaces ' );
0 commit comments