@@ -12,7 +12,7 @@ class PhpStanTypeTest extends TestCase
12
12
public function testMixedTypes (): void
13
13
{
14
14
$ param = new PhpStanType ('array|string|int ' );
15
- $ this ->assertEquals ('array|string|int ' , $ param ->getDocBlockType ());
15
+ $ this ->assertEquals ('\ array|string|int ' , $ param ->getDocBlockType ());
16
16
$ this ->assertEquals ('' , $ param ->getSignatureType ());
17
17
}
18
18
@@ -34,31 +34,31 @@ public function testGenerics(): void
34
34
$ this ->assertEquals ('iterable ' , $ param ->getSignatureType ());
35
35
36
36
$ param = new PhpStanType ('array<string,mixed> ' );
37
- $ this ->assertEquals ('array<string,mixed> ' , $ param ->getDocBlockType ());
37
+ $ this ->assertEquals ('\ array<string,mixed> ' , $ param ->getDocBlockType ());
38
38
$ this ->assertEquals ('array ' , $ param ->getSignatureType ());
39
39
40
40
$ param = new PhpStanType ('array<string,mixed>|array<int,string> ' );
41
- $ this ->assertEquals ('array<string,mixed>|array<int,string> ' , $ param ->getDocBlockType ());
41
+ $ this ->assertEquals ('\ array<string,mixed>|\ array<int,string> ' , $ param ->getDocBlockType ());
42
42
$ this ->assertEquals ('array ' , $ param ->getSignatureType ());
43
43
44
44
$ param = new PhpStanType ('array<int|string,object|bool> ' );
45
- $ this ->assertEquals ('array<int|string,object|bool> ' , $ param ->getDocBlockType ());
45
+ $ this ->assertEquals ('\ array<int|string,object|bool> ' , $ param ->getDocBlockType ());
46
46
$ this ->assertEquals ('array ' , $ param ->getSignatureType ());
47
47
48
48
$ param = new PhpStanType ('array<int|string,array<int|string>>|array{1: int, 2: string} ' );
49
- $ this ->assertEquals ('array<int|string,array<int|string>>|array{1: int, 2: string} ' , $ param ->getDocBlockType ());
49
+ $ this ->assertEquals ('\ array<int|string,\ array<int|string>>|\ array{1: int, 2: string} ' , $ param ->getDocBlockType ());
50
50
$ this ->assertEquals ('array ' , $ param ->getSignatureType ());
51
51
52
52
$ param = new PhpStanType ('array{0:float,1:float,2:float,3:float,4:float,5:float} ' );
53
- $ this ->assertEquals ('array{0:float,1:float,2:float,3:float,4:float,5:float} ' , $ param ->getDocBlockType ());
53
+ $ this ->assertEquals ('\ array{0:float,1:float,2:float,3:float,4:float,5:float} ' , $ param ->getDocBlockType ());
54
54
$ this ->assertEquals ('array ' , $ param ->getSignatureType ());
55
55
}
56
56
57
57
public function testNullable (): void
58
58
{
59
59
$ param = new PhpStanType ('array|null ' );
60
60
$ this ->assertEquals (true , $ param ->isNullable ());
61
- $ this ->assertEquals ('array|null ' , $ param ->getDocBlockType ());
61
+ $ this ->assertEquals ('\ array|null ' , $ param ->getDocBlockType ());
62
62
$ this ->assertEquals ('?array ' , $ param ->getSignatureType ());
63
63
64
64
$ param = new PhpStanType ('?int|?string ' );
@@ -150,7 +150,7 @@ public function testErrorTypeInteraction(): void
150
150
public function testDuplicateType (): void
151
151
{
152
152
$ param = new PhpStanType ('array<string,string>|array<string,false>|array<string,array<int,mixed>> ' );
153
- $ this ->assertEquals ('array<string,string>|array<string,false>|array<string,array<int,mixed>> ' , $ param ->getDocBlockType ());
153
+ $ this ->assertEquals ('\ array<string,string>|\ array<string,false>|\ array<string,\ array<int,mixed>> ' , $ param ->getDocBlockType ());
154
154
$ this ->assertEquals ('array ' , $ param ->getSignatureType ());
155
155
}
156
156
@@ -178,7 +178,7 @@ public function testPositiveIntBecomingInt(): void
178
178
public function testListBecomingArray (): void
179
179
{
180
180
$ param = new PhpStanType ('list<string>|false ' );
181
- $ this ->assertEquals ('array<string> ' , $ param ->getDocBlockType (Method::FALSY_TYPE ));
181
+ $ this ->assertEquals ('\ array<string> ' , $ param ->getDocBlockType (Method::FALSY_TYPE ));
182
182
$ this ->assertEquals ('array ' , $ param ->getSignatureType (Method::FALSY_TYPE ));
183
183
}
184
184
0 commit comments