diff options
author | Bruce Wells <brucekwells@gmail.com> | 2020-06-03 16:59:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 16:59:55 +0300 |
commit | 333a52e9aa64272b0011e108714c93c0f1e0d7db (patch) | |
tree | a1f6985aa44e3af0296989435427d57bc5219add /src/NXP/Classes/Calculator.php | |
parent | 913cf0a1e8920dbcc18649fa173a0c7e6ba5d5ef (diff) | |
parent | ea898d7a7b85aeb677f81f13784232c99b61808a (diff) |
Merge pull request #4 from neonxp/master
Latest from master
Diffstat (limited to 'src/NXP/Classes/Calculator.php')
-rw-r--r-- | src/NXP/Classes/Calculator.php | 4 |
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); } |