Code Duplication    Length = 7-7 lines in 2 locations

src/Definition/Loader/Annotation/FieldConnectionAnnotationParser.php 1 location

@@ 117-123 (lines=7) @@
114
        $field->setResolver($refClass->getName());
115
116
        /** @var Annotation\Connection $connection */
117
        if ($connection = $this->reader->getClassAnnotation($refClass, Annotation\Connection::class)) {
118
            $this->connectionBuilder->setEndpoint($this->definitionManager->getEndpoint());
119
            $this->connectionBuilder->setLimit($connection->limit);
120
            $this->connectionBuilder->setParentField($connection->parentField);
121
            $this->connectionBuilder->build($field, $field->getType());
122
            $field->setResolver($refClass->getName());
123
        }
124
    }
125
}
126

src/Definition/Loader/Annotation/QueryAnnotationParser.php 1 location

@@ 106-112 (lines=7) @@
103
        $query->setDescription($annotation->description);
104
105
        /** @var Annotation\Connection $connection */
106
        if ($connection = $this->reader->getClassAnnotation($refClass, Annotation\Connection::class)) {
107
            $this->connectionBuilder->setEndpoint($this->definitionManager->getEndpoint());
108
            $this->connectionBuilder->setLimit($connection->limit);
109
            $this->connectionBuilder->setParentField($connection->parentField);
110
            $this->connectionBuilder->build($query, $query->getType());
111
            $query->setResolver($refClass->getName());
112
        }
113
    }
114
}
115