Code Duplication    Length = 14-14 lines in 2 locations

src/Indexer/PhpParser/Indexer.php 2 locations

@@ 226-239 (lines=14) @@
223
            }
224
        }
225
        // Method or Function
226
        elseif ($node instanceof N\Stmt\ClassMethod) {
227
            $id = $this->insert->entity
228
                ( Consts::METHOD_ENTITY
229
                , $node->name
230
                , $this->file_path
231
                , $start_line
232
                , $end_line
233
                , $source
234
                );
235
236
            foreach ($this->listeners as $listener) {
237
                $listener->on_enter_method($id, $node);
238
            }
239
        }
240
        elseif ($node instanceof N\Stmt\Function_) {
241
            $id = $this->insert->entity
242
                ( Consts::FUNCTION_ENTITY
@@ 240-253 (lines=14) @@
237
                $listener->on_enter_method($id, $node);
238
            }
239
        }
240
        elseif ($node instanceof N\Stmt\Function_) {
241
            $id = $this->insert->entity
242
                ( Consts::FUNCTION_ENTITY
243
                , $node->name
244
                , $this->file_path
245
                , $start_line
246
                , $end_line
247
                , $source
248
                );
249
250
            foreach ($this->listeners as $listener) {
251
                $listener->on_enter_function($id, $node);
252
            }
253
        }
254
        else {
255
            foreach ($this->listeners as $listener) {
256
                $listener->on_enter_misc($node);