aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/Classes/Calculator.php
diff options
context:
space:
mode:
authorAlexander Kiryukhin <a.kiryukhin@mail.ru>2020-06-01 03:50:39 +0300
committerGitHub <noreply@github.com>2020-06-01 03:50:39 +0300
commitea898d7a7b85aeb677f81f13784232c99b61808a (patch)
treea1f6985aa44e3af0296989435427d57bc5219add /src/NXP/Classes/Calculator.php
parent7852fc7d04bcdb3aa60384a1f6dddfd637fedd70 (diff)
Code style fixes & Github Actions (#65)V2.0.2
* Code style fixes Up phpunit to v8 New CI * Remove travis * Fix CI badge * Added php-cs-fixer action
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);
}