mediawiki-extensions-AbuseF.../includes/Parser/UserVisibleWarning.php
Daimona Eaytoy a9722868ab Improve coverage of parser-related classes
Change-Id: I229c528505f0208b34f37d8c969450731e5a08a3
2021-01-15 03:16:48 +00:00

23 lines
495 B
PHP

<?php
namespace MediaWiki\Extension\AbuseFilter\Parser;
use Message;
/**
* A variant of user-visible exception that is not fatal.
*/
class UserVisibleWarning extends AFPUserVisibleException {
/**
* @return Message
*/
public function getMessageObj() : Message {
// Give grep a chance to find the usages:
// abusefilter-warning-match-empty-regex
return new Message(
'abusefilter-warning-' . $this->mExceptionID,
array_merge( [ $this->mPosition ], $this->mParams )
);
}
}