You are here

public function InputFormats::getMessage in Security Review 8

Converts a result integer to a human-readable result message.

Parameters

int $result_const: The result integer.

Return value

string The human-readable result message.

Overrides Check::getMessage

File

src/Checks/InputFormats.php, line 174

Class

InputFormats
Checks for vulnerabilities related to input formats.

Namespace

Drupal\security_review\Checks

Code

public function getMessage($result_const) {
  switch ($result_const) {
    case CheckResult::SUCCESS:
      return $this
        ->t('Untrusted users are not allowed to input dangerous HTML tags.');
    case CheckResult::FAIL:
      return $this
        ->t('Untrusted users are allowed to input dangerous HTML tags.');
    case CheckResult::INFO:
      return $this
        ->t('Module filter is not enabled.');
    default:
      return $this
        ->t('Unexpected result.');
  }
}