Commit graph

159 commits

Author SHA1 Message Date
Bruce Wells
aa37abbaeb
Release prep (#86) 2021-03-04 20:08:57 -05:00
Bruce Wells
16dde01158
Merge branch 'master' into master 2021-03-04 19:47:04 -05:00
Javier Marín
d99491c1f4
Support for unary positive expressions (#85)
* Support for unary positive operator
2021-03-04 19:42:01 -05:00
Bruce Wells
17cc5b9dc4
Unary Minus (#84)
Fixed unary minus to allow a minus sign in front of functions and parentheses.
2021-02-16 22:13:44 -05:00
Chun-Sheng, Li
936ee5caca
Improve autoloading, asssertions and CI trigger (#79) 2021-01-05 19:07:33 -05:00
Mirosław Sztorc
2f043ba2b2
CI - new workflow for GitHub actions (#82)
* php>=7.2

* CI workflow - added php matrix
2021-01-05 19:07:15 -05:00
Mirosław Sztorc
a4b0fac121
Cache-control improvements (#81)
* cache-control improvements

* Update src/NXP/MathExecutor.php

yeah, you're right.

Co-authored-by: Alexander Kiryukhin <a.kiryukhin@mail.ru>

* Update MathExecutor.php

braces qfix

* Update MathExecutor.php

Co-authored-by: Alexander Kiryukhin <a.kiryukhin@mail.ru>
2021-01-05 19:06:04 -05:00
Bruce Wells
5ed72fda6f
PHPUnit 8 or higher for PHP 8.0 support (#78) 2020-11-28 11:50:32 -05:00
Bruce Wells
761ac50344
Additional tests Hacktoberfest (#77)
* Additional tests

Co-authored-by: diman3210 <diman-3210@mail.ru>
2020-10-19 19:25:48 -04:00
diman3210
e28c1bf9e7
add new functions and aliases to the old functions (#76)
* add new functions and aliases to the old functions

* add tests for new functions
2020-10-19 18:48:30 -04:00
Bruce Wells
d9eb39e38d
Improved unit tests (#74)
* Variable fixes (#67)

* Reproduce if throws UnknownOperatorException

* Fix variable detection

* Adding IncorrectNumberOfFunctionParametersException

* Removing tabs

* Better exception message text

* Handler for not found variables (#68)

* 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

* Release prep (#69)

* String comparison unit tests

* getVars and getFunctions sanity checks

* Add dynamic variable documentation

* Better setVar error message (#70)

Additional unit tests
Readme update

* Improved support for null variables (#72)

* 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 (#73)

* 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

* Better unit testing

Co-authored-by: Javier Marín <javier@marinros.com>
2020-09-15 21:27:43 -04:00
Bruce Wells
c20f18d7a3
Merge branch 'master' into master 2020-09-15 21:27:15 -04:00
Bruce Wells
71eda0b535 Better unit testing 2020-09-15 21:24:02 -04:00
Javier Marín
80726f2bd5 Allow null values in setVar method (#73)
* 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
2020-09-15 21:14:44 -04:00
Javier Marín
8fc77e54e0 Improved support for null variables (#72)
* 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
2020-09-15 21:14:44 -04:00
Bruce Wells
8a2cae984f Better setVar error message (#70)
Additional unit tests
Readme update
2020-09-15 21:14:44 -04:00
Bruce Wells
92d1a4524b Release prep (#69)
* String comparison unit tests

* getVars and getFunctions sanity checks

* Add dynamic variable documentation
2020-09-15 21:14:44 -04:00
Javier Marín
462d6e4ddc Handler for not found variables (#68)
* 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
2020-09-15 21:14:44 -04:00
Bruce Wells
a0e0f405a9 Variable fixes (#67)
* Reproduce if throws UnknownOperatorException

* Fix variable detection

* Adding IncorrectNumberOfFunctionParametersException

* Removing tabs

* Better exception message text
2020-09-15 21:14:44 -04:00
Javier Marín
8aa6674831
Allow null values in setVar method (#73)
* 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
2020-09-15 21:08:14 -04:00
Javier Marín
f8faf3fa8d
Improved support for null variables (#72)
* 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
2020-09-14 20:47:26 -04:00
Bruce Wells
44d72cc252
Better setVar error message (#70)
Additional unit tests
Readme update
2020-07-27 12:25:59 -04:00
Bruce Wells
b38893d672
Release prep (#69)
* String comparison unit tests

* getVars and getFunctions sanity checks

* Add dynamic variable documentation
2020-07-26 22:14:51 -04:00
Javier Marín
c1e07f254a
Handler for not found variables (#68)
* 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
2020-07-25 22:27:26 -04:00
Bruce Wells
aa8ffe19f2
Variable fixes (#67)
* Reproduce if throws UnknownOperatorException

* Fix variable detection

* Adding IncorrectNumberOfFunctionParametersException

* Removing tabs

* Better exception message text
2020-06-04 11:43:16 -04:00
Bruce Wells
333a52e9aa
Merge pull request #4 from neonxp/master
Latest from master
2020-06-03 09:59:55 -04:00
Alexander Kiryukhin
ea898d7a7b
Code style fixes & Github Actions (#65)
* Code style fixes

Up phpunit to v8
New CI

* Remove travis

* Fix CI badge

* Added php-cs-fixer action
2020-05-31 20:50:39 -04:00
Bruce Wells
7852fc7d04
Packagist tag (#64)
* $variables should be private

* Add Packagist tag
2020-05-21 14:45:25 -04:00
Alexander Kiryukhin
913cf0a1e8
Merge pull request #63 from phpfui/neonxp-ng
Update parameters and add back functions
2020-05-20 22:26:59 +03:00
Bruce Wells
2c18fbb245
Merge branch 'master' into neonxp-ng 2020-05-19 23:16:13 -04:00
Alexander Kiryukhin
949334d6c3
WIP: New generation (#62)
* Massive refactoring

More clean structure
Parsing without regular expressions

* Cleanup unused imports

* Fix version string for Travis

* 7.1 downgrade

* Fix readme
2020-05-19 23:04:31 -04:00
Bruce Wells
d195b3e909 Null parameters allowed 2020-05-19 23:00:10 -04:00
Bruce Wells
a621ea01c0 Adding setVars back in 2020-05-19 22:59:30 -04:00
Bruce Wells
7343f2c9c4 Update readme.md 2020-05-19 22:37:16 -04:00
Bruce Wells
b95ab24f36 setDivisionByZeroIsZero 2020-05-19 22:36:55 -04:00
Bruce Wells
ab3a44b330 Private members 2020-05-19 22:36:08 -04:00
Bruce Wells
1bb9f61423 typed parameters and return types 2020-05-19 22:17:03 -04:00
Bruce Wells
906021d27c Merge branch 'ng' of https://github.com/neonxp/MathExecutor into neonxp-ng
# 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
2020-05-19 21:37:04 -04:00
Bruce Wells
f284316053 Doc update (#61)
* Update documentation for PHPFUI/InstaDoc

* Removing dead waffle.io links in docs
2020-05-19 21:31:46 -04:00
Bruce Wells
47ec659546 Negative expression start (#60)
* Update documentation for PHPFUI/InstaDoc

* Support for negative numbers starting paren enclosed expressions
2020-05-19 21:31:46 -04:00
Alexander Kiryukhin
11ea95cb21 Fix readme 2020-05-15 22:04:57 +03:00
Alexander Kiryukhin
b74742641f 7.1 downgrade 2020-05-15 22:02:52 +03:00
Alexander Kiryukhin
e6f35cd802 Fix version string for Travis 2020-05-15 21:58:38 +03:00
Alexander Kiryukhin
043058f3c7 Cleanup unused imports 2020-05-15 21:52:35 +03:00
Alexander Kiryukhin
cab8e2d38a Massive refactoring
More clean structure
Parsing without regular expressions
2020-05-15 21:51:23 +03:00
Bruce Wells
01415abc9d
Doc update (#61)
* Update documentation for PHPFUI/InstaDoc

* Removing dead waffle.io links in docs
2020-05-14 00:22:11 -04:00
Bruce Wells
4d50343330
Negative expression start (#60)
* Update documentation for PHPFUI/InstaDoc

* Support for negative numbers starting paren enclosed expressions
2020-04-21 11:12:55 -04:00
Bruce Wells
7198653aef
Update documentation for PHPFUI/InstaDoc (#58) 2020-04-10 20:40:21 -04:00
Bruce Wells
e7add2d36d Update documentation for PHPFUI/InstaDoc 2020-04-09 22:22:37 -04:00
Bruce Wells
4955c639e1
PHP 7.4 support (#57)
* 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>
2020-02-07 17:45:33 -05:00