@@ 998-1010 (lines=13) @@ | ||
995 | * @param int $left |
|
996 | * @param int $right |
|
997 | */ |
|
998 | protected function findPrependRange(&$left, &$right) |
|
999 | { |
|
1000 | $left = $this->node->getAttribute($this->leftAttribute); |
|
1001 | $right = $this->node->getAttribute($this->rightAttribute); |
|
1002 | $child = $this->getNodeBehavior()->getChildren() |
|
1003 | ->select($this->leftAttribute) |
|
1004 | ->orderBy([$this->leftAttribute => SORT_ASC]) |
|
1005 | ->limit(1) |
|
1006 | ->scalar(); |
|
1007 | if ($child !== false) { |
|
1008 | $right = (int)$child; |
|
1009 | } |
|
1010 | } |
|
1011 | ||
1012 | /** |
|
1013 | * @param int $left |
|
@@ 1016-1028 (lines=13) @@ | ||
1013 | * @param int $left |
|
1014 | * @param int $right |
|
1015 | */ |
|
1016 | protected function findAppendRange(&$left, &$right) |
|
1017 | { |
|
1018 | $left = $this->node->getAttribute($this->leftAttribute); |
|
1019 | $right = $this->node->getAttribute($this->rightAttribute); |
|
1020 | $child = $this->getNodeBehavior()->getChildren() |
|
1021 | ->select($this->rightAttribute) |
|
1022 | ->orderBy([$this->rightAttribute => SORT_DESC]) |
|
1023 | ->limit(1) |
|
1024 | ->scalar(); |
|
1025 | if ($child !== false) { |
|
1026 | $left = (int)$child; |
|
1027 | } |
|
1028 | } |
|
1029 | ||
1030 | /** |
|
1031 | * @param int $left |