mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-15 02:54:23 +00:00
Declare nullable argument only in @param
The $oldRev could be null, but when set the null in argument list, it is an optional parameter and the following argument $user must be optional too. That is not needed here. Change-Id: Ia7c1c44b29b191dc602513e07b90d3e2415d3a5d
This commit is contained in:
parent
c536740e67
commit
145b1f1772
|
@ -40,11 +40,11 @@ class ThanksHooks {
|
|||
* Inserts 'thank' link into revision interface
|
||||
* @param Revision $rev Revision object to add the thank link for
|
||||
* @param array &$links Links to add to the revision interface
|
||||
* @param Revision $oldRev Revision object of the "old" revision when viewing a diff
|
||||
* @param Revision|null $oldRev Revision object of the "old" revision when viewing a diff
|
||||
* @param User $user The user performing the thanks.
|
||||
* @return bool
|
||||
*/
|
||||
public static function insertThankLink( $rev, &$links, $oldRev = null, User $user ) {
|
||||
public static function insertThankLink( $rev, &$links, $oldRev, User $user ) {
|
||||
$recipientId = $rev->getUser();
|
||||
$recipient = User::newFromId( $recipientId );
|
||||
// Make sure Echo is turned on.
|
||||
|
|
Loading…
Reference in a new issue