Skip to content

Commit 9bf6aac

Browse files
some backports from master
1 parent f45a3fd commit 9bf6aac

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed

Data/Generator/CurrencyDataGenerator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ class CurrencyDataGenerator extends AbstractDataGenerator
5151
/**
5252
* {@inheritdoc}
5353
*/
54-
protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
54+
protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
5555
{
5656
return $scanner->scanLocales($sourceDir.'/curr');
5757
}
5858

5959
/**
6060
* {@inheritdoc}
6161
*/
62-
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
62+
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
6363
{
6464
$compiler->compile($sourceDir.'/curr', $tempDir);
6565
$compiler->compile($sourceDir.'/misc/currencyNumericCodes.txt', $tempDir);
@@ -76,7 +76,7 @@ protected function preGenerate()
7676
/**
7777
* {@inheritdoc}
7878
*/
79-
protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
79+
protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
8080
{
8181
$localeBundle = $reader->read($tempDir, $displayLocale);
8282

@@ -97,7 +97,7 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, $te
9797
/**
9898
* {@inheritdoc}
9999
*/
100-
protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
100+
protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
101101
{
102102
$rootBundle = $reader->read($tempDir, 'root');
103103

@@ -110,7 +110,7 @@ protected function generateDataForRoot(BundleEntryReaderInterface $reader, $temp
110110
/**
111111
* {@inheritdoc}
112112
*/
113-
protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
113+
protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
114114
{
115115
$rootBundle = $reader->read($tempDir, 'root');
116116
$supplementalDataBundle = $reader->read($tempDir, 'supplementalData');

Data/Generator/LanguageDataGenerator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ class LanguageDataGenerator extends AbstractDataGenerator
101101
/**
102102
* {@inheritdoc}
103103
*/
104-
protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
104+
protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
105105
{
106106
return $scanner->scanLocales($sourceDir.'/lang');
107107
}
108108

109109
/**
110110
* {@inheritdoc}
111111
*/
112-
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
112+
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
113113
{
114114
$compiler->compile($sourceDir.'/lang', $tempDir);
115115
$compiler->compile($sourceDir.'/misc/metadata.txt', $tempDir);
@@ -126,7 +126,7 @@ protected function preGenerate()
126126
/**
127127
* {@inheritdoc}
128128
*/
129-
protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
129+
protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
130130
{
131131
$localeBundle = $reader->read($tempDir, $displayLocale);
132132

@@ -148,14 +148,14 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, $te
148148
/**
149149
* {@inheritdoc}
150150
*/
151-
protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
151+
protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
152152
{
153153
}
154154

155155
/**
156156
* {@inheritdoc}
157157
*/
158-
protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
158+
protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
159159
{
160160
$rootBundle = $reader->read($tempDir, 'root');
161161
$metadataBundle = $reader->read($tempDir, 'metadata');

Data/Generator/LocaleDataGenerator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class LocaleDataGenerator extends AbstractDataGenerator
3636
/**
3737
* {@inheritdoc}
3838
*/
39-
protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
39+
protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
4040
{
4141
$this->locales = $scanner->scanLocales($sourceDir.'/locales');
4242
$this->localeAliases = $scanner->scanAliases($sourceDir.'/locales');
@@ -48,7 +48,7 @@ protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
4848
/**
4949
* {@inheritdoc}
5050
*/
51-
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
51+
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
5252
{
5353
$filesystem = new Filesystem();
5454
$filesystem->mkdir([
@@ -74,7 +74,7 @@ protected function preGenerate()
7474
/**
7575
* {@inheritdoc}
7676
*/
77-
protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
77+
protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
7878
{
7979
// Don't generate aliases, as they are resolved during runtime
8080
// Unless an alias is needed as fallback for de-duplication purposes
@@ -133,14 +133,14 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, $te
133133
/**
134134
* {@inheritdoc}
135135
*/
136-
protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
136+
protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
137137
{
138138
}
139139

140140
/**
141141
* {@inheritdoc}
142142
*/
143-
protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
143+
protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
144144
{
145145
return [
146146
'Locales' => $this->locales,

Data/Generator/RegionDataGenerator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ public static function isValidCountryCode($region)
8484
/**
8585
* {@inheritdoc}
8686
*/
87-
protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
87+
protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
8888
{
8989
return $scanner->scanLocales($sourceDir.'/region');
9090
}
9191

9292
/**
9393
* {@inheritdoc}
9494
*/
95-
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
95+
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
9696
{
9797
$compiler->compile($sourceDir.'/region', $tempDir);
9898
$compiler->compile($sourceDir.'/misc/metadata.txt', $tempDir);
@@ -109,7 +109,7 @@ protected function preGenerate()
109109
/**
110110
* {@inheritdoc}
111111
*/
112-
protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
112+
protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
113113
{
114114
$localeBundle = $reader->read($tempDir, $displayLocale);
115115

@@ -131,14 +131,14 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, $te
131131
/**
132132
* {@inheritdoc}
133133
*/
134-
protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
134+
protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
135135
{
136136
}
137137

138138
/**
139139
* {@inheritdoc}
140140
*/
141-
protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
141+
protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
142142
{
143143
$rootBundle = $reader->read($tempDir, 'root');
144144
$metadataBundle = $reader->read($tempDir, 'metadata');

Data/Generator/ScriptDataGenerator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ class ScriptDataGenerator extends AbstractDataGenerator
3838
/**
3939
* {@inheritdoc}
4040
*/
41-
protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
41+
protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
4242
{
4343
return $scanner->scanLocales($sourceDir.'/lang');
4444
}
4545

4646
/**
4747
* {@inheritdoc}
4848
*/
49-
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
49+
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
5050
{
5151
$compiler->compile($sourceDir.'/lang', $tempDir);
5252
}
@@ -62,7 +62,7 @@ protected function preGenerate()
6262
/**
6363
* {@inheritdoc}
6464
*/
65-
protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
65+
protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
6666
{
6767
$localeBundle = $reader->read($tempDir, $displayLocale);
6868

@@ -84,14 +84,14 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, $te
8484
/**
8585
* {@inheritdoc}
8686
*/
87-
protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
87+
protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
8888
{
8989
}
9090

9191
/**
9292
* {@inheritdoc}
9393
*/
94-
protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
94+
protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
9595
{
9696
$rootBundle = $reader->read($tempDir, 'root');
9797

Data/Generator/TimezoneDataGenerator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class TimezoneDataGenerator extends AbstractDataGenerator
4242
/**
4343
* {@inheritdoc}
4444
*/
45-
protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
45+
protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
4646
{
4747
$this->localeAliases = $scanner->scanAliases($sourceDir.'/locales');
4848

@@ -52,7 +52,7 @@ protected function scanLocales(LocaleScanner $scanner, $sourceDir): array
5252
/**
5353
* {@inheritdoc}
5454
*/
55-
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, $sourceDir, $tempDir)
55+
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
5656
{
5757
$filesystem = new Filesystem();
5858
$filesystem->mkdir($tempDir.'/region');
@@ -75,7 +75,7 @@ protected function preGenerate()
7575
/**
7676
* {@inheritdoc}
7777
*/
78-
protected function generateDataForLocale(BundleEntryReaderInterface $reader, $tempDir, $displayLocale): ?array
78+
protected function generateDataForLocale(BundleEntryReaderInterface $reader, string $tempDir, string $displayLocale): ?array
7979
{
8080
if (!$this->zoneToCountryMapping) {
8181
$this->zoneToCountryMapping = self::generateZoneToCountryMapping($reader->read($tempDir, 'windowsZones'));
@@ -126,7 +126,7 @@ protected function generateDataForLocale(BundleEntryReaderInterface $reader, $te
126126
/**
127127
* {@inheritdoc}
128128
*/
129-
protected function generateDataForRoot(BundleEntryReaderInterface $reader, $tempDir): ?array
129+
protected function generateDataForRoot(BundleEntryReaderInterface $reader, string $tempDir): ?array
130130
{
131131
$rootBundle = $reader->read($tempDir, 'root');
132132

@@ -139,7 +139,7 @@ protected function generateDataForRoot(BundleEntryReaderInterface $reader, $temp
139139
/**
140140
* {@inheritdoc}
141141
*/
142-
protected function generateDataForMeta(BundleEntryReaderInterface $reader, $tempDir): ?array
142+
protected function generateDataForMeta(BundleEntryReaderInterface $reader, string $tempDir): ?array
143143
{
144144
$rootBundle = $reader->read($tempDir, 'root');
145145

0 commit comments

Comments
 (0)