Commaaa2
This commit is contained in:
@@ -23,9 +23,6 @@ use Symfony\Component\Translation\MessageCatalogue;
|
||||
*/
|
||||
class IcuResFileLoader implements LoaderInterface
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function load(mixed $resource, string $locale, string $domain = 'messages'): MessageCatalogue
|
||||
{
|
||||
if (!stream_is_local($resource)) {
|
||||
@@ -38,7 +35,7 @@ class IcuResFileLoader implements LoaderInterface
|
||||
|
||||
try {
|
||||
$rb = new \ResourceBundle($locale, $resource);
|
||||
} catch (\Exception $e) {
|
||||
} catch (\Exception) {
|
||||
$rb = null;
|
||||
}
|
||||
|
||||
@@ -71,9 +68,9 @@ class IcuResFileLoader implements LoaderInterface
|
||||
*
|
||||
* @param \ResourceBundle $rb The ResourceBundle that will be flattened
|
||||
* @param array $messages Used internally for recursive calls
|
||||
* @param string $path Current path being parsed, used internally for recursive calls
|
||||
* @param string|null $path Current path being parsed, used internally for recursive calls
|
||||
*/
|
||||
protected function flatten(\ResourceBundle $rb, array &$messages = [], string $path = null): array
|
||||
protected function flatten(\ResourceBundle $rb, array &$messages = [], ?string $path = null): array
|
||||
{
|
||||
foreach ($rb as $key => $value) {
|
||||
$nodePath = $path ? $path.'.'.$key : $key;
|
||||
|
||||
Reference in New Issue
Block a user