Code Duplication    Length = 14-15 lines in 3 locations

src/Graph/IndexDB.php 3 locations

@@ 48-61 (lines=14) @@
45
    /**
46
     * @inheritdocs
47
     */
48
    public function _class($name, $file, $start_line, $end_line) {
49
        assert('is_string($name)');
50
        assert('$file->type() == "file"');
51
        assert('is_int($start_line)');
52
        assert('is_int($end_line)');
53
54
        $class = $this->create_node
55
            ( "class"
56
            ,   [ "name" => $name
57
                ]
58
            );
59
        $this->add_definition($class, $file, $start_line, $end_line);
60
        return $class;
61
    }
62
63
    /**
64
     * @inheritdocs
@@ 66-79 (lines=14) @@
63
    /**
64
     * @inheritdocs
65
     */
66
    public function _interface($name, $file, $start_line, $end_line) {
67
        assert('is_string($name)');
68
        assert('$file->type() == "file"');
69
        assert('is_int($start_line)');
70
        assert('is_int($end_line)');
71
72
        $interface = $this->create_node
73
            ( "interface"
74
            ,   [ "name" => $name
75
                ]
76
            );
77
        $this->add_definition($interface, $file, $start_line, $end_line);
78
        return $interface;
79
    }
80
81
    /**
82
     * @inheritdocs
@@ 106-120 (lines=15) @@
103
    /**
104
     * @inheritdocs
105
     */
106
    public function _function($name, $file, $start_line, $end_line) {
107
        assert('is_string($name)');
108
        assert('$file->type() == "file"');
109
        assert('is_int($start_line)');
110
        assert('is_int($end_line)');
111
112
        $function = $this->create_node
113
            ( "function"
114
            ,   [ "name" => $name
115
                ]
116
            );
117
        $this->add_definition($function, $file, $start_line, $end_line);
118
119
        return $function;
120
    }
121
122
    /**
123
     * @inheritdocs