aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Wells <brucekwells@gmail.com>2019-12-01 02:41:36 +0300
committerBruce Wells <brucekwells@gmail.com>2019-12-01 02:47:04 +0300
commit2db48eff956f5a63513685cb5b576b588c698912 (patch)
treedd8e7f7ff8b59ff8eff7c5a71364e0c452fe8684
parent84f3f967b71fc39bf61be13e46c89158ad0a34a9 (diff)
PHP 7.4 support
-rw-r--r--.travis.yml1
-rw-r--r--README.md2
-rw-r--r--src/NXP/MathExecutor.php4
-rw-r--r--tests/MathTest.php6
4 files changed, 6 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index 3a63f2f..a471c3e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,7 @@ php:
- 7.1
- 7.2
- 7.3
+ - 7.4
before_script:
- wget http://getcomposer.org/composer.phar
diff --git a/README.md b/README.md
index 7e0573b..18da2fd 100644
--- a/README.md
+++ b/README.md
@@ -78,8 +78,6 @@ $executor->addFunction('abs', function($arg) {return abs($arg);});
```
Function default parameters are not supported at this time.
-Default parameters are not currently supported.
-
## Operators:
Default operators: `+ - * / ^`
diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php
index 5de7dc5..9d3f5e8 100644
--- a/src/NXP/MathExecutor.php
+++ b/src/NXP/MathExecutor.php
@@ -365,7 +365,7 @@ class MathExecutor
'log' => function ($arg) {
return log($arg);
},
- 'log10' => function ($arg) {
+ 'log10' => function ($arg) {
return log10($arg);
},
'log1p' => function ($arg) {
@@ -401,7 +401,7 @@ class MathExecutor
'sqrt' => function ($arg) {
return sqrt($arg);
},
- 'tan' => function ($arg) {
+ 'tan' => function ($arg) {
return tan($arg);
},
'tanh' => function ($arg) {
diff --git a/tests/MathTest.php b/tests/MathTest.php
index 27817db..391408e 100644
--- a/tests/MathTest.php
+++ b/tests/MathTest.php
@@ -73,11 +73,11 @@ class MathTest extends \PHPUnit\Framework\TestCase
['hypot(1.5, 3.5)'],
['intdiv(10, 2)'],
['log(1.5)'],
- ['log10(1.5)'],
+ ['log10(1.5)'],
['log1p(1.5)'],
['max(1.5, 3.5)'],
['min(1.5, 3.5)'],
- ['octdec(1.5)'],
+ ['octdec("15")'],
['pi()'],
['pow(1.5, 3.5)'],
['rad2deg(1.5)'],
@@ -85,7 +85,7 @@ class MathTest extends \PHPUnit\Framework\TestCase
['sin(1.5)'],
['sinh(1.5)'],
['sqrt(1.5)'],
- ['tan(1.5)'],
+ ['tan(1.5)'],
['tanh(1.5)'],
['0.1 + 0.2'],