You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function doSomething(array $param): void
{
$fubar = $ppparam['fubar'] ?? [];
foreach ($fubar as $bar) {
// do something
}
}
observed behavior: PHPStan doesn't care about the misspelled parameter variable.
expected behavior: PHPStan should complain about $ppparam as it is never declared but used anyway
Would be really handy if PHPStan would detect that properly. Had some cases were I stumbled upon something like this and the following loops were never entered of course.
thanks,
Martin
The text was updated successfully, but these errors were encountered:
Bug report
PHPStan version: 0.12.11
example code:
phpstan.org link: https://phpstan.org/r/83b29973-88ba-4531-ab47-8efa22385f60
observed behavior: PHPStan doesn't care about the misspelled parameter variable.
expected behavior: PHPStan should complain about $ppparam as it is never declared but used anyway
Would be really handy if PHPStan would detect that properly. Had some cases were I stumbled upon something like this and the following loops were never entered of course.
thanks,
Martin
The text was updated successfully, but these errors were encountered: