27 Commits

Author SHA1 Message Date
James Cole 7eaa0e16b3 Run phpcs locally to make sure phpstan stays fixed. [skip ci] 2025-01-04 07:39:16 +01:00
James Cole 7f6c03ce17 Fix phpstan issues. 2025-01-03 15:04:15 +01:00
James Cole 64ec0cf62e Code cleanup. 2023-12-20 19:35:52 +01:00
James Cole e421b29b01 Clean up code and comments. 2023-02-22 18:14:14 +01:00
James Cole 927d607b1a Remove code coverage ignore instructions 2023-02-12 07:15:06 +01:00
James Cole 6cfdc58cb1 Various PSR12 code cleanup 2022-12-29 19:42:26 +01:00
Hosh Sadiq 14dd185717 Use php-intl to format currencies
Currently the php function `number_format` is used to format currencies.
This is problematic as we have to figure out different things for
different currencies ourselves. These formats are determined based on
the libc's locale functions.

The issue arises where an OS doesn't have the proper locales installed,
or, in some cases, it's not supported (see below on multiple issues).

This addresses this issue by using the php-intl extensions to format the
numbers based on the locale. The extension is already a requirement in
`composer.json`. The solution does not rely on `LC_MONETARY` from the
underlying libc (which in Alpine Linux's case, which uses musl, is not
supported as of yet).

List of issues that are related and would potentially be fixed using
this PR:

- #2298
- #2946
- #3070
- #3306
- #3519
2020-07-19 18:34:39 +01:00
James Cole 4958f6e4a6 Update email address. 2020-02-16 13:56:52 +01:00
James Cole 92158e52ef Update copyright of Firefly III to the GNU Affero General Public License as suggested by @nxxxse in #2607. This applies to all code in this commit from this moment onwards. 2019-10-02 06:37:26 +02:00
James Cole e491dda229 Currencies can now be enabled and disabled. 2018-11-10 10:04:46 +01:00
James Cole ac8776aea4 Add annotated methods. 2018-07-15 10:00:08 +02:00
James Cole 5dad569d62 Add some method annotators, see if this helps with Scrutinizer issues. 2018-07-14 23:04:05 +02:00
James Cole a3ec741d67 Updated code coverage, improved binder code. 2017-12-25 09:44:46 +01:00
James Cole 1f6e42afd9 Update copyright [skip ci] 2017-12-17 14:44:05 +01:00
James Cole ffca858b8d Code clean up. 2017-11-15 12:25:49 +01:00
James Cole 649dca77f5 Code clean up. 2017-11-15 10:52:29 +01:00
James Cole ac461d64a8 New copyright notice. 2017-10-21 08:40:00 +02:00
James Cole 595596d73f Apparently this is changed in PHPStorm’s formatting templates so there you go [skip ci]. 2017-04-09 07:44:22 +02:00
James Cole b355c18e0c Some code cleanup and copyright cleanup. [skip ci] 2016-10-05 06:52:15 +02:00
James Cole 5c7df5c04d Copyright notices. [skip ci]
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
2016-05-20 12:41:23 +02:00
James Cole c8440af9a5 PHP7 compatible function definitions. 2016-04-06 09:27:45 +02:00
James Cole 466067bd95 Added PHP7 return type statements. 2016-02-06 10:11:06 +01:00
James Cole 8f7f263a48 Declare strict type. 2016-02-05 12:08:25 +01:00
James Cole 822044820e Ignored more files. 2015-05-10 08:26:42 +02:00
James Cole afb47eb742 Add newlines. 2015-03-29 08:14:32 +02:00
James Cole 7785ec0222 Code cleanup. 2015-02-11 07:35:10 +01:00
James Cole 37e58ac13a Fixed more of the index. 2015-02-07 06:49:24 +01:00