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