From bf92e90435b7257ed018c350d0d271765905f902 Mon Sep 17 00:00:00 2001 From: Jordan Dukart Date: Wed, 6 Sep 2023 11:34:48 -0300 Subject: [PATCH] Move the no-op to the base. --- src/Normalizer/V3/FieldItemListNormalizer.php | 8 -------- src/Normalizer/V3/FieldItemNormalizer.php | 8 -------- src/Normalizer/V3/NormalizerBase.php | 8 ++++++++ 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/Normalizer/V3/FieldItemListNormalizer.php b/src/Normalizer/V3/FieldItemListNormalizer.php index e03a11c..7b8bf82 100644 --- a/src/Normalizer/V3/FieldItemListNormalizer.php +++ b/src/Normalizer/V3/FieldItemListNormalizer.php @@ -14,14 +14,6 @@ class FieldItemListNormalizer extends NormalizerBase { */ protected $supportedInterfaceOrClass = FieldItemListInterface::class; - /** - * {@inheritDoc} - */ - public function normalize($object, $format = NULL, array $context = []) { - // XXX: No-op as other implementers can define what fields to normalize - // with a higher priority. - } - /** * {@inheritDoc} */ diff --git a/src/Normalizer/V3/FieldItemNormalizer.php b/src/Normalizer/V3/FieldItemNormalizer.php index 6cfec9b..78b5074 100644 --- a/src/Normalizer/V3/FieldItemNormalizer.php +++ b/src/Normalizer/V3/FieldItemNormalizer.php @@ -14,14 +14,6 @@ class FieldItemNormalizer extends NormalizerBase { */ protected $supportedInterfaceOrClass = FieldItemInterface::class; - /** - * {@inheritDoc} - */ - public function normalize($object, $format = NULL, array $context = []) { - // XXX: No-op as other implementers can define what fields to normalize - // with a higher priority. - } - /** * {@inheritDoc} */ diff --git a/src/Normalizer/V3/NormalizerBase.php b/src/Normalizer/V3/NormalizerBase.php index 308481e..51bceff 100644 --- a/src/Normalizer/V3/NormalizerBase.php +++ b/src/Normalizer/V3/NormalizerBase.php @@ -16,6 +16,14 @@ abstract class NormalizerBase extends SerializationNormalizerBase { */ protected $format = 'iiif-p-v3'; + /** + * {@inheritDoc} + */ + public function normalize($object, $format = NULL, array $context = []) { + // XXX: No-op fallback. We expect other implementers to define normalizers + // with a higher priority. + } + /** * {@inheritDoc} */