Skip to content

Commit a915e14

Browse files
committed
Apply fixes from StyleCI
1 parent e5f9477 commit a915e14

File tree

7 files changed

+21
-19
lines changed

7 files changed

+21
-19
lines changed

src/Data/CountryData.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public function __construct(LocaleEnum $locale, NativeData $data)
3434
{
3535
$code = $this->fromAlias($locale);
3636

37-
$this->code = $data->getNative($code)->code;
38-
$this->native = $data->getNative($code)->native;
37+
$this->code = $data->getNative($code)->code;
38+
$this->native = $data->getNative($code)->native;
3939
$this->localized = $data->getLocalized($code)->localized;
4040
}
4141
}

src/Data/CurrencyData.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public function __construct(LocaleEnum $locale, NativeData $data)
3636
{
3737
$code = $this->fromAlias($locale);
3838

39-
$this->code = $data->getNative($code)->code;
40-
$this->numeric = $data->getNative($code)->numeric;
41-
$this->native = $data->getNative($code)->native;
39+
$this->code = $data->getNative($code)->code;
40+
$this->numeric = $data->getNative($code)->numeric;
41+
$this->native = $data->getNative($code)->native;
4242
$this->localized = $data->getLocalized($code)->localized;
4343
}
4444
}

src/Data/LocaleData.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ public function __construct(
5151
) {
5252
$this->code = $this->toAlias($locale);
5353

54-
$this->type = $data['type'] ?? 'Latn';
54+
$this->type = $data['type'] ?? 'Latn';
5555
$this->regional = $data['regional'] ?? null;
5656

57-
$this->native = $locales->getNative($this->code);
57+
$this->native = $locales->getNative($this->code);
5858
$this->localized = $locales->getLocalized($this->code);
5959

6060
$this->direction = $data['direction'] ?? Direction::LeftToRight;
6161

62-
$this->country = $countries ? new CountryData($locale, $countries) : null;
62+
$this->country = $countries ? new CountryData($locale, $countries) : null;
6363
$this->currency = $currencies ? new CurrencyData($locale, $currencies) : null;
6464
}
6565
}

src/Data/NativeData.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class NativeData
2626
public function __construct(
2727
public readonly array $native,
2828
public readonly array $localized
29-
) {}
29+
) {
30+
}
3031

3132
public function getNative(string $locale): mixed
3233
{

src/Enums/Config.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ enum Config: string
2929
{
3030
use InvokableCases;
3131

32-
case PublicKey = 'localization';
32+
case PublicKey = 'localization';
3333
case PrivateKey = 'localization-private';
3434
}

src/Services/Locales.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class Locales
3636

3737
public function __construct(
3838
protected RawLocales $raw
39-
) {}
39+
) {
40+
}
4041

4142
public function raw(): RawLocales
4243
{

tests/Unit/Data/LocalizedTest.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@
3131
/**
3232
* @var array<string, string> $nativeLocale
3333
*/
34-
$nativeLocale = LocaleNames::get();
34+
$nativeLocale = LocaleNames::get();
3535
$localizedLocale = LocaleNames::get($locale);
3636

3737
// Country
3838
/**
3939
* @var array<string, CountryData> $nativeCountry
4040
*/
41-
$nativeCountry = CountryNames::get()->all();
41+
$nativeCountry = CountryNames::get()->all();
4242
$localizedCountry = CountryNames::get($locale)->all();
4343

4444
// Currency
4545
/**
4646
* @var array<string, CurrencyData> $nativeCurrency
4747
*/
48-
$nativeCurrency = CurrencyNames::get()->all();
48+
$nativeCurrency = CurrencyNames::get()->all();
4949
$localizedCurrency = CurrencyNames::get($locale)->all();
5050

5151
foreach (Locales::available(true, true) as $item) {
@@ -77,14 +77,14 @@
7777
/**
7878
* @var array<string, string> $nativeLocale
7979
*/
80-
$nativeLocale = LocaleNames::get();
80+
$nativeLocale = LocaleNames::get();
8181
$localizedLocale = LocaleNames::get($locale);
8282

8383
// Country
8484
/**
8585
* @var array<string, CountryData> $nativeCountry
8686
*/
87-
$nativeCountry = CountryNames::get()->all();
87+
$nativeCountry = CountryNames::get()->all();
8888
$localizedCountry = CountryNames::get($locale)->all();
8989

9090
foreach (Locales::available(true) as $item) {
@@ -112,14 +112,14 @@
112112
/**
113113
* @var array<string, string> $nativeLocale
114114
*/
115-
$nativeLocale = LocaleNames::get();
115+
$nativeLocale = LocaleNames::get();
116116
$localizedLocale = LocaleNames::get($locale);
117117

118118
// Currency
119119
/**
120120
* @var array<string, CurrencyData> $nativeCurrency
121121
*/
122-
$nativeCurrency = CurrencyNames::get()->all();
122+
$nativeCurrency = CurrencyNames::get()->all();
123123
$localizedCurrency = CurrencyNames::get($locale)->all();
124124

125125
foreach (Locales::available(withCurrencies: true) as $item) {
@@ -148,7 +148,7 @@
148148
/**
149149
* @var array<string, string> $nativeLocale
150150
*/
151-
$nativeLocale = LocaleNames::get();
151+
$nativeLocale = LocaleNames::get();
152152
$localizedLocale = LocaleNames::get($locale);
153153

154154
foreach (Locales::available() as $item) {

0 commit comments

Comments
 (0)