This repository was archived by the owner on Mar 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ class TestClass
21
21
private static array $ static = [];
22
22
private static ?array $ nullable_static_array = null ;
23
23
24
+ protected string |array |null $ union_type = ['test ' => false ];
25
+ protected static string |array |null $ static_union_type = 'test ' ;
26
+
24
27
public function __construct ()
25
28
{
26
29
$ this ->bool = true ;
@@ -30,7 +33,10 @@ public function __construct()
30
33
$ this ->nullable_array = null ;
31
34
$ this ->collection = new Collection ;
32
35
$ this ->nullable_collection = null ;
36
+ $ this ->union_type = ['test ' => true ];
37
+
33
38
self ::$ static = ['static ' => true ];
34
39
self ::$ nullable_static_array = null ;
40
+ self ::$ static_union_type = ['test ' => true ];
35
41
}
36
42
}
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ public function testCanDumpClassProperties()
17
17
$ this ->assertArrayHasKey ('array ' , $ properties ['array ' ]);
18
18
$ this ->assertTrue ($ properties ['collection ' ]->isEmpty ());
19
19
$ this ->assertArrayHasKey ('static ' , $ properties ['static ' ]);
20
+ $ this ->assertArrayHasKey ('test ' , $ properties ['union_type ' ]);
21
+ $ this ->assertArrayHasKey ('test ' , $ properties ['static_union_type ' ]);
20
22
21
23
$ this ->assertNull ($ properties ['nullable_string ' ]);
22
24
$ this ->assertNull ($ properties ['nullable_array ' ]);
You can’t perform that action at this time.
0 commit comments