Code Duplication    Length = 9-9 lines in 2 locations

generator/templates/static/Graph.php 1 location

@@ 26-34 (lines=9) @@
23
        throw new BadMethodCallException(sprintf('The method "%" does not exist on class "%s".', $method, get_class($this)));
24
    }
25
26
    public function add(Type $schema)
27
    {
28
        $type = get_class($schema);
29
        if ($this->has($type)) {
30
            throw new InvalidArgumentException(sprintf('The graph already has an item of type "%s".', $type));
31
        }
32
33
        return $this->set($schema);
34
    }
35
36
    public function has(string $type): bool
37
    {

src/Graph.php 1 location

@@ 23-31 (lines=9) @@
20
        }
21
    }
22
23
    public function add(Type $schema)
24
    {
25
        $type = get_class($schema);
26
        if ($this->has($type)) {
27
            throw new InvalidArgumentException(sprintf('The graph already has an item of type "%s".', $type));
28
        }
29
30
        return $this->set($schema);
31
    }
32
33
    public function has(string $type): bool
34
    {