Code Duplication    Length = 18-18 lines in 2 locations

src/Indexer/Indexer.php 2 locations

@@ 303-320 (lines=18) @@
300
                );
301
        }
302
        // Method or Function
303
        elseif ($node instanceof N\Stmt\ClassMethod) {
304
            $type = Variable::METHOD_TYPE;
305
            $id = $this->insert->entity
306
                ( $type
307
                , $node->name
308
                , $this->file_path
309
                , $start_line
310
                , $end_line
311
                , $source
312
                );
313
        }
314
        elseif ($node instanceof N\Stmt\Function_) {
315
            $type = Variable::FUNCTION_TYPE;
316
            $id = $this->insert->entity
317
                ( $type 
318
                , $node->name
319
                , $this->file_path
320
                , $start_line
321
                , $end_line
322
                , $source
323
                );
@@ 314-331 (lines=18) @@
311
                , $source
312
                );
313
        }
314
        elseif ($node instanceof N\Stmt\Function_) {
315
            $type = Variable::FUNCTION_TYPE;
316
            $id = $this->insert->entity
317
                ( $type 
318
                , $node->name
319
                , $this->file_path
320
                , $start_line
321
                , $end_line
322
                , $source
323
                );
324
        }
325
326
        if ($id !== null) {
327
            $this->call_entity_listener("listeners_enter_entity",  $type, $id, $node);
328
            $this->entity_stack[] = array($type, $id);
329
        }
330
        else {
331
            $this->call_misc_listener("listeners_enter_misc", $node);
332
        }
333
    }
334