userSummary = $userSummary; $this->allowBlankSummary = $allowBlankSummary; } public function checkConstraint(): string { if ( !$this->allowBlankSummary && trim( $this->userSummary ) == '' ) { // TODO this was == in EditPage, can it be === ? $this->result = self::CONSTRAINT_FAILED; } else { $this->result = self::CONSTRAINT_PASSED; } return $this->result; } public function getLegacyStatus(): StatusValue { $statusValue = StatusValue::newGood(); if ( $this->result === self::CONSTRAINT_FAILED ) { // From EditPage, regarding the fatal: // or 'missingcommentheader' if $section == 'new'. Blegh $statusValue->fatal( 'missingsummary' ); $statusValue->value = self::AS_SUMMARY_NEEDED; } return $statusValue; } }