@@ 741-750 (lines=10) @@ | ||
738 | && $this->checkArray4($array); |
|
739 | } |
|
740 | ||
741 | private function checkArray1($array) |
|
742 | { |
|
743 | foreach($array as $node) |
|
744 | { |
|
745 | if(!$node->getIsDeletedRecord() && $node->lft>=$node->rgt) |
|
746 | return false; |
|
747 | } |
|
748 | ||
749 | return true; |
|
750 | } |
|
751 | ||
752 | private function checkArray2($array) |
|
753 | { |
|
@@ 752-761 (lines=10) @@ | ||
749 | return true; |
|
750 | } |
|
751 | ||
752 | private function checkArray2($array) |
|
753 | { |
|
754 | foreach($array as $node) |
|
755 | { |
|
756 | if(!$node->getIsDeletedRecord() && !(($node->rgt-$node->lft)%2)) |
|
757 | return false; |
|
758 | } |
|
759 | ||
760 | return true; |
|
761 | } |
|
762 | ||
763 | private function checkArray3($array) |
|
764 | { |
|
@@ 763-772 (lines=10) @@ | ||
760 | return true; |
|
761 | } |
|
762 | ||
763 | private function checkArray3($array) |
|
764 | { |
|
765 | foreach($array as $node) |
|
766 | { |
|
767 | if(!$node->getIsDeletedRecord() && ($node->lft-$node->level)%2) |
|
768 | return false; |
|
769 | } |
|
770 | ||
771 | return true; |
|
772 | } |
|
773 | ||
774 | private function checkArray4($array) |
|
775 | { |
|
@@ 845-854 (lines=10) @@ | ||
842 | && $this->checkArrayWithManyRoots4($array); |
|
843 | } |
|
844 | ||
845 | private function checkArrayWithManyRoots1($array) |
|
846 | { |
|
847 | foreach($array as $node) |
|
848 | { |
|
849 | if(!$node->getIsDeletedRecord() && $node->lft>=$node->rgt) |
|
850 | return false; |
|
851 | } |
|
852 | ||
853 | return true; |
|
854 | } |
|
855 | ||
856 | private function checkArrayWithManyRoots2($array) |
|
857 | { |
|
@@ 856-865 (lines=10) @@ | ||
853 | return true; |
|
854 | } |
|
855 | ||
856 | private function checkArrayWithManyRoots2($array) |
|
857 | { |
|
858 | foreach($array as $node) |
|
859 | { |
|
860 | if(!$node->getIsDeletedRecord() && !(($node->rgt-$node->lft)%2)) |
|
861 | return false; |
|
862 | } |
|
863 | ||
864 | return true; |
|
865 | } |
|
866 | ||
867 | private function checkArrayWithManyRoots3($array) |
|
868 | { |
|
@@ 867-876 (lines=10) @@ | ||
864 | return true; |
|
865 | } |
|
866 | ||
867 | private function checkArrayWithManyRoots3($array) |
|
868 | { |
|
869 | foreach($array as $node) |
|
870 | { |
|
871 | if(!$node->getIsDeletedRecord() && ($node->lft-$node->level)%2) |
|
872 | return false; |
|
873 | } |
|
874 | ||
875 | return true; |
|
876 | } |
|
877 | ||
878 | private function checkArrayWithManyRoots4($array) |
|
879 | { |