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:
Umherirrender 2018-04-05 12:45:23 +02:00
parent c536740e67
commit 145b1f1772

View file

@ -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.