Open smaddock opened 4 months ago
I found these snippets:
Object are always passed by reference. $this->config = &$config;
is the exact same as $this->config = $config;
It saying the param is unused is a bug, but you can avoid it by not having redundant code. Here is an example of this bug with non-redundant code: https://psalm.dev/r/578763b870
If a method parameter is used in the method as a reference (AKA alias, i.e., prefixing with an ampersand), Psalm marks that parameter as unused. Removing the ampersand removes the error.
https://psalm.dev/r/b46281057c
(Apologies if this is a duplicate, I searched several times and couldn't find this reported previously.)