diff --git a/core/modules/serialization/src/Encoder/JsonEncoder.php b/core/modules/serialization/src/Encoder/JsonEncoder.php index db88bcb3d0d..606353b92e5 100644 --- a/core/modules/serialization/src/Encoder/JsonEncoder.php +++ b/core/modules/serialization/src/Encoder/JsonEncoder.php @@ -37,14 +37,14 @@ class JsonEncoder extends BaseJsonEncoder { /** * {@inheritdoc} */ - public function supportsEncoding($format) { + public function supportsEncoding($format): bool { return in_array($format, static::$format); } /** * {@inheritdoc} */ - public function supportsDecoding($format) { + public function supportsDecoding($format): bool { return in_array($format, static::$format); } diff --git a/core/modules/serialization/src/Encoder/XmlEncoder.php b/core/modules/serialization/src/Encoder/XmlEncoder.php index bdcb184d3e8..90998a57dec 100644 --- a/core/modules/serialization/src/Encoder/XmlEncoder.php +++ b/core/modules/serialization/src/Encoder/XmlEncoder.php @@ -64,28 +64,28 @@ class XmlEncoder implements SerializerAwareInterface, EncoderInterface, DecoderI /** * {@inheritdoc} */ - public function encode($data, $format, array $context = []) { + public function encode($data, $format, array $context = []): string { return $this->getBaseEncoder()->encode($data, $format, $context); } /** * {@inheritdoc} */ - public function supportsEncoding($format) { + public function supportsEncoding($format): bool { return in_array($format, static::$format); } /** * {@inheritdoc} */ - public function decode($data, $format, array $context = []) { + public function decode($data, $format, array $context = []): mixed { return $this->getBaseEncoder()->decode($data, $format, $context); } /** * {@inheritdoc} */ - public function supportsDecoding($format) { + public function supportsDecoding($format): bool { return in_array($format, static::$format); }