diff --git a/tests/PHPStan/Rules/Properties/TypesAssignedToPropertiesRuleTest.php b/tests/PHPStan/Rules/Properties/TypesAssignedToPropertiesRuleTest.php index de3e512ea4..cd0fa17e76 100644 --- a/tests/PHPStan/Rules/Properties/TypesAssignedToPropertiesRuleTest.php +++ b/tests/PHPStan/Rules/Properties/TypesAssignedToPropertiesRuleTest.php @@ -475,7 +475,7 @@ public function testBug6356b(): void ], ]); } - + public function testIntegerRangesAndConstants(): void { $this->checkExplicitMixed = true; diff --git a/tests/PHPStan/Rules/Properties/data/int-ranges-and-constants.php b/tests/PHPStan/Rules/Properties/data/int-ranges-and-constants.php index cb9d99d16e..3aaa0fc82f 100644 --- a/tests/PHPStan/Rules/Properties/data/int-ranges-and-constants.php +++ b/tests/PHPStan/Rules/Properties/data/int-ranges-and-constants.php @@ -44,4 +44,13 @@ public function test2($a, $b, $c, $j, $k, $l, $m): void { $this->x = $l; $this->x = $m; } + + const I_1=1; + const I_2=2; + + /** @param int-mask $flag */ + public function sayHello($flag): void + { + $this->x = $flag; + } }