File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -69,10 +69,7 @@ public function getConfigTreeBuilder()
69
69
->booleanNode ('test ' )->end ()
70
70
->scalarNode ('default_locale ' )->defaultValue ('en ' )->end ()
71
71
->arrayNode ('trusted_hosts ' )
72
- ->beforeNormalization ()
73
- ->ifTrue (function ($ v ) { return is_string ($ v ); })
74
- ->then (function ($ v ) { return array ($ v ); })
75
- ->end ()
72
+ ->beforeNormalization ()->ifString ()->then (function ($ v ) { return array ($ v ); })->end ()
76
73
->prototype ('scalar ' )->end ()
77
74
->end ()
78
75
->end ()
@@ -263,7 +260,7 @@ private function addTemplatingSection(ArrayNodeDefinition $rootNode)
263
260
->addDefaultChildrenIfNoneSet ()
264
261
->prototype ('scalar ' )->defaultValue ('FrameworkBundle:Form ' )->end ()
265
262
->validate ()
266
- ->ifTrue ( function ( $ v ) { return ! in_array ( 'FrameworkBundle:Form ' , $ v ); } )
263
+ ->ifNotInArray ( array ( 'FrameworkBundle:Form ' ) )
267
264
->then (function ($ v ) {
268
265
return array_merge (array ('FrameworkBundle:Form ' ), $ v );
269
266
})
You can’t perform that action at this time.
0 commit comments