@@ 168-178 (lines=11) @@ | ||
165 | ||
166 | $current = $keys[$routeIndex]; |
|
167 | $previous = null; |
|
168 | for ($i = $current - 1; $i >= 0; $i--) { |
|
169 | $isSectionHeader = $values[$i]["sectionHeader"]; |
|
170 | $isLinkable = $values[$i]["linkable"]; // ?? null; |
|
171 | $isInternal = $values[$i]["internal"]; |
|
172 | if (($isSectionHeader && !$isLinkable) || $isInternal) { |
|
173 | continue; |
|
174 | } |
|
175 | $previous = $values[$i]; |
|
176 | $previous["route"] = $index2Key[$i]; |
|
177 | break; |
|
178 | } |
|
179 | ||
180 | $next = null; |
|
181 | for ($i = $current + 1; $i < $count; $i++) { |
|
@@ 181-191 (lines=11) @@ | ||
178 | } |
|
179 | ||
180 | $next = null; |
|
181 | for ($i = $current + 1; $i < $count; $i++) { |
|
182 | $isSectionHeader = $values[$i]["sectionHeader"]; |
|
183 | $isLinkable = $values[$i]["linkable"]; // ?? null; |
|
184 | $isInternal = $values[$i]["internal"]; |
|
185 | if (($isSectionHeader && !$isLinkable) || $isInternal) { |
|
186 | continue; |
|
187 | } |
|
188 | $next = $values[$i]; |
|
189 | $next["route"] = $index2Key[$i]; |
|
190 | break; |
|
191 | } |
|
192 | ||
193 | return [$next, $previous]; |
|
194 | } |