Code Duplication    Length = 8-10 lines in 2 locations

src/Serializers/VndError/VndErrorSerializer.php 1 location

@@ 65-72 (lines=8) @@
62
    /**
63
     * {@inheritdoc}
64
     */
65
    public function serialize(ResourceInterface $resource, ResourceSerializationContext $context): string
66
    {
67
        $innerContext = [
68
            'normalizers' => $this->normalizers,
69
        ];
70
71
        return $this->serializer->serialize($resource, $this->format, $innerContext);
72
    }
73
74
    /**
75
     * {@inheritdoc}

src/Serializers/WebApi/WebApiSerializer.php 1 location

@@ 53-62 (lines=10) @@
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function serialize(ResourceInterface $resource, ResourceSerializationContext $context): string
54
    {
55
        $innerContext = [
56
            'after_normalization' => function (array $data) {
57
                return $this->removeRelations($data);
58
            },
59
        ];
60
61
        return $this->serializer->serialize($resource, $this->format, $innerContext);
62
    }
63
64
    /**
65
     * {@inheritdoc}