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
2121 private static array $ static = [];
2222 private static ?array $ nullable_static_array = null ;
2323
24+ protected string |array |null $ union_type = ['test ' => false ];
25+ protected static string |array |null $ static_union_type = 'test ' ;
26+
2427 public function __construct ()
2528 {
2629 $ this ->bool = true ;
@@ -30,7 +33,10 @@ public function __construct()
3033 $ this ->nullable_array = null ;
3134 $ this ->collection = new Collection ;
3235 $ this ->nullable_collection = null ;
36+ $ this ->union_type = ['test ' => true ];
37+
3338 self ::$ static = ['static ' => true ];
3439 self ::$ nullable_static_array = null ;
40+ self ::$ static_union_type = ['test ' => true ];
3541 }
3642}
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ public function testCanDumpClassProperties()
1717 $ this ->assertArrayHasKey ('array ' , $ properties ['array ' ]);
1818 $ this ->assertTrue ($ properties ['collection ' ]->isEmpty ());
1919 $ this ->assertArrayHasKey ('static ' , $ properties ['static ' ]);
20+ $ this ->assertArrayHasKey ('test ' , $ properties ['union_type ' ]);
21+ $ this ->assertArrayHasKey ('test ' , $ properties ['static_union_type ' ]);
2022
2123 $ this ->assertNull ($ properties ['nullable_string ' ]);
2224 $ this ->assertNull ($ properties ['nullable_array ' ]);
You can’t perform that action at this time.
0 commit comments