Prevent duplicate/overwritten keys

This commit is contained in:
2024-10-07 00:02:15 +02:00
parent 54b00f5925
commit 46bf135446
3 changed files with 21 additions and 17 deletions

View File

@@ -131,19 +131,6 @@ class TreeList implements Countable, IteratorAggregate
$path = dirname($path);
}
// $depth = $this->getEntryForIndex($index)->depth;
// if ($ignoreSelf) $depth = max(0, $depth - 1);
// echo "{start={$depth}}"; sleep(1);
// while ($index >= 0) {
// $entry = $this->getEntryForIndex($index);
// if ($entry->depth < $depth) {
// $node = $entry->node;
// if ($node instanceof ArrayNode || $node instanceof ObjectNode) {
// return $index;
// }
// }
// $index--;
// }
return null;
}