Skip to content

Commit 0def40e

Browse files
committed
[Intl] Add types to private properties
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 72d67d2 commit 0def40e

18 files changed

+34
-54
lines changed

Data/Bundle/Compiler/GenrbCompiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
class GenrbCompiler implements BundleCompilerInterface
2424
{
25-
private $genrb;
25+
private string $genrb;
2626

2727
/**
2828
* Creates a new compiler based on the "genrb" executable.

Data/Bundle/Reader/BufferedBundleReader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
*/
2121
class BufferedBundleReader implements BundleReaderInterface
2222
{
23-
private $reader;
24-
private $buffer;
23+
private BundleReaderInterface $reader;
24+
private RingBuffer $buffer;
2525

2626
public function __construct(BundleReaderInterface $reader, int $bufferSize)
2727
{

Data/Bundle/Reader/BundleEntryReader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
*/
2929
class BundleEntryReader implements BundleEntryReaderInterface
3030
{
31-
private $reader;
31+
private BundleReaderInterface $reader;
3232

3333
/**
3434
* A mapping of locale aliases to locales.
3535
*/
36-
private $localeAliases = [];
36+
private array $localeAliases = [];
3737

3838
/**
3939
* Creates an entry reader based on the given resource bundle reader.

Data/Generator/AbstractDataGenerator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
*/
2828
abstract class AbstractDataGenerator
2929
{
30-
private $compiler;
31-
private $dirName;
30+
private BundleCompilerInterface $compiler;
31+
private string $dirName;
3232

3333
public function __construct(BundleCompilerInterface $compiler, string $dirName)
3434
{

Data/Generator/CurrencyDataGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class CurrencyDataGenerator extends AbstractDataGenerator
4646
*
4747
* @var string[]
4848
*/
49-
private $currencyCodes = [];
49+
private array $currencyCodes = [];
5050

5151
/**
5252
* {@inheritdoc}

Data/Generator/FallbackTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
*/
2222
trait FallbackTrait
2323
{
24-
private $fallbackCache = [];
25-
private $generatingFallback = false;
24+
private array $fallbackCache = [];
25+
private bool $generatingFallback = false;
2626

2727
/**
2828
* @see AbstractDataGenerator::generateDataForLocale()

Data/Generator/GeneratorConfig.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
*/
2323
class GeneratorConfig
2424
{
25-
private $sourceDir;
26-
private $icuVersion;
25+
private string $sourceDir;
26+
private string $icuVersion;
2727

2828
/**
2929
* @var BundleWriterInterface[]
3030
*/
31-
private $bundleWriters = [];
31+
private array $bundleWriters = [];
3232

3333
public function __construct(string $sourceDir, string $icuVersion)
3434
{

Data/Generator/LanguageDataGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class LanguageDataGenerator extends AbstractDataGenerator
9696
*
9797
* @var string[]
9898
*/
99-
private $languageCodes = [];
99+
private array $languageCodes = [];
100100

101101
/**
102102
* {@inheritdoc}

Data/Generator/LocaleDataGenerator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class LocaleDataGenerator extends AbstractDataGenerator
2929
{
3030
use FallbackTrait;
3131

32-
private $locales = [];
33-
private $localeAliases = [];
34-
private $localeParents = [];
32+
private array $locales = [];
33+
private array $localeAliases = [];
34+
private array $localeParents = [];
3535

3636
/**
3737
* {@inheritdoc}

Data/Generator/RegionDataGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class RegionDataGenerator extends AbstractDataGenerator
6565
*
6666
* @var string[]
6767
*/
68-
private $regionCodes = [];
68+
private array $regionCodes = [];
6969

7070
public static function isValidCountryCode(int|string|null $region)
7171
{

0 commit comments

Comments
 (0)