Skip to content

Commit e1aeb92

Browse files
committed
fix one more test
1 parent 7142ddc commit e1aeb92

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tests/PHPStan/Rules/Exceptions/ThrowsVoidMethodWithExplicitThrowPointRuleTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use PHPStan\Rules\Rule;
66
use PHPStan\Testing\RuleTestCase;
7+
use ThrowsVoidMethod\DifferentException;
78
use ThrowsVoidMethod\MyException;
89
use UnhandledMatchError;
910
use const PHP_VERSION_ID;
@@ -40,7 +41,7 @@ public function dataRule(): array
4041
],
4142
[
4243
false,
43-
['DifferentException'],
44+
[DifferentException::class],
4445
[
4546
[
4647
'Method ThrowsVoidMethod\Foo::doFoo() throws exception ThrowsVoidMethod\MyException but the PHPDoc contains @throws void.',
@@ -55,7 +56,7 @@ public function dataRule(): array
5556
],
5657
[
5758
true,
58-
['DifferentException'],
59+
[DifferentException::class],
5960
[
6061
[
6162
'Method ThrowsVoidMethod\Foo::doFoo() throws exception ThrowsVoidMethod\MyException but the PHPDoc contains @throws void.',

tests/PHPStan/Rules/Exceptions/data/throws-void-method.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace ThrowsVoidMethod;
44

5-
class MyException extends \Exception
6-
{
5+
class MyException extends \Exception {}
6+
7+
class DifferentException extends \Exception {}
78

8-
}
99

1010
class Foo
1111
{

0 commit comments

Comments
 (0)