Code Duplication    Length = 4-5 lines in 2 locations

src/Processor.php 2 locations

@@ 130-134 (lines=5) @@
127
                    $value[] = [];
128
                    $index   = count($value) - 1;
129
130
                    if(in_array($outputType->getConfig()->getItem()->getKind(), [TypeMap::KIND_UNION, TypeMap::KIND_INTERFACE]) ) {
131
                        $type = $outputType->getConfig()->getItemConfig()->resolveType($resolvedValueItem);
132
                    } else {
133
                        $type = $outputType;
134
                    }
135
136
                    $value[$index] = $this->processQueryFields($mutation, $type, $resolvedValueItem, $value[$index]);
137
                }
@@ 312-315 (lines=4) @@
309
    {
310
        $resolvedValue = $field->getConfig()->resolve($contextValue, $this->parseArgumentsValues($field, $query));
311
312
        if(in_array($field->getType()->getKind(), [TypeMap::KIND_UNION, TypeMap::KIND_INTERFACE])){
313
            $resolvedType = $field->getType()->resolveType($resolvedValue);
314
            $field->setType($resolvedType);
315
        }
316
317
        return $resolvedValue;
318
    }