deleteLogFormatter: explicitly declare parsedParametersDeleteLog
[lhc/web/wiklou.git] / includes / logging / DeleteLogFormatter.php
index 048b567..e8c4393 100644 (file)
  * @since 1.22
  */
 
+use MediaWiki\Storage\RevisionRecord;
+
 /**
  * This class formats delete log entries.
  *
  * @since 1.19
  */
 class DeleteLogFormatter extends LogFormatter {
+       /** @var array|null */
+       private $parsedParametersDeleteLog;
+
+       /**
+        * @inheritDoc
+        */
        protected function getMessageKey() {
                $key = parent::getMessageKey();
                if ( in_array( $this->entry->getSubtype(), [ 'event', 'revision' ] ) ) {
@@ -48,8 +56,11 @@ class DeleteLogFormatter extends LogFormatter {
                return $key;
        }
 
+       /**
+        * @inheritDoc
+        */
        protected function getMessageParameters() {
-               if ( isset( $this->parsedParametersDeleteLog ) ) {
+               if ( $this->parsedParametersDeleteLog !== null ) {
                        return $this->parsedParametersDeleteLog;
                }
 
@@ -280,10 +291,10 @@ class DeleteLogFormatter extends LogFormatter {
                        ];
 
                        static $fields = [
-                               Revision::DELETED_TEXT => 'content',
-                               Revision::DELETED_COMMENT => 'comment',
-                               Revision::DELETED_USER => 'user',
-                               Revision::DELETED_RESTRICTED => 'restricted',
+                               RevisionRecord::DELETED_TEXT => 'content',
+                               RevisionRecord::DELETED_COMMENT => 'comment',
+                               RevisionRecord::DELETED_USER => 'user',
+                               RevisionRecord::DELETED_RESTRICTED => 'restricted',
                        ];
 
                        if ( isset( $rawParams['6::ofield'] ) ) {