You are here

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

Class

QueryErrors
Checks for abundant query errors.

Namespace

Drupal\security_review\Checks

Code

public function getMessage($result_const) {
  switch ($result_const) {
    case CheckResult::FAIL:
      return $this
        ->t('Query errors from the same IP. These may be a SQL injection attack or an attempt at information disclosure.');
    default:
      return $this
        ->t('Unexpected result.');
  }
}