Skip to content

Commit ae4ff1c

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 f15cc3c commit ae4ff1c

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
@@ -174,6 +174,10 @@ public function testTypesAssignedToPropertiesExpressionNames(): void
174174
'Property PropertiesFromArrayIntoObject\Foo::$lall (int) does not accept string.',
175175
69,
176176
],
177+
[
178+
'Property PropertiesFromArrayIntoObject\Foo::$foo (string) does not accept float.',
179+
83,
180+
],
177181
[
178182
'Property PropertiesFromArrayIntoObject\Foo::$foo (string) does not accept float|int|string.',
179183
97,

0 commit comments

Comments
 (0)