Code Duplication    Length = 10-10 lines in 2 locations

src/Content/TFBCLoadAdditionalContent.php 2 locations

@@ 131-140 (lines=10) @@
128
129
        $current = $keys[$routeIndex];
130
        $previous = null;
131
        for ($i = $current - 1; $i >= 0; $i--) {
132
            $isSectionHeader = $values[$i]["sectionHeader"];
133
            $isInternal = $values[$i]["internal"];
134
            if ($isSectionHeader || $isInternal) {
135
                continue;
136
            }
137
            $previous = $values[$i];
138
            $previous["route"] = $index2Key[$i];
139
            break;
140
        }
141
        
142
        $next = null;
143
        for ($i = $current + 1; $i < $count; $i++) {
@@ 143-152 (lines=10) @@
140
        }
141
        
142
        $next = null;
143
        for ($i = $current + 1; $i < $count; $i++) {
144
            $isSectionHeader = $values[$i]["sectionHeader"];
145
            $isInternal = $values[$i]["internal"];
146
            if ($isSectionHeader || $isInternal) {
147
                continue;
148
            }
149
            $next = $values[$i];
150
            $next["route"] = $index2Key[$i];
151
            break;
152
        }
153
154
        return [$next, $previous];
155
    }