Code Duplication    Length = 14-15 lines in 3 locations

src/Graph/IndexDB.php 3 locations

@@ 61-74 (lines=14) @@
58
    /**
59
     * @inheritdocs
60
     */
61
    public function _class($name, $file, $start_line, $end_line) {
62
        assert('is_string($name)');
63
        assert('$file->type() == "file"');
64
        assert('is_int($start_line)');
65
        assert('is_int($end_line)');
66
67
        $class = $this->create_node
68
            ( "class"
69
            ,   [ "name" => $name
70
                ]
71
            );
72
        $this->add_definition($class, $file, $start_line, $end_line);
73
        return $class;
74
    }
75
76
    /**
77
     * @inheritdocs
@@ 79-92 (lines=14) @@
76
    /**
77
     * @inheritdocs
78
     */
79
    public function _interface($name, $file, $start_line, $end_line) {
80
        assert('is_string($name)');
81
        assert('$file->type() == "file"');
82
        assert('is_int($start_line)');
83
        assert('is_int($end_line)');
84
85
        $interface = $this->create_node
86
            ( "interface"
87
            ,   [ "name" => $name
88
                ]
89
            );
90
        $this->add_definition($interface, $file, $start_line, $end_line);
91
        return $interface;
92
    }
93
94
    /**
95
     * @inheritdocs
@@ 119-133 (lines=15) @@
116
    /**
117
     * @inheritdocs
118
     */
119
    public function _function($name, $file, $start_line, $end_line) {
120
        assert('is_string($name)');
121
        assert('$file->type() == "file"');
122
        assert('is_int($start_line)');
123
        assert('is_int($end_line)');
124
125
        $function = $this->create_node
126
            ( "function"
127
            ,   [ "name" => $name
128
                ]
129
            );
130
        $this->add_definition($function, $file, $start_line, $end_line);
131
132
        return $function;
133
    }
134
135
    /**
136
     * @inheritdocs