Skip to content

Commit 53025c4

Browse files
committed
Set checkUninitializedProperties to false in UnusedPrivatePropertyRuleTest
1 parent 60e575a commit 53025c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/PHPStan/Rules/DeadCode/UnusedPrivatePropertyRuleTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class UnusedPrivatePropertyRuleTest extends RuleTestCase
2222
/** @var string[] */
2323
private array $alwaysReadTags;
2424

25+
private bool $checkUninitializedProperties = false;
26+
2527
protected function getRule(): Rule
2628
{
2729
return new UnusedPrivatePropertyRule(
@@ -55,14 +57,15 @@ public function isInitialized(PropertyReflection $property, string $propertyName
5557
]),
5658
$this->alwaysWrittenTags,
5759
$this->alwaysReadTags,
58-
true,
60+
$this->checkUninitializedProperties,
5961
);
6062
}
6163

6264
public function testRule(): void
6365
{
6466
$this->alwaysWrittenTags = [];
6567
$this->alwaysReadTags = [];
68+
$this->checkUninitializedProperties = true;
6669

6770
$tip = 'See: https://phpstan.org/developing-extensions/always-read-written-properties';
6871

@@ -236,6 +239,7 @@ public function testBug5337(): void
236239
{
237240
$this->alwaysWrittenTags = [];
238241
$this->alwaysReadTags = [];
242+
$this->checkUninitializedProperties = true;
239243
$this->analyse([__DIR__ . '/data/bug-5337.php'], []);
240244
}
241245

0 commit comments

Comments
 (0)