@@ -314,9 +314,7 @@ to catching the exception, you can also check if a given currency code is valid:
314
314
If the currencies need to be filtered, there are also helpers to query and
315
315
validate currencies in relation to countries. These methods use ICU metadata
316
316
(``tender ``, ``from `` and ``to `` dates) to determine whether a currency is
317
- `legal tender `_ and/or active at a given point in time.
318
-
319
- .. code-block :: php
317
+ `legal tender `_ and/or active at a given point in time::
320
318
321
319
use Symfony\Component\Intl\Currencies;
322
320
@@ -335,7 +333,7 @@ validate currencies in relation to countries. These methods use ICU metadata
335
333
336
334
// Validate a currency for a given country
337
335
$isOk = Currencies::isValidInCountry('CH', 'CHF');
338
- // true
336
+ // true
339
337
340
338
// Check if a currency is valid in *any* country on a specific date
341
339
$isGlobal = Currencies::isValidInAnyCountry(
@@ -346,9 +344,9 @@ validate currencies in relation to countries. These methods use ICU metadata
346
344
);
347
345
// true
348
346
349
- Note that some currencies (especially non-legal-tender ones) do not have validity ranges defined.
350
- In such cases, a :class: `\ R untimeException ` will be thrown.
351
- In addition, an :class: `\ I nvalidArgumentException ` will be thrown if the specified currency is invalid.
347
+ Note that some currencies (especially non-legal-tender ones) do not have validity ranges defined.
348
+ In such cases, a :class: `RuntimeException ` will be thrown.
349
+ In addition, an :class: `InvalidArgumentException ` will be thrown if the specified currency is invalid.
352
350
353
351
.. _component-intl-timezones :
354
352
0 commit comments