Skip to content

Commit 2c1152e

Browse files
ondrejmirtesclaude
andcommitted
Update expectation: sharper narrowing catches a float-to-string property assignment
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CGhnJQpUWRRpg6H5LuWJkA
1 parent a62ef01 commit 2c1152e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tests/PHPStan/Rules/Properties/TypesAssignedToPropertiesRuleTest.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ public function testTypesAssignedToPropertiesExpressionNames(): void
172172
'Property PropertiesFromArrayIntoObject\Foo::$lall (int) does not accept string.',
173173
69,
174174
],
175+
[
176+
'Property PropertiesFromArrayIntoObject\Foo::$foo (string) does not accept float.',
177+
83,
178+
],
175179
[
176180
'Property PropertiesFromArrayIntoObject\Foo::$foo (string) does not accept float|int|string.',
177181
97,

0 commit comments

Comments
 (0)