-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
phpstan/phpstan-src
#1030Description
Feature request
When building sql queries, sometimes str_repeat is used to build IN sql-expressions.
$array = [1,2,3]; // our array
$in = str_repeat('?,', count($array) - 1) . '?';
$sql = "SELECT * FROM table WHERE column IN ($in)";Given constant arguments, str_repeat should return a ConstantString which would allow query analysis.
https://phpstan.org/r/33728aab-b9fb-4567-953e-0027dd26ee6b
I will work on it, just leaving it here so it is not forgotten
Metadata
Metadata
Assignees
Labels
No labels