Why accepting array<int> with type array<string> is considered unsafe? #10908
-
See https://phpstan.org/r/6670a1d9-a694-42a1-b678-b9765f28b9ee <?php declare(strict_types = 1);
/**
* @param string[] $y
* @see \Doctrine\DBAL\Query\Expression\ExpressionBuilder::in
*/
function in($y): string
{
return '';
}
in([1, 2]); |
Beta Was this translation helpful? Give feedback.
Answered by
ondrejmirtes
Apr 19, 2024
Replies: 1 comment
-
Because int isn't a string obviously: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
biozshock
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because int isn't a string obviously: