@@ -39,7 +39,7 @@ public static function getSubscribingMethods(): array
3939 return JMSFormErrorHandler::getSubscribingMethods ();
4040 }
4141
42- public function serializeFormToXml (XmlSerializationVisitor $ visitor , Form $ form , array $ type , Context $ context = null )
42+ public function serializeFormToXml (XmlSerializationVisitor $ visitor , Form $ form , array $ type , ? Context $ context = null )
4343 {
4444 if ($ context ) {
4545 if ($ context ->hasAttribute ('status_code ' )) {
@@ -72,7 +72,7 @@ public function serializeFormToXml(XmlSerializationVisitor $visitor, Form $form,
7272 return $ this ->formErrorHandler ->serializeFormToXml ($ visitor , $ form , $ type );
7373 }
7474
75- public function serializeFormToJson (JsonSerializationVisitor $ visitor , Form $ form , array $ type , Context $ context = null )
75+ public function serializeFormToJson (JsonSerializationVisitor $ visitor , Form $ form , array $ type , ? Context $ context = null )
7676 {
7777 $ isRoot = !interface_exists (SerializationVisitorInterface::class) && null === $ visitor ->getRoot ();
7878 $ result = $ this ->adaptFormArray ($ this ->formErrorHandler ->serializeFormToJson ($ visitor , $ form , $ type ), $ context );
@@ -84,7 +84,7 @@ public function serializeFormToJson(JsonSerializationVisitor $visitor, Form $for
8484 return $ result ;
8585 }
8686
87- public function serializeFormToYml (YamlSerializationVisitor $ visitor , Form $ form , array $ type , Context $ context = null )
87+ public function serializeFormToYml (YamlSerializationVisitor $ visitor , Form $ form , array $ type , ? Context $ context = null )
8888 {
8989 $ isRoot = null === $ visitor ->getRoot ();
9090 $ result = $ this ->adaptFormArray ($ this ->formErrorHandler ->serializeFormToYml ($ visitor , $ form , $ type ), $ context );
@@ -101,7 +101,7 @@ public function __call($name, $arguments)
101101 return call_user_func_array ([$ this ->formErrorHandler , $ name ], $ arguments );
102102 }
103103
104- private function adaptFormArray (\ArrayObject $ serializedForm , Context $ context = null )
104+ private function adaptFormArray (\ArrayObject $ serializedForm , ? Context $ context = null )
105105 {
106106 $ statusCode = $ this ->getStatusCode ($ context );
107107 if (null !== $ statusCode ) {
@@ -115,7 +115,7 @@ private function adaptFormArray(\ArrayObject $serializedForm, Context $context =
115115 return $ serializedForm ;
116116 }
117117
118- private function getStatusCode (Context $ context = null )
118+ private function getStatusCode (? Context $ context = null )
119119 {
120120 if (null === $ context ) {
121121 return ;
0 commit comments