From 49dd79eabb2b8902559a7a4e8f8fcad54f46b604 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Sun, 15 Sep 2024 22:32:31 +0200 Subject: refactor: Add void return type to PHPUnit test methods Signed-off-by: Christoph Wurst --- .../Utility/ControllerMethodReflectorTest.php | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php') diff --git a/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php b/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php index b7d14cb6cba..e5c683d2486 100644 --- a/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php +++ b/tests/lib/AppFramework/Utility/ControllerMethodReflectorTest.php @@ -56,7 +56,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { /** * @Annotation */ - public function testReadAnnotation() { + public function testReadAnnotation(): void { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -69,7 +69,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { /** * @Annotation(parameter=value) */ - public function testGetAnnotationParameterSingle() { + public function testGetAnnotationParameterSingle(): void { $reader = new ControllerMethodReflector(); $reader->reflect( __CLASS__, @@ -82,7 +82,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { /** * @Annotation(parameter1=value1, parameter2=value2,parameter3=value3) */ - public function testGetAnnotationParameterMultiple() { + public function testGetAnnotationParameterMultiple(): void { $reader = new ControllerMethodReflector(); $reader->reflect( __CLASS__, @@ -98,7 +98,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { * @Annotation * @param test */ - public function testReadAnnotationNoLowercase() { + public function testReadAnnotationNoLowercase(): void { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -114,7 +114,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { * @Annotation * @param int $test */ - public function testReadTypeIntAnnotations() { + public function testReadTypeIntAnnotations(): void { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -135,7 +135,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { /** * @requires PHP 7 */ - public function testReadTypeIntAnnotationsScalarTypes() { + public function testReadTypeIntAnnotationsScalarTypes(): void { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -153,7 +153,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { * @Annotation * @param double $test something special */ - public function testReadTypeDoubleAnnotations() { + public function testReadTypeDoubleAnnotations(): void { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -167,7 +167,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { * @Annotation * @param string $foo */ - public function testReadTypeWhitespaceAnnotations() { + public function testReadTypeWhitespaceAnnotations(): void { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -180,7 +180,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { public function arguments($arg, $arg2 = 'hi') { } - public function testReflectParameters() { + public function testReflectParameters(): void { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -193,7 +193,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { public function arguments2($arg) { } - public function testReflectParameters2() { + public function testReflectParameters2(): void { $reader = new ControllerMethodReflector(); $reader->reflect( '\Test\AppFramework\Utility\ControllerMethodReflectorTest', @@ -204,7 +204,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { } - public function testInheritance() { + public function testInheritance(): void { $reader = new ControllerMethodReflector(); $reader->reflect('Test\AppFramework\Utility\EndController', 'test'); @@ -212,7 +212,7 @@ class ControllerMethodReflectorTest extends \Test\TestCase { } - public function testInheritanceOverride() { + public function testInheritanceOverride(): void { $reader = new ControllerMethodReflector(); $reader->reflect('Test\AppFramework\Utility\EndController', 'test2'); @@ -221,14 +221,14 @@ class ControllerMethodReflectorTest extends \Test\TestCase { } - public function testInheritanceOverrideNoDocblock() { + public function testInheritanceOverrideNoDocblock(): void { $reader = new ControllerMethodReflector(); $reader->reflect('Test\AppFramework\Utility\EndController', 'test3'); $this->assertFalse($reader->hasAnnotation('Annotation')); } - public function testRangeDetection() { + public function testRangeDetection(): void { $reader = new ControllerMethodReflector(); $reader->reflect('Test\AppFramework\Utility\EndController', 'test4'); -- cgit v1.2.3