Fix return statements
MODIFY
Data/Generator/LocaleDataGenerator.php
Data/Generator/LocaleDataGenerator.php
@@ -72,7 +72,7 @@ class LocaleDataGenerator extends AbstractDataGenerator
// Don't generate aliases, as they are resolved during runtime
// Unless an alias is needed as fallback for de-duplication purposes
if (isset($this->localeAliases[$displayLocale]) && !$this->generatingFallback) {
- return;
+ return null;
}
// Generate locale names for all locales that have translations in
@@ -117,7 +117,7 @@ class LocaleDataGenerator extends AbstractDataGenerator
$data['Names'] = array_diff($data['Names'], $fallbackData['Names']);
}
if (!$data['Names']) {
- return;
+ return null;
}
return $data;

MODIFY
ResourceBundle/CurrencyBundle.php
ResourceBundle/CurrencyBundle.php
@@ -49,7 +49,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter
try {
return $this->getSymbol($currency, $displayLocale);
} catch (MissingResourceException $e) {
- return;
+ return null;
}
}
@@ -61,7 +61,7 @@ class CurrencyBundle extends CurrencyDataProvider implements CurrencyBundleInter
try {
return $this->getName($currency, $displayLocale);
} catch (MissingResourceException $e) {
- return;
+ return null;
}
}

MODIFY
ResourceBundle/LanguageBundle.php
ResourceBundle/LanguageBundle.php
@@ -62,7 +62,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter
try {
return $this->getName($language, $displayLocale);
} catch (MissingResourceException $e) {
- return;
+ return null;
}
}
@@ -86,7 +86,7 @@ class LanguageBundle extends LanguageDataProvider implements LanguageBundleInter
try {
return $this->scriptProvider->getName($script, $displayLocale);
} catch (MissingResourceException $e) {
- return;
+ return null;
}
}

MODIFY
ResourceBundle/LocaleBundle.php
ResourceBundle/LocaleBundle.php
@@ -43,7 +43,7 @@ class LocaleBundle extends LocaleDataProvider implements LocaleBundleInterface
try {
return $this->getName($locale, $displayLocale);
} catch (MissingResourceException $e) {
- return;
+ return null;
}
}

MODIFY
ResourceBundle/RegionBundle.php
ResourceBundle/RegionBundle.php
@@ -49,7 +49,7 @@ class RegionBundle extends RegionDataProvider implements RegionBundleInterface
try {
return $this->getName($country, $displayLocale);
} catch (MissingResourceException $e) {
- return;
+ return null;
}
}

MODIFY
Util/Version.php
Util/Version.php
@@ -83,7 +83,7 @@ class Version
}
if (!preg_match('/^'.$pattern.'/', $version, $matches)) {
- return;
+ return null;
}
return $matches[0];

Fix return statements