aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Allow null values in `setVar` method (#73)V2.1.3Javier Marín2020-09-161-1/+1
| | | | | | | | | | | | | | | | * 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 * Allow null values in `setVar` method
* Improved support for null variables (#72)V2.1.2Javier Marín2020-09-153-25/+23
| | | | | | | | | | | | | | * 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
* Better setVar error message (#70)V2.1.1Bruce Wells2020-07-273-7/+59
| | | | Additional unit tests Readme update
* Release prep (#69)V2.1.0Bruce Wells2020-07-272-4/+51
| | | | | | | * String comparison unit tests * getVars and getFunctions sanity checks * Add dynamic variable documentation
* Handler for not found variables (#68)Javier Marín2020-07-264-14/+81
| | | | | | | | * 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
* Variable fixes (#67)V2.0.3Bruce Wells2020-06-046-11/+97
| | | | | | | | | | | * Reproduce if throws UnknownOperatorException * Fix variable detection * Adding IncorrectNumberOfFunctionParametersException * Removing tabs * Better exception message text
* Code style fixes & Github Actions (#65)V2.0.2Alexander Kiryukhin2020-06-0111-39/+55
| | | | | | | | | | | | * Code style fixes Up phpunit to v8 New CI * Remove travis * Fix CI badge * Added php-cs-fixer action
* Packagist tag (#64)V2.0.1Bruce Wells2020-05-212-2/+2
| | | | | * $variables should be private * Add Packagist tag
* Merge pull request #63 from phpfui/neonxp-ngv2.0.0Alexander Kiryukhin2020-05-207-41/+157
|\ | | | | Update parameters and add back functions
| * Merge branch 'master' into neonxp-ngBruce Wells2020-05-203-5/+3
| |\ | |/ |/|
* | WIP: New generation (#62)Alexander Kiryukhin2020-05-2038-1909/+777
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Massive refactoring More clean structure Parsing without regular expressions * Cleanup unused imports * Fix version string for Travis * 7.1 downgrade * Fix readme
| * Null parameters allowedBruce Wells2020-05-201-1/+1
| |
| * Adding setVars back inBruce Wells2020-05-201-0/+19
| |
| * Update readme.mdBruce Wells2020-05-201-8/+10
| |
| * setDivisionByZeroIsZeroBruce Wells2020-05-202-7/+18
| |
| * Private membersBruce Wells2020-05-201-4/+90
| |
| * typed parameters and return typesBruce Wells2020-05-205-23/+23
| |
| * Merge branch 'ng' of https://github.com/neonxp/MathExecutor into neonxp-ngBruce Wells2020-05-2038-1909/+777
| |\ | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # src/NXP/Classes/Calculator.php # src/NXP/Classes/Lexer.php # src/NXP/Classes/Token/AbstractOperator.php # src/NXP/Classes/TokenFactory.php # src/NXP/MathExecutor.php
| | * Fix readmeAlexander Kiryukhin2020-05-151-2/+4
| | |
| | * 7.1 downgradeAlexander Kiryukhin2020-05-152-15/+2
| | |
| | * Fix version string for TravisAlexander Kiryukhin2020-05-151-1/+1
| | |
| | * Cleanup unused importsAlexander Kiryukhin2020-05-151-6/+0
| | |
| | * Massive refactoringAlexander Kiryukhin2020-05-1538-1904/+789
| |/ |/| | | | | | | More clean structure Parsing without regular expressions
* | Doc update (#61)Bruce Wells2020-05-141-1/+1
| | | | | | | | | | * Update documentation for PHPFUI/InstaDoc * Removing dead waffle.io links in docs
* | Negative expression start (#60)V1.1.4Bruce Wells2020-04-212-3/+10
| | | | | | | | | | * Update documentation for PHPFUI/InstaDoc * Support for negative numbers starting paren enclosed expressions
* | Update documentation for PHPFUI/InstaDoc (#58)Bruce Wells2020-04-116-18/+48
| |
| * Doc update (#61)Bruce Wells2020-05-201-1/+1
| | | | | | | | | | * Update documentation for PHPFUI/InstaDoc * Removing dead waffle.io links in docs
| * Negative expression start (#60)Bruce Wells2020-05-202-3/+10
| | | | | | | | | | * Update documentation for PHPFUI/InstaDoc * Support for negative numbers starting paren enclosed expressions
| * Update documentation for PHPFUI/InstaDocBruce Wells2020-04-106-18/+48
|/
* PHP 7.4 support (#57)V1.1.3Bruce Wells2020-02-083-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Merge in neonxp master (#9) * Version 1.1 (#51) * Update README.md and more function support * Removing phpunit symbolic link (#53) * Left bracket and minus fix (#55) * Left bracket and minus fix (#54) * Add test for left bracket and minus fix #55 * Fix substraction by zero bug (#56) Co-authored-by: franksl <info@streamlake.com> Co-authored-by: Clément Lafont <johnrazeur@gmail.com> * Docs and test updates * Update composer Co-authored-by: franksl <info@streamlake.com> Co-authored-by: Clément Lafont <johnrazeur@gmail.com>
* Merge branch 'master' into masterBruce Wells2020-02-074-7/+6
|\
| * PHP 7.4 supportBruce Wells2019-12-014-7/+6
| |
| * Update README.md and more function supportBruce Wells2019-11-274-28/+202
| |
| * Merge branch 'master' of https://github.com/neonxp/MathExecutorBruce Wells2019-11-2718-13/+526
| |\ | | | | | | | | | | | | | | | # Conflicts: # .gitignore # tests/MathTest.php
| * \ Merge branch 'master' of https://github.com/phpfui/MathExecutorBruce Wells2019-10-314-10/+3
| |\ \
| | * | Upgrading PHPUnit and dropping support for 5.6 and 7.0Bruce Wells2019-10-314-10/+3
| | | |
| | * | Subtraction fix (#46) (#8)Bruce Wells2019-10-310-0/+0
| | | | | | | | | | | | | | | | | | | | * Updated unit tests * Fixed docs * Better unary minus support
| * | | Merge branch 'master' of https://github.com/phpfui/MathExecutorBruce Wells2019-08-165-6/+39
| |\| |
| | * | Subtraction fix (#46) (#7)Bruce Wells2019-08-165-7/+50
| | | | | | | | | | | | | | | | | | | | * Updated unit tests * Fixed docs * Better unary minus support
| * | | Merge branch 'master' of https://github.com/phpfui/MathExecutorBruce Wells2019-08-167-34/+86
| |\| | | | | | | | | | | | | | | | | | # Conflicts: # src/NXP/Classes/Token/TokenFunction.php
| * | | Fixed function argument ordering and default parameter type for addFunctionBruce Wells2019-01-114-6/+14
| | | | | | | | | | | | | | | | | | | | Updated unit tests Fixed docs
* | | | Fix substraction by zero bug (#56)Clément Lafont2020-02-072-2/+21
| | | |
* | | | Left bracket and minus fix (#55)V1.1.2Clément Lafont2020-01-132-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | * Left bracket and minus fix (#54) * Add test for left bracket and minus fix #55
* | | | Removing phpunit symbolic link (#53)V1.1.1franksl2020-01-091-1/+0
| | | |
* | | | Version 1.1 (#51)V1.1.0Bruce Wells2019-11-274-28/+202
| |_|/ |/| | | | | | | | * Update README.md and more function support
* | | TokenFactory: allowing multicharacter tokens (#49)franksl2019-11-260-0/+0
| | |
* | | Logicandcompare (#50)franksl2019-11-2617-13/+520
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * TokenFactory: allowing multicharacter tokens * Added logical and compare operators: <, <=, >, >=, ==, !=, ||, && * Fixed operator priorities * Error messages fixes * Fixed operators priority The priorities are assigned by following the php language standard (https://www.php.net/manual/en/language.operators.precedence.php) I've assigned precedence in steps of 10 units by following the linked page: 230 clone new 220 ** 210 ++ -- ~ (int) (float) (string) (array) (object) (bool) @ 200 instanceof 190 ! 180 * / % 170 + - . 160 << >> 150 < <= > >= 140 == != === !== <> <=> 130 & 120 ^ 110 | 100 && 90 || 80 ?? 70 ? : 60 = += -= *= **= /= .= %= &= |= ^= <<= >>= 50 yield from 40 yield 30 and 20 xor 10 or * Added if() function * Cache key fix There are cases where the cache key creation raised an error, for example while evaluating the expression "if(cos(2), cos(2), 0)", because the if() function was passing a float to the MathExecutor:execute() method.
* | | Upgrading to PHP 7.1 (#48)V1.0.0Bruce Wells2019-10-313-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Subtraction fix (#46) (#7) * Updated unit tests * Fixed docs * Better unary minus support * Subtraction fix (#46) (#8) * Updated unit tests * Fixed docs * Better unary minus support * Upgrading PHPUnit and dropping support for 5.6 and 7.0
* | | Subtraction fix (#46)v0.8.0Bruce Wells2019-08-165-7/+50
| | | | | | | | | | | | | | | * Updated unit tests * Fixed docs * Better unary minus support
* | | Merge pull request #44 from phpfui/masterv0.7.2Alexander Kiryukhin2019-01-165-26/+70
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | * Fixed comma operator Added unit tests for expressions in function arguments. Changed array_push to $var[] = native code. * Fixed merge error * Fixed typo in constant