@@ -23,13 +23,13 @@ public function testGetParameterTypeUseStatementBeforeLocalNamespace()
23
23
$ target1ReflectionMethod = $ target1ReflectionClass ->getMethod ("SomeMethod " );
24
24
$ target1ReflectionParams = $ target1ReflectionMethod ->getParameters ();
25
25
26
- $ result = $ parser ->getParameterType ($ target1ReflectionClass , $ target1ReflectionMethod , $ target1ReflectionParams [0 ]);
26
+ $ result = $ parser ->getParameterType ($ target1ReflectionParams [0 ]);
27
27
28
28
//Since TargetFixture1 file has a use statement to the Subspace namespace, that's the one that should be returned
29
29
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\Subspace\SomeDependencyFixture ' , $ result );
30
30
31
31
32
- $ result = $ parser ->getParameterType ($ target1ReflectionClass , $ target1ReflectionMethod , $ target1ReflectionParams [1 ]);
32
+ $ result = $ parser ->getParameterType ($ target1ReflectionParams [1 ]);
33
33
34
34
//this parameter should be unaffected by use namespace since it has a relative type path
35
35
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\Subspace\SomeDependencyFixture2 ' , $ result );
@@ -42,13 +42,13 @@ public function testGetParameterTypeUseStatementBeforeLocalNamespace()
42
42
$ target2ReflectionMethod = $ target2ReflectionClass ->getMethod ("SomeMethod " );
43
43
$ target2ReflectionParams = $ target2ReflectionMethod ->getParameters ();
44
44
45
- $ result = $ parser ->getParameterType ($ target2ReflectionClass , $ target2ReflectionMethod , $ target2ReflectionParams [0 ]);
45
+ $ result = $ parser ->getParameterType ($ target2ReflectionParams [0 ]);
46
46
47
47
//Since TargetFixture2 file has a use statement with an alias to the Subspace namespace, that's the one that should be returned
48
48
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\Subspace\SomeDependencyFixture2 ' , $ result );
49
49
50
50
51
- $ result = $ parser ->getParameterType ($ target2ReflectionClass , $ target2ReflectionMethod , $ target2ReflectionParams [1 ]);
51
+ $ result = $ parser ->getParameterType ($ target2ReflectionParams [1 ]);
52
52
53
53
//this parameter should be unaffected by use namespace since it has a relative type path
54
54
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\Subspace\SomeDependencyFixture2 ' , $ result );
@@ -61,13 +61,13 @@ public function testGetParameterTypeUseStatementBeforeLocalNamespace()
61
61
$ target3ReflectionMethod = $ target3ReflectionClass ->getMethod ("SomeMethod " );
62
62
$ target3ReflectionParams = $ target3ReflectionMethod ->getParameters ();
63
63
64
- $ result = $ parser ->getParameterType ($ target3ReflectionClass , $ target3ReflectionMethod , $ target3ReflectionParams [0 ]);
64
+ $ result = $ parser ->getParameterType ($ target3ReflectionParams [0 ]);
65
65
66
66
//Since TargetFixture3 file has NO use statement, the one local to the target's namespace should be used
67
67
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\SomeDependencyFixture ' , $ result );
68
68
69
69
70
- $ result = $ parser ->getParameterType ($ target3ReflectionClass , $ target3ReflectionMethod , $ target3ReflectionParams [1 ]);
70
+ $ result = $ parser ->getParameterType ($ target3ReflectionParams [1 ]);
71
71
72
72
//this parameter should be unaffected by use namespace since it has a relative type path
73
73
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\Subspace\SomeDependencyFixture2 ' , $ result );
@@ -87,15 +87,15 @@ public function testGetPropertyTypeUseStatementBeforeLocalNamespace()
87
87
$ target1ReflectionClass = new \ReflectionClass ($ target1 );
88
88
$ target1ReflectionProperty1 = $ target1ReflectionClass ->getProperty ("dependency1 " );
89
89
90
- $ result = $ parser ->getPropertyType ($ target1ReflectionClass , $ target1ReflectionProperty1 );
90
+ $ result = $ parser ->getPropertyType ($ target1ReflectionProperty1 );
91
91
92
92
//Since TargetFixture1 file has a use statement to the Subspace namespace, that's the one that should be returned
93
93
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\Subspace\SomeDependencyFixture ' , $ result );
94
94
95
95
96
96
$ target1ReflectionProperty2 = $ target1ReflectionClass ->getProperty ("dependency2 " );
97
97
98
- $ result = $ parser ->getPropertyType ($ target1ReflectionClass , $ target1ReflectionProperty2 );
98
+ $ result = $ parser ->getPropertyType ($ target1ReflectionProperty2 );
99
99
100
100
//this property should be unaffected by use namespace since it has a relative type path
101
101
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\Subspace\SomeDependencyFixture2 ' , $ result );
@@ -107,15 +107,15 @@ public function testGetPropertyTypeUseStatementBeforeLocalNamespace()
107
107
$ target2ReflectionClass = new \ReflectionClass ($ target2 );
108
108
$ target2ReflectionProperty1 = $ target2ReflectionClass ->getProperty ("dependency1 " );
109
109
110
- $ result = $ parser ->getPropertyType ($ target2ReflectionClass , $ target2ReflectionProperty1 );
110
+ $ result = $ parser ->getPropertyType ($ target2ReflectionProperty1 );
111
111
112
112
//Since TargetFixture2 file has a use statement with an alias to the Subspace namespace, that's the one that should be returned
113
113
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\Subspace\SomeDependencyFixture2 ' , $ result );
114
114
115
115
116
116
$ target2ReflectionProperty2 = $ target2ReflectionClass ->getProperty ("dependency2 " );
117
117
118
- $ result = $ parser ->getPropertyType ($ target2ReflectionClass , $ target2ReflectionProperty2 );
118
+ $ result = $ parser ->getPropertyType ($ target2ReflectionProperty2 );
119
119
120
120
//this property should be unaffected by use namespace since it has a relative type path
121
121
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\Subspace\SomeDependencyFixture2 ' , $ result );
@@ -127,15 +127,15 @@ public function testGetPropertyTypeUseStatementBeforeLocalNamespace()
127
127
$ target3ReflectionClass = new \ReflectionClass ($ target3 );
128
128
$ target3ReflectionProperty1 = $ target3ReflectionClass ->getProperty ("dependency1 " );
129
129
130
- $ result = $ parser ->getPropertyType ($ target3ReflectionClass , $ target3ReflectionProperty1 );
130
+ $ result = $ parser ->getPropertyType ($ target3ReflectionProperty1 );
131
131
132
132
//Since TargetFixture3 file has NO use statement, the one local to the target's namespace should be used
133
133
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\SomeDependencyFixture ' , $ result );
134
134
135
135
136
136
$ target3ReflectionProperty2 = $ target3ReflectionClass ->getProperty ("dependency2 " );
137
137
138
- $ result = $ parser ->getPropertyType ($ target3ReflectionClass , $ target3ReflectionProperty2 );
138
+ $ result = $ parser ->getPropertyType ($ target3ReflectionProperty2 );
139
139
140
140
//this property should be unaffected by use namespace since it has a relative type path
141
141
$ this ->assertEquals ('UnitTest\PhpDocReader\Fixtures\Subspace\SomeDependencyFixture2 ' , $ result );
0 commit comments