@@ -450,10 +450,10 @@ public function between($field, $from, $to, $type = null)
450
450
public function and_ ($ conditions , $ types = [])
451
451
{
452
452
if ($ this ->isCallable ($ conditions )) {
453
- return $ conditions (new self ([], $ this ->getTypeMap ()->setTypes ($ types )));
453
+ return $ conditions (new static ([], $ this ->getTypeMap ()->setTypes ($ types )));
454
454
}
455
455
456
- return new self ($ conditions , $ this ->getTypeMap ()->setTypes ($ types ));
456
+ return new static ($ conditions , $ this ->getTypeMap ()->setTypes ($ types ));
457
457
}
458
458
459
459
/**
@@ -468,10 +468,10 @@ public function and_($conditions, $types = [])
468
468
public function or_ ($ conditions , $ types = [])
469
469
{
470
470
if ($ this ->isCallable ($ conditions )) {
471
- return $ conditions (new self ([], $ this ->getTypeMap ()->setTypes ($ types ), 'OR ' ));
471
+ return $ conditions (new static ([], $ this ->getTypeMap ()->setTypes ($ types ), 'OR ' ));
472
472
}
473
473
474
- return new self ($ conditions , $ this ->getTypeMap ()->setTypes ($ types ), 'OR ' );
474
+ return new static ($ conditions , $ this ->getTypeMap ()->setTypes ($ types ), 'OR ' );
475
475
}
476
476
// @codingStandardsIgnoreEnd
477
477
@@ -685,7 +685,7 @@ protected function _addConditions(array $conditions, array $types)
685
685
}
686
686
687
687
if ($ this ->isCallable ($ c )) {
688
- $ expr = new QueryExpression ([], $ typeMap );
688
+ $ expr = new static ([], $ typeMap );
689
689
$ c = $ c ($ expr , $ this );
690
690
}
691
691
@@ -695,12 +695,12 @@ protected function _addConditions(array $conditions, array $types)
695
695
}
696
696
697
697
if ($ numericKey && is_array ($ c ) || in_array (strtolower ($ k ), $ operators )) {
698
- $ this ->_conditions [] = new self ($ c , $ typeMap , $ numericKey ? 'AND ' : $ k );
698
+ $ this ->_conditions [] = new static ($ c , $ typeMap , $ numericKey ? 'AND ' : $ k );
699
699
continue ;
700
700
}
701
701
702
702
if (strtolower ($ k ) === 'not ' ) {
703
- $ this ->_conditions [] = new UnaryExpression ('NOT ' , new self ($ c , $ typeMap ));
703
+ $ this ->_conditions [] = new UnaryExpression ('NOT ' , new static ($ c , $ typeMap ));
704
704
continue ;
705
705
}
706
706
0 commit comments