-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Intl] Cleanup #31366
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Intl] Cleanup #31366
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -13,7 +13,6 @@ | |||||
|
||||||
use Symfony\Component\Intl\Data\Bundle\Reader\BundleEntryReaderInterface; | ||||||
use Symfony\Component\Intl\Exception\MissingResourceException; | ||||||
use Symfony\Component\Intl\Locale; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Erm... are you sure about this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep :) symfony/src/Symfony/Component/Intl/ResourceBundle/CurrencyBundleInterface.php Lines 25 to 26 in 70a941e
updated as such below it's a tiny improvement, but worth clarifying IMHO to rely on the root
This internal, first citizent, |
||||||
|
||||||
/** | ||||||
* Data provider for currency-related data. | ||||||
|
@@ -53,7 +52,7 @@ public function getCurrencies() | |||||
public function getSymbol($currency, $displayLocale = null) | ||||||
{ | ||||||
if (null === $displayLocale) { | ||||||
$displayLocale = Locale::getDefault(); | ||||||
$displayLocale = \Locale::getDefault(); | ||||||
} | ||||||
|
||||||
return $this->reader->readEntry($this->path, $displayLocale, ['Names', $currency, static::INDEX_SYMBOL]); | ||||||
|
@@ -62,7 +61,7 @@ public function getSymbol($currency, $displayLocale = null) | |||||
public function getName($currency, $displayLocale = null) | ||||||
{ | ||||||
if (null === $displayLocale) { | ||||||
$displayLocale = Locale::getDefault(); | ||||||
$displayLocale = \Locale::getDefault(); | ||||||
} | ||||||
|
||||||
return $this->reader->readEntry($this->path, $displayLocale, ['Names', $currency, static::INDEX_NAME]); | ||||||
|
@@ -71,7 +70,7 @@ public function getName($currency, $displayLocale = null) | |||||
public function getNames($displayLocale = null) | ||||||
{ | ||||||
if (null === $displayLocale) { | ||||||
$displayLocale = Locale::getDefault(); | ||||||
$displayLocale = \Locale::getDefault(); | ||||||
} | ||||||
|
||||||
// ==================================================================== | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what's the point of this. Constants were self explanatory, now we need a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maintaining the consts is an extra task, not worth it IMHO. i didnt follow it for languages also.
feel free to ignore :) but it reduces noise and makes adding entries more straightforward (the consts are only used here; it's not real API needed)