You are here

public function Field::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/Field.php, line 228

Class

Field
Checks for Javascript and PHP in submitted content.

Namespace

Drupal\security_review\Checks

Code

public function getMessage($result_const) {
  switch ($result_const) {
    case CheckResult::SUCCESS:
      return $this
        ->t('Dangerous tags were not found in any submitted content (fields).');
    case CheckResult::FAIL:
      return $this
        ->t('Dangerous tags were found in submitted content (fields).');
    default:
      return $this
        ->t('Unexpected result.');
  }
}