Code Duplication    Length = 8-8 lines in 2 locations

src/Mutation/AddNode.php 1 location

@@ 45-52 (lines=8) @@
42
    /**
43
     * {@inheritdoc}
44
     */
45
    public function returnPayload($data, ConstraintViolationList $violations, $inputSource)
46
    {
47
        if ($violations->count()) {
48
            $data = null;
49
        }
50
51
        return new AddNodePayload($data, $violations->all(), $inputSource['clientMutationId'] ?? null);
52
    }
53
54
    /**
55
     * @param NodeInterface $node

src/Mutation/UpdateNode.php 1 location

@@ 56-63 (lines=8) @@
53
    /**
54
     * {@inheritdoc}
55
     */
56
    public function returnPayload($data, ConstraintViolationList $violations, $inputSource)
57
    {
58
        if ($violations->count()) {
59
            $data = null;
60
        }
61
62
        return new UpdateNodePayload($data, $violations->all(), $inputSource['clientMutationId'] ?? null);
63
    }
64
65
    /**
66
     * @param NodeInterface $node