12use Psr\Log\LoggerInterface;
29 private readonly LoggerInterface $logger,
30 private readonly
string $input,
32 private readonly
Title $title,
37 if ( $this->input !==
'' ) {
39 '{name} editing "{title}" submitted bogus field "{input}"',
41 'name' => $this->user->getName(),
42 'title' => $this->title->getPrefixedText(),
43 'input' => $this->input
46 return PageEditStatus::newFatal(
'spamprotectionmatch',
'' )
49 return PageEditStatus::newGood();
if(!defined('MW_SETUP_CALLBACK'))
Abstract class for all constraints that can prevent edits.
Verify simple anti spam measure of an extra hidden text field.
__construct(private readonly LoggerInterface $logger, private readonly string $input, private readonly UserIdentity $user, private readonly Title $title,)
Status returned by edit constraints and other page editing checks.
setValue(int $value)
Sets the value of the status.