You are here

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

Class

PrivateFiles
Checks whether the private files' directory is under the web root.

Namespace

Drupal\security_review\Checks

Code

public function getMessage($result_const) {
  switch ($result_const) {
    case CheckResult::SUCCESS:
      return $this
        ->t('Private files directory is outside the web server root.');
    case CheckResult::FAIL:
      return $this
        ->t('Private files is enabled but the specified directory is not secure outside the web server root.');
    default:
      return $this
        ->t('Unexpected result.');
  }
}