aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/Classes/Calculator.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/NXP/Classes/Calculator.php')
-rw-r--r--src/NXP/Classes/Calculator.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/NXP/Classes/Calculator.php b/src/NXP/Classes/Calculator.php
index c6ccff1..94c6933 100644
--- a/src/NXP/Classes/Calculator.php
+++ b/src/NXP/Classes/Calculator.php
@@ -56,14 +56,14 @@ class Calculator
foreach ($tokens as $token) {
if ($token->type === Token::Literal || $token->type === Token::String) {
$stack[] = $token;
- } else if ($token->type === Token::Variable) {
+ } elseif ($token->type === Token::Variable) {
$variable = $token->value;
if (!array_key_exists($variable, $variables)) {
throw new UnknownVariableException($variable);
}
$value = $variables[$variable];
$stack[] = new Token(Token::Literal, $value);
- } else if ($token->type === Token::Function) {
+ } elseif ($token->type === Token::Function) {
if (!array_key_exists($token->value, $this->functions)) {
throw new UnknownFunctionException($token->value);
}