@@ -861,6 +861,45 @@ public function dataGetMemberProperties()
861861 'nullable_type ' => false ,
862862 ],
863863 ],
864+ 'php8.1-readonly-property-with-multi-union-type-no-visibility ' => [
865+ 'identifier ' => '/* testPHP81OnlyReadonlyWithUnionTypeMultiple */ ' ,
866+ 'expected ' => [
867+ 'scope ' => 'public ' ,
868+ 'scope_specified ' => false ,
869+ 'is_static ' => false ,
870+ 'is_readonly ' => true ,
871+ 'type ' => '\InterfaceA|\Sub\InterfaceB|false ' ,
872+ 'type_token ' => -7 ,
873+ 'type_end_token ' => -3 ,
874+ 'nullable_type ' => false ,
875+ ],
876+ ],
877+ 'php8.1-readonly-and-static-property ' => [
878+ 'identifier ' => '/* testPHP81ReadonlyAndStatic */ ' ,
879+ 'expected ' => [
880+ 'scope ' => 'private ' ,
881+ 'scope_specified ' => true ,
882+ 'is_static ' => true ,
883+ 'is_readonly ' => true ,
884+ 'type ' => '?string ' ,
885+ 'type_token ' => -2 ,
886+ 'type_end_token ' => -2 ,
887+ 'nullable_type ' => true ,
888+ ],
889+ ],
890+ 'php8.1-readonly-mixed-case-keyword ' => [
891+ 'identifier ' => '/* testPHP81ReadonlyMixedCase */ ' ,
892+ 'expected ' => [
893+ 'scope ' => 'public ' ,
894+ 'scope_specified ' => true ,
895+ 'is_static ' => true ,
896+ 'is_readonly ' => true ,
897+ 'type ' => '' ,
898+ 'type_token ' => false ,
899+ 'type_end_token ' => false ,
900+ 'nullable_type ' => false ,
901+ ],
902+ ],
864903 'php8-property-with-single-attribute ' => [
865904 'identifier ' => '/* testPHP8PropertySingleAttribute */ ' ,
866905 'expected ' => [
@@ -956,6 +995,33 @@ public function dataGetMemberProperties()
956995 'nullable_type ' => true ,
957996 ],
958997 ],
998+
999+ 'php8.0-union-type-with-whitespace-and-comment ' => [
1000+ 'identifier ' => '/* testUnionTypeWithWhitespaceAndComment */ ' ,
1001+ 'expected ' => [
1002+ 'scope ' => 'public ' ,
1003+ 'scope_specified ' => true ,
1004+ 'is_static ' => false ,
1005+ 'is_readonly ' => false ,
1006+ 'type ' => 'int|string ' ,
1007+ 'type_token ' => -8 ,
1008+ 'type_end_token ' => -2 ,
1009+ 'nullable_type ' => false ,
1010+ ],
1011+ ],
1012+ 'php8.1-intersection-type-with-whitespace-and-comment ' => [
1013+ 'identifier ' => '/* testIntersectionTypeWithWhitespaceAndComment */ ' ,
1014+ 'expected ' => [
1015+ 'scope ' => 'public ' ,
1016+ 'scope_specified ' => true ,
1017+ 'is_static ' => false ,
1018+ 'is_readonly ' => false ,
1019+ 'type ' => '\Foo&Bar ' ,
1020+ 'type_token ' => -8 ,
1021+ 'type_end_token ' => -2 ,
1022+ 'nullable_type ' => false ,
1023+ ],
1024+ ],
9591025 'php8.2-pseudo-type-true ' => [
9601026 'identifier ' => '/* testPHP82PseudoTypeTrue */ ' ,
9611027 'expected ' => [
0 commit comments