File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1414
1515class SessionListener implements EventSubscriberInterface
1616{
17+
1718 public static function getSubscribedEvents ()
1819 {
19- return array (
20+ return [
2021 FormEvents::PRE_SET_DATA => 'preSet ' ,
21- ) ;
22+ ] ;
2223 }
2324
2425 public function preSet (FormEvent $ event )
@@ -27,8 +28,7 @@ public function preSet(FormEvent $event)
2728 $ rootName = $ form ->getRoot ()->getName ();
2829 $ parent = $ form ->getParent ();
2930
30- if (
31- $ parent
31+ if ($ parent
3232 && $ form ->getName () !== '_token '
3333 && !($ parent ->getConfig ()->getType ()->getInnerType () instanceof ChoiceType)
3434 ) {
@@ -37,10 +37,8 @@ public function preSet(FormEvent $event)
3737
3838 // Get the input from the previous submit
3939 $ oldValue = session ()->getOldInput ($ fullName );
40- if (! is_null ($ oldValue )) {
41-
40+ if (!is_null ($ oldValue )) {
4241 // Transform back to good data
43-
4442 try {
4543 $ value = $ this ->transformValue ($ event , $ oldValue );
4644
@@ -85,6 +83,7 @@ protected function getFullName($rootName, $dottedName)
8583 /**
8684 * @param FormEvent $event
8785 * @param mixed $value
86+ *
8887 * @return mixed
8988 */
9089 protected function transformValue (FormEvent $ event , $ value )
You can’t perform that action at this time.
0 commit comments