@@ -62,7 +62,7 @@ private function setupFormTypes(array $config, ContainerBuilder $container, Load
6262 {
6363 $ loader ->load ('form-type.xml ' );
6464
65- if (array_key_exists ('dynamic ' , $ config )) {
65+ if (\ array_key_exists ('dynamic ' , $ config )) {
6666 $ routeTypeTypeDefinition = $ container ->getDefinition ('cmf_routing.route_type_form_type ' );
6767
6868 foreach (array_keys ($ config ['dynamic ' ]['controllers_by_type ' ]) as $ routeType ) {
@@ -94,7 +94,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
9494 $ container ->setParameter ('cmf_routing.default_controller ' , $ defaultController );
9595
9696 $ locales = $ config ['locales ' ];
97- if (0 === count ($ locales ) && $ config ['auto_locale_pattern ' ]) {
97+ if (0 === \ count ($ locales ) && $ config ['auto_locale_pattern ' ]) {
9898 throw new InvalidConfigurationException ('It makes no sense to activate auto_locale_pattern when no locales are configured. ' );
9999 }
100100
@@ -148,17 +148,17 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
148148 $ dynamic = $ container ->getDefinition ('cmf_routing.dynamic_router ' );
149149
150150 // 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 ) {
152152 $ container ->getDefinition ('cmf_routing.enhancer.controllers_by_type ' )
153153 ->addTag ('dynamic_router_route_enhancer ' , ['priority ' => 60 ]);
154154 }
155155
156- if (count ($ config ['controllers_by_class ' ]) > 0 ) {
156+ if (\ count ($ config ['controllers_by_class ' ]) > 0 ) {
157157 $ container ->getDefinition ('cmf_routing.enhancer.controllers_by_class ' )
158158 ->addTag ('dynamic_router_route_enhancer ' , ['priority ' => 50 ]);
159159 }
160160
161- if (count ($ config ['templates_by_class ' ]) > 0 ) {
161+ if (\ count ($ config ['templates_by_class ' ]) > 0 ) {
162162 $ container ->getDefinition ('cmf_routing.enhancer.templates_by_class ' )
163163 ->addTag ('dynamic_router_route_enhancer ' , ['priority ' => 40 ]);
164164
@@ -197,7 +197,7 @@ private function setupDynamicRouter(array $config, ContainerBuilder $container,
197197 ->addTag ('dynamic_router_route_enhancer ' , ['priority ' => -100 ]);
198198 }
199199
200- if (count ($ config ['route_filters_by_id ' ]) > 0 ) {
200+ if (\ count ($ config ['route_filters_by_id ' ]) > 0 ) {
201201 $ matcher = $ container ->getDefinition ('cmf_routing.nested_matcher ' );
202202
203203 foreach ($ config ['route_filters_by_id ' ] as $ id => $ priority ) {
@@ -217,7 +217,7 @@ private function loadPhpcrProvider(array $config, LoaderInterface $loader, Conta
217217
218218 $ container ->setParameter ('cmf_routing.dynamic.persistence.phpcr.manager_name ' , $ config ['manager_name ' ]);
219219
220- if (0 === count ($ locales )) {
220+ if (0 === \ count ($ locales )) {
221221 $ container ->removeDefinition ('cmf_routing.phpcrodm_route_locale_listener ' );
222222 } elseif (!$ matchImplicitLocale ) {
223223 // remove all but the prefixes configuration from the service definition.
0 commit comments