@@ -26,7 +26,7 @@ public function merge(SelectResult $parents, SelectResult $children, Nest $nest)
2626 $ childRow = new RowProxy ();
2727 $ alias = $ nest ->getAlias ();
2828 $ query = $ nest ->getNested ()->getSelect ();
29- $ query = $ this -> placeholdSelect ($ query , $ childRow );
29+ $ query = static :: placeholdSelect ($ query , $ childRow );
3030 $ mode = $ nest ->getMode ();
3131 $ className = $ nest ->getClassName ();
3232
@@ -41,8 +41,8 @@ public function merge(SelectResult $parents, SelectResult $children, Nest $nest)
4141 foreach ($ subchildren as $ child ) {
4242 $ childRow ->setCurrent ($ child );
4343 if (
44- $ this -> mergeConditionList ($ query ->where ()) &&
45- $ this -> mergeConditionList ($ query ->having ())
44+ static :: mergeConditionList ($ query ->where ()) &&
45+ static :: mergeConditionList ($ query ->having ())
4646 ) {
4747 $ childs [] = $ child ;
4848 if ($ mode ->is (NestMode::SINGLE_FIRST )) {
@@ -59,39 +59,39 @@ public function merge(SelectResult $parents, SelectResult $children, Nest $nest)
5959 }
6060 }
6161
62- public function placeholdSelect (SelectQuery $ query , RowProxy $ rowProxy )
62+ public static function placeholdSelect (SelectQuery $ query , RowProxy $ rowProxy )
6363 {
6464 $ query = clone $ query ;
65- $ query ->setWhere ($ this -> placeholdConditionList ($ query ->where (), $ rowProxy ));
66- $ query ->setHaving ($ this -> placeholdConditionList ($ query ->having (), $ rowProxy ));
65+ $ query ->setWhere (static :: placeholdConditionList ($ query ->where (), $ rowProxy ));
66+ $ query ->setHaving (static :: placeholdConditionList ($ query ->having (), $ rowProxy ));
6767 return $ query ;
6868 }
6969
70- public function placeholdConditionList (ConditionList $ conditions , RowProxy $ rowProxy )
70+ public static function placeholdConditionList (ConditionList $ conditions , RowProxy $ rowProxy )
7171 {
7272 $ newConds = new ConditionList ();
7373 foreach ($ conditions as $ cond ) {
7474 $ cnd = $ cond ->getCondition ();
7575 if ($ cnd instanceof ConditionList) {
76- $ this -> placeholdConditionList ($ cnd , $ rowProxy );
76+ static :: placeholdConditionList ($ cnd , $ rowProxy );
7777 } elseif ($ cnd instanceof OneOperandInterface) {
78- $ op = $ this -> placeholdOperand ($ cnd ->getOperand (), $ rowProxy );
78+ $ op = static :: placeholdOperand ($ cnd ->getOperand (), $ rowProxy );
7979 if (!isset ($ op )) {
8080 continue ;
8181 }
8282 $ cnd ->setOperand ($ op );
8383 } elseif ($ cnd instanceof TwoOperandsInterface) {
84- $ op1 = $ this -> placeholdOperand ($ cnd ->getOperand1 (), $ rowProxy );
85- $ op2 = $ this -> placeholdOperand ($ cnd ->getOperand2 (), $ rowProxy );
84+ $ op1 = static :: placeholdOperand ($ cnd ->getOperand1 (), $ rowProxy );
85+ $ op2 = static :: placeholdOperand ($ cnd ->getOperand2 (), $ rowProxy );
8686 if (!isset ($ op1 , $ op2 )) {
8787 continue ;
8888 }
8989 $ cnd ->setOperand1 ($ op1 );
9090 $ cnd ->setOperand2 ($ op2 );
9191 } elseif ($ cnd instanceof ThreeOperandsInterface) {
92- $ op1 = $ this -> placeholdOperand ($ cnd ->getOperand1 (), $ rowProxy );
93- $ op2 = $ this -> placeholdOperand ($ cnd ->getOperand2 (), $ rowProxy );
94- $ op3 = $ this -> placeholdOperand ($ cnd ->getOperand3 (), $ rowProxy );
92+ $ op1 = static :: placeholdOperand ($ cnd ->getOperand1 (), $ rowProxy );
93+ $ op2 = static :: placeholdOperand ($ cnd ->getOperand2 (), $ rowProxy );
94+ $ op3 = static :: placeholdOperand ($ cnd ->getOperand3 (), $ rowProxy );
9595 if (!isset ($ op1 , $ op2 , $ op3 )) {
9696 continue ;
9797 }
@@ -104,7 +104,7 @@ public function placeholdConditionList(ConditionList $conditions, RowProxy $rowP
104104 return $ newConds ;
105105 }
106106
107- public function placeholdOperand ($ operand , RowProxy $ rowProxy )
107+ public static function placeholdOperand ($ operand , RowProxy $ rowProxy )
108108 {
109109 if ($ operand instanceof ValueProxy) {
110110 return $ operand ;
@@ -114,12 +114,12 @@ public function placeholdOperand($operand, RowProxy $rowProxy)
114114 }
115115 }
116116
117- public function mergeConditionList (ConditionList $ conditions ): bool
117+ public static function mergeConditionList (ConditionList $ conditions ): bool
118118 {
119119 $ result = true ;
120120 foreach ($ conditions as $ cond ) {
121121 $ cnd = $ cond ->getCondition ();
122- $ res = $ this -> handleBooleanResult ($ cnd );
122+ $ res = static :: handleBooleanResult ($ cnd );
123123 if ($ cnd instanceof NegatableInterface && $ cnd ->isNegated ()) {
124124 $ res = !$ res ;
125125 }
@@ -135,10 +135,10 @@ public function mergeConditionList(ConditionList $conditions): bool
135135 return $ result ;
136136 }
137137
138- public function handleBooleanResult (BooleanResultInterface $ bool ): bool
138+ public static function handleBooleanResult (BooleanResultInterface $ bool ): bool
139139 {
140140 if ($ bool instanceof ConditionList) {
141- return $ this -> mergeConditionList ($ bool );
141+ return static :: mergeConditionList ($ bool );
142142 } elseif ($ bool instanceof NestOperationResolverInterface) {
143143 return $ bool ->nestResolve ();
144144 }
0 commit comments