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