Skip to content

Commit

Permalink
Move the no-op to the base.
Browse files Browse the repository at this point in the history
  • Loading branch information
jordandukart committed Sep 6, 2023
1 parent 9b7b5d0 commit bf92e90
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
8 changes: 0 additions & 8 deletions src/Normalizer/V3/FieldItemListNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*/
Expand Down
8 changes: 0 additions & 8 deletions src/Normalizer/V3/FieldItemNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*/
Expand Down
8 changes: 8 additions & 0 deletions src/Normalizer/V3/NormalizerBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*/
Expand Down

0 comments on commit bf92e90

Please sign in to comment.