Code Duplication    Length = 10-10 lines in 2 locations

src/Content/TFBCLoadAdditionalContent.php 2 locations

@@ 161-170 (lines=10) @@
158
159
        $current = $keys[$routeIndex];
160
        $previous = null;
161
        for ($i = $current - 1; $i >= 0; $i--) {
162
            $isSectionHeader = $values[$i]["sectionHeader"];
163
            $isInternal = $values[$i]["internal"];
164
            if ($isSectionHeader || $isInternal) {
165
                continue;
166
            }
167
            $previous = $values[$i];
168
            $previous["route"] = $index2Key[$i];
169
            break;
170
        }
171
        
172
        $next = null;
173
        for ($i = $current + 1; $i < $count; $i++) {
@@ 173-182 (lines=10) @@
170
        }
171
        
172
        $next = null;
173
        for ($i = $current + 1; $i < $count; $i++) {
174
            $isSectionHeader = $values[$i]["sectionHeader"];
175
            $isInternal = $values[$i]["internal"];
176
            if ($isSectionHeader || $isInternal) {
177
                continue;
178
            }
179
            $next = $values[$i];
180
            $next["route"] = $index2Key[$i];
181
            break;
182
        }
183
184
        return [$next, $previous];
185
    }