File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -40,18 +40,20 @@ public function getName() {
40
40
* @return string|null
41
41
*/
42
42
public function getCountry ($ key ) {
43
- if (!empty ($ key )) {
44
- $ locale = \Locale::getDefault ();
45
-
46
- if (Kernel::VERSION_ID < 20300 ) {
47
- $ choices = Locale::getDisplayCountries ($ locale );
48
- } else {
49
- $ choices = Intl::getRegionBundle ()->getCountryNames ($ locale );
50
- }
51
-
52
- if (array_key_exists ($ key , $ choices )) {
53
- return $ choices [$ key ];
54
- }
43
+ if (empty ($ key )) {
44
+ return null ;
45
+ }
46
+
47
+ $ locale = \Locale::getDefault ();
48
+
49
+ if (Kernel::VERSION_ID < 20300 ) {
50
+ $ choices = Locale::getDisplayCountries ($ locale );
51
+ } else {
52
+ $ choices = Intl::getRegionBundle ()->getCountryNames ($ locale );
53
+ }
54
+
55
+ if (array_key_exists ($ key , $ choices )) {
56
+ return $ choices [$ key ];
55
57
}
56
58
}
57
59
You can’t perform that action at this time.
0 commit comments