normalizeStringExpr($exprs[0]); for ($i = 1; $i < $numExprs; $i++) { $lastConcat = new Concat($lastConcat, $this->normalizeStringExpr($exprs[$i])); } return $lastConcat; } private function normalizeStringExpr($expr) { if ($expr instanceof Expr) { return $expr; } if (is_string($expr)) { return new String_($expr); } throw new \LogicException('Expected string or Expr'); } }