Code Duplication    Length = 12-13 lines in 2 locations

src/SDL/Reflection/Builder/Definitions/EnumBuilder.php 1 location

@@ 45-56 (lines=12) @@
42
     * @return bool
43
     * @throws \LogicException
44
     */
45
    protected function onCompile(NodeInterface $ast): bool
46
    {
47
        if ($ast->is('Value')) {
48
            $value = new ValueBuilder($ast, $this->getDocument(), $this);
49
50
            $this->values = $this->unique($this->values, $value);
51
52
            return true;
53
        }
54
55
        return false;
56
    }
57
}
58

src/SDL/Reflection/Builder/Dependent/Field/FieldsBuilder.php 1 location

@@ 31-43 (lines=13) @@
28
     * @return bool
29
     * @throws TypeConflictException
30
     */
31
    protected function compileFieldsBuilder(NodeInterface $ast): bool
32
    {
33
        /** @var TypeDefinition|HasFields $this */
34
        if ($this instanceof HasFields && $ast->is('Field')) {
35
            $field = new FieldBuilder($ast, $this->getDocument(), $this);
36
37
            $this->fields = $this->unique($this->fields, $field);
38
39
            return true;
40
        }
41
42
        return false;
43
    }
44
}
45