Remove all not needed & from hook handler signatures

Most of these are accidential, obsolete from a time when PHP4 required
these & to enforce passing by reference. This is the default since PHP5.
The issue with this & is that is (in theory) allows hook handlers to
replace the object with an entirely different one. Luckily this does
not work in all cases I'm aware of. But it is confusing, semantically.

Change-Id: If1e9e2723ef96308f9b4b27377398a5e497bfe70
This commit is contained in:
Thiemo Kreuz 2018-06-07 13:29:22 +02:00
parent 1eb684447e
commit 7f600d2ebe

View file

@ -214,23 +214,23 @@ class AbuseFilterHooks {
}
/**
* @param WikiPage &$wikiPage
* @param User &$user
* @param WikiPage $wikiPage
* @param User $user
* @param string $content Content
* @param string $summary
* @param bool $minoredit
* @param bool $watchthis
* @param string $sectionanchor
* @param int &$flags
* @param int $flags
* @param Revision $revision
* @param Status &$status
* @param Status $status
* @param int $baseRevId
*
* @return bool
*/
public static function onPageContentSaveComplete(
WikiPage &$wikiPage, &$user, $content, $summary, $minoredit, $watchthis, $sectionanchor,
&$flags, $revision, &$status, $baseRevId
WikiPage $wikiPage, $user, $content, $summary, $minoredit, $watchthis, $sectionanchor,
$flags, $revision, $status, $baseRevId
) {
if ( !self::$successful_action_vars || !$revision ) {
self::$successful_action_vars = false;
@ -349,14 +349,14 @@ class AbuseFilterHooks {
}
/**
* @param WikiPage &$article
* @param User &$user
* @param string &$reason
* @param WikiPage $article
* @param User $user
* @param string $reason
* @param string &$error
* @param Status &$status
* @param Status $status
* @return bool
*/
public static function onArticleDelete( &$article, &$user, &$reason, &$error, &$status ) {
public static function onArticleDelete( $article, $user, $reason, &$error, $status ) {
$vars = new AbuseFilterVariableHolder;
$vars->addHolders(