diff --git a/tests/data/TestClass.php b/tests/data/TestClass.php index 12ba1d5..5fae3ad 100644 --- a/tests/data/TestClass.php +++ b/tests/data/TestClass.php @@ -86,6 +86,33 @@ public function test124(int $param1): bool { } + /** + * @param int $param1 + * + * @return + */ + public function test122(int $param1) + { + } + + /** + * @param int $param1 + * + * @return + */ + public function test123(int $param1): void + { + } + + /** + * @param int $param1 + * + * @return + */ + public function test124(int $param1): bool + { + } + /** * @param int|null $param1 * diff --git a/tests/src/CheckerFileProcessorTest.php b/tests/src/CheckerFileProcessorTest.php index ea2578e..a6f2ea1 100644 --- a/tests/src/CheckerFileProcessorTest.php +++ b/tests/src/CheckerFileProcessorTest.php @@ -119,13 +119,13 @@ public function testProcessFile() 'file' => 'TestClass.php', 'class' => 'Test\Example\TestClass', 'method' => 'test124', - 'line' => 85, + 'line' => 112, ], [ 'type' => 'param-mismatch', 'file' => 'TestClass.php', 'class' => 'Test\Example\TestClass', 'method' => 'test132', - 'line' => 114, + 'line' => 141, 'param' => '$param1', 'param-type' => 'int|null', 'doc-type' => 'int', @@ -134,7 +134,7 @@ public function testProcessFile() 'file' => 'TestClass.php', 'class' => 'Test\Example\TestClass', 'method' => 'test132', - 'line' => 114, + 'line' => 141, 'return-type' => 'bool|null', 'doc-type' => 'bool', ], [ @@ -142,7 +142,7 @@ public function testProcessFile() 'file' => 'TestClass.php', 'class' => 'Test\Example\TestClass', 'method' => 'test141', - 'line' => 144, + 'line' => 171, 'param' => '$param1', 'param-type' => 'int|float', 'doc-type' => 'int', @@ -151,7 +151,7 @@ public function testProcessFile() 'file' => 'TestClass.php', 'class' => 'Test\Example\TestClass', 'method' => 'test141', - 'line' => 144, + 'line' => 171, 'return-type' => 'bool|int', 'doc-type' => 'bool', ] @@ -267,13 +267,13 @@ public function testProcessFile() 'file' => 'TestClass.php', 'class' => 'Test\Example\TestClass', 'method' => 'test124', - 'line' => 85, + 'line' => 112, ], [ 'type' => 'param-mismatch', 'file' => 'TestClass.php', 'class' => 'Test\Example\TestClass', 'method' => 'test132', - 'line' => 114, + 'line' => 141, 'param' => '$param1', 'param-type' => 'int|null', 'doc-type' => 'int', @@ -282,7 +282,7 @@ public function testProcessFile() 'file' => 'TestClass.php', 'class' => 'Test\Example\TestClass', 'method' => 'test132', - 'line' => 114, + 'line' => 141, 'return-type' => 'bool|null', 'doc-type' => 'bool', ], [ @@ -290,7 +290,7 @@ public function testProcessFile() 'file' => 'TestClass.php', 'class' => 'Test\Example\TestClass', 'method' => 'test141', - 'line' => 144, + 'line' => 171, 'param' => '$param1', 'param-type' => 'int|float', 'doc-type' => 'int', @@ -299,7 +299,7 @@ public function testProcessFile() 'file' => 'TestClass.php', 'class' => 'Test\Example\TestClass', 'method' => 'test141', - 'line' => 144, + 'line' => 171, 'return-type' => 'bool|int', 'doc-type' => 'bool', ]