Code Duplication    Length = 7-11 lines in 2 locations

src/Definition/Loader/Annotation/MutationAnnotationParser.php 2 locations

@@ 135-141 (lines=7) @@
132
133
        $inputObject = $this->createFormInputObject($form, ucfirst($mutation->getName()));
134
135
        if ($annotation->clientMutationId) {
136
            $clientMutationId = new FieldDefinition();
137
            $clientMutationId->setName('clientMutationId');
138
            $clientMutationId->setType(Type::STRING);
139
            $clientMutationId->setDescription('A unique identifier for the client performing the mutation.');
140
            $inputObject->prependField($clientMutationId);
141
        }
142
143
        if ($annotation->dryRun) {
144
            $clientMutationId = new FieldDefinition();
@@ 143-153 (lines=11) @@
140
            $inputObject->prependField($clientMutationId);
141
        }
142
143
        if ($annotation->dryRun) {
144
            $clientMutationId = new FieldDefinition();
145
            $clientMutationId->setName('dryRun');
146
            $clientMutationId->setType(Type::BOOLEAN);
147
            $clientMutationId->setDescription(
148
                'Execute only a validation process without save anything.
149
Helpful to create a server side validation. 
150
Must check `constraintViolations` in the payload to get validation messages.'
151
            );
152
            $inputObject->prependField($clientMutationId);
153
        }
154
155
        $this->definitionManager->addType($inputObject);
156