Fix PhanTypeMismatchDeclaredParam
[lhc/web/wiklou.git] / includes / FileDeleteForm.php
index 783de1c..ce75037 100644 (file)
@@ -148,7 +148,7 @@ class FileDeleteForm {
         * @param string &$oldimage Archive name
         * @param string $reason Reason of the deletion
         * @param bool $suppress Whether to mark all deleted versions as restricted
-        * @param User $user User object performing the request
+        * @param User|null $user User object performing the request
         * @param array $tags Tags to apply to the deletion action
         * @throws MWException
         * @return Status
@@ -212,7 +212,7 @@ class FileDeleteForm {
                                                $logEntry->setTags( $tags );
                                                $logid = $logEntry->insert();
                                                $dbw->onTransactionPreCommitOrIdle(
-                                                       function () use ( $dbw, $logEntry, $logid ) {
+                                                       function () use ( $logEntry, $logid ) {
                                                                $logEntry->publish( $logid );
                                                        },
                                                        __METHOD__