|
@ -43,7 +43,7 @@ class Expression |
|
|
* Evaluate the tokens contained in this expression. |
|
|
* Evaluate the tokens contained in this expression. |
|
|
* |
|
|
* |
|
|
* @param array<string,mixed> $variables variables that can be referenced |
|
|
* @param array<string,mixed> $variables variables that can be referenced |
|
|
* @return mixed |
|
|
* @return mixed if expression evaluated down to a single value a scalar, otherwise an array |
|
|
*/ |
|
|
*/ |
|
|
public function evaluate(array $variables = []) |
|
|
public function evaluate(array $variables = []) |
|
|
{ |
|
|
{ |
|
@ -83,7 +83,7 @@ class Expression |
|
|
return end($this->stack); |
|
|
return end($this->stack); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
throw new \Exception('Expression did not evaluate down to a single value'); |
|
|
return $this->stack; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|