Code Duplication    Length = 8-8 lines in 2 locations

src/Mutation/AddNode.php 1 location

@@ 45-52 (lines=8) @@
42
    /**
43
     * {@inheritdoc}
44
     */
45
    protected 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

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