@@ -76,7 +76,7 @@ public function encode(object $message): string
7676
7777 return $ this ->serializer ->serialize ($ data );
7878 }
79- catch (\Throwable $ throwable )
79+ catch (\Throwable $ throwable )
8080 {
8181 throw new EncodeMessageFailed ($ throwable ->getMessage (), (int ) $ throwable ->getCode (), $ throwable );
8282 }
@@ -99,7 +99,7 @@ public function decode(string $serializedMessage): object
9999
100100 return $ object ;
101101 }
102- catch (\Throwable $ throwable )
102+ catch (\Throwable $ throwable )
103103 {
104104 throw new DecodeMessageFailed ($ throwable ->getMessage (), (int ) $ throwable ->getCode (), $ throwable );
105105 }
@@ -120,7 +120,7 @@ public function denormalize(array $payload, string $class): object
120120
121121 return $ object ;
122122 }
123- catch (\Throwable $ throwable )
123+ catch (\Throwable $ throwable )
124124 {
125125 throw new DenormalizeFailed ($ throwable ->getMessage (), (int ) $ throwable ->getCode (), $ throwable );
126126 }
@@ -135,7 +135,7 @@ public function normalize(object $message): array
135135 {
136136 $ data = $ this ->normalizer ->normalize ($ message );
137137
138- if (\is_array ($ data ) === true )
138+ if (\is_array ($ data ) === true )
139139 {
140140 /** @psalm-var array<string, mixed> $data */
141141
@@ -152,7 +152,7 @@ public function normalize(object $message): array
152152 );
153153 // @codeCoverageIgnoreEnd
154154 }
155- catch (\Throwable $ throwable )
155+ catch (\Throwable $ throwable )
156156 {
157157 throw new NormalizationFailed ($ throwable ->getMessage (), (int ) $ throwable ->getCode (), $ throwable );
158158 }
@@ -166,11 +166,10 @@ public function normalize(object $message): array
166166 private static function validateUnserializedData (array $ data ): void
167167 {
168168 /** Let's check if there are mandatory fields */
169- if (
169+ if (
170170 isset ($ data ['namespace ' ]) === false ||
171171 isset ($ data ['message ' ]) === false
172- )
173- {
172+ ) {
174173 throw new \UnexpectedValueException (
175174 'The serialized data must contains a "namespace" field (indicates the message class) and "message" (indicates the message parameters) '
176175 );
@@ -181,7 +180,7 @@ private static function validateUnserializedData(array $data): void
181180 *
182181 * @psalm-suppress DocblockTypeContradiction
183182 */
184- if ($ data ['namespace ' ] === '' || \class_exists ((string ) $ data ['namespace ' ]) === false )
183+ if ($ data ['namespace ' ] === '' || \class_exists ((string ) $ data ['namespace ' ]) === false )
185184 {
186185 throw new \UnexpectedValueException (
187186 \sprintf ('Class "%s" not found ' , $ data ['namespace ' ])
0 commit comments