@@ -84,7 +84,7 @@ public function load(array $configs, ContainerBuilder $container)
8484 if (null !== $ service ) {
8585 if ('view_handler ' === $ key ) {
8686 $ container ->setAlias ('fos_rest. ' .$ key , new Alias ($ service , true ));
87- } elseif (in_array ($ key , ['inflector ' , 'router ' , 'templating ' ], true )) {
87+ } elseif (in_array ($ key , ['inflector ' , 'router ' , 'templating ' ], true )) {
8888 $ alias = new Alias ($ service );
8989
9090 if (method_exists ($ alias , 'setDeprecated ' )) {
@@ -174,12 +174,12 @@ private function loadBodyListener(array $config, XmlFileLoader $loader, Containe
174174 }
175175
176176 $ service ->replaceArgument (1 , $ config ['body_listener ' ]['throw_exception_on_unsupported_content_type ' ]);
177- $ service ->addMethodCall ('setDefaultFormat ' , array ( $ config ['body_listener ' ]['default_format ' ]) );
177+ $ service ->addMethodCall ('setDefaultFormat ' , [ $ config ['body_listener ' ]['default_format ' ]] );
178178
179179 $ container ->getDefinition ('fos_rest.decoder_provider ' )->replaceArgument (1 , $ config ['body_listener ' ]['decoders ' ]);
180180
181181 if (class_exists (ServiceLocatorTagPass::class)) {
182- $ decoderServicesMap = array () ;
182+ $ decoderServicesMap = [] ;
183183
184184 foreach ($ config ['body_listener ' ]['decoders ' ] as $ id ) {
185185 $ decoderServicesMap [$ id ] = new Reference ($ id );
@@ -466,7 +466,7 @@ private function loadSerializer(array $config, ContainerBuilder $container)
466466 {
467467 $ bodyConverter = $ container ->hasDefinition ('fos_rest.converter.request_body ' ) ? $ container ->getDefinition ('fos_rest.converter.request_body ' ) : null ;
468468 $ viewHandler = $ container ->getDefinition ('fos_rest.view_handler.default ' );
469- $ options = array () ;
469+ $ options = [] ;
470470
471471 if (!empty ($ config ['serializer ' ]['version ' ])) {
472472 if ($ bodyConverter ) {
@@ -501,22 +501,22 @@ private function loadZoneMatcherListener(array $config, XmlFileLoader $loader, C
501501 $ zone ['ips ' ]
502502 );
503503
504- $ zoneMatcherListener ->addMethodCall ('addRequestMatcher ' , array ( $ matcher) );
504+ $ zoneMatcherListener ->addMethodCall ('addRequestMatcher ' , [ $ matcher] );
505505 }
506506 }
507507 }
508508
509- private function createZoneRequestMatcher (ContainerBuilder $ container , $ path = null , $ host = null , $ methods = array () , $ ip = null )
509+ private function createZoneRequestMatcher (ContainerBuilder $ container , $ path = null , $ host = null , $ methods = [] , $ ip = null )
510510 {
511511 if ($ methods ) {
512512 $ methods = array_map ('strtoupper ' , (array ) $ methods );
513513 }
514514
515- $ serialized = serialize (array ( $ path , $ host , $ methods , $ ip) );
515+ $ serialized = serialize ([ $ path , $ host , $ methods , $ ip] );
516516 $ id = 'fos_rest.zone_request_matcher. ' .md5 ($ serialized ).sha1 ($ serialized );
517517
518518 // only add arguments that are necessary
519- $ arguments = array ( $ path , $ host , $ methods , $ ip) ;
519+ $ arguments = [ $ path , $ host , $ methods , $ ip] ;
520520 while (count ($ arguments ) > 0 && !end ($ arguments )) {
521521 array_pop ($ arguments );
522522 }
0 commit comments