Skip to content

Commit f25cf42

Browse files
wouterjnicolas-grekas
authored andcommitted
Add PHP types to private methods and functions
1 parent b40fe00 commit f25cf42

7 files changed

+14
-14
lines changed

Data/Generator/AbstractDataGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct(BundleCompilerInterface $compiler, string $dirName)
3636
$this->dirName = $dirName;
3737
}
3838

39-
public function generateData(GeneratorConfig $config)
39+
public function generateData(GeneratorConfig $config): void
4040
{
4141
$filesystem = new Filesystem();
4242
$localeScanner = new LocaleScanner();

Data/Generator/CurrencyDataGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
5353
return $scanner->scanLocales($sourceDir.'/curr');
5454
}
5555

56-
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
56+
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir): void
5757
{
5858
$compiler->compile($sourceDir.'/curr', $tempDir);
5959
$compiler->compile($sourceDir.'/misc/currencyNumericCodes.txt', $tempDir);
6060
}
6161

62-
protected function preGenerate()
62+
protected function preGenerate(): void
6363
{
6464
$this->currencyCodes = [];
6565
}

Data/Generator/LanguageDataGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
103103
return $scanner->scanLocales($sourceDir.'/lang');
104104
}
105105

106-
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
106+
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir): void
107107
{
108108
$compiler->compile($sourceDir.'/lang', $tempDir);
109109
$compiler->compile($sourceDir.'/misc/metadata.txt', $tempDir);
110110
}
111111

112-
protected function preGenerate()
112+
protected function preGenerate(): void
113113
{
114114
$this->languageCodes = [];
115115
}

Data/Generator/RegionDataGenerator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class RegionDataGenerator extends AbstractDataGenerator
6767
*/
6868
private array $regionCodes = [];
6969

70-
public static function isValidCountryCode(int|string|null $region)
70+
public static function isValidCountryCode(int|string|null $region): bool
7171
{
7272
if (isset(self::DENYLIST[$region])) {
7373
return false;
@@ -86,13 +86,13 @@ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
8686
return $scanner->scanLocales($sourceDir.'/region');
8787
}
8888

89-
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
89+
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir): void
9090
{
9191
$compiler->compile($sourceDir.'/region', $tempDir);
9292
$compiler->compile($sourceDir.'/misc/metadata.txt', $tempDir);
9393
}
9494

95-
protected function preGenerate()
95+
protected function preGenerate(): void
9696
{
9797
$this->regionCodes = [];
9898
}

Data/Generator/ScriptDataGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
4040
return $scanner->scanLocales($sourceDir.'/lang');
4141
}
4242

43-
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
43+
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir): void
4444
{
4545
$compiler->compile($sourceDir.'/lang', $tempDir);
4646
}
4747

48-
protected function preGenerate()
48+
protected function preGenerate(): void
4949
{
5050
$this->scriptCodes = [];
5151
}

Data/Generator/TimezoneDataGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected function scanLocales(LocaleScanner $scanner, string $sourceDir): array
4646
return $scanner->scanLocales($sourceDir.'/zone');
4747
}
4848

49-
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir)
49+
protected function compileTemporaryBundles(BundleCompilerInterface $compiler, string $sourceDir, string $tempDir): void
5050
{
5151
$filesystem = new Filesystem();
5252
$filesystem->mkdir($tempDir.'/region');
@@ -57,7 +57,7 @@ protected function compileTemporaryBundles(BundleCompilerInterface $compiler, st
5757
$compiler->compile($sourceDir.'/misc/windowsZones.txt', $tempDir);
5858
}
5959

60-
protected function preGenerate()
60+
protected function preGenerate(): void
6161
{
6262
$this->zoneIds = [];
6363
$this->zoneToCountryMapping = [];

Data/Util/ArrayAccessibleResourceBundle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ public function count(): int
6969
return $this->bundleImpl->count();
7070
}
7171

72-
public function getErrorCode()
72+
public function getErrorCode(): int
7373
{
7474
return $this->bundleImpl->getErrorCode();
7575
}
7676

77-
public function getErrorMessage()
77+
public function getErrorMessage(): string
7878
{
7979
return $this->bundleImpl->getErrorMessage();
8080
}

0 commit comments

Comments
 (0)