Skip to content

Commit 48860ce

Browse files
Fix return statements
1 parent 42b23f7 commit 48860ce

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

Data/Generator/LocaleDataGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, $te
7272
// Don't generate aliases, as they are resolved during runtime
7373
// Unless an alias is needed as fallback for de-duplication purposes
7474
if (isset($this->localeAliases[$displayLocale]) && !$this->generatingFallback) {
75-
return;
75+
return null;
7676
}
7777

7878
// Generate locale names for all locales that have translations in
@@ -117,7 +117,7 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, $te
117117
$data['Names'] = array_diff($data['Names'], $fallbackData['Names']);
118118
}
119119
if (!$data['Names']) {
120-
return;
120+
return null;
121121
}
122122

123123
return $data;

ResourceBundle/CurrencyBundle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function getCurrencySymbol($currency, $displayLocale = null)
4949
try {
5050
return $this->getSymbol($currency, $displayLocale);
5151
} catch (MissingResourceException $e) {
52-
return;
52+
return null;
5353
}
5454
}
5555

@@ -61,7 +61,7 @@ public function getCurrencyName($currency, $displayLocale = null)
6161
try {
6262
return $this->getName($currency, $displayLocale);
6363
} catch (MissingResourceException $e) {
64-
return;
64+
return null;
6565
}
6666
}
6767

ResourceBundle/LanguageBundle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getLanguageName($language, $region = null, $displayLocale = null
6262
try {
6363
return $this->getName($language, $displayLocale);
6464
} catch (MissingResourceException $e) {
65-
return;
65+
return null;
6666
}
6767
}
6868

@@ -86,7 +86,7 @@ public function getScriptName($script, $language = null, $displayLocale = null)
8686
try {
8787
return $this->scriptProvider->getName($script, $displayLocale);
8888
} catch (MissingResourceException $e) {
89-
return;
89+
return null;
9090
}
9191
}
9292

ResourceBundle/LocaleBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function getLocaleName($locale, $displayLocale = null)
4343
try {
4444
return $this->getName($locale, $displayLocale);
4545
} catch (MissingResourceException $e) {
46-
return;
46+
return null;
4747
}
4848
}
4949

ResourceBundle/RegionBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function getCountryName($country, $displayLocale = null)
4949
try {
5050
return $this->getName($country, $displayLocale);
5151
} catch (MissingResourceException $e) {
52-
return;
52+
return null;
5353
}
5454
}
5555

Util/Version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static function normalize($version, $precision)
8383
}
8484

8585
if (!preg_match('/^'.$pattern.'/', $version, $matches)) {
86-
return;
86+
return null;
8787
}
8888

8989
return $matches[0];

0 commit comments

Comments
 (0)