Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid unused variable when variable is a reference in an array. #5517

Closed
jpresutti opened this issue Mar 29, 2021 · 1 comment
Closed

Invalid unused variable when variable is a reference in an array. #5517

jpresutti opened this issue Mar 29, 2021 · 1 comment

Comments

@jpresutti
Copy link

jpresutti commented Mar 29, 2021

Edit: using psalm.phar 4.7
ERROR: UnusedVariable - Router/Router.php:491:13 - $val is never referenced or the value is not used (see https://psalm.dev/077)

 /** @var string $val */
foreach ($arguments as &$val) {
    $val = urlencode($val);
}
return implode('/', $arguments);
@jpresutti
Copy link
Author

To be clear, this variable is used when the return of $arguments happens. This is not a valid unused variable.

@muglug muglug closed this as completed in 67c5dc3 Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant