@@ -37,17 +37,17 @@ public function load(array $configs, ContainerBuilder $container): void
3737
3838 $ loader = new XmlFileLoader ($ container , new FileLocator (__DIR__ .'/../Resources/config/container ' ));
3939
40- if (isset ($ configs [ 0 ] ['namespace ' ]['controllers ' ])) {
41- $ controllers = $ configs [ 0 ] ['namespace ' ]['controllers ' ];
40+ if (isset ($ config ['namespace ' ]['controllers ' ])) {
41+ $ controllers = $ config ['namespace ' ]['controllers ' ];
4242 if (!is_array ($ controllers )) {
4343 $ controllers = [ $ controllers ];
4444 }
4545 $ namespaceController = array_map (function ($ namespace ) { return rtrim ($ namespace , '\\' ) . '\\' ; }, $ controllers );
4646 } else {
4747 $ namespaceController = [];
4848 }
49- if (isset ($ configs [ 0 ] ['namespace ' ]['types ' ])) {
50- $ types = $ configs [ 0 ] ['namespace ' ]['types ' ];
49+ if (isset ($ config ['namespace ' ]['types ' ])) {
50+ $ types = $ config ['namespace ' ]['types ' ];
5151 if (!is_array ($ types )) {
5252 $ types = [ $ types ];
5353 }
@@ -56,17 +56,17 @@ public function load(array $configs, ContainerBuilder $container): void
5656 $ namespaceType = [];
5757 }
5858
59- $ enableLogin = $ configs [ 0 ] ['security ' ]['enable_login ' ] ?? 'auto ' ;
60- $ enableMe = $ configs [ 0 ] ['security ' ]['enable_me ' ] ?? 'auto ' ;
59+ $ enableLogin = $ config ['security ' ]['enable_login ' ] ?? 'auto ' ;
60+ $ enableMe = $ config ['security ' ]['enable_me ' ] ?? 'auto ' ;
6161
6262 $ container ->setParameter ('graphqlite.namespace.controllers ' , $ namespaceController );
6363 $ container ->setParameter ('graphqlite.namespace.types ' , $ namespaceType );
6464 $ container ->setParameter ('graphqlite.security.enable_login ' , $ enableLogin );
6565 $ container ->setParameter ('graphqlite.security.enable_me ' , $ enableMe );
66- $ container ->setParameter ('graphqlite.security.introspection ' , $ configs [ 0 ] ['security ' ]['introspection ' ] ?? true );
67- $ container ->setParameter ('graphqlite.security.maximum_query_complexity ' , $ configs [ 0 ] ['security ' ]['maximum_query_complexity ' ] ?? null );
68- $ container ->setParameter ('graphqlite.security.maximum_query_depth ' , $ configs [ 0 ] ['security ' ]['maximum_query_depth ' ] ?? null );
69- $ container ->setParameter ('graphqlite.security.firewall_name ' , $ configs [ 0 ] ['security ' ]['firewall_name ' ] ?? 'main ' );
66+ $ container ->setParameter ('graphqlite.security.introspection ' , $ config ['security ' ]['introspection ' ] ?? true );
67+ $ container ->setParameter ('graphqlite.security.maximum_query_complexity ' , $ config ['security ' ]['maximum_query_complexity ' ] ?? null );
68+ $ container ->setParameter ('graphqlite.security.maximum_query_depth ' , $ config ['security ' ]['maximum_query_depth ' ] ?? null );
69+ $ container ->setParameter ('graphqlite.security.firewall_name ' , $ config ['security ' ]['firewall_name ' ] ?? 'main ' );
7070
7171 $ loader ->load ('graphqlite.xml ' );
7272
0 commit comments