5use InvalidArgumentException;
28 $this->children[] = $expression;
31 abstract protected function getType(): string;
39 if ( !$this->children ) {
40 throw new InvalidArgumentException(
"The array of values can't be empty." );
42 $sqls = array_map(
static fn ( $value ) => $value->toSql( $dbQuoter ), $this->children );
43 return '(' . implode(
' ' . $this->
getType() .
' ', $sqls ) .
')';
47 if ( !$this->children ) {
48 throw new InvalidArgumentException(
"The array of values can't be empty." );
50 $sqls = array_map(
static fn ( $value ) => $value->toGeneralizedSql(), $this->children );
51 return '(' . implode(
' ' . $this->getType() .
' ', $sqls ) .
')';
if(!defined('MW_SETUP_CALLBACK'))