1
0
Fork 0
mirror of https://github.com/archtechx/money.git synced 2025-12-12 03:14:03 +00:00

text: exception message and docblock updates

This commit is contained in:
Gaurav 2022-04-05 09:49:36 +05:30
parent 34740e66a6
commit 5952ace37e
3 changed files with 12 additions and 6 deletions

View file

@ -180,11 +180,11 @@ $fromFormatted = Money::fromFormatted($formatted);
$fromFormatted->is($money); // true
```
Optional overrides for the [currency specification](#currency-logic) are accepted too.
If you had passed overrides while [formatting the money instance](#formatting-money), the same can passed to this method.
```php
$money = money(1000);
$formatted = $money->formatted(); // $10.00
$fromFormatted = Money::fromFormatted($formatted, USD::class, ['decimalSeparator' => ',', 'prefix' => '$ ', 'suffix' => ' USD']);
$formatted = $money->formatted(['prefix' => '$ ', 'suffix' => ' USD']); // $ 10.00 USD
$fromFormatted = Money::fromFormatted($formatted, USD::class, ['prefix' => '$ ', 'suffix' => ' USD']);
$fromFormatted->is($money); // true
```