Bug report
Same type must be always accepted.
According to the current error, it seems the Hook::addHook() method generalizes the phpdoc param type to Closure(Hook) instead of preserving the $this in the param type.
Code snippet that reproduces the problem
https://phpstan.org/r/80653301-2ea9-4ed5-917a-bb569483a02f
Expected output
no error