Commit graph

51 commits

Author SHA1 Message Date
Mathijs
d9daabf40d
Update README.md (#132)
Fix typo Paretheses -> Parentheses
2023-11-20 16:19:47 -05:00
Bruce Wells
ad839b7858
Document all functions in readme (#127)
* Correct average typo

* Update to PHP CS FIxer V3.21

* Update available functions
2023-07-12 13:27:48 -04:00
Bruce Wells
2a65673cae
Composer updates (#126)
* Correct average typo

* Update to PHP CS FIxer V3.21
2023-07-10 16:36:57 -04:00
Fatih Kızmaz
3a18c7d47f
Added Not(!) logical operator and median function with tests. (#121) 2022-12-26 10:35:27 -05:00
Bruce Wells
7704ba918f
Drop php74 (#120)
* PHPStan Level 6

* Drop PHP 7.4 support

* Add PHPStan badge to readme

* Code style cleanup
2022-12-21 18:52:18 -05:00
Bruce Wells
08b432e09d
Update README.md 2022-06-02 10:40:00 -04:00
Bruce Wells
a944fe4e56
Bcmath (#115)
* Add useBCMath

* Support for % operator (mod)
2022-06-01 18:11:51 -04:00
Bruce Wells
d1b060749e
Update readme with non redundant example (concat) (#111) 2022-05-21 13:38:58 -04:00
Fatih Kızmaz
3e6700d157
Added ability to escape quotes in strings. (#110)
* Added ability to escape quotes in strings.

* Removed type checking for customfunc arguments. It was a bad idea to check types, because php automatically tries to convert a parameter to required type and throws if it failures. On the other hand, we can check types also in callables if required.

* Update phpdoc

* Fix some typos + improve min, max, avg funcs.

* Update readme + improvements.

* Fix a typo in sample.

* Fix unshown backslash in readme.
2022-05-18 22:03:44 -04:00
Bruce Wells
f71b77a62e
Update README.md
Support for variable number of function parameters
2022-05-16 18:28:53 -04:00
Bruce Wells
ddf9dbfe0f
Release Prep (#109) 2022-05-16 18:18:37 -04:00
Fatih Kızmaz
5d6b4a5dfd
Full support for arrays => min, max and avg funcs accept array argument. Also array function is defined which return arguments as array. Square bracket arrays are also supported. (#108)
valid expression -> "max([1,2,3])"
valid expression -> "max(array(1,2,3))"
valid expression -> "max($ages_arr)"
valid expression -> "max(ages_arr())"
2022-05-16 17:57:37 -04:00
Bruce Wells
c396a882ff
Prep for V2.2.0 release (#99) 2022-04-26 16:14:59 -04:00
Bruce Wells
aa37abbaeb
Release prep (#86) 2021-03-04 20:08:57 -05: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
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
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
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
7343f2c9c4 Update readme.md 2020-05-19 22:37:16 -04:00
Alexander Kiryukhin
11ea95cb21 Fix readme 2020-05-15 22:04:57 +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
7198653aef
Update documentation for PHPFUI/InstaDoc (#58) 2020-04-10 20:40:21 -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
Bruce Wells
2db48eff95 PHP 7.4 support 2019-11-30 18:47:04 -05:00
Bruce Wells
84f3f967b7 Update README.md and more function support 2019-11-27 12:33:50 -05:00
Bruce Wells
ce50015732
Subtraction fix (#46)
* Updated unit tests
* Fixed docs
* Better unary minus support
2019-08-16 10:27:44 -04:00
Bruce Wells
816c112fcd Fixed function parameter order (#42)
* Fixed parsing for ()

* sync (#5)

* Documentation fixes (#34)

Fixing typos in and clarifying documentation.

* MathExecutor allow override default operators, functions and vars (#36)

* Added simple coc (#37)

* Added simple coc

* Fix

* Replaceable operators (#38)

* Updated from NeonXP/MathExecutor

* Fixed function in () block issue

* Fixing typos in and clarifying documentation.

* Syncing from origin (#3)

* Documentation fixes (#34)

Fixing typos in and clarifying documentation.

* MathExecutor allow override default operators, functions and vars (#36)

* Allow for operators to be replaced based on regex expression

* Fix md typo (#39)

* Updated from NeonXP/MathExecutor

* Fixed function in () block issue

* Fixing typos in and clarifying documentation.

* Syncing from origin (#3)

* Documentation fixes (#34)

Fixing typos in and clarifying documentation.

* MathExecutor allow override default operators, functions and vars (#36)

* Syncing to origin (#4)

* Documentation fixes (#34)

Fixing typos in and clarifying documentation.

* MathExecutor allow override default operators, functions and vars (#36)

* Added simple coc (#37)

* Added simple coc

* Fix

* Replaceable operators (#38)

* Updated from NeonXP/MathExecutor

* Fixed function in () block issue

* Fixing typos in and clarifying documentation.

* Syncing from origin (#3)

* Documentation fixes (#34)

Fixing typos in and clarifying documentation.

* MathExecutor allow override default operators, functions and vars (#36)

* Allow for operators to be replaced based on regex expression

* \\ instead of \

* Update README.md

Some small fixes

* Fix single quotes parsing (#41)

* Fix single quotes parsing
Fix e-mails
Some small fixes

* Mistake in test

* More PHP versions

* Update README.md

Deleted `dev` branch

* Fixed function parameter order

Corrected $places default value for addFunction to match TokenFactory
Added function order test and put expected order first in assertEquals
If else blocks in calculator
Updated docs
2019-01-12 16:23:25 +03:00
Alexander Kiryukhin
0adcdeeb1b
Update README.md
Deleted `dev` branch
2019-01-11 03:44:46 +03:00
Alexander Kiryukhin
bf6204aea7
Update README.md
Some small fixes
2019-01-11 02:15:26 +03:00
Bruce Wells
790827ff45
Fix md typo (#39)
* Updated from NeonXP/MathExecutor

* Fixed function in () block issue

* Fixing typos in and clarifying documentation.

* Syncing from origin (#3)

* Documentation fixes (#34)

Fixing typos in and clarifying documentation.

* MathExecutor allow override default operators, functions and vars (#36)

* Syncing to origin (#4)

* Documentation fixes (#34)

Fixing typos in and clarifying documentation.

* MathExecutor allow override default operators, functions and vars (#36)

* Added simple coc (#37)

* Added simple coc

* Fix

* Replaceable operators (#38)

* Updated from NeonXP/MathExecutor

* Fixed function in () block issue

* Fixing typos in and clarifying documentation.

* Syncing from origin (#3)

* Documentation fixes (#34)

Fixing typos in and clarifying documentation.

* MathExecutor allow override default operators, functions and vars (#36)

* Allow for operators to be replaced based on regex expression

* \\ instead of \
2019-01-10 13:53:34 -05:00
Bruce Wells
1323063132 Replaceable operators (#38)
* Updated from NeonXP/MathExecutor

* Fixed function in () block issue

* Fixing typos in and clarifying documentation.

* Syncing from origin (#3)

* Documentation fixes (#34)

Fixing typos in and clarifying documentation.

* MathExecutor allow override default operators, functions and vars (#36)

* Allow for operators to be replaced based on regex expression
2019-01-10 21:35:39 +03:00
Bruce Wells
e8ede3d6a5
Documentation fixes (#34)
Fixing typos in and clarifying documentation.
2018-12-19 16:07:24 -05:00
Bruce Wells
d50b665927
Fixed Lexor to correctly generate reverse polish notation (#33)
* Updated from NeonXP/MathExecutor

* Fixed function in () block issue
2018-11-26 10:06:26 -05:00
Bruce Wells
f0d4562b9e Division By Zero Exception support
Updated the documentation.
Unit tests for strings.
DivisionByZeroException support.
2018-10-31 09:35:40 -04:00
Alexander Kiryukhin
3011a1c556
Merge branch 'master' into getters_for_function_and_operators 2018-09-06 20:39:47 +03:00
Making GitHub Delicious.
e0eb2d9586 add waffle.io badge 2015-09-29 06:42:26 -06:00
Alexander Kiryukhin
ec9e067421 Update README.md 2013-09-06 17:33:47 +04:00
NeonXP
e3bac0c101 ~Change readme 2013-09-06 17:30:48 +04:00
Alexander Kiryukhin
10c04a966f Update README.md 2013-09-06 08:35:55 +04:00
Alexander Kiryukhin
591b8b61c9 Update README.md 2013-09-06 08:32:03 +04:00
Alexander Kiryukhin
74cb31c8be Update README.md 2013-09-06 08:26:53 +04:00
NeonXP
9cef8dbc79 + Added cache, which speeds up the repetitive calculations
+ Returned variables, because they need for cached expressions
2013-09-06 08:19:02 +04:00
NeonXP
9cdc34290a Mass refactoring
Some changes:
+ Added support of functions with multiple arguments
+ Added some default function (min, max, avg). just example of multiple arguments :)
- Removed variables support (I think they pointless)
~ All tokens now in individual classes
~ Parsing based on regular expressions
~ Fix negative numbers
~ Fix grouping with brackets
2013-09-06 05:42:09 +04:00
zhukv
eb9c365161 Fix to PSR standart, fix tokenizer, fix function executor. 2013-08-03 13:47:47 +03:00
Alexander Kiryukhin
2df6097e80 Update README.md 2013-03-14 04:36:29 +04:00
Alexander Kiryukhin
d26b482b85 Update README.md 2013-03-14 04:36:17 +04:00