Skip to content

Commit c698792

Browse files
Ensure all properties have a type
1 parent 3b316f3 commit c698792

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

Internal/Hydrator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
*/
2121
class Hydrator
2222
{
23-
public static $hydrators = [];
24-
public static $simpleHydrators = [];
25-
public static $propertyScopes = [];
23+
public static array $hydrators = [];
24+
public static array $simpleHydrators = [];
25+
public static array $propertyScopes = [];
2626

2727
public $registry;
2828
public $values;

Internal/LazyObjectRegistry.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,27 @@ class LazyObjectRegistry
2323
/**
2424
* @var array<class-string, \ReflectionClass>
2525
*/
26-
public static $classReflectors = [];
26+
public static array $classReflectors = [];
2727

2828
/**
2929
* @var array<class-string, array<string, mixed>>
3030
*/
31-
public static $defaultProperties = [];
31+
public static array $defaultProperties = [];
3232

3333
/**
3434
* @var array<class-string, list<\Closure>>
3535
*/
36-
public static $classResetters = [];
36+
public static array $classResetters = [];
3737

3838
/**
3939
* @var array<class-string, array{get: \Closure, set: \Closure, isset: \Closure, unset: \Closure}>
4040
*/
41-
public static $classAccessors = [];
41+
public static array $classAccessors = [];
4242

4343
/**
4444
* @var array<class-string, array{set: bool, isset: bool, unset: bool, clone: bool, serialize: bool, unserialize: bool, sleep: bool, wakeup: bool, destruct: bool, get: int}>
4545
*/
46-
public static $parentMethods = [];
46+
public static array $parentMethods = [];
4747

4848
public static ?\Closure $noInitializerState = null;
4949

Internal/Reference.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@
1818
*/
1919
class Reference
2020
{
21-
public $id;
22-
public $value;
23-
public $count = 0;
21+
public int $count = 0;
2422

25-
public function __construct(int $id, $value = null)
26-
{
27-
$this->id = $id;
28-
$this->value = $value;
23+
public function __construct(
24+
public readonly int $id,
25+
public readonly mixed $value = null,
26+
) {
2927
}
3028
}

Internal/Registry.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
*/
2222
class Registry
2323
{
24-
public static $reflectors = [];
25-
public static $prototypes = [];
26-
public static $factories = [];
27-
public static $cloneable = [];
28-
public static $instantiableWithoutConstructor = [];
24+
public static array $reflectors = [];
25+
public static array $prototypes = [];
26+
public static array $factories = [];
27+
public static array $cloneable = [];
28+
public static array $instantiableWithoutConstructor = [];
2929

3030
public $classes = [];
3131

0 commit comments

Comments
 (0)