diff options
author | Javier Marín <javier@marinros.com> | 2020-09-15 03:47:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-15 03:47:26 +0300 |
commit | f8faf3fa8d21ebd6e6f8c73f022eb64e407dc6e1 (patch) | |
tree | 752ca6f1602526ce36e38b289f2bb54630c4a0e3 /src/NXP/Classes | |
parent | 44d72cc252974ac36cc138591aac785022760a50 (diff) |
Improved support for null variables (#72)V2.1.2
* Added handler to define not found variables
Added support for string variables
Fixed strings and ints comparison error
* Check if variables have scalar types (int, float, string and bool)
Better $onVarNotFound logic
* Better support for null variables
* Better support for null variables
* Better support for null variables
Diffstat (limited to 'src/NXP/Classes')
-rw-r--r-- | src/NXP/Classes/Calculator.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/NXP/Classes/Calculator.php b/src/NXP/Classes/Calculator.php index 49142df..4785a8f 100644 --- a/src/NXP/Classes/Calculator.php +++ b/src/NXP/Classes/Calculator.php @@ -64,9 +64,7 @@ class Calculator $value = $variables[$variable]; } elseif ($onVarNotFound) { $value = call_user_func($onVarNotFound, $variable); - } - - if (!isset($value)) { + } else { throw new UnknownVariableException($variable); } |