You are here

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

Class

FilePermissions
Check that files aren't writeable by the server.

Namespace

Drupal\security_review\Checks

Code

public function getMessage($result_const) {
  switch ($result_const) {
    case CheckResult::SUCCESS:
      return $this
        ->t('Drupal installation files and directories (except required) are not writable by the server.');
    case CheckResult::FAIL:
      return $this
        ->t('Some files and directories in your install are writable by the server.');
    case CheckResult::INFO:
      return $this
        ->t('The test cannot be run on this system.');
    default:
      return $this
        ->t('Unexpected result.');
  }
}