aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/NXP/Classes/CustomFunction.php2
-rw-r--r--src/NXP/MathExecutor.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/NXP/Classes/CustomFunction.php b/src/NXP/Classes/CustomFunction.php
index 636435c..bf36405 100644
--- a/src/NXP/Classes/CustomFunction.php
+++ b/src/NXP/Classes/CustomFunction.php
@@ -32,7 +32,7 @@ class CustomFunction
* @param int $places
* @throws ReflectionException
*/
- public function __construct(string $name, callable $function, int $places = null)
+ public function __construct(string $name, callable $function, ?int $places = null)
{
$this->name = $name;
$this->function = $function;
diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php
index 5a20e17..5fdc78f 100644
--- a/src/NXP/MathExecutor.php
+++ b/src/NXP/MathExecutor.php
@@ -30,7 +30,7 @@ class MathExecutor
*
* @var array
*/
- private $variables = [];
+ public $variables = [];
/**
* @var Operator[]
@@ -103,7 +103,7 @@ class MathExecutor
'/' => [
function ($a, $b) {
if ($b == 0) {
- throw new DivisionByZeroException();
+ throw new DivisionByZeroException();
}
return $a / $b;
},