Code Duplication    Length = 3-3 lines in 2 locations

NestedSetsBehavior.php 2 locations

@@ 282-284 (lines=3) @@
279
        $result = $this->owner->getAttribute($this->leftAttribute) > $node->getAttribute($this->leftAttribute)
280
            && $this->owner->getAttribute($this->rightAttribute) < $node->getAttribute($this->rightAttribute);
281
282
        if ($result && $this->treeAttribute !== null) {
283
            $result = $this->owner->getAttribute($this->treeAttribute) === $node->getAttribute($this->treeAttribute);
284
        }
285
286
        return $result;
287
    }
@@ 684-686 (lines=3) @@
681
    protected function shift($from, $to, $delta, $tree = null)
682
    {
683
        if ($delta !== 0 && ($to === null || $to >= $from)) {
684
            if ($this->treeAttribute !== null && $tree === null) {
685
                $tree = $this->owner->getAttribute($this->treeAttribute);
686
            }
687
            foreach ([$this->leftAttribute, $this->rightAttribute] as $i => $attribute) {
688
                $this->owner->updateAll(
689
                    [$attribute => new Expression("[[{$attribute}]]" . sprintf('%+d', $delta))],