@@ -66,7 +66,7 @@ public function getConfigTreeBuilder()
6666 ->children ()
6767 ->scalarNode ('access_denied_url ' )->defaultNull ()->example ('/foo/error403 ' )->end ()
6868 ->enumNode ('session_fixation_strategy ' )
69- ->values (array ( SessionAuthenticationStrategy::NONE , SessionAuthenticationStrategy::MIGRATE , SessionAuthenticationStrategy::INVALIDATE ) )
69+ ->values ([ SessionAuthenticationStrategy::NONE , SessionAuthenticationStrategy::MIGRATE , SessionAuthenticationStrategy::INVALIDATE ] )
7070 ->defaultValue (SessionAuthenticationStrategy::MIGRATE )
7171 ->end ()
7272 ->booleanNode ('hide_user_not_found ' )->defaultTrue ()->end ()
@@ -76,7 +76,7 @@ public function getConfigTreeBuilder()
7676 ->addDefaultsIfNotSet ()
7777 ->children ()
7878 ->enumNode ('strategy ' )
79- ->values (array ( AccessDecisionManager::STRATEGY_AFFIRMATIVE , AccessDecisionManager::STRATEGY_CONSENSUS , AccessDecisionManager::STRATEGY_UNANIMOUS ) )
79+ ->values ([ AccessDecisionManager::STRATEGY_AFFIRMATIVE , AccessDecisionManager::STRATEGY_CONSENSUS , AccessDecisionManager::STRATEGY_UNANIMOUS ] )
8080 ->end ()
8181 ->scalarNode ('service ' )->end ()
8282 ->booleanNode ('allow_if_all_abstain ' )->defaultFalse ()->end ()
@@ -108,7 +108,7 @@ private function addRoleHierarchySection(ArrayNodeDefinition $rootNode)
108108 ->useAttributeAsKey ('id ' )
109109 ->prototype ('array ' )
110110 ->performNoDeepMerging ()
111- ->beforeNormalization ()->ifString ()->then (function ($ v ) { return array ( 'value ' => $ v) ; })->end ()
111+ ->beforeNormalization ()->ifString ()->then (function ($ v ) { return [ 'value ' => $ v] ; })->end ()
112112 ->beforeNormalization ()
113113 ->ifTrue (function ($ v ) { return \is_array ($ v ) && isset ($ v ['value ' ]); })
114114 ->then (function ($ v ) { return preg_split ('/\s*,\s*/ ' , $ v ['value ' ]); })
@@ -139,7 +139,7 @@ private function addAccessControlSection(ArrayNodeDefinition $rootNode)
139139 ->end ()
140140 ->scalarNode ('host ' )->defaultNull ()->end ()
141141 ->arrayNode ('ips ' )
142- ->beforeNormalization ()->ifString ()->then (function ($ v ) { return array ( $ v ) ; })->end ()
142+ ->beforeNormalization ()->ifString ()->then (function ($ v ) { return [ $ v ] ; })->end ()
143143 ->prototype ('scalar ' )->end ()
144144 ->end ()
145145 ->arrayNode ('methods ' )
@@ -201,7 +201,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
201201 ->setDeprecated ('The "%path%.%node%" configuration key has been deprecated in Symfony 4.1. ' )
202202 ->end ()
203203 ->arrayNode ('logout ' )
204- ->treatTrueLike (array () )
204+ ->treatTrueLike ([] )
205205 ->canBeUnset ()
206206 ->children ()
207207 ->scalarNode ('csrf_parameter ' )->defaultValue ('_csrf_token ' )->end ()
@@ -217,7 +217,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
217217 ->arrayNode ('delete_cookies ' )
218218 ->beforeNormalization ()
219219 ->ifTrue (function ($ v ) { return \is_array ($ v ) && \is_int (key ($ v )); })
220- ->then (function ($ v ) { return array_map (function ($ v ) { return array ( 'name ' => $ v) ; }, $ v ); })
220+ ->then (function ($ v ) { return array_map (function ($ v ) { return [ 'name ' => $ v] ; }, $ v ); })
221221 ->end ()
222222 ->useAttributeAsKey ('name ' )
223223 ->prototype ('array ' )
@@ -255,7 +255,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
255255 ->end ()
256256 ;
257257
258- $ abstractFactoryKeys = array () ;
258+ $ abstractFactoryKeys = [] ;
259259 foreach ($ factories as $ factoriesAtPosition ) {
260260 foreach ($ factoriesAtPosition as $ factory ) {
261261 $ name = str_replace ('- ' , '_ ' , $ factory ->getKey ());
@@ -301,17 +301,17 @@ private function addProvidersSection(ArrayNodeDefinition $rootNode)
301301 ->fixXmlConfig ('provider ' )
302302 ->children ()
303303 ->arrayNode ('providers ' )
304- ->example (array (
305- 'my_memory_provider ' => array (
306- 'memory ' => array (
307- 'users ' => array (
308- 'foo ' => array ( 'password ' => 'foo ' , 'roles ' => 'ROLE_USER ' ) ,
309- 'bar ' => array ( 'password ' => 'bar ' , 'roles ' => '[ROLE_USER, ROLE_ADMIN] ' ) ,
310- ) ,
311- ) ,
312- ) ,
313- 'my_entity_provider ' => array ( 'entity ' => array ( 'class ' => 'SecurityBundle:User ' , 'property ' => 'username ' )) ,
314- ) )
304+ ->example ([
305+ 'my_memory_provider ' => [
306+ 'memory ' => [
307+ 'users ' => [
308+ 'foo ' => [ 'password ' => 'foo ' , 'roles ' => 'ROLE_USER ' ] ,
309+ 'bar ' => [ 'password ' => 'bar ' , 'roles ' => '[ROLE_USER, ROLE_ADMIN] ' ] ,
310+ ] ,
311+ ] ,
312+ ] ,
313+ 'my_entity_provider ' => [ 'entity ' => [ 'class ' => 'SecurityBundle:User ' , 'property ' => 'username ' ]] ,
314+ ] )
315315 ->requiresAtLeastOneElement ()
316316 ->useAttributeAsKey ('name ' )
317317 ->prototype ('array ' )
@@ -360,19 +360,19 @@ private function addEncodersSection(ArrayNodeDefinition $rootNode)
360360 ->fixXmlConfig ('encoder ' )
361361 ->children ()
362362 ->arrayNode ('encoders ' )
363- ->example (array (
363+ ->example ([
364364 'App\Entity\User1 ' => 'bcrypt ' ,
365- 'App\Entity\User2 ' => array (
365+ 'App\Entity\User2 ' => [
366366 'algorithm ' => 'bcrypt ' ,
367367 'cost ' => 13 ,
368- ) ,
369- ) )
368+ ] ,
369+ ] )
370370 ->requiresAtLeastOneElement ()
371371 ->useAttributeAsKey ('class ' )
372372 ->prototype ('array ' )
373373 ->canBeUnset ()
374374 ->performNoDeepMerging ()
375- ->beforeNormalization ()->ifString ()->then (function ($ v ) { return array ( 'algorithm ' => $ v) ; })->end ()
375+ ->beforeNormalization ()->ifString ()->then (function ($ v ) { return [ 'algorithm ' => $ v] ; })->end ()
376376 ->children ()
377377 ->scalarNode ('algorithm ' )->cannotBeEmpty ()->end ()
378378 ->scalarNode ('hash_algorithm ' )->info ('Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms. ' )->defaultValue ('sha512 ' )->end ()
0 commit comments