Skip to content

Commit 14199be

Browse files
phpstan-botclaude
andcommitted
Test that string literals in an array() assignment are not used as a string
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 692be71 commit 14199be

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎tests/PHPStan/Node/data/used-as-string.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,8 @@ function passUnionArguments(): void
137137
takesUnionWithString('union with string argument');
138138
takesUnionWithoutString(5);
139139
}
140+
141+
function arrayAssignment(): void
142+
{
143+
$bar = array('Bar1', 'Bar2', 'Bar3');
144+
}

0 commit comments

Comments
 (0)