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