99namespace Test \AppFramework \Utility ;
1010
1111use OC \AppFramework \Utility \ControllerMethodReflector ;
12+ use OCP \Server ;
1213use Psr \Log \LoggerInterface ;
1314
1415class BaseController {
@@ -70,7 +71,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase {
7071 * @Annotation
7172 */
7273 public function testReadAnnotation (): void {
73- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
74+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
7475 $ reader ->reflect (
7576 '\Test\AppFramework\Utility\ControllerMethodReflectorTest ' ,
7677 'testReadAnnotation '
@@ -83,7 +84,7 @@ public function testReadAnnotation(): void {
8384 * @Annotation(parameter=value)
8485 */
8586 public function testGetAnnotationParameterSingle (): void {
86- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
87+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
8788 $ reader ->reflect (
8889 self ::class,
8990 __FUNCTION__
@@ -96,7 +97,7 @@ public function testGetAnnotationParameterSingle(): void {
9697 * @Annotation(parameter1=value1, parameter2=value2,parameter3=value3)
9798 */
9899 public function testGetAnnotationParameterMultiple (): void {
99- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
100+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
100101 $ reader ->reflect (
101102 self ::class,
102103 __FUNCTION__
@@ -112,7 +113,7 @@ public function testGetAnnotationParameterMultiple(): void {
112113 * @param test
113114 */
114115 public function testReadAnnotationNoLowercase (): void {
115- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
116+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
116117 $ reader ->reflect (
117118 '\Test\AppFramework\Utility\ControllerMethodReflectorTest ' ,
118119 'testReadAnnotationNoLowercase '
@@ -128,7 +129,7 @@ public function testReadAnnotationNoLowercase(): void {
128129 * @param int $test
129130 */
130131 public function testReadTypeIntAnnotations (): void {
131- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
132+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
132133 $ reader ->reflect (
133134 '\Test\AppFramework\Utility\ControllerMethodReflectorTest ' ,
134135 'testReadTypeIntAnnotations '
@@ -146,7 +147,7 @@ public function arguments3($a, float $b, int $c, $d) {
146147 }
147148
148149 public function testReadTypeIntAnnotationsScalarTypes (): void {
149- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
150+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
150151 $ reader ->reflect (
151152 '\Test\AppFramework\Utility\ControllerMethodReflectorTest ' ,
152153 'arguments3 '
@@ -164,7 +165,7 @@ public function testReadTypeIntAnnotationsScalarTypes(): void {
164165 * @param double $test something special
165166 */
166167 public function testReadTypeDoubleAnnotations (): void {
167- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
168+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
168169 $ reader ->reflect (
169170 '\Test\AppFramework\Utility\ControllerMethodReflectorTest ' ,
170171 'testReadTypeDoubleAnnotations '
@@ -178,7 +179,7 @@ public function testReadTypeDoubleAnnotations(): void {
178179 * @param string $foo
179180 */
180181 public function testReadTypeWhitespaceAnnotations (): void {
181- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
182+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
182183 $ reader ->reflect (
183184 '\Test\AppFramework\Utility\ControllerMethodReflectorTest ' ,
184185 'testReadTypeWhitespaceAnnotations '
@@ -191,7 +192,7 @@ public function testReadTypeWhitespaceAnnotations(): void {
191192 public function arguments ($ arg , $ arg2 = 'hi ' ) {
192193 }
193194 public function testReflectParameters (): void {
194- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
195+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
195196 $ reader ->reflect (
196197 '\Test\AppFramework\Utility\ControllerMethodReflectorTest ' ,
197198 'arguments '
@@ -204,7 +205,7 @@ public function testReflectParameters(): void {
204205 public function arguments2 ($ arg ) {
205206 }
206207 public function testReflectParameters2 (): void {
207- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
208+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
208209 $ reader ->reflect (
209210 '\Test\AppFramework\Utility\ControllerMethodReflectorTest ' ,
210211 'arguments2 '
@@ -215,15 +216,15 @@ public function testReflectParameters2(): void {
215216
216217
217218 public function testInheritance (): void {
218- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
219+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
219220 $ reader ->reflect ('Test\AppFramework\Utility\EndController ' , 'test ' );
220221
221222 $ this ->assertTrue ($ reader ->hasAnnotation ('Annotation ' ));
222223 }
223224
224225
225226 public function testInheritanceOverride (): void {
226- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
227+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
227228 $ reader ->reflect ('Test\AppFramework\Utility\EndController ' , 'test2 ' );
228229
229230 $ this ->assertTrue ($ reader ->hasAnnotation ('NoAnnotation ' ));
@@ -232,14 +233,14 @@ public function testInheritanceOverride(): void {
232233
233234
234235 public function testInheritanceOverrideNoDocblock (): void {
235- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
236+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
236237 $ reader ->reflect ('Test\AppFramework\Utility\EndController ' , 'test3 ' );
237238
238239 $ this ->assertFalse ($ reader ->hasAnnotation ('Annotation ' ));
239240 }
240241
241242 public function testRangeDetectionPsalm (): void {
242- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
243+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
243244 $ reader ->reflect ('Test\AppFramework\Utility\EndController ' , 'test4 ' );
244245
245246 $ rangeInfo1 = $ reader ->getRange ('rangedOne ' );
@@ -260,7 +261,7 @@ public function testRangeDetectionPsalm(): void {
260261 }
261262
262263 public function testRangeDetectionNative (): void {
263- $ reader = new ControllerMethodReflector (\ OCP \ Server::get (LoggerInterface::class));
264+ $ reader = new ControllerMethodReflector (Server::get (LoggerInterface::class));
264265 $ reader ->reflect ('Test\AppFramework\Utility\EndController ' , 'test5 ' );
265266
266267 $ rangeInfo1 = $ reader ->getRange ('rangedOne ' );
0 commit comments