function BuilderFactory::normalizeStringExpr
Parameters
string|Expr $expr:
1 call to BuilderFactory::normalizeStringExpr()
- BuilderFactory::concat in vendor/
nikic/ php-parser/ lib/ PhpParser/ BuilderFactory.php - Creates nested Concat nodes from a list of expressions.
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ BuilderFactory.php, line 364
Class
Namespace
PhpParserCode
private function normalizeStringExpr($expr) : Expr {
if ($expr instanceof Expr) {
return $expr;
}
if (\is_string($expr)) {
return new String_($expr);
}
throw new \LogicException('Expected string or Expr');
}