@@ -62,7 +62,7 @@ private function setupFormTypes(array $config, ContainerBuilder $container, Load
62
62
{
63
63
$ loader ->load ('form-type.xml ' );
64
64
65
- if (array_key_exists ('dynamic ' , $ config )) {
65
+ if (\ array_key_exists ('dynamic ' , $ config )) {
66
66
$ routeTypeTypeDefinition = $ container ->getDefinition ('cmf_routing.route_type_form_type ' );
67
67
68
68
foreach (array_keys ($ config ['dynamic ' ]['controllers_by_type ' ]) as $ routeType ) {
@@ -94,7 +94,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
94
94
$ container ->setParameter ('cmf_routing.default_controller ' , $ defaultController );
95
95
96
96
$ locales = $ config ['locales ' ];
97
- if (0 === count ($ locales ) && $ config ['auto_locale_pattern ' ]) {
97
+ if (0 === \ count ($ locales ) && $ config ['auto_locale_pattern ' ]) {
98
98
throw new InvalidConfigurationException ('It makes no sense to activate auto_locale_pattern when no locales are configured. ' );
99
99
}
100
100
@@ -148,17 +148,17 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
148
148
$ dynamic = $ container ->getDefinition ('cmf_routing.dynamic_router ' );
149
149
150
150
// if any mappings are defined, set the respective route enhancer
151
- if (count ($ config ['controllers_by_type ' ]) > 0 ) {
151
+ if (\ count ($ config ['controllers_by_type ' ]) > 0 ) {
152
152
$ container ->getDefinition ('cmf_routing.enhancer.controllers_by_type ' )
153
153
->addTag ('dynamic_router_route_enhancer ' , ['priority ' => 60 ]);
154
154
}
155
155
156
- if (count ($ config ['controllers_by_class ' ]) > 0 ) {
156
+ if (\ count ($ config ['controllers_by_class ' ]) > 0 ) {
157
157
$ container ->getDefinition ('cmf_routing.enhancer.controllers_by_class ' )
158
158
->addTag ('dynamic_router_route_enhancer ' , ['priority ' => 50 ]);
159
159
}
160
160
161
- if (count ($ config ['templates_by_class ' ]) > 0 ) {
161
+ if (\ count ($ config ['templates_by_class ' ]) > 0 ) {
162
162
$ container ->getDefinition ('cmf_routing.enhancer.templates_by_class ' )
163
163
->addTag ('dynamic_router_route_enhancer ' , ['priority ' => 40 ]);
164
164
@@ -197,7 +197,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
197
197
->addTag ('dynamic_router_route_enhancer ' , ['priority ' => -100 ]);
198
198
}
199
199
200
- if (count ($ config ['route_filters_by_id ' ]) > 0 ) {
200
+ if (\ count ($ config ['route_filters_by_id ' ]) > 0 ) {
201
201
$ matcher = $ container ->getDefinition ('cmf_routing.nested_matcher ' );
202
202
203
203
foreach ($ config ['route_filters_by_id ' ] as $ id => $ priority ) {
@@ -217,7 +217,7 @@ private function loadPhpcrProvider(array $config, LoaderInterface $loader, Conta
217
217
218
218
$ container ->setParameter ('cmf_routing.dynamic.persistence.phpcr.manager_name ' , $ config ['manager_name ' ]);
219
219
220
- if (0 === count ($ locales )) {
220
+ if (0 === \ count ($ locales )) {
221
221
$ container ->removeDefinition ('cmf_routing.phpcrodm_route_locale_listener ' );
222
222
} elseif (!$ matchImplicitLocale ) {
223
223
// remove all but the prefixes configuration from the service definition.
0 commit comments