@@ -118,11 +118,11 @@ private function loadBodyListener(array $config, XmlFileLoader $loader, Containe
118118 }
119119
120120 $ service ->replaceArgument (1 , $ config ['body_listener ' ]['throw_exception_on_unsupported_content_type ' ]);
121- $ service ->addMethodCall ('setDefaultFormat ' , array ( $ config ['body_listener ' ]['default_format ' ]) );
121+ $ service ->addMethodCall ('setDefaultFormat ' , [ $ config ['body_listener ' ]['default_format ' ]] );
122122
123123 $ container ->getDefinition ('fos_rest.decoder_provider ' )->replaceArgument (1 , $ config ['body_listener ' ]['decoders ' ]);
124124
125- $ decoderServicesMap = array () ;
125+ $ decoderServicesMap = [] ;
126126
127127 foreach ($ config ['body_listener ' ]['decoders ' ] as $ id ) {
128128 $ decoderServicesMap [$ id ] = new Reference ($ id );
@@ -344,7 +344,7 @@ private function loadSerializer(array $config, ContainerBuilder $container): voi
344344 {
345345 $ bodyConverter = $ container ->hasDefinition ('fos_rest.converter.request_body ' ) ? $ container ->getDefinition ('fos_rest.converter.request_body ' ) : null ;
346346 $ viewHandler = $ container ->getDefinition ('fos_rest.view_handler.default ' );
347- $ options = array () ;
347+ $ options = [] ;
348348
349349 if (!empty ($ config ['serializer ' ]['version ' ])) {
350350 if ($ bodyConverter ) {
@@ -379,22 +379,22 @@ private function loadZoneMatcherListener(array $config, XmlFileLoader $loader, C
379379 $ zone ['ips ' ]
380380 );
381381
382- $ zoneMatcherListener ->addMethodCall ('addRequestMatcher ' , array ( $ matcher) );
382+ $ zoneMatcherListener ->addMethodCall ('addRequestMatcher ' , [ $ matcher] );
383383 }
384384 }
385385 }
386386
387- private function createZoneRequestMatcher (ContainerBuilder $ container , ?string $ path = null , ?string $ host = null , array $ methods = array () , array $ ips = null ): Reference
387+ private function createZoneRequestMatcher (ContainerBuilder $ container , ?string $ path = null , ?string $ host = null , array $ methods = [] , array $ ips = null ): Reference
388388 {
389389 if ($ methods ) {
390390 $ methods = array_map ('strtoupper ' , (array ) $ methods );
391391 }
392392
393- $ serialized = serialize (array ( $ path , $ host , $ methods , $ ips) );
393+ $ serialized = serialize ([ $ path , $ host , $ methods , $ ips] );
394394 $ id = 'fos_rest.zone_request_matcher. ' .md5 ($ serialized ).sha1 ($ serialized );
395395
396396 // only add arguments that are necessary
397- $ arguments = array ( $ path , $ host , $ methods , $ ips) ;
397+ $ arguments = [ $ path , $ host , $ methods , $ ips] ;
398398 while (count ($ arguments ) > 0 && !end ($ arguments )) {
399399 array_pop ($ arguments );
400400 }
0 commit comments