Code Duplication    Length = 13-13 lines in 2 locations

src/Rules/DependOn.php 1 location

@@ 107-119 (lines=13) @@
104
                    $start_line = $node->getAttribute("startLine");
105
                    $source_line = $location->file_content($start_line, $start_line);
106
                    // Record a dependency for every entity we currently know as dependent.
107
                    foreach ($location->in_entities() as $entity) {
108
                        if ($entity[0] == Variable::FILE_TYPE) {
109
                            continue;
110
                        }
111
                        $insert->relation
112
                            ( "depend_on"
113
                            , $entity[1]
114
                            , $ref_id
115
                            , $location->file_path()
116
                            , $start_line
117
                            , $source_line
118
                            );
119
                    }
120
                }
121
            });
122
        }

src/Rules/Invoke.php 1 location

@@ 70-82 (lines=13) @@
67
                    $start_line = $node->getAttribute("startLine");
68
                    $source_line = $location->file_content($start_line, $start_line);
69
70
                    foreach ($location->in_entities() as $entity) {
71
                        if ($entity[0] == Variable::FILE_TYPE) {
72
                            continue;
73
                        }
74
                        $insert->relation
75
                            ( "invoke"
76
                            , $entity[1]
77
                            , $ref_id
78
                            , $location->file_path()
79
                            , $start_line
80
                            , $source_line
81
                            );
82
                    }
83
                }
84
            });
85
    }