Skip to content

Commit 10866c9

Browse files
committed
simplify tests
1 parent 80a6d7b commit 10866c9

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

tests/PHPStan/Rules/Exceptions/TooWideFunctionThrowTypeRuleTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111
class TooWideFunctionThrowTypeRuleTest extends RuleTestCase
1212
{
1313

14-
/** @var true */
15-
private bool $implicitThrows = true;
16-
1714
protected function getRule(): Rule
1815
{
19-
return new TooWideFunctionThrowTypeRule(new TooWideThrowTypeCheck($this->implicitThrows));
16+
return new TooWideFunctionThrowTypeRule(new TooWideThrowTypeCheck(true));
2017
}
2118

2219
public function testRule(): void

tests/PHPStan/Rules/Exceptions/TooWidePropertyHookThrowTypeRuleTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,9 @@
1313
class TooWidePropertyHookThrowTypeRuleTest extends RuleTestCase
1414
{
1515

16-
/** @var true */
17-
private bool $implicitThrows = true;
18-
1916
protected function getRule(): Rule
2017
{
21-
return new TooWidePropertyHookThrowTypeRule(self::getContainer()->getByType(FileTypeMapper::class), new TooWideThrowTypeCheck($this->implicitThrows));
18+
return new TooWidePropertyHookThrowTypeRule(self::getContainer()->getByType(FileTypeMapper::class), new TooWideThrowTypeCheck(true));
2219
}
2320

2421
#[RequiresPhp('>= 8.4')]

0 commit comments

Comments
 (0)