permissionManager = $permissionManager; $this->title = $title; $this->user = $user; } public function checkConstraint(): string { // Check isn't simple enough to just repeat when getting the status if ( $this->permissionManager->isBlockedFrom( $this->user, $this->title ) ) { $this->result = self::CONSTRAINT_FAILED; return self::CONSTRAINT_FAILED; } $this->result = self::CONSTRAINT_PASSED; return self::CONSTRAINT_PASSED; } public function getLegacyStatus(): StatusValue { $statusValue = StatusValue::newGood(); if ( $this->result === self::CONSTRAINT_FAILED ) { $statusValue->setResult( false, self::AS_BLOCKED_PAGE_FOR_USER ); } return $statusValue; } }