For MediaWiki (recent comments | status changes | tags | authors | states | release notes | statistics)
Why &$this instead of just $this?
Seconded, there's no use for it here. I desperately want to start marking as a fixme any commit adding a new hook with a & that isn't there because the purpose of the hook is to let the hook user alter the contents of the variable. After I look at BeforePageDisplay, our context code, and make a change in the code a few lines below, see the &'s that don't need to be there, and realize what a horrible situation that hook is in.
We can add a & to a hook later on if we find a need for a caller to alter the variable. However we cannot remove a & from an existing hook, because by all chances functions defined for those hooks will already be including a & even if they don't use it and if we remove the & from the wfRunHooks calls then a pile of extensions start throwing php warning errors.
I know it's not needed technically (object being passed by reference already). After asking Roan, I kept it in to be consistent with other places.
There's no need though. All the other places as wrong
s/as/are/