aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/MathExecutor.php
diff options
context:
space:
mode:
authorAlexander Kiryukhin <alexander@kiryukhin.su>2018-09-06 20:41:20 +0300
committerGitHub <noreply@github.com>2018-09-06 20:41:20 +0300
commit2a629d37dda54f8a8d559473a5167b512910f75b (patch)
tree954c50f2644212742442e0027efb081620d2a109 /src/NXP/MathExecutor.php
parentaa1a092a9e231e8f923ab40365dff092c2908903 (diff)
parent7b657db13f0b76432ca0039e45f4b8f5e09879c2 (diff)
Merge pull request #27 from NeonXP/devv0.3
Dev
Diffstat (limited to 'src/NXP/MathExecutor.php')
-rw-r--r--src/NXP/MathExecutor.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php
index 9e7ce25..c5c7add 100644
--- a/src/NXP/MathExecutor.php
+++ b/src/NXP/MathExecutor.php
@@ -91,6 +91,10 @@ class MathExecutor
*/
public function setVar($variable, $value)
{
+ if (!is_numeric($value)) {
+ throw new \Exception("Variable ({$variable}) value must be a number ({$value}) type ({gettype($value)})");
+ }
+
$this->variables[$variable] = $value;
return $this;