1
0
Fork 0
mirror of https://github.com/archtechx/money.git synced 2025-12-12 19:34:02 +00:00
Commit graph

23 commits

Author SHA1 Message Date
e30211058a phpstan fixes 2025-03-11 17:26:54 +01:00
b642e32a4b Resolve PHP 8.4 deprecations (fix #24) 2024-12-29 03:10:59 +01:00
Samuel Štancl
9ea102297d
change default rate to a float value 2023-03-24 23:09:45 +01:00
lukinovec
b50e49358a
Add L10 support (#20)
* Add L10 support

* Upgrade phpstan

* Set `archtechx/helpers` version

* Fix PHPStan errors

* Try using older PHPStan version

* Revert PHPStan downgrade

* Delete immutability tests

* Bring back immutability tests

* Correct typehint

* Update immutability tests

* Remove L8 support

* Allow PHP 8.0, run tests for 8.0 as well

* Swap Laravel 9 & 10

* Add setup-php step

* Revert formatting changes

* Fix formatting

* Revert adding setup-php

* Try adding setup-php

* Change formatting

* Remove PHP 8.0

* Fix formatting
2023-02-16 17:06:45 +01:00
PHP CS Fixer
2021b13092 Fix code style (php-cs-fixer) 2022-05-16 11:12:34 +00:00
David Andersson
269274586a
Fixes #11 - Remove trailing zeros from formatted price (#18)
* Remove trailing zeros from formatted price

* Add setting for how to handle trailing decimal zeros

* Write tests

* Fix code style

* Rewrite function description

* Change test name

* Add empty line at end of file

* rename deleteTrailingDecimalZeros to trimTrailingDecimalZeros

* Fix grammar

* Remove unnecessary parameter declarations

* fix test name

* fix comment grammar

* fix docblock grammar

Co-authored-by: Samuel Štancl <samuel@archte.ch>
2022-05-16 13:12:13 +02:00
Gaurav
5952ace37e text: exception message and docblock updates 2022-04-05 09:49:36 +05:30
Gaurav
34740e66a6 fix: import exception 2022-03-31 10:09:40 +05:30
Gaurav
d6cb1ba6ae update: add dedicated exception class 2022-03-15 17:03:57 +05:30
Gaurav
a8d32a0be8 fix: no more currency guessing 2022-03-10 11:45:39 +05:30
Gaurav
93aeb2c300 feat: extract currency from the formatted string 2022-03-10 11:39:53 +05:30
PHP CS Fixer
fa337d29b4 Fix code style (php-cs-fixer) 2022-03-09 07:37:04 +00:00
Gaurav
2329dcf790 Merge branch 'from_string_implementation' of github.com:gauravmak/money into from_string_implementation 2022-03-09 13:06:45 +05:30
Gaurav
77bec6ed02 fix: make PHPStan happy by protecting against some rare scenarios 2022-03-09 13:06:40 +05:30
PHP CS Fixer
01fd16f71b Fix code style (php-cs-fixer) 2022-03-09 07:20:34 +00:00
Gaurav
38c6326a4d feature: money instance creation from a formatted string 2022-03-09 12:50:04 +05:30
Gaurav
8bdf0d1a2b refactor: improve code readability 2022-03-09 12:49:00 +05:30
Mikael Dalholm
356aad9cc6 Divide rate with 100
Needed for the calculation to be correct according to the documentation. `$money->addTax(20)` and not `$money->addTax(0.2)`
2021-12-28 11:45:02 +01:00
Samuel Štancl
8ca21240df
Make new() public 2021-12-13 01:18:37 +01:00
Samuel Štancl
c6ef5aa54c addDecimal() and subtractDecimal() 2021-11-28 18:47:59 +01:00
Samuel Štancl
f5bf658155 cents() method 2021-11-28 18:38:54 +01:00
Samuel Štancl
efe697b051 Add function_exists() checks 2021-11-16 19:47:37 +01:00
Samuel Štancl
8847454577 Initial commit 2021-11-16 19:06:57 +01:00