rmunate / SpellNumber

🔢 Convert Numbers to Words Effortlessly in Laravel! 🌟🔠 Say goodbye to complex coding! This ingenious library, seamlessly integrated with the native PHP INTL extension, empowers you to effortlessly transform numbers into words within your Laravel projects. 🚀📊
https://rmunate.github.io/SpellNumber/
288 stars 43 forks source link

Add Persian and some few changes #2

Closed sirosfakhri closed 1 year ago

sirosfakhri commented 1 year ago

1: Add Persian to the List of supported languages.

SpellNumber::value(100)->locale('fa')->toLetters();
//صد

SpellNumber::value(100)->locale('fa')->currency('تومان')->toMoney();
//صد تومان

2: Remove PHP 7.4 since this is only usable for PHP 8.0 and higher. since match is required PHP 8.0 and higher and is used in the files, So, I removed PHP 7.4 from composer.json because this will throw error in PHP < 8.0

3: add return type for methods.

4: rename method validateMaximun to validateMaximum and replace it in all files. there was a method with validateMaximun name and I assume this was unwanted, so I renamed to validateMaximum

rmunate commented 1 year ago

Hello, thanks for the contribution, due to the support of the PHP versions of these changes, after combining them, it should launch the 3.X version, I will take your example of use to add it to the manual. I appreciate you can review after combining that the operation is adequate, to avoid unexpected bugs.

sirosfakhri commented 1 year ago

Hi, well, I just checked version 3 and I didn't encounter any unexpected bugs or exceptions. I'm using this package and if in the future encounter any bug, I'll make PR. for now, it seems like this works like a charm.