diff --git a/core/modules/jsonapi/src/Normalizer/EntityDenormalizerBase.php b/core/modules/jsonapi/src/Normalizer/EntityDenormalizerBase.php index a905c609a92c20532583bdb9a84f03d87249c6bb..efdae5241dc26e8351e2088cae68679ed7036259 100644 --- a/core/modules/jsonapi/src/Normalizer/EntityDenormalizerBase.php +++ b/core/modules/jsonapi/src/Normalizer/EntityDenormalizerBase.php @@ -67,7 +67,7 @@ public function __construct(EntityTypeManagerInterface $entity_type_manager, Ent /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = NULL) { + public function supportsNormalization($data, $format = NULL): bool { return FALSE; } diff --git a/core/modules/jsonapi/src/Serializer/Serializer.php b/core/modules/jsonapi/src/Serializer/Serializer.php index 709cf770949c3f90aab4dfc799f4528ab335355b..cb45e8984cc3b43959eac50b414c781689a29763 100644 --- a/core/modules/jsonapi/src/Serializer/Serializer.php +++ b/core/modules/jsonapi/src/Serializer/Serializer.php @@ -80,7 +80,7 @@ public function denormalize($data, $type, $format = NULL, array $context = []) { /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = NULL, array $context = []) { + public function supportsNormalization($data, $format = NULL, array $context = []): bool { return $this->selfSupportsNormalization($data, $format, $context) || $this->fallbackNormalizer->supportsNormalization($data, $format, $context); } diff --git a/core/modules/serialization/src/Normalizer/NormalizerBase.php b/core/modules/serialization/src/Normalizer/NormalizerBase.php index f1539b62a631f54436a5aa589971d6fd0e353a55..f98e94e26bfae042743fce82ea0b6aed446be912 100644 --- a/core/modules/serialization/src/Normalizer/NormalizerBase.php +++ b/core/modules/serialization/src/Normalizer/NormalizerBase.php @@ -30,7 +30,7 @@ abstract class NormalizerBase implements SerializerAwareInterface, CacheableNorm /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = NULL) { + public function supportsNormalization($data, $format = NULL): bool { // If we aren't dealing with an object or the format is not supported return // now. if (!is_object($data) || !$this->checkFormat($format)) { diff --git a/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php b/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php index 35300d8a8cdcd3784ee55bdb4b54e11034a5ba3d..cc205e8cd7a9fa8f85a9017266ebc4957f2c8f44 100644 --- a/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php +++ b/core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php @@ -47,7 +47,7 @@ public function normalize($object, $format = NULL, array $context = []) { * @return bool * Returns TRUE if the normalizer can handle the request. */ - public function supportsNormalization($data, $format = NULL) { + public function supportsNormalization($data, $format = NULL): bool { return static::$format === $format; }